NUnit assembly not found - nunit

I've used NUnit before, but not in a while, and never on this machine. I unzipped version 2.4.8 under Program Files, and I keep getting this error when trying to load my tests.
Could not load file or assembly 'nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77' or one of its dependencies. The system cannot find the file specified**
In order to simplify the problem, I've compiled the most basic possible test file.
using NUnit.Framework;
namespace test
{
[TestFixture]
public class Tester
{
[Test]
public void ATest()
{
Assert.IsTrue(false, "At least the test ran!");
}
}
}
I've added "C:\Program Files\NUnit-2.4.8-net-2.0\bin" to my PATH (and rebooted). Note that if I copy the test assembly into that folder, then
C:\Program Files\NUnit-2.4.8-net-2.0\bin>nunit-console test.dll
works, but
C:\Program Files\NUnit-2.4.8-net-2.0\bin>nunit-console c:\dev\nunit_test\test.dll
and
C:\dev\nunit_test>nunit_console test.dll
fail with the above error.
Presumably I could get around this by copying the NUnit.Framework DLL file into my project's bin folder, but I don't remember having to do this in the past. Moreover, I get the same error in the GUI. Shouldn't the GUI know where the framework is located (that is, in the same folder)?
I'm not using Visual Studio. I use the following line to compile the test project.
%windir%\Microsoft.NET\Framework\v2.0.50727\csc.exe /r:"C:\Program Files\NUnit-2.4.8-net-2.0\bin\nunit.framework.dll" /t:library /out:test.dll test.cs
I tried both the .msi and the .zip file with the same result.

Make sure you have added a reference to nunit.framework. If you have, then make sure the properties of that reference have the copy local property set to true.

I had the same problem, and I had installed using NUnit-2.4.8-net-2.0.msi. Expanding on the "add to the GAC" comment, here's what I did:
Open your "Visual Studio command prompt (generally: make sure gacutil is in your path) and: cd "C:\Program Files\NUnit 2.4.8\bin"
Unregister your NUnit entries from the GAC. You can do this by finding the NUnit entries registered in the GAC:
gacutil /l | find /i "nunit" > temp.bat && notepad temp.bat
Prepend the nunit.core and nunit.framework lines with "gacutil /uf", i.e.:
gacutil /uf nunit.core,Version=2.4.2.0,Culture=neutral,PublicKeyToken=96d09a1eb7f44a77
gacutil /uf nunit.framework,Version=2.4.2.0,Culture=neutral,PublicKeyToken=96d09a1eb7f44a77
Run your .bat file to remove them:
temp.bat
Register the NUnit DLL files you need:
gacutil /i nunit.core.dll
gacutil /i nunit.framework.dll

If you install using NUnit-2.4.8-net-2.0.msi, the NUnit assemblies are added to the GAC.
You can also reinstall manually by running gacutil from the Visual Studio 2005 command prompt.

Note that the current NUnit installation (2.5.10) doesn't register itself automatically in the GAC.
If you must use GAC, register it via gacutil /i <nunitframeworkpath> where nunitframeworkpath is usually %Program Files%\NUnit\net-2.0\framework\nunit-framework.

I got this error message today when I tried to add a new test assembly to an existing NUnit test project. It seems that my test projects had multiple path references to identical nunit.framework.dll assemblies.
If you have more than one test assembly in your NUnit project, you may want to verify the Path property of the nunit.framework reference in your test projects. Once I made them match, the error message went away.

Related

The specified task executable "postsharp.4.0-x86.exe" could not be run. The filename or extension is too long

