Editor assembly loading issues - "unloading broken assembly", "could not load signature"

I got pinged after you linked to this post in the bug. And its not closed any more

1 Like

@HaraldNielsen @xoofx

Case 1193928
Case 1196416

I’ve tested in 2020.1.0b5 and it keeps failing, in fact, now it doesn’t even work in the same folder anymore. I mean, it’s broken even more. It used to at least work in the same folder, now it doesn’t:

Same folder:

5754901--605527--upload_2020-4-23_19-15-12.png

Different folder (UPM packages using @xoofx https://github.com/xoofx/UnityNuGet):

5754901--605539--upload_2020-4-23_19-21-8.jpeg

https://issuetracker.unity3d.com/issues/could-not-load-file-or-assembly-error-when-assembly-dependency-is-in-another-folder

https://issuetracker.unity3d.com/issues/error-with-net-standard-2-dot-0-assemblies-depending-on-their-place-in-assets

https://discussions.unity.com/t/763095

Yes now we do the validation and write out if the versions do not match, you need to disable the verification on the plugin to force it. Problem with relying on same folder is that any update of our Mono Runtime can have the possibility to “fix” it, so it will not work in same folder. Hopefully we have the bindingsRedirect done by then.

@HaraldNielsen In 2020.1b it only works unchecking “Validate References” if it’s in the same folder. On different folder it doesn’t work even If I uncheck “Validate References”.

It’s someone working on bindingsRedirect feature? Estimated ETA?

Any updates on this?

Yes, im currently working on a solution

2 Likes

I’m having the same issue in 2019.4.9f1. I used the workaround using the dlls in the same folder, and while I do get the following warning, it seems to work. Proper redirect bindings would be really nice though.

its been awhile, I also have this problem, was working until it didnt.

Yes, only now we got to work on this issue :slight_smile: Currently also finding out of possible backports ect.

3 Likes

Thanks Harald, appreciate your efforts

I’m sure people consider this edge case but with the direction .NET is going I think Unity has to keep up to date within the dotnet ecoystem and play nicely there

I’m afraid for you that the next step is to get a nuget package system working. A few Unity packages already provide assemblies, either Unity has to keep track of their assemblies within all their packages, which may leave their hands tied, or add nuget support so that packages and project can negotiate versions nicely.

That would also make it better for package developers like myself. Playing with other packages and required assemblies is a nightmare at the moment. For example the ECS system brings in a different version of Newtonsfot Json, and also
System.Runtime.CompilerServices.Unsafe. I have a package for providing microsoft extesnsions logging, and another for NLog. The introduction of the assembly in ECS broke things for me

2 Likes

@Bortos I totally agree with you about this, and we are super aware of these things.
One thing is the direction of .NET but supporting general tooling that .NET offers would be super helpful as a developer.

2 Likes

Fyi, a solution has landed in 2021.1 “Scripting: Add option to disable Signed Assembly version validation. (1193928)”

Im currently looking into getting this back to 2020 as well.

Let me know of your thoughts on the solution, or if you find any issues

4 Likes

As I saw you are also targeting 2019.4.x LTS as well, I’m glad you care about those of us who are “tied” to the LTS versions.

1 Like

@bdovas I can confirm this morning that we are also backporting to 2019.4 :slight_smile:

5 Likes

This effects another open issue so linking that here as well.

1 Like

@HaraldNielsen I have some doubts with that “new checkbox”:

  1. Would it fix the fact that dlls can be in different directories? I remember you mentioned something about a bug in Mono. This is what limits us a lot since we have converted to UPM packages and each one has its own dlls.
  2. I understand that if we check that checkbox it will still validate the absence of a dependency anyway, right?

And finally any ETA on 2019.4.x LTS? Thanks!!!

@dbovaz

1: Yes it will fix the Mono issue. So no errors when assemblies is in separate folders.
2: Yes there will still be validation of missing references for Plugins/dll’s - now we just skip the Signed Version validation when the Checkbox is unchecked.

Ill ping community with this here, if they have any information about 2019.4.x :slight_smile:

2 Likes

I see that it’s finally fixed in:

2021.1.0a2
2020.2.2f1
2019.4.17f1

@HaraldNielsen I have found a small bug in the editor and if I have configured the backend scripting in IL2CPP I get the checkbox disabled because I understand that this problem does not affect IL2CPP but in the editor uses Mono. To solve it I have had to change the backend scripting to Mono, disable the checkbox and put IL2CPP back.

Is there any way to remove this annoying warnings?

I tried this thread but it didn’t work and I have no way to check if it is reading the app.config file or not:

Oh yes I can see that being a problem! Will look into it. Can I get you to report a bug?

@HaraldNielsen Case 1307810

What about this problem @HaraldNielsen ?? I remember that you played with app.config files and made some tests with them.