Hi.
We have upgraded to 5.6 and now get compile errors. We use the Concurrent collections in System.Threading, the ConcurrentQueue is also defined in nunit.framework so the code does not compile.
I reported a bug on this, it seems like a bug that nunit.framework define types with same strongly typed name as System.Threading
I’m running into this issues as well.
Report Case 897850
Anybody know if there are work arounds to this problem>
We have the same issue.
Same issue here. Could not find a workaround that is reasonable.
To clear up, the problem isn’t that NUnit has it’s own ConcurrentQueue. It’s that NUnit seems to drag along it’s own version of System.Collections.Concurrent.
Which means that this code won’t compile:
public class Foo {
public void Bar() {
System.Collections.Concurrent.ConcurrentQueue<string> queue;
}
}
Which is an incredibly breaking bug. I think Unity automatically adds nunit as a dependency to projects these days. If you open the project in Visual Studio or something similar, and delete the nunit dependency, the code compiles in VS, but Unity dutifully ensures that the dependency’s always there.
The only possible work around is to wait for a patch or roll back to 5.5. Or create your own version of a concurrent queue?
Edit: Looking into this further, it seems like the System.Collections.Concurrent exists in 5.5(1f1), so this is probably not a breaking change.
We are on 5.5.3 and do not get the conflict
We want to test out Vulkan and the new lighting mode so I hope Unity sorts out this fast. Our netcode is heavily dependent on the different concurrent classes in the System.Threading assembly
Another factor for us is that we use the Gamesparks API which also defines System.Collections.Concurrent
It would be better if Unity used their own namespace for this class so it does not conflict for us that import the Actual .NET assembly
Hi, so I have been looking into this.
So the problem seem to come when more than one lib, as nunit and Gamesparks, implement System.Collections.Concurrent classes. .NET 2 that Unity ships with does not have fx. ConcurrentQueue.
Im working on to find a workaround so you guys are not blocked, and hopefully have one soon.
We are also fixing it, so there will not be any if these issues, in the next patch.
Just to be clear we use the 3.5 version of System.Threading assembly
Hi,
So there are no way to alias assemblies in Unity, wich one useally would do with errors like this. But I fixed the problem in nunit, and are publishing the new assemblies here, so no one needs to wait for a new patch.
http://files.unity3d.com/harald/nunit.zip
Unpack and overwrite the existing nunit assemblies at this location: \Editor\Data\UnityExtensions\Unity\TestRunner\
If any have any more issues please tell. Hopefully this should solve your issues. Sorry for the inconvenience.
Thanks i can now compile, but I get GL.End requires material.SetPass before! when the game starts
I still get errors in VS2017 btw, but it seems to compile from within Unity
Bumping this thread. Has anyone found a work around?
Works in 2017.1
Hi,
I’m getting the same problem in 2018.1.3 when I use the .NET 4 Equivalent Scripting Runtime Version and replacing the nunit files doesn’t seem to fix it. Any help would be appreciated.