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
The register-protocol optimization is used to determine whether static interface constructors from the managed-static registrar are trimmed away or not:
Driver.Log(4,"Did not optimize static constructor in the protocol interface {0}: the 'register-protocols' optimization is disabled.",method.DeclaringType.FullName);
returnfalse;
}
and this is required to get smaller apps + not reference frameworks unnecessarily (see #21002).
The current workaround is to add this to the csproj:
The register-protocol optimization is required to be able to remove the static interface constructors (because otherwise the removed static constructors are needed at runtime), so the only other option is to apply the register-protocol optimization even when the interpreter is enabled. At the moment I can't see any reason why this shouldn't work.
…er is enabled. Fixes#21782.
In .NET we don't support loading assemblies at runtime (from outside the app
bundle), which means that we should also be able to enable the
register-protocol optimization when the interpreter is enabled (because we
know all the relevant assemblies at built time).
Fixes#21782.
…er is enabled. Fixes#21782.
In .NET we don't support loading assemblies at runtime (from outside the app
bundle), which means that we should also be able to enable the
register-protocol optimization when the interpreter is enabled (because we
know all the relevant assemblies at built time).
Fixes#21782.
See:
xamarin-macios/tools/common/Optimizations.cs
Line 268 in f29834a
The
register-protocol
optimization is used to determine whether static interface constructors from the managed-static registrar are trimmed away or not:xamarin-macios/tools/linker/CoreOptimizeGeneratedCode.cs
Lines 1365 to 1377 in f29834a
and this is required to get smaller apps + not reference frameworks unnecessarily (see #21002).
The current workaround is to add this to the csproj:
The text was updated successfully, but these errors were encountered: