当前位置: 首页 > 工具软件 > AppUpdater > 使用案例 >

Appupdater 组件的一个问题.

方风华
2023-12-01
http://windowsforms.net/articles/appupdater.aspx

在进行应用时,总是提示*.resource.dll不能下载,分析代码也不知道到底什么地方出错。最后只能用偷懒的办法进行解决了。用到现在还没有出现问题。

在AppUpdater.cs类的OnAssemblyResolve方法中加入两行代码就可以了。
string  FilePath  =  Path.Combine(AppDomain.CurrentDomain.BaseDirectory, AssemblyName);

// ****新加入的代码
if (AssemblyName.ToLower().Replace( " .resources.dll " , "" ).Length  !=  AssemblyName.Length)
{
    
return   this .GetType().Assembly;
}
// 结束


如果谁知道正确的解决办法麻烦通知一声了。

转载于:https://www.cnblogs.com/rock_chen/archive/2005/08/08/210089.html

 类似资料: