Monday, October 18, 2010

Application Startup in Visual Startup Class Debug

If you've downloaded either of the C# or VB.NET free express versions of Microsoft Visual Studio 2010 and attempted to create any Revit Add-In class applications you may have noticed that there is no way to tell Visual Studio how to launch Revit for debug purposes.

You will have to manually open your .vbproj or .csproj file in in an ASCII text editor such as Notepad.exe and add a couple lines to accomplish debugging.

Open your .vbproj or .csproj file in notepad add the two lines that I have circled in the image below in the 'Debug|AnyCPU' group condition:

The StartAction must have a value of "Program" and the StartProgram attribute must contain the full path to the Revit executable file that you wish to use for debug. So besides a couple small nuisances, I think the Express versions of Visual Studio Express 2010 work just fins as long as you can live without any environment customizations...