Closed chanakya-svt closed 10 months ago
Any update on this?
Also running into this error when running roslynator analyze -v diag
.
Environment: Windows 10 Build 19044 .NET Core SDK v6.0.202
Are there any news? I'm also stumbling over this problem.
Does this use MSBuildLocator at all? From what you're doing, it looks like you need to.
Hi @nlubisch , @chanakya-svt,
Could you tell us, if this issue is still relevant to you?
feel free to reopen it if it is still relevant.
I am using a code analysis tool called Roslynator. After upgrading to .NET6, I am getting the following error when I run analysis on the solution.
I was directed to here by the author of Roslynator based on the discussion
Following is the error I am facing:
Error Log
``` Msbuild failed when processing the file '~/net6/RoslynatorTest/RoslynatorTest.csproj' with message: /usr/local/share/dotnet/sdk/6.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets: (129, 5): The "ResolveAppHosts" task failed unexpectedly. System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. Could not find or load a specific file. (0x80131621) File name: 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' ---> System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly) at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath) at System.Reflection.Assembly.LoadFrom(String assemblyFile) at Microsoft.Build.Locator.MSBuildLocator.<>c__DisplayClass15_0.Environment: .NET: v6.0 OS: macOS Montery v12.2 Example repo: https://github.com/chanakya-svt/RoslynatorTest
Steps to Reproduce:
dotnet tool install -g roslynator.dotnet.cli
roslynator analyze -v diag
Note: The same setup works without an errors for .net5.0
Please redirect if this is not the correct place for this issue.