Friday, October 13, 2006

Friday, October 13, 2006


Breaking In A New Horse

One of the growing pains I encountered after migrating to Visual Studio 2005, was an issue I had trying to debug my InfoPath 2003 project. I would get an error message;
"In order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project."

While VS 2003 would launch the InfoPath form and Debug it with a fancy-free click of the 'Debu' button, VS 2005 requires you to have the solution selected before it will attempt to launch the form.

However that brought me to an issue I was not previously having. Without having changed any code, the form failed to load in preview or debug mode. Now I am getting the “The format of the file .dll is invalid” error. You would see this error on our dev-test VPCs that did not have the .NET 2.0 framework installed prior to launching the new form.

How is it possible that the DEV workstation compiling the formcode.cs in Visual Studio 2005 .NET 2.0 did not have .Net 2.0 installed?!?

After a quick reinstall of the framework and a restart, the form is debugging and previewing again.

So in recap; select the solution item in the Solution Explorer of Visual Studio 2005 BEFORE attempting to debug (F5).

Ciao for Niao

No comments: