From cce7ea22d26ac6560398a9f2eac9a6f7aa39ca0d Mon Sep 17 00:00:00 2001 From: Genevieve Warren Date: Mon, 9 Mar 2020 15:36:53 +0200 Subject: [PATCH 1/3] fixes #2816; document AssetTargetFallback --- docs/core/project-sdk/msbuild-props.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/core/project-sdk/msbuild-props.md b/docs/core/project-sdk/msbuild-props.md index 1a7746f6adcc4..ad9ccd83fa274 100644 --- a/docs/core/project-sdk/msbuild-props.md +++ b/docs/core/project-sdk/msbuild-props.md @@ -148,6 +148,21 @@ The `PackageReference` item lets you specify a NuGet dependency. For example, yo For more information, see [Package references in project files](/nuget/consume-packages/package-references-in-project-files). +### AssetTargetFallback + +The `AssetTargetFallback` property lets you specify additional compatible target frameworks for projects that your project references and NuGet packages that your project consumes. For example, if you specify a package dependency using `PackageReference` but that package doesn't contain assets that are compatible with your projects's `TargetFramework`, the `AssetTargetFallback` property comes into play. The compatibility of the referenced package is rechecked using each target framework that's specified in `AssetTargetFallback`. + +You can set the `AssetTargetFallback` property to one or more target frameworks that are compatible with your project. + +```xml + + ... + + netcoreapp2.0 + + +``` + ### Pack and restore targets MSBuild 15.1 introduced `pack` and `restore` targets for creating and restoring NuGet packages as part of a build. For information about the MSBuild properties for these targets, including `PackageTargetFallback`, see [NuGet pack and restore as MSBuild targets](/nuget/reference/msbuild-targets). From 9c2142527df24e4a060b83ef47a26b2914dbf47f Mon Sep 17 00:00:00 2001 From: Genevieve Warren Date: Mon, 9 Mar 2020 15:51:54 +0200 Subject: [PATCH 2/3] review on staging --- docs/core/project-sdk/msbuild-props.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/core/project-sdk/msbuild-props.md b/docs/core/project-sdk/msbuild-props.md index ad9ccd83fa274..0f341417c92ac 100644 --- a/docs/core/project-sdk/msbuild-props.md +++ b/docs/core/project-sdk/msbuild-props.md @@ -132,6 +132,7 @@ For more information, see [C# language versioning](../../csharp/language-referen ## NuGet packages - [PackageReference](#packagereference) +- [AssetTargetFallback](#assettargetfallback) ### PackageReference @@ -150,15 +151,15 @@ For more information, see [Package references in project files](/nuget/consume-p ### AssetTargetFallback -The `AssetTargetFallback` property lets you specify additional compatible target frameworks for projects that your project references and NuGet packages that your project consumes. For example, if you specify a package dependency using `PackageReference` but that package doesn't contain assets that are compatible with your projects's `TargetFramework`, the `AssetTargetFallback` property comes into play. The compatibility of the referenced package is rechecked using each target framework that's specified in `AssetTargetFallback`. +The `AssetTargetFallback` property lets you specify additional compatible framework versions for projects that your project references and NuGet packages that your project consumes. For example, if you specify a package dependency using `PackageReference` but that package doesn't contain assets that are compatible with your projects's `TargetFramework` version, the `AssetTargetFallback` property comes into play. The compatibility of the referenced package is rechecked using each framework version that's specified in `AssetTargetFallback`. -You can set the `AssetTargetFallback` property to one or more target frameworks that are compatible with your project. +You can set the `AssetTargetFallback` property to one or more [target framework versions](../../standard/frameworks.md#supported-target-framework-versions). ```xml ... - netcoreapp2.0 + netstandard1.6 ``` From 9c5d5a418f82a0fb30edd878bbc88f2f27e94143 Mon Sep 17 00:00:00 2001 From: Genevieve Warren Date: Tue, 10 Mar 2020 07:53:22 +0200 Subject: [PATCH 3/3] Apply suggestions from nikolche Co-Authored-By: Nikolche Kolev --- docs/core/project-sdk/msbuild-props.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/core/project-sdk/msbuild-props.md b/docs/core/project-sdk/msbuild-props.md index 0f341417c92ac..808c00006556b 100644 --- a/docs/core/project-sdk/msbuild-props.md +++ b/docs/core/project-sdk/msbuild-props.md @@ -151,7 +151,7 @@ For more information, see [Package references in project files](/nuget/consume-p ### AssetTargetFallback -The `AssetTargetFallback` property lets you specify additional compatible framework versions for projects that your project references and NuGet packages that your project consumes. For example, if you specify a package dependency using `PackageReference` but that package doesn't contain assets that are compatible with your projects's `TargetFramework` version, the `AssetTargetFallback` property comes into play. The compatibility of the referenced package is rechecked using each framework version that's specified in `AssetTargetFallback`. +The `AssetTargetFallback` property lets you specify additional compatible framework versions for projects that your project references and NuGet packages that your project consumes. For example, if you specify a package dependency using `PackageReference` but that package doesn't contain assets that are compatible with your projects's `TargetFramework`, the `AssetTargetFallback` property comes into play. The compatibility of the referenced package is rechecked using each target framework that's specified in `AssetTargetFallback`. You can set the `AssetTargetFallback` property to one or more [target framework versions](../../standard/frameworks.md#supported-target-framework-versions). @@ -159,7 +159,7 @@ You can set the `AssetTargetFallback` property to one or more [target framework ... - netstandard1.6 + net461 ```