dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.86k stars 672 forks source link

Errors when running .net generate assets to build .vscode folder #3176

Open Hardkore9t8 opened 5 years ago

Hardkore9t8 commented 5 years ago

Please paste the output from your ## Issue Description ##

Steps to Reproduce

Go to Command Palette Screen Shot 2019-07-15 at 12 32 20 PM Select .Net Generate Assets for Build and Debug

Expected Behavior

Build .vscode folder with launch.json and task.json

Actual Behavior

Screen Shot 2019-07-15 at 12 36 58 PM

Logs

OmniSharp log

Post the output from Output-->OmniSharp log here

Starting OmniSharp server at 7/15/2019, 12:27:25 PM Target: /Users/DaddyNupe/InventApp/InventApp.API

OmniSharp server started with Mono 5.18.1. Path: /Users/DaddyNupe/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/OmniSharp.exe PID: 5930

    Starting OmniSharp on MacOS 10.14.5 (x64)
    DotNetPath set to dotnet
    Located 2 MSBuild instance(s)
        1: Mono 15.0 - "/Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin"
        2: StandAlone 15.0 - "/Users/DaddyNupe/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin"
    Registered MSBuild instance: Mono 15.0 - "/Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin"
        CscToolPath = /Users/DaddyNupe/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Roslyn
        CscToolExe = csc.exe
    Detecting Cake files in '/Users/DaddyNupe/InventApp/InventApp.API'.
    Could not find any Cake files
    Project system 'OmniSharp.DotNet.DotNetProjectSystem' is disabled in the configuration.
    No solution files found in '/Users/DaddyNupe/InventApp/InventApp.API'
    Queue project update for '/Users/DaddyNupe/InventApp/InventApp.API/InventApp.API.csproj'
    Detecting CSX files in '/Users/DaddyNupe/InventApp/InventApp.API'.
    Could not find any CSX files
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
    Loading project: /Users/DaddyNupe/InventApp/InventApp.API/InventApp.API.csproj
    Configuration finished.
    Omnisharp server running using Stdio at location '/Users/DaddyNupe/InventApp/InventApp.API' on host 5900.
    Unable to create directory "bin/Debug/netcoreapp2.2/". Access to the path "/Users/DaddyNupe/InventApp/InventApp.API/bin" is denied.
    Unable to create directory "obj/Debug/netcoreapp2.2/". Access to the path "/Users/DaddyNupe/InventApp/InventApp.API/obj/Debug" is denied.
    Could not write state file "obj/Debug/netcoreapp2.2/InventApp.API.csprojAssemblyReference.cache". Could not find a part of the path "/Users/DaddyNupe/InventApp/InventApp.API/obj/Debug/netcoreapp2.2/InventApp.API.csprojAssemblyReference.cache".
    Could not write lines to file "obj/Debug/netcoreapp2.2/InventApp.API.csproj.CoreCompileInputs.cache". Access to the path "/Users/DaddyNupe/InventApp/InventApp.API/obj/Debug" is denied.
    Failed to load project file '/Users/DaddyNupe/InventApp/InventApp.API/InventApp.API.csproj'.

/Users/DaddyNupe/InventApp/InventApp.API/InventApp.API.csproj /Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(1148,5): Error: Unable to create directory "bin/Debug/netcoreapp2.2/". Access to the path "/Users/DaddyNupe/InventApp/InventApp.API/bin" is denied. /Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(1148,5): Error: Unable to create directory "obj/Debug/netcoreapp2.2/". Access to the path "/Users/DaddyNupe/InventApp/InventApp.API/obj/Debug" is denied. /Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2134,5): Error: Could not write state file "obj/Debug/netcoreapp2.2/InventApp.API.csprojAssemblyReference.cache". Could not find a part of the path "/Users/DaddyNupe/InventApp/InventApp.API/obj/Debug/netcoreapp2.2/InventApp.API.csprojAssemblyReference.cache". /Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(3458,5): Error: Could not write lines to file "obj/Debug/netcoreapp2.2/InventApp.API.csproj.CoreCompileInputs.cache". Access to the path "/Users/DaddyNupe/InventApp/InventApp.API/obj/Debug" is denied.

    Attempted to update project that is not loaded: /Users/DaddyNupe/InventApp/InventApp.API/InventApp.API.csproj

