我正在尝试将一些静态文件css
,js
等在安装后复制到项目根文件夹。但每次仅将所有静态文件复制到bin
文件夹中!
这是.nupkg
文件:
<?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>
为什么只将我的CSS文件(theme.css)复制到 bin 文件夹中?