Open guardrex opened 3 years ago
UPDATE: We're going to cover it in docs by saying to the effect that if VSC doesn't create the .vscode
folder assets automatically (i.e., launch.json
and tasks.json
) use the following default files and then show the files. We can go with that. I just don't want to have these files permanently present because they're going to churn over time and go stale.
I checked again this morning (6/1), and my VSC/Omnisharp still isn't creating these assets for a hosted Blazor WebAssembly app (opened either from the solution folder or from the Server
project folder). Also, the Command Palette approach is failing to add them ... I still get ...
Could not locate .NET Core project. Assets were not generated.
I can drop the files into position into a manually-created .vscode
folder in the solution's folder and then everything works fine.
Hello ... I just want to provide an update (9/22/2021) that I'm still seeing this problem with ...
VSC: 1.60.1 C# Extension: 1.23.15
Could not locate .NET Core project. Assets were not generated.
... when in the command palette and I try to execute .NET: Generate Assets for Build and Debug
for a Blazor hosted WebAssembly project generated using the .NET CLI with dotnet new blazorwasm -ho
.
Issue Description
For a hosted Blazor WebAssembly solution folder or
Server
project folder of the solution:.vscode
assets manually.Other issues:
cc: @captainsafia
Cross-reference ASP.NET Core docs issue that I'm working that pertains to this process: https://github.com/dotnet/AspNetCore.Docs/issues/22234
Steps to Reproduce
dotnet new blazorwasm -ho
).Server
project folder). The extension doesn't offer to add the build and debug assets.Notification appears:
The notification appears either trying to add the assets to the solution's folder or the
Server
project's folder.Expected Behavior
.vscode
folder withlaunch.json
andtasks.json
, possibly with a prompt to add for theServer
project if the solution's folder is opened in VSC.Actual Behavior
Error when attempting manual add:
Logs
OmniSharp log
Starting OmniSharp server at 5/7/2021, 7:54:50 PM Target: c:\Users\XXXXX\Desktop\BlazorWebAssemblySignalRApp\Server
OmniSharp server started. Path: c:\Users\XXXXX.vscode\extensions\ms-dotnettools.csharp-1.23.11.omnisharp\1.37.8\OmniSharp.exe PID: 6856
Mode: VisualStudio RunningTests: False RunningInVisualStudio: False MSBuildToolsDirectory32: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin MSBuildToolsDirectory64: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64 MSBuildSDKsPath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks CurrentMSBuildConfigurationFile: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe.config CurrentMSBuildExePath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe CurrentMSBuildToolsDirectory: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin VisualStudioInstallRootDirectory: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise MSBuildExtensionsPath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild
{ "Type": "request", "Seq": 6, "Command": "/projects" }
{ "Type": "request", "Seq": 5, "Command": "/projects" }
{ "Request_seq": 6, "Command": "/projects", "Running": true, "Success": true, "Message": null, "Body": { "MsBuild": { "SolutionPath": null, "Projects": [] }, "Script": { "Projects": [] } }, "Seq": 49, "Type": "response" }
{ "Request_seq": 5, "Command": "/projects", "Running": true, "Success": true, "Message": null, "Body": { "MsBuild": { "SolutionPath": null, "Projects": [] }, "Script": { "Projects": [] } }, "Seq": 50, "Type": "response" }
{ "Type": "request", "Seq": 7, "Command": "/projects" }
{ "Request_seq": 7, "Command": "/projects", "Running": true, "Success": true, "Message": null, "Body": { "MsBuild": { "SolutionPath": null, "Projects": [] }, "Script": { "Projects": [] } }, "Seq": 54, "Type": "response" }
{ "Type": "request", "Seq": 8, "Command": "/projects" }
{ "Request_seq": 8, "Command": "/projects", "Running": true, "Success": true, "Message": null, "Body": { "MsBuild": { "SolutionPath": null, "Projects": [] }, "Script": { "Projects": [] } }, "Seq": 57, "Type": "response" }
C# log
Environment information
VSCode version: 1.56.0 C# Extension: 1.23.11
Dotnet Information
.NET SDK (reflecting any global.json): Version: 5.0.202 Commit: db7cc87d51 Runtime Environment: OS Name: Windows OS Version: 10.0.19041 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\5.0.202\ Host (useful for support): Version: 5.0.5 Commit: 2f740adc14 .NET SDKs installed: 3.1.302 [C:\Program Files\dotnet\sdk] 5.0.202 [C:\Program Files\dotnet\sdk] .NET runtimes installed: Microsoft.AspNetCore.All 2.1.27 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.27 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.27 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-downloadVisual Studio Code Extensions
|Extension|Author|Version| |---|---|---| |code-spell-checker|streetsidesoftware|1.10.2| |csharp|ms-dotnettools|1.23.11| |DocFX|ms-docfx|0.1.3| |docs-article-templates|docsmsft|0.2.11| |docs-authoring-pack|docsmsft|0.1.13| |docs-build|ceapex|0.1.24| |docs-build|docsmsft|0.3.4| |docs-images|docsmsft|0.0.9| |docs-linting|docsmsft|0.0.7| |docs-markdown|docsmsft|0.2.90| |docs-metadata|docsmsft|1.0.6| |docs-preview|docsmsft|0.3.57| |docs-scaffolding|docsmsft|0.0.7| |docs-yaml|docsmsft|0.2.6| |js-debug-nightly|ms-vscode|2021.5.617| |LinkCheckMD|blackmist|0.3.1| |powershell|ms-vscode|2021.2.2| |status-bar-tasks|GuardRex|0.3.0| |vscode-markdownlint|DavidAnson|0.40.4| |vscode-yaml|redhat|0.18.0|;