I have an IWizard
which gets access to a Project
variable. What code do I need to write to set the 'Start External Program' value in project properties?
Asked
Active
Viewed 855 times
4

Kate Gregory
- 18,808
- 8
- 56
- 85

Dmitri Nesteruk
- 23,067
- 22
- 97
- 166
1 Answers
6
Here's a macro that will set the current configuration to launch calc.exe. It should be trivial to re-work this for your IWizard implementation:
Dim project As Project = DTE.Solution.Projects.Item(1)
Dim config As Configuration = project.ConfigurationManager.ActiveConfiguration
config.Properties.Item("StartAction").Value = VSLangProj.prjStartAction.prjStartActionProgram
config.Properties.Item("StartProgram").Value = "C:\Windows\system32\calc.exe"

Aaron Marten
- 6,548
- 1
- 32
- 41