1

I started live unit testing with visual studio 2017 (15.7.1). After I switch the branch and start the project, an error message comes up saying the following:

Could not load file or assembly 'Microsoft.CodeAnalysis.LiveUnitTesting.Runtime, version= 1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependenc

enter image description here

I tried to:
- rebuild/restart the project
- stop live unit testing
but it didn't work.

I don't know why load 'Microsoft.CodeAnalysis.LiveUnitTesting.Runtime' from project/bin.
Anyone have a suggestion?

Duran Hsieh
  • 926
  • 9
  • 22
  • 1
    I see the file here **C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\ManagedLanguages\VBCSharp\LiveUnitTesting\Microsoft.CodeAnalysis.LiveUnitTesting.Runtime.dll** – magicandre1981 May 11 '18 at 05:17
  • thanks, it is weird to load from from project/bin. :) – Duran Hsieh May 14 '18 at 02:35

2 Answers2

10

Finally, I stop live unit test and delete Persisted Data. It works now.

Step 1. Stop unit test enter image description here

Step 2. Test → Live Testing → Options... enter image description here

Step 3. delete Persisted Data enter image description here

Step 4. Delete all folder under package folder, and then re-build Solution, it works.

hm... I still don't know why load from project/bin after changing branch :S.

Duran Hsieh
  • 926
  • 9
  • 22
0

I had the same error with VS2019, in an existing Project with unit tests working with my colleagues. I ended up updating Visual Studio to version 16.2.3, and its working now.

Damian Vogel
  • 1,050
  • 1
  • 13
  • 19