5

Am using Visual Studio Team Services (on visualstudio.com) with an on-premise build agent running VS2015. In our solution there are 3 websites with filesystem publish profiles to Dev, Test, Demo environments with config transforms applied.

These work fine when run from within VS2015 IDE locally. When attempting to publish the same profiles from a "Visual Studio Build" task in a build definition in Team Services online the following error is encountered:

This specific WebPublishMethod(FileSystem) is not yet supported on msbuild command line. Please use Visual Studio to publish.

Have set the following for the MSBuild Arguments on the task.

/p:DeployOnBuild=true /p:OutDir=$(build.artifactstagingdirectory) /p:PublishProfile=TestProfile

Having spent a few hour googling I cannot find a way to get the build task to get past the error.

What we are trying to do is have the websites deploy to a file location with config transforms applied for the appropriate environment. Cannot use Webdeploy or FTP, only filesystem deployment.

Is it possible to get filesystem publish profiles with config transforms to work from a on-premise build agent being directed from Team Services? Or do I need to tackle this in another way?

The suggested duplicate doesn't encounter the same issue or error message. In that question the publish profile works, just doesn't provide the files the op is expecting, this question is about the error as reported here.

briask
  • 413
  • 4
  • 15
  • Possible duplicate of [Using msbuild to execute a File System Publish Profile](http://stackoverflow.com/questions/16246562/using-msbuild-to-execute-a-file-system-publish-profile) – oPless Jul 20 '16 at 22:04
  • The suggested duplicate doesn't encounter the same issue or error message. In that question the publish profile works, just doesn't provide the files the op is expecting, this question is about the error as reported here. – briask Jul 21 '16 at 12:27
  • The linked issue is similar enough to provide a potential solution to the same problem. I also provided a possible answer that worked for me(tm). – oPless Jul 21 '16 at 23:50

3 Answers3

9

In my case publishUrl was not configured properly.

arif.khan.b
  • 311
  • 3
  • 8
0

`

\path\to\msbuild 
   /p:Configuration=Release 
   /p:DeployOnBuild=true 
   /p:PublishProfile=CI_RELEASE 
   /p:VisualStudioVersion=12.0
   optional.sln

Paths and formatting aside, the above works for me, I was previously getting publishing errors due to using the 'FileSystem' deployment method also.

I fixed this by using the the web publish update found here:

It does install a whole load of cruft associated with Azure, but it certainly appeared to fix the issue for me.

oPless
  • 618
  • 1
  • 8
  • 18
0

I was getting this exact same error. But in my case the culprit turn out to be that I was setting /p:OutDir="" (aka the empty string - doh!). Once I addressed this issue everything started working as intended. Just my 2c.

XDS
  • 3,786
  • 2
  • 36
  • 56