I don't have Visual Studio on the build server. After migrating from DNX (RC1) to .NET Core CLI (RC2) my build on TeamCity broke.
After making sure I had copied the MSBuild targets from my PC to the build server:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet
I'm able to build the solution.
The problem is: I can't publish it!
When I run: MSBuild.exe Solution.sln /p:DeployOnBuild=true /p:publishprofile=local
it will fail with:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Publishing.targets(406,5): error : An error occurred during publish. [d:\path\project.xproj] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Publishing.targets(406,5): error : Cannot bind argument to parameter 'Path' because it is an empty string. [d:\path\project.xproj]
I've re-created the publish profiles with Visual Studio (the powershell script generated is different than the one with the RC1)
The publish works fine locally, where I have Visual Studio installed.
The question is:
What do I need to add to the build server, to be able to run MSBuild with /p:DeployOnBuild=true /p:publishprofile=
without having to install Visual Studio.
Thanks