Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8261687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:29:48+00:00 2026-06-08T03:29:48+00:00

I am trying to compile a program that uses the library Newtonsoft.Json.dll with mono

  • 0

I am trying to compile a program that uses the library Newtonsoft.Json.dll with mono

Compile command

gmcs Program.cs etcetera.cs -r:Newtonsoft.Json.dll -r:Argotic.Core.dll

Result:

Missing method .ctor in assembly Newtonsoft.Json.dll, type System.Runtime.Versioning.TargetFrameworkAttribute
Can't find custom attr constructor image: Newtonsoft.Json.dll mtoken: 0x0a000053

And then when trying to run the program (mono Program.exe) it throws the error:

Unhandled Exception: System.TypeLoadException: Could not load type 'System.Runtime.Versioning.TargetFrameworkAttribute' from assembly 'Newtonsoft.Json'.

  at my_program.CJSONStuff.serialize (System.Collections.Generic.Dictionary`2 obj) [0x00000] in <filename unknown>:0 

  at my_program.TheObjDB.getAllSerialized () [0x00000] in <filename unknown>:0 

  at my_program.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type 'System.Runtime.Versioning.TargetFrameworkAttribute' from assembly 'Newtonsoft.Json'.

  at my_program.CJSONStuff.serialize (System.Collections.Generic.Dictionary`2 obj) [0x00000] in <filename unknown>:0 

  at my_program.TheObjDB.getAllSerialized () [0x00000] in <filename unknown>:0 

  at my_program.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 

I have never used mono before, and have no idea what’s going on.. but maybe this means the DLL can’t be used because it hasn’t been compiled with mono as well? If that’s the case; does this mean I can’t use any 3d party DLLs with mono unless I also have the source code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T03:29:50+00:00Added an answer on June 8, 2026 at 3:29 am

    Because default mono uses v 2.0 runtime but nuget is using v4.0. its can be resolve by defining runtime parameter on mono:

    mono --runtime=v4.0.30319 NuGet.exe
    

    Source: http://monomvc.wordpress.com/2012/03/06/nuget-on-mono/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to compile an example program that links to the shared library produced
I'm trying to compile a Java library that uses JNI. When I start the
I'm trying to compile a program which uses the festival library. Basically, the requirements
I'm trying to compile a program on Ubuntu 11.10 that uses the Boost libraries.
I'm having some trouble trying to compile a program that uses exp function on
I'm trying to compile a C program that uses libpcap in statistical mode on
I am trying to compile a program that uses the function clock_gettime . The
I am trying to compile a C program on Mac OS X that uses
I'm trying to compile by command line a series of cs into a dll
I'm trying to compile a program which uses cabarc.exe , but I don't have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.