Skip to content

Bug: Generated code references M31.FluentApi #37

@vzam

Description

@vzam

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions