Replies: 1 comment
-
I'm far from being a NuGet expert, but I think the key to deploying content files in NuGet packages is to include them in both <package>
<metadata>
<!-- ... other metadata ... -->
<contentFiles>
<files include="**/*" />
</contentFiles>
</metadata>
<files>
<!-- For traditional .NET Framework projects -->
<file src="your\source\*.css" target="content\Content" />
<file src="your\source\*.js" target="content\Scripts" />
<!-- For modern SDK-style projects -->
<file src="your\source\*.css" target="contentFiles\any\any\css" />
<file src="your\source\*.js" target="contentFiles\any\any\js" />
</files>
</package> You can find the Bootstrap |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm a little embarrassed to throw this question out in this forum because it doesn't feel like the correct spot but I'm finding very little information elsewhere. I'm trying to create a NuGet package and have no trouble getting it to include and install compiled dlls. But for the life of me, cannot figure out how to include and install content like scss, css, js, etc. I thought referencing bootstrap's nupkg and nuspec file may shed some light but I'm out of luck.
Can you share any insight on what the nuspec file looks like for https://www.nuget.org/packages/bootstrap/ that seemingly effortlessly deploys css and js files upon installation? I can certainly get my source files included in my nupkg but they do not show up when installing the package.
Beta Was this translation helpful? Give feedback.
All reactions