WIX Custom Actions built for .Net Framework 4.0 does not work? Ways to resolve?

前端 未结 5 928
鱼传尺愫
鱼传尺愫 2021-01-04 02:07

We were using WIX 3.5 (Build Number 1811) and built a custom action built using Visual Studio 2008 and with target framework as .Net 3.5. This used to work great, until we b

相关标签:
5条回答
  • 2021-01-04 02:16

    There is a bug open to tweak the DTF supportedRuntime element in its manifest to support NETFX 4.0. That bug hasn't been fixed yet so you need still to do it yourself.

    0 讨论(0)
  • 2021-01-04 02:17

    Just my two cents:

    Unlike Ngm I only had to add supportedRuntime for .NET 4.0

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
      <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0" />
      </startup>
    </configuration>
    

    Important:

    1. Don't rename CustomAction.config
    2. Set the CustomAction.config Build Action to Content, else it won't work
    0 讨论(0)
  • 2021-01-04 02:20

    Additionally to the solution from Ngm we had to set the target framework of the managed custom action class library back to .NET 2.0 to get things working.

    0 讨论(0)
  • 2021-01-04 02:24

    Thanks for this nice post. Its solved my query. In my case error was I have renamed config file and now restored it to original.

    0 讨论(0)
  • 2021-01-04 02:28

    Well we finally resolved the problem, we had to set:

    useLegacyV2RuntimeActivationPolicy="true"
    and
    have both versions specified:
    <supportedRuntime version="v2.0.50727"/>
    and
    <supportedRuntime version="v4.0"/>
    

    If just "<supportedRuntime version="v4.0"/> is specified, it does not work. So looks like a bug in WIX 3.5 Beta

    0 讨论(0)
提交回复
热议问题