ccrewrite fails on the build machine due to nuget references having contract assemblies

橙三吉。 提交于 2019-12-24 01:54:35

问题


Here is the whole context:

  1. I build two nuget packages containing
    • A.nupkg: A.dll, A.Contracts.dll
    • B.nupkg: B.dll, B.Contracts.dll; B depends on A
  2. I create a new project and solution C depending on A and B, and set "Contract Reference Assembly" to Build.

Locally, everything compiles just fine. However, on the build server (MSBuild 2012.2), an exception is thrown from ccrewrite, saying ccrewrite : error : Rewrite aborted due to metadata errors. Check output window. Setting the logging to Diagnostics, I get the following:

Reading assembly 'B' from 'C:\Builds\1\Product\Build-Dev-CI\Sources\packages\B.1.2.13156.9\lib\net40\B.dll' resulted in errors. (TaskId:1284) Could not resolve type reference: [A.Class]A.Class. (TaskId:1284)

Any ideas why this does not work on the build server?

来源:https://stackoverflow.com/questions/17038087/ccrewrite-fails-on-the-build-machine-due-to-nuget-references-having-contract-ass

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!