Im getting this error on Team Services release. I suspected that this error occours because im generating a zipped artifact.
The MSBuild configuration:
/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactstagingdirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"
Then in my Release im trying to replace the appsettings.json
variables:
So the artifact is a zip file and problably because this the release management is not finding the appsettings.json file. But what is the way to deal with it? Build an artifact not zipped?
You should use JSONPath expressions to specify variable(s) you want to substitute for Json variable substitution option.
Detail usage of JSON variable substitution as below:
This worked for me:
The json file is buried down in a long deep path based on the location of the agent and how MSBuild packages it up...it's not at the "root".
For example, my json file was in this folder within the WebApp.zip file: