问题描述
大家好,
每当我尝试使用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客户端配置文件时出现上述错误但引用完整框架时出现相同的错误
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
这篇关于与VS 2010建立合同的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!