I was recently placed on project that needs some tough love and care and one of my first actions is to setup continuous integration (CI). The problem I'm running into is the solution has a wide range of project types, all needed because of the way the application was designed, my MSBuild arguments are causing issues with the console applications.
The TFS environment is 2013 with update 3 installed. I'm using the
for the build process.
The solution has many different types of projects in it. I have two web applications, several class libraries, several console applications, a Windows service, one database project, two SSIS projects and an SSRS project. I'm using the following MSBuild arguments to build and publish the web applications and the database:
The issue I'm running into is because I'm passing the
switch into MSBuild, it is trying to build and publish all of the projects in the solution. The build fails for the console applications with the following error message:
C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (4709): Could not copy the file "D:\Builds\3\Solution\Project\bin\ApplicationName.exe.manifest" because it was not found.
Under normal circumstances, I would simply remove the console applications from the build, but they serve a critical function in the application right now that I need them being deployed. I do have PowerShell scripts that will deploy these applications and was planning on using the post-build script hook in the build template to achieve this.
My first attempt was to simply add a manifest file to the project. The problem I ran into there was the file wasn't getting generated and placed into the bin folder. I did an exhaustive search and could not find any good references on setting up a manifest file for console applications in a .NET console application.
My second attempt was to simply create separate solution files that I could selective pass in the build arguments. However, I could not find an out of the box solution that will allow me to selective pass the build arguments into a solution.
My third option is make use of the pre and post build script hooks and write a series of PowerShell scripts that handle deployments. This gets tricky with the database projects because of the options that are available to generate the change/publish script needed to update the database.
My last option, which is one I'm trying to avoid, is modifying the process template to allow me to control which projects get what build arguments. I've done this before, but I try to avoid this at all cost because of upgrade issues.
So I throw it to the masses and ask, has anyone run into this issue before or something similar? What are ways that you were able to overcome this? Any thoughts or suggestions you may have would be greatly appreciated!