我有一个复杂的解决方案(在 Windows 下开发,在 GNU\Linux 下部署),其中包含许多单元测试项目,使用 NUnit 2.9.3。
这是项目的参考:
<Reference Include="nunit.framework, Version=2.9.3.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\Program Files\NUnit 2.9.3\bin\net-4.0\nunit.framework.dll</HintPath>
</Reference>
我从源代码下载并构建了 NUnit 2.9.3 :
$ xbuild solutions/MonoDevelop/NUnit.Framework.sln /p:Configuration=Release
并安装到 GAC 中:
$ gacutil /i solutions/MonoDevelop/bin/Release/nunit.framework.dll
$ gacutil /l nunit.framework
The following assemblies are installed into the GAC:
nunit.framework, Version=2.9.3.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77
Number of items = 1
并删除了本地单 nunit 安装:
$ rm /usr/lib/mono/2.0/nunit*
$ rm /usr/lib/mono/4.0/nunit*
但是当我尝试构建我的解决方案时:
$ xbuild MySolution.sln | grep error
: error CS0006: Metadata file `/usr/lib/mono/2.0/nunit.framework.dll' could not be found
我错了什么?