Skip to content
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

dotnet --info reports duplicates of paths #59833

Closed
ericstj opened this issue Sep 30, 2021 · 11 comments · Fixed by #60376
Closed

dotnet --info reports duplicates of paths #59833

ericstj opened this issue Sep 30, 2021 · 11 comments · Fixed by #60376
Milestone

Comments

@ericstj
Copy link
Member

ericstj commented Sep 30, 2021

Description

Run dotnet --info

Expect: one instance of each path
Actual: duplicate paths for every entry

.NET SDKs installed:
  6.0.100-rc.2.21478.25 [C:\Program Files\dotnet\sdk]
  6.0.100-rc.2.21478.25 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.0-rc.2.21475.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.0-rc.2.21475.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.0-rc.2.21474.18 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0-rc.2.21474.18 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 6.0.0-rc.2.21475.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.0-rc.2.21475.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Configuration

  • Which version of .NET is the code running on? 6.0 RC2
  • What OS and version, and what distro if applicable? Windows
  • What is the architecture (x64, x86, ARM, ARM64)? All
  • Do you know whether it is specific to that configuration? Yes, specific to Windows, not specific to architecture

Regression?

Yes, previous RC1.

This is caused by this: dotnet/installer#11843
Previously the bundle would set these properties without trailing slash: https://github.com/dotnet/installer/pull/11843/files#diff-42255eeced0cb7937c40024646092ce85055a361283ed45dec27adbab7996905L124
It was hardcoding the values here, which we had to remove because it couldn't get it right, nor could we calculate it.

This might be different in GA, since we changed how those keys are written again with a7e9f9f

Need to test GA to see if we should try to change this in the installer or deal with it in the host.

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Sep 30, 2021
@ericstj
Copy link
Member Author

ericstj commented Sep 30, 2021

The same repros in GA. Looks like MSI appends a trailing slash to all directory properties and I don't see a good way to trim it, short of a custom action.

One possible fix is to normalize these paths by stripping the slash. Looks like that is already done for the dotnet_dir seems reasonable to apply that same normalization to the global_dirs

if (!dotnet_dir.empty())
{
// own_dir contains DIR_SEPARATOR appended that we need to remove.
dotnet_dir_temp = dotnet_dir;
remove_trailing_dir_seperator(&dotnet_dir_temp);
locations->push_back(dotnet_dir_temp);
}
std::vector<pal::string_t> global_dirs;
if (multilevel_lookup && pal::get_global_dotnet_dirs(&global_dirs))
{
for (pal::string_t dir : global_dirs)
{
// avoid duplicate paths
if (!pal::are_paths_equal_with_normalized_casing(dir, dotnet_dir_temp))
{
locations->push_back(dir);
}
}

@ghost
Copy link

ghost commented Oct 1, 2021

Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

Run dotnet --info

Expect: one instance of each path
Actual: duplicate paths for every entry

.NET SDKs installed:
  6.0.100-rc.2.21478.25 [C:\Program Files\dotnet\sdk]
  6.0.100-rc.2.21478.25 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.0-rc.2.21475.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.0-rc.2.21475.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.0-rc.2.21474.18 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0-rc.2.21474.18 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 6.0.0-rc.2.21475.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.0-rc.2.21475.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Configuration

  • Which version of .NET is the code running on? 6.0 RC2
  • What OS and version, and what distro if applicable? Windows
  • What is the architecture (x64, x86, ARM, ARM64)? All
  • Do you know whether it is specific to that configuration? Yes, specific to Windows, not specific to architecture

Regression?

Yes, previous RC1.

This is caused by this: dotnet/installer#11843
Previously the bundle would set these properties without trailing slash: https://github.com/dotnet/installer/pull/11843/files#diff-42255eeced0cb7937c40024646092ce85055a361283ed45dec27adbab7996905L124
It was hardcoding the values here, which we had to remove because it couldn't get it right, nor could we calculate it.

This might be different in GA, since we changed how those keys are written again with a7e9f9f

Need to test GA to see if we should try to change this in the installer or deal with it in the host.

Author: ericstj
Assignees: -
Labels:

area-Host, untriaged

Milestone: -

@ericstj
Copy link
Member Author

ericstj commented Oct 1, 2021

This is going to be a rather visible bug on Windows. Everyone will hit it (not just ARM64). I recommend we take it for for 6.0. The fix should be very low risk.

@agocke agocke added this to the 6.0.0 milestone Oct 2, 2021
@agocke agocke removed the untriaged New issue has not been triaged by the area owner label Oct 2, 2021
@agocke
Copy link
Member

agocke commented Oct 2, 2021

@mateoatr Could you take a look?

@vdanche
Copy link
Member

vdanche commented Oct 13, 2021

Issue still repro on 17.0 preview 6(release channel) or 17.1 preview 1 + RTM SDK
image

@agocke
Copy link
Member

agocke commented Oct 13, 2021

The fix for this looks low, but not zero risk: https://github.com/dotnet/runtime/pull/59890/files

Unfortunately, the window for runtime changes is basically closed (and has been for a bit). I think we take this for servicing or not at all.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Oct 13, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Oct 14, 2021
@ericstj ericstj reopened this Oct 15, 2021
@ericstj
Copy link
Member Author

ericstj commented Oct 15, 2021

Reopening for 6.0 consideration.

@pedoc
Copy link

pedoc commented Oct 20, 2021

Reopening for 6.0 consideration.

7.0.100-alpha.1.21518.14 The problem still exists

@vitek-karas
Copy link
Member

The change probably didn't make it into dotnet/installer - the SDK -> installer integration has been stuck for a few days: dotnet/installer#12361

@ericstj
Copy link
Member Author

ericstj commented Oct 20, 2021

Note that the fix for this was approved for both 3.1 and 5.0, however it was after the builds for the November release were complete.

#60496
dotnet/core-setup#9186

@jeffhandley jeffhandley modified the milestones: 6.0.0, 6.0.x Nov 22, 2021
@agocke agocke added this to AppModel Jul 13, 2022
@agocke agocke closed this as completed Jul 14, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Aug 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

7 participants