dependabot-nuget 0.267.0 → 0.270.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,9 @@
1
1
  using System.Collections.Immutable;
2
+ using System.Text;
2
3
  using System.Text.Json;
3
4
 
5
+ using NuGet;
6
+
4
7
  using NuGetUpdater.Core.Updater;
5
8
 
6
9
  using Xunit;
@@ -1663,67 +1666,173 @@ public partial class UpdateWorkerTests
1663
1666
  [Fact]
1664
1667
  public async Task PackageCanBeUpdatedWhenAnotherInstalledPackageHasBeenDelisted()
1665
1668
  {
1666
- // updating one package (Newtonsoft.Json) when another installed package (FSharp.Core/5.0.3-beta.21369.4) has been delisted
1667
- await TestUpdateForProject("Newtonsoft.Json", "7.0.1", "13.0.1",
1669
+ // updating one package (Some.Package) when another installed package (Delisted.Package/5.0.0) has been delisted
1670
+ // this test can't be faked with a local package source and requires an HTTP endpoint; the important part is
1671
+ // the `"listed": false` in the registration index
1672
+ static (int, byte[]) TestHttpHandler(string uriString)
1673
+ {
1674
+ var uri = new Uri(uriString, UriKind.Absolute);
1675
+ var baseUrl = $"{uri.Scheme}://{uri.Host}:{uri.Port}";
1676
+ return uri.PathAndQuery switch
1677
+ {
1678
+ "/index.json" => (200, Encoding.UTF8.GetBytes($$"""
1679
+ {
1680
+ "version": "3.0.0",
1681
+ "resources": [
1682
+ {
1683
+ "@id": "{{baseUrl}}/download",
1684
+ "@type": "PackageBaseAddress/3.0.0"
1685
+ },
1686
+ {
1687
+ "@id": "{{baseUrl}}/query",
1688
+ "@type": "SearchQueryService"
1689
+ },
1690
+ {
1691
+ "@id": "{{baseUrl}}/registrations",
1692
+ "@type": "RegistrationsBaseUrl"
1693
+ }
1694
+ ]
1695
+ }
1696
+ """)),
1697
+ "/registrations/delisted.package/index.json" => (200, Encoding.UTF8.GetBytes($$"""
1698
+ {
1699
+ "count": 1,
1700
+ "items": [
1701
+ {
1702
+ "lower": "5.0.0",
1703
+ "upper": "5.0.0",
1704
+ "items": [
1705
+ {
1706
+ "catalogEntry": {
1707
+ "id": "Delisted.Package",
1708
+ "listed": false,
1709
+ "version": "5.0.0"
1710
+ },
1711
+ "packageContent": "{{baseUrl}}/download/delisted.package/5.0.0/delisted.package.5.0.0.nupkg",
1712
+ }
1713
+ ]
1714
+ }
1715
+ ]
1716
+ }
1717
+ """)),
1718
+ "/registrations/some.package/index.json" => (200, Encoding.UTF8.GetBytes($$"""
1719
+ {
1720
+ "count": 1,
1721
+ "items": [
1722
+ {
1723
+ "lower": "1.0.0",
1724
+ "upper": "2.0.0",
1725
+ "items": [
1726
+ {
1727
+ "catalogEntry": {
1728
+ "id": "Some.Package",
1729
+ "listed": true,
1730
+ "version": "1.0.0"
1731
+ },
1732
+ "packageContent": "{{baseUrl}}/download/some.package/1.0.0/some.package.1.0.0.nupkg",
1733
+ },
1734
+ {
1735
+ "catalogEntry": {
1736
+ "id": "Some.Package",
1737
+ "listed": true,
1738
+ "version": "2.0.0"
1739
+ },
1740
+ "packageContent": "{{baseUrl}}/download/some.package/2.0.0/some.package.2.0.0.nupkg",
1741
+ }
1742
+ ]
1743
+ }
1744
+ ]
1745
+ }
1746
+ """)),
1747
+ "/download/delisted.package/5.0.0/delisted.package.5.0.0.nupkg" =>
1748
+ (200, MockNuGetPackage.CreateSimplePackage("Delisted.Package", "5.0.0", "net45").GetZipStream().ReadAllBytes()),
1749
+ "/download/some.package/1.0.0/some.package.1.0.0.nupkg" =>
1750
+ (200, MockNuGetPackage.CreateSimplePackage("Some.Package", "1.0.0", "net45").GetZipStream().ReadAllBytes()),
1751
+ "/download/some.package/2.0.0/some.package.2.0.0.nupkg" =>
1752
+ (200, MockNuGetPackage.CreateSimplePackage("Some.Package", "2.0.0", "net45").GetZipStream().ReadAllBytes()),
1753
+ _ => (404, Encoding.UTF8.GetBytes("{}")), // everything is missing
1754
+ };
1755
+ }
1756
+ using var cache = new TemporaryDirectory();
1757
+ using var env = new TemporaryEnvironment([
1758
+ ("NUGET_PACKAGES", Path.Join(cache.DirectoryPath, "NUGET_PACKAGES")),
1759
+ ("NUGET_HTTP_CACHE_PATH", Path.Join(cache.DirectoryPath, "NUGET_HTTP_CACHE_PATH")),
1760
+ ("NUGET_SCRATCH", Path.Join(cache.DirectoryPath, "NUGET_SCRATCH")),
1761
+ ("NUGET_PLUGINS_CACHE_PATH", Path.Join(cache.DirectoryPath, "NUGET_PLUGINS_CACHE_PATH")),
1762
+ ]);
1763
+ using var http = TestHttpServer.CreateTestServer(TestHttpHandler);
1764
+ await TestUpdateForProject("Some.Package", "1.0.0", "2.0.0",
1668
1765
  // existing
1669
1766
  projectContents: """
1670
- <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1671
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1672
- <PropertyGroup>
1673
- <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
1674
- </PropertyGroup>
1675
- <ItemGroup>
1676
- <None Include="packages.config" />
1677
- </ItemGroup>
1678
- <ItemGroup>
1679
- <Reference Include="FSharp.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
1680
- <HintPath>packages\FSharp.Core.5.0.3-beta.21369.4\lib\netstandard2.0\FSharp.Core.dll</HintPath>
1681
- <Private>True</Private>
1682
- </Reference>
1683
- <Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
1684
- <HintPath>packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
1685
- <Private>True</Private>
1686
- </Reference>
1687
- </ItemGroup>
1688
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
1689
- </Project>
1690
- """,
1767
+ <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1768
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1769
+ <PropertyGroup>
1770
+ <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
1771
+ </PropertyGroup>
1772
+ <ItemGroup>
1773
+ <None Include="packages.config" />
1774
+ </ItemGroup>
1775
+ <ItemGroup>
1776
+ <Reference Include="Delisted.Package">
1777
+ <HintPath>packages\Delisted.Package.5.0.0\lib\net45\Delisted.Package.dll</HintPath>
1778
+ <Private>True</Private>
1779
+ </Reference>
1780
+ <Reference Include="Some.Package">
1781
+ <HintPath>packages\Some.Package.1.0.0\lib\net45\Some.Package.dll</HintPath>
1782
+ <Private>True</Private>
1783
+ </Reference>
1784
+ </ItemGroup>
1785
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
1786
+ </Project>
1787
+ """,
1691
1788
  packagesConfigContents: """
1692
- <packages>
1693
- <package id="FSharp.Core" version="5.0.3-beta.21369.4" targetFramework="net462" />
1694
- <package id="Newtonsoft.Json" version="7.0.1" targetFramework="net462" />
1695
- </packages>
1696
- """,
1789
+ <packages>
1790
+ <package id="Delisted.Package" version="5.0.0" targetFramework="net462" />
1791
+ <package id="Some.Package" version="1.0.0" targetFramework="net462" />
1792
+ </packages>
1793
+ """,
1794
+ additionalFiles:
1795
+ [
1796
+ ("NuGet.Config", $"""
1797
+ <configuration>
1798
+ <packageSources>
1799
+ <clear />
1800
+ <add key="private_feed" value="{http.BaseUrl.TrimEnd('/')}/index.json" allowInsecureConnections="true" />
1801
+ </packageSources>
1802
+ </configuration>
1803
+ """)
1804
+ ],
1697
1805
  // expected
1698
1806
  expectedProjectContents: """
1699
- <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1700
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1701
- <PropertyGroup>
1702
- <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
1703
- </PropertyGroup>
1704
- <ItemGroup>
1705
- <None Include="packages.config" />
1706
- </ItemGroup>
1707
- <ItemGroup>
1708
- <Reference Include="FSharp.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
1709
- <HintPath>packages\FSharp.Core.5.0.3-beta.21369.4\lib\netstandard2.0\FSharp.Core.dll</HintPath>
1710
- <Private>True</Private>
1711
- </Reference>
1712
- <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
1713
- <HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
1714
- <Private>True</Private>
1715
- </Reference>
1716
- </ItemGroup>
1717
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
1718
- </Project>
1719
- """,
1807
+ <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1808
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1809
+ <PropertyGroup>
1810
+ <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
1811
+ </PropertyGroup>
1812
+ <ItemGroup>
1813
+ <None Include="packages.config" />
1814
+ </ItemGroup>
1815
+ <ItemGroup>
1816
+ <Reference Include="Delisted.Package">
1817
+ <HintPath>packages\Delisted.Package.5.0.0\lib\net45\Delisted.Package.dll</HintPath>
1818
+ <Private>True</Private>
1819
+ </Reference>
1820
+ <Reference Include="Some.Package">
1821
+ <HintPath>packages\Some.Package.2.0.0\lib\net45\Some.Package.dll</HintPath>
1822
+ <Private>True</Private>
1823
+ </Reference>
1824
+ </ItemGroup>
1825
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
1826
+ </Project>
1827
+ """,
1720
1828
  expectedPackagesConfigContents: """
1721
- <?xml version="1.0" encoding="utf-8"?>
1722
- <packages>
1723
- <package id="FSharp.Core" version="5.0.3-beta.21369.4" targetFramework="net462" />
1724
- <package id="Newtonsoft.Json" version="13.0.1" targetFramework="net462" />
1725
- </packages>
1726
- """);
1829
+ <?xml version="1.0" encoding="utf-8"?>
1830
+ <packages>
1831
+ <package id="Delisted.Package" version="5.0.0" targetFramework="net462" />
1832
+ <package id="Some.Package" version="2.0.0" targetFramework="net462" />
1833
+ </packages>
1834
+ """
1835
+ );
1727
1836
  }
1728
1837
 
1729
1838
  [Fact]
@@ -52,10 +52,13 @@ public partial class UpdateWorkerTests
52
52
  );
