I encountered strange problems after upgrade to 4.1.1. My project is compiled in VisualStudio 12 then I copy dlls to project in Unity. Unfortunately after upgrade from 4.0.1 to 4.1.1 it stopped working. VS C# compiler emits nonsensical errors: such as ‘UnityEngine.Rect’ doesn’t have ‘width’, "UnityEngine.color’ has no ‘r’ etc.
I rolled back to 4.0.1 and everything went to normal.
Sounds to me like your visual studio project got confused about which binary unityengine.dll it is using.
Did you install Unity 4.1.1 in the same folder as your 4.0.1 installation? Or did you uninstall the old version? Easiest way to locate a valid unityengine.dll is simply to open a source file from within the UnityEditor and look at the “project” that unity created for you. So make sure to grab the new dll from 4.1.1 and use that to have access to the latest API.
Open your visual studio and look at the reference to the unityengine.dll in the solution explorer, the problem should be right there.
I got the same problem, and the way I fixed it for now is going back to 4.1
I used the auto-generated projects so I believe that issue is with the new UnityEngine.dll and not with any bad configuration from paths or finding the dlls, hope a patch to fix this comes as soon as possible.
It might be the auto-generated projects are not generated correctly?
Well the way I understood OP was that compiling his DLL didn’t work. I tested that and it worked.
What you describe is that you can’t use the compiled DLL in your Unity project. And it seems you’re right something changed. If you mix DLLs compiled with older versions of Unity in 4.1.1 visual studio wont compile and Unity may actually crash.
We’re looking into the problems behind this. If you have some simple reproducible scenario, like using a particular package from the asset store or something please submit a bug report and write bug number in this thread.
Having the same issue in 4.1.1. If you use/work with DLLs that reference older versions of UnityEngine.dll, neither VS nor MD compile anymore (though Unity compiles and plays without problems). The solution is to re-compile all those DLLs telling them to reference the latest UnityEngine.dll that comes with Unity 4.1.1. But that completely breaks compatibility for assets that should work both with Unity 3.X and Unity 4.
HOTween’s package for example has this issue (as any other DLL, from the feedback I gathered around), since it references UnityEngine.dll that comes with Unity 3, and I solved it by recompiling it with the latest one.
EDIT: GVGiu, kefrens, let us know if you submitted the bug, otherwise I’ll do it
This is a pretty serious ABI breaking change. The good news is that it should be a one time pain only.
Basically, between 4.0.1 and 4.1.1, UnityEngine.dll and UnityEditor.dll were signed (strongly named).
This means that for everyone that use a 3rd party assembly that reference either of those, and that is compiled against an earlier version of Unity, if Unity will still compile their project (because they C# compiler that is used internally is a bit more lenient), both MonoDevelop and Visual Studio will fail to compile the project.
The solution is to recompile the dll against the 4.1.1 Unity assemblies.
As a workaround, you can import the UnityMigration.unityPackage
And click on Unity Migration / Unity Reference fixup.
Beware, this is a destructive action : it will patch the DLL in your Assets folder that reference an older version of Unity. But then everything should work.
Thanks a lot for the package jbevain.
I hope that this is considered a bug though, and that the UnityEngine/Editor DLLs will be updated to a not strongly signed version as before, to allow easier workflow and usage of 3.x/4 compatible libraries.
It’s good for me that this issue is already known. I am getting bug reports because of it.
Just reported a bug:
Dll’s compiled based on UnityEngine/Editor.dll before Unity 4.1.1 produce errors in MonoDevelop/Xamarin Studio/Visual Studio.
Case 534056
@Izitmee: When a minor version breaks multiple packages from the asset store that’s always a bug!
We got all the info we need on this one, now we just have to find the right solution for everyone moving forward. That may be changing the references of existing DLLs to a signed ones like jbevain’s package does or it may be something else so please keep backups of your original DLLs until we know for sure.
Just a question, if I downgrade back to 4.1.0 will this problem be gone? you were talking between 4.0.1 and 4.1.1, but there is version 4.1.0 between these two!
Thanks:
Great, thanks UnLogick for the reassurance ![]()
@Zozo2099: 4.1.0 is safe. I rolled back to it and have no such problems.
We’ve temporarily pulled 4.1.1 from the website due to this problem, read here for details. http://forum.unity3d.com/threads/175263-Unity-4-1-1-update-rolled-back-sorry
I need this: https://dl.dropbox.com/u/1119248/DX11Examples-4.0.0b7.zip.
But I just can not download it.
So can you send it to my email: haoxutao88@126.com?
Please.
I need this: https://dl.dropbox.com/u/1119248/DX11Examples-4.0.0b7.zip.
But I just can not download it.
So can you send it to my email: haoxutao88@126.com?
Please.
