When opened, Visual Studio Code will show the appropriate vector symbols alongside the line number as usual, but once finished loading the vector symbols that indicate where one should be able to expand or collapse code are gone, and neither clicking the location, outline, nor shortcut keys have any effect. The vectors and ability to collapse folded code disappear at about the same time as a warning message in the lower right hand corner appears saying "Some projects have trouble loading. Please review the output for more details." Before that I am also getting an error message when things still work that says "Unable to start MSBuild language server (see the output window for details)." (The output window says:
Starting OmniSharp server at 2/4/2021, 3:58:32 PM\
Target: d:\Documents\<redacted> Collab\New Macabre Project\New Macabre Project.sln
OmniSharp server started.
Path: c:\Users\casto\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.5\OmniSharp.exe
PID: 40184
[info]: OmniSharp.Stdio.Host
Starting OmniSharp on Windows 6.2.9200.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: Visual Studio Enterprise 2017 15.9.28307.812 - "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin"
2: StandAlone 16.8.0 - "c:\Users\<redact>\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.5\.msbuild\Current\Bin"
[warn]: OmniSharp.CompositionHostBuilder
It looks like you have Visual Studio lower than VS 2019 16.3 installed.
Try updating Visual Studio to the most recent release to enable better MSBuild support.
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to 'c:\Users\<redact>\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.5\.msbuild\Current\Bin\MSBuild.exe'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 16.8.0 - "c:\Users\<redact>\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.5\.msbuild\Current\Bin"
CscToolExe = csc.exe
CscToolPath = c:\Users\<redact>\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.5\.msbuild\Current\Bin\Roslyn
MSBuildExtensionsPath = c:\Users\<redact>\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.5\.msbuild
MSBuildToolsPath = c:\Users\<redact>\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.5\.msbuild\Current\Bin
[info]: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in 'd:\Documents\<redact> Collab\New Macabre Project'.
[info]: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
Detecting projects in 'd:\Documents\<redact> Collab\New Macabre Project\New Macabre Project.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for 'd:\Documents\<redact> Collab\New Macabre Project\New Macabre Project.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in 'd:\Documents\<redact> Collab\New Macabre Project'.
[info]: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: d:\Documents\<redact> Collab\New Macabre Project\New Macabre Project.csproj
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
[info]: OmniSharp.WorkspaceInitializer
Configuration finished.
[info]: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location 'd:\Documents\<redact> Collab\New Macabre Project' on host 27768.
[fail]: OmniSharp.MSBuild.ProjectLoader
The reference assemblies for .NETFramework,Version=v4.7.2 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
Failed to load project file 'd:\Documents\Al Petz Collab\New Macabre Project\New Macabre Project.csproj'.
d:\Documents\<redact> Collab\New Macabre Project\New Macabre Project.csproj
c:\Users\<redact>\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.5\.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1180,5): Error: The reference assemblies for .NETFramework,Version=v4.7.2 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[fail]: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: d:\Documents\<redact> Collab\New Macabre Project\New Macabre Project.csproj
.) For the past couple of months I have been plighted MS language build errors, and while that might be causing me some trouble this code folding problem is new, and I have nothing to go on.
By seeing the message "It looks like you have Visual Studio lower than VS 2019 16.3 installed."
I tried to google, and I found this.
But in your context is not clear what you are doing and what kind of software you are building; please provide us ( the community ) with a bit more details on what and where you are creating your project (e.g. Unity its version or something else). You can try to google the required version for the engine or the framework you are using.
Please add some more details about the project.
Different engines/programs may require different versions of
Developer Pack or ".NET Core version".
That is why we can only make suggestions in this case.
First of all, I would suggest you close your IDE and do the following steps:
Go to dotnet.microsoft.com;
Download the Developer Pack .NET Framework 4.8 or .NET Framework 4.7.2 3(image down below);
Install the downloaded file and try again.
If it does not help you, you may try to update the Visuall Studio to the latest version as it hints to you.
Another way to solve the issues you may try to:
Click on "Build", which is in the top menu;
Click "Clean Solution";
Click "Rebuild Solution".
Related
I don't see any code hints when i write code. i would like to see when i type Input. after the dot list of functions etc that i can use but i see nothing. i see only things that i wrote in that file but i don't see any unity classes or anything that i wrote using... at the top.
How to get autocomplete working in visual studio code?
I tried other code editors but none is working. Please help me I can't do anything without autocomplete my life is ruined.
Why isn't this quality standard?
From the documentation:
If you find IntelliSense has stopped working, the language service may
not be running. Try restarting VS Code and this should solve the
issue. If you are still missing IntelliSense features after installing
a language extension, open an issue in the repository of the language
extension.
See more in the docs.
In Unity i click open c# project and than i have message project have trouble loading
Starting OmniSharp server at 20.01.2021, 14:18:44
Target: c:\Users\Mateusz\Desktop\New Unity Project\New Unity Project.sln
OmniSharp server started.
Path: c:\Users\Mateusz\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.6-beta.30\OmniSharp.exe
PID: 2760
[info]: OmniSharp.Stdio.Host
Starting OmniSharp on Windows 6.2.9200.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 1 MSBuild instance(s)
1: StandAlone 16.8.0 - "c:\Users\Mateusz\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.6-beta.30\.msbuild\Current\Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to 'c:\Users\Mateusz\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.6-beta.30\.msbuild\Current\Bin\MSBuild.exe'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 16.8.0 - "c:\Users\Mateusz\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.6-beta.30\.msbuild\Current\Bin"
CscToolExe = csc.exe
CscToolPath = c:\Users\Mateusz\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.6-beta.30\.msbuild\Current\Bin\Roslyn
MSBuildExtensionsPath = c:\Users\Mateusz\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.6-beta.30\.msbuild
MSBuildToolsPath = c:\Users\Mateusz\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.6-beta.30\.msbuild\Current\Bin
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
[info]: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in 'c:\Users\Mateusz\Desktop\New Unity Project'.
[info]: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
Detecting projects in 'c:\Users\Mateusz\Desktop\New Unity Project\New Unity Project.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\Users\Mateusz\Desktop\New Unity Project\Assembly-CSharp.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in 'c:\Users\Mateusz\Desktop\New Unity Project'.
[info]: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
Configuration finished.
[info]: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location 'c:\Users\Mateusz\Desktop\New Unity Project' on host 10176.
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: c:\Users\Mateusz\Desktop\New Unity Project\Assembly-CSharp.csproj
[warn]: OmniSharp.MSBuild.ProjectLoader
The referenced project 'Unity.Timeline.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
The referenced project 'Unity.VSCode.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
The referenced project 'Unity.TextMeshPro.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
The referenced project 'UnityEngine.UI.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
The referenced project 'Unity.Timeline.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
The referenced project 'Unity.CollabProxy.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
The referenced project 'Unity.Rider.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
The referenced project 'Unity.2D.Sprite.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
The referenced project 'Unity.2D.Tilemap.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
The referenced project 'Unity.TextMeshPro.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
The referenced project 'UnityEditor.UI.csproj' does not exist.
[fail]: OmniSharp.MSBuild.ProjectLoader
The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
Failed to load project file 'c:\Users\Mateusz\Desktop\New Unity Project\Assembly-CSharp.csproj'.
c:\Users\Mateusz\Desktop\New Unity Project\Assembly-CSharp.csproj
c:\Users\Mateusz\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.6-beta.30\.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1889,5): Error: The referenced project 'Unity.Timeline.Editor.csproj' does not exist.
c:\Users\Mateusz\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.6-beta.30\.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1889,5): Error: The referenced project 'Unity.VSCode.Editor.csproj' does not exist.
c:\Users\Mateusz\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.6-beta.30\.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1889,5): Error: The referenced project 'Unity.TextMeshPro.Editor.csproj' does not exist.
c:\Users\Mateusz\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.6-beta.30\.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1889,5): Error: The referenced project 'UnityEngine.UI.csproj' does not exist.
c:\Users\Mateusz\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.6-beta.30\.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1889,5): Error: The referenced project 'Unity.Timeline.csproj' does not exist.
c:\Users\Mateusz\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.6-beta.30\.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1889,5): Error: The referenced project 'Unity.CollabProxy.Editor.csproj' does not exist.
c:\Users\Mateusz\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.6-beta.30\.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1889,5): Error: The referenced project 'Unity.Rider.Editor.csproj' does not exist.
c:\Users\Mateusz\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.6-beta.30\.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1889,5): Error: The referenced project 'Unity.2D.Sprite.Editor.csproj' does not exist.
c:\Users\Mateusz\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.6-beta.30\.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1889,5): Error: The referenced project 'Unity.2D.Tilemap.Editor.csproj' does not exist.
c:\Users\Mateusz\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.6-beta.30\.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1889,5): Error: The referenced project 'Unity.TextMeshPro.csproj' does not exist.
c:\Users\Mateusz\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.6-beta.30\.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1889,5): Error: The referenced project 'UnityEditor.UI.csproj' does not exist.
c:\Users\Mateusz\.vscode\extensions\ms-dotnettools.csharp-1.23.8\.omnisharp\1.37.6-beta.30\.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1180,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[fail]: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: c:\Users\Mateusz\Desktop\New Unity Project\Assembly-CSharp.csproj
[info]: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionService
Could not find document for file c:\Users\Mateusz\Desktop\New Unity Project\Assets\sc.cs
I'm tearing my hair out trying to build a windows app using Cordova. The build error I'm getting is:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\
MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets(377, 5):
error : The package System.Collections.Specialized with version 4.0.0
could not be found in C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\.
Run a NuGet package restore to download the package.
[C:\cygwin64\home\Owner\src\apps\mytestapp-
gen\platforms\windows\CordovaApp.Windows10.jsproj]
In visual studio, I attempt to add the version of the package to the project and I get the following error:
Severity Code Description Project File Line Suppression State
Error Could not install package 'System.Collections.Specialized
4.0.0'. You are trying to install this package into a project that targets
'native,Version=v0.0', but the package does not contain any assembly
references or content files that are compatible with that framework. For
more information, contact the package author.
Can anyone advise how to resolve this?
I've looked at this very old question How can I make my managed NuGet package support C++/CLI projects? but I can't find anything (particually from the VS2017 era) that helps
May be, this helps others to solve the issue:
My Visual Studio 2017 installation must obviously have been damaged when removing the Visual Studio 2015 installation from that same machine. After I performed a repair of Visual Studio 2017 via Visual Studio Installer the isuue disappeared.
I'm having no luck in trying to make the C# extension work in macOS. When loading the sln file everything seems to load just fine other than OmniSharp. This makes it hard or impossible to work with Visual Studio Code.
Here's the error I get:
Starting OmniSharp server at 2018-5-4 13:51:51
Target: /PATH/TO/PROJECT/Project.sln
[ERROR] Error: spawn EACCES
Which tells very little about what's wrong.
I followed all instructions found here, including installing Mono SDK but OmniSharp keeps giving this error. I also tried
to install the extension from a vsix file
to overwrite the omnisharp folder content with what I found here
All leading to the same error.
When the extension is freshly installed, it automatically downloads the OmniSharp package and successfully installs it.
Installing C# dependencies...
Platform: darwin, x86_64
Downloading package 'OmniSharp for OSX' (24026 KB) .................... Done!
Downloading package '.NET Core Debugger (macOS / x64)' (44057 KB) .................... Done!
Installing package 'OmniSharp for OSX'
Installing package '.NET Core Debugger (macOS / x64)'
Finished
Someone suggests to add a+x permissions recursively to the whole project folder (as found in this official thread) but is this really necessary? All files in extensions belong to the same staff group as all files in the project do.
I tried this anyway but still [ERROR] Error: spawn EACCES
I'm using Visual Studio Code 1.23.0 and the OmniSharp's version is 1.14.0.
I should also say that all projects I am trying to open are generated by Unity 3D and I have the Unity Debug extension installed.
I don't know where else to go from here. Would someone be able to give advice on this?
I'm trying to build an ASP.NET 5 web api and build it on Appveyor. I get this error:
Build started
git clone -q --branch=master https://github.com/nikolaschou/TodolistService01.git C:\projects\todolistservice01
git checkout -qf 3c97bb95ecf54662069b6ae8fa25a60f598a564d
msbuild "TodolistService.sln" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
Microsoft (R) Build Engine version 14.0.24720.0
Copyright (C) Microsoft Corporation. All rights reserved.
Cannot find DNX runtime dnx-clr-win-x86.1.0.0-rc1-update1 in the folder: C:\Users\appveyor.dnx\runtimes
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.targets(126,5): error : The Dnx Runtime package needs to be installed. See output window for more details. [C:\projects\todolistservice01\src\TodolistService\TodolistService.xproj]
Command exited with code 1
This project is based on .NET framework 4.6.1 and ASP.NET 5. The references are DNX 4.5.1 and DNX Core 5.0.
Feel free to reproduce the error by building this public repository:
https://github.com/nikolaschou/TodolistService01
Can anyone explain why it fails? Is Appveyor not yet ready for these new versions?
Basically, you have to do two things:
install .NET framework
restore packages
This is appveyor.yml to build your project:
os: Visual Studio 2015
install:
- dnvm upgrade -r clr
- dnu restore
build:
verbosity: minimal
Build results: https://ci.appveyor.com/project/FeodorFitsner/todolistservice01
Also, you may need to select right version in your global.json:
{
"sdk": {
"version": "1.0.0-rc1-final"
}
}
Today I installed ASP.NET 5 on windows and begun creating my first application in Visual Studio 2015.
When the project loads I get an error: "Package restore failed", specifically the following error:
Restore failed Det gick inte att hitta en del av s�kv�gen C:\Users\h\.dnx\packages\Microsoft.Win32.Primitives\4.0.0\Microsoft.Win32.Primitives.4.0.0.nupkg.sha512. NuGet Config files used:
C:\Users\h\AppData\Roaming\NuGet\nuget.config
C:\Users\h\documents\visual studio 2015\Projects\NextTest\nuget.config
Feeds used:
https://api.nuget.org/v3-flatcontainer/
C:\Program Files (x86)\Microsoft Web Tools\DNU
When I look for the missing file I find the following path missing:
C:\Users\h\.dnx\packages\Microsoft.Win32.Primitives\4.0.0\Microsoft.Win32.Primitives.4.0.0.nupkg.sha512
But this one exists, note the extra 0 in the version:
C:\Users\h\.dnx\packages\Microsoft.Win32.Primitives\4.0.0.0\Microsoft.Win32.Primitives.4.0.0.0.nupkg.sha512
How would I go about to solve this?
I've tried to search through the project files but no mention of neither Primitives nor verion 4.0.0.
The "Solution DNX SDK version" is 1.0.0-beta8, (beta5 was also available but not selected).
Delete C:\Users\h.dnx\packages folder and try running "dnu restore" command.