I have recently installed the .NET Framework 2.0 Beta 2 and soon realized that NUnit wasn’t able to load assemblies compiled with that version. I have tried configuring the version of the framework in the NUnit config files to no avail, so I have downloaded the source code for version 2.2.2. I was planning to build that with the new Framework, but it is not that straightforward.
What I had to do was, create a new key pair with the command:
sn –k nunit.snk
I placed that file in the root directory of the NUnit tree and changed all the AssemblyInfo.cs files to reference the new key pair.
The next step was to delete all the references on the various projects, except the references to .NET Framework stuff. I have recreated all these references pointing to the respective projects, instead of the pre-built assemblies.
I have created a bin folder on the root of the NUnit tree and pointed the build output of all the projects to that folder.
I also got rid of all the references to .gif and .jpg files on the nunit.uikit.dll project and the files “Solution1.sln” and “Unmanaged.vcproj” files on the nunit.util.tests project, as these files don’t come with the source package.
All that made, it was time to build the app. The compilation went fine and I could add the output nunit.core.dll and nunit.framework.dll assemblies to the GAC. I have opened my unit tests project, updated the references to the correct ones and rebuilt it.
I was able then to successfully run NUnit with the new Framework and also set CruiseControl.NET to use it. This workaround will then keep us working until we get an official release from the NUnit project itself.