In visual studio 2008, how do I create different debug/release profiles? - visual-studio

We have three servers for each mode:
Development
Testing
Production
Each one of them has different settings for connecting to the database, different base paths for resource accessing etc.
How do I create different debug and release modes for each of those server types and how do I force them to use a different configuration file?
Is there an easy way to switch between them?

Right-click on project->properties->Configuration Manager.
To create solution profile("configuration"):
Click drop-down "Active Solution profiles", select edit.
To create project profile("configuration"):
In "project contexts" "grid", click on dropdown from "Configuration" column, select edit.
To select project profile for solution profile:
Select active solution configuration, then select desired project configurations for each project.
Each profile can have different settings - i.e. target path, include directories, etc, etc - basically everything you can set on property pages can be different for each profile.
They will use same file though.

Related

Show build configuration in Xcode

I have a project (C++ project within XCode 5) with multiple build configurations that I regularly switch between. Currently, to see the active configuration I have to click on the scheme and select 'Edit Scheme...' to view/change the configuration. It'd be nice to put this information somewhere more visible, or access it with a hotkey. Is this possible?
You can use Command+Shift+< to open the "Edit Scheme...". You can change the hotkey in XCode->Preference->KeyBindings->Menu->Product Menu->Scheme-EditScheme
Another option that I like is to create multiple schemes. Manage schemes and select your production scheme. Click the + button to add another scheme and name it with a -Dev postfix. Select the appropriate configuration.
Now you'll have multiple schemes that can be selected from the popup-menu easily for running and archiving.
Also by using this method, stored binaries in the Archive are tagged with the scheme name which can be useful.

Multiple build configuration in Advanced Installer

I am using Advanced Installer with Visual Studio 2010.
I managed to create an .aip project, but when I want to add the files from the relevant VS projects, I have to choose the exact location of these files.
I want to use more then one build configuration so I can use config transforms to change my .config files depend on the build configuration I choose.
This is a problem for me because when I compile in Debug the .exe & .dll files goes to bin\Debug, but when I compile in, lets say, Staging these files goes to bin\Staging.
How can I get Advanced Installer to get the right files, meaning get them from the target folder of the build configuration I chosen?
Advanced Installer does not support this by default, but with a little bit of tweaking you can get this working. Let me explain how:
the first requirement is to have your output folders generated by VS in the same parent folder, as you have them both placed in "bin\".
now you need to open your project in Advanced Installer GUI and do the following:
create two builds in Media page, called Debug and Staging
create a property called "Configuration" or what name would you like, from Install Parameters page
in the New Property dialog you will have options to set per-build values for your property. Set them to "Debug" and "Staging", i.e. the names of the folders created by VS
now go to File -> Options -> Path Variables and define a new path variable with your full path for the debug/staging, the one you current have in the project.
from the Home tab, in the toolbar, use the "Convert Paths" wizard and then save the project.
Now, it comes the tricky part, you will need to edit the project file in a text editor, like Notepad++, capable of saving the file in UTF-8 format. Once you open the file look for this XML node:
<COMPONENT cid="caphyon.advinst.msicomp.AppPathsComponent">
<ROW Name="BIN_DIR" Path="<your path>\bin\Debug" Type="2" Content="0"/>
You might have multiple variables here if you are already using this feature. You need to edit the value and replace "Debug" with "[|Configuration]".
Now you can save and build the project and it should pickup the correct files for each of the two builds.

Add Config Transforms not adding all configurations

I'm having an issue with the "Add Config Transforms" option in Visual Studio 2010. I have an ASP.NET 4.0 web project with the following 4 configuration modes defined:
Debug
Local
PreProduction
Release
When I right click on the web.config and select "Add Config Transforms" only the following two config transforms are added:
Web.Debug.config
Web.Release.config
The "PreProduction" and "Local" files do not show up. Is there a setting that I'm missing that would cause these two files to now show up?
Verify that the same configurations have been defined for the project and not just the solution.
Right Click the solution and open up the configuration manager,
Now in the top box select a new configuration.
The project you are having problems with will be marked Release or Debug.
Click the drop down and select new.
Deselect the checkbox at the bottom, and type in the name of the selected configuration.
use copy values from release.
Close and save,
rinse and repeat.
now right click the main config file and add transforms.

Renaming VS2010 Build Configurations

I made a spelling mistake when creating a new build configuration. I've corrected it using the Configuration manager but it hasn't corrected the name in all the projects in the solution as one would have naturally expected. I also can;t see how to correct them individually, is there a way to do this?
Open the Configuration Manager
Select the Configuration drop-down in the list of projects
Select "Edit". The Edit Project Configurations dialog will appear.
Select the misspelled configuration and click "Rename"

Setting the manufacturer in a VS 2008 Setup Project

I have a windows setup project that installs a service. All works well except for one thing: The default directory offered to the user during install is of the form "C:\Program Files\Microsoft\ProgramName". I am trying to modify this so that instead of "Microsoft" we would have our company's name.
I found the application folder property of the setup project, and it has a DefaultLocation property of "[ProgramFilesFolder][Manufacturer][ProductName]". So, it looks like all I need to do is set the "Manufacturer" property and I'll be all set. However, I can not find a way to set this property! I had hoped it would take it from the company name in the AssemblyInfo of the primary output project, but it did not.
I could remove "[Manufacturer]" from the DefaultLocation and replace it with our literal company name, but that seems like a hack.
How do I set the Manufacturer name?
Note that I am not using a full-blown WiX project. I have simply added a windows setup project to my solution.
Thanks in advance for any help.
Click on your setup project in Visual Studio, open the Properties and you will notice that there are a number of Properties that you can set like Manufacturer, SupportURL, etc.
Note if you're confused/frustrated doing this seemingly trivial thing: if you open properties by right-clicking on the project and clicking "Properties" in the right-mouse menu, you will get the wrong dialog box. You need to select the project, but then navigate to the properties tag. One way to navigate to the properties tag is from the "View" menu, select "Properties Window".

Resources