Hi,
I'm creating the software for a course. What with exercise start points and worked solutions and both C# and VB I have about 100 VS2010 solutions.
During development I reopen these as neccessary and they get a lot of tweaking. When I'm done I want to leave the solutions with NO documents open. That way when the student opens the solution it's a very clean view, not littered with the files I was last looking at.
Up to VS2008 this was was easy. I simply deleted all the *.suo files - that seems to be where VS stores the window layout. When a solution was opened VS happily created a new SUO file. This approach was suggested in http://stackoverflow.com/questions/648803/close-all-files-in-visual-studio-on-exit
With VS2010 this causes an annoying dialog...
Security warning for You should only open projects from a trustworthy source
This is completely reproducible. 1) Open one of the solutions, for which there is no SUO file 2) VS gives a trust warning. User accepts it. SUO file is created. 3) Subsequent opening of the SLN don’t report trust problems. 4) Delete the SUO file. 5) Reopen the SLN and the trust errors reoccurs.
How can I achieve my ambition of having VS open up with no document windows open, and no security dialog? I really want it to be automated from OUTSIDE VS. Opening all of 100 solutions and manually closing the windows is NOT what I'm looking for.
It's pretty easy to create a macro that will close all windows, but I cannot see a way of starting VS from the command line and getting it to run a macro on startup.