.net-core自包含发布问题 [英] Problems with .net-core self contained publish
问题描述
我试图发布一个独立于.net-core的应用程序,按照 https://docs.microsoft.com/en-us/dotnet/articles/core/deploying/index 。
具有代码的存储库位于 https://github.com/fontanaricardo/httpecho
我执行命令:
$ dotnet build -r debian。 8-x64
$ dotnet publish -c Release -r debian.8-x64
$ docker build -t httpecho。
启动容器:
$ docker run -p 5000:5000 httpecho
错误:在依赖性清单中指定的程序集未找到 - package:'Microsoft.AspNetCore.Hosting.Abstracti
ons'版本:'1.1.0',路径:'lib / netstandard1.3 / Microsoft.AspNetCore.Hosting.Abstractions.dll'
我做错了?
更新
打开文件 http://www.ecurity.hk/http/http://cn/http://tv.http: c>运行时:{ 您的设备在您的自包含发布中尝试使用适当的distibute包(在我的工作良好)上有问题。尝试修复软件包 有没有 I`m trying to publish a self-contained app, made in .net-core, following the steps in https://docs.microsoft.com/en-us/dotnet/articles/core/deploying/index. The repository with the code is in https://github.com/fontanaricardo/httpecho I execute the commands: Starting the container: I'm doing something wrong? Open the file httpecho.deps.json, in publish folder, references the folder that not exists.
Your device have problem with proper distibute packages into your self contained publish (tried on my worked well). Try to fix packages by Is there 这篇关于.net-core自包含发布问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
lib / netstandard1.3 / Microsoft.AspNetCore.Http.Abstractions.dll:{}
}
dotnet restore
Microsoft.AspNetCore.Http.Abstractions
?如果没有尝试手动添加(和所有其他缺少* .dll的),然后尝试运行。如果它会运行没有错误将是正确的distibute包 debian.8-x64\publish
中的.dll
的问题$dotnet build -r debian.8-x64
$dotnet publish -c Release -r debian.8-x64
$docker build -t httpecho .
$ docker run -p 5000:5000 httpecho
Error: assembly specified in the dependencies manifest was not found -- package: 'Microsoft.AspNetCore.Hosting.Abstracti
ons', version: '1.1.0', path: 'lib/netstandard1.3/Microsoft.AspNetCore.Hosting.Abstractions.dll'
Update
"runtime": {
"lib/netstandard1.3/Microsoft.AspNetCore.Http.Abstractions.dll": {}
}
dotnet restore
Microsoft.AspNetCore.Http.Abstractions.dll
in debian.8-x64\publish
? If not try to add manually (and all other missing *.dll's) and then try to run. If it will run without errors will be problem with proper distibute packages