I have been having some binding problems when trying to use Ivonna 2.0.0 against a version of Typemock Isolator other than the 5.3.0 build it was built to run against. This is a know issue, if your version of Ivonna and Typemock don’t match then you have to use .Net Binding redirection to get around the problem.
So to track down the exact problem I used the Fusion logger shipped with the .NET SDK (via fuslogvw.exe). This in itself has been an interesting experience. A few points are worth noting:
- You cannot alter the settings (as to what it logs) from fuslogvw.exe unless you are running as administrator (because these a really just registry edits in HKLM\SOFTWARE\Microsoft\Fusion node). However you can use the viewer to view logs even if not an administrator as long as the registry entries are correct.
- I could only get the Fusion log to work if I was running my ASP.NET application in Visual Studio 2008 running as administrator, if I was a standard user nothing was logged.
- You have to remember to press refresh on fuslogvw.exe a lot. If you don’t you keep thinking that it is not working when it really is.
Anyway using the fusion logger I found I had two problem assemblies, not just the one I had expected. I had guessed I need to intercept the loading of the main Typemock assembly, but what the fusion logger showed me was I also needed to intercept the Typemock.Intergration assembly. Also I needed to reference the Typemock.Intergration assembly in my test project and make sure it was copied locally (something I had not needed to explicitly do when using Typemock 5.3.0 where it had found via I assume via the GAC)
Now it is important to remember that if using MSTEST and Ivonna you need to point the build directory for the Test Project to Web Application under test’s bin directory. This means that the .NET loader will check the web.config in the web application for any binding information, not just in the app.config in the test project as I had first assumed.
So all this means that I needed to add the following to my Web Application’s web.config and app.config
Once this was done all my test loaded as expected