Publish support in SDK for Native Aot Application#24693
Merged
LakshanF merged 18 commits intodotnet:mainfrom Apr 22, 2022
Merged
Publish support in SDK for Native Aot Application#24693LakshanF merged 18 commits intodotnet:mainfrom
LakshanF merged 18 commits intodotnet:mainfrom
Conversation
sbomer
reviewed
Apr 5, 2022
tlakollo
reviewed
Apr 13, 2022
Contributor
|
Also, we are missing something that enables the analyzer (EnableAotAnalyzer) if PublishAot is set to true |
agocke
reviewed
Apr 14, 2022
Member
agocke
left a comment
There was a problem hiding this comment.
I realized when looking through darc -- we already have a subscription here for the other runtime stuff. No need to set up anything new
agocke
approved these changes
Apr 22, 2022
Comment on lines
+149
to
+156
| try | ||
| { | ||
| var metadataReader = peReader.GetMetadataReader(); | ||
| }catch(InvalidOperationException) | ||
| { | ||
| returnValue = true; | ||
| } | ||
| catch(Exception){} |
Member
There was a problem hiding this comment.
Nit: peReader.HasMetadata is the property to use here.
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.
Add support to publish
NativeAotapplications via the SDK with 3 parts:Microsoft.DotNet.ILCompiler, to the SDK via bundling. This is similar to howMicrosoft.NET.ILLink.Taskspackage is leveraged.Version.Details.xml, Versions.props, and BundledSdks.targetsMicrosoft.DotNet.ILCompilerpackage to contain asdk.targetsin a SDK directory. This needs to be added in the runtime repo where this package is builtRuntime.**RID**.Microsoft.DotNet.ILCompilerwhich contains tools, runtime and Framework libraries.Stage0MicrosoftNETCoreAppRefPackageVersionPathProcessFrameworkReferencestask and get back package details,ResolvedILCompilerPackKnownILCompilerPackfor the standalone SDK to work since the above change seems to only work in the SDK repo environmentGivenThatWeWantToPublishAnAotApp.cs, to validate that PublishAot produces a native application. Linux support via running the tests in a container as well as additional test scenarios for native libraries (static and shared) have been added in subsequent PRsAssumes that there is a
darcchannel to get the required package between runtime repo and sdk