安装后无法加载文件或程序集

问题描述 投票:0回答:0

我遇到这个错误:

************** 异常文本 ************** System.IO.FileNotFoundException:无法加载文件或程序集 'Google.Apis.Core, Version=1.58.0.0, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab' 或其依赖项之一。这 系统找不到指定的文件。文件名:'Google.Apis.Core, 版本=1.58.0.0,文化=中性,PublicKeyToken=4b01fa6e34db77ab'
在 DataManager.Form2.Form2_Load(对象发送者,EventArgs e) System.Windows.Forms.Form.OnLoad(EventArgs e) 在 System.Windows.Forms.Form.OnCreateControl() 在 System.Windows.Forms.Control.CreateControl(布尔值 fIgnoreVisible)
在 System.Windows.Forms.Control.CreateControl() 处 System.Windows.Forms.Control.WmShowWindow(Message& m) 在 System.Windows.Forms.Control.WndProc(Message& m) 在 System.Windows.Forms.Form.WmShowWindow(Message& m) 在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd,Int32 消息, IntPtr wparam, IntPtr lparam)

WRN:程序集绑定日志记录已关闭。启用程序集绑定 失败记录,设置注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. 注意:有 是一些与程序集绑定失败相关的性能损失 记录。要关闭此功能,请删除注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog].

仅当我构建应用程序并使用安装向导安装它时才会发生此异常。 然后我收到另一个类似这样的错误,但带有“Google.Apis.Auth”。 我不知道它是否会导致此错误,但我在多个线程上加载程序。因此,有时 SQlite 没有时间打开与数据库的连接。所以我不知道它是否只是无法加载这些dll。

我也有一些这样的警告:

警告“Google.Apis.Core 上的显式绑定重定向, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab" 与 自动生成的绑定重定向。考虑将其从 应用程序配置文件或禁用自动生成的绑定 重定向。构建会将其替换为:“”。数据管理器

希望以后有人能帮我避免这个错误。 如果您需要更多信息,请告诉我! 谢谢!

c# visual-studio dependencies .net-assembly setup-wizard
© www.soinside.com 2019 - 2024. All rights reserved.