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

Missing static file from nuget package on install

$
0
0

I am trying to include a global configuration file in my nuget package. This is what I have so far:

In my csproj I have the following:

<ItemGroup><Content Include="appsettings.infrastructure.json"><Pack>true</Pack><PackagePath>contentFiles;content</PackagePath><IncludeInPackage>true</IncludeInPackage><CopyToOutput>true</CopyToOutput><BuildAction>Content</BuildAction><copyToOutput>true</copyToOutput><CopyToOutputDirectory>Always</CopyToOutputDirectory><CopyToPublishDirectory>Always</CopyToPublishDirectory></Content></ItemGroup>

If I publish the package locally and unzip it I can see the file exists under contentFile folder.

The problem appears after I install my nuget package in a project. If I check bin/debug/netcoreapp3.1 I expected to see appsettings.infrastructure.json there but it is not there.

I have also tryed to do a file system search in the project folder but there does not seem to be any appsettings.infrastructure.json file saved anywhere.

Does anyone know what I can do to get this file in the bin/Debug/netcoreapp3.1 from a nuget package?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



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