Hudson : warning MSB3245: Could not locate the assembly "nunit.framework"

hudson, jenkins, jobs, msbuild, nunit

Solution

The issue isn't the nunit-console.exe (or whatever the name).

The issue is that you cannot find nunit.framework.dll...as a reference in your project file (.csproj for C#).

Your unit-test project, you need to open it and find how/where the reference to the nunit.framwork.dll is wired.

Post the `.csproj` code if that is confusing.

EDIT:

<HintPath>Dll\nunit.framework.dll</HintPath>

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.

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

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."

Problem

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\; ``` I added also the path to NUnit : ``` C:\Program Files\NUnit 2.5.7\bin\net-2.0; ``` And so, I can run the NUnit and MSBuild command lines in my VM. 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". ``` What should I fix in my VM or in Hudson? Thank you a lot! EDIT 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> ```

Original source