Search code examples
tfsmsbuildtfsbuild

Problem with PublishProfile parameter for MSBuild on TFS Server


On a TFS 2018 server, I'm trying to set up automated build and deploy. The build is running fine, but I can't seem to get the publish/deploy to work (tried several methods). The application is a ASP.Net MVC website.

One approach is to use MSbuild parameters to choose a PublishProfile, but I get an error stating that the profile does not exists. Can't figure out why, cause to my understanding it does exist.

Anyone who'd made this work? Or have an easier approach for automated build and publish from TFS 2018 to a folder?


Solution

  • Changing the MSBuild arguments from

    /p:DeployOnBuild=True;PublishProfile="MyProfile"
    

    to

    /p:OutDir="\\path-to-some-folder"
    

    proved to be a workaround that worked for me. Now I can copy files from the output folder to my website(s).