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)
Related
I am working on a WF project which has many processes and code activities in it.
The project takes too long to build (20-30 times more than any other project in the solution).
I've asked google about this, but there seems to be no information.
Please, how can I reduce the build time of a Workflow Foundation project?
The main part is probably that all XAML based composite activities get validated during build. That means, they get instantiated!
You can turn that off with an undocumented setting in the csproj file:
<SkipWorkflowValidation>true</SkipWorkflowValidation>
<DisableWorkflowCompiledExpressions>true</DisableWorkflowCompiledExpressions>
This setting must be added to all configuration sections (the relevant elements, typically, you’ll want do to this in all the configurations).
The project file (csproj or vbproj extension) can be edited in Visual Studio by following these steps:
Right-click on the project in Solution Explorer and select “Unload Project”
Right-click on the unloaded project (now shown with the “(unavailable”) postfix), and select “Edit ”
The project file opens in the Visual Studio editor and you can manually edit it.
Once you are done editing the file, you can right-click on the project in Solution Explorer and select “Reload Project”.
Try that and watch the build time. But be aware, this will skip some tests during build that might be valuable...
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 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 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.
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