问题描述
当我尝试部署控制台核心应用程序时,出现错误:
When I try to deploy the console core app, I'm getting the error:
错误:找不到依赖项清单中指定的程序集-程序包:'microsoft.aspnetcore.hosting.abstractions',版本:'1.0.0',路径:'lib/netstandard1.3/Microsoft.AspNetCore.Hosting .Abstractions.dll'
Error: assembly specified in the dependencies manifest was not found -- package: 'microsoft.aspnetcore.hosting.abstractions', version: '1.0.0', path: 'lib/netstandard1.3/Microsoft.AspNetCore.Hosting.Abstractions.dll'
我可以看到在lib/netstandard1.3/Microsoft.AspNetCore.Hosting.Abstractions.dll中存在Microsoft.AspNetCore.Hosting.Abstractions.dll.有没有办法走这条路?
I can see that Microsoft.AspNetCore.Hosting.Abstractions.dll exists in lib/netstandard1.3/Microsoft.AspNetCore.Hosting.Abstractions.dll. Is there a way to get the path?
推荐答案
如果我们使用的是TFS 2013,则解决方法是创建一个文件夹并在该文件夹中添加所有必需的nuget程序包.
If we are using TFS 2013, then the work around was to create a folder and add all the nuget packages required in the folder.
将该文件夹复制到必须部署该文件夹的服务器,然后复制项目的所有dll.
Copy that folder to the server where it has to be deployed and copy all the dlls of the project.
还要在以下变量中更改.runtimeconfig.dev.json文件中的路径.
Also change the path in .runtimeconfig.dev.json file in the below variable.
"additionalProbingPaths": [
"<nugetfolderpath>"
]
请确保在路径中使用两个正斜杠.例如:C:\ ProjectName \ NugetFolder
Make sure to use two forward slashes in the path. ex: C:\ProjectName\NugetFolder
这篇关于错误:找不到依赖清单中指定的程序集.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!