AaronRobinsonMSFT / DNNE

Prototype native exports for a .NET Assembly.
MIT License
406 stars 41 forks source link

Invalid macro generated when project name contains '-' #46

Closed Executor-Cheng closed 3 years ago

Executor-Cheng commented 3 years ago

https://github.com/AaronRobinsonMSFT/DNNE/blob/fb427da952087abbf6f7e21eb511dad634560774/src/dnne-gen/Generator.cs#L369 Maybe there should be assemblyName.Replace('.', '_').Replace('-', '_').ToUpperInvariant()?

AaronRobinsonMSFT commented 3 years ago

@Executor-Cheng Thanks for reporting this issue. I will get to this as soon as I can. Your proposed fix seems reasonable to me so feel free to submit a PR if you want. I guess it might make sense to think about other characters that might play havoc with this.