NuGet / Home

Repo for NuGet Client issues
Other
1.5k stars 253 forks source link

The test scripts don't test against the appropriate versions correctly #13149

Closed v-luzh closed 8 months ago

v-luzh commented 9 months ago

NuGet Product Used

dotnet.exe

Product Version

.NET SDK Version: 7.0.405

Worked before?

Worked well in .NET SDK Version: 7.0.404

Impact

It's more difficult to complete my work

Repro Steps & Context

Repro Steps:

  1. Patch dotnet sdk (please refer to Install and patch the dotnet with the nupkgs)
  2. Create a Powershell script named "Test.ps1" with below contents. Please change the value of $patchSDKCommand to the path of patched SDK in the first line of the script below.
    
    "Getting latest .NET Core CLI"  
    # Pls change the value of below $patchSDKCommand to the patched SDK.  
    $patchSDKCommand = "C:\Users\v-luzh\Desktop\PatchedSDK\dotnet.exe"    
    "Testing the following version of the .NET Core CLI/SDK"  
    & $patchSDKCommand --version  
    "Creating test package projects"  
    & $patchSDKCommand new classlib -n  MyLib  
    & $patchSDKCommand new classlib -n MyDep  
    & $patchSDKCommand add MyLib/MyLib.csproj reference MyDep/MyDep.csproj  
    & $patchSDKCommand new sln -n test  
    & $patchSDKCommand sln add MyLib/MyLib.csproj  
    & $patchSDKCommand sln add MyDep/MyDep.csproj  
    & $patchSDKCommand build  
    "Creating packages"  
    & $patchSDKCommand msbuild /t:pack /p:version=1.0.1  
    & $patchSDKCommand msbuild /t:pack /p:version=1.0.2  
    & $patchSDKCommand msbuild /t:pack /p:version=1.0.3-beta  
    & $patchSDKCommand msbuild /t:pack /p:version=1.1.0  
    & $patchSDKCommand msbuild /t:pack /p:version=1.2.0-beta  
    & $patchSDKCommand msbuild /t:pack /p:version=2.0.0  
    & $patchSDKCommand msbuild /t:pack /p:version=3.0.0-beta  
    "Creating nuget.config"  
    New-Item .\localSource\ -ItemType Directory | Out-Null  
    & $patchSDKCommand new nugetconfig  
    $xml = [xml](Get-Content .\nuget.config)   
    $sources = $xml.SelectSingleNode('/configuration/packageSources')  
    $sources.RemoveAll()  
    $source = $xml.CreateElement('add')  
    $source.SetAttribute('key', 'localSource') | Out-Null  
    $source.SetAttribute('value', 'localSource') | Out-Null  
    $sources.AppendChild($source)  
    $source = $xml.CreateElement('add')  
    if (Test-Path .\cli\sdk\NuGetFallbackFolder) {  
           $source.SetAttribute('key', 'dotnetFallbackFolder') | Out-Null  
           $source.SetAttribute('value', 'cli/sdk/NuGetFallbackFolder') | Out-Null  
           $sources.AppendChild($source)  
    }  
    $config = $xml.CreateElement('config')  
    $xml.DocumentElement.AppendChild($config) | Out-Null  
    $globalPackagesFolder = $xml.CreateElement('add')  
    $globalPackagesFolder.SetAttribute('key', 'globalPackagesFolder')  
    $globalPackagesFolder.SetAttribute('value', 'globalPackages')  
    $config.AppendChild($globalPackagesFolder) | Out-Null  
    $xml.Save((Join-Path (Get-Location) nuget.config))  
    Copy-Item *\bin\Debug\*.nupkg .\localSource\ | Out-Null  
    "Creating test program"  
    & $patchSDKCommand new console -n MyProg  
    & $patchSDKCommand add MyProg\MyProg.csproj package MyLib -v 1.0.0  
    & $patchSDKCommand restore MyProg\MyProg.csproj  
    & $patchSDKCommand new console -n deprecationTest  
    & $patchSDKCommand add .\deprecationTest\deprecationTest.csproj package NuGet.Core -v 2.14.0  
    & $patchSDKCommand list MyProg\MyProg.csproj package --outdated --include-transitive --highest-patch  
    "latest version of MyLib and MyDep above should be 1.0.2"  
    Pause  

& $patchSDKCommand list MyProg\MyProg.csproj package --outdated --include-transitive --highest-patch --include-prerelease
"latest version of MyLib and MyDep above should be 1.0.3-beta"
Pause

& $patchSDKCommand list MyProg\MyProg.csproj package --outdated --include-transitive --highest-minor
"latest version of MyLib and MyDep above should be 1.1.0"
Pause

& $patchSDKCommand list MyProg\MyProg.csproj package --outdated --include-transitive --highest-minor --include-prerelease
"latest version of MyLib and MyDep above should be 1.2.0-beta"
Pause

& $patchSDKCommand list MyProg\MyProg.csproj package --outdated --include-transitive
"latest version of MyLib and MyDep above should be 2.0.0"
Pause

& $patchSDKCommand list MyProg\MyProg.csproj package --outdated --include-transitive --include-prerelease
"latest version of MyLib and MyDep above should be 3.0.0-beta"
Pause

