Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Including content in a package

$
0
0

I am trying to make sense of the nuget documentation. So I tried a naive:

<ItemGroup><Content Include="Data\Dict\*.json"><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory><PackageCopyToOutput>true</PackageCopyToOutput><Pack>true</Pack><PackagePath>contentFiles\any\any\</PackagePath></Content></ItemGroup>

At least on my system it seems that *.json files are being copied into a subfolder Data\Dict. For example:

<snip>\bin\Debug\net7.0\Data\Dict\Dict1.json

But if I inspect the nupkg (7zip) I see that the *.json files are now located directly under the folder:

<snip>.nupkg\contentFiles\any\any\Dict1.json

This makes loading/searching of those *.json files cumbersome. Is there a more natural way to include *.json files in C# and nupkg?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>