Search Unity

Problem with Framework 'Mono / .NET 3.5'

Discussion in 'Editor & General Support' started by Artist Artis, Mar 24, 2013.

  1. Artist Artis

    Artist Artis

    Joined:
    Mar 24, 2013
    Posts:
    5
    I do want to write my own scripts but right now all I expect is to simply use scripts that come with Unity but instead I get a "Error: Framework 'Mono / .NET 3.5' not installed. (Assembly-CSharp-firstpass)" on the MonoDevelop and on the MonoDevelop Message Log it says "mscorlib assembly not found for framework". I’m getting that message with scripts that come with Unity (Camera Scripts, General Scripts and Utility Scripts), but also even when I just created a new script, even when the script is empty :eek:. I already have Microsoft .NET Framework 4 Extended (and Client Profile) installed so I believe I need to make Unity recognize it. And I wonder why would Unity 4 ask for an older .NET Framework. I recently read that <<"Assembly" is the name for a .NET library. "Assembly not available for Mono / .NET 3.5" means "I cannot find the library you're trying to use">> (http://tinyurl.com/directhexNov27th2010), does this help? How can I help Unity find a library? How do I use a library that Unity can find? Bellow are screen shots of the problem.

    $unity-framework-not-installed-issue-solution-window.jpg $unity-framework-not-installed-issue.jpg $unity-framework-not-installed-cant-add-script.jpg

    I did all I could so far :D. I searched the web for "Error: Framework 'Mono / .NET 3.5' not installed. (Assembly-CSharp-firstpass)", they talk about changing "the project to use the full 4.0 framework" (http://tinyurl.com/cyr2uwv) and I have no idea how to do that on Unity. I also searched for "mscorlib assembly not found for framework" and the results don't seem to help at all, they talk about redhat, ubuntu, and the ones related to MonoDevelop are repetitions of one single post in which they come to the conclusion that it "explains why there is no code completion" <-- does this help? I also read the Unity documentation, and my searches for "Framework Mono / .NET 3.5", "NET 3.5", "Assembly-CSharp-firstpass" and "mscorlib assembly not found for framework" did not result in any matches. And results for "not installed" and results for "mscorlib" aren't related to this specific issue. I did a lot of experimentation and when I try to enter play mode it says "all compiler errors have to be fixed before" doing that. I also removed .NET 4.0 just to see if MonoDevelop would even open, and obviously it doesn't: "MonoDevelop.exe - Application Error. The application failed to initialize properly (0xc0000135). Click on OK to terminate the application". So I uninstalled 4.0 and since the original error says ".NET 3.5 not installed" I installed .NET Framework 3.5 and I got: "To run this application, you first must install one of the following versions of the .NET Framework: v4.0. Contact your application for instructions about obtaining the appropriate version of the .NET Framework" which is the one I had installed in the first place.

    I don't know exactly how to reproduce the error but maybe using unity 4.1.0f4 on Windows XP SP3 with Microsoft .NET Framework 4 Extended (and Client Profile) installed the error will be reproduced. Maybe not.

    Thank you, I look forward to a solution to fix this problem. :D
     

    Attached Files:

    Last edited: Apr 1, 2013
  2. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Run your scripts from Unity, not from Monodevelop. You have an error in your code, that is why you are getting that message in Unity. Fix it.
     
  3. Artist Artis

    Artist Artis

    Joined:
    Mar 24, 2013
    Posts:
    5
    Hello Jaimi. Thanks for the answer. :eek:

    You said "You have an error in your code, that is why you are getting that message in Unity. Fix it. ". I gotta tell ya that I deleted that code, deleted the script, that script wasn't necessary for now. So let me make the problem here more clear because it seems it isn't so clear.

    The error occurs even with scripts that come with Unity (Camera Scripts, General Scripts and Utility Scripts), and "even when I just created a new script, even when the script is empty". :eek:
     
    Last edited: Mar 27, 2013
  4. JakeDev

    JakeDev

    Joined:
    Mar 27, 2013
    Posts:
    1
    Getting the same problem. Any suggestions? Also I'm running Unity off of a USB.
     
  5. Artist Artis

    Artist Artis

    Joined:
    Mar 24, 2013
    Posts:
    5
    Hey JakeDev.

    I still haven't got an answer from Unity, I reported the bug a while ago. But I also opened a bug report at MonoDevelop, and just got an answer from them. But no instructions I could follow, so the problem won't be fixed.

    First I was very happy because they suggested "modifying (my) project references to use the 4.0 versions of the .NET libraries instead of 3.5." -- > I was happy thinking I could do that, so I asked them how. But they didn't answer that.

    What they did was set the bug report status to RESOLVED stating that whenever we use the MonoDevelop that comes with Unity 4 we're actually "using Unity's modified, very old version of MonoDevelop, which targets a the very old version of Mono (Mono 2.6) used by Unity. Mono 2.6 does not support .NET 4.0." < -- That doesn't sound like a fact since most of us running Unity use the latest, .NET 4.5.

    We now can only rely on trying alternatives to MonoDevelop: like Notepad++, UniSciTE, etc. I'm happy to make this choice, and I suggest that you do the same if nothing else works for you. The full list of these alternatives is here.

    The current status of the bug report is: RESOLVED and DOWNSTREAM. Bug Reported at MonoDevelop (bugzilla.xamarin).
    -Artis.
     
    Last edited: Apr 1, 2013
  6. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    If you go into Unity, create a new project, import the "Scripts" folder, and press the "Run" button - do you get an error?
     
  7. Artist Artis

    Artist Artis

    Joined:
    Mar 24, 2013
    Posts:
    5
    If I go into Unity, create a new project, import the "Scripts" folder:


    ...and press the "Run" button, I get no errors:
    $run-it,-no-errors.jpg

    Again, the errors appear in MonoDevelop.
    On Unity they only show AFTER MonoDevelop gives errors warnings.
    If I never open MonoDevelop the scripts in Unity work just fine.
     
    Last edited: Apr 1, 2013
  8. Artist Artis

    Artist Artis

    Joined:
    Mar 24, 2013
    Posts:
    5
    Well, I need to make a correction: when I said “Mono 2.6 does not support .NET 4.0.” < — That doesn’t sound like a fact since most of us running Unity use .NET 4.5.” I was wrong, it didn’t sound like a fact, but it is a fact. :) Unity has a page where they show that the MonoDevelop for Unity is only compatible with .NET 2.0 –> http://tinyurl.com/Unity-s-Mono-Compatibility

    Still, most of Unity users are running the latest, .NET 4.5, otherwise everyone would have had compatibility problems and the default would be downgrading to .NET 2.0, so my problem would be everyone’s problem and everyone would know how to fix it. But based on the results on Google and the replies I got I’m the first ever to have this problem, and except for JakeDev, who said he was having it too, nobody else is.

    If everyone running Unity was used to installing .NET 2.0 in order to use Unity’s MonoDevelop it would be very simple to fix my problem, but what happens is that nobody knows how to fix it.

    Again, the error says “.NET 3.5 not installed” so I did install .NET Framework 3.5, that surprisingly to me already comes with .NET 1.0 and .NET 2.0 so should work with MonoDevelop 2.8.2, right? No, because with .NET 2.0 installed Unity’s MonoDevelop 2.8.2 asks: “To run this application, you first must install one of the following versions of the .NET Framework: v4.0″. That’s v4.0, not v2.0.

    :D So, again, after over a week installing and uninstalling almost everything, I'm relieved to know that there are alternatives to MonoDevelop: like Notepad++, UniSciTE, etc. <– btw I recently saw in Unity Cookie’s Unity: Introduction to Scripting Gabriel Williams saying that MonoDevelop is a little complicated for the first time user so we should switch to a much simpler editor: UniSciTE. So I’m happy to be testing these alternatives now, specially Notepad++.

    In the end, I can now write my own scripts and also simply use scripts that come with Unity.
     
    Last edited: Apr 1, 2013
  9. actuallystarky

    actuallystarky

    Joined:
    Jul 12, 2010
    Posts:
    188
    Hello, sorry to resurrect an old thread but I recently had this problem myself and thought I'd post the solution in case the OP or anyone else was still interested.

    I'm guessing that the people having this problem are running windows 8. In which case the problem is caused by win8 not having the .net 3.5 libraries installed by default. Simply install the libraries by following these instructions here and everything should be working fine.
     
  10. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Should also note that if you use Visual Studio as your editor from Unity, the first time you open a script and the solution with it you'll be prompted automatically to do the update.
     
  11. Fingerbob

    Fingerbob

    Joined:
    Sep 6, 2014
    Posts:
    24
    Actuallystarky, Huge thanks for that link!
     
  12. Sasuke_214

    Sasuke_214

    Joined:
    Sep 14, 2015
    Posts:
    2
    how to use notepad++ as editor in unity in stead of mono
     
  13. jawadzeb0000

    jawadzeb0000

    Joined:
    Nov 16, 2015
    Posts:
    3
    Actuallystarky, Thank you very Much.
     
  14. Deleted User

    Deleted User

    Guest

  15. haika12

    haika12

    Joined:
    Jan 20, 2019
    Posts:
    1
    how a can solve this error C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(5,5): Error MSB3645: .NET Framework v3.5 Service Pack 1 was not found. In order to target ".NETFramework,Version=v3.5", .NET Framework v3.5 Service Pack 1 or later must be installed. (MSB3645) (Assembly-CSharp)?
     
  16. alhudahudagames

    alhudahudagames

    Joined:
    Feb 5, 2020
    Posts:
    1
    Try this tutorial may be it helps,