使用 WIX,尝试安装两个相同的程序集,一个是 .Net35 ,另一个是.Net40。我使用了两个独立的组件,但是 WIX 阻止了项目的编译。
我收到的错误信息是:
错误29 ICE30:在SFN系统上,“MyDll.dll”目标文件由两个不同的组件通过“MyDllServicesModuleGac40Component.DDD7D974_FE9C_4BA3_BDD3_A1A3A23F8057”和“MyDllServicesModuleGac35Component.DDD7D974_FE9C_4BA3_BDD3_A1A3A23F8057”安装到“[TARGETDIR] \ GAC \”,这会破坏组件引用计数。 D:\ PROJECTS \ MyDll.Experimental.3.0.0 \ Project \ MyDll \ MyDll.Wix.Services \ MergeModule.wxs 34 1 MyDll.Wix.Services
安装程序应该能够检测到.Net35 dll被安装到C:\ Windows \ assembly的GAC中,而.Net40 dll被安装到C:\ Windows \ Microsoft.NET \ assembly的GAC中。
重命名DLL不是一个选项。
谢谢!
更新
自然而然,在发布后我想到了一个解决方案,似乎将组件包装在其他元素中使我能够使此工作。后来我阅读了Tom Blodget的帖子,所以那是正确的。
希望这能对某些人有所帮助!
<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>
我收到的错误信息是:
错误29 ICE30:在SFN系统上,“MyDll.dll”目标文件由两个不同的组件通过“MyDllServicesModuleGac40Component.DDD7D974_FE9C_4BA3_BDD3_A1A3A23F8057”和“MyDllServicesModuleGac35Component.DDD7D974_FE9C_4BA3_BDD3_A1A3A23F8057”安装到“[TARGETDIR] \ GAC \”,这会破坏组件引用计数。 D:\ PROJECTS \ MyDll.Experimental.3.0.0 \ Project \ MyDll \ MyDll.Wix.Services \ MergeModule.wxs 34 1 MyDll.Wix.Services
安装程序应该能够检测到.Net35 dll被安装到C:\ Windows \ assembly的GAC中,而.Net40 dll被安装到C:\ Windows \ Microsoft.NET \ assembly的GAC中。
重命名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>
希望这能对某些人有所帮助!