none
Specific .NET Version needed for AddOns? Which .NET version is loaded by Office?

    Frage

  • Hi, I'm desperately looking for a solution to my issue. After switching from .NET 3.5 to 4, my Outlook AddIn does no longer load in any Outlook I test with. The thread (with no answers) is here.

    I wonder if the .NET version used for a COM AddIn is important depending on the used Office version? So must Office 2013 AddIns be compiled with .NET 3.x and Office 2016 AddIns with some other .NET version? Is the .NET version used for Redemption libs also important?

    Or is it impossible to write COM AddIns for Office with any .NET higher than 3.5?



    Mittwoch, 24. April 2019 10:17

Alle Antworten

  • I found that Outlook uses a dedicated Framework version depending on the first AddIn loaded. If the first AddIn is requesting .NET V2, it loads this framework and uses it for all other AddIns. This is quite bad because my AddIn, currently compile using .NET 4.5.1, is not loading.

    I found one solution by creation a file OUTLOOK.EXE.config with the following content:

    <configuration>
      <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.5"/>
      </startup>
    </configuration>

    It forces Outlook to load all AddIns with the given framework. But I don't want to place such file into outlook installation folder (like C:\Program Files\Microsoft Office\Office16). This sounds like a bad solution to me.

    Is there some other way?

    Donnerstag, 25. April 2019 12:13