gpt4 book ai didi

asp.net-core - 在 ASP.NET Core 的 WebDeploy 期间找不到匹配命令 "dotnet-bundle"的可执行文件

转载 作者:行者123 更新时间:2023-12-03 10:06:44 25 4
gpt4 key购买 nike

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

找不到与命令“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***"
}

最佳答案

工具 节项目.json 加上这个——

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

在保存 Project.json 时,VS2015 会自动恢复包。

如果它不起作用,则右键单击项目并单击“恢复包”选项。

如果这不起作用,请尝试使用 dotnet restore 恢复CLI 命令。

看看这是否有帮助。

关于asp.net-core - 在 ASP.NET Core 的 WebDeploy 期间找不到匹配命令 "dotnet-bundle"的可执行文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40067911/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com