Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NO JSON file matched with specific pattern: appsettings.json

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:

replace file

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?

like image 371
gog Avatar asked Jan 24 '26 11:01

gog


1 Answers

This worked for me:

**/appsettings.json

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:

WebApp.zip\Content\C_C\Build\Agent\agent_work\3\s\CrmsAngularPOC\obj\Release\netcoreapp1.1\PubTmp\Out

like image 196
mobese46 Avatar answered Jan 26 '26 23:01

mobese46



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!