I have a solution with several custom configurations (staging, QA, etc)
Ive added a new project (azure webjob) but the newly added project cant see the custom configurations only the standard Debug & Release.
In the configuration manager the only options I have alongside my new project are debug & release its not seeing the other custom configs.
Is there a workaround for this ?
Each project and solution has its own list of configurations. The Configuration Manager defines which project configurations will be used for a given solution configuration. So if you add a new project to a solution that already has custom configurations, the project will still only have the default configurations for its type (Debug and Release in this case).
To create new project configurations and associate them with solution configurations of the same name:
Right-click your solution in Solution Explorer and open the Configuration Manager.
Select your custom solution configuration in Active solution configuration.
In the Project contexts list, find your newly-created project.
Expand the Configuration drop down and select New....
Type the Name of the solution configuration.
Select Copy settings from whichever project configuration makes sense.
Click OK.
Related
I am working on a solution in Visual Studio that contains a number of projects:
Solution.sln:
-> ProjectInc1.csproj
-> ProjectInc2.csproj
-> ProjectExc1.csproj
-> ProjectExc1.csproj
I work on all projects and when I make a push on my VCS (Github in my case) it triggers a build configuration on a CI server (TeamCity in my case). TeamCity server uses MSBuild, that takes the Solution.sln as parameter and builds it. However I want certain projects (e.g. ProjectExc1.csproj, ProjectExc2.csproj) to be ignored from build. I can do this step if I remove the project references from Solution.sln file, but I think there must be a better way to exclude from build certain project.
Does anyone know how to configure MSBuild or the Solution itself to ignore these projects when building the solution on the CI Server?
In Visual Studio create a new build configuration (from http://msdn.microsoft.com/en-us/library/jj676765.aspx):
To create a solution configuration that excludes a project
On the menu bar, choose Build, Configuration Manager.
In the Active solution configuration list, choose .
In the Name box, enter a name for the solution configuration.
In the Copy settings from list, choose the solution configuration on which you want to base the new configuration (for example, Debug),
and then choose the OK button.
In the Configuration Manager dialog box, clear the check box in the Build column for the project that you want to exclude, and then
choose the Close button.
On the Standard toolbar, verify that the new solution configuration is the active configuration in the Solution
Configurations box.
On the menu bar, choose Build, Rebuild Solution.
Then in TeamCity, instead of building in Debug/Release set the configuration to build with your new build configuration name.
If you are calling from an MsBuild script, the same applies. Just change the configuration you are calling.
I've do a small project, my application will release 2 version, each version contain different image resource, different Application setting file. I known that in the XCode, it's have a term call Target which allow developer config some folder which want to build for each version.
Can Visual Studio do the same thing like XCode?
Thank you!
I believe what you are looking for is solution build configurations, check this link out:
http://msdn.microsoft.com/en-us/library/kwybya3w(v=vs.110).aspx
Here is a good example of including a reference for a specific configuration.
Visual Studio Project: How to include a reference for one configuration only?
You will need to research the topic a bit, but here is how to get started:
1. Open your Solution
2. In solution explorer right click the solution
3. Select Configuration Manager
4. Create a new configuration or modify one of the default ones.
Example of a solution with many build configurations:
Each of these configurations have custom configs and some have different references based on the configuration.
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)
I am very new to HP Fortify SCA tool. I have Fortify plugin for Visual Studio 2010 installed. Now if I start analyzing the code, it includes all project in that solution. But I have lot of test projects which I want to exclude from analysis. If anyone has any idea how to customize the list of projects which need to be included for analysis.
You can exclude the projects from scanning by setting them not to build from the solution configuration.
For example, one way to accomplish this is:
Build -> clean solution
Highlight solution, right click and select Properties
Select configuration properties (ensure configuration is set to debug)
uncheck the build column of each project you do not wish to scan
Now when you scan in debug mode, you will not be translating/scanning the projects that are not set to build in that configuration.
Hope this helps.
I have a number of configurations setup in Visual Studio with a carefully crafted list of projects that each one should build.
When I create a new project in the solution it gets selected for building automatically in every existing build configuration.
Is there an option to stop this occurring?
In the solution configuration manager you can unselect build (and deploy) of individual projects for different build configurations.
Right click on solution, select properties, Configuration Properties.
Or Build | Configuration Manager