Wrote an application using the Newtonsoft.Json library. When you try to launch an application from Visual Studio 2015 or 2013, everything works, when you try to run on three different PCs (different versions of Windows and different system digits) outside the VS environment, everything works, but when you try to run on two different computers (they were ordered from different hosting providers) VPS KVM with Windows Server 2012 R2 x64 (.NET Framework installed) - the application cannot load the Newtonsoft.Json.dll library. The problem arises only with this library. I tried to add the library to the resources and upload them to them - the effect is the same. If you remove parts of the code responsible for working with JSON from the application (that is, remove the use of the library itself), then everything works fine everywhere.
Below is the error that occurs during startup:
System.BadImageFormatException: ΠΠ΅Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎ Π·Π°Π³ΡΡΠ·ΠΈΡΡ ΡΠ°ΠΉΠ» ΠΈΠ»ΠΈ ΡΠ±ΠΎΡΠΊΡ "Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" ΠΈΠ»ΠΈ ΠΎΠ΄ΠΈΠ½ ΠΈΠ· Π·Π°Π²ΠΈΡΠΈΠΌΡΡ
ΠΎΡ Π½ΠΈΡ
ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½ΡΠΎΠ². ΠΠΆΠΈΠ΄Π°Π»ΠΎΡΡ, ΡΡΠΎ ΠΌΠΎΠ΄ΡΠ»Ρ ΡΠΎΠ΄Π΅ΡΠΆΠΈΡ ΠΌΠ°Π½ΠΈΡΠ΅ΡΡ ΡΠ±ΠΎΡΠΊΠΈ. ΠΠΌΡ ΡΠ°ΠΉΠ»Π°: "Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" Π² ***.***.ReadAllItemsInfo() Π² ***.Program.Main(String[] args) Π² C:\---\Program.cs:ΡΡΡΠΎΠΊΠ° 55 === ΠΠ½ΡΠΎΡΠΌΠ°ΡΠΈΡ ΠΎ ΡΠΎΡΡΠΎΡΠ½ΠΈΠΈ ΠΏΡΠ΅Π΄Π²Π°ΡΠΈΡΠ΅Π»ΡΠ½ΠΎΠΉ ΠΏΡΠΈΠ²ΡΠ·ΠΊΠΈ === ΠΡΡΠ½Π°Π»: DisplayName = Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed (Fully-specified) ΠΡΡΠ½Π°Π»: Appbase = file:///C:/---/ ΠΡΡΠ½Π°Π»: Initial PrivatePath = NULL ΠΡΠ·ΠΎΠ² ΡΠ±ΠΎΡΠΊΠΈ: SoketServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. ΠΡΡΠ½Π°Π»: Π΄Π°Π½Π½Π°Ρ ΠΏΡΠΈΠ²ΡΠ·ΠΊΠ° Π½Π°ΡΠΈΠ½Π°Π΅ΡΡΡ Π² ΠΊΠΎΠ½ΡΠ΅ΠΊΡΡΠ΅ Π·Π°Π³ΡΡΠ·ΠΊΠΈ default. ΠΡΡΠ½Π°Π»: ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΠ΅ΡΡΡ ΡΠ°ΠΉΠ» ΠΊΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΠΈ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ: C:\---\---.exe.Config. ΠΡΡΠ½Π°Π»: ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΠ΅ΡΡΡ ΡΠ°ΠΉΠ» ΠΊΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΠΈ Π³Π»Π°Π²Π½ΠΎΠ³ΠΎ ΡΠ·Π»Π°: ΠΡΡΠ½Π°Π»: ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΠ΅ΡΡΡ ΡΠ°ΠΉΠ» ΠΊΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΠΈ ΠΊΠΎΠΌΠΏΡΡΡΠ΅ΡΠ° ΠΈΠ· C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. ΠΡΡΠ½Π°Π»: ΡΡΡΠ»ΠΊΠ° ΠΏΠΎΡΠ»Π΅ ΠΏΡΠΈΠΌΠ΅Π½Π΅Π½ΠΈΡ ΠΏΠΎΠ»ΠΈΡΠΈΠΊΠΈ: Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed ΠΡΡΠ½Π°Π»: ΠΏΠΎΠΏΡΡΠΊΠ° Π·Π°Π³ΡΡΠ·ΠΊΠΈ Π½ΠΎΠ²ΠΎΠ³ΠΎ URL file:///C:/---/Newtonsoft.Json.DLL. ΠΡΠΈΠ±ΠΊΠ°: Π½Π΅ ΡΠ΄Π°Π»ΠΎΡΡ Π·Π°Π²Π΅ΡΡΠΈΡΡ ΡΡΡΠ°Π½ΠΎΠ²ΠΊΡ ΡΠ±ΠΎΡΠΊΠΈ (hr = 0x80131018). ΠΡΠΎΠ²Π΅ΡΠΊΠ° ΠΏΡΠ΅ΠΊΡΠ°ΡΠ΅Π½Π°. Void ReadAllItemsInfo()