Compiler settings for VS 2017 Community Edition

Viewed 43

I'm creating a kind of big project, that will interact with a family of programs (for now, CorelDraw but in the future could also work with InkScape, maybe Illustrator) and maybe as a stand-alone.

For this I separated my solution in many projects: - one for WinForms UI, - another for the Domain Model, - another for a specific version of Corel Draw

So, since I'm still learning C# (and the tools - VS2017 community) I chose WinForms because it was closer to the VBA I'm already familiar with, but in the future I intend to maybe move to WPF, or some other UI (the domain could be used for a mobile app or website for instance).

Also regarding the specific version of Corel Draw, I'm starting with the one I use at work but in the future I will add other projects for the interaction with each version. More specifically, a project each to generate the .dll(s) each version of Corel Draw expects to start the plug-in. Or another project for the .dll InkScape expects, or even the Main exe if I choose to make a standalone app.

So in short: how can I save different "profiles" for the compiler to know which projects to compile and which to not compile, and set a different "build path" for each (so when I make the installer for each kind of build, I have all the necessary files that build needs to work correctly)?

1 Answers

With your solution open, "Solution Explorer"->right-click your solution (at the top of the window)->"Properties"->"Configuration Properties"->"Configuration".

Then click "Configuration Manager", then "Active Solution Configuration"->"New...".

This creates a new configuration. You can now select how/if the various projects should build for that configuration. (You can also use this same window to edit how existing configurations build).

Also you can consider making an entirely different solution if you're fundamentally building a different thing (this is likely to be easier than ending up with 30 build configurations for one solution)

Also, you can get at the configuration name in your projects via the $(ConfigurationName) macro. It's good to make sure your projects can build without this being set properly, though (so that they aren't dependent on a particular solution)

Related