Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.IO.FileNotFoundException: Could not load file or assembly 'System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. #23

Closed
jeff922 opened this issue Feb 6, 2021 · 3 comments

Comments

@jeff922
Copy link

jeff922 commented Feb 6, 2021

Using VS Code examples from C#9 and .NET 5 book. After installing MSBuild project tools 0.3.11, I get the following error and setup. Any ideas what might be causing the error? I'm new, so let me know if I need to provide additional details. Thanks.

PS C:\Users\jmurphy\Documents\VSCode\PracticalApps\NorthwindEntitiesLib> dotnet --list-sdks
5.0.102 [C:\Program Files\dotnet\sdk]
PS C:\Users\jmurphy\Documents\VSCode\PracticalApps\NorthwindEntitiesLib> dotnet --list-runtimes
Microsoft.AspNetCore.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
PS C:\Users\jmurphy\Documents\VSCode\PracticalApps\NorthwindEntitiesLib>

[Info - 2:29:04 PM] 1 package sources configured for project "c:\Users\jmurphy\Documents\VSCode\PracticalApps\NorthwindContextLib\NorthwindContextLib.csproj".
[Info - 2:29:04 PM] Locally-configured package source "nuget.org" (v3) => https://api.nuget.org/v3/index.json
[Error - 2:29:04 PM] Error loading MSBuild project '"c:\Users\jmurphy\Documents\VSCode\PracticalApps\NorthwindContextLib\NorthwindContextLib.csproj"'.
System.IO.FileNotFoundException: Could not load file or assembly 'System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
File name: 'System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at new Microsoft.Build.Evaluation.Context.EvaluationContext(SharingPolicy policy, IFileSystem fileSystem)
at EvaluationContext Microsoft.Build.Evaluation.Context.EvaluationContext.Create(SharingPolicy policy, MSBuildFileSystemBase fileSystem)
at void Microsoft.Build.Evaluation.Project+ProjectImpl.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
at void Microsoft.Build.Evaluation.Project+ProjectImpl.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
at void Microsoft.Build.Evaluation.Project+ProjectImpl.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, EvaluationContext evaluationContext)
at void Microsoft.Build.Evaluation.Project+ProjectImpl.ReevaluateIfNecessary(EvaluationContext evaluationContext)
at void Microsoft.Build.Evaluation.Project+ProjectImpl.Initialize(IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
at new Microsoft.Build.Evaluation.Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
at Project Microsoft.Build.Evaluation.ProjectCollection.LoadProject(string fileName, IDictionary<string, string> globalProperties, string toolsVersion)
at Project Microsoft.Build.Evaluation.ProjectCollection.LoadProject(string fileName, string toolsVersion)
at Project Microsoft.Build.Evaluation.ProjectCollection.LoadProject(string fileName)
at bool MSBuildProjectTools.LanguageServer.Documents.MasterProjectDocument.TryLoadMSBuildProject() in C:\Development\github\tintoy\msbuild-project-tools-vscode\lib\server\src\LanguageServer.Engine\Documents\MasterProjectDocument.cs:line 173

[Info - 2:32:02 PM] 1 package sources configured for project "c:\Users\jmurphy\Documents\VSCode\PracticalApps\NorthwindEntitiesLib\NorthwindEntitiesLib.csproj".
[Info - 2:32:02 PM] Locally-configured package source "nuget.org" (v3) => https://api.nuget.org/v3/index.json
[Error - 2:32:02 PM] Error loading MSBuild project '"c:\Users\jmurphy\Documents\VSCode\PracticalApps\NorthwindEntitiesLib\NorthwindEntitiesLib.csproj"'.
System.InvalidOperationException: Parent project does not have an MSBuild project.
at bool MSBuildProjectTools.LanguageServer.Documents.SubProjectDocument.TryLoadMSBuildProject() in C:\Development\github\tintoy\msbuild-project-tools-vscode\lib\server\src\LanguageServer.Engine\Documents\SubProjectDocument.cs:line 86

@tintoy
Copy link
Owner

tintoy commented Feb 6, 2021

Hi - thanks for reporting 🙂

I believe this is caused by the same issue as #21; would you be able to try installing the VSIX package linked in that issue and tell me if that new version of the extension fixes the problem for you?

@jeff922
Copy link
Author

jeff922 commented Feb 6, 2021

Thanks for the quick reply! Yes the VSIX file 0.3.12 fixed my issue also.

@jeff922 jeff922 closed this as completed Feb 6, 2021
@tintoy
Copy link
Owner

tintoy commented Feb 7, 2021

Published v0.3.12 of the extension (which now targets 5.0).

Sorry for the delay; had to find time to set up VMs for testing with multiple versions :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants