与VS 2010建立合同的问题 [英] Problem building Contracts with VS 2010

查看:73
本文介绍了与VS 2010建立合同的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


每当我尝试使用VS 2010构建我的项目启用合同运行时检查时,我从ccrewrite得到以下错误:


 


16>   EnsureContractReferenceAssemblies:D:\\\400 \ Main \ Source \binaries \ x86 \Debug \CommonBase.dll; D:\s400 \ Main \ Source \binaries \ x86 \ Debug \Common.dll; d:\s400\Main\Source\binaries\x86\Debug\Common.WcfTransportLayer.dll; d:\s400\Main\Source\binaries\ x86 \Debug \Common.ServiceContracts.dll

16>  从'C:\Program Files \Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0 \Profile\Client\PresentationFramework.dll'中读取程序集'PresentationFramework'导致错误。

16>   未解决大会参考:PresentationUI,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35。

16>   无法解析类型引用:[PresentationUI] MS.Internal.Documents.FindToolBar。

16> ccrewrite:错误:重写由于元数据错误而中止。检查输出窗口


 


我检查了"参考装配"程序文件下的文件夹确实缺少PresentationUI.dll。但是大会是在GAC。那是什么意思? VS的安装是否已损坏或是否存在ccrewrite问题。


谢谢,


Christoph


 


btw:虽然使用.net 4.0客户端配置文件时出现上述错误但引用完整框架时出现相同的错误

解决方案

作为解决方法,您可以从

C中复制PresentationUI.dll:C:\ WINDOWS \ Mesrosoft.NET \ Framework \v4.0.30319 \\ \\ WBP



C:\Program Files \ Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0 \Profile\Client


 


我不知道是否允许这样做,但是在复制之后你可以编译项目; - )


Hi all,

Whenever I try to build my project with VS 2010 enabling contracts runtime checking I get the following error from ccrewrite:

 

16>  EnsureContractReferenceAssemblies: D:\s400\Main\Source\binaries\x86\Debug\CommonBase.dll;D:\s400\Main\Source\binaries\x86\Debug\Common.dll;D:\s400\Main\Source\binaries\x86\Debug\Common.WcfTransportLayer.dll;D:\s400\Main\Source\binaries\x86\Debug\Common.ServiceContracts.dll
16>  Reading assembly 'PresentationFramework' from 'C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\PresentationFramework.dll' resulted in errors.
16>   Assembly reference not resolved: PresentationUI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
16>   Could not resolve type reference: [PresentationUI]MS.Internal.Documents.FindToolBar.
16>ccrewrite : error : Rewrite aborted due to metadata errors. Check output window

 

I checked the "Reference Assemblies" folder under program files and indeed the PresentationUI.dll is missing. But the assembly is in the GAC. What does that mean? Is the installation of VS corrupt or is there a problem with ccrewrite.

thanks,

Christoph

 

btw: although the above error comes when using .net 4.0 client profile there is the same error when referencing full framework

解决方案

As workaround you can copy the PresentationUI.dll from

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\WPF

to

C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client

 

I don't know if this is allowed, but after the copy you can compile the project ;-)


这篇关于与VS 2010建立合同的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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