Skip to content

Produce SDK-only archive file without shared frameworks #11211

Open
@mthalman

Description

@mthalman

Currently the SDK is shipped as a monolithic archive file that includes the SDK and shared frameworks (Microsoft.NETCore.App, Microsoft.AspNetCore.App, Microsoft.WindowsDesktop.App). But there is a need for the ability to construct a .NET installation piecemeal.

A scenario where this would be used is with Docker images. As part of the changes in dotnet/dotnet-docker#1351 and dotnet/dotnet-docker#1814, the SDK image will now be based on the ASP.NET image, which itself is based on the runtime image. This kind of layering means that each framework will be installed individually. The runtime image installs Microsoft.NETCore.App and dotnet.exe. The ASP.NET image builds on top of the runtime image by also installing Microsoft.AspNetCore.App. The SDK image builds on top of the ASP.NET image by also installing the SDK and Microsoft.WindowsDesktop.App. This layered approach requires that the SDK and frameworks be made available as separate archive files so they can be retrieved individually.

Another scenario is the concept of a single SDK that can be shipped with multiple runtime versions.

Both scenarios are discussed here: dotnet/dotnet-docker#1482 (comment).

Without this kind of componentization of the SDK archive, it requires implementers of piecemeal installation to have very specific knowledge of the .NET installation folder structure so that it only pulls out the components it needs. For example, the command to retrieve just the SDK-only components from the SDK archive file would look something like this: tar -C /usr/share/dotnet -oxzf dotnet.tar.gz ./packs ./sdk ./templates. This kind of dependency with consumers is fragile and can easily lead to breakage if changes are made to the folder structure.

The proposal is to produce an archive file of the SDK that contains only the components that are SDK-specific and none of the shared frameworks. This would essentially consist of the following folders: packs, sdk, templates.

Another thing to consider is LICENSE.TXT and ThirdPartyNotices.txt, related to dotnet/installer#7043, which should probably be moved into a relevant sub-folder.

This work should also be done in conjunction with https://github.com/dotnet/wpf/issues/2865. Without the WindowsDesktop package being available as a separate archive file, having an SDK-only archive file doesn't provide much benefit for Windows scenarios.

cc @MichaelSimons, @richlander @mmitche

Metadata

Metadata

Assignees

No one assigned

    Labels

    For considerationUsed for items on the backlog to raise them to the top of that list for discussionPartner requestrequests from partners

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions