microsoft / microsoft/winget-pkgs

[Package Issue][BUG][Priority LOW]: Wrong installation path.

Open
#336,200 1 comment 0 reactions 0 assignees View on GitHub
Issue-Bug Needs-Triage
Dominant language
No language data
Stars
11.1k
Forks
9.7k
PR merge metrics
PR metrics pending

Description

### Please confirm these before moving forward

- [x] I have searched for my issue and not found a work-in-progress/duplicate/resolved issue.
- [x] I have not been informed if the issue is resolved in a preview version of the winget client.

### Category of the issue

Installation issue.

### Brief description of your issue

If Unity gets updated/upgraded using the CMD command,
`"winget upgrade --all"`
then the new version will get installed to the wrong path.

### Steps to reproduce

Just update Unity using winget.
`winget upgrade --all`

This is the path that it will install:
`C:\Program Files\VERSION_NUMBER_HERE`
Example:
C:\Program Files\Unity 6000.3.6f1

Instead it needs to be installed to:
`C:\Program Files\Unity\Hub\Editor\VERSION_NUMBER_HERE`
Example:
C:\Program Files\Unity\Hub\Editor\6000.3.6f1

Since the installation is not going into the correct path, then the Unity Hub cannot see the installed version and the user cannot select the new version.

# Workaround # 1: Install the new version using the Unity Hub like most/normal people will do.

# Workaround # 2: Install the new version with the "winget upgrade" command.
Then move the folder "Unity 6000.3.6f1"
```
From "C:\Program Files"
To "C:\Program Files\Unity\Hub\Editor"
```
And finally rename the folder "Unity 6000.3.6f1"
```
From "Unity 6000.3.6f1"
To "6000.3.6f1"
```

### Actual behavior

The new version is installing to the wrong path.
`C:\Program Files\VERSION_NUMBER_HERE`
Example:
C:\Program Files\Unity 6000.3.6f1

### Expected behavior

The new version needs to be installed to the correct path.
`C:\Program Files\Unity\Hub\Editor\VERSION_NUMBER_HERE`
Example:
C:\Program Files\Unity\Hub\Editor\6000.3.6f1

### Environment

```raw
C:\Users\Julio>winget --info
Windows Package Manager v1.12.460
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.26200.7705
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.27.460.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User) %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root C:\Program Files\WinGet\Packages
Portable Package Root (x86) C:\Program Files (x86)\WinGet\Packages
Installer Downloads %USERPROFILE%\Downloads
Configuration Modules %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules

Links
---------------------------------------------------------------------------
Privacy Statement https://aka.ms/winget-privacy
License Agreement https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting State
--------------------------------------------------
LocalManifestFiles Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride Disabled
LocalArchiveMalwareScanOverride Disabled
ProxyCommandLineOptions Disabled
DefaultProxy Disabled

C:\Users\Julio>
```

### Screenshots and Logs

> Please upload logs & screenshots since they will help us to find the root cause of the issue. You can find the location of the logs by running winget --info.

I think it is safe to skip this section. Also, I already provided the "winget --info" on the previous question.

Contributor guide

Open the contributing guide

Research direction

Start by locating the Unity package manifest used by `winget upgrade --all` and reproduce the upgrade on the listed Windows and winget versions. Compare the installer metadata with the expected Unity Hub Editor path; done means the upgraded version is placed where Unity Hub can detect and select it.

Written by the indexing model from the issue text.

Assessment

Tech stack
unity
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.