Void System.Threading.Monitor.Enter Error using ILMerge

I am trying to use ILMerge to combine my C # program with 3 DLL links. If I run the program without merging them, everything works fine, but when I combine them, I get an error message "Void System.Threading.Monitor.Enter".

Here is the DLL that I am uniting:

HTMLAgilityPack.dll
MySql.Data.dll
RKLib.ExportData.dll

It seems that the error came from MySql.Data.dll, but I'm not sure why it will throw this exception.

Any ideas that are much appreciated.

EDIT: The full error I get:

************** Exception Text **************
System.MissingMethodException: Method not found: 'Void System.Threading.Monitor.Enter(System.Object, Boolean ByRef)'.
at MySql.Data.MySqlClient.MySqlConnection.set_ConnectionString(String value)
at MySql.Data.MySqlClient.MySqlConnection..ctor(String connectionString) in :line 0
+5
source share
1 answer

What version of the framework are you using? There is a targetplatform option that you can install if you are using 4.0 / 4.5, for example.

/targetplatform:version,platformdirectory

+1
source

All Articles