Repository navigation
build: fix AOT and IDE integration - #2378
Merged
Merged
Conversation
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Make the AOT compilation property explicitly passed to the `dotnet publish` command in the various distribution scripts, rather than being the default in the main CLI csproj. We do this so that design-time tools such as Avalonia editors in IDEs and editors can load and render the views from IL. We still set the `IsAotCompatible` property to true in the csproj to ensure the AOT analysers are still being run, warning if we use an API or pattern that is not AOT friendly when developing Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
The EnableNtlmView code-behind file (EnableNtlmView.cs) should be named with the .axaml.cs extension, like all the others. This is just a convention so that IDEs correctly nest the .cs file with the actual XAML file (.axaml) and does not impact the behaviour of the compilation. Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Use of `Marshal.SizeOf(Type)` is not AOT safe depending on the type. Warning IL3050 was being emitted due to its use in WindowsSystemPrompts. Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Address follow-up issues from the Native AOT and build-system changes. Distribution builds remain AOT by default, while normal and design-time builds produce IL that IDE tooling such as the Avalonia previewer can load.
What changes
PublishAotfrom the main project into the platform publish scripts.IsAotCompatible.Marshal.SizeOf<T>().There is no intended runtime behavior change.
Testing
dotnet build git-credential-manager.slnxFollow-up to #2366 and #2367.