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

Copy static files to the project root folder using Nuget

$
0
0

I'm trying to copy some static files css, js etc to the project root folder when it got installed. but every time it just only copies all static files to the bin folder!

Here is .nupkg file:

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
  <metadata>
    <id>...</id>
    <dependencies>
      <group targetFramework=".NETCoreApp2.1">
        <dependency id="Microsoft.AspNetCore.App" version="2.1.5" exclude="Build,Analyzers" />
      </group>
    </dependencies>
    <contentFiles>
      <files include="any/any/wwwroot/styles/theme.css" buildAction="Content" copyToOutput="true" flatten="true" />
    </contentFiles>
  </metadata>
  <files>
    <file src="C:\Projects\Olive\Olive.Microservices.Hub\wwwroot\styles\theme.css" target="content\wwwroot\styles\theme.css" />
    <file src="C:\Projects\Olive\Olive.Microservices.Hub\wwwroot\styles\theme.css" target="contentFiles\any\any\wwwroot\styles\theme.css" />
  </files>
</package>

Why it only copy my css file (theme.css) in the bin folder?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



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