gpt4 book ai didi

.net - Azure 上的 ASP.NET Core : Can not find assembly file dotnet-razor-tooling. exe

转载 作者:行者123 更新时间:2023-12-02 03:24:35 26 4
gpt4 key购买 nike

我在 ASP.NET Core 应用程序中找不到问题。在 azure 上部署后,它显示:内部服务器错误。异常(exception):

InvalidOperationException: Can not find assembly file dotnet-razor-tooling.exe at 'D:\home\site\wwwroot\refs,D:\home\site\wwwroot\'

项目.json:

{
"dependencies": {
"Microsoft.AspNet.WebApi.Client": "5.2.3",
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Mvc": "1.0.0",
"Microsoft.AspNetCore.Mvc.WebApiCompatShim": "1.0.0",
"Microsoft.AspNetCore.Razor": "1.0.0",
"Microsoft.AspNetCore.Razor.Tools": {
"version": "1.0.0-preview1-final",
"type": "build"
},
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.DependencyInjection": "1.0.0",
"Microsoft.Extensions.Logging": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"Microsoft.Net.Http.Server": "1.0.0-beta6",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0",
"NLog": "4.3.7",
"NLog.Extensions.Logging": "1.0.0-rtm-alpha4",
"NLog.Interface": "3.2.1",
"PostSharp": "4.3.15"
},

"tools": {
"Microsoft.AspNetCore.Razor.Tools": {
"version": "1.0.0-preview1-final",
"imports": "portable-net45+win8+dnxcore50"
},
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
"version": "1.0.0-preview1-final",
"imports": "portable-net45+win8+dnxcore50"
}
},

"frameworks": {
"net452": {
"dependencies": {
"JECodingTest.Business": {
"target": "project"
}
}
}
},

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

"publishOptions": {
"include": [
"wwwroot",
"Views",
"appsettings.json",
"web.config"
]
},

"scripts": {
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ],
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
}
}

尝试update Razor ,但 id 没有帮助我。有什么建议吗?

最佳答案

如果您使用旧版本的 Razor 工具包,则可能会出现此错误。在你的project.json ,你有:

"Microsoft.AspNetCore.Razor.Tools": {
"version": "1.0.0-preview1-final",
"type": "build"
},

latest version在撰写本文时是 1.0.0-preview2-final 。您可以通过编辑 project.json 来更新软件包直接文件,或使用 NuGet 包管理器 GUI(确保选择“包括预发布”)。

确保 dependencies 中的两者包引用部分和 tools 中的引用部分已更新。

关于.net - Azure 上的 ASP.NET Core : Can not find assembly file dotnet-razor-tooling. exe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38958005/

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