I finally got a msbuild to execute and do a publish through the command line. Now I'm wondering how do I do that via teamcity?
When I run this command line it works!
C:\TFS\project\myProject\APIproject>msbuild apiproject.csproj /p:DeployOnBuild=true /p:PublishProfile="Properties\PublishProfiles\DEV.pubxml" /p:VisualStudioVersio n=14.0
However, I don't see a good solution in TeamCity to run this script.
See the documentation: add an 'MsBuild' build step and populate the fields appropriately. Your commandline translated to these fields: