Programmatically Reloading Project/Solution
I'm writing an addin that modifies the project file directly. How can I programmatically signal VS to reload the project without prompting the user?
EnvDTE has a ProjectsEvents class that has three methods: ItemAdded, ItemRemoved, and ItemRenamed. You could poll for these events, and after your code makes any changes, you can have it reload the project.
You can use EnvDTE.Solution.Close and then EnvDTE.Solution.Open to close and then reopen the solution respectively.
HTH,
- Kemp Brown [MSFT]