Hudson:警告MSB3245:无法找到程序集"nunit.framework". [英] Hudson : warning MSB3245: Could not locate the assembly "nunit.framework"
问题描述
我正在作为Hudson Slave在虚拟机中工作. 在虚拟机中,我将路径添加到要使用的MSBuild中:
I'm working in a Virtual Machine as a Hudson Slave. In the virtual machine, I add the path to the MSBuild I want to use :
%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\;
我还添加了NUnit的路径:
I added also the path to NUnit :
C:\Program Files\NUnit 2.5.7\bin\net-2.0;
因此,我可以在VM中运行NUnit和MSBuild命令行.
And so, I can run the NUnit and MSBuild command lines in my VM.
但是当我的Hudson Job构建我的解决方案时,我会收到此错误:
But I get this error when my Hudson Job build my solution :
C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets : warning MSB3245: Could not resolve this reference. Could not locate the assembly "nunit.framework".
我应该在VM或Hudson中修复什么? 非常感谢!
What should I fix in my VM or in Hudson? Thank you a lot!
编辑
有关文件* .csproj如何引用dll:
Here how the concerned file *.csproj references to the dll :
<Reference Include="nunit.framework, Version=2.5.7.10213, Culture=neutral, PublicKeyToken=KKKKKKKKKK processorArchitecture=KKK">
<SpecificVersion>False</SpecificVersion>
<HintPath>Dll\nunit.framework.dll</HintPath>
</Reference>
推荐答案
问题不是nunit-console.exe(或任何名称).
The issue isn't the nunit-console.exe (or whatever the name).
问题是您找不到nunit.framework.dll ...作为项目文件(用于C#的.csproj)中的引用.
The issue is that you cannot find nunit.framework.dll...as a reference in your project file (.csproj for C#).
您的单元测试项目,您需要打开它并找到对nunit.framwork.dll的引用进行连接的方式/位置.
Your unit-test project, you need to open it and find how/where the reference to the nunit.framwork.dll is wired.
发布.csproj
代码(如果这样会令人困惑).
Post the .csproj
code if that is confusing.
<HintPath>Dll\nunit.framework.dll</HintPath>
问题是您需要下载"或复制或svn-export或svn-checkout或nuget-获取该文件. 并将其放在.csproj的 relative 目录中.
The issue is that you need to "download" or copy or svn-export or svn-checkout or nuget-get that file. And place it in the relative directory to your .csproj.
由于您指定了一个HintPath,它将在以下目录中找不到该路径:
Because you have specified a HintPath, it will NOT find the one in this below directory:
C:\Program Files (x86)\NUnit 2.X.Y\bin\nunit.framework.dll
基本上,HintPath
说我希望在这里找到此文件",而您的MSBUILD错误显示我没有在HintPath
说的地方找到它."
Basically, the HintPath
says "I expect to find this file HERE", and your MSBUILD error says "I did not find it where the HintPath
said it would be."
这篇关于Hudson:警告MSB3245:无法找到程序集"nunit.framework".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!