我正在使用 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.0
和System.Xml.XPath v4.3.0
nuget 包。
我怀疑lib/netstandard1.3
错误消息中对路径的引用有线索,但我没有足够的经验来解释它试图告诉我的内容。
有人有想法么?是否有任何其他信息有助于诊断此错误?