Hi,
I'm changing the startup project like this:
m_applicationObject.Solution.SolutionBuild.StartupProjects = sProjName;
where m_applicationObject is the DTE2 object and sProjName is the project's unique name.
I see that the startup project changes fine but when I close the solution, the information doesn't persist meaning that the next time I open the solution, the previous startup project is selected. To be more clear:
- Open Solution with ProjA and ProjB (ProjA is the startup project)
- Change startup project to ProjB (programmatically using the code above)
- The change is successful and we see on Solution Explorer that ProjB is the new startup project
- Close Solution
- Reopen Solution and ProjA is the startup project (but the startup proj should be ProjB)
When I do it manually through VS by right clicking the ProjB and picking Set as startup project everything works as expected and the changes persist when we close the solution.
How can I achieve the same behaviour?
Thank you,
Ricardo.
Ricardo Sabino --- http://www.ricardosabino.com