Home > Blockchain >  ASP.NET Core 3 publish single exe also include wwwroot
ASP.NET Core 3 publish single exe also include wwwroot

Time:01-08

Want to publish ASP.NET Core 3 project to single exe. How can i include/exclude wwwroot(js/css) to exe file?

Thanks!!

CodePudding user response:

If you want to publish project exclude some files ,you can add these code in xxx.csproj

    <ItemGroup>
        <Content Update="wwwroot/css/*" CopyToPublishDirectory="Never" />
    </ItemGroup>

    <ItemGroup>
        <Content Update="wwwroot/js/*" CopyToPublishDirectory="Never" />
    </ItemGroup>

Then js and css files are excluded.

  •  Tags:  
  • Related