I’m very new to C# .NET and try to get my VSC working with my first project. My project is located on a remote server within a docker container. I mounted the folder as a Network drive (X:). I’ve installed the following plugins in my local VSC:
- .NET Install Tool (https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.vscode-dotnet-runtime) and
- C# (https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp)
The Language Server works mostly but I get constantly the following error:
[LanguageServerProjectSystem] Error while loading x:PROJECTNAMEPROJECTNAME.csproj: The package "Microsoft.CodeAnalysis.Analyzers", version 3.3.4, was not found. It may have been deleted after the NuGet restore. Otherwise, the NuGet restore may only have been partially completed due to restrictions on the maximum path length.
(translated from german)
But the package is installed. The command dotnet build
works without errors. Here is the part of my csproj
:
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
The effect for this error is, that some intellisence features work, some not. For example the intellisense for a normal return
command works, but installed packages like ef are not found (package is installed). See the images below.
If I use the remote connection feature in VSC on the Server directly I don’t get any errors an the whole intellisence features work.
Is the configuration of my plugins wrong? Is thee a Problem between my windows System and my Linux docker container?