0
votes

I would like to build packages on a jenkins server without Visual Studio installed there. I was able to copy MSBuild.Community.Tasks.targets locally and run these task but cannot run TransformWebConfig even after copying tasks and targets from C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web. What do I need to do to run a web.config transforms on a server with msbuild installed but without VS2012 installed?

i.e. this path resolves locally for me: "$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets" but does not resolve on the server.

I would prefer to just drop in a couple files into my enlistment and reference them from there.

1

1 Answers

1
votes

Take a look at SlowCheetah nuget package - it provides you all necessary tasks and targets to transform any configs during build process. You can transform configs based on configuration names (it's the same way as Web.Config transformation works) or small modification to nuget's target file allow you to run custom prefixed transformations.