Enabling CI for .net core using TFS Build
At the moment there is no easy way to implement CI for .net core projects. Ideally it should be published and deployed to individual instances of nano servers, but that might be something beyond the capability of TFS Build.
Should you wish to implement CI for .net core projects on TFS 2015, here are the build steps and scripts that you need.
- Step 1: Install .net core
Download https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-install-script and either place it inside TFS or else in a central location. This will install and setup the .net Core CLI Runtime for the service account that is used by the build servers
- Step 2: Run dotnet restore and dotnet publish
Download and modify the powershell script found at http://pastebin.com/yyjbGDW9. It assumes that each folder is an individual .net core project that needs to be published. Modify accordingly to your environment
- Step 3: Deploy to the servers
You can find the script I use at http://pastebin.com/8jBHz3Zf. Important thing to note is that you need to first stop IIS on the target server before copying the files over as running net core on IIS locks the dll files