找不到与命令"dotnet-bundle"匹配的可执行文件.在WebDeploy for ASP.NET Core中 [英] No executable found matching command "dotnet-bundle" during WebDeploy for ASP.NET Core

查看:113
本文介绍了找不到与命令"dotnet-bundle"匹配的可执行文件.在WebDeploy for ASP.NET Core中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是ASP.NET的新手,我正在尝试发布Web应用程序.我曾尝试与2个不同的主机进行Web部署,但仍会收到以下错误消息:-

I am new to ASP.NET and I am trying to publish a web app. I have tried with 2 different hosts to do a web deploy but keep receving the error:-

找不到与命令"dotnet-bundle"匹配的可执行文件

No executable found matching command "dotnet-bundle"

这和什么有关?

Project.Json

{
"dependencies": {
"Bitly.Net": "0.0.6",
"BitlyAPI": "1.0.3",
"BundlerMinifier.Core": "2.2.281",
"Common.Logging": "3.4.0-Beta2",
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Mvc": "1.0.1",
"Microsoft.AspNetCore.Razor.Tools": {
  "version": "1.0.0-preview2-final",
  "type": "build"
},
"Microsoft.AspNetCore.Routing": "1.0.1",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Logging": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0",
"Parse": "1.7.0",
"Spring.Social.Twitter": "2.0.0-M1",
"Stormpath.AspNetCore": "0.7.0"
},

"tools": {
"Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
},

"frameworks": {
"net46": {
  "frameworkAssemblies": {
  }
}
},

"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},

"publishOptions": {
"include": [
  "wwwroot",
  "**/*.cshtml",
  "appsettings.json",
  "web.config"
]
},

"scripts": {
"prepublish": [ "bower install", "dotnet bundle" ],
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
},
"userSecretsId": "aspnet-ParseAppDashboard-20161008081***"
}

推荐答案

Project.json 工具部分中添加此

  "tools": {
    "BundlerMinifier.Core": "2.2.281",
    ....

保存Project.json时,VS2015自动还原软件包.

On saving Project.json, VS2015 automatically restore packages.

如果不起作用,请右键单击项目,然后单击还原软件包"选项.

If it doesn't worked then right click on project and click on Restore Packages option.

如果这不起作用,请尝试使用dotnet restore CLI命令进行还原.

If this doesn't worked then try restoring using dotnet restore CLI command.

看看这是否有帮助.

这篇关于找不到与命令"dotnet-bundle"匹配的可执行文件.在WebDeploy for ASP.NET Core中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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