Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebPublishMethod(FileSystem) is not yet supported on msbuild command line

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.

like image 871
briask Avatar asked Jul 20 '16 17:07

briask


People also ask

What is WebPublishMethod?

"WebPublishMethod" ensures we are just creating a deployment package. There are other options like publishing to the file system or elsewhere using MSDeploy. "PackageAsSingleFile" will zip up the output into a single file. "PackageLocation" is where the zip will be saved.

How do I publish with Msbuild?

You can pass /p:PublishUrl="newpath" to the msbuild command. You would also see this set in the csproj file which you can change.


1 Answers

In my case publishUrl was not configured properly.

like image 186
arif.khan.b Avatar answered Oct 09 '22 16:10

arif.khan.b