.NET Framework dependency errors in Unity 2017.1
.NET Framework dependency errors in Unity 2017.1
Just upgrade to Unity 2017.1, and I'm getting this warning in MonoDevelop now, followed by lots of "type or namespace not found" errors for all the ES2 classes.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(5,5): Warning MSB3258: The primary reference "ES2" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework. (MSB3258) (Assembly-CSharp)
I can actually run it in Unity, but if I try and compile in MonoDevelop, it throws the warnings and errors. Any help would be appreciated.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(5,5): Warning MSB3258: The primary reference "ES2" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework. (MSB3258) (Assembly-CSharp)
I can actually run it in Unity, but if I try and compile in MonoDevelop, it throws the warnings and errors. Any help would be appreciated.
Re: .NET Framework dependency errors in Unity 2017.1
EDIT: We've found a fix! Turns out Unity's API updater was responsible.
To fix this error:
Hi there,
We've had reports of this from a few other users, but it only seems to be affecting some people and not others.
We're going to try a few different things to hopefully resolve it on Thursday morning (when we know we've got a substantial amount of time to commit to it), and will get back to you once we have done so.
In the meantime, if you could let us know the precise version of Unity and MonoDevelop you are using that would be very useful to us.
All the best,
Joel
To fix this error:
- 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.
Hi there,
We've had reports of this from a few other users, but it only seems to be affecting some people and not others.
We're going to try a few different things to hopefully resolve it on Thursday morning (when we know we've got a substantial amount of time to commit to it), and will get back to you once we have done so.
In the meantime, if you could let us know the precise version of Unity and MonoDevelop you are using that would be very useful to us.
All the best,
Joel
Re: .NET Framework dependency errors in Unity 2017.1
Unity:
Version 2017.1.0f3 (472613c02cf7) Personal
Fri, 23 Jun 2017 19:13:14 GMT
Branch: 2017.1/release
MonoDevelop: 5.9.6
Version 2017.1.0f3 (472613c02cf7) Personal
Fri, 23 Jun 2017 19:13:14 GMT
Branch: 2017.1/release
MonoDevelop: 5.9.6
Re: .NET Framework dependency errors in Unity 2017.1
Hi there,
I'm still unable to replicate this issue at my end. Would you be able to send me over a test project which replicates the error, and some instructions to replicate it? Also would you be able to tell me what OS you are using?
The only thing we can think is happening at the moment is that Unity is using the Windows Store specific DLL for the Editor, as this is the only DLL which indirectly references mscorlib 4.0.0.0. Would you be able to try deleting the Assets/Plugins/WP8/, Assets/Plugins/WSA/ folders and see if this solves your problem?
All the best,
Joel
I'm still unable to replicate this issue at my end. Would you be able to send me over a test project which replicates the error, and some instructions to replicate it? Also would you be able to tell me what OS you are using?
The only thing we can think is happening at the moment is that Unity is using the Windows Store specific DLL for the Editor, as this is the only DLL which indirectly references mscorlib 4.0.0.0. Would you be able to try deleting the Assets/Plugins/WP8/, Assets/Plugins/WSA/ folders and see if this solves your problem?
All the best,
Joel
Re: .NET Framework dependency errors in Unity 2017.1
Hi again,
This indeed a bug at Unity's end (see this Unity forum thread), but apparently only a warning is thrown from 2017.1 Patch 2 onwards.
You can download 2017.1 Patch 2 or newer from Unity's Patch Releases Page.
All the best,
Joel
This indeed a bug at Unity's end (see this Unity forum thread), but apparently only a warning is thrown from 2017.1 Patch 2 onwards.
You can download 2017.1 Patch 2 or newer from Unity's Patch Releases Page.
All the best,
Joel
Re: .NET Framework dependency errors in Unity 2017.1
Great, thanks, I'll try that
Re: .NET Framework dependency errors in Unity 2017.1
Hmm, I don't think this solution will work for me. On that patch page, it says:
Please be aware that you cannot build and release a Web Player game with a patch release, as the runtime will not be updated with patch versions.
I am build for WebGL, so this will disallow me from publishing.
Please be aware that you cannot build and release a Web Player game with a patch release, as the runtime will not be updated with patch versions.
I am build for WebGL, so this will disallow me from publishing.
Errors when debugging with ES2
Hello there! Just bought EasySave and I'm loving how easy it is to get going. I'm hitting a snag whenever I try to use Visual Studio 2017's debugger though. When I attach to Unity, I'm hit with these five errors:
Error CS0246 The type or namespace name 'ES2Type' could not be found (are you missing a using directive or an assembly reference?)
C:\Users\*********\Documents\Unity Projects\TestProj\Assets\Easy Save 2\Types\ES2_AudioClip.cs
Error CS0115 'ES2_AudioClip.Write(object, ES2Writer)': no suitable method found to override
C:\Users\*********\Documents\Unity Projects\TestProj\Assets\Easy Save 2\Types\ES2_AudioClip.cs
Error CS0246 The type or namespace name 'ES2Writer' could not be found (are you missing a using directive or an assembly reference?)
C:\Users\*********\Documents\Unity Projects\TestProj\Assets\Easy Save 2\Types\ES2_AudioClip.cs
Error CS0115 'ES2_AudioClip.Read(ES2Reader)': no suitable method found to override
C:\Users\*********\Documents\Unity Projects\TestProj\Assets\Easy Save 2\Types\ES2_AudioClip.cs
Error CS0246 The type or namespace name 'ES2Reader' could not be found (are you missing a using directive or an assembly reference?)
C:\Users\*********\Documents\Unity Projects\TestProj\Assets\Easy Save 2\Types\ES2_AudioClip.cs
The issues seem to be coming from AudioClip.cs, but I'm not trying to read or write any audio. Strangely, running the game within Unity itself works perfectly fine. I'm using Unity 2017.1.0p4 and the latest version of EasySave (2.8.2).
Any ideas on how to solve this?
Error CS0246 The type or namespace name 'ES2Type' could not be found (are you missing a using directive or an assembly reference?)
C:\Users\*********\Documents\Unity Projects\TestProj\Assets\Easy Save 2\Types\ES2_AudioClip.cs
Error CS0115 'ES2_AudioClip.Write(object, ES2Writer)': no suitable method found to override
C:\Users\*********\Documents\Unity Projects\TestProj\Assets\Easy Save 2\Types\ES2_AudioClip.cs
Error CS0246 The type or namespace name 'ES2Writer' could not be found (are you missing a using directive or an assembly reference?)
C:\Users\*********\Documents\Unity Projects\TestProj\Assets\Easy Save 2\Types\ES2_AudioClip.cs
Error CS0115 'ES2_AudioClip.Read(ES2Reader)': no suitable method found to override
C:\Users\*********\Documents\Unity Projects\TestProj\Assets\Easy Save 2\Types\ES2_AudioClip.cs
Error CS0246 The type or namespace name 'ES2Reader' could not be found (are you missing a using directive or an assembly reference?)
C:\Users\*********\Documents\Unity Projects\TestProj\Assets\Easy Save 2\Types\ES2_AudioClip.cs
The issues seem to be coming from AudioClip.cs, but I'm not trying to read or write any audio. Strangely, running the game within Unity itself works perfectly fine. I'm using Unity 2017.1.0p4 and the latest version of EasySave (2.8.2).
Any ideas on how to solve this?
Re: Errors when debugging with ES2
Hi there,CantSleep wrote:Hello there! Just bought EasySave and I'm loving how easy it is to get going. I'm hitting a snag whenever I try to use Visual Studio 2017's debugger though.
I've merged your thread with this one, as your question relates to the same bug. This appears to be a bug at Unity's end where it seems to be patching the wrong assembly when building (see my previous post in this thread). Apparently using the latest patch of Unity has fixed it for some users, but not for others. We're looking for a workaround in the meantime, but hopefully Unity will fix this issue for all users in a coming update.
All the best,
Joel
Re: .NET Framework dependency errors in Unity 2017.1
You will have to contact Unity regarding this question. However, if that does indeed affect you, you will need to wait until they release the next non-patch update.jinxology wrote:Hmm, I don't think this solution will work for me. On that patch page, it says:
Please be aware that you cannot build and release a Web Player game with a patch release, as the runtime will not be updated with patch versions.
I am build for WebGL, so this will disallow me from publishing.
I've had reports that updating to the patch works for some users, but not for others, so in the meantime we're still looking for a workaround.
All the best,
Joel