The dotnet bundle command completed with code 1 - VS 2017. Publishing an ASP.NET Core Web API

I get the following error when trying to publish my web API on the server:

The "dotnet bundle" command exited with code 1

This is the publish screen: enter image description here

This is an output error:

enter image description here

Can anybody help me?

+4
source share
2 answers

Make sure you add the DotNetCliToolReference to your WebApi project. I assume the VS2017 csproj file.

  <ItemGroup>
    <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.0" />
    <DotNetCliToolReference Include="BundlerMinifier.Core" Version="2.2.281" />
  </ItemGroup>

The second entry in the code is above.

+7
source

Method 01

.csproj right_click > , " projectnam.csproj"

  <Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
    <Exec Command="bower install" />
    <Exec Command="dotnet bundle" />
</Target>

02

NodeJS .

npm install -g bower 

npm install -g gulp
0

Source: https://habr.com/ru/post/1675791/


All Articles