C# log

Post the output from Output-->C# here

Environment information

VSCode version: 1.36.1 C# Extension: 1.20.0

Mono Information OmniSharp using global mono :5.18.1
Dotnet Information .NET Core SDK (reflecting any global.json): Version: 2.2.300 Commit: 73efd5bd87 Runtime Environment: OS Name: Mac OS X OS Version: 10.14 OS Platform: Darwin RID: osx.10.14-x64 Base Path: /usr/local/share/dotnet/sdk/2.2.300/ Host (useful for support): Version: 2.2.5 Commit: 0a3c9209c0 .NET Core SDKs installed: 2.1.505 [/usr/local/share/dotnet/sdk] 2.2.300 [/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.All 2.2.5 [/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 2.2.5 [/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 2.2.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
Visual Studio Code Extensions |Extension|Author|Version| |---|---|---| |Angular2|johnpapa|8.1.1| |angular2-switcher|infinity1207|0.2.0| |auto-rename-tag|formulahendry|0.1.0| |bracket-pair-colorizer|CoenraadS|1.0.61| |csharp|ms-vscode|1.20.0| |csharpextensions|jchannon|1.3.0| |debugger-for-chrome|msjsdiag|4.11.6| |git-project-manager|felipecaputo|1.7.1| |material-icon-theme|PKief|3.8.0| |ng-template|Angular|0.800.0| |path-intellisense|christian-kohler|1.4.2| |prettier-vscode|esbenp|1.9.0| |tslint|eg2|1.0.44| |vscode-angular2-files|alexiv|1.6.2| |vscode-nuget-package-manager|jmrog|1.1.6|;
gregg-miskelly commented 5 years ago

I believe this is your problem --

/Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(1148,5): Error: Unable to create directory "bin/Debug/netcoreapp2.2/". Access to the path "/Users/DaddyNupe/InventApp/InventApp.API/bin" is denied.
/Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(1148,5): Error: Unable to create directory "obj/Debug/netcoreapp2.2/". Access to the path "/Users/DaddyNupe/InventApp/InventApp.API/obj/Debug" is denied.
/Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2134,5): Error: Could not write state file "obj/Debug/netcoreapp2.2/InventApp.API.csprojAssemblyReference.cache". Could not find a part of the path "/Users/DaddyNupe/InventApp/InventApp.API/obj/Debug/netcoreapp2.2/InventApp.API.csprojAssemblyReference.cache".
/Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(3458,5): Error: Could not write lines to file "obj/Debug/netcoreapp2.2/InventApp.API.csproj.CoreCompileInputs.cache". Access to the path "/Users/DaddyNupe/InventApp/InventApp.API/obj/Debug" is denied.
Hardkore9t8 commented 5 years ago

Thanks for your feedback gregg-miskelly but how do I solve the problem. Thanks for any help you can give

gregg-miskelly commented 5 years ago

Sorry if this is obvious, but what that error is saying is that attempting to create the directory /Users/DaddyNupe/InventApp/InventApp.API/bin is failing due to lack of privilege. So you could see if you can manually produce this problem from terminal, and if so either fix the permissions on the directory so that the directories can be written, or copy the project to a different directory which is writable.

If you can't manually produce it in the terminal, how are you running VS Code?

Hardkore9t8 commented 5 years ago

Hi I granted permissions on all the project files and I am still getting Could not locate .net core project assets not generated

rchande commented 5 years ago

@Hardkore9t8 What happens if you manually create those directories w/appropriate permissions?

Hardkore9t8 commented 5 years ago

I uninstalled C# and reinstalled ran npm i and npm run compile then added the launch.json package from the command palette. But to answer your question it created empty files bin and obj/debug

rchande commented 5 years ago

@Hardkore9t8 Is this resolved for you?