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

Could not load System.Collections.Immutable version 5.0.0 #151

Open
bricelam opened this issue Apr 18, 2023 · 1 comment
Open

Could not load System.Collections.Immutable version 5.0.0 #151

bricelam opened this issue Apr 18, 2023 · 1 comment

Comments

@bricelam
Copy link

bricelam commented Apr 18, 2023

I'm getting this error on VS 17.6 Preview 3.

System.InvalidOperationException : Test did not run due to a harness failure.
---- System.IO.FileNotFoundException : Could not load file or assembly 'System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Stack Trace:
  
  ----- Inner Stack Trace -----
     at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()

Manually adding a reference to it from the test project makes it go away.

<PackageReference Include="System.Collections.Immutable" Version="5.0.0" />
@AArnott
Copy link
Member

AArnott commented Sep 7, 2023

I hit this too. But applying your workaround only got me to the next error about missing Microsoft.VisualStudio.Interop.dll. So I just ran out ahead of all the missing DLLs by adding this:

<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.7.37357" />

This required that I remove the System.Collections.Immutable reference because it was a downgrade from the 17.7 VS SDK.

That got my "hello, world" test passing for me.

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