From adbf10e1b23f7446aac47f04e5f51304c52980f8 Mon Sep 17 00:00:00 2001 From: Chris Rummel Date: Fri, 22 Oct 2021 21:12:51 -0500 Subject: [PATCH 01/14] Re-enable fullfx TFM in NuGet. --- build/common.project.props | 3 +-- .../NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/build/common.project.props b/build/common.project.props index 2dae6391a63..fb8b2125f58 100644 --- a/build/common.project.props +++ b/build/common.project.props @@ -20,12 +20,11 @@ netstandard2.0 net6.0 $(NETFXTargetFramework);$(NETCoreTargetFramework) - $(NETCoreTargetFramework) + $(NETCoreTargetFramework) $(TargetFrameworksExe);netcoreapp5.0 $(NETCoreTargetFramework);netcoreapp5.0 $(TargetFrameworksExe);net6.0 $(NETFXTargetFramework);$(NetStandardVersion) - $(NetStandardVersion) $(TargetFrameworksLibrary);netcoreapp5.0 $(TargetFrameworksLibrary);net6.0 $(NETFXTargetFramework);netcoreapp5.0 diff --git a/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj b/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj index e95d23eb8a6..df64d13667a 100644 --- a/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj +++ b/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj @@ -203,7 +203,7 @@ ilmerge\ - Desktop/ + Desktop/ CoreCLR/ From 9b73ce620f560b276299985e4ecef8b176b49d9e Mon Sep 17 00:00:00 2001 From: Chris Rummel Date: Mon, 24 Jan 2022 13:40:41 -0600 Subject: [PATCH 02/14] Upgrade to new CommandLineUtils package. --- build/packages.targets | 3 ++- .../NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build/packages.targets b/build/packages.targets index 6f76ae916cb..37a859c07e2 100644 --- a/build/packages.targets +++ b/build/packages.targets @@ -10,6 +10,7 @@ 5.0.0 2.14.0-rtm-832 17.0.0-beta1-10402-05 + 5.0.1-rtm.21063.7 @@ -34,7 +35,7 @@ - + diff --git a/src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj b/src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj index 21015c00abf..e306cdee4d4 100644 --- a/src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj +++ b/src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj @@ -18,7 +18,7 @@ - + From 0d2131421e4ee00f8c6cca3e46135bbbe5e6b0ed Mon Sep 17 00:00:00 2001 From: Chris Rummel Date: Mon, 24 Jan 2022 13:40:56 -0600 Subject: [PATCH 03/14] Allow for .NET6 SDK as well as .NET5. --- .../HttpSource/HttpRequestMessageExtensions.cs | 6 +++--- .../NuGet.Protocol/HttpSource/HttpRetryHandler.cs | 2 +- .../HttpSource/HttpSourceAuthenticationHandler.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRequestMessageExtensions.cs b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRequestMessageExtensions.cs index 7c959526820..1ca751850f8 100644 --- a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRequestMessageExtensions.cs +++ b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRequestMessageExtensions.cs @@ -34,7 +34,7 @@ internal static HttpRequestMessage Clone(this HttpRequestMessage request) clone.Headers.TryAddWithoutValidation(header.Key, header.Value); } -#if NET5_0 +#if NET5_0 || NET6_0 var clonedOptions = (IDictionary)clone.Options; foreach (var option in request.Options) { @@ -118,7 +118,7 @@ public static void SetConfiguration(this HttpRequestMessage request, HttpRequest throw new ArgumentNullException(nameof(configuration)); } -#if NET5_0 +#if NET5_0 || NET6_0 request.Options.Set(new HttpRequestOptionsKey(NuGetConfigurationKey), configuration); #else request.Properties[NuGetConfigurationKey] = configuration; @@ -128,7 +128,7 @@ public static void SetConfiguration(this HttpRequestMessage request, HttpRequest private static T GetProperty(this HttpRequestMessage request, string key) { -#if NET5_0 +#if NET5_0 || NET6_0 if (request.Options.TryGetValue(new HttpRequestOptionsKey(key), out T result)) #else object result; diff --git a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRetryHandler.cs b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRetryHandler.cs index dc35858204b..d2006048458 100644 --- a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRetryHandler.cs +++ b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRetryHandler.cs @@ -113,7 +113,7 @@ public async Task SendAsync( headerStopwatch = new Stopwatch(); stopwatches.Add(headerStopwatch); } -#if NET5_0 +#if NET5_0 || NET6_0 requestMessage.Options.Set(new HttpRequestOptionsKey>(StopwatchPropertyName), stopwatches); #else requestMessage.Properties[StopwatchPropertyName] = stopwatches; diff --git a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpSourceAuthenticationHandler.cs b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpSourceAuthenticationHandler.cs index b9ab58ce734..ebf738e52b1 100644 --- a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpSourceAuthenticationHandler.cs +++ b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpSourceAuthenticationHandler.cs @@ -98,7 +98,7 @@ protected override async Task SendAsync(HttpRequestMessage { List stopwatches = null; -#if NET5_0 +#if NET5_0 || NET6_0 if (request.Options.TryGetValue( new HttpRequestOptionsKey>(HttpRetryHandler.StopwatchPropertyName), out stopwatches)) From 24ef9df80a717d2339736b3e4bff503234c8f250 Mon Sep 17 00:00:00 2001 From: Chris Rummel Date: Fri, 28 Jan 2022 15:23:52 -0600 Subject: [PATCH 04/14] Fix double-parentheses. --- build/packages.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/packages.targets b/build/packages.targets index 37a859c07e2..1f2a1b29dd8 100644 --- a/build/packages.targets +++ b/build/packages.targets @@ -35,7 +35,7 @@ - + From 261155f4b34e709a6717688b83177d868627453b Mon Sep 17 00:00:00 2001 From: Chris Rummel Date: Tue, 1 Feb 2022 07:28:57 -0600 Subject: [PATCH 05/14] Fix some build issues. --- build/packages.targets | 2 +- src/NuGet.Core/NuGet.Common/NuGet.Common.csproj | 3 ++- .../NuGet.Configuration/NuGet.Configuration.csproj | 5 +++-- src/NuGet.Core/NuGet.Credentials/NuGet.Credentials.csproj | 1 + src/NuGet.Core/NuGet.Packaging/NuGet.Packaging.csproj | 1 + src/NuGet.Core/NuGet.Protocol/NuGet.Protocol.csproj | 1 + src/NuGet.Core/NuGet.Versioning/NuGet.Versioning.csproj | 1 + 7 files changed, 10 insertions(+), 4 deletions(-) diff --git a/build/packages.targets b/build/packages.targets index 1f2a1b29dd8..a2fff686c3e 100644 --- a/build/packages.targets +++ b/build/packages.targets @@ -35,7 +35,7 @@ - + diff --git a/src/NuGet.Core/NuGet.Common/NuGet.Common.csproj b/src/NuGet.Core/NuGet.Common/NuGet.Common.csproj index e30a079ebf8..a5799d8758b 100644 --- a/src/NuGet.Core/NuGet.Common/NuGet.Common.csproj +++ b/src/NuGet.Core/NuGet.Common/NuGet.Common.csproj @@ -6,6 +6,7 @@ Common utilities and interfaces for all NuGet libraries. $(TargetFrameworksLibrary) $(TargetFrameworks);net45 + $(TargetFrameworks);netstandard2.0 $(NoWarn);CS1591;CS1574 true @@ -20,7 +21,7 @@ $(NETFXTargetFramework) - + diff --git a/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj b/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj index bbc5ba4808f..946ff887cdd 100644 --- a/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj +++ b/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj @@ -7,6 +7,7 @@ $(NoWarn);CS1591 $(TargetFrameworksLibrary) $(TargetFrameworks);net45 + $(TargetFrameworks);netstandard2.0 true true @@ -23,13 +24,13 @@ - + - + diff --git a/src/NuGet.Core/NuGet.Credentials/NuGet.Credentials.csproj b/src/NuGet.Core/NuGet.Credentials/NuGet.Credentials.csproj index 3eb83f382af..b349ff62b6b 100644 --- a/src/NuGet.Core/NuGet.Credentials/NuGet.Credentials.csproj +++ b/src/NuGet.Core/NuGet.Credentials/NuGet.Credentials.csproj @@ -5,6 +5,7 @@ NuGet client's authentication models. $(TargetFrameworksLibraryForSigning) + $(TargetFrameworks);netstandard2.0 true true diff --git a/src/NuGet.Core/NuGet.Packaging/NuGet.Packaging.csproj b/src/NuGet.Core/NuGet.Packaging/NuGet.Packaging.csproj index 5e75b6d8493..9d9c7a1973f 100644 --- a/src/NuGet.Core/NuGet.Packaging/NuGet.Packaging.csproj +++ b/src/NuGet.Core/NuGet.Packaging/NuGet.Packaging.csproj @@ -5,6 +5,7 @@ NuGet's understanding of packages. Reading nuspec, nupkgs and package signing. $(TargetFrameworksLibraryForSigning) + $(TargetFrameworks);netstandard2.0 $(NoWarn);CS1591;CS1574;CS1573;CS1572 $(NoWarn);CS0414 diff --git a/src/NuGet.Core/NuGet.Protocol/NuGet.Protocol.csproj b/src/NuGet.Core/NuGet.Protocol/NuGet.Protocol.csproj index 9b3209c25ed..0de4742b1e2 100644 --- a/src/NuGet.Core/NuGet.Protocol/NuGet.Protocol.csproj +++ b/src/NuGet.Core/NuGet.Protocol/NuGet.Protocol.csproj @@ -4,6 +4,7 @@ $(TargetFrameworksLibraryForSigning) + $(TargetFrameworks);netstandard2.0 $(NoWarn);CS1591;CS1573;CS0012 nuget protocol diff --git a/src/NuGet.Core/NuGet.Versioning/NuGet.Versioning.csproj b/src/NuGet.Core/NuGet.Versioning/NuGet.Versioning.csproj index 1802939446f..16b38e62519 100644 --- a/src/NuGet.Core/NuGet.Versioning/NuGet.Versioning.csproj +++ b/src/NuGet.Core/NuGet.Versioning/NuGet.Versioning.csproj @@ -5,6 +5,7 @@ $(TargetFrameworksLibrary) $(TargetFrameworks);net45 + $(TargetFrameworks);netstandard2.0 NuGet's implementation of Semantic Versioning. semver;semantic versioning From 4d08aee4f42694adfcd46c6cbd041a7d93e80779 Mon Sep 17 00:00:00 2001 From: Chris Rummel Date: Tue, 1 Feb 2022 09:47:04 -0600 Subject: [PATCH 06/14] Update for code review comment. --- .../HttpSource/HttpRequestMessageExtensions.cs | 6 +++--- .../NuGet.Protocol/HttpSource/HttpRetryHandler.cs | 2 +- .../HttpSource/HttpSourceAuthenticationHandler.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRequestMessageExtensions.cs b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRequestMessageExtensions.cs index 1ca751850f8..5b043e443ce 100644 --- a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRequestMessageExtensions.cs +++ b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRequestMessageExtensions.cs @@ -34,7 +34,7 @@ internal static HttpRequestMessage Clone(this HttpRequestMessage request) clone.Headers.TryAddWithoutValidation(header.Key, header.Value); } -#if NET5_0 || NET6_0 +#if NET5_0_OR_GREATER var clonedOptions = (IDictionary)clone.Options; foreach (var option in request.Options) { @@ -118,7 +118,7 @@ public static void SetConfiguration(this HttpRequestMessage request, HttpRequest throw new ArgumentNullException(nameof(configuration)); } -#if NET5_0 || NET6_0 +#if NET5_0_OR_GREATER request.Options.Set(new HttpRequestOptionsKey(NuGetConfigurationKey), configuration); #else request.Properties[NuGetConfigurationKey] = configuration; @@ -128,7 +128,7 @@ public static void SetConfiguration(this HttpRequestMessage request, HttpRequest private static T GetProperty(this HttpRequestMessage request, string key) { -#if NET5_0 || NET6_0 +#if NET5_0_OR_GREATER if (request.Options.TryGetValue(new HttpRequestOptionsKey(key), out T result)) #else object result; diff --git a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRetryHandler.cs b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRetryHandler.cs index d2006048458..16acceb511a 100644 --- a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRetryHandler.cs +++ b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRetryHandler.cs @@ -113,7 +113,7 @@ public async Task SendAsync( headerStopwatch = new Stopwatch(); stopwatches.Add(headerStopwatch); } -#if NET5_0 || NET6_0 +#if NET5_0_OR_GREATER requestMessage.Options.Set(new HttpRequestOptionsKey>(StopwatchPropertyName), stopwatches); #else requestMessage.Properties[StopwatchPropertyName] = stopwatches; diff --git a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpSourceAuthenticationHandler.cs b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpSourceAuthenticationHandler.cs index ebf738e52b1..1642a0efb4b 100644 --- a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpSourceAuthenticationHandler.cs +++ b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpSourceAuthenticationHandler.cs @@ -98,7 +98,7 @@ protected override async Task SendAsync(HttpRequestMessage { List stopwatches = null; -#if NET5_0 || NET6_0 +#if NET5_0_OR_GREATER if (request.Options.TryGetValue( new HttpRequestOptionsKey>(HttpRetryHandler.StopwatchPropertyName), out stopwatches)) From 000e5c752d3996a264cb7b2ed9ac64c71af26357 Mon Sep 17 00:00:00 2001 From: Chris Rummel Date: Tue, 1 Feb 2022 09:50:41 -0600 Subject: [PATCH 07/14] Updated for review comment to prevent warning as error. --- .../NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj b/src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj index e306cdee4d4..4ca0393b47f 100644 --- a/src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj +++ b/src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj @@ -6,7 +6,7 @@ NuGet executable wrapper for the dotnet CLI nuget functionality. $(TargetFrameworksExeForSigning) win7-x86 - $(NoWarn);CS1591;CS1701 + $(NoWarn);CS1591;CS1701;NU5104 Exe true true From 3e553fea6d32eaf3457fcb96da28059703ea0ca6 Mon Sep 17 00:00:00 2001 From: Chris Rummel Date: Tue, 1 Feb 2022 15:33:13 -0600 Subject: [PATCH 08/14] Address code review comments. --- build/common.project.props | 4 ++-- build/common.targets | 2 +- .../NuGet.Build.Tasks.Pack.csproj | 10 +++++----- src/NuGet.Core/NuGet.Common/NuGet.Common.csproj | 5 ++--- .../NuGet.Configuration/NuGet.Configuration.csproj | 3 +-- .../NuGet.Credentials/NuGet.Credentials.csproj | 1 - .../NuGet.Frameworks/NuGet.Frameworks.csproj | 3 +-- .../NuGet.PackageManagement.csproj | 2 +- .../NuGet.Packaging.Extraction.csproj | 2 +- src/NuGet.Core/NuGet.Packaging/NuGet.Packaging.csproj | 1 - src/NuGet.Core/NuGet.Protocol/NuGet.Protocol.csproj | 1 - .../NuGet.Versioning/NuGet.Versioning.csproj | 3 +-- 12 files changed, 15 insertions(+), 22 deletions(-) diff --git a/build/common.project.props b/build/common.project.props index fb8b2125f58..9b13d764c66 100644 --- a/build/common.project.props +++ b/build/common.project.props @@ -10,7 +10,6 @@ - $(DotNetBuildFromSource) PackageReference v4.7.2 net472 @@ -25,6 +24,7 @@ $(NETCoreTargetFramework);netcoreapp5.0 $(TargetFrameworksExe);net6.0 $(NETFXTargetFramework);$(NetStandardVersion) + $(NetStandardVersion);netstandard2.0 $(TargetFrameworksLibrary);netcoreapp5.0 $(TargetFrameworksLibrary);net6.0 $(NETFXTargetFramework);netcoreapp5.0 @@ -287,7 +287,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/build/common.targets b/build/common.targets index 0ab7d1e1600..736a9ee17b1 100644 --- a/build/common.targets +++ b/build/common.targets @@ -71,7 +71,7 @@ - + true diff --git a/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj b/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj index df64d13667a..831968ab984 100644 --- a/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj +++ b/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj @@ -62,7 +62,7 @@ + Condition="'$(TargetFramework)' != '' AND '$(IsXPlat)' != 'true' AND '$(DotNetBuildFromSource)' != 'true' AND '$(BuildingInsideVisualStudio)' != 'true'"> @@ -101,7 +101,7 @@ DependsOnTargets="GetILMergePlatformArg;DetermineILMergeNuGetPackInputsOutputs" Inputs="$(PathToBuiltNuGetPack);@(BuildArtifacts)" Outputs="$(PathToMergedNuGetPack)" - Condition="'$(TargetFramework)' != '' AND '$(IsBuildOnlyXPLATProjects)' != 'true' "> + Condition="'$(TargetFramework)' != '' AND '$(DotNetBuildFromSource)' != 'true' "> $([System.IO.Path]::GetDirectoryName($(PathToMergedNuGetPack))) @@ -202,18 +202,18 @@ - ilmerge\ + ilmerge\ Desktop/ CoreCLR/ - + $(PackagePathDir) $(PackagePathDir) - + $(PackagePathDir) diff --git a/src/NuGet.Core/NuGet.Common/NuGet.Common.csproj b/src/NuGet.Core/NuGet.Common/NuGet.Common.csproj index a5799d8758b..05c2d3598b7 100644 --- a/src/NuGet.Core/NuGet.Common/NuGet.Common.csproj +++ b/src/NuGet.Core/NuGet.Common/NuGet.Common.csproj @@ -5,8 +5,7 @@ Common utilities and interfaces for all NuGet libraries. $(TargetFrameworksLibrary) - $(TargetFrameworks);net45 - $(TargetFrameworks);netstandard2.0 + $(TargetFrameworks);net45 $(NoWarn);CS1591;CS1574 true @@ -21,7 +20,7 @@ $(NETFXTargetFramework) - + diff --git a/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj b/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj index 946ff887cdd..e3f4ceac735 100644 --- a/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj +++ b/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj @@ -6,8 +6,7 @@ NuGet's configuration settings implementation. $(NoWarn);CS1591 $(TargetFrameworksLibrary) - $(TargetFrameworks);net45 - $(TargetFrameworks);netstandard2.0 + $(TargetFrameworks);net45 true true diff --git a/src/NuGet.Core/NuGet.Credentials/NuGet.Credentials.csproj b/src/NuGet.Core/NuGet.Credentials/NuGet.Credentials.csproj index b349ff62b6b..3eb83f382af 100644 --- a/src/NuGet.Core/NuGet.Credentials/NuGet.Credentials.csproj +++ b/src/NuGet.Core/NuGet.Credentials/NuGet.Credentials.csproj @@ -5,7 +5,6 @@ NuGet client's authentication models. $(TargetFrameworksLibraryForSigning) - $(TargetFrameworks);netstandard2.0 true true diff --git a/src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj b/src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj index b78b1f2ea28..c726c6af3f8 100644 --- a/src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj +++ b/src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj @@ -4,8 +4,7 @@ NuGet's understanding of target frameworks. - $(TargetFrameworksLibrary);netstandard2.0 - $(TargetFrameworksLibrary);net40 + $(TargetFrameworksLibrary);net40 $(NoWarn);CS1591;CS1574;CS1573 true diff --git a/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj b/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj index dfbfcaa8d56..8153d049baa 100644 --- a/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj +++ b/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj @@ -35,7 +35,7 @@ - + diff --git a/src/NuGet.Core/NuGet.Packaging.Extraction/NuGet.Packaging.Extraction.csproj b/src/NuGet.Core/NuGet.Packaging.Extraction/NuGet.Packaging.Extraction.csproj index 18f73cf831a..de6b272a8a3 100644 --- a/src/NuGet.Core/NuGet.Packaging.Extraction/NuGet.Packaging.Extraction.csproj +++ b/src/NuGet.Core/NuGet.Packaging.Extraction/NuGet.Packaging.Extraction.csproj @@ -24,7 +24,7 @@ + Condition="'$(TargetFramework)' != '' AND '$(IsXPlat)' != 'true' AND '$(DotNetBuildFromSource)' != 'true' AND '$(BuildingInsideVisualStudio)' != 'true'"> diff --git a/src/NuGet.Core/NuGet.Packaging/NuGet.Packaging.csproj b/src/NuGet.Core/NuGet.Packaging/NuGet.Packaging.csproj index 9d9c7a1973f..5e75b6d8493 100644 --- a/src/NuGet.Core/NuGet.Packaging/NuGet.Packaging.csproj +++ b/src/NuGet.Core/NuGet.Packaging/NuGet.Packaging.csproj @@ -5,7 +5,6 @@ NuGet's understanding of packages. Reading nuspec, nupkgs and package signing. $(TargetFrameworksLibraryForSigning) - $(TargetFrameworks);netstandard2.0 $(NoWarn);CS1591;CS1574;CS1573;CS1572 $(NoWarn);CS0414 diff --git a/src/NuGet.Core/NuGet.Protocol/NuGet.Protocol.csproj b/src/NuGet.Core/NuGet.Protocol/NuGet.Protocol.csproj index 0de4742b1e2..9b3209c25ed 100644 --- a/src/NuGet.Core/NuGet.Protocol/NuGet.Protocol.csproj +++ b/src/NuGet.Core/NuGet.Protocol/NuGet.Protocol.csproj @@ -4,7 +4,6 @@ $(TargetFrameworksLibraryForSigning) - $(TargetFrameworks);netstandard2.0 $(NoWarn);CS1591;CS1573;CS0012 nuget protocol diff --git a/src/NuGet.Core/NuGet.Versioning/NuGet.Versioning.csproj b/src/NuGet.Core/NuGet.Versioning/NuGet.Versioning.csproj index 16b38e62519..9e428e7ec4a 100644 --- a/src/NuGet.Core/NuGet.Versioning/NuGet.Versioning.csproj +++ b/src/NuGet.Core/NuGet.Versioning/NuGet.Versioning.csproj @@ -4,8 +4,7 @@ $(TargetFrameworksLibrary) - $(TargetFrameworks);net45 - $(TargetFrameworks);netstandard2.0 + $(TargetFrameworks);net45 NuGet's implementation of Semantic Versioning. semver;semantic versioning From a2163141e9255763959642dcedec05c731b51c62 Mon Sep 17 00:00:00 2001 From: Chris Rummel Date: Wed, 2 Feb 2022 14:08:09 -0600 Subject: [PATCH 09/14] Fix bad copy-paste of TFM property. --- build/common.project.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/common.project.props b/build/common.project.props index 9b13d764c66..484a5f9d7d1 100644 --- a/build/common.project.props +++ b/build/common.project.props @@ -24,7 +24,7 @@ $(NETCoreTargetFramework);netcoreapp5.0 $(TargetFrameworksExe);net6.0 $(NETFXTargetFramework);$(NetStandardVersion) - $(NetStandardVersion);netstandard2.0 + $(NetStandardVersion);$(NetStandardVersion) $(TargetFrameworksLibrary);netcoreapp5.0 $(TargetFrameworksLibrary);net6.0 $(NETFXTargetFramework);netcoreapp5.0 From b06adf56c6c16395282c7fdeafe46c3cc9ae63b7 Mon Sep 17 00:00:00 2001 From: Chris Rummel Date: Thu, 17 Feb 2022 23:23:44 -0600 Subject: [PATCH 10/14] Fix missing TFM --- build/common.project.props | 2 +- src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/common.project.props b/build/common.project.props index 484a5f9d7d1..eab1fe6e6a9 100644 --- a/build/common.project.props +++ b/build/common.project.props @@ -24,7 +24,7 @@ $(NETCoreTargetFramework);netcoreapp5.0 $(TargetFrameworksExe);net6.0 $(NETFXTargetFramework);$(NetStandardVersion) - $(NetStandardVersion);$(NetStandardVersion) + $(NETCoreTargetFramework);$(NetStandardVersion) $(TargetFrameworksLibrary);netcoreapp5.0 $(TargetFrameworksLibrary);net6.0 $(NETFXTargetFramework);netcoreapp5.0 diff --git a/src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj b/src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj index c726c6af3f8..88a8f7491a6 100644 --- a/src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj +++ b/src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj @@ -4,7 +4,7 @@ NuGet's understanding of target frameworks. - $(TargetFrameworksLibrary);net40 + $(TargetFrameworksLibrary);net40 $(NoWarn);CS1591;CS1574;CS1573 true From ecb957bc3f1d3dd9aa21538e00178fe673bacd10 Mon Sep 17 00:00:00 2001 From: Chris Rummel Date: Fri, 18 Feb 2022 07:24:37 -0600 Subject: [PATCH 11/14] More TFM fixes. --- build/common.project.props | 1 - src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj | 2 +- .../NuGet.PackageManagement/NuGet.PackageManagement.csproj | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/build/common.project.props b/build/common.project.props index eab1fe6e6a9..a1e2e789858 100644 --- a/build/common.project.props +++ b/build/common.project.props @@ -17,7 +17,6 @@ net6.0 netcoreapp5.0 netstandard2.0 - net6.0 $(NETFXTargetFramework);$(NETCoreTargetFramework) $(NETCoreTargetFramework) $(TargetFrameworksExe);netcoreapp5.0 diff --git a/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj b/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj index e3f4ceac735..79ebeb791cd 100644 --- a/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj +++ b/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj @@ -29,7 +29,7 @@ - + diff --git a/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj b/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj index 8153d049baa..c3da7afd4ec 100644 --- a/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj +++ b/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj @@ -35,7 +35,7 @@ - + From e45613c75801f053e25fd16ef84fd7da009faea7 Mon Sep 17 00:00:00 2001 From: Chris Rummel Date: Fri, 18 Feb 2022 07:24:46 -0600 Subject: [PATCH 12/14] Fix CommandLineUtils sources. --- .../NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj b/src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj index 4ca0393b47f..6f00e787053 100644 --- a/src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj +++ b/src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj @@ -18,7 +18,7 @@ - + From 89da72669012d43ea59ed64eccf2dc6bcbd3d80f Mon Sep 17 00:00:00 2001 From: Chris Rummel Date: Sun, 13 Mar 2022 16:28:58 -0500 Subject: [PATCH 13/14] Believe we also need the net472 build in source-build. --- build/common.project.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/common.project.props b/build/common.project.props index a1e2e789858..85df906cddb 100644 --- a/build/common.project.props +++ b/build/common.project.props @@ -23,7 +23,7 @@ $(NETCoreTargetFramework);netcoreapp5.0 $(TargetFrameworksExe);net6.0 $(NETFXTargetFramework);$(NetStandardVersion) - $(NETCoreTargetFramework);$(NetStandardVersion) + $(NETCoreTargetFramework);$(NETFXTargetFramework);$(NetStandardVersion) $(TargetFrameworksLibrary);netcoreapp5.0 $(TargetFrameworksLibrary);net6.0 $(NETFXTargetFramework);netcoreapp5.0 From d23d7a97f380511f2166bd8324974c61a2f088fe Mon Sep 17 00:00:00 2001 From: Chris Rummel Date: Sun, 13 Mar 2022 19:36:41 -0500 Subject: [PATCH 14/14] Try with the locally available MS.Ext.CommandLineUtils.Sources. --- build/packages.targets | 2 +- .../NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/packages.targets b/build/packages.targets index a2fff686c3e..ea5e4b88f52 100644 --- a/build/packages.targets +++ b/build/packages.targets @@ -10,7 +10,7 @@ 5.0.0 2.14.0-rtm-832 17.0.0-beta1-10402-05 - 5.0.1-rtm.21063.7 + 3.0.0-preview6.19253.5 diff --git a/src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj b/src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj index 6f00e787053..d34cbc0dd3d 100644 --- a/src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj +++ b/src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj @@ -6,7 +6,7 @@ NuGet executable wrapper for the dotnet CLI nuget functionality. $(TargetFrameworksExeForSigning) win7-x86 - $(NoWarn);CS1591;CS1701;NU5104 + $(NoWarn);CS1591;CS1701;NU5104;CA1307;CA2000 Exe true true