Using a Registry Entry to Specify the DebugInfoExeName

When a VSTA add-in is run or debugged from a stand alone or destructive scenario, the life of the host application is tied to the debugging or running session.  In order to start the host application the VSTA add-in must know the location of the exe to run.  This information is specified in the project file, in the element DebugInfoExeName.  This element can accept either a path to the exe, or a registry entry to search for the value.  This can be specified through ProjectGen, changed manually in the project template, or set programmatically by the host.  The ShapeApp SDK samples use a registry entry (see code below) so that the path to the exe can be easily changed without editing individual add-ins or manipulating and re-registering project templates.  This can be very useful for several reasons, including allowing for a more flexible install instead of requiring the host exe to be at a particular path.

 

<ProjectProperties DebugInfoExeName="#HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ShapeAppCSharp\InstallPath#\ShapeAppCSharp.exe" />

 

For more information regarding the project templates please see:       
     Creating Project Templates (Visual Studio Tools for Applications)
     Project Template Generation Tool (Projectgen.exe)
     Descriptor Schema for Projectgen.exe
     Creating Project Templates Using the Project Template Generation Tool (Projectgen.exe)


Posted Jul 29 2010, 12:49 PM by Melody
Copyright Summit Software Company, 2008. All rights reserved.