PostSharp build step fails with
The specified task executable "postsharp.4.0-x86.exe" could not be
run. The filename or extension is too long
when run on build machine or locally with PostSharpHost=Native.
The cause looks to be the large number of references passed to postsharp.4.0-x86.exe via /P:ResolvedReferences parameter.
It works fine locally when using default PostSharpHost=PipeServer. However, PipeServer value is being ignored on build machine when build is run in non-interactive mode.
What are the options to resolve this issue? Is is possible to force using PipeServer on the build machine in non-interactive mode?
Here is a fragment from build log causing the issue:
C:\ProgramData\PostSharp\3.1.73\bin.Release\postsharp.4.0-x86.exe obj\Release\Before-PostSharp\Xxx.xxxxxxxxxxxxxxx.dll /X:default /NoLogo /L:44054-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx /P:Output=C:\Dev\Xxxxx\xxx-xxxxx-xx\Xxx.xxxxxxxxxxxxxxs\obj\Release\Xxx.xxxxxxxxxxxxxxx.dll /P:ReferenceDirectory=C:\Dev\Xxxxx\xxx-xxxxx-xx\Xxx.Xxxxx.XxxxXxxxx /P:Configuration=Release /P:Platform=AnyCPU "/P:SearchPath=..\bin\|obj\Release\|C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\|C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Facades\ " /P:IntermediateDirectory=obj\Release\PostSharp /P:CleanIntermediate=False /P:MSBuildProjectFullPath=C:\Dev\Xxxxx\xxx-xxxxx-xx\Xxx.xxxxxxxxxxxxxxs\Xxx.Xxxxx.XxxxXxxxx.csproj /P:SignAssembly=False /P:PrivateKeyLocation= /P:PrivateKeyContainer= /P:DelaySign= "/P:ResolvedReferences=C:\Dev\Xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxxxxm\lib\AWSSDK.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\BitSyntax\lib\net45\BitSyntax.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\BitSyntax\lib\net45\BitSyntaxCs.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxxxxm\lib\Castle.Core.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxxxxm\lib\Castle.Windsor.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\XxxxxxCxxxxxxxxxxxxs\lib\net40\Xxxxxx.xxxxxxxs.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\XxxxxxCxxxxxxxxxxxxs\lib\net40\Xxxxxx.xxxxxxxxs.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\XxxxxxCxxxxxxxxxxxxs\lib\net40\Xxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\XxxxxxCxxxxxxxxxxxxs\lib\net40\Xxxxxx.xxxxxxxxxs.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxxxxm\lib\FileHelpers.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FSharp.Core\lib\net40\FSharp.Core.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FSharp.Data\lib\net40\FSharp.Data.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FsPickler.CSharp\lib\net45\FsPickler.CSharp.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FsPickler\lib\net45\FsPickler.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FsPickler.Json\lib\net45\FsPickler.Json.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FsUnit\Lib\Net40\FsUnit.NUnit.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxg\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxg\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxi\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxi\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxs\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxs\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\XxxxxxCxxxxxxxxxxxxs\lib\net40\Xxxxxxxx.xxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxs\lib\net40\Xxxxxxxx.x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xxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\Xxx.xxxxxxxxxxxxxxxxxxxxxxxxxxs\bin\Release\Xxx.xxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\Xxx.xxxxxxxxxxxxxxxxxxxxxxs\bin\Release\Xxx.xxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\Xxx.xxxxxxxxxxxxxxxxxxxxl\bin\Release\Xxx.xxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-
The issue has been fixed in PostSharp 4.2.14. Please update to the latest version.

running nunit tests (x86) with gallio

I am trying to run nunit tests with gallio.
These tests run with nunit-console-x86.exe
When I run them with nunit-console.exe, I am getting System.BadImageFormatException
Running with Gallio.Echo.exe (installed the x86 bundle from gallio.org), I am getting the same exception. Is there a way to get gallio to use the nunit-console-x86.exe?
I am running the command "C:\Program Files (x86)\Gallio\bin\Gallio.echo.exe" /r:IsolatedProcess "C:\projectdata.Tests.dll"
and I am getting this exception:
Message
System.BadImageFormatException : Could not load file or assembly 'projectdata, Version=8.2.0.17, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Update: I figured out this is because I have project.dll(x86) and project.test.dll(Any CPU).
Any Ideas on how I can get gallio.echo to work for this? Is it possible to get a Gallio.Echo-x86.exe?
I was able to get it working by renaming the following files.
Gallio.Host.Elevated.exe --> Gallio.Host.Elevated.old.exe
Gallio.Host.Elevated.x86.exe --> Gallio.Host.Elevated.exe
Gallio.Host.exe --> Gallio.Host.old.exe
Gallio.Host.x86.exe --> Gallio.Host.exe
Note: You may want to create another copy of the gallio folder under program files to do this.
I have 2 copies. one in Program Files and one in Program Files (x86) with these changes.

NuGet - install.ps1 does not get called

