I'm obviously developing in debug mode. If I'm starting with the standard run command (F5) my project should start in debug mode but if I publish my project it should automatically switch in release mode. Is this possible somehow, maybe even with scripting?
views:
155answers:
1
A:
You could easily write a macro in VBA that was bound to a command in VS which switched to release mode, did your full rebuild, and fired off any other publishing/packaging required. I've done this before.
The object model for VS automation is very feature complete.
Edit:
Debug/Release in VS are configuration properties. Here's the MSDN page on accessing/modifying this.
Once you've set that, you should be able to use DTE.ExecuteCommand to start a build (or do anything else that's available via menus, etc).
Reed Copsey
2009-06-26 16:47:02
Thanks Reed, nice idea (although I hoped it would be *easier*). Do you know a link which describes the required commands?
2009-06-26 16:49:01
Added some details to my answer..
Reed Copsey
2009-06-26 17:07:38
I've played a little bit with the macro recorder and think that I'll get along. Thanks.
2009-06-26 17:14:53
Keselogof, could you please share more info on it?
balint
2010-01-19 21:06:44