53
53
  }
54
54
 
55
- [Fact]
56
- public async Task UpdateVersionChildElement_InProjectFile_ForPackageReferenceInclude()
55
+ [Theory]
56
+ [InlineData("true")]
57
+ [InlineData(null)]
58
+ public async Task UpdateVersionChildElement_InProjectFile_ForPackageReferenceIncludeTheory(string variableValue)
57
59
  {
58
60
  // update Some.Package from 9.0.1 to 13.0.1
61
+ using var env = new TemporaryEnvironment([("UseNewNugetPackageResolver", variableValue)]);
59
62
  await TestUpdateForProject("Some.Package", "9.0.1", "13.0.1",
60
63
  packages:
61
64
  [
@@ -91,6 +94,43 @@ public partial class UpdateWorkerTests
91
94
  );
92
95
  }
93
96
 
97
+ [Fact]
98
+ public async Task CallingResolveDependencyConflictsNew()
99
+ {
100
+ // update Microsoft.CodeAnalysis.Common from 4.9.2 to 4.10.0
101
+ using var env = new TemporaryEnvironment([("UseNewNugetPackageResolver", "true")]);
102
+ await TestUpdateForProject("Microsoft.CodeAnalysis.Common", "4.9.2", "4.10.0",
103
+ // initial
104
+ projectContents: $"""
105
+ <Project Sdk="Microsoft.NET.Sdk">
106
+ <PropertyGroup>
107
+ <TargetFramework>net8.0</TargetFramework>
108
+ </PropertyGroup>
109
+ <ItemGroup>
110
+ <PackageReference Include="Microsoft.CodeAnalysis.Compilers" Version="4.9.2" />
111
+ <PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.9.2" />
112
+ <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" />
113
+ <PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="4.9.2" />
114
+ </ItemGroup>
115
+ </Project>
116
+ """,
117
+ // expected
118
+ expectedProjectContents: $"""
119
+ <Project Sdk="Microsoft.NET.Sdk">
120
+ <PropertyGroup>
121
+ <TargetFramework>net8.0</TargetFramework>
122
+ </PropertyGroup>
123
+ <ItemGroup>
124
+ <PackageReference Include="Microsoft.CodeAnalysis.Compilers" Version="4.10.0" />
125
+ <PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.10.0" />
126
+ <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" />
127
+ <PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="4.10.0" />
128
+ </ItemGroup>
129
+ </Project>
130
+ """
131
+ );
132
+ }
133
+
94
134
  [Fact]
95
135
  public async Task UpdateVersions_InProjectFile_ForDuplicatePackageReferenceInclude()
96
136
  {
@@ -489,9 +529,12 @@ public partial class UpdateWorkerTests
489
529
  );
490
530
  }
