C
C#5w ago
water_bear

Failing to recompile Unity.SourceGenerators as type "Enumerator" isn't a valid name or namespace.

Hello! I have been trying to recompile Unity.SourceGenerators so I can reimplement it in a solution, but the class TypeNameHelper.cs has a field where it attempts to initialize a class/type "Enumerator", but VS can't find it. I've tried the potential solutions, such as IEnumerator, enum, and IEnumerable name changes, as well as some formatting changes, but nothing seems to resolve it. My main question is is this just a missing class/dependency I should have in the Unity.SourceGenerators project, or is it something that's just an older class that's now been replaced with something else? Picture attached, let me know if you need any more info, thanks!
No description
6 Replies
ero
ero5w ago
couple questions. what is Unity.SourceGenerators? i can't find any info or source for it. why do you feel the need to compile it from source? have you checked what dependencies Unity.SourceGenerators has and if you're missing them?
water_bear
water_bearOP5w ago
It's basically a runtime C# generator, and it relies on Microsoft.CodeAnalysis and Microsoft.CodeAnalysis.CSharp, both of which I installed into the solution via CLI. Apart from that, I am wanting to recompile it to see if I can resolve some errors I was getting in Unity Engine trying to build a project. Lots of duplicate reference build fails referencing SourceGenerators specifically, so I want to build one separate from the Engine and see if putting it in the project manually can help.
ero
ero5w ago
oh, you decompiled it. i'm not sure we can help here
water_bear
water_bearOP5w ago
Ah, no worries. Thanks for letting me know!
ero
ero5w ago
but looking online, it seems like a lot of people have similar issues to you maybe a post on the $unity server or the unity forums can get you some help
Want results from more Discord servers?
Add your server