ThisAssembly icon indicating copy to clipboard operation
ThisAssembly copied to clipboard

Fails for assembly metadata containing `.`

Open Khitiara opened this issue 1 year ago • 3 comments

Describe the Bug

AssemblyMetadata attributes whose keys include the . characte those generate into invalid constant names and produce compiler errors.

Steps to Reproduce

[assembly: System.Reflection.AssemblyMetadata("A.B", "")]
[assembly: System.Reflection.AssemblyMetadata("A.C", "")]

Expected Behavior

Compilation to succeed.

Version Info

ThisAssembly 1.3.1

Additional Info

Discovered when using Verify which generates a few such metadata attributes during build

Khitiara avatar Jul 08 '23 03:07 Khitiara

Consider sponsoring @devlooped to bump the priority of this.

Otherwise, we'd gladly take a PR!

kzu avatar Aug 08 '23 23:08 kzu

This problem also causes a failure when you include the sentry.io SDK, since that adds a Senry.ProjectDirectory AssemblyMetadata attribute.

dmirmilshteyn avatar Sep 27 '23 03:09 dmirmilshteyn

Happy to take a PR 👌

kzu avatar Sep 27 '23 20:09 kzu