Open KhalipskiSiarhei opened 7 years ago
Make sure to include
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
<Exec Command="dotnet bundle" />
</Target>
in your .csproj
file.
bundle doesn't seem to be a valid command.. tried it at sln and csproj
PS E:\dev\projects\pscm_wkspaces\array\Array.Pivotal.Frontend\src> cd .\Pivotal.Frontend.WebUI\ PS E:\dev\projects\pscm_wkspaces\array\Array.Pivotal.Frontend\src\Pivotal.Frontend.WebUI> dotnet bundle No executable found matching command "dotnet-bundle" PS E:\dev\projects\pscm_wkspaces\array\Array.Pivotal.Frontend\src\Pivotal.Frontend.WebUI>
@diegohb The "bundle" command is registered when you add the appropriate <DotNetCliToolReference />
element to your *.csproj file. See the following doc for more info: https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification#ad-hoc-execution-of-bundling-and-minification
Installed product versions
Description
BundleMinifier is not called for dotnet publish. As a result in publish package there are not created bundles according to configuration in bundleconfig.json.
Steps to recreate
Current behavior
In the publish package in wwwroot folder there are not created bundles. But if we build project in VS bundles do exist. It means that BundleMinifier is not called for dotnet publish
Expected behavior
Bundles should be generated for dotnet publish command as well and it should be allowed to configure binding (After Build, Before Build) for publish workflow.