[One .NET] $(AndroidEnablePreloadAssemblies)=False by default (#5790) #5914
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.
Fixes: #5838
Context: e0da1f1
Partially reverts 522d7fb which
reverted d13d0f9
The
$(AndroidEnablePreloadAssemblies)
property controlswhether or not all
.dll
files contained within a.apk
areloaded during process startup. Not doing so reduces process
startup times, which is desirable, but this also caused certain
Xamarin.Forms apps to fail to run as they previously had, as
not loading all assemblies during startup broke their
Dependency Injection infrastructure.
For .NET 6, we feel we have some "wiggle-room" to change default
semantics, so for .NET 6 projects set the default value of
$(AndroidEnablePreloadAssemblies)
to False, so that assemblies arenot pre-loaded during process startup.
$(AndroidEnablePreloadAssemblies)
can be set to True within theapp's
.csproj
file to return to "legacy" semantics. This willcause all assemblies to be loaded during startup, with a
commensurate increase in app startup overheads.