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

Bug: Generated code references M31.FluentApi #37

Open
vzam opened this issue Jan 8, 2025 · 0 comments
Open

Bug: Generated code references M31.FluentApi #37

vzam opened this issue Jan 8, 2025 · 0 comments

Comments

@vzam
Copy link

vzam commented Jan 8, 2025

Since FluentApi is a source generator, you have rightfully mentioned in the readme, that PrivateAssets="all" should be configured. This causes issues when using the generated APIs if FluentApi is not referenced in the project which depends on the project using the source generator:

System.TypeLoadException: Could not load type 'IGeneratedApi' from assembly 'ProjectUsingFluentApi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'

This is because all usings in the source file where [FluentApi] is used are copied over into the generated code, including usings of the M31.FluentApi.Attributes namespace.

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