Closed bamarsha closed 4 years ago
@bettinaheim, I think you are familiar with something like this that happened before?
I have the same problem after update .NET Core to 3.1.4 "Could not load file or assembly 'NuGet.Frameworks, Version=5.7.0.7"
in the "C:\Program Files\dotnet\sdk\3.1.401" folder i have this NuGet.Frameworks.dll:
Hi @Gambero81, our current plan is to include a fix for this bug in the next release at the end of August. The pull request for that is #566.
Unfortunately, in the meantime, I think the only solution is to downgrade .NET Core to the last 3.1.3xx release (3.1.302).
Hi @samarsha , the issue is not only in qsharp-compiler where you applied the fix.
I use roslyn libraries to analize source code and i need to use MSBuildLocator.RegisterDefaults()
so i tried the fix:
VisualStudioInstance vsi = MSBuildLocator.RegisterDefaults(); AssemblyLoadContext.Default.Resolving += (assemblyLoadContext, assemblyName) => { string path = Path.Combine(vsi.MSBuildPath, assemblyName.Name + ".dll"); if (File.Exists(path)) { return assemblyLoadContext.LoadFromAssemblyPath(path); } return null; };
but it not solve for me.. the method LoadFromAssemblyPath throw an exception because the assembly version trying to load does not match the version requested
Hi @Gambero81 ,
This issue was opened to track the error above on the Q# Compiler Language Server during initialization. With the fix that Sarah mentioned above, we're now able to start correctly after an upgrade to the SDK v3.1.400.
Are you encountering the problem above in a project unrelated to qsharp-compiler? If that's the case, then you might be interested in following the discussion on the original issue that motivated this workaround, link below: https://github.com/microsoft/MSBuildLocator/issues/86
Resolved by pull request #566 .
Describe the bug
When opening a Q# project in Visual Studio Code or Visual Studio, the language server outputs errors and is unable to load project references:
System information
Additional context
Reported first by @iitaiy: https://github.com/microsoft/qsharp-compiler/issues/556#issuecomment-670195256