重写由于元数据错误而中止 [英] Rewrite aborted due to metadata errors

查看:103
本文介绍了重写由于元数据错误而中止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经安装了Code Contract的版本1.4.50111.1,每次编译应用程序时都会出现此错误。我们使用了一个四方派对产品"DotNetRemoting"。当我们在代码契约中激活运行时
时,此产品的主DLL就会出现此错误。


在库中,我们使用SyncServer类和我们创建的位置一个新的服务器实例,我们在编译中有错误。


SyncServer Server = new SyncServer(); //使重写中止


构建的输出窗口中的错误是:


任务"Exec"

  "C:\Program Files(x86)\ Mycoftoft \Contracts\Bin \ccrewrite" "@ CCDotNetRemotingccrewrite.rsp"&
 从'D:\Developpement\Code Contract\CDDNRLibrary\bin\Debug\CDDNRLibrary.dll'中读取程序集"CDDNRLibrary"导致错误。

     未解决大会参考:AsyncWinLib,Version = 1.0.3815.34151,Culture = neutral,PublicKeyToken = ee31b7afddfed7e0。

     无法解析类型引用:[AsyncWinLib] DotNetRemoting.SyncServer。

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


有没有人确实有同样的问题?一种解决方法吗?


谢谢


 

解决方案

< blockquote>

重写器应该获取所有所需程序集的路径。程序集AsyncWinLib是从正在构建的项目中引用的吗?你可以查看.rsp文件,看看是否有对AsyncWinLib的引用?


我认为没有办法解决这个问题:重写器需要所有(传递)引用装配以便工作。如果您可以将一个repro打包到一个zip文件中并发送给我,那么我可以查看它。


We have installed the version 1.4.50111.1 of the Code Contract and we have this error every time we compile our application. We use a thrird party product "DotNetRemoting" and the main DLL of this product is making this error when we activate the runtime checking in the code contract.

In the library, we use the SyncServer class and where we create a new instance of the server, we have error in the compilation.

SyncServer Server = new SyncServer(); // Make the rewrite aborted

The error in the Output windows for the build is :

Task "Exec"
  "C:\Program Files (x86)\Microsoft\Contracts\Bin\ccrewrite" "@CCDotNetRemotingccrewrite.rsp"
  Reading assembly 'CDDNRLibrary' from 'D:\Developpement\Code Contract\CDDNRLibrary\bin\Debug\CDDNRLibrary.dll' resulted in errors.
      Assembly reference not resolved: AsyncWinLib, Version=1.0.3815.34151, Culture=neutral, PublicKeyToken=ee31b7afddfed7e0.
      Could not resolve type reference: [AsyncWinLib]DotNetRemoting.SyncServer.
ccrewrite : error : Rewrite aborted due to metadata errors. Check output window

Does anyone did have the same problem ? A way to fix it ?

Thanks

 

解决方案

The rewriter should be getting the paths to all of the needed assemblies. Was the assembly AsyncWinLib referenced from the project that is being built? Can you look into the .rsp file and see if there is a reference to AsyncWinLib?

I don't think there is any way to fix this: the rewriter requires all (transitively) referenced assemblies in order to work. If you can package a repro in a zip file and send it to me, then I can look into it.


这篇关于重写由于元数据错误而中止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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