Visual Studio Development Bookmark and Share   
 index > Visual Studio Extensibility > Macros per solution
 

Macros per solution

Hi,

I have solution with projects.
In the post build command lines I am calling a batch file that gets some parameters.
I want to compile that solution in 2 different modes (like debug and release mode but 2 of my own that I define). in every mode the parameters for the batch file will be changed.

1. can I define a macro per solution and not only per project ?
2. What is the line to compile a.sln from msbuild application and pass that parameter to the macro in order to operate the compilation in different modes ?

Thanks a lot,
Ido

idoyohanan  Tuesday, October 13, 2009 4:02 PM

Hi, Ido
I have not found a way for us to set our own Macro in the post-buid command line. What a pity! I think we could set CMD environment variable instead of defining our own Macros.
In the Pre-build event command line: You could set the CMD enviroment variable, for how to use set please reference Microsoft DOS set command.
Then you could use the enviroment in post build command line.
If I misunderstood you, feel free to let me know.
Thanks
Chao

Chao Kuo  Thursday, October 15, 2009 4:27 AM

Hi, Ido
I have not found a way for us to set our own Macro in the post-buid command line. What a pity! I think we could set CMD environment variable instead of defining our own Macros.
In the Pre-build event command line: You could set the CMD enviroment variable, for how to use set please reference Microsoft DOS set command.
Then you could use the enviroment in post build command line.
If I misunderstood you, feel free to let me know.
Thanks
Chao

Chao Kuo  Thursday, October 15, 2009 4:27 AM

You can use google to search for other answers

Custom Search

More Threads

• shell Command execution
• Partially Custom Project System
• create vertical tag group programmatically
• Templates Path for DEBUG versus release
• Need help on VSCT file Localization or VS2008 localization using resx
• CodeNamespace.InfoLocation always is vsCMInfoLocation.vsCMInfoLocationExternal?
• DSL - Custom Generator (kick off)
• How to get handles to the currently referenced assemblies on the active project?
• adding php compiler to visual studio 2005
• Visual Studio SDK V3 C# Example.ManagedMyC C# Example