从 Blazor WebAssembly 创建了一个 Nuget 包,但内容文件错误 404,在使用它的项目中

问题描述 投票:0回答:0

我从我的 WebAssembly 项目创建了一个 Nuget 包,安装后运行良好,但对于其内容文件来说,这是 .nuspec 文件:

<?xml version="1.0"?>
<package  xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
  <metadata>
    <id>Client1Package</id>
    <version>1.2.16</version>    
    <title>Client1</title>
    <description>Desc</description>
    <authors>mz</authors>
    <owners>me</owners>   
    <requireLicenseAcceptance>false</requireLicenseAcceptance>    
    <releaseNotes>notes</releaseNotes>
    <copyright></copyright>
    <tags></tags>
    <dependencies>
      <dependency id="Microsoft.AspNetCore.Components.Web" version="8.0.0" />
      <dependency id="NuGet.Build.Tasks.Pack" version="6.8.0" />
      <dependency id="Microsoft.AspNetCore.Components.WebAssembly" version="8.0.0" />
      <dependency id="Microsoft.AspNetCore.Components.WebAssembly.DevServer" version="8.0.0" />
      <dependency id="MudBlazor" version="6.12.0" />    
    </dependencies>
    <summary></summary>
    <contentFiles>     
      <files include="wwwroot/css/*.css" buildAction="None" copyToOutput="true" />

    </contentFiles>
  </metadata>
  <files>
    <file src="bin\Release\net8.0\Client1.dll" target="lib\net8.0" />   
    <file src="wwwroot\css\*.css" target="content\css" /> <!-- this also is not working in the main project <link href="content/css/app.css" rel="stylesheet" /> -->
  </files>
</package>

我需要 wwwroo 中的 app.css

asp.net-core blazor nuget blazor-webassembly nuspec
© www.soinside.com 2019 - 2024. All rights reserved.