1

in my Visual Studio 2010 setup project, I have a managed Custom Action. It used to work great but will not on Windows 8 unless .NET 3.5 is installed. I can't force my users to have .NET 3.5 installed - well I could, but I'd lose customers.

I have a vague understanding that maybe it's not working with .NET 4 because the shim DLL (installutillib.dll) has a dependency on .NET 2?

Is there anything I can do to get it to work? I know managed CAs are frowned on by some, but need it to write a registry entry that depends on a bit of logic.

Thanks

4

1 回答 1

1

使用 installutillib.dll 的托管 CA 不受欢迎。这是非常糟糕的事情,例如在静默/非交互式安装期间抛出模式 1001 错误消息,不支持访问 MSI 会话,使用 CLR 版本(粘性)和许多其他可怕的设计缺陷来纹身 MSIEXEC 进程。

请改用 Windows Installer XML (WiX) 部署工具基础 (DTF) 托管的自定义操作。它看起来像是安装程序的本机自定义操作,并且支持表示 SupportedRuntimes 元素的 CustomAction.Config XML。

部署工具基础 (DTF) 托管的自定义操作

当然,您可能不需要自定义操作来执行您想要执行的操作。Registry 表支持 [PROPERTY] 表达式,它所属的组件可以使用条件来控制安装与否。

于 2012-09-25T00:52:37.010 回答