Installing .NET 3.5 Transport Agents on Exchange 2013 (Install-TransportAgent) RRS feed

  • Question

  • Hi

    I'm migrating an Exchange 2010 Transport Agent written in C# using .NET 3.5 to Exchange 2013.

    As described by Microsoft, I've modified the following config files:

    C:\Program Files\Microsoft\Exchange Server\V15\Bin\

    ...and added the following to enable .NET3.5 support:

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

    I can now take our binaries (.NET3.5) and can manually install the transport agent using PowerShell, and it seems to work.

    The problem I have is with the installer using PowerShell - when it attempts to add the Exchange 2013 Power Shell:

    _RsConfig.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.e2010", out snapInException);

    (Note even on Ex2013, the PowerShell add-in is named as E2010!!)

    I get the following exception:

    "Cannot load Windows PowerShell snap-in Microsoft.Exchange.Management.PowerShell.e2010 because of the following error:

    "Could not load file or assembly:

    C:\Program Files\Microsoft\Exchange Server\V15\bin\Microsoft.Exchange.PowerShell.Configuration.dll

    or one of its dependencies.

    This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded."

    (This error disappears if the test app is written using .NET4).

    It would seem that although Exchange 2013 can support transport agents written in versions of .NET prior to version 4, the Exchange Management PS Snap-in DOES NOT support being called from previous versions of .NET prior to .NET4.

    Does anyone have any comments, other than rebuilding the complete project using VS2010 and .NET 4?

    • Edited by svoburner Friday, March 22, 2013 10:59 AM
    Friday, March 22, 2013 10:57 AM

All replies

  • Hi,

    I have this problem too.
    It seems no other choice to set the target framework's Version to 4.0 in VS2010
    for Exchange 2013.

    RunspaceConfiguration.create().AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.E2010", out warning);
    Exchange 2010 supports only .Net Framework 3.5

    • Edited by lehler Tuesday, April 9, 2013 8:32 AM
    Tuesday, April 9, 2013 8:29 AM