You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proposal: CsWinRT should enable AOT and single-file analyzers
Summary
While CsWinRT currently doesn't support AOT yet (I mean it kinda works in some scenarios if you try really hard, but it's not officially supported nor really usable in general), one issue it has is also that it doesn't come with AOT and single-file analyzers at all. This makes it even more difficult to try to make things work, as it's not really easy to understand which paths might potentially cause issues.
Both analyzers should be enabled, and the relative annotations should be added when needed, so that warnings will correctly propagated to callsites. Note: this doesn't mean CsWinRT has to be AOT-compatible from the get go: enabling analyzers is orthogonal in this sense and it will at least provide users with a better developer experience. It should then also make it easier to migrate things, as it'll clearly highlight code paths that can potentially break down and when.
In general, CsWinRT should enable these two MSBuild flags and add all necessary annotations:
Proposal: CsWinRT should enable AOT and single-file analyzers
Summary
While CsWinRT currently doesn't support AOT yet (I mean it kinda works in some scenarios if you try really hard, but it's not officially supported nor really usable in general), one issue it has is also that it doesn't come with AOT and single-file analyzers at all. This makes it even more difficult to try to make things work, as it's not really easy to understand which paths might potentially cause issues.
Both analyzers should be enabled, and the relative annotations should be added when needed, so that warnings will correctly propagated to callsites. Note: this doesn't mean CsWinRT has to be AOT-compatible from the get go: enabling analyzers is orthogonal in this sense and it will at least provide users with a better developer experience. It should then also make it easier to migrate things, as it'll clearly highlight code paths that can potentially break down and when.
In general, CsWinRT should enable these two MSBuild flags and add all necessary annotations:
These are on top of the (already enabled) trim analyzer.
The various attributes that will be needed are:
[RequiresDynamicCode]
[RequiresAssemblyFiles]
Rationale
The text was updated successfully, but these errors were encountered: