Problem with Framework 'Mono / .NET 3.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 :shock:. 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”>> ([SOLVED] (Mono/MonoDevelop) after upgrade to lucid: g* stack of assemblies not compatible with [Archive] - Ubuntu Forums), 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.

I did all I could so far :smile:. 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” (.net - Error: Framework '.NETFramework 4.0 Client Profile' not installed. for MonoDevelop 2.8.1 - Stack Overflow) 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. :smile:

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.

Hello Jaimi. Thanks for the answer. :o

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”. :shock:

Getting the same problem. Any suggestions? Also I’m running Unity off of a USB.

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.

If you go into Unity, create a new project, import the “Scripts” folder, and press the “Run” button - do you get an error?

If I go into Unity, create a new project, import the “Scripts” folder:

…and press the “Run” button, I get no errors:
1206386--48649--$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.

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. :slight_smile: 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.

:smile: 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.

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.

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.

Actuallystarky, Huge thanks for that link!

how to use notepad++ as editor in unity in stead of mono

Actuallystarky, Thank you very Much.

You need to change your target Framework in MonoDevelop.

1 Like

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)?

Try this tutorial may be it helps,