Appupdater 组件的一个问题.

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;
}
//结束


如果谁知道正确的解决办法麻烦通知一声了。
posted @ 2005-08-08 16:35  I'm CY  阅读(546)  评论(1编辑  收藏  举报