Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Save startup project changes

$
0
0

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:

  1. Open Solution with ProjA and ProjB (ProjA is the startup project)
  2. Change startup project to ProjB (programmatically using the code above)
  3. The change is successful and we see on Solution Explorer that ProjB is the new startup project
  4. Close Solution
  5. 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





Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>