diff --git a/build/common.project.props b/build/common.project.props index 2dae6391a63..85df906cddb 100644 --- a/build/common.project.props +++ b/build/common.project.props @@ -10,7 +10,6 @@ - $(DotNetBuildFromSource) PackageReference v4.7.2 net472 @@ -18,14 +17,13 @@ net6.0 netcoreapp5.0 netstandard2.0 - net6.0 $(NETFXTargetFramework);$(NETCoreTargetFramework) - $(NETCoreTargetFramework) + $(NETCoreTargetFramework) $(TargetFrameworksExe);netcoreapp5.0 $(NETCoreTargetFramework);netcoreapp5.0 $(TargetFrameworksExe);net6.0 $(NETFXTargetFramework);$(NetStandardVersion) - $(NetStandardVersion) + $(NETCoreTargetFramework);$(NETFXTargetFramework);$(NetStandardVersion) $(TargetFrameworksLibrary);netcoreapp5.0 $(TargetFrameworksLibrary);net6.0 $(NETFXTargetFramework);netcoreapp5.0 @@ -288,7 +286,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/build/packages.targets b/build/packages.targets index 6f76ae916cb..ea5e4b88f52 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 + 3.0.0-preview6.19253.5 @@ -34,7 +35,7 @@ - + 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..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\ - Desktop/ + ilmerge\ + Desktop/ CoreCLR/ - + $(PackagePathDir) $(PackagePathDir) - + $(PackagePathDir) 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..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 + $(NoWarn);CS1591;CS1701;NU5104;CA1307;CA2000 Exe true true @@ -18,7 +18,7 @@ - + diff --git a/src/NuGet.Core/NuGet.Common/NuGet.Common.csproj b/src/NuGet.Core/NuGet.Common/NuGet.Common.csproj index e30a079ebf8..05c2d3598b7 100644 --- a/src/NuGet.Core/NuGet.Common/NuGet.Common.csproj +++ b/src/NuGet.Core/NuGet.Common/NuGet.Common.csproj @@ -5,7 +5,7 @@ Common utilities and interfaces for all NuGet libraries. $(TargetFrameworksLibrary) - $(TargetFrameworks);net45 + $(TargetFrameworks);net45 $(NoWarn);CS1591;CS1574 true @@ -20,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 bbc5ba4808f..79ebeb791cd 100644 --- a/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj +++ b/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj @@ -6,7 +6,7 @@ NuGet's configuration settings implementation. $(NoWarn);CS1591 $(TargetFrameworksLibrary) - $(TargetFrameworks);net45 + $(TargetFrameworks);net45 true true @@ -23,13 +23,13 @@ - + - + diff --git a/src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj b/src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj index b78b1f2ea28..88a8f7491a6 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..c3da7afd4ec 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.Protocol/HttpSource/HttpRequestMessageExtensions.cs b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRequestMessageExtensions.cs index 7c959526820..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 +#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 +#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 +#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 dc35858204b..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 +#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 b9ab58ce734..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 +#if NET5_0_OR_GREATER if (request.Options.TryGetValue( new HttpRequestOptionsKey>(HttpRetryHandler.StopwatchPropertyName), out stopwatches)) diff --git a/src/NuGet.Core/NuGet.Versioning/NuGet.Versioning.csproj b/src/NuGet.Core/NuGet.Versioning/NuGet.Versioning.csproj index 1802939446f..9e428e7ec4a 100644 --- a/src/NuGet.Core/NuGet.Versioning/NuGet.Versioning.csproj +++ b/src/NuGet.Core/NuGet.Versioning/NuGet.Versioning.csproj @@ -4,7 +4,7 @@ $(TargetFrameworksLibrary) - $(TargetFrameworks);net45 + $(TargetFrameworks);net45 NuGet's implementation of Semantic Versioning. semver;semantic versioning