Debugging failed that "Could not locate .NET Core project. Assets were not generated.".
See original GitHub issueEnvironment 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, • 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’”: • Then open “launch.json”, press “Add Configuration…”, the “launch.json” file generator hasn’t updated the parts in <>. • Run the ‘.NET: Generate Assets for Build and Debug’ command from command pallet,
Expected behavior
Get a functional launch.json
Actual behavior
Could not locate .NET Core project. Assets were not generated.
Issue Analytics
- State:
- Created 4 years ago
- Comments:18 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same problem on 1.21.18 and .net core 3.1.201.
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: