DotNet Connector Migration Guide

Upgrading from .NET Connector Version 1.0

Due to technical limitations, it is not possible to run applications using the .NET connector version 1.x and version 2.x side-by-side on a single Anypoint installation. The Anypoint Studio or ESB Server instance which has previously hosted applications using the .NET connector version 1.0 applications will have support files installed for the 1.0 version of the connector. These .NET support files must be upgraded by the process explained below before the .NET Connector version 2.0 will work correctly.

Additionally, if you are running applications using the .NET connector version 1.x, you must migrate all applications to use the .NET Connector version 2.x and configure the Anypoint installation that hosts these applications to allow the .NET Connector 2.x to run.

To assist with this migration and upgrade process, the tool is made available for download from the MuleSoft website.


This tool provides these features:

  • Identify which version of the .NET connector a Mule installation will support

  • Enumerate all deployed apps that use the .NET connector v1 on a standalone Mule instance

  • Upgrade the .NET support files specified Mule installation to allow the .NET connector version 2.0 or above to run

  • Migrate one or more Mule apps that use the .NET connector version 1.0 to version 2.0 (a workspace root or project directory may be selected, or an ESB Server runtime directory)

In addition to running the migrator tool against your Anypoint Studio instance, you must also ensure that the .NET connector 2.0 plugin is installed before you see the .NET Connector available in the Studio palette.


  • The -analyze command identifies whether the Anypoint Studio or Mule Server instance must be upgraded, and if any Mule applications are using the .NET connector version 1.0 and must be migrated.
    dotnet-connector-util -analyze c:\path\to\mule\or\studio\instance

  • The -upgrade command removes the support files for the .NET connector 1.0, and configure an Anypoint Studio or ESB Server instance to host the .NET connector version 2.0 support files.
    dotnet-connector-util -upgrade <path-to-mule-or-studio-installation>

  • The -migrate command updates the global element config of any Mule applications running on the specified ESB server instance (in-place migration) or the Mule project(s) in the specified workspace directory, allowing the application to take advantage of the .NET connector 2.0.
    dotnet-connector-util -migrate <path-to-esb-server-or-workspace-or-app>


Once you have configured an Anypoint Studio or ESB Server instance to support the .NET connector 2.0, any application that uses the .NET connector version 1.0 no longer runs. An error message such as the below displays when you attempt to run your application:

Can't initialize jni4net BridgeCan't load library:
ERROR 2015-01-05 16:25:23,613
Message               : Failed to invoke execute. Message payload is of type: String
Code                  : MULE_ERROR--2
Exception stack is:
1. Can't  load library:
C:\Tools\AnypointStudio\plugins\ \mule\lib\user\dotnetconnector\1.1\jni4net.n.w64.v40-
java.lang.ClassLoader:1854 (null)

2. Can't initialize jni4net Bridge (net.sf.jni4net.inj.INJException
net.sf.jni4net.CLRLoader:56 (null)

Errors when Running .NET Connector Version 2.0

If you see the following error when running an application that uses the .NET connector version 2.0, then the support files for the .NET connector 1.0 are still installed in the version of Anypoint Studio or ESB Server that you are running.

Follow the migration guidance in this document to overcome this issue:

java.lang.Exception: The Anypoint installation the application is running in is configured to allow the .NET Connector 1.x and this application references the .NET Connector 2.x. You must run the dotnet-version-selector utility to allow .NET Connector 2.x applications to run in this installation

at org.mule.modules.dotnet.jni.DotNetBridge.<clinit>(
at org.mule.modules.dotnet.DotNetConnector.<clinit>(
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)