c# - Visual Studio 16.8.2 - Analyzer with Code Fix project template produces errors when trying to debug unit test
问题描述
Start Visual Studio 16.8.2
Create a new "C# Analyzer with Code Fix project".
Build the project.
Run all tests and see they all pass.
Set a break point in the unit test file in TestMethod2.
Try to debug the test.
You get 4 warnings and inconclusive test results.
Here is the first warning:
2020.11.20 04:54:44.521 WARN Test run detected DLL(s) which were built for different framework and platform versions. Following DLL(s) do not match current settings, which are .NETCoreApp,Version=v1.0 framework and X64 platform. MyAnalyzerTest9.Test.dll is built for Framework .NETCoreApp,Version=v2.0 and Platform AnyCPU. Go to http://go.microsoft.com/fwlink/?LinkID=236877&clcid=0x409 for more details on managing these settings.
The link is to an article about "How to: Run a Unit Test as a 64-bit Process" written in 01/11/2013.
After hours of research I cannot figure out how to fix this. I tried updating the test packages but it did not help.
Can anyone help?
解决方案
重新安装 Visual Studio 提供了一种补救措施,但原始问题将不为人知。
推荐阅读
- angular - 重复处理优化函数代码
- swift - 如何在字符串中的字符前放置一个点?
- excel-formula - 使用 Excel 公式根据“IF”条件填充单元格
- kubernetes - 如何从 gitlab 下载代码到 kubernetes
- vue.js - API消费和预消费
- java - 如何使用 Ansible 运行可执行 JAR 文件?
- python - Python json模式格式检查器未验证有效的日期时间字符串
- zeromq - ZeroMQ Gnuradio 接口
- codeigniter - 试图从日期中删除 1 个月
- python - 在 python 中创建网格等值。行进立方体