I'm trying to setup a build server using Jenkins (on Windows Server 2012) that will be responsible for building (with config transform) and packaging (zip file) ASP.NET MVC/Web API projects, then moving them to designated location (C:/Published).
Basically, I need the Visual Studio Web Publish for File System via command line without having to install Visual Studio. The zipping process can be deferred to the command line via Jenkins.
From searching, the following steps is what I've done so far:
Step 6 is what's stumping me. I've tried numerous suggestions online, but can't figure out how to get the full effect of Visual Studio's publish command.
One suggestion was to use a publish profile properties as parameters:
/p:WebPublishMethod=FileSystem
/p:LastUsedBuildConfiguration=Release
/p:LastUsedPlatform=AnyCPU
/p:ExcludeApp_Data=False
/p:publishUrl=C:\Published\
/p:DeleteExistingFiles=True
But that dosen't move any files over to c:\Published\
.
For that, select Manage Jenkins and Click on Manage Plugins. Select the Team Foundation Server Plug-in and VS Team services Continuous Deployment Plugin. Also, we need MS Build Plugin the same as the below screen. From the Source code management tab, will set the source team Foundation Version Control (TFVC).
I needed to copy the files in C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web
from my dev box to the same location on the build server, then the properties worked fine.
In addition to the steps I outlined above, below are the extra steps I had to do to get this working:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web
from my dev machine to the same location on the build server[Environment]::SetEnvironmentVariable("EnableNuGetPackageRestore", "true.", "Machine")
in PowershellIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With