From c25ee511b7ade1b16b2e83fd72862d9c16fc9dc4 Mon Sep 17 00:00:00 2001 From: Nirmal Guru Date: Thu, 2 Dec 2021 08:44:38 +0530 Subject: [PATCH] Use .NET Test SDK instead of regular one - This adds props and targets from "Microsoft.NET.Test.Sdk". - Detect if using NuGet's Central Package versioning. - Fix some mistakes in the NuGet project files. --- .../Extensions/Directory.Packages.props | 1 + .../NuGet.Build.Sdk/NuGet.Build.Sdk.nuproj | 2 +- .../NuGet.Packaging.Sdk.nuproj | 2 +- Tests/Directory.Build.props | 24 ------------------- Tests/Directory.Build.targets | 3 +-- Tests/Directory.Packages.props | 10 +++----- .../MSBuild.Core.Tests.csproj | 2 +- .../MSBuild.NET.Tests.csproj | 2 +- global.json | 1 + 9 files changed, 10 insertions(+), 37 deletions(-) diff --git a/Sources/NuGet.Build.Sdk/Extensions/Directory.Packages.props b/Sources/NuGet.Build.Sdk/Extensions/Directory.Packages.props index cb0db464..9f92ba4b 100644 --- a/Sources/NuGet.Build.Sdk/Extensions/Directory.Packages.props +++ b/Sources/NuGet.Build.Sdk/Extensions/Directory.Packages.props @@ -18,6 +18,7 @@ + true true diff --git a/Sources/NuGet.Build.Sdk/NuGet.Build.Sdk.nuproj b/Sources/NuGet.Build.Sdk/NuGet.Build.Sdk.nuproj index 9182f04c..7f09f45e 100644 --- a/Sources/NuGet.Build.Sdk/NuGet.Build.Sdk.nuproj +++ b/Sources/NuGet.Build.Sdk/NuGet.Build.Sdk.nuproj @@ -11,7 +11,7 @@ $(PackageTags);nuget;build;pack;package;restore;dependency;reference An MSBuild SDK package that provides package reference support and dependency management to the projects. $(Summary) It adds a `Restore` target which facilitates downloading and referencing shared libraries from a remote server. - $(Summary) It also adds a `Pack` target which facilitates creation of such packages using project outputs with pre-determined layouts. + $(Description) It also adds a `Pack` target which facilitates creation of such packages using project outputs with pre-determined layouts. $(Description) It can be used either directly on your project (_via the `` element_) or in-directly (_via other SDKs which refer to it internally_). diff --git a/Sources/NuGet.Packaging.Sdk/NuGet.Packaging.Sdk.nuproj b/Sources/NuGet.Packaging.Sdk/NuGet.Packaging.Sdk.nuproj index 692a9fd0..159df355 100644 --- a/Sources/NuGet.Packaging.Sdk/NuGet.Packaging.Sdk.nuproj +++ b/Sources/NuGet.Packaging.Sdk/NuGet.Packaging.Sdk.nuproj @@ -8,7 +8,7 @@ NuGet Packaging Sdk NuGet.Packaging.Sdk 1.0.0 - $(PackageTags);nuget;build;packaging;project;sysytem;nuproj;pkgproj;sfxproj + $(PackageTags);nuget;build;packaging;project;system;nuproj;pkgproj;sfxproj An MSBuild SDK package that provides Project System support for NuGet package authoring. $(Summary) Having a separate Project System makes it possible to author complex NuGet packages, otherwise not possible with Pack targets. $(Description) One such need is to create a completely customized package with a custom layout that is different from the standard layout. diff --git a/Tests/Directory.Build.props b/Tests/Directory.Build.props index 1eadfa51..dba09e5b 100644 --- a/Tests/Directory.Build.props +++ b/Tests/Directory.Build.props @@ -2,36 +2,12 @@ - - NU1507 - True - True - - - - Strict - Enable - Latest - - - - false - - - - - - - - - - \ No newline at end of file diff --git a/Tests/Directory.Build.targets b/Tests/Directory.Build.targets index 0b3a9ae7..3d9e754a 100644 --- a/Tests/Directory.Build.targets +++ b/Tests/Directory.Build.targets @@ -1,8 +1,7 @@ - false - Program$(DefaultLanguageSourceExtension) + false diff --git a/Tests/Directory.Packages.props b/Tests/Directory.Packages.props index d2b177e7..da9b7231 100644 --- a/Tests/Directory.Packages.props +++ b/Tests/Directory.Packages.props @@ -1,7 +1,10 @@ + 2.0.3 + + 2.2.8 @@ -11,11 +14,4 @@ - - - - - - - \ No newline at end of file diff --git a/Tests/MSBuild.Core.Tests/MSBuild.Core.Tests.csproj b/Tests/MSBuild.Core.Tests/MSBuild.Core.Tests.csproj index 5f6c46c1..31714c4b 100644 --- a/Tests/MSBuild.Core.Tests/MSBuild.Core.Tests.csproj +++ b/Tests/MSBuild.Core.Tests/MSBuild.Core.Tests.csproj @@ -1,4 +1,4 @@ - + net6.0;net472 diff --git a/Tests/MSBuild.NET.Tests/MSBuild.NET.Tests.csproj b/Tests/MSBuild.NET.Tests/MSBuild.NET.Tests.csproj index 5f6c46c1..31714c4b 100644 --- a/Tests/MSBuild.NET.Tests/MSBuild.NET.Tests.csproj +++ b/Tests/MSBuild.NET.Tests/MSBuild.NET.Tests.csproj @@ -1,4 +1,4 @@ - + net6.0;net472 diff --git a/global.json b/global.json index fb5561ee..871cc70d 100644 --- a/global.json +++ b/global.json @@ -6,6 +6,7 @@ "MSBuild.Solution.Sdk": "1.0.0-dev.*", "MSBuild.NET.Sdk": "1.0.0-dev.*", + "MSBuild.NET.Test.Sdk": "1.0.0-dev.*", "MSBuild.NET.Legacy.Sdk": "1.0.0-dev.*", "NuGet.Build.Sdk": "1.0.0-dev.*",