Click here to Skip to main content
15,890,399 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am debugging a COM dll plugin that runs in a host application of 10 different possible host application versions.

Each time I want to run my DLL in a particular version of the host application, I have to go into the properties of the project, and change the COMMAND field in the debugging section to the correct path and application exe name which varies from application version to version.

I have been living this way for a long time but thought it would be so cool if I could just choose a custom debug config that is named VerX Debug, whose config is that same as regular debug, but has the COMMAND line changed to start the correct version of the hosting app, and have a lot of em.

If I do a new config, VS want's to make one for an ARM pc or Mobile. So I'm barking up the wrong tree there.

Is this remotely possible?

Thanks.

:Ron
Posted
Updated 29-May-13 9:12am
v2

Under the Build menu, select Configuration Manager. In the dialog that pops up, click on the "Active solution configuration" dropdown and select "<new...>". From there, you can set up the new configuration. Then, after closing the configuration manager you should be able to select that configuration on the Debug tab of your project's properties and set the command text as you wish.
 
Share this answer
 
Comments
Ron Anders 29-May-13 15:22pm    
Yup, wrong tree...

That was easy - thank you Marc.
Marc A. Brown 29-May-13 15:24pm    
You're quite welcome. Glad I could help. :)
Sergey Alexandrovich Kryukov 29-May-13 15:26pm    
Correct, a 5. Please see some more detail in my answer (Solution 2).
—SA
Yes, this is quite possible. Configuration is nothing but a name for the MSBuild project grouping together the whole set of build options. You can add your own configurations and define the whole set of options for each configurations, predefined or your own. Note that predefined configurations are no different from your own. They do not actually present in the project file standard and may or may not be present. In Visual Studio, they merely appear from the template you used when you create a project from template. You can skip using a template, if you wish, or you can start from the template and remove nearly all from your project after you create it.

To see what you can do, learn to use Visual Studio Configuration Manager (please find it in the menus). Also, it's good to understand how MSBuild projects are organized and used: http://msdn.microsoft.com/en-us/library/ms171452%28v=vs.90%29.aspx[^].

Note that inside Visual Studio, you can set any of the available configurations, but also a CPU architecture called in MSBuild and Visual Studio "Platform". These two parameters are passed to build as properties (you can find then in the reference I referenced above), they are referred as $(Configuration) and $(Plarform). Platform can be predefined in the project itself (you can do it in Visual Studio property page) or it may depends on the combination of "Configuration" and "Platform" settings shown on top of Visual Studio. If some of those properties is predefined in the project itself, parameters passed by Studio are ignored.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900