build: Include only generator dll
PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
PR Checklist
Please check if your PR fulfills the following requirements:
- [ ] Docs have been added/updated which fit documentation template (for bug fixes / features)
- [ ] Unit Tests and/or UI Tests for the changes have been added (for bug fixes / features) (if applicable)
- [ ] Validated PR
Screenshots Compare Test Runresults. - [ ] Contains NO breaking changes
- [ ] Associated with an issue (GitHub or internal) and uses the automatic close keywords.
- [ ] Commits must be following the Conventional Commits specification.
Other information
Internal Issue (If applicable):
@Youssef1313 Roslyn is likely loading those files in the current appdomain, making the generator work as a result. We could make this work differently by adjusting this: https://github.com/unoplatform/uno/blob/cf70e8e8ec4389d80269122280b5083066724958/src/SourceGenerators/Uno.UI.SourceGenerators/Helpers/DependenciesInitializer.cs#L16-L51
I think we should never need DependenciesInitializer actually. I'll see how this can be improved. One possible challenge is that Uno.UI.SourceGenerators is consumable via Uno.UI package and also via ProjectReferences in our solution. That makes handling its dependencies a bit harder.
I also don't think generators should need to manually include themselves via <Analyzer Include=...
@jeromelaban The <Analyzer Include=... part is only for Roslyn generators right? It has nothing to do with Uno.SourceGeneration?
@jeromelaban The
<Analyzer Include=...part is only for Roslyn generators right? It has nothing to do withUno.SourceGeneration?
Correct. Uno.Sourcegeneration does not use the Analyzer msbuild item.