Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,18 @@
</When>
<When Condition="'$(TargetFramework)' == 'net46'">
<PropertyGroup>
<NuGetApiVersion>4.9.6</NuGetApiVersion>
<NuGetApiVersion>4.5.3</NuGetApiVersion>
Comment thread
sharwell marked this conversation as resolved.
</PropertyGroup>
</When>
<When Condition="'$(TargetFramework)' == 'netstandard1.6'">
<PropertyGroup>
<NuGetApiVersion>4.9.6</NuGetApiVersion>
<NuGetApiVersion>4.5.3</NuGetApiVersion>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<NuGetApiVersion>6.3.3</NuGetApiVersion>
<NuGetApiVersion>6.3.4</NuGetApiVersion>
<DefineConstants>$(DefineConstants);NUGET_SIGNING</DefineConstants>
</PropertyGroup>
</Otherwise>
</Choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
using NuGet.Protocol.Core.Types;
using NuGet.Resolver;

#if NET46 || NET472 || NETSTANDARD || NETCOREAPP3_1
#if NUGET_SIGNING
using NuGet.Packaging.Signing;
#endif

Expand Down Expand Up @@ -274,13 +274,13 @@ private async Task<ImmutableArray<MetadataReference>> ResolveCoreAsync(string la

var globalPathResolver = new PackagePathResolver(SettingsUtility.GetGlobalPackagesFolder(settings));
var localPathResolver = new PackagePathResolver(temporaryPackagesFolder);
#if NET452
#if NET452 || NET46 || NETSTANDARD1_6
var packageExtractionContext = new PackageExtractionContext(logger)
{
PackageSaveMode = PackageSaveMode.Defaultv3,
XmlDocFileSaveMode = XmlDocFileSaveMode.None,
};
#elif NET46 || NET472 || NETSTANDARD1_6 || NETSTANDARD2_0 || NETCOREAPP3_1
#elif NUGET_SIGNING
var packageExtractionContext = new PackageExtractionContext(
PackageSaveMode.Defaultv3,
XmlDocFileSaveMode.None,
Expand Down Expand Up @@ -350,7 +350,7 @@ private async Task<ImmutableArray<MetadataReference>> ResolveCoreAsync(string la
if (downloadResult.Status == DownloadResourceResultStatus.AvailableWithoutStream)
{
await PackageExtractor.ExtractPackageAsync(
#if !NET452
#if NUGET_SIGNING
#pragma warning disable SA1114 // Parameter list should follow declaration
downloadResult.PackageSource,
#pragma warning restore SA1114 // Parameter list should follow declaration
Expand All @@ -364,7 +364,7 @@ await PackageExtractor.ExtractPackageAsync(
{
Debug.Assert(downloadResult.PackageStream != null, "PackageStream should not be null if download result status != DownloadResourceResultStatus.AvailableWithoutStream");
await PackageExtractor.ExtractPackageAsync(
#if !NET452
#if NUGET_SIGNING
#pragma warning disable SA1114 // Parameter list should follow declaration
downloadResult.PackageSource,
#pragma warning restore SA1114 // Parameter list should follow declaration
Expand Down Expand Up @@ -562,7 +562,7 @@ private static async Task GetPackageDependenciesAsync(
var dependencyInfo = await dependencyInfoResource.ResolvePackage(
packageIdentity,
targetFramework,
#if !NET452
#if NUGET_SIGNING
cacheContext,
#endif
logger,
Expand Down