- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
使用 WIX,并尝试安装两个相同的程序集,一个用于 .Net35,另一个用于 .Net40。我正在使用两个单独的组件,但是 WIX 阻止了项目编译。
<Directory Id="GAC40" Name="GAC">
<Component Id="MyDllServicesModuleGac40Component" Guid="307675AA-8AEC-473B-A78A-FB362CCEDE2A" Win64="yes">
<File Id="MyDllNet40DllGac" Name="MyDll.dll" KeyPath="yes" Assembly=".net" Source="..\MyDll\bin\Net40\MyDll.dll" />
</Component>
</Directory>
<Directory Id="GAC35" Name="GAC">
<Component Id="MyDllServicesModuleGac35Component" Guid="47E6BD1B-25CD-466D-945E-06DCF0F2A269" Win64="yes">
<File Id="MyDllNet35DllGac" Name="MyDll.dll" KeyPath="yes" Assembly=".net" Source="..\MyDll\bin\Net35\MyDll.dll" />
</Component>
</Directory>
我收到的错误是:
Error 29 ICE30: The target file 'MyDll.dll' is installed in '[TARGETDIR]\GAC\' by two different components on an SFN system: 'MyDllServicesModuleGac40Component.DDD7D974_FE9C_4BA3_BDD3_A1A3A23F8057' and 'MyDllServicesModuleGac35Component.DDD7D974_FE9C_4BA3_BDD3_A1A3A23F8057'. This breaks component reference counting. D:\PROJECTS\MyDll.Experimental.3.0.0\Project\MyDll\MyDll.Wix.Services\MergeModule.wxs 34 1 MyDll.Wix.Services
安装程序应该能够检测到 .Net35 dll 安装到 GAC 的 C:\Windows\assembly,而 .Net40 dll 安装到 GAC 的 C:\Windows\Microsoft.NET\assembly。
重命名 DLL 不是一种选择。
谢谢!
更新
我在发布后自然想出了一个解决方案,似乎将组件包装在其他元素中让我可以让它工作。后来我阅读了 Tom Blodget 的帖子,所以这是正确的。
<Directory Id="GAC1" Name="GAC">
<Directory Id="GAC40" Name="GAC">
<Component Id="MyDllServicesModuleGac40Component" Guid="307675AA-8AEC-473B-A78A-FB362CCEDE2A" Win64="yes">
<File Id="MyDllNet40DllGac" Name="MyDll.dll" KeyPath="yes" Assembly=".net" Source="..\MyDll\bin\Net40\MyDll.dll" />
</Component>
</Directory>
</Directory>
<Directory Id="GAC2">
<Directory Id="GAC35" Name="GAC">
<Component Id="MyDllServicesModuleGac35Component" Guid="FD74504A-6FE9-488E-9086-9DAD3024B35D" Win64="yes">
<File Id="MyDllNet35DllGac" Name="MyDll.dll" KeyPath="yes" Assembly=".net" Source="..\MyDll\bin\Net35\MyDll.dll" />
</Component>
</Directory>
</Directory>
嗯,希望对某人有所帮助!
最佳答案
正如 Aaron Stebner 所解释的那样,
When you use the attribute Assembly=".net" for a file in WiX, it will create entries in the MsiAssembly and MsiAssemblyName table for this component and mark it as a GAC component. That means that the file will only be installed to the GAC by this component, and it will not install to the directory that the component is a child of. That directory will only be used by Windows Installer to stage a copy of that file when creating an administrative install point.
因此,两个组件的目录必须不同,因为文件名相同。如果这些目录没有其他目标,它们甚至不会被创建。我将 GAC 组件放在安装文件夹的子目录下:
<Directory Id="tmp_to_GAC" Name="tmp_to_GAC">
每个 GAC 都需要一个。
关于WIX 将两个程序集部署到 GAC,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17090689/
尝试使用 gacutil.exe 删除给定程序集(在本例中为 log4net.dll,但它应该适用于任何类似情况)时,由于应用程序需要该程序集,因此操作失败。但是,我不知道如何判断哪些应用程序实际上需
regsvr32和GAC有什么区别? 当然,regsvr32 适用于 COM,GAC 适用于 .net 程序集,但这是唯一的区别吗? 最佳答案 regsvr32是一个用于自注册dll的程序。 GAC是
我有一个组件: SomeAssembly.dll 我的路径上有 GACUtil 的文件夹: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bi
我想知道为什么拖放有效,而复制粘贴无效。复制和粘贴没有发生的拖放会发生什么? 最佳答案 当您将程序集拖放到 C:\windows\assembly 中时文件夹,它并没有真正被复制到那里——一个特殊的
这个问题说明了一切。 最佳答案 GAC 中的程序集不知道您的私有(private)程序集的私有(private)位置。它只了解 GAC 本身。所以它可以引用仅在 GAC 中可用的程序集 关于c# -
如何检查 GAC 程序集详细信息 Windows Server 2012?我设法通过 Powershell 注册了一个 DLL,现在我需要验证它是否真的完成了。 最佳答案 您可能正在寻找您在 4.0
我正在使用 InnoSetup 来安装我构建的应用程序。我的客户请求在使用此 InnoSetup 插件安装时下载最新的 DLL: http://www.sherlocksoftware.org/pag
我有一个由 Visual Studio 为我在 .NET dll 中使用的第三方 COM 对象生成的 Interop dll。 我已经在 GAC 中注册了我的消费 dll 和 Interop dll。
我有一个“项目 A”,它使用 CopyLocal=TRue 引用 System.Web.Mvc。 System.Web.Mvc 在我的本地机器和构建服务器上都位于 GAC 中。 我还有一个“项目 B”
我正在构建一个类库。该库将部署到 GAC。 在我的库中,我引用了一些外部依赖项。依赖项无法部署到 GAC。 当我部署库并使用它时,它提示无法加载依赖项。 如何部署第三方 DLL,以便我的程序集可以引用
这是我的应用部署:c:\Program Files\Product\API.dll(在Gac中注册) c:\Program Files\Product\ApiImpl1.dll (非 Gac) c:\
很难说出这里问的是什么。这个问题是模棱两可的、模糊的、不完整的、过于宽泛的或修辞的,无法以目前的形式得到合理的回答。如需帮助澄清这个问题以便重新打开它,visit the help center .
我有一个 .NET dll,它需要从它的配置文件中读取它的配置设置。通常,配置文件与 DLL 放在同一目录中。但是如果 DLL 是 GAC 的,我如何读取配置文件,因为我只能将 DLL 放在 GAC
我们如何才能使 .NET 项目的构建过程 (Dev Studio 2005) 完全独立于运行它的特定机器上的 GAC 上安装的内容。 这是我们要解决的问题:根据碰巧安装到 GAC 中的程序集,我们的构
我想更加熟悉 .Net 全局程序集缓存。网上的各种消息来源说它可以在 C:\WINNT\Assembly 中的 Explorer 中找到。 .但我似乎没有 WINNT文件夹下 C:在我的 Window
沿着这条线 stackoverflow 提出了一些问题,例如 What are the advantages and disadvantages of using the GAC 和 When and
我有 WinForms 应用程序 .net 3.5。我在具有多台客户端计算机的 Intranet 中使用 clickonce 部署它。我在 Intranet Web 服务器 ( http://desb
这个问题在这里已经有了答案: How to prevent a .NET application from loading/referencing an assembly from the GAC?
使用 WIX,并尝试安装两个相同的程序集,一个用于 .Net35,另一个用于 .Net40。我正在使用两个单独的组件,但是 WIX 阻止了项目编译。
这个问题在这里已经有了答案: How to prevent a .NET application from loading/referencing an assembly from the GAC?
我是一名优秀的程序员,十分优秀!