How to add/rename configurations in Visual Studio (C++) Project Wizard? - visual-studio

I want to generate C++ projects with Visual Studio (2005/8/10) that have more configurations other than the default "Debug" and "Release". For example, I might want to additionally generate "Debug DLL" and "Release DLL", or rename them as those.
I've generated a custom project wizard, and tried adding/renaming the configuration names in the .vcproj file (found in the custom wizard project files), in the default.js file (found in the custom wizard project files), and even in using a custom common.js file (installed with Visual Studio).
None of if works. Added configurations are simply ignored. Renamed configurations cause the project generation to fail.
Am I asking the impossible? If so, does anyone know whether it's possible to manipulate the .vcproj "on the way out" in a post wizard step?
Thanks in anticipation

Go to your solution properties.
Click "Configuration Manager..."
Under the "Active Solution Configuration" pull-down, click "<New>..." or "<Edit>..."

Related

Visual Studio 2012 Business Intelligence SSIS packages missing

I have Visual Studio 2012 solution with multiple BI projects. One of the SSIS projects do not show all the ssis packages in the Solution Explorer (checked in by another teammember). But the missing files are in the TFS (Source Control Explorer) and are visible in the physical folder.
I tried "Show all files" did not work.
I tried adding the file again but the project does not allow that saying "file with same name exists".
Any idea what is going on here
The authoritative source of what's in a project is going to be the ProjectName.dtproj file.
Inside of that will be entries for the packages that comprise the project. For a non-package deployment model, it's trivial to edit the file by hand and make your stuff show up.
It's way too much effort to do that by hand for a 2012+ project deployment model. Open the Project in Visual Studio (ssdt/bids) and right click on the project. Click Add Existing Item (not add package) and then click the "missing" package. Check your .dtproj file in and all is right with the world.
I had the same issue in 2020, I managed to solve it by building the solution.
On the menu select Build-> Build Solution OR Ctrl+Shift+B

exclude assembly from build

I have a solution file with 10 assemblies. When I build the solution I would like to exclude 5 of them from being built and put in the Release folder. I tried going into the properties of the solution and unticking the assemblies in the Build column in the configuration properties, but this did not work.
If may use Configuration Manager tool of visual studio by write clicking on your solution in VS and selecting Configuration Manager and in active solution configuration combo box selection New
deselecting any project.
More configuration options for this newly created build will be possible by right clicking on each project any selecting properties part and going to Build tab(like output path will be editable)

Configuration With Same Name Already Exists

I have a solution with 10+ projects (VS2010 SP1). I have the following configurations defined in the solution:
Debug
Debug-QA
Release-UAT
Release-Production
This allows me to easily setup specific settings for each deployment scenario. However, for some reason I can't get things setup as I'd like. Please see this screenshot:
Notice the highlighted projects/configurations. I am unable to create a "Debug-QA" configuration for these projects (by selecting <New> in the cell for that particular project). When I try to add a new "Debug-QA" configuration to the DataUtility project, for instance, Visual Studio yells at me:
This configuration could not be created because a solution configuration of the same name already exists.
I know it does! I'm trying to add the configuration to the project! What am I missing here? I want all projects to have all 5 configuration. I have the same problem when trying to match up (create) platforms (for instance, adding an "Any CPU" platform to the DataUtility project).
Make sure you're using the drop down list from the grid (not the one at the top of the dialog), and do not check the "Create new solution configurations" checkbox when adding your new project configuration.
Here's a workaround if already checked the Create new solution configurations checkbox:
Open Explorer and navigate to the location of the solution for the project that is missing platforms.
Move the solution .sln file to a temorary location where Visual Studio won't locate it.
Open the .csproj file for the project that is missing platforms.
Click the Solutions Platform dropdown.
Click Configuration Manager...
In the table, Click the dropdown in the Platform column for the project and select , to add a new platform.
Click OK.
Repeat adding new platforms as needed.
Save the project.
Return the previously moved solution file back to where it was.
Reopen the combined project solution.
source: https://developercommunity.visualstudio.com/content/problem/972/adding-a-platform-when-one-with-the-same-name-alre.html
The above solution didn't quite work, but I did find a solution on a forum that worked. Described below is to set the builds to x64 for each project that was set to "Any CPU", but the steps would also work for x86.
Open the main solution. Unload each project with a conflict (not
remove).
Leave the solution open.
In Explorer, navigate to the
project folders and open the csproj file in Visual Studio.
In this
screwed up project, navigate to Build->Configuration Manager.
If
needed, "Add New" and set it to x64 and save.
Right-click the
project and set the build architecture to the new x64.
Save this,
but when you close the project in VS, do not save to the solution.
That's unnecessary.
Repeat for each project with a misaligned architecture.
Finally, in the original solution with all the offending projects,
reload each project.
Open the Build->Configuration Manager for the solution. Then, one by
one, reset "Any CPU" to the desired platform, in my case x64.
Save the changes for the solution and rebuild all. You should be OK,
now.

