Reputation: 65
(source: shrani.si)
I have made an exe which uses newtonsoft's JSON.NET 6.0 library. It works on every computer I have tested, but when I have tried to run it on server I get an error from the picture.
This is in my config file:
<startup>
<supportedRuntime version="v2.0.50727"/>
</startup>
Upvotes: 0
Views: 283
Reputation: 129687
If you built your assembly targeting the .NET Framework 4.0, then you need to install that framework on the server. It looks like you are trying to run it on Windows Server 2003, which does not have the .NET 4.0 framework installed on it by default. A 4.0 program or assembly will not run on the 2.0 framework.
If you built your program targeting the 2.0 framework, make sure you are including the correct Json.Net assembly with your program (targeting the 2.0 framework not the 4.0 framework). If you use NuGet to install Json.Net into your project, it should include the correct one.
Upvotes: 1