I'm trying to create my first NuGet package. I don't know why my install.ps1 script does not get called. This is directory structure
--Package
|
- MyPackage.nuspec
- tools
|
- Install.ps1
- some_xml_file
I build package using this command line
nuget.exe pack MyPackage.nuspec
When I Install-Package from VS Package Manager Console install.ps1 does not get called.
I thought that maybe I had some errors in script and that's the reason so I commented out everything but
param($installPath, $toolsPath, $package, $project)
"ECHO"
But I don't see ECHO appearing in Package Manager Console. What can be wrong?
Install.ps will only be invoked if there is something in the \lib and/or \content folder, not for a "tools only" package, though. See here:
The package must have files in the content or lib folder for Install.ps1 to run. Just having something in the tools folder will not kick this off.
Use the Init.ps1 instead (however, this will be executed every time the solution is opened).
Install.ps1 (and Uninstall.ps1) are no longer called in v3, but you can use Init.ps1. See here:
Powershell script support was modified to no longer execute install
and uninstall scripts, but init scripts are still executed. Some of
the reasoning for this is the inability to determine which package
scripts need to be run when not all packages are directly referenced
by a project.
An alternative to the install script can sometimes be a package targets file. This targets file is automatically weaved into the project file (csproj, ...) and gets called with a build.
To allow Nuget to find this targets file and to weave it in, these two things are mandatory:
the name of the targets file must be <package-name>.targets
it must be saved in the folder build at the top level of the package
If you like to copy something to the output folder (e.g. some additional binaries, like native DLLs) you can put these binaries into the package under folder binaries and use this fragment in the targets file for the copying:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="CopyBinaries" BeforeTargets="BeforeBuild">
<CreateItem Include="$(MSBuildThisFileDirectory)..\binaries\**\*.*">
<Output TaskParameter="Include" ItemName="PackageBinaries" />
</CreateItem>
<Copy SourceFiles="#(PackageBinaries)"
DestinationFolder="$(OutputPath)\%(RecursiveDir)"
SkipUnchangedFiles="true"
OverwriteReadOnlyFiles="true"
/>
</Target>
</Project>

How to copy/install assembly in a GAC? (Some problem running NUnit)

I have NUnit installed at this directory.
C:\Program Files\NUnit 2.5.5\bin\net-2.0
I made the directory beneath a GAC.
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\NUnit
and copied the nunit.framework.dll, but I got the same error.
When I try to run my unit test (mut.dll) in some random directory. I get the following error. I have to copy the mut.dll under the NUnit directory in order to run it.
ProcessModel: Default DomainUsage: Single
Execution Runtime: net-2.0
Could not load file or assembly 'nunit.framework, Version=2.5.5.10112, Culture=n
eutral, PublicKeyToken=96d09a1eb7f44a77' or one of its dependencies. The system
cannot find the file specified.
What went wrong? How can I install/copy the assembly inside a GAC?
You could add the NUnit directory to your PATH environment variable, that might take care of it.
Otherwise, check out this stack overflow post for other ideas.

NUnit-console 2.5.4 not capable of running multiple assemblies?

I am having problems running tests with the command line NUnit test runner.
I am using version 2.5.4 with .NET 4 on an x64 machine.
Using the following line results in a failure "Could not load file or assembly 'bar' or one of
its dependencies. The system cannot find the file specified."
nunit-console-x86 foo.dll bar.dll /framework=4.0.30319
If I reverse the dll file names it complains about not finding 'foo' instead...
It works if I run them separately like:
nunit-console-x86 foo.dll /framework=4.0.30319
Also the tests of the second file works if I run:
nunit-console-x86 bar.dll /framework=4.0.30319
Before upgrading our projects to 4.0 we used NUnit 2.5.2 and the same command line tool options and at that point the runner worked well with multiple assemblies. It seems like the ability to run tests on multiple files at the same time is broken...
Anyone that can see the same behavior or does it work indicating that my environment is somehow broken?
/Per
Assembly loading behaviour has changed between 2.5.4 and 2.5.3. It was causing problems for us, so we reverted to 2.5.3, since that still supports the 4.0 framework.
We use nunit-console.exe 2.5.3 with multiple assemblies in our msbuild script, which looks like this:
<Exec Command="%22$(NUnit_Install_Directory)bin\net-2.0\nunit-console.exe%22
/noshadow #(TestableAssemblies, ' ') /xml $(BuildFilesPath)\NUnit-Results.xml" />
On execution, it fills out like this (edited for readability):
"c:\Program Files\NUnit 2.5.3\bin\net-2.0\nunit-console.exe" /noshadow D:\BuildAgent\GojiSoft.Application.Test\bin\Release\GojiSoft.Application.Test.dll D:\BuildAgent\GojiSoft.Common.Test\bin\Release\GojiSoft.Common.Test.dll
/xml D:\BuildAgent\work\2f016459feee51ce\Build\NUnit-Results.xml
We don't use a 64bit machine for our unit tests, so YMMV.
I have a blog post about the addtional modification your should make to the nunit-console-x86.exe.config here: Getting .Net 4.0, Team City, MSBuild and Nunit to play nice.
I has the same problem. I got around it by creating an nunit project in the GUI that includes multiple dlls. Then I can run it with nunit-console.