& $patchSDKCommand list .\deprecationTest\deprecationTest.csproj package --deprecated
"the deprecated package version of deprecationTest above should be 2.14.0"
Pause

"testing complete with the following version of the .NET Core CLI/SDK"
& $patchSDKCommand --version
& $patchSDKCommand new classlib -n MultiTargetTest $xml=@'

           netstandard1.3;netstandard2.0                                        

'@

Out-File -FilePath .\MultiTargetTest\MultiTargetTest.csproj -InputObject $xml & $patchSDKCommand restore MultiTargetTest\MultiTargetTest.csproj
& $patchSDKCommand list MultiTargetTest\MultiTargetTest.csproj package
"The output above should have two target frameworks, netstandard1.3 and netstandard2.0"
"Moq should be listed under netstandard1.3, but not netstandard2.0"
"xunit should be listed under netstandard2.0, but not netstandard1.3"
"Newtonsoft.Json should be listed under both" Pause

3.  Open a powershell command window
3.1. Open Task Manager.
3.2. Navigate on the main menu to File | “Run new task.”
3.3. In the Open textbox type:
  Powershell -ExecutionPolicy Bypass
3.4. Enable the option “Create this task with administrative privileges.” And click the OK button.
4.  Cd to the path of "Test.ps1" (you created in step2) and run the script.

