将.NET Core应用程序部署到Server 2012的依赖性问题

时间:2018-09-27 14:32:19

标签: c# .net .net-assembly assembly-loading

我正在使用Microsoft.AspNetCore.All 2.1.4在C#,Visual Studio 15.8.4中开发Web应用程序。我正在尝试在Windows Server 2012上进行部署。我在服务器端遇到以下错误:

PS C:\inetpub\wwwroot\CustomsInvoice> dotnet .\CustomsInvoice.dll
Error:
  An assembly specified in the application dependencies manifest 
(CustomsInvoice.deps.json) was not found:
    package: 'System.Xml.XPath.XmlDocument', version: '4.3.0'
    path: 'lib/netstandard1.3/System.Xml.XPath.XmlDocument.dll'

我安装了以下SDK和运行时:

PS C:\inetpub\wwwroot\CustomsInvoice> dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.1.400
 Commit:    8642e60a0f

Runtime Environment:
 OS Name:     Windows
 OS Version:  6.2.9200
 OS Platform: Windows
 RID:         win8-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.400\

Host (useful for support):
  Version: 2.1.4
  Commit:  85255dde3e

.NET Core SDKs installed:
  2.1.400 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.
  Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.
  Microsoft.AspNetCore.All 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.
  Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.
  Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.
  Microsoft.AspNetCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.
  Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

我在项目中包含了System.Xml.XPath.XmlDocument v4.3.0System.Xml.XPath v4.3.0 nuget软件包。

我怀疑错误消息中对lib/netstandard1.3路径的引用中有一个线索,但是我没有足够的经验来解释它试图告诉我什么。

有人有什么想法吗?其他任何信息对诊断此错误有帮助吗?

0 个答案:

没有答案