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.
"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.
You can pass /p:PublishUrl="newpath" to the msbuild command. You would also see this set in the csproj file which you can change.
In my case publishUrl was not configured properly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With