从.net Framework升级到.net标准时,无法加载文件或程序集或其依赖项之一

问题描述

我正在尝试将.NET框架库迁移到.NET Standard 2.0,但遇到了一些问题。

我依赖的nuget软件包之一是“ QlmLicenseLib”,我将其升级为“ QlmLicenseLibNetStd”。

运行使用该库的WPF应用程序时,出现以下异常:

System.IO.FileNotFoundException:'无法加载文件或程序集 'QlmLicenseLibNetStd,版本= 1.4.1.20279.1,文化=中性, PublicKeyToken = 9c65e32c060523a1'或其依赖项之一。的 系统找不到指定的文件。'

在异常的详细信息中,我发现了这一点:

=== Pre-bind state information ===
LOG: DisplayName = QlmLicenseLibNetStd,Version=14.1.20279.1,Culture=neutral,PublicKeyToken=9c65e32c060523a1
 (Fully-specified)
LOG: Appbase = file:///C:/..../bin/
LOG: Initial PrivatePath = NULL
Calling assembly : Test.QLM,Version=1.0.0.0,PublicKeyToken=15f4f676762c6252.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\....\bin\Sekal.Client.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: QlmLicenseLibNetStd,PublicKeyToken=9c65e32c060523a1
LOG: Attempting download of new URL file:///C:/..../bin/QlmLicenseLibNetStd.DLL.
LOG: Attempting download of new URL file:///C:/..../bin/QlmLicenseLibNetStd/QlmLicenseLibNetStd.DLL.
LOG: Attempting download of new URL file:///C:/..../bin/QlmLicenseLibNetStd.EXE.
LOG: Attempting download of new URL file:///C:/..../bin/QlmLicenseLibNetStd/QlmLicenseLibNetStd.EXE.

我在这里做错什么了吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)