Hello @GuruGurra ,
Thank you for taking time to post this issue in Microsoft Q&A forum.
You can try to add following codes to your .XXproj file.(right-click your project > select Unload Project
> click your project and select Edit Project File
)
<ItemGroup>
<Content Update="XXXX\XXXX\XXXXX" Condition="'$(RuntimeIdentifier)'=='win-x64'">
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</Content>
</ItemGroup>
Replace XXXX\XXXX\XXXXX
and add the file path that you'd like(or not) to use(the json file).
The <Content>
tag represents files that are not compiled into the project, but may be embedded or published together with it.
You can select the RID that you want(or not) for publishing to PC or MAC, for example win-x64
for "Portable(.NET Core 2.0 or later versions)".
The <CopyToPublishDirectory>
tag helps to exclude the specified file when you publish your project.(It includes these values: Never, Always, PreserveNewest)
Hope this helps.
Sincerely,
Tianyu
- If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.