Created
September 7, 2021 09:38
-
-
Save AlexVallat/b78423954405ce461ed2717dce97c9c5 to your computer and use it in GitHub Desktop.
Publish only the appsettings.environment.json for the publish profile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ItemGroup Condition="'$(WebPublishProfileFile)' != ''"> | |
<!-- When publishing, publish only the app settings that match the profile being published --> | |
<Content Update="appsettings.*.json" CopyToPublishDirectory="Never" /> | |
<Content Update="appsettings.$([System.IO.Path]::GetFileNameWithoutExtension('$(WebPublishProfileFile)')).json" CopyToPublishDirectory="Always" /> | |
</ItemGroup> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment