Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Unhandled Exception

Discussion in 'Scripting' started by chabala, May 21, 2015.

  1. chabala

    chabala

    Joined:
    Apr 30, 2012
    Posts:
    19
    Hey Guys,

    I have some DLLs in my project that someone else made. I have the source solutions in Xamarin as well. When I try to rebuild the solution I am running into this error:
    I have been googling around and there are many different solutions to this but they basically all come down to this. "You are missing some reference / dll..." So how do I figure out which one I am missing?

    Cheers,
    Chabala
     
  2. chabala

    chabala

    Joined:
    Apr 30, 2012
    Posts:
    19
    Update: I found out that when it creates the builds in Xamarin it makes the file:
    Release/.NETFrameworks,Version=4.0.AssemblyAttribute.cs
    with this inside it.
    // <autogenerated />
    [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = "")]

    I think this is wrong.. it should be version 3.5 right? Is this what the problem is? How do I fix this on Mac?

    I figured this out because Unity also throws the error:
    TypeLoadException: Could not load type 'System.Runtime.Versioning.TargetFrameworkAttribute' from assembly '[dll-name]'
     
  3. chabala

    chabala

    Joined:
    Apr 30, 2012
    Posts:
    19
    Update: I have built successfully! I opened the solution in MonoDevelop and built there because it had Mono 2.10.12 set as the default. When I tried to force Xamarin to build in this older version it sent me an error. So that is where I need to focus on getting this to work now.