#### Expected Results:  
No error occurs and the script is executed successfully.
#### Actual Results:
Unhandled exception was thrown (as highlighted log below) and the script was failed to execute as the screenshot below.
![image](https://github.com/NuGet/Home/assets/20632625/270ce09c-13aa-4472-9534-9e224de91f8e)
#### Note:
Repro rate: 100%.

### Verbose Logs

```shell
#### Note:
The output log:

PS C:\Users\v-luzh\Desktop\Entropy-main\Entropy-main\SDKPatchTool> cd C:\Users\v-luzh\Desktop\DotnetList
PS C:\Users\v-luzh\Desktop\DotnetList> .\Test.ps1
Getting latest .NET Core CLI
Testing the following version of the .NET Core CLI/SDK
7.0.405
Creating test package projects

Welcome to .NET 7.0!
---------------------
SDK Version: 7.0.405

Telemetry
---------
The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
Learn about HTTPS: https://aka.ms/dotnet-https
----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
The template "Class Library" was created successfully.

Processing post-creation actions...
Restoring C:\Users\v-luzh\Desktop\DotnetList\MyLib\MyLib.csproj:
  Determining projects to restore...
  Restored C:\Users\v-luzh\Desktop\DotnetList\MyLib\MyLib.csproj (in 221 ms).
Restore succeeded.

The template "Class Library" was created successfully.

Processing post-creation actions...
Restoring C:\Users\v-luzh\Desktop\DotnetList\MyDep\MyDep.csproj:
  Determining projects to restore...
  Restored C:\Users\v-luzh\Desktop\DotnetList\MyDep\MyDep.csproj (in 175 ms).
Restore succeeded.

Reference `..\MyDep\MyDep.csproj` added to the project.
The template "Solution File" was created successfully.

Project `MyLib\MyLib.csproj` added to the solution.
Project `MyDep\MyDep.csproj` added to the solution.
MSBuild version 17.7.4+3ebbd7c49 for .NET
  Determining projects to restore...
  Restored C:\Users\v-luzh\Desktop\DotnetList\MyLib\MyLib.csproj (in 281 ms).
  1 of 2 projects are up-to-date for restore.
Unhandled exception. Unhandled exception. Unhandled exception. Unhandled exception. Unhandled exception. System.TypeLoadException: Could not load type 'System.CommandLine.CliCommand' from assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
   at NuGet.CommandLine.XPlat.Program.MainInternal(String[] args, CommandOutputLogger log)
   at NuGet.CommandLine.XPlat.Program.Main(String[] args)
System.TypeLoadException: Could not load type 'System.CommandLine.CliCommand' from assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
   at NuGet.CommandLine.XPlat.Program.MainInternal(String[] args, CommandOutputLogger log)
   at NuGet.CommandLine.XPlat.Program.Main(String[] args)
System.TypeLoadException: Could not load type 'System.CommandLine.CliCommand' from assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
   at NuGet.CommandLine.XPlat.Program.MainInternal(String[] args, CommandOutputLogger log)
   at NuGet.CommandLine.XPlat.Program.Main(String[] args)
Unhandled exception. System.TypeLoadException: Could not load type 'System.CommandLine.CliCommand' from assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
   at NuGet.CommandLine.XPlat.Program.MainInternal(String[] args, CommandOutputLogger log)
   at NuGet.CommandLine.XPlat.Program.Main(String[] args)System.TypeLoadException: Could not load type 'System.CommandLine.CliCommand' from assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
   at NuGet.CommandLine.XPlat.Program.MainInternal(String[] args, CommandOutputLogger log)
   at NuGet.CommandLine.XPlat.Program.Main(String[] args)Unhandled exception. System.TypeLoadException: Could not load type 'System.CommandLine.CliCommand' from assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
   at NuGet.CommandLine.XPlat.Program.MainInternal(String[] args, CommandOutputLogger log)
   at NuGet.CommandLine.XPlat.Program.Main(String[] args)

Unhandled exception.
System.TypeLoadException: Could not load type 'System.CommandLine.CliCommand' from assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
   at NuGet.CommandLine.XPlat.Program.MainInternal(String[] args, CommandOutputLogger log)
   at NuGet.CommandLine.XPlat.Program.Main(String[] args)Unhandled exception.Unhandled exception.
 System.TypeLoadException: Could not load type 'System.CommandLine.CliCommand' from assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
   at NuGet.CommandLine.XPlat.Program.MainInternal(String[] args, CommandOutputLogger log)
   at NuGet.CommandLine.XPlat.Program.Main(String[] args)
System.TypeLoadException: Could not load type 'System.CommandLine.CliCommand' from assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
   at NuGet.CommandLine.XPlat.Program.MainInternal(String[] args, CommandOutputLogger log)
   at NuGet.CommandLine.XPlat.Program.Main(String[] args)
System.TypeLoadException: Could not load type 'System.CommandLine.CliCommand' from assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
   at NuGet.CommandLine.XPlat.Program.MainInternal(String[] args, CommandOutputLogger log)
   at NuGet.CommandLine.XPlat.Program.Main(String[] args)
  MyDep -> C:\Users\v-luzh\Desktop\DotnetList\MyDep\bin\Debug\net7.0\MyDep.dll
  MyLib -> C:\Users\v-luzh\Desktop\DotnetList\MyLib\bin\Debug\net7.0\MyLib.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:28.01
Creating packages
MSBuild version 17.7.4+3ebbd7c49 for .NET
  MyDep -> C:\Users\v-luzh\Desktop\DotnetList\MyDep\bin\Debug\net7.0\MyDep.dll
  The package MyDep.1.0.1 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why
  package readmes are important.
  Successfully created package 'C:\Users\v-luzh\Desktop\DotnetList\MyDep\bin\Debug\MyDep.1.0.1.nupkg'.
  MyLib -> C:\Users\v-luzh\Desktop\DotnetList\MyLib\bin\Debug\net7.0\MyLib.dll
  The package MyLib.1.0.1 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why
  package readmes are important.
  Successfully created package 'C:\Users\v-luzh\Desktop\DotnetList\MyLib\bin\Debug\MyLib.1.0.1.nupkg'.
MSBuild version 17.7.4+3ebbd7c49 for .NET
  MyDep -> C:\Users\v-luzh\Desktop\DotnetList\MyDep\bin\Debug\net7.0\MyDep.dll
  The package MyDep.1.0.2 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why
  package readmes are important.
  Successfully created package 'C:\Users\v-luzh\Desktop\DotnetList\MyDep\bin\Debug\MyDep.1.0.2.nupkg'.
  MyLib -> C:\Users\v-luzh\Desktop\DotnetList\MyLib\bin\Debug\net7.0\MyLib.dll
  The package MyLib.1.0.2 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why
  package readmes are important.
  Successfully created package 'C:\Users\v-luzh\Desktop\DotnetList\MyLib\bin\Debug\MyLib.1.0.2.nupkg'.
MSBuild version 17.7.4+3ebbd7c49 for .NET
  MyDep -> C:\Users\v-luzh\Desktop\DotnetList\MyDep\bin\Debug\net7.0\MyDep.dll
  The package MyDep.1.0.3-beta is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn
   why package readmes are important.
  Successfully created package 'C:\Users\v-luzh\Desktop\DotnetList\MyDep\bin\Debug\MyDep.1.0.3-beta.nupkg'.
  MyLib -> C:\Users\v-luzh\Desktop\DotnetList\MyLib\bin\Debug\net7.0\MyLib.dll
  The package MyLib.1.0.3-beta is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn
   why package readmes are important.
  Successfully created package 'C:\Users\v-luzh\Desktop\DotnetList\MyLib\bin\Debug\MyLib.1.0.3-beta.nupkg'.
MSBuild version 17.7.4+3ebbd7c49 for .NET
  MyDep -> C:\Users\v-luzh\Desktop\DotnetList\MyDep\bin\Debug\net7.0\MyDep.dll
  The package MyDep.1.1.0 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why
  package readmes are important.
  Successfully created package 'C:\Users\v-luzh\Desktop\DotnetList\MyDep\bin\Debug\MyDep.1.1.0.nupkg'.
  MyLib -> C:\Users\v-luzh\Desktop\DotnetList\MyLib\bin\Debug\net7.0\MyLib.dll
  The package MyLib.1.1.0 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why
  package readmes are important.
  Successfully created package 'C:\Users\v-luzh\Desktop\DotnetList\MyLib\bin\Debug\MyLib.1.1.0.nupkg'.
MSBuild version 17.7.4+3ebbd7c49 for .NET
  MyDep -> C:\Users\v-luzh\Desktop\DotnetList\MyDep\bin\Debug\net7.0\MyDep.dll
  The package MyDep.1.2.0-beta is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn
   why package readmes are important.
  Successfully created package 'C:\Users\v-luzh\Desktop\DotnetList\MyDep\bin\Debug\MyDep.1.2.0-beta.nupkg'.
  MyLib -> C:\Users\v-luzh\Desktop\DotnetList\MyLib\bin\Debug\net7.0\MyLib.dll
  The package MyLib.1.2.0-beta is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn
   why package readmes are important.
  Successfully created package 'C:\Users\v-luzh\Desktop\DotnetList\MyLib\bin\Debug\MyLib.1.2.0-beta.nupkg'.
MSBuild version 17.7.4+3ebbd7c49 for .NET
  MyDep -> C:\Users\v-luzh\Desktop\DotnetList\MyDep\bin\Debug\net7.0\MyDep.dll
  The package MyDep.2.0.0 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why
  package readmes are important.
  Successfully created package 'C:\Users\v-luzh\Desktop\DotnetList\MyDep\bin\Debug\MyDep.2.0.0.nupkg'.
  MyLib -> C:\Users\v-luzh\Desktop\DotnetList\MyLib\bin\Debug\net7.0\MyLib.dll
  The package MyLib.2.0.0 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why
  package readmes are important.
  Successfully created package 'C:\Users\v-luzh\Desktop\DotnetList\MyLib\bin\Debug\MyLib.2.0.0.nupkg'.
MSBuild version 17.7.4+3ebbd7c49 for .NET
  MyDep -> C:\Users\v-luzh\Desktop\DotnetList\MyDep\bin\Debug\net7.0\MyDep.dll
  The package MyDep.3.0.0-beta is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn
   why package readmes are important.
  Successfully created package 'C:\Users\v-luzh\Desktop\DotnetList\MyDep\bin\Debug\MyDep.3.0.0-beta.nupkg'.
  MyLib -> C:\Users\v-luzh\Desktop\DotnetList\MyLib\bin\Debug\net7.0\MyLib.dll
  The package MyLib.3.0.0-beta is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn
   why package readmes are important.
  Successfully created package 'C:\Users\v-luzh\Desktop\DotnetList\MyLib\bin\Debug\MyLib.3.0.0-beta.nupkg'.
Creating nuget.config
The template "NuGet Config" was created successfully.

The template "Console App" was created successfully.

Processing post-creation actions...
Restoring C:\Users\v-luzh\Desktop\DotnetList\MyProg\MyProg.csproj:
  Determining projects to restore...
  Restored C:\Users\v-luzh\Desktop\DotnetList\MyProg\MyProg.csproj (in 230 ms).
Restore succeeded.

  Determining projects to restore...
  Writing C:\Users\v-luzh\AppData\Local\Temp\tmpE686.tmp
Unhandled exception. System.TypeLoadException: Could not load type 'System.CommandLine.CliCommand' from assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
   at NuGet.CommandLine.XPlat.Program.MainInternal(String[] args, CommandOutputLogger log)
   at NuGet.CommandLine.XPlat.Program.Main(String[] args)
  Determining projects to restore...
  All projects are up-to-date for restore.
The template "Console App" was created successfully.

Processing post-creation actions...
Restoring C:\Users\v-luzh\Desktop\DotnetList\deprecationTest\deprecationTest.csproj:
  Determining projects to restore...
  Restored C:\Users\v-luzh\Desktop\DotnetList\deprecationTest\deprecationTest.csproj (in 233 ms).
Restore succeeded.

  Determining projects to restore...
  Writing C:\Users\v-luzh\AppData\Local\Temp\tmp6D0.tmp
Unhandled exception. System.TypeLoadException: Could not load type 'System.CommandLine.CliCommand' from assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
   at NuGet.CommandLine.XPlat.Program.MainInternal(String[] args, CommandOutputLogger log)
   at NuGet.CommandLine.XPlat.Program.Main(String[] args)
Unhandled exception. System.TypeLoadException: Could not load type 'System.CommandLine.CliCommand' from assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
   at NuGet.CommandLine.XPlat.Program.MainInternal(String[] args, CommandOutputLogger log)
   at NuGet.CommandLine.XPlat.Program.Main(String[] args)
key         value
---         -----
localSource localSource
Creating test program
latest version of MyLib and MyDep above should be 1.0.2
Press Enter to continue...:
nkolev92 commented 9 months ago

It seems like the version of the SDK you're using is not compatible with the version of the NuGet SDK you're patching with.

Which version of the NuGet packages are you patching with? How is that version chosen?

FWIW, 7.0.400 of the SDK matches, 6.7 of NuGet: https://learn.microsoft.com/en-us/nuget/release-notes/nuget-6.7.

Patching it with any other version is not guaranteed to work. It does most of the time but it's not guaranteed.

nkolev92 commented 9 months ago

After meeting, the script hard codes latest channel: https://github.com/NuGet/Entropy/blob/5c73e37028b79b65bb95bf4593286bbbc4f65761/SDKPatchTool/patchOnWindows.ps1#L14.

v-luzh commented 9 months ago

@nkolev92, we used NuGet Client Dev\6.9.0.85 to patch last time. In our regular Dotnet List Packages Test/Package Signing Test/Cross-platform Verify Test/Cross-platform Dotnet Sign Test, we were asked to set the $SDKChannel = "7.0" in the SDKPatchTools of Entropy. They all work well, but it failed this time.

We tried the value of $SDKChannel as "9.0", but running patchOnWindows.ps1 would failed. And we also tried the "LTS" as the guidance below, and it will patch the latest .NET SDK 7.0.

-Channel|--channel

Specifies the source channel for the installation. The possible values are:

STS: The most recent Standard Term Support release. LTS: The most recent Long Term Support release. Two-part version in A.B format, representing a specific release (for example, 3.1 or 6.0). Three-part version in A.B.Cxx format, representing a specific SDK release (for example, 6.0.1xx or 6.0.2xx). Available since the 5.0 release.

nkolev92 commented 8 months ago

6.9 will match 8.0.200, so the chnanel needs to be 8.0.

I've updated the script, simplified it significantly, can you please try it and let me know how it goes?

Note the script name change, and the fact that you will not need to use different scripts on linux and windows.

v-luzh commented 8 months ago

Hi @nkolev92, the patching is successful, but it patched with .NET SDK 8.0.101. It still fails to run the Dotnet List Package Test.ps1 as below.

cd C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage
PS C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage> .\Test.ps1
Getting latest .NET Core CLI
Testing the following version of the .NET Core CLI/SDK
8.0.101
Creating test package projects
The template "Class Library" was created successfully.

Processing post-creation actions...
Restoring C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyLib\MyLib.csproj:
  Determining projects to restore...
  Restored C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyLib\MyLib.csproj (in 169 ms).
Restore succeeded.

The template "Class Library" was created successfully.

Processing post-creation actions...
Restoring C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyDep\MyDep.csproj:
  Determining projects to restore...
  Restored C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyDep\MyDep.csproj (in 117 ms).
Restore succeeded.

Reference `..\MyDep\MyDep.csproj` added to the project.
The template "Solution File" was created successfully.

Project `MyLib\MyLib.csproj` added to the solution.
Project `MyDep\MyDep.csproj` added to the solution.
MSBuild version 17.8.3+195e7f5a3 for .NET
  Determining projects to restore...
  Restored C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyLib\MyLib.csproj (in 185 ms).
  1 of 2 projects are up-to-date for restore.
  MyDep -> C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyDep\bin\Debug\net8.0\MyDep.dll
  MyLib -> C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyLib\bin\Debug\net8.0\MyLib.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:03.82
Creating packages
MSBuild version 17.8.3+195e7f5a3 for .NET
  MyDep -> C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyDep\bin\Debug\net8.0\MyDep.dll
  The package MyDep.1.0.1 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why
  package readmes are important.
  Successfully created package 'C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyDep\bin\Debug\MyDep.1.0.1.nupkg'.
  MyLib -> C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyLib\bin\Debug\net8.0\MyLib.dll
  The package MyLib.1.0.1 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why
  package readmes are important.
  Successfully created package 'C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyLib\bin\Debug\MyLib.1.0.1.nupkg'.
MSBuild version 17.8.3+195e7f5a3 for .NET
  MyDep -> C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyDep\bin\Debug\net8.0\MyDep.dll
  The package MyDep.1.0.2 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why
  package readmes are important.
  Successfully created package 'C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyDep\bin\Debug\MyDep.1.0.2.nupkg'.
  MyLib -> C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyLib\bin\Debug\net8.0\MyLib.dll
  The package MyLib.1.0.2 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why
  package readmes are important.
  Successfully created package 'C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyLib\bin\Debug\MyLib.1.0.2.nupkg'.
MSBuild version 17.8.3+195e7f5a3 for .NET
  MyDep -> C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyDep\bin\Debug\net8.0\MyDep.dll
  The package MyDep.1.0.3-beta is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn
   why package readmes are important.
  Successfully created package 'C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyDep\bin\Debug\MyDep.1.0.3-beta.nupk
  g'.
  MyLib -> C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyLib\bin\Debug\net8.0\MyLib.dll
  The package MyLib.1.0.3-beta is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn
   why package readmes are important.
  Successfully created package 'C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyLib\bin\Debug\MyLib.1.0.3-beta.nupk
  g'.
MSBuild version 17.8.3+195e7f5a3 for .NET
  MyDep -> C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyDep\bin\Debug\net8.0\MyDep.dll
  The package MyDep.1.1.0 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why
  package readmes are important.
  Successfully created package 'C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyDep\bin\Debug\MyDep.1.1.0.nupkg'.
  MyLib -> C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyLib\bin\Debug\net8.0\MyLib.dll
  The package MyLib.1.1.0 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why
  package readmes are important.
  Successfully created package 'C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyLib\bin\Debug\MyLib.1.1.0.nupkg'.
MSBuild version 17.8.3+195e7f5a3 for .NET
  MyDep -> C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyDep\bin\Debug\net8.0\MyDep.dll
  The package MyDep.1.2.0-beta is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn
   why package readmes are important.
  Successfully created package 'C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyDep\bin\Debug\MyDep.1.2.0-beta.nupk
  g'.
  MyLib -> C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyLib\bin\Debug\net8.0\MyLib.dll
  The package MyLib.1.2.0-beta is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn
   why package readmes are important.
  Successfully created package 'C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyLib\bin\Debug\MyLib.1.2.0-beta.nupk
  g'.
MSBuild version 17.8.3+195e7f5a3 for .NET
  MyDep -> C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyDep\bin\Debug\net8.0\MyDep.dll
  The package MyDep.2.0.0 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why
  package readmes are important.
  Successfully created package 'C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyDep\bin\Debug\MyDep.2.0.0.nupkg'.
  MyLib -> C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyLib\bin\Debug\net8.0\MyLib.dll
  The package MyLib.2.0.0 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why
  package readmes are important.
  Successfully created package 'C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyLib\bin\Debug\MyLib.2.0.0.nupkg'.
MSBuild version 17.8.3+195e7f5a3 for .NET
  MyDep -> C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyDep\bin\Debug\net8.0\MyDep.dll
  The package MyDep.3.0.0-beta is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn
   why package readmes are important.
  Successfully created package 'C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyDep\bin\Debug\MyDep.3.0.0-beta.nupk
  g'.
  MyLib -> C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyLib\bin\Debug\net8.0\MyLib.dll
  The package MyLib.3.0.0-beta is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn
   why package readmes are important.
  Successfully created package 'C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyLib\bin\Debug\MyLib.3.0.0-beta.nupk
  g'.
Creating nuget.config
The template "NuGet Config" was created successfully.

The template "Console App" was created successfully.

Processing post-creation actions...
Restoring C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyProg\MyProg.csproj:
  Determining projects to restore...
  Restored C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyProg\MyProg.csproj (in 179 ms).
Restore succeeded.

  Determining projects to restore...
  Writing C:\Users\v-luzh.FAREAST\AppData\Local\Temp\tmpsjragk.tmp
info : X.509 certificate chain validation will use the default trust store selected by .NET for code signing.
info : X.509 certificate chain validation will use the default trust store selected by .NET for timestamping.
info : Adding PackageReference for package 'MyLib' into project 'MyProg\MyProg.csproj'.
info : Restoring packages for C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyProg\MyProg.csproj...
info :   CACHE https://api.nuget.org/v3-flatcontainer/mylib/index.json
info : Installed MyDep 1.0.1 from C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\localSource to C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\globalPackages\mydep\1.0.1 with content hash fdn2vWer2BHfFxSfb57LNwA2obMRljBQD9bni75qcr0bxNK56wix9zZYY4OkzyLthsFfKcY9VZFM4J+ZKVc7Sg==.
info : Installed MyLib 1.0.1 from C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\localSource to C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\globalPackages\mylib\1.0.1 with content hash FAnsRocw51K0NIr1+9sqCwTVnguX2AHg/r3HhePJoSWSmSMOZjwm/r1xLKEnXAP73Cfa31D/1Ga5lf1KAiOgmw==.
warn : NU1603: MyProg depends on MyLib (>= 1.0.0) but MyLib 1.0.0 was not found. An approximate best match of MyLib 1.0.1 was resolved.
info :   CACHE https://api.nuget.org/v3/vulnerabilities/index.json
info :   CACHE https://api.nuget.org/v3-vulnerabilities/2024.01.20.05.32.55/vulnerability.base.json
info :   CACHE https://api.nuget.org/v3-vulnerabilities/2024.01.20.05.32.55/2024.01.23.17.33.22/vulnerability.update.json
info : Package 'MyLib' is compatible with all the specified frameworks in project 'MyProg\MyProg.csproj'.
info : PackageReference for package 'MyLib' version '1.0.0' added to file 'C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyProg\MyProg.csproj'.
info : Writing assets file to disk. Path: C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyProg\obj\project.assets.json
log  : Restored C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyProg\MyProg.csproj (in 749 ms).
  Determining projects to restore...
C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyProg\MyProg.csproj : warning NU1603: MyProg depends on MyLib (>= 1.
0.0) but MyLib 1.0.0 was not found. An approximate best match of MyLib 1.0.1 was resolved.
  All projects are up-to-date for restore.
The template "Console App" was created successfully.

Processing post-creation actions...
Restoring C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\deprecationTest\deprecationTest.csproj:
  Determining projects to restore...
  Restored C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\deprecationTest\deprecationTest.csproj (in 135 ms).
Restore succeeded.

  Determining projects to restore...
  Writing C:\Users\v-luzh.FAREAST\AppData\Local\Temp\tmps30hfg.tmp
info : X.509 certificate chain validation will use the default trust store selected by .NET for code signing.
info : X.509 certificate chain validation will use the default trust store selected by .NET for timestamping.
info : Adding PackageReference for package 'NuGet.Core' into project '.\deprecationTest\deprecationTest.csproj'.
info : Restoring packages for C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\deprecationTest\deprecationTest.csproj...
info :   CACHE https://api.nuget.org/v3-flatcontainer/nuget.core/index.json
info :   CACHE https://api.nuget.org/v3-flatcontainer/nuget.core/2.14.0/nuget.core.2.14.0.nupkg
info :   CACHE https://api.nuget.org/v3-flatcontainer/microsoft.web.xdt/index.json
info :   CACHE https://api.nuget.org/v3-flatcontainer/microsoft.web.xdt/2.1.0/microsoft.web.xdt.2.1.0.nupkg
info : Installed Microsoft.Web.Xdt 2.1.0 from https://api.nuget.org/v3/index.json to C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\globalPackages\microsoft.web.xdt\2.1.0 with content hash /ieJ02r4MEJM21Eyl+c5kwoJWPhy+qEEcN68JaqDoamabgxJI1jGi/kNLuKvHUCl6tU7E0rMvaR6FmEnDWtS4A==.
info : Installed NuGet.Core 2.14.0 from https://api.nuget.org/v3/index.json to C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\globalPackages\nuget.core\2.14.0 with content hash UDXFLVRDepqVqyYxQuxujfaAc7XePdw+Lsey+q36iqTm0nuSU1n9laIGqjokvBl0unifYtjSai7fqBQKKd9BUg==.
info :   CACHE https://api.nuget.org/v3/vulnerabilities/index.json
info :   CACHE https://api.nuget.org/v3-vulnerabilities/2024.01.20.05.32.55/vulnerability.base.json
info :   CACHE https://api.nuget.org/v3-vulnerabilities/2024.01.20.05.32.55/2024.01.23.17.33.22/vulnerability.update.json
warn : NU1701: Package 'Microsoft.Web.Xdt 2.1.0' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net8.0'. This package may not be fully compatible with your project.
warn : NU1701: Package 'NuGet.Core 2.14.0' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net8.0'. This package may not be fully compatible with your project.
info : Package 'NuGet.Core' is compatible with all the specified frameworks in project '.\deprecationTest\deprecationTest.csproj'.
info : PackageReference for package 'NuGet.Core' version '2.14.0' added to file 'C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\deprecationTest\deprecationTest.csproj'.
info : Writing assets file to disk. Path: C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\deprecationTest\obj\project.assets.json
log  : Restored C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\deprecationTest\deprecationTest.csproj (in 866 ms).
error: Unexpected failure reading NuGet.Config. Path: 'C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyProg\MyProg.csproj\NuGet.Config'.
error:   Cannot create 'C:\Users\v-luzh.FAREAST\Desktop\DotnetListPackage\MyProg\MyProg.csproj' because a file or directory with the same name already exists.

Usage: NuGet.CommandLine.XPlat.dll package list [arguments] [options]

Arguments:
  <PROJECT | SOLUTION>  A path to a project, solution file or directory.

Options:
  -h|--help               Show help information
  --force-english-output  Forces the application to run using an invariant, English-based culture.
  --framework             Specifies the target framework for which the packages will be listed.
  --deprecated            Displays only the packages marked deprecated by the authors.
  --outdated              Displays only the packages that need updates with the latest version from the sources.
  --vulnerable            Displays only the packages flagged as vulnerable.
  --include-transitive    Includes transitive packages too in the result.
  --include-prerelease    Considers prerelease versions when looking for latest. Works only with `--outdated`.
  --highest-patch         Considers only the versions with matching minor and major. Works only with `--outdated`.
  --highest-minor         Considers only the versions with matching major. Works only with `--outdated`.
  --source                Sources to lookup for latest versions. Works only with `--outdated`.
  --config                A path to a config file to specify sources. Works only with `--outdated`.
  --format                Set the report output format.
  --output-version        The version of report output.
  --interactive           Allow the command to block and require manual action for operations like authentication.
  -v|--verbosity          Set the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic].

key         value
---         -----
localSource localSource
Creating test program
latest version of MyLib and MyDep above should be 1.0.2
Press Enter to continue...:
nkolev92 commented 8 months ago

Further investigation showing some interesting issues:

I'll continue investigating

nkolev92 commented 8 months ago

The root cause here for the test failures is the same as https://github.com/NuGet/Home/issues/12954.

nkolev92 commented 8 months ago

If I change the test cases to run the tests without the relative paths, the test cases work.

"Getting latest .NET Core CLI"  
# Pls change the value of below $patchSDKCommand to the patched SDK.  
$patchSDKCommand = "E:\dotnet-sdk-7.0.406-win-x64\dotnet.exe"
"Testing the following version of the .NET Core CLI/SDK"  
& $patchSDKCommand --version  
"Creating test package projects"  
& $patchSDKCommand new classlib -n  MyLib  
& $patchSDKCommand new classlib -n MyDep  
& $patchSDKCommand add MyLib/MyLib.csproj reference MyDep/MyDep.csproj  
& $patchSDKCommand new sln -n test  
& $patchSDKCommand sln add MyLib/MyLib.csproj  
& $patchSDKCommand sln add MyDep/MyDep.csproj  
& $patchSDKCommand build  
"Creating packages"  
& $patchSDKCommand msbuild /t:pack /p:version=1.0.1  
& $patchSDKCommand msbuild /t:pack /p:version=1.0.2  
& $patchSDKCommand msbuild /t:pack /p:version=1.0.3-beta  
& $patchSDKCommand msbuild /t:pack /p:version=1.1.0  
& $patchSDKCommand msbuild /t:pack /p:version=1.2.0-beta  
& $patchSDKCommand msbuild /t:pack /p:version=2.0.0  
& $patchSDKCommand msbuild /t:pack /p:version=3.0.0-beta  
"Creating nuget.config"  
New-Item .\localSource\ -ItemType Directory | Out-Null  
& $patchSDKCommand new nugetconfig  
$xml = [xml](Get-Content .\nuget.config)   
$sources = $xml.SelectSingleNode('/configuration/packageSources')  
$sources.RemoveAll()  
$source = $xml.CreateElement('add')  
$source.SetAttribute('key', 'localSource') | Out-Null  
$source.SetAttribute('value', 'localSource') | Out-Null  
$sources.AppendChild($source)  
$source = $xml.CreateElement('add')  
if (Test-Path .\cli\sdk\NuGetFallbackFolder) {  
 $source.SetAttribute('key', 'dotnetFallbackFolder') | Out-Null  
 $source.SetAttribute('value', 'cli/sdk/NuGetFallbackFolder') | Out-Null  
 $sources.AppendChild($source)  
}  
$config = $xml.CreateElement('config')  
$xml.DocumentElement.AppendChild($config) | Out-Null  
$globalPackagesFolder = $xml.CreateElement('add')  
$globalPackagesFolder.SetAttribute('key', 'globalPackagesFolder')  
$globalPackagesFolder.SetAttribute('value', 'globalPackages')  
$config.AppendChild($globalPackagesFolder) | Out-Null  
$xml.Save((Join-Path (Get-Location) nuget.config))  
Copy-Item *\bin\Debug\*.nupkg .\localSource\ | Out-Null  
"Creating test program"  
$cwd = $(pwd).Path
& $patchSDKCommand new console -n MyProg  
& $patchSDKCommand add MyProg\MyProg.csproj package MyLib -v 1.0.0  
& $patchSDKCommand restore MyProg\MyProg.csproj  
& $patchSDKCommand new console -n deprecationTest  
& $patchSDKCommand add .\deprecationTest\deprecationTest.csproj package NuGet.Core -v 2.14.0  
& $patchSDKCommand list $cwd\MyProg\MyProg.csproj package --outdated --include-transitive --highest-patch  
"latest version of MyLib and MyDep above should be 1.0.2"  
Pause  

& $patchSDKCommand list $cwd\MyProg\MyProg.csproj package --outdated --include-transitive --highest-patch --include-prerelease  
"latest version of MyLib and MyDep above should be 1.0.3-beta"  
Pause  

& $patchSDKCommand list $cwd\MyProg\MyProg.csproj package --outdated --include-transitive --highest-minor  
"latest version of MyLib and MyDep above should be 1.1.0"  
Pause  

& $patchSDKCommand list $cwd\MyProg\MyProg.csproj package --outdated --include-transitive --highest-minor --include-prerelease  
"latest version of MyLib and MyDep above should be 1.2.0-beta"  
Pause  

& $patchSDKCommand list $cwd\MyProg\MyProg.csproj package --outdated --include-transitive  
"latest version of MyLib and MyDep above should be 2.0.0"  
Pause  

& $patchSDKCommand list $cwd\MyProg\MyProg.csproj package --outdated --include-transitive --include-prerelease  
"latest version of MyLib and MyDep above should be 3.0.0-beta"  
Pause  

& $patchSDKCommand list .\deprecationTest\deprecationTest.csproj package --deprecated  
"the deprecated package version of deprecationTest above should be 2.14.0"  
Pause  

"testing complete with the following version of the .NET Core CLI/SDK"  
& $patchSDKCommand --version  
& $patchSDKCommand new classlib -n MultiTargetTest 
$xml=@' 
<Project Sdk="Microsoft.NET.Sdk">  
 <PropertyGroup>  
 <TargetFrameworks>netstandard1.3;netstandard2.0</TargetFrameworks>  
 </PropertyGroup>  
 <ItemGroup>  
    <PackageReference Include="Newtonsoft.Json" Version="11.0.1" />  
 </ItemGroup>  
 <ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">  
 <PackageReference Include="Moq" Version="4.10.0" />  
 </ItemGroup>  
 <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">  
 <PackageReference Include="xunit" Version="2.4.0" />  
 </ItemGroup>  
</Project>  
'@  

Out-File -FilePath .\MultiTargetTest\MultiTargetTest.csproj -InputObject $xml 
& $patchSDKCommand restore MultiTargetTest\MultiTargetTest.csproj  
& $patchSDKCommand list MultiTargetTest\MultiTargetTest.csproj package  
"The output above should have two target frameworks, netstandard1.3 and netstandard2.0"  
"Moq should be listed under netstandard1.3, but not netstandard2.0"  
"xunit should be listed under netstandard2.0, but not netstandard1.3"  
"Newtonsoft.Json should be listed under both" 

@v-luzh When was the last time these tests were run?

nkolev92 commented 8 months ago

@v-luzh

I have updated the patch tool and have added instructions about choosing the appropriate version of the SDK to test against.

https://github.com/NuGet/Entropy/tree/main/SDKPatchTool

Let me know what you think, and whether the descriptions are good enough.

v-luzh commented 8 months ago

Hi @nkolev92, we used .\SDKPatch.ps1 -SDKPath /home/jamie/Desktop/PatchedSDK/ -NupkgsPath /home/jamie/Desktop/nupkgs/ -SDKChannel 8.0.3xx -Quality daily when patching with NuGet Client Dev\6.10.0.20 today. It works well. Shall we use the -SDKChannel 8.0.3xx when patching with NuGet Client Dev latest build going forward?

nkolev92 commented 8 months ago

As long as we have 6.10, you should use 8.0.3xx. If we get to 6.11, and the next release is not November, it'll be 8.0.4xx.

Note that there's a chance that 8.0.4xx takes some time to exist after we move to 6.11. This is normal, and should not be a cause for concern. It's something that would normally be resolved within a week or 2.

nkolev92 commented 8 months ago

I updated the script & guidance for picking a version to test against.

If you run the tests right now, https://github.com/NuGet/Home/issues/12954 is likely to repro.