-
Notifications
You must be signed in to change notification settings - Fork 675
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
ProcessFrameworkReferences task failed unexpectedly (was: Pre-Release version not working but Release version is working) #5980
Comments
Using this as the external tracking issue for the issue we have been talking about recently. @mikadumont this should be added to the known issues. The workaround currently is to use C# Dev Kit along with C#. |
@arkalyanms Why switch to Dev Kit? Not using Dev Kit due to licensing issue, so its explicit decision. When release version is working, pre-release should also be compatible. Would really appreciate if there is workaround etc otherwise have to stick with release version. Will release version remain compatible or it will also start to have issues just like pre-release version? Thanks |
@wahmedswl We are still investigating exactly why this is breaking -- the recommendation for DevKit as a workaround isn't a permanent recommendation, just that's what would unblock with the bits we have released. |
@jasonmalinowski Thanks for the Note, will wait for the fix. |
The 7.0.4xx SDKs ship with a newer version of NuGet.Frameworks than we are shipping. Due to a complicated set of interactions of how the various AssemblyLoadingContexts work (or don't work as expected!), this means that when our LSP server uses MSBuildWorkspace to load projects, it'll end up using the NuGet.Frameworks we use here rather than the MSBuild one, causing load issues. The underlying problem is tracked with dotnet#61454, although I still need to write up the full situation in that bug since back in June we ended up running into a similar issue and had lots of deep analysis of it. Fixing the problem requires changes in several different repositories (and all involving AssemblyLoadContexts, so the changes are very technical) so for now we'll just bump the version. Fixes dotnet/vscode-csharp#5980
The 7.0.4xx SDKs ship with a newer version of NuGet.Frameworks than we are shipping. Due to a complicated set of interactions of how the various AssemblyLoadingContexts work (or don't work as expected!), this means that when our LSP server uses MSBuildWorkspace to load projects, it'll end up using the NuGet.Frameworks we use here rather than the MSBuild one, causing load issues. The underlying problem is tracked with dotnet#61454, although I still need to write up the full situation in that bug since back in June we ended up running into a similar issue and had lots of deep analysis of it. Fixing the problem requires changes in several different repositories (and all involving AssemblyLoadContexts, so the changes are very technical) so for now we'll just bump the version. Fixes dotnet/vscode-csharp#5980
@jasonmalinowski Will new release be pushed? |
@wahmedswl Yep, it's now live as 2.0.328. If you're still seeing it please do reactivate and we can dig further. I wasn't entirely sure about your screenshot you shared right before I closed this -- was the bug you were highlighting just bad squiggles or something else? |
@jasonmalinowski Yes, it was squiggles not being shown. Technically, extension was not working. Verified with 2.0.328 and everything is good now. Thanks |
@wahmedswl Great to hear, thanks for the help and the original bug report. Since this was due to a version conflict only with newer SDK versions, since your bug had the full list of SDKs on your machine it made it easy to confirm. |
I think this may need to be re-opened...
Extension version: 2.0.376 System Info
A/B Experiments
EDIT0: ... or not. I have been testing tintoy/msbuild-project-tools-server#60, and came across this issue when I used the 8.0 sdk only.
HOWEVER, I still can't go-to/preview definitions like EDIT1: Switching to setting |
Environment data
dotnet --info
output:.NET SDK:
Version: 7.0.400-preview.23330.10
Commit: 30cbb54276
Runtime Environment:
OS Name: Windows
OS Version: 10.0.22621
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\7.0.400-preview.23330.10\
Host:
Version: 7.0.8
Architecture: x64
Commit: 4b0550942d
.NET SDKs installed:
3.1.426 [C:\Program Files\dotnet\sdk]
5.0.408 [C:\Program Files\dotnet\sdk]
6.0.120 [C:\Program Files\dotnet\sdk]
6.0.203 [C:\Program Files\dotnet\sdk]
6.0.315 [C:\Program Files\dotnet\sdk]
7.0.400-preview.23330.10 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.26 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.29 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.26 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.29 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.26 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.29 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.30 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.19 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
VS Code version:
C# Extension version:
Pre-Release Version
OmniSharp log
The "ProcessFrameworkReferences" task failed unexpectedly.
System.IO.FileLoadException: Could not load file or assembly 'NuGet.Frameworks, Version=6.7.0.111, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Could not find or load a specific file. (0x80131621)
File name: 'NuGet.Frameworks, Version=6.7.0.111, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
---> System.IO.FileLoadException: Could not load file or assembly 'NuGet.Frameworks, Version=6.7.0.111, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
at System.Runtime.Loader.AssemblyLoadContext.g____PInvoke|5_0(IntPtr ptrNativeAssemblyBinder, UInt16* ilPath, UInt16* niPath, ObjectHandleOnStack retAssembly)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
at Microsoft.NET.Build.Tasks.ProcessFrameworkReferences.<>c.b__141_0(ITaskItem item)
at System.Linq.Enumerable.SelectArrayIterator
2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator
1.ToList()at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Microsoft.NET.Build.Tasks.ProcessFrameworkReferences.ExecuteCore()
at Microsoft.NET.Build.Tasks.TaskBase.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
Steps to reproduce
Expected behavior
A clear and concise description of what you expected to happen.
Actual behavior
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: