I have a Visual Studio solution that contains four projects:
1 Desktop app; 1 Windows Service; 2 Web API projects.
These projects have been migrated from VS2010 -> 2013 -> 2017. I've removed/edited as much legacy stuff as I recognise.
The solution builds fine in 2017.
I wish to only build one of the Web API projects, generate a deployment package, and publish the package as an artifact. A release definition is going to use WinRM to deploy the package on a Windows Server 2012 system running IIS.
In my build definition I have a MSBuild task.
The parameters of this task are as follows:
- Project is set to the path of my webAPI .csproj in TFS source control
- Platform is set to "AnyCPU" - ("Any CPU" doesn't work.. its a known (old) issue)
- Configuration is "Release"
- MSBuild arguments are:
/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation=$(Build.ArtifactStagingDirectory)\webapi.zip
- Clean is set to true
The build completes successfully, however the webapi.zip package that is produced contains a massive folder structure:
C:\agent2_work\27\a\webapi.zip\Content\C_C\agent2_work\27\s\MyProduct.WebApi\obj\release\Package\PackageTmp
Questions:
- Why is it packing this full path? (c:\agent2_work is my build agent's directory)
- How do I change it?