Pages

Thursday, June 28, 2012

F# Unit Test Template for DLL built with Visual Studio 2010

I published the F# unit test template and a user reports they cannot run the Visual Studio 2010 DLL with this template on Visual Studio 2012. You need to do a bindingDirect in the App.config file.


        < bindingRedirect oldVersion="4.0.0.0" newVersion="4.3.0.0" />

You can find the full file content in a F# console application. The console application create the app.config by default. If this one still cannot solve your problem, you need create a runsetting file and force the legacy mode = true. Please remember to set the test run setting from Visual Studio menu: Test -> Test Settings -> Select Test Setting files... to use the runsetting you just created.

I have not found any drawback when using the Force Legacy mode. So please let me know if you found something.

No comments: