The command "dotnet bundle" exited with code 1
命令“dotnet bundle”退出代码1。
I am getting above error while publishing the .net core 1.1 app in VS 2017.
在VS 2017年发布。net core 1.1应用时,我犯了以上错误。
I suspect the issue to be related to tool sections which are missing in cs.proj file in VS 2017.
我怀疑这个问题与cs中缺少的工具部分有关。proj文件在VS 2017。
"tools": {
"BundlerMinifier.Core": "2.2.281"
In VS 2015 it used to be done as above as in the below link. No executable found matching command "dotnet-bundle" during WebDeploy for ASP.NET Core
在VS 2015年,它曾经被做如上在下面的链接。在ASP的WebDeploy过程中,没有找到匹配的命令“dotnet-bundle”。网络核心
How to add tool section in csproj file in VS 2017 for .net core 1.1 app?
如何为。net core 1.1应用在csproj文件中添加工具部分?
2 个解决方案
#1
1
The project.json to csproj mapping docs are your friend! Here's how the tools
section maps over:
该项目。json到csproj映射文档是您的朋友!以下是工具部分的映射方式:
{
"tools": {
"BundlerMinifier.Core": "2.2.281"
}
}
becomes
就变成了
<ItemGroup>
<DotNetCliToolReference Include="BundlerMinifier.Core" Version="2.2.281" />
</ItemGroup>
#2
0
It should be fairly obvious when you look at your .csproj file how it's structured. But just incase.
当您查看.csproj文件的结构时,应该会非常明显。只是装进箱。
<Project>
...Other stuff here
<ItemGroup>
<DotNetCliToolReference Include="Your.Package.Name.Here" Version="x.x.x" />
</ItemGroup>
...Other stuff here
</Project>
#1
1
The project.json to csproj mapping docs are your friend! Here's how the tools
section maps over:
该项目。json到csproj映射文档是您的朋友!以下是工具部分的映射方式:
{
"tools": {
"BundlerMinifier.Core": "2.2.281"
}
}
becomes
就变成了
<ItemGroup>
<DotNetCliToolReference Include="BundlerMinifier.Core" Version="2.2.281" />
</ItemGroup>
#2
0
It should be fairly obvious when you look at your .csproj file how it's structured. But just incase.
当您查看.csproj文件的结构时,应该会非常明显。只是装进箱。
<Project>
...Other stuff here
<ItemGroup>
<DotNetCliToolReference Include="Your.Package.Name.Here" Version="x.x.x" />
</ItemGroup>
...Other stuff here
</Project>