Phi*_*ins 27 webdeploy asp.net-core-mvc asp.net-core
我是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***"
}
Run Code Online (Sandbox Code Playgroud)
San*_*ket 54
在Project.json的工具部分添加此 -
"tools": {
"BundlerMinifier.Core": "2.2.281",
....
Run Code Online (Sandbox Code Playgroud)
在保存Project.json时,VS2015会自动恢复包.
如果它不起作用,则右键单击项目并单击"还原包"选项.
如果这不起作用,请尝试使用dotnet restoreCLI命令进行恢复.
看看这是否有帮助.
Chr*_*oll 30
对于具有.csproj文件格式的Core rc3和VS2017 ,请添加
<DotNetCliToolReference Include="BundlerMinifier.Core" Version="2.6.375" />
Run Code Online (Sandbox Code Playgroud)
到具有其他其他<ItemGroup>设置的ItemGroup :
<Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk.Web">
...
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.0-msbuild3-final" />
<DotNetCliToolReference Include="BundlerMinifier.Core" Version="2.6.375" />
</ItemGroup>
</Project>
Run Code Online (Sandbox Code Playgroud)
但请查看https://www.nuget.org/packages/BundlerMinifier.Core获取最新版本号
| 归档时间: |
|
| 查看次数: |
12240 次 |
| 最近记录: |