491
531
 
492
- [Fact]
493
- public async Task AddPackageReference_InProjectFile_ForTransientDependency()
532
+ [Theory]
533
+ [InlineData(null)]
534
+ [InlineData("true")]
535
+ public async Task AddPackageReference_InProjectFile_ForTransientDependency(string variableValue)
494
536
  {
537
+ using var env = new TemporaryEnvironment([("UseNewNugetPackageResolver", variableValue)]);
495
538
  // add transient package Some.Transient.Dependency from 5.0.1 to 5.0.2
496
539
  await TestUpdateForProject("Some.Transient.Dependency", "5.0.1", "5.0.2", isTransitive: true,
497
540
  packages:
@@ -532,6 +575,127 @@ public partial class UpdateWorkerTests
532
575
  );
533
576
  }
534
577
 
578
+ [Fact]
579
+ public async Task TransitiveDependencyCanBeAddedWithMismatchingSdk()
580
+ {
581
+ await TestUpdateForProject("Some.Transitive.Package", "1.0.0", "1.0.1", isTransitive: true,
582
+ packages:
583
+ [
584
+ MockNuGetPackage.CreateSimplePackage("Some.Package", "1.0.0", "net8.0", [(null, [("Some.Transitive.Package", "1.0.0")])]),
585
+ MockNuGetPackage.CreateSimplePackage("Some.Transitive.Package", "1.0.0", "net8.0"),
586
+ MockNuGetPackage.CreateSimplePackage("Some.Transitive.Package", "1.0.1", "net8.0"),
587
+ ],
588
+ projectContents: """
589
+ <Project Sdk="Microsoft.NET.Sdk">
590
+ <PropertyGroup>
591
+ <TargetFramework>net8.0</TargetFramework>
592
+ </PropertyGroup>
593
+ <ItemGroup>
594
+ <PackageReference Include="Some.Package" Version="1.0.0" />
595
+ </ItemGroup>
596
+ </Project>
597
+ """,
598
+ additionalFiles:
599
+ [
600
+ ("global.json", """
601
+ {
602
+ "sdk": {
603
+ "version": "99.99.999" // this version doesn't match anything that's installed
604
+ }
605
+ }
606
+ """)
607
+ ],
608
+ expectedProjectContents: """
609
+ <Project Sdk="Microsoft.NET.Sdk">
610
+ <PropertyGroup>
611
+ <TargetFramework>net8.0</TargetFramework>
612
+ </PropertyGroup>
613
+ <ItemGroup>
614
+ <PackageReference Include="Some.Package" Version="1.0.0" />
615
+ <PackageReference Include="Some.Transitive.Package" Version="1.0.1" />
616
+ </ItemGroup>
617
+ </Project>
618
+ """
619
+ );
620
+ }
621
+
622
+ [Fact]
623
+ public async Task TransitiveDependencyCanBeAddedWithCustomMSBuildSdk()
624
+ {
625
+ await TestUpdateForProject("Some.Transitive.Package", "1.0.0", "1.0.1", isTransitive: true,
626
+ packages:
627
+ [
628
+ MockNuGetPackage.CreateSimplePackage("Some.Package", "1.0.0", "net8.0", [(null, [("Some.Transitive.Package", "1.0.0")])]),
629
+ MockNuGetPackage.CreateSimplePackage("Some.Transitive.Package", "1.0.0", "net8.0"),
630
+ MockNuGetPackage.CreateSimplePackage("Some.Transitive.Package", "1.0.1", "net8.0"),
631
+ MockNuGetPackage.CreateMSBuildSdkPackage("Custom.MSBuild.Sdk", "1.2.3"),
632
+ ],
633
+ projectContents: """
634
+ <Project Sdk="Microsoft.NET.Sdk">
635
+ <PropertyGroup>
636
+ <TargetFramework>net8.0</TargetFramework>
637
+ </PropertyGroup>
638
+ <ItemGroup>
639
+ <PackageReference Include="Some.Package" />
640
+ </ItemGroup>
641
+ </Project>
642
+ """,
643
+ additionalFiles:
644
+ [
645
+ ("Directory.Build.props", """
646
+ <Project>
647
+ <Import Project="Sdk.props" Sdk="Custom.MSBuild.Sdk" />
648
+ </Project>
649
+ """),
650
+ ("Directory.Packages.props", """
651
+ <Project>
652
+ <PropertyGroup>
653
+ <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
654
+ </PropertyGroup>
655
+ <ItemGroup>
656
+ <PackageVersion Include="Some.Package" Version="1.0.0" />
657
+ </ItemGroup>
658
+ </Project>
659
+ """),
660
+ ("global.json", """
661
+ {
662
+ "sdk": {
663
+ "version": "99.99.999" // this version doesn't match anything that's installed
664
+ },
665
+ "msbuild-sdks": {
666
+ "Custom.MSBuild.Sdk": "1.2.3"
667
+ }
668
+ }
669
+ """)
670
+ ],
671
+ expectedProjectContents: """
672
+ <Project Sdk="Microsoft.NET.Sdk">
673
+ <PropertyGroup>
674
+ <TargetFramework>net8.0</TargetFramework>
675
+ </PropertyGroup>
676
+ <ItemGroup>
677
+ <PackageReference Include="Some.Package" />
678
+ <PackageReference Include="Some.Transitive.Package" />
679
+ </ItemGroup>
680
+ </Project>
681
+ """,
682
+ additionalFilesExpected:
683
+ [
684
+ ("Directory.Packages.props", """
685
+ <Project>
686
+ <PropertyGroup>
687
+ <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
688
+ </PropertyGroup>
689
+ <ItemGroup>
690
+ <PackageVersion Include="Some.Package" Version="1.0.0" />
691
+ <PackageVersion Include="Some.Transitive.Package" Version="1.0.1" />
692
+ </ItemGroup>
693
+ </Project>
694
+ """)
695
+ ]
696
+ );
697
+ }
698
+
535
699
  [Fact]
