bug:如果安装了vs11并且程序集已签名,则不会构建。 [英] bug: doesn't build if vs11 is installed and the assembly is signed.

查看:45
本文介绍了bug:如果安装了vs11并且程序集已签名,则不会构建。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在同一台机器上安装了vs 2010和vs11。 (win7 x64)


如果我在vs2010中创建一个C#.net 4.0类库新项目。添加强名称并启用代码联系人我收到以下错误:


 C:\Program Files(x86)\ Microsoft \Contracts\MsBuild\v4.0\Microsoft.CodeContracts.targets(269,5):错误MSB3073:命令"" C:\Program Files(x86)\ Mycoftoft SDKs \ Windows \v8.0A\Bin\sn.exe" / R"obj\Debug \ClassLibrary1.dll" " test.snk""退出代码9009。




一旦我禁用它编译的代码合同。


看起来像"C:\Program Files(x86)\ Microsoft SDKs \ Windows \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ exe文件"是错误的位置。它应该指向"C:\Program Files(x86)\Microsoft SDKs \ Windows \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ / p>

希望它很快得到修复,否则必须在没有安装vs11的情况下登录到不同的vm。


谢谢


 

解决方案

我发现在同一台机器上安装VS 10和VS 11会破坏VS 10中的代码合同。打开项目属性有时会导致VS 10崩溃。在其他情况下,我可以打开属性,但不会显示"代码合同"选项卡。要
修复它我必须卸载VS 11并修复代码合同安装。


i have both vs 2010 and vs11 installed on the same machine. (win7 x64)

if i create a C# .net 4.0 class library new project in vs2010. add a strong name and enable code contacts i get the following error:

C:\Program Files (x86)\Microsoft\Contracts\MsBuild\v4.0\Microsoft.CodeContracts.targets(269,5): error MSB3073: The command ""C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bin\sn.exe" /R "obj\Debug\ClassLibrary1.dll" "test.snk"" exited with code 9009.


as soon as i disable code contracts it compiles.

seems like "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bin\sn.exe" is the wrong location. it should rather point to "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\sn.exe"

hope it gets fixed soon, otherwise will have to login to a different vm without vs11 installed.

thanks

 

解决方案

I've found that installing VS 10 and VS 11 on the same machine breaks Code Contracts in VS 10. Opening the project properties sometimes causes VS 10 to crash. In other cases I'm able to open the properties, but the Code Contracts tab won't display. To fix it I have to uninstall VS 11 and repair the Code Contracts installation.


这篇关于bug:如果安装了vs11并且程序集已签名,则不会构建。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