How to customize fortify visual studio plugin - visual-studio-2010

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.

Related

TeamCity continues to build projects that have been excluded from my Visual Studio solution configuration

My Visual Studio 2019 solution contains several projects, some of which I don't want to be built as part of continuous integration. Specifically, I'm trying to exclude tooling and unit tests.
In Visual Studio, I have created a new solution configuration and unchecked the "Build" box for each project I don't want to be built.
In TeamCity, I have specified the name of the new solution configuration to use. However, TeamCity continues to attempt to build all projects within the solution.
[I had included screenshots of my solution configuration, TeamCity build configuration, and resulting TeamCity log but I do not have enough reputation to post images apparently.]
From everything I could find so far, unchecking "Build" from the solution configuration used by TeamCity is supposed to exclude that project from building.
I figured it out by finally noticing that the TeamCity log was showing the build configuration as "ReleaseCI|Mixed Platforms" instead of "ReleaseCI|Any CPU". On other projects, I only needed to specify the configuration. For this project, I apparently have to specify the platform as well.

Sandcastle 'SHFB Visual Studio Extension Package' project - How to build only on 'Release'?

I am using the Sandcastle 'SHFB Visual Studio Extension Package' - which creates a Sandcastle project inside the Visual Studio solution. The integration is nice, but it automatically builds the documentation project every time I do a build. I'd like it to only build the help project for a "Release" build, but unlike other VS projects, the properties options for the Sandcastle documentation project have the "Configuration" and "Platform" selectors disabled.
I have looked at the other property options, but nothing seems to allow selecting options for WHEN the project should be built. Online searches have turned up instructions for specifying the build-on-release-only option when using the standalone SHFB gui tool, or if using the MSBuild command line for a non-integrated sandcastle project (via a different project's build events), but nothing about configuring an included project.
Having come across this just the other day:
Go to configuration manager for your solution. Uncheck the build option for your documentation project for all but the "release" configuration.

Exclude projects from solution during build in MSBuild on a CI server

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.

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)

In Visual Studio 2010, how do I stop new projects being added & built in every existing build configuration

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

Resources