.NET Framework dependency errors in Unity 2017.1

Easy Save 2 has been replaced by Easy Save 3, so is no longer supported.
jinxology
Posts: 35
Joined: Sat Sep 13, 2014 5:21 pm

Re: .NET Framework dependency errors in Unity 2017.1

Post by jinxology »

Ok, thanks Joel, I'll wait for the next Unity update.
CantSleep
Posts: 4
Joined: Sun Aug 20, 2017 1:49 am

Re: .NET Framework dependency errors in Unity 2017.1

Post by CantSleep »

Appreciate it Joel, hope this gets sorted out!
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: .NET Framework dependency errors in Unity 2017.1

Post by Joel »

Hi all,

Could anyone who's encountering this issue do me a quick favour...

Would you be able to send a bug report to Unity? Because we can't replicate the error at our end, I'm unable to send them a project which replicates the error.

If you could tell them that the issue seems to be that their build process is changing the dependencies of our ES2.dll to System 4.0.0.0 and System.Core 4.0.0.0, when they should be 2.0.0.0 and 3.5.0.0 respectively. If it's easier, just give them a link to this post :)

For anyone who wants to test this out for themselves, I've created a very basic script which outputs the dependencies of ES2.dll and outputs them to console in the Editor.
using UnityEngine;
using System.Reflection;

public class RecursivelyGetDependencies : MonoBehaviour 
{
	// Use this for initialization
	void Start () 
	{
		var assembly = Assembly.Load("ES2");
		foreach(var a in assembly.GetReferencedAssemblies())
			Debug.Log(a.ToString());
	}
}
Which for us outputs:
CapturFiles_5.png
CapturFiles_5.png (103.65 KiB) Viewed 11125 times
And here's the dependency tree of the DLL after Unity seems to have post-processed it (kindly emailed to me by someone who is also encountering this issue):
ES2 Diagram.png
ES2 Diagram.png (43.72 KiB) Viewed 11125 times
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
jinxology
Posts: 35
Joined: Sat Sep 13, 2014 5:21 pm

Re: .NET Framework dependency errors in Unity 2017.1

Post by jinxology »

I'll give that a shot tonight. Just to reiterate, I'm able to run the project just fine via Unity, but I can't compile in MonoDevelop. Is that the same issue everyone else is having?
CantSleep
Posts: 4
Joined: Sun Aug 20, 2017 1:49 am

Re: .NET Framework dependency errors in Unity 2017.1

Post by CantSleep »

Yep, that's the same issue I'm having jinxology. I've had to remove ES2 from my project for the time being so I can start up the debugger.
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: .NET Framework dependency errors in Unity 2017.1

Post by Joel »

jinxology wrote:I'll give that a shot tonight. Just to reiterate, I'm able to run the project just fine via Unity, but I can't compile in MonoDevelop. Is that the same issue everyone else is having?
That is indeed the same error. If you could send a bug report to Unity that would be greatly appreciated.

Also just one thing for everybody to check...

When you import Easy Save and it asks if you want to run the API updater, are you pressing Yes or No? There's a bug where the API updater sometimes incorrectly modifies the DLL, making the DLL unusable, but I'm unsure if this is related. If someone could try removing and re-importing Easy Save and ensure that it doesn't run the API updater, that would be greatly appreciated.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
CantSleep
Posts: 4
Joined: Sun Aug 20, 2017 1:49 am

Re: .NET Framework dependency errors in Unity 2017.1

Post by CantSleep »

Hey Joel, I gave your suggestion of not updating the APIs a shot and it actually works now! I can start up the debugger and I don't get those dependency errors anymore. Anyone else having this problem should see if it works for them as well.
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: .NET Framework dependency errors in Unity 2017.1

Post by Joel »

CantSleep wrote:Hey Joel, I gave your suggestion of not updating the APIs a shot and it actually works now! I can start up the debugger and I don't get those dependency errors anymore. Anyone else having this problem should see if it works for them as well.
That's fantastic news, thanks for trying it out for me!

In that case we might be able to provide a workaround to this also, but in the meantime anyone who has this issue should:
  • Remove Assets/Plugins/ES2.dll from your project.
  • Reimport from the Asset Store.
  • Ensure that you do not let it run the API Updater when prompted.
All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
jinxology
Posts: 35
Joined: Sat Sep 13, 2014 5:21 pm

Re: .NET Framework dependency errors in Unity 2017.1

Post by jinxology »

That worked for me! I am still getting this warning:

E:\Data\Dev\MMOSim\Assets\Easy Save 2\Types\ES2_AudioClip.cs(14,14): Warning CS0618: 'UnityEngine.AudioClip.Create(string, int, int, int, bool, bool)' is obsolete: 'The _3D argument of AudioClip is deprecated. Use the spatialBlend property of AudioSource instead to morph between 2D and 3D playback.' (CS0618) (Assembly-CSharp)

Outside of this, I've had so many weird "I just need to reboot" or "this suddenly stopped happening" problems with Unity since upgrading to 2017.1.
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: .NET Framework dependency errors in Unity 2017.1

Post by Joel »

Thankfully the AudioClip warning is unrelated, and happens because we have to include a deprecated (but still functioning) method to ensure backwards compatibility.

However, if you're not saving/loading AudioClips, you can remove the warning by deleting Assets/Easy Save 2/Types/ES2_AudioClip.cs, and then go to Assets > Easy Save 2 > Manage Types and press Refresh ES2Init.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Locked