I am trying to replace web.config with a production version.
I have a production version in ~\production\web.config(tilda as the root of my project folder).
I found this in a migration document
<ItemGroup>
<Content Include="Views\**\*" PackagePath="%(Identity)" />
<None Include="notes.txt" CopyToOutputDirectory="Always" />
<None Include="publishnotes.txt" CopyToPublishDirectory="Always" />
</ItemGroup>
I tried to use something like this
<ItemGroup>
<None Include="_production\web.config" CopyToPublishDirectory="Always" />
</ItemGroup>
but in this way the folder and file will be copied to the publication directory. it is a combination of mapping and publishing and, unfortunately, the documentation suffers from the lack of an example, so I tried to guess / understand it by combining the comparison example with the publication.
I tried this first:
<None Include="_production\web.config" CopyToPublishDirectory="Always" PackagePath="in/web.test"/>
so I expected to see the folder inin the publication directory, but didn’t.
I tried
<None Include="_production\web.config" CopyToPublishDirectory="Always" PublishPath="in/web.test"/>
but didn’t work.
you can find the migration document here