536
700
  public async Task UpdateVersionAttribute_InProjectFile_ForAnalyzerPackageReferenceInclude()
537
701
  {
@@ -2741,9 +2905,13 @@ public partial class UpdateWorkerTests
2741
2905
  );
2742
2906
  }
2743
2907
 
2744
- [Fact]
2745
- public async Task NoChange_IfThereAreIncoherentVersions()
2908
+ [Theory]
2909
+ [InlineData("true")]
2910
+ [InlineData(null)]
2911
+ public async Task NoChange_IfThereAreIncoherentVersions(string variableValue)
2746
2912
  {
2913
+ using var env = new TemporaryEnvironment([("UseNewNugetPackageResolver", variableValue)]);
2914
+
2747
2915
  // trying to update `Transitive.Dependency` to 1.1.0 would normally pull `Some.Package` from 1.0.0 to 1.1.0,
2748
2916
  // but the TFM doesn't allow it
2749
2917
  await TestNoChangeforProject("Transitive.Dependency", "1.0.0", "1.1.0",
@@ -2827,9 +2995,13 @@ public partial class UpdateWorkerTests
2827
2995
  );
2828
2996
  }
2829
2997
 
2830
- [Fact]
2831
- public async Task UnresolvablePropertyDoesNotStopOtherUpdates()
2998
+ [Theory]
2999
+ [InlineData("true")]
3000
+ [InlineData(null)]
3001
+ public async Task UnresolvablePropertyDoesNotStopOtherUpdates(string variableValue)
2832
3002
  {
3003
+ using var env = new TemporaryEnvironment([("UseNewNugetPackageResolver", variableValue)]);
3004
+
2833
3005
  // the property `$(SomeUnresolvableProperty)` cannot be resolved
2834
3006
  await TestUpdateForProject("Some.Package", "7.0.1", "13.0.1",
2835
3007
  packages:
@@ -2863,9 +3035,13 @@ public partial class UpdateWorkerTests
2863
3035
  );
2864
3036
  }
2865
3037
 
2866
- [Fact]
2867
- public async Task UpdatingPackageAlsoUpdatesAnythingWithADependencyOnTheUpdatedPackage()
3038
+ [Theory]
3039
+ [InlineData("true")]
3040
+ [InlineData(null)]
3041
+ public async Task UpdatingPackageAlsoUpdatesAnythingWithADependencyOnTheUpdatedPackage(string variableValue)
2868
3042
  {
3043
+ using var env = new TemporaryEnvironment([("UseNewNugetPackageResolver", variableValue)]);
3044
+
2869
3045
  // updating Some.Package from 3.3.30 requires that Some.Package.Extensions also be updated
2870
3046
  await TestUpdateForProject("Some.Package", "3.3.30", "3.4.3",
2871
3047
  packages: