vrijdag 1 juni 2012

BizTalk Powershell Provider on Windows Server 2008 R2

Today I ran into a problem while trying to use the BizTalk PowerShell Provider on a Windows Server R2 installation.

I allready knew I would have to use the 32 bit version when working with the provider, however on starting up the console I received the following message:

Add-PSSnapin : Cannot load Windows PowerShell snap-in BizTalkFactory.Powershell.Extensions because of the following err or: Could not load file or assembly 'file:///C:\Program Files (x86)\BizTalkFactory PowerShell Provider\BizTalkFactory.P owerShell.Extensions.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently load ed runtime and cannot be loaded. At C:\Users\Administrator\Documents\WindowsPowerShell\profile.ps1:5 char:13 + Add-PSSnapin <<<< BizTalkFactory.Powershell.Extensions + CategoryInfo : InvalidArgument: (BizTalkFactory.Powershell.Extensions:String) [Add-PSSnapin], PSSnapInE xception + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand

 

In the documentation for the provider it states it targets .NET 2.0, and that the configuration files should be changed to the following:

 

<configuration>

  <startup>

    <supportedRuntime version="v4.0.30319" />

  </startup>

</configuration>

 

This did however not solve my problem.

After further investigation I found out you actually need following in the configuration file:

 

<configuration>

  <startup useLegacyV2RuntimeActivationPolicy="true">

    <supportedRuntime version="v4.0.30319" />

    <supportedRuntime version="v2.0.50727" />

  </startup>

</configuration>

Geen opmerkingen:

Een reactie posten