Is it possible to have a custom step run per-solution, not per-project? - visual-c++

I have a Visual C++ solution with several projects. I'd quite like to be able to add a step that is executed after I build the entire solution... e.g "copy *.lib ......\libs.
Is this even supported? VS is mainly based around individual projects, but obviously does support solution builds.

You can create a dummy project, set that project up to depend on all other projects and then add custom build steps to that project.
In case all you want to do is to copy the libs or similar, it is probably better to do this from the individual projects, so that you don't do extra work in case you only build one of the projects.

You could also make use of property sheets. Set up the post build steps in it and have all your project inherit settings from that property sheet. You can find the property manager under View->Property Manager and create property sheets from there.

Related

How to re-use projects in SonarQube

We have multiple repos and whenever the developer runs the sonarQube scanner through Jenkins job, it is creating one project with build number along with the date, is there anyway I can re-use the same project name ..?
developers are running sonarQube reports through Jenkins jobs.
sonar.projectKey=portal1-sonar:1stiteration-${BUILD_NUMBER}
sonar.projectName=SonarQube nodeJS portal1 Build : ${BUILD_NUMBER}_${BUILD_TIMESTAMP}
anyway, I can change and use same project name, whenever developer runs sonarQube.
every project is defined in SonarQube with it's own key. That means if the key is the same, it is the same Project, and you will have a "history" of analyses and can compare parameters.
Although the idea of buildnumbers seems to be interesting, i recommend to use Branch names instead. There are currently two ways of doing this, for the first one, you need to have a SonarQube installation with a paid price. Than you are entitled to use the branch plugin. Which is actually the more superior way, because your project will show branches. The sonarQube docs are quiet helpful regarding this.
The old/Deprecated way will create a new project per branch, which you can than compare. the property you need to set is sonar.branch and this will be automatically added to your project key. So if the project key is Project and the sonar.branch is set to develop your new project will have the key Project:develop. This parameter is deprecated, and i am not sure, how long it will stay in the system.

Auto deploy specific project in solution to Azure

I'm using Visual Studio Online for my TFS needs, and I have a pretty big solution which contains several web projects.
How can I set up automatic deployment of a specific project in the solution to a specific website on Azure?
The default workflow used to deploy in VSO does not seem to handle this scenario.
The "first" web project found within the solution is chosen for deployment according to this discussion. Note that the discussion relates to git on VSO but it seems to hold true for builds using the VSO CI workflow.
According to the discussion changing the project names to influence the ordering should/might work but results seem mixed.
We chose to add a second solution only containing the web-project to deploy, its dependencies and tests. This will not work if there are dependencies on other web-projects.
Also take not of this article on a configuration-based approach, a question that this one might be a duplicate of or a question concerning actual deployment of multiple projects into one site.

Separate TFS Build excluding a single project

I have a solution that currently builds nicely in TFS. I have just added a Sandcastle help File Builder project to it so that the help files can be generated. Now the solutions takes ages to build locally (it has also doubled the build time on the TFS Server).
In practice I'd be happy generating the help files once per day, or only when specifically requested as part of a build.
I tried creating a separate solution (for a new build) which included the Sandcastle project but I got a warning saying that the projects were already under source control.
What is the best way to configure TFS/the solution for this sort of situation? Can I have two builds that run on separate schedules and include/exclude certain projects in the solution?
You can create a new solution configuration that excludes building your help project. Then in your TFS build you can specify which configuration to build. You could have a CI build that doesn't include your help project, and then a nightly build that includes everything.

Project specific Mantis states

I'm working in a company using one Mantis bug tracker hosting several projects.
The project I am working on needs specific statuses and I don't want these to be seeable in other project pages.
I see in the doc how to add a status but they seem to be global and not project specific.
The only way I see how to do it is to add global states and remove them from all other projects' workflows.
Do you know if (and how) it is possible to add project specific workflows ?
Thanks :)
Almost everything you can set in config_inc.php can also be defined in the database, either globally (all projects) or for specific projects.
You can do this using the Manage | Manage Configuration | Configuration Report page; at the bottom of the page, a section lets you define custom config options. Define the enums as appropriate and described in the documentation (you should still define the translations globally, including all valid values in the string)
To set a custom workflow, just set your current project as appropriate and use the Manage | Manage Configuration | Workflow Transitions to define it.

Use TFS build server but don't deploy

I have a build definition set up that successfully builds on each check-in and deploys to the cloud (Azure). However, I'd like to know how to modify it if I wanted it to build, but not actually deploy to Azure. Just build after the check-in, make sure nothing breaks, and that's it. I've tried searching around and modifying MSBuild arguments, but to no avail. This should be easy. What am I missing?
These are the MSBuild arguments I have plugged in. The last two (DeployOnBuild and CreatePackageOnPublish) don't seem to matter at all...not sure /t:Publish is making any difference either
/t:Publish
/p:TargetProfile=Cloud
/p:DeployOnBuild=false
/p:CreatePackageOnPublish=false
Thanks!
The key is to use the correct build process template:
Right click the build definition -> Edit Build definition
Process tab
Up at the top there is a section for the Build Process Template
Show Details
Select "DefaultTemplate" from the dropdown
The options available in the process tab will be different than the AzureContinuousDeployment template I was using. I didn't need any MSBuild arguments (though you might depending on how you named your service configs).
I had never noticed the template before. Most people probably just assumed I was already using the default one!

Resources