Skip to content

Use live apphost build in crossgen2 #66866

@am11

Description

@am11

CG2 sets AppHostRuntimeIdentifier which tells SDK to use specific platform apphost from prebuilt NuGet packages.

<AppHostRuntimeIdentifier>$(Crossgen2PackageRID)</AppHostRuntimeIdentifier>

The non-MSFT package maintainers have option to build custom apphost package and push it to their nuget feed (e.g. local file system or organization nuget server), then add that feed in NuGet.config to use the custom apphost.
<!--

On community-supported platforms, such as FreeBSD, similar approach is used to build CG2 binary (since there is no microsoft.netcore.app.crossgen2.freebsd-x64.<version>.nupkg availabe in runtime's official nuget feed). However, when cross-compiling CG2 on FreeBSD in CI, we have disabled CG2 because we don't use multi-stage build (i.e. first build apphost, publish it to local nuget feed, then build the product with that apphost).

Therefore, if we use live-build of apphost in CG2 build, at least on community platforms; similar to what was done for testhost:

<UseLiveBuiltDotNetHost Condition="'$(TargetArchitecture)' == 's390x' or '$(TargetArchitecture)' == 'armv6'">true</UseLiveBuiltDotNetHost>

we can avoid the multi-stage build overhead and bring community platforms on the same plan as the official ones (as far as CG2 is concerned).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions