Rewrite assembly identity must match tests to use in memory assemblies #18931
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While adding some rules and running tests I noticed that the new tests for assembly identity rule bumped the execution time from ~10s to ~30-40s in the console and to 1+min in VS. Also depending on machine state sometimes they failed when switching branches.
This was causing tests to generate a project and build it to get some dlls out and then load them, which for testing purposes is not worth it as it brings some flakiness, we should test rules with in memory assemblies as we just want to test that the rules are interpreting the metadata correctly.
Also I did some cleanup on the rule and improved a diagnostic message.