We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Uri.TryCreate
Uri.IsLoopback returns true for https://LOCALHOST in net6, but false in net8.
Uri.IsLoopback
true
https://LOCALHOST
false
This should be documented as a net8 breaking change. I also check and found no related item in net7 breaking changes page.
Create a simple console app project with this file structure
. ├── Loopback.6.csproj ├── Loopback.8.csproj └── Program.cs
Content of Program.cs
Program.cs
using System; const string s = "https://LOCALHOST"; Uri.TryCreate(s, UriKind.Absolute, out var u); Console.WriteLine(u?.IsLoopback);
Content of Loopback.6.csproj
Loopback.6.csproj
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net6.0</TargetFramework> </PropertyGroup> </Project>
Content of Loopback.8.csproj
Loopback.8.csproj
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net8.0</TargetFramework> </PropertyGroup> </Project>
Then, execute the program with each runtime
$ dotnet restore Loopback.8.csproj -v quiet && dotnet run --project Loopback.8.csproj --quiet False $ dotnet restore Loopback.6.csproj -v quiet && dotnet run --project Loopback.6.csproj --quiet True
N/A
No response
The text was updated successfully, but these errors were encountered:
Tagging subscribers to this area: @dotnet/ncl See info in area-owners.md if you want to be subscribed.
Sorry, something went wrong.
This was an unintended regression in .NET 8. It's been fixed in .NET 9: #105008.
I see. We have manually fixed it, but I think the docs should still be updated to inform those users who want to stay on LTS releases.
No branches or pull requests
Description
Uri.IsLoopback
returnstrue
forhttps://LOCALHOST
in net6, butfalse
in net8.This should be documented as a net8 breaking change. I also check and found no related item in net7 breaking changes page.
Reproduction Steps
Create a simple console app project with this file structure
Content of
Program.cs
Content of
Loopback.6.csproj
Content of
Loopback.8.csproj
Then, execute the program with each runtime
Expected behavior
N/A
Actual behavior
N/A
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: