Create a file .csproj.userfor the generated project. This is an XML format. You can read and create XML using the XmlDocument class .
Install <StartAction>in Programand install <StartProgram>in the executable file of your choice.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartAction>Program</StartAction>
<StartProgram>myexecutable.exe</StartProgram>
</PropertyGroup>
</Project>
source
share