Start action set in template

Kevin Fugate 21 Reputation points

I am building a template for creating VB add ins for Autodesk inventor. I would like the "Start external program" field on the debug page to by default be selected and the text box populate with the path info to my Inventor application. I have set the values accordingly and exported the template. When creating a new project from the new template "Start project" is selected as the start action and the text box is of course empty.

Is there a way to set up a template that will set the "Start external program" field on instantiation of a new project?


Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,721 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,638 questions
0 comments No comments
{count} votes

Accepted answer
  1. Tianyu Sun-MSFT 28,056 Reputation points Microsoft Vendor

    Hi @Kevin Fugate ,

    Welcome to Microsoft Q&A forum.

    The Start action is set in yourprojectname.xxproj.user file. This file contains per-user settings and is automatically generated by Visual Studio when user changes some preference settings like Debugger settings. But this file will not be exported(or imported) together with your project to a custom project template, so it won’t work.

    One way that I can think of is writing some codes(maybe create an extension) to modify(or create this .user file and modify) the .user file, and add the following xml codes into it:

    <StartProgram>C:\Prgram Files\XXXX\XXXX\XXX.exe</StartProgram>  

    But it’s still not that easy, so as a summary, I suggest that you can try to directly add above codes into the .xxproj(for example .csproj) file, and then export this project as a custom project template. Following is a snippet of the .csproj file, please kindly check it.

    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">  

    Best Regards,

    • If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

0 additional answers

Sort by: Most helpful