Skip to content

Instantly share code, notes, and snippets.

@jonathanduke
Created April 24, 2025 20:00
Show Gist options
  • Select an option

  • Save jonathanduke/ad18a7474964f640568687976acdc7d0 to your computer and use it in GitHub Desktop.

Select an option

Save jonathanduke/ad18a7474964f640568687976acdc7d0 to your computer and use it in GitHub Desktop.
<Project>
<!--
Look in an external deployment folder (intended for build secrets) with the same name as the solution folder
for any appsettings.json files where the environment name matches the publish profile. Include them as links
under each .pubxml file so that they can be easily edited and accessed outside of the current repository.
-->
<ItemGroup>
<None Include="..\..\Deployment\$([System.IO.Path]::GetFileName($(SolutionDir.TrimEnd('\\'))))\appsettings.*.json">
<Link>Properties\PublishProfiles\%(Filename)%(Extension)</Link>
<DependentUpon>$([System.String]::Copy('%(Filename)').Split('.')[1]).pubxml</DependentUpon>
</None>
</ItemGroup>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment