-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[8.0.100-rc.2.23469.4] some deprecated global tools get NuGetPackageNotFoundException when installing #35566
Comments
@marcpopMSFT Could you please help check this bug? It appears to be intentional. |
This seems to be by design, according to #24037 and #28951. Also #32092, although that one is still open. Does the installation succeed if you specify the This might still deserve a breaking-change entry in https://learn.microsoft.com/dotnet/core/compatibility/8.0#sdk. There was a pull request dotnet/docs#32567 but it was closed as premature. |
No, it does not work either. Same exception shows when try to install the tool with or without "--version" |
@JL03-Yue @dsplaisted This was an intentional change. Do you know if it was intended to still work if the user specified an exact version of the package? We may want to mark this as a breaking change and document it as it appears some folks were relying on this. |
ParseResultExtension.GetVersionRange(this ParseResult parseResult) from #28951 used to skip the NuGet search if
But that code was removed in #33835 and replaced with NuGetPackageDownloader, which works differently. The comments on that pull request do not include the string "unlist". Some comments include the word "version" in relation to package versions but they do not directly address this issue:
|
I'm experiencing the same issue when restoring in Azure DevOps a project that references Microsoft Tye 0.11 since RC2 went live. The same issue doesn't happen on my local machine. $ dotnet --version
8.0.100-rc.2.23502.2 See for more details the issue on the Tye repo: dotnet/tye#1615 |
This will be targeted to be fixed in .NET 8 GA. |
@JL03-Yue We verified it on the latest coherent build 8.0.100-rtm.23527.22, it fails to install unlisted tool by specifying version. Could you please check whether this build consuming the fix? And are we going to document it as breaking change if we change the behavior to install the unlist tool by specifying the version?
|
@JL03-Yue Also verify it with today's coherent build dotnet-sdk-8.0.100-rtm.23530.10, it still repro and unable to install the unlisted tool with specified version. Could you please help check whether this build contains the fix? CC: @marcpopMSFT @KalleOlaviNiemitalo @PriyaPurkayastha for awareness. |
Update: The unlist tool can be successfully installed when a version is specified and enclosed in square brackets(install the Exact version match). The above validation which just mentioned the version, actually it is a range (X >=Version) according to the document https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#version-basics For example: The only thing to need your kindly confirm is whether we will be creating a breaking document for this? @JL03-Yue @marcpopMSFT @KalleOlaviNiemitalo |
I'd prefer that it work with the same syntax as before, i.e. |
Maybe the brackets make sense in |
Thanks for your information. @JL03-Yue Could you please have a look at this issue again? Thanks |
@Junjun-zhao, does the |
I agree with you all - we should retain the previous syntax and accept 'bare' versions to mean NuGet-exact-version syntax. |
A breaking change document filed dotnet/docs#37655 for this issue with currently workaround that installing the unlisted tools by specifying the version in brackets. Confirm with Marc offline, Team will plan to improve this in .NET 8 servicing build to simplify it without brackets. |
@Junjun-zhao A change that accept the bare version as NuGet exact version was merged |
@JL03-Yue We verified with latest build 8.0.200-preview.23564.1, bare version doesn't work yet. Following is the dotnet info, could you please help confirm if it is merged into this build?
|
PR #36671 was merged to the release/8.0.1xx branch in commit 5a7019c, but it seems the $ git show --diff-merges=remerge 7d995fce293917e817f63d0a41808dfc6779a034 -- src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs
commit 7d995fce293917e817f63d0a41808dfc6779a034
Merge: a1c5ff764e 91840a4e2e
Author: v-codyguan <[email protected]>
Date: Wed Nov 15 07:03:30 2023 +0000
Merge branch 'release/8.0.1xx' into release/8.0.2xx
diff --git a/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs b/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs
remerge CONFLICT (content): Merge conflict in src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs
index 3d0a8466eb..933f561d98 100644
--- a/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs
+++ b/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs
@@ -559,12 +559,7 @@ private string GenerateVersionRangeErrorDescription(string packageIdentifier, Ve
VersionRange versionRange,
PackageSourceLocation packageSourceLocation = null)
{
-<<<<<<< a1c5ff764e ([release/8.0.2xx] Update dependencies from dotnet/razor (#36863))
if (versionRange.MinVersion != null && versionRange.MaxVersion != null && versionRange.MinVersion == versionRange.MaxVersion)
-=======
- if (versionRange.MinVersion != null && !versionRange.IsFloating &&
- (versionRange.MaxVersion == null || versionRange.MinVersion == versionRange.MaxVersion))
->>>>>>> 91840a4e2e (Update manpages for 8.0 (#36447))
{
return versionRange.MinVersion;
} |
@Junjun-zhao The change is expecting in December fix. @KalleOlaviNiemitalo Thanks for pointing it out! |
Thank you @JL03-Yue. |
Verified this issue on dotnet-8.0.101-servicing.23579.12, bare version works now. Thank you. For example:
|
Issue Description:
When installing these global tools with "dotnet tool install" command, NuGetPackaeNotFoundException will be thrown on dotnet-sdk-8.0.100-rc.2.23469.4. But they are installed successful with dotnet-sdk-8.0.100-rc.2.23466.1.
Application Name: Elemental.SysInfoTool, dotnet-giio, dotnet-sqldb
OS: Windows 10 21H2
CPU: X64
.NET Build Number: dotnet-sdk-8.0.100-rc.2.23469.4
Verify Scenarios:
Repro steps:
The machine only has 8.0.100-rc.2.23469.4 installed and set DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX environment variable as 2.
Expected Result:
Elemental.SysInfoTool install successful.
Actual Result:
Install failed with following exception:
Findings:
These tools do not exist in NuGet Gallery | Packages
And their details page marked them as deprecated and cannot be used anymore. For example, this is the Elemental.SysInfoTool tool page.
But we can install this tool successfully when we have earlier SDK installed in our machine.
This issue seems related to 8114042
@dotnet-actwx-bot @dotnet/compat
The text was updated successfully, but these errors were encountered: