命令“ dotnet bundle”被指定为“ dotnet bundle”。代码1退出-VS 2017发布ASP.NET Core Web API [英] The command "dotnet bundle" exited with code 1 - VS 2017 Publish ASP.NET Core Web API

查看:110
本文介绍了命令“ dotnet bundle”被指定为“ dotnet bundle”。代码1退出-VS 2017发布ASP.NET Core Web API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试将Web API发布到服务器时出现以下错误:

I'm getting the following error when trying to publish my Web API to a server:

命令 dotnet bundle以代码1退出

这是发布屏幕:

This is the publish screen:

这是输出错误:

有人可以帮助我吗?

推荐答案

请确保已在WebApi项目中添加了DotNetCliToolReference。我假设使用VS2017 csproj文件。

Make sure you have added the DotNetCliToolReference in your WebApi project. I'm assuming 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 above.

这篇关于命令“ dotnet bundle”被指定为“ dotnet bundle”。代码1退出-VS 2017发布ASP.NET Core Web API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