简体   繁体   English

在Visual Studio 2013中添加对单元测试项目的引用时出错

[英]Error when adding a reference to my unit test project in Visual Studio 2013

I am using Visual Studio 2013. 我正在使用Visual Studio 2013。

http://msdn.microsoft.com/en-us/library/ms182532.aspx http://msdn.microsoft.com/en-us/library/ms182532.aspx

From my newly created Test project, I try to add a reference to my actual project. 从我新创建的Test项目中,我尝试添加对实际项目的引用。 like this: In Solution Explorer, select References in the BankTests project and then choose Add Reference... from the context menu. 像这样: 在Solution Explorer中,选择BankTests项目中的References,然后从上下文菜单中选择Add Reference ....

I get an error saying 'Unable to add a reference to project 'MyProject'. 我收到一条错误消息“无法添加项目'MyProject'的引用”。

In your project settings, change your Target Framework from ".NET Framework 4 Client Profile" to ".NET Framework 4". 在项目设置中,将目标框架从“.NET Framework 4 Client Profile”更改为“.NET Framework 4”。 That should do it. 应该这样做。

Check your target Framework in both project settings. 在两个项目设置中检查目标框架。 It should be the same. 应该是一样的。

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

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