简体   繁体   English

无法添加对单元测试项目的引用

[英]Unable to add a reference to unit test project

I am setting up a unit test bench and as an example exercise created a simple calculator. 我正在建立一个单元测试台,并作为示例练习创建了一个简单的计算器。 I'd like to develop test cases for it. 我想为此开发测试用例。 When I try to add the project reference to the unit test project an error "Enable to add a reference to project 'Calculator'" appears. 当我尝试将项目引用添加到单元测试项目时,出现错误“能够向项目'Calculator'添加引用”。 No reason or corrective action is provided 没有提供原因或纠正措施

Initially I thought the reason was because developer mode was not enabled on my computer. 最初,我认为原因是因为计算机上未启用开发人员模式。 But the problem persists with developer mode on also. 但是问题仍然存在于开发人员模式下。

This issue has been resolved. 此问题已得到解决。 I created a unit test project in .net instead of universal windows application and it worked 我在.net中创建了一个单元测试项目,而不是通用Windows应用程序,并且它可以正常工作

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

相关问题 在我的解决方案中将参考项目winform添加到我的单元测试项目会导致“参考错误” - Add reference project winform to my unit test project in my solution causes "reference error" 如何在基于 .NET Framework 4.6.1 构建的单元测试项目中添加 .NET Core 2.1 项目引用 - How to add .NET Core 2.1 project reference in Unit Test project built on .NET Framework 4.6.1 单元测试项目坚持要求引用EntityFramework - Unit Test project is insisting that it requires a reference to EntityFramework 单元测试项目——NUnit参考,抛出异常 - Unit test project - NUnit reference, throw exception NHibernate:如何从单元测试项目中引用主项目的装配? - NHibernate: How to reference the assembly of the main project from the unit test project? 如何添加参考以及如何使用单元测试测试palindrom - How to add a reference and how to test if is it palindrom using unit test 如何对项目未引用特定程序集进行单元测试 - How to unit test that a project does not reference a specific assembly 如何在C#项目中构建单元测试参考 - How to build in a unit test reference in C# project 无法在 Visual Studio 2015 中添加项目引用 - Unable to add project reference in Visual Studio 2015 无法将服务引用添加到移动服务项目 - Unable to add a service reference to a mobile service project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM