问题
Here is the whole context:
- I build two nuget packages containing
- A.nupkg: A.dll, A.Contracts.dll
- B.nupkg: B.dll, B.Contracts.dll; B depends on A
- 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