无法使用命令行'dotnet.\ myapi.dll'启动进程,ErrorCode ='0x80004005:80008096 [英] failed to start process with commandline 'dotnet .\myapi.dll', ErrorCode = '0x80004005 : 80008096
问题描述
我在此处问了一个问题关于如何确保构建中包含正确版本的dotnet.
I asked a question here on how to ensure the correct version of dotnet is included in the build.
我想知道该版本是否仍未部署. 我要在已部署的文件中寻找什么来说明?
How I am wondering whether the version is still not getting deployed. What would I be looking for in the deployed files to tell?
部署中确实包含以下文件
Deployment does include the following files
52,816 dotnet-aspnet-codegenerator-design.dll 689584 Microsoft.CodeAnalysis.CSharp.Workspaces.dll 2,624,944 Microsoft.CodeAnalysis.Workspaces.dll 23,632 Microsoft.VisualStudio.Web.CodeGeneration.Contracts.dll 73,296 Microsoft.VisualStudio.Web.CodeGeneration.Core.dll 35,408 Microsoft.VisualStudio.Web.CodeGeneration.dll 69,200 Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore.dll 28,752 Microsoft.VisualStudio.Web.CodeGeneration.Templating.dll 34,896 Microsoft.VisualStudio.Web.CodeGeneration.Utils.dll 157,776 Microsoft.VisualStudio.Web.CodeGenerators.Mvc.dll
52,816 dotnet-aspnet-codegenerator-design.dll 689,584 Microsoft.CodeAnalysis.CSharp.Workspaces.dll 2,624,944 Microsoft.CodeAnalysis.Workspaces.dll 23,632 Microsoft.VisualStudio.Web.CodeGeneration.Contracts.dll 73,296 Microsoft.VisualStudio.Web.CodeGeneration.Core.dll 35,408 Microsoft.VisualStudio.Web.CodeGeneration.dll 69,200 Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore.dll 28,752 Microsoft.VisualStudio.Web.CodeGeneration.Templating.dll 34,896 Microsoft.VisualStudio.Web.CodeGeneration.Utils.dll 157,776 Microsoft.VisualStudio.Web.CodeGenerators.Mvc.dll
当我登录到计算机时,将在上面部署代码并键入
When I login to the machine the code is deployed on and type
dotnet .\myapi.dll
错误是
It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '2.1.5' was not found.
- Check application dependencies and target a framework version installed at:
C:\Program Files\dotnet\
- Installing .NET Core prerequisites might help resolve this problem:
http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from:
https://aka.ms/dotnet-download
浏览网站的网址会给出
HTTP Error 502.5 - Process Failure
Common causes of this issue:
The application process failed to start
The application process started but then stopped
The application process started but failed to listen on the configured port
Troubleshooting steps:
Check the system event log for error messages
Enable logging the application process' stdout messages
Attach a debugger to the application process and inspect
For more information visit: https://go.microsoft.com/fwlink/?LinkID=808681
事件日志显示
failed to start process with commandline 'dotnet .\myapi.dll', ErrorCode = '0x80004005 : 80008096.
如何确保已部署dotnet?
How do I ensure dotnet is deployed?
[更新]
我看到c:\ program files \ dotnet.exe是版本2.1.26919.1
I see that c:\program files\dotnet.exe is version 2.1.26919.1
但是我已经安装了.Net Core Runtime 2.1.5(x64) 我可以说它已安装,因为当我重新运行安装程序时,它会询问我是否要修复或卸载.
However I have installed .Net Core Runtime 2.1.5 (x64) I can tell that it is installed because when I re-run the installer it asks whether I want to repair or uninstall.
我想因为api在IIS下运行,所以不需要dotnet.exe吗?
I suppose that since the api is running under IIS it does not need dotnet.exe ?
计算机正在运行Windows 2012 Server R2
The machine is running Windows 2012 Server R2
推荐答案
我跑步时
dotnet运行.\ myapi.dll
dotnet run .\myapi.dll
我知道了
Did you mean to run dotnet SDK commands?
Please install dotnet SDK from: go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
当我转到URL时,它安装了SDK 2.1.403
when I went to the URL it installed SDK 2.1.403
有效.
这篇关于无法使用命令行'dotnet.\ myapi.dll'启动进程,ErrorCode ='0x80004005:80008096的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!