diff --git a/NuGet.Config b/NuGet.Config index 1dfd2e2136e..cf76eadf108 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -1,4 +1,4 @@ - + @@ -9,7 +9,6 @@ - diff --git a/src/NuGet.Core/NuGet.PackageManagement/Resolution/ResolverGather.cs b/src/NuGet.Core/NuGet.PackageManagement/Resolution/ResolverGather.cs index 5a7472e1f28..401c901a98b 100644 --- a/src/NuGet.Core/NuGet.PackageManagement/Resolution/ResolverGather.cs +++ b/src/NuGet.Core/NuGet.PackageManagement/Resolution/ResolverGather.cs @@ -59,7 +59,7 @@ public int MaxDegreeOfParallelism set { - _maxDegreeOfParallelism = 1;// Math.Max(1, value); + _maxDegreeOfParallelism = Math.Max(1, value); } } @@ -81,7 +81,6 @@ public static async Task> GatherAsync( private async Task> GatherAsync(CancellationToken token) { - Debugger.Launch(); // preserve start time of gather api var stopWatch = new Stopwatch(); stopWatch.Start(); diff --git a/test/EndToEnd/API.Test.dll b/test/EndToEnd/API.Test.dll index 1a677d53a27..0750fcd34ed 100644 Binary files a/test/EndToEnd/API.Test.dll and b/test/EndToEnd/API.Test.dll differ diff --git a/test/EndToEnd/tests/PackageNameSpaceTests.ps1 b/test/EndToEnd/tests/PackageNameSpaceTests.ps1 index e85112c5c5b..12290e36410 100644 --- a/test/EndToEnd/tests/PackageNameSpaceTests.ps1 +++ b/test/EndToEnd/tests/PackageNameSpaceTests.ps1 @@ -115,117 +115,6 @@ function Test-PackageNamespaceRestore-WithMultipleFeedsWithIdenticalPackages-Res } } -function Test-PackageNamespaceInstall-WithSingleFeed -{ - param($context) - - # Arrange - $repoDirectory = $context.RepositoryRoot - $nugetConfigPath = Join-Path $OutputPath 'nuget.config' - - $settingFileContent =@" - - - - - - - - - - - - -"@ - - try { - # We have to create config file before creating solution, otherwise it's not effective for new solutions. - $settingFileContent -f $repoDirectory | Out-File -Encoding "UTF8" $nugetConfigPath - - $p = New-ConsoleApplication - - $projectDirectoryPath = $p.Properties.Item("FullPath").Value - $packagesConfigPath = Join-Path $projectDirectoryPath 'packages.config' - $projectDirectoryPath = $p.Properties.Item("FullPath").Value - $solutionDirectory = Split-Path -Path $projectDirectoryPath -Parent - - # Act - $p | Install-Package SolutionLevelPkg -version 1.0.0 - - # Assert - $packagesFolder = Join-Path $solutionDirectory "packages" - $solutionLevelPkgNupkgFolder = Join-Path $packagesFolder "SolutionLevelPkg.1.0.0" - Assert-PathExists(Join-Path $solutionLevelPkgNupkgFolder "SolutionLevelPkg.1.0.0.nupkg") - - $errorlist = Get-Errors - Assert-AreEqual 0 $errorlist.Count - } - finally { - Remove-Item $nugetConfigPath - } -} - -function Test-PackageNamespaceRestore-WithMultipleFeedsWithIdenticalPackages-InstallCorrectPackage -{ - param($context) - - # Arrange - $repoDirectory = Join-Path $OutputPath "CustomPackages" - $opensourceRepo = Join-Path $repoDirectory "opensourceRepo" - $privateRepo = Join-Path $repoDirectory "privateRepo" - $nugetConfigPath = Join-Path $OutputPath 'nuget.config' - - $settingFileContent =@" - - - - - - - - - - - - - -"@ - try { - # We have to create config file before creating solution, otherwise it's not effective for new solutions. - $settingFileContent -f $opensourceRepo,$privateRepo | Out-File -Encoding "UTF8" $nugetConfigPath - - $p = New-ConsoleApplication - - $projectDirectoryPath = $p.Properties.Item("FullPath").Value - $packagesConfigPath = Join-Path $projectDirectoryPath 'packages.config' - $projectDirectoryPath = $p.Properties.Item("FullPath").Value - $solutionDirectory = Split-Path -Path $projectDirectoryPath -Parent - - CreateCustomTestPackage "Contoso.MVC.ASP" "1.0.0" $privateRepo "Thisisfromprivaterepo.txt" - CreateCustomTestPackage "Contoso.MVC.ASP" "2.0.0" $privateRepo "Thisisfromprivaterepo2.txt" - CreateCustomTestPackage "Contoso.MVC.ASP" "1.0.0" $opensourceRepo "Thisisfromopensourcerepo.txt" - CreateCustomTestPackage "Contoso.MVC.ASP" "2.0.0" $opensourceRepo "Thisisfromopensourcerepo2.txt" - - # Act - Install-Package "Contoso.MVC.ASP" -ProjectName $p.Name -version 1.0.0 - - # Assert - $packagesFolder = Join-Path $solutionDirectory "packages" - $contosoNupkgFolder = Join-Path $packagesFolder "Contoso.MVC.ASP.1.0.0" - Assert-PathExists(Join-Path $contosoNupkgFolder "Contoso.MVC.ASP.1.0.0.nupkg") - # Make sure name squatting package from public repo not restored. - $contentFolder = Join-Path $contosoNupkgFolder "content" - Assert-PathExists(Join-Path $contentFolder "Thisisfromprivaterepo.txt") - - $errorlist = Get-Errors - Assert-AreEqual 0 $errorlist.Count - } - finally { - Remove-Item -Recurse -Force $repoDirectory - Remove-Item $nugetConfigPath - } -} - # Create a custom test package function CreateCustomTestPackage { param( diff --git a/test/NuGet.Tests.Apex/NuGet.Tests.Apex/NuGet.Tests.Apex.csproj b/test/NuGet.Tests.Apex/NuGet.Tests.Apex/NuGet.Tests.Apex.csproj index 873efa48696..546605d0c8c 100644 --- a/test/NuGet.Tests.Apex/NuGet.Tests.Apex/NuGet.Tests.Apex.csproj +++ b/test/NuGet.Tests.Apex/NuGet.Tests.Apex/NuGet.Tests.Apex.csproj @@ -70,6 +70,7 @@ + diff --git a/test/NuGet.Tests.Apex/NuGet.Tests.Apex/NuGet.Tests.Apex.sln b/test/NuGet.Tests.Apex/NuGet.Tests.Apex/NuGet.Tests.Apex.sln deleted file mode 100644 index abfb9c52be4..00000000000 --- a/test/NuGet.Tests.Apex/NuGet.Tests.Apex/NuGet.Tests.Apex.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31508.22 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NuGet.Tests.Apex", "NuGet.Tests.Apex.csproj", "{FA09B055-B09A-4AF6-A7FC-FFD4F4A988D3}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {FA09B055-B09A-4AF6-A7FC-FFD4F4A988D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FA09B055-B09A-4AF6-A7FC-FFD4F4A988D3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FA09B055-B09A-4AF6-A7FC-FFD4F4A988D3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FA09B055-B09A-4AF6-A7FC-FFD4F4A988D3}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {4D5B06FA-9267-48E2-9030-16739050381D} - EndGlobalSection -EndGlobal diff --git a/test/NuGet.Tests.Apex/NuGet.Tests.Apex/NuGetEndToEndTests/NuGetUITestCase.cs b/test/NuGet.Tests.Apex/NuGet.Tests.Apex/NuGetEndToEndTests/NuGetUITestCase.cs index da91e64eb54..5f01c8de801 100644 --- a/test/NuGet.Tests.Apex/NuGet.Tests.Apex/NuGetEndToEndTests/NuGetUITestCase.cs +++ b/test/NuGet.Tests.Apex/NuGet.Tests.Apex/NuGetEndToEndTests/NuGetUITestCase.cs @@ -51,7 +51,6 @@ public void SearchPackageFromUI() public void InstallPackageFromUI() { // Arrange - System.Diagnostics.Debugger.Launch(); EnsureVisualStudioHost(); var dte = VisualStudio.Dte; var solutionService = VisualStudio.Get(); @@ -165,7 +164,6 @@ public async Task InstallPackageFromUI_PackageNamespace_WithSingleFeed_Match_Suc // Arrange EnsureVisualStudioHost(); var solutionService = VisualStudio.Get(); - System.Diagnostics.Debugger.Launch(); string solutionDirectory = CommonUtility.CreateSolutionDirectory(Directory.GetCurrentDirectory()); solutionService.CreateEmptySolution("TestSolution", solutionDirectory); @@ -213,7 +211,6 @@ public async Task InstallPackageFromUI_PackageNamespace_WithSingleFeed_NoMatch_S // Arrange EnsureVisualStudioHost(); var solutionService = VisualStudio.Get(); - System.Diagnostics.Debugger.Launch(); string solutionDirectory = CommonUtility.CreateSolutionDirectory(Directory.GetCurrentDirectory()); solutionService.CreateEmptySolution("TestSolution", solutionDirectory); @@ -262,7 +259,6 @@ public async Task InstallPackageToProjectsFromUI_PackageNamespace_WithSingleFeed // Arrange EnsureVisualStudioHost(); var solutionService = VisualStudio.Get(); - System.Diagnostics.Debugger.Launch(); string solutionDirectory = CommonUtility.CreateSolutionDirectory(Directory.GetCurrentDirectory()); solutionService.CreateEmptySolution("TestSolution", solutionDirectory); @@ -317,7 +313,6 @@ public async Task InstallPackageToProjectsFromUI_PackageNamespace_WithSingleFeed // Arrange EnsureVisualStudioHost(); var solutionService = VisualStudio.Get(); - System.Diagnostics.Debugger.Launch(); string solutionDirectory = CommonUtility.CreateSolutionDirectory(Directory.GetCurrentDirectory()); solutionService.CreateEmptySolution("TestSolution", solutionDirectory); @@ -372,7 +367,6 @@ public async Task InstallPackageFromUI_PackageNamespace_WithMultiFeed_Fails() // Arrange EnsureVisualStudioHost(); var solutionService = VisualStudio.Get(); - System.Diagnostics.Debugger.Launch(); string solutionDirectory = CommonUtility.CreateSolutionDirectory(Directory.GetCurrentDirectory()); solutionService.CreateEmptySolution("TestSolution", solutionDirectory); @@ -429,7 +423,6 @@ public async Task UpdatePackageFromUI_PackageNamespace_WithSingleFeed_Succeeds() // Arrange EnsureVisualStudioHost(); var solutionService = VisualStudio.Get(); - System.Diagnostics.Debugger.Launch(); string solutionDirectory = CommonUtility.CreateSolutionDirectory(Directory.GetCurrentDirectory()); solutionService.CreateEmptySolution("TestSolution", solutionDirectory);