I create a NuGet package with all components that I need to reuse in some project. In the project with components I have some .less
and .js
files. I need to copy these files in wwwroot
of my projects when I install my NuGet package. I tried with contentFiles
and files
tags but nothing works:
<contentFiles><files include="**/wwwroot/**" buildAction="Content" copyToOutput="true" /></contentFiles>
Or with files:
<files> <file src="contentFiles\**" target="contentFiles" /> <file src="wwwroot\**" target="wwwroot" /><file src="**\wwwroot\**" target="wwwroot" /> </files>
There is some tries. Nothing works. Is possible to do what I want?
These files don't even appear in the final build. .less
file must be copied in project because they have an import
of a base file with constants which could change in different projects. .js
files can also appear only in the compiled.
With NuGet Package Explorer I tried to create contentFolder
similar to this example https://stackoverflow.com/a/52418304/5731129. I created subfolders and add an image, bbut after installation the file was not copied.