question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Debugging failed that "Could not locate .NET Core project. Assets were not generated.".

See original GitHub issue

Environment data

dotnet --info output:

.NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview6-012103
 Commit:    d0d02f6552

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.13
 OS Platform: Darwin
 RID:         osx.10.13-x64
 Base Path:   /usr/local/share/dotnet/sdk/3.0.100-preview6-012103/

Host (useful for support):
  Version: 3.0.0-preview6-27728-04
  Commit:  b2f8fc281d

.NET Core SDKs installed:
  2.1.505 [/usr/local/share/dotnet/sdk]
  3.0.100-preview6-012103 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.9 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.9 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview6-19278-02 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.9 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0-preview6-27728-04 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

VS Code version: 1.34 C# Extension version: 1.19 (v1.19.1)

Steps to reproduce

• Create new .NET Core 3.0 console application(con30) with reference to a .NET Standard 2.1 class library(cla21) via CLI, image • Open it via VSCode • Debug the app – Put breakpoint in the code and press F5, it shows a prompt message that “Could not find the task ‘build’”: image • Then open “launch.json”, press “Add Configuration…”, the “launch.json” file generator hasn’t updated the parts in <>. image • Run the ‘.NET: Generate Assets for Build and Debug’ command from command pallet, image

Expected behavior

Get a functional launch.json

Actual behavior

Could not locate .NET Core project. Assets were not generated. image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:18 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
billjacobicommented, May 14, 2020

Same problem on 1.21.18 and .net core 3.1.201.

4reactions
omarfqcommented, Jul 19, 2019

I managed to solve the issue by following the steps from this comment: https://github.com/OmniSharp/omnisharp-vscode/issues/2509#issuecomment-420318250

As far as I can tell, the root cause of this problem has to do with the OmniSharp.MSBuild.ProjectManager. By attempting to fix the following error I managed to solve all the other subsequent errors:

Screen Shot 2019-07-18 at 9 41 24 PM

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not locate .NET Core project. Assets were not generated
This issue could be because the launch.json , which ideally should have been populated with the necessary details isn't generated in case.
Read more >
Visual Studio Code Error: The .Net Core cannot be located - Ask
NET Core SDK cannot be located. .NET Core debugging will not be enabled. Make sure the .NET Core SDK is installed and is...
Read more >
How to Fix The .NET Core SDK cannot be located ... - YouTube
Today we will fix the . NET Core missing problem of Visual Studio Code. It happened when we installed C# Extension on Visual...
Read more >
Help : Could not locate .net core project. Assets were ... - Reddit
net core project. Assets were not generated. Following brackeys tutorial linked down at 7:50 : r/VisualStudio.
Read more >
NETSDK1004: Assets file not found - .NET CLI | Microsoft Learn
A change to the project file wasn't automatically detected and restored by the project system. To resolve the error, open a command prompt...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found