.netexchange-serverexchange-server-2010exchange-transport-agents

Exchange Server Transport Agent Won't Load, "Built By a Newer Runtime"


I have built a simple transport agent (using .NET 4.0) for exchange 2010 and I'm trying to install it using the exchange management shell, but I run across this error:

Could not load file or assembly 'file:///C:\Program Files\Microsoft\Exchange Server\V14\Public\MySimpleAgent.
dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot
 be loaded.
    + CategoryInfo          : InvalidArgument: (:) [Install-TransportAgent], BadImageFormatException
    + FullyQualifiedErrorId : 3A033BB9,Microsoft.Exchange.Management.AgentTasks.InstallTransportAgent

I really only found one good public discussion of this issue, but the solutions suggested by some have not helped my situation.

I have:

Any other suggestions?


Solution

  • I chased my tail for two days trying to figure this one out. The problem ended up being that the version of the Microsoft.Exchange.Data.Common and Microsoft.Exchange.Data.Transport dlls referenced in my project did not match the version of the dll's in the "public" folder on the hub transport servers. After updating my referenced dll's to the correct version the problem went away.