How do I create a project in Visual Studio not meant to compile?

I've got a Visual Studio 2010 solution that I would like to add a project to that only contains some command-line scripts. This project isn't meant to actually compile/build anything, but I want to be able to edit my scripts with the rest of the solution, and have TFS integration etc.
Unfortunately, in searching I get a lot of results for errors where builds don't happen, or other conditions where specific build targets are implemented. I simply want a non-build project in VS as a visual repository for the editor. I don't want to one-by-one include individual files in a solution folder.
In the build configuration manager (On the Menu, "Build", "Configuration Manager"), there is a "build" checkbox for each project. Uncheck it for your script project.
Could you make a content project, add your scripts to it, then change their properties to "Do not compile"?

GUI to include a .prop file in a VS 2010 project?

Visual Studio 2010 has no longer uses .vsprops files and instead uses .props files.
To include a .vsprops file in a Visual Studio 2008 project, one could right-click the project icon in the Solution Explorer panel, choose Properties, go to the Configuration Properties | General section, and modify the Inherited Project Property Sheets property to contain a list of .vsprops paths. One could also modify the Visual Studio 2008 project file directly.
Is there a way in the Visual Studio 2010 GUI to include .props files in a project? The Inherited Project Property Sheets property seems to have been removed. If manual editing of the project file is the only way to include .props files, where can one find documentation on doing it?
I'm not talking about adding a .props file to the list of files in the project, I mean how do I tell the project to use a .props file.
That hasn't changed. Use View > Other Windows > Property Manager. Navigate the tree view there and open the configuration you want to change. Right-click > Add New.
If you don't see this menu option then you can repair the menu with Tools > Customize, Commands tab. Select
"View" and click Add Command. Select "View" in the left listbox, "Property Manager" in the right one. That adds the command back to your View menu.
It is odd that it is missing of course, could have happened when you installed VS2010 and it imported your VS2008 settings. This feature is not flawless, judging from other programmers' questions about it, beware that you might be missing out on other menu items. If you haven't customized anything extensively then Tools > Import and Export Settings, Reset might be a good idea.
You can go to View -> Other Windows -> Property Manager to open up the list of property sheets and so on. This works in both VS 2008 & 2010.
Once you find the Property Manager you will see a list of your projects. right click on the project that you want to add a .props file for and choose "Add Existing Property Sheet". You can also choose to add a new property sheet. I have my property sheet in the same folder as my solution file so that all my projects can use the same property sheet.
These posts didn't quite answer my need to choose the right Boost downloaded binaries library folder. boost_1_61_0_b1 lib32-msvc-14.0 or lib64-msvc-14.0
For some suggestions for this application see
http://boost.2283326.n4.nabble.com/How-to-write-one-property-page-props-to-select-the-right-x86-or-x64-Boost-libraries-folder-automatico-td4686269.html#a4686272

Resources