Reputation: 3593
I have a solution that contains a number of projects. Some MVC Web Applications, Some Class Libraries and some Console Applications.
For the Web Applications we simply used Publish Profiles and created TFS Builds referring to those profiles for building deployment packages. We then used those to deploy the web apps.
How can I configure the Build Definition to give me the same results for my console applications?
The desired result here is to try and work towards automatic deployments using TFS and Release Management.
Update:
Ok, It seems I need to explain myself better.
We use TFS (MSBuild) to build the project. By simply "checking in" the code, it triggers our build which builds the project and creates a nice Website_Package.zip file in the drop folder.
What I am looking for, is for MSBuild to do the same for my Console Application. ie. I want it to produce a "ConsoleApp_Package.zip" file and dump it into my drop folder.
Upvotes: 2
Views: 3209
Reputation: 389
You should just build, using MSBuild task, filling the Project with your console app .csproj and leave MSBuild Arguments empty. Then you use a Copy Files task to get your files from bin folder to staging directory.
Example:
Source Folder: \bin\$(BuildConfiguration)
Contents: **
Target Folder: $(Build.ArtifactStagingDirectory)
After that you can add task to zip the files from staging directory.
Upvotes: 0
Reputation: 8343
You can use the Zip task from MSBuild Extension Pack at http://msbuildextensionpack.codeplex.com/. See http://www.msbuildextensionpack.com/help/4.0.8.0/index.html for an example.
Upvotes: 1