Skip to content

Conversation

labbbirder
Copy link
Contributor

This should be the fix of the following issue:

When injecting [assembly:InternalsVisibleTo], the referenced assembly can not be resolved.

@handzlikchris
Copy link
Owner

thanks - I'll check it out.

Can't say I've seen this error - can you share how to repro?

@labbbirder
Copy link
Contributor Author

I retried to repro it, but the problem no longer occurs, even I recovered my workspace with git reset --hard to that point.

The issue first arose when I initially integrated FSR into my project. Every time I saved a file, the reload callback threw an AssemblyResolutionException (Cecil failed to resolve UniTask.dll during the assembly.Write operation inside CreateAssemblyWithInternalsContentsVisibleTo). This persisted until I made the changes described in this edition.

Upon reviewing the injection code, everything appears to be correct. There is no reason for Cecil to import UniTask for just importing a BCL attribute InternalsVisibleTo.

My project also includes other weaving and detouring tools, which may introduce the possibility of a race condition (the most likely I think).

This pull request can remain as a draft until anyother encouters with it, and I'll provide more information about it when I find something.

@aindrigo
Copy link

aindrigo commented Sep 6, 2025

I just encountered this same issue in my project, I think it might have something to do with FishNet as I've looked through their discord server and found a few other people reporting the same problem, although from an older version.

Here is the log, not sure if it'll help or not.

Going to just uninstall FSR temporarily and wait for a fix, but I will make a full copy of my project before I do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants