另一个 ClickOnce GAC 参考问题
我正在尝试部署更新,突然收到有关需要在 GAC 中安装 log4net.dll 版本 1.2.10.0 的消息。这是版本号 38,我将属性设置为 Copy Local = true,并将应用程序文件设置上的值设置为 Include。我什至放弃了,将log4net.dll注册到目标机器上的GAC中。有趣的是,这个更新在另外两台计算机上运行得很好。
我不确定自上次更新以来可能发生了什么变化?
欢呼
鲍勃
编辑:我在 log4net 的清单文件中找到了此条目。它不在我使用 log4net 的其他应用程序的任何其他清单文件中吗?然而,如果我尝试修改该文件,clickonce 就会知道并说安装已损坏。
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="log4net" version="1.2.10.0" publicKeyToken="692FBEA5521E1304" language="neutral" processorArchitecture="x86" />
</dependentAssembly>
I am trying to deploy an update and all of a sudden I am getting the message about log4net.dll version 1.2.10.0 needing to be installed in the GAC. This is version number 38 and I have property set to Copy Local = true, and set the value to Include on the Application Files setting. I even gave up and registered the log4net.dll into the GAC on the target machine. Funny thing is this update rolls out just fine on two other computers.
I am not sure what might have changed since the last update?
cheers
bob
edit: I found this entry in the manifest file for log4net. It is not in any of the other manifest files for other applications where I use log4net? Yet if I try to modify the file, clickonce knows and says the install is corrupted.
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="log4net" version="1.2.10.0" publicKeyToken="692FBEA5521E1304" language="neutral" processorArchitecture="x86" />
</dependentAssembly>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我最好的猜测是您对 log4net.dll 有两个依赖项。
On 直接来自您的项目,该项目已对其进行引用,其中一个是来自另一个库的隐式引用(通常是为 .net 1.1 编译的库,在我的例子中,它发生在 Crystal Reports 中)。我的猜测是这两个引用指向不同的版本。
但是GAC中的log4net将成为应用程序运行的先决条件,这意味着您需要安装.NET 1.1(或完整的2.0/3.5)。 350MB 的先决条件相当重...
工作。为了避免 ClickOnce 提示安装已损坏,您
需要使用 MAGE(清单编辑和
生成工具,通常可从“开始”菜单组获取
视觉工作室)。我不知道如果你的申请会发生什么
在运行时确实需要 log4net 但找不到它。
My best guess would be that you have two dependencies to log4net.dll.
On comes directly from your project, which has it referenced, and one is an implicit reference from another library (typically a library compiled for .net 1.1, in my case it happened with Crystal Reports). My guess is that this two references point to different versions.
But then log4net in the GAC will be a prerequisite for the application to run, which means you need to install .NET 1.1 (or 2.0/3.5 full). 350MB of prerequisite is quite heavy...
work. To avoid ClickOnce saying the installation is corrupted, you
need to resign the publication using MAGE (Manifest Editing and
Generation Tool, normally available from the Start Menu group from
Visual Studio). I don't know what will happen if your application
really needs log4net at run-time and cannot find it.