This project has moved and is read-only. For the latest updates, please go here.

Nunit with BTDF

Topics: General Questions
Sep 16, 2013 at 3:04 PM
I am getting the following error after I try to run the Verify deployment Nunit tests after a succesful deployment :

System.BadImageFormatException: Could not load file or assembly 'C:\Program Files (xb6)\BTS Broker for BizTalk\1.o\DeploymentTest.dll or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
You may be attempting to load an assembly built with a later version of the CLR that the version under NUnit which is currently running , 2.0.50727

I have tried replacing the contents of "C:\Program Files (x86)\Deployment Framework for BizTalk\5.0\Framework\DeployTools\NUnitSubset" with the latest version of the Nunut bin directory but this does not work.

Basically how do I upgrade the BTDF to use the latest version of Numit ?

Thanks in advance!
Sep 16, 2013 at 4:14 PM
You must be on BizTalk 2010 or newer, so everything should be .NET 4.0. The path that you listed is the only place where the NUnit files are stored. Did you check that the new NUnit that you copied was packaged into the MSI (and that it's a .NET 4.0 version)? You can also look at your <deployment project>\obj\Debug/Release\redist folder to see what files are going into the MSI, and the Output window to see the exact location that everything is copied from.

Sep 16, 2013 at 6:49 PM

Thanks for the prompt response.

I am using BTS 2010.
When I over write the "C:\Program Files (x86)\Deployment Framework for BizTalk\5.0\Framework\DeployTools\NUnitSubset folder" with the contents of "C:\Program Files (x86)\NUnit 2.6.2\bin" the deployment process builds as before but with the new NUnit version.

However when finished the 'Verify Dweployment' shortcut does not appear on the start menu.
Navigating to the \Framework\DeployTools\NUnitSubset on the traget server and click on NUnit.exe causes it to start but you have to create a project, load the assemlby and configure it. Something I was hopping to avoid.

Would it be the short cut is missing because it is expecting NUnit-gui.exe as the exe which is not in NUint2.6.2 ?

It was an outside chance but I tried to change NUnit.exe to Nuint-gui.exe before building the msi (and changed the name of the config file).
Whilst the shortcut did appear running it gave a windows application failure.

Sep 17, 2013 at 6:10 AM
Correct, the MSI build process looks for nunit-gui.exe to determine whether to create the shortcut, and the shortcut will always be tied to that EXE name. As for the application failure, all I can say with that little info is that you should try nunit-x86.exe renamed to nunit-gui.exe (and the config file).