简体   繁体   中英

Could not load file or assembly 'Microsoft.CodeAnalysis.LiveUnitTesting.Runtime, version= 1.7.0.0' with visual studio 2017

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

在此处输入图片说明

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?

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

Step 1. Stop unit test 在此处输入图片说明

Step 2. Test → Live Testing → Options... 在此处输入图片说明

Step 3. delete Persisted Data 在此处输入图片说明

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM