xamarin-macios/dotnet/HIERARCHY.md

2.5 KiB

File layout

Microsoft.NET.Sdk.platform

  • WorkloadManifest.json: workload manifest that describes the different workloads for platform.
  • WorkloadManifest.targets: imports Microsoft.platform.Sdk if we're building for platform (based on TargetPlatformIdentifier).

Documentation

Microsoft.platform.Sdk

These files are imported into every project that references Microsoft.NET.Sdk:

Files are imported in the following order:

  1. Sdk/AutoImport.props: automatically imported into every build that references Microsoft.NET.Sdk. It has strict restrictions on what it can do, to make sure it doesn't break builds for other SDKs. It imports Microsoft.platform.Sdk.DefaultItems.props, where the default inclusion itemgroups are defined.

  2. The user's .csproj.

  3. Some early parts of Microsoft.NET.Sdk / Sdk.targets.

  4. WorkloadManifest.targets:

    • Sdk/Sdk.props: imported by WorkloadManifest.targets
    • targets/Microsoft.platform.Sdk.SupportedTargetPlatforms.props: lists which versions of platform are supported
    • targets/Xamarin.Shared.Sdk.TargetFrameworkInference.props: some TargetFramework logic.
    • targets/Microsoft.platform.Sdk.Versions.props: declares various properties related to version information.
    • targets/Xamarin.Shared.Sdk.props: imports other props files.

    We try to do as little as possible in this stage; only set properties and item groups that the rest of Microsoft.NET.Sdk requires.

  5. The rest of Microsoft.NET.Sdk / Sdk.targets.

  6. targets/Microsoft._platform_.Sdk.targets

    • targets/Microsoft.platform.Sdk.targets: contains logic specific to platform.
    • targets/Xamarin.Shared.Sdk.DefaultItems.targets: contains logic to enable the default behavior we want.
    • targets/Xamarin.Shared.Sdk.Publish.targets: contains logic to publish the app bundle.
    • targets/Xamarin.Shared.Sdk.targets: all of the build logic shared between all platforms.

Microsoft.platform.Ref

Contains reference assemblies.

Microsoft.platform.Runtime.[runtimeIdentifier]

Contains implementation assemblies and native bits.

Microsoft._platform.Templates

Contains project & item templates for each platform.