I was getting a very strange error after upgrading my current project to VS.NET 2003 and the .NET Framework 1.1. Whenever I ran my database unit tests, I kept getting an Invalid PInvoke metadata format exception that occurred when the Data Access Application Block tried to Open a SqlConnection. Apparently this happens to any calls to an IDbConnection.Open() method (Sql, Oracle, OleDb, etc.) when NUnit tries to load the assembly at runtime. A .NET 247 article explains it in-depth. This would explain why the web application worked but my unit tests did not.
Now that I knew that it was a side-by-side versioning issue, I started trolling around for the modifications to make to NUnit. James Avery had success in rebuilding NUnit after having VS.NET 2003 convert it to .NET 1.1. A follow-up post showed the much simpler and no-recompile-necessary configuration file fix. The moral of the story? XML configuration files are good.
Posted
Fri, Jun 6 2003 10:40 AM
by
Darrell Norton