Conversation
| @@ -95,7 +95,7 @@ public void SourceNotAssemblyWithDestination() | |||
|
|
|||
| Assert.True(task.Execute()); | |||
|
|
|||
| AssertEx.AssertEqualToleratingWhitespaceDifferences($$""" | |||
| AssertEx.AssertContainsToleratingWhitespaceDifferences($$""" | |||
There was a problem hiding this comment.
This is a behavior change, as SRM will throw on invalid files, while the previous MvidReader did not. There is code in CopyRefAssembly that handles the MvidReader throwing, which makes me not sure of what the intention is.
Is this change OK, or should we update CopyRefAssembly to swallow the exceptions during MVID reading?
Is this safe to do? Is it possible that some existing tools will stop working if the section isn't present? |
|
From what I'm seeing here, there are a few external tools (F# and dnlib) that write an |
jaredpar
left a comment
There was a problem hiding this comment.
Waiting for confirmation from msbuild about these dependencies
Fixes #82653.
Partially reverts #19133
As explained in the linked issue, the
CopyRefAssemblytask is now able to useSystem.Reflection.Metadatato read the reference assembly's MVID from theModuletable, which means that we no longer have to duplicate it in the.mvidPE section.This PR updates
CopyRefAssemblyto use SRM, and updatesPeWriterto stop writing the.mvidsection in reference assemblies.Microsoft Reviewers: Open in CodeFlow