Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Way to turn off the internal UnitOf attributes #63

Open
megakid opened this issue Jan 20, 2025 · 0 comments
Open

Way to turn off the internal UnitOf attributes #63

megakid opened this issue Jan 20, 2025 · 0 comments

Comments

@megakid
Copy link

megakid commented Jan 20, 2025

It would be great to be able to turn off the attributes so we can reference other libs in our solution that already have unitgenerator installed and still be able to use the InternalsVisibleTo feature.

e.g.

Lib A <-- consumes -- Lib B [InternalsVisibleTo(LibA)]

Lib A and Lib B both use UnitOf<> and reference unitgenerator

This setup results in a LibA compilation error:

The type 'UnitGenerateOptions' in 'UnitGenerator\UnitGenerator.SourceGenerator2\UnitOfAttribute.g.cs' conflicts with the imported type 'UnitGenerateOptions' in 'LibB, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'UnitGenerator\UnitGenerator.SourceGenerator2\UnitOfAttribute.g.cs'.

See this post here: https://andrewlock.net/creating-a-source-generator-part-8-solving-the-source-generator-marker-attribute-problem-part2/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant