简体   繁体   English

无法使用Visual Studio 2017加载文件或程序集'Microsoft.CodeAnalysis.LiveUnitTesting.Runtime,版本= 1.7.0.0'

[英]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). 我从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 无法加载文件或程序集'Microsoft.CodeAnalysis.LiveUnitTesting.Runtime,版本= 1.7.0.0,区域性=中性,PublicKeyToken = 31bf3856ad364e35'或其中之一

在此处输入图片说明

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. 我不知道为什么从项目/箱中加载“ Microsoft.CodeAnalysis.LiveUnitTesting.Runtime”。
Anyone have a suggestion? 有人有建议吗?

Finally, I stop live unit test and delete Persisted Data. 最后,我停止在线单元测试并删除持久数据。 It works now. 现在可以使用了。

Step 1. Stop unit test 步骤1.停止单元测试 在此处输入图片说明

Step 2. Test → Live Testing → Options... 步骤2.测试→实时测试→选项... 在此处输入图片说明

Step 3. delete Persisted Data 步骤3.删除持久数据 在此处输入图片说明

Step 4. Delete all folder under package folder, and then re-build Solution, it works. 步骤4.删除package文件夹下的所有文件夹,然后重新生成Solution,它可以工作。

hm... I still don't know why load from project/bin after changing branch :S. 嗯...我仍然不知道为什么在更改分支:S之后从项目/ bin加载。

I had the same error with VS2019, in an existing Project with unit tests working with my colleagues. 在与同事一起进行单元测试的现有项目中,VS2019存在相同的错误。 I ended up updating Visual Studio to version 16.2.3, and its working now. 我最终将Visual Studio更新到版本16.2.3,现在可以正常工作了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法加载文件或程序集 Microsoft.CodeAnalysis - Could not load file or assembly Microsoft.CodeAnalysis C#vS2017项目未生成:无法加载文件或程序集Microsoft.CodeAnalysis - C# vS2017 project not building: Could not load file or assembly Microsoft.CodeAnalysis 无法加载文件或程序集 'Microsoft.CodeAnalysis,版本 = 3.11.0.0,文化 = 中性 - Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.11.0.0, Culture=neutral 仅在部署时无法加载文件或程序集 Microsoft.CodeAnalysis.CSharp,版本 = 1.0.0.0 - Could not load file or assembly Microsoft.CodeAnalysis.CSharp, Version=1.0.0.0 when deploying only 警告 CS8032 无法加载文件或程序集 'Microsoft.CodeAnalysis,版本 = 3.3.0.0 - Warning CS8032 Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.3.0.0 2017服务器中无法加载文件或程序集Microsoft.SqlServer.management.sdk.sfc版本11.0.0.0 - Could not load file or assembly Microsoft.SqlServer.management.sdk.sfc version 11.0.0.0 in 2017 server PowerShell 7.0.x 无法加载文件或程序集 Microsoft.CodeAnalysis - PowerShell 7.0.x Could not load file or assembly Microsoft.CodeAnalysis Dynamics NAV 2017 .NET 互操作:发生异常,'无法加载文件或程序集'System.Runtime,版本 = 5.0.0.0 - Dynamics NAV 2017 .NET interop: exception occurred, 'Could not load file or assembly 'System.Runtime, Version=5.0.0.0 无法加载文件或程序集“Microsoft.CodeAnalysis,版本= 1.3.1.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”或其依赖项之一 - Could not load file or assembly 'Microsoft.CodeAnalysis, version= 1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependenc 执行代码优先迁移时无法在Visual Studio 2017中加载文件或程序集'System.ComponentModel.DataAnnotations' - Could not load file or assembly 'System.ComponentModel.DataAnnotations' in Visual Studio 2017 while doing Code First Migrations
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM