beeware / beeware/briefcase

Detection of Visual Studio is unreliable

Open
#942 0 comments 0 reactions 0 assignees View on GitHub
bug windows
Dominant language
Python
Stars
3.3k
Forks
549
Avg merge
1d 4h
Merged PRs (30d)
40

Description

**Describe the bug**
Detecting a Visual Studio installation may be leaning too hard on just the presence of `vswhere.exe`. This executable can exist from simply installing the C++ Build Tools to get `psutil` working.

```
❯ briefcase build windows visualstudio

Visual Studio appears to exist, but Briefcase can't retrieve installation metadata.
Please report this as a bug at:

https://github.com/beeware/briefcase/issues/new

In your report, please including the output from running:

C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe

from the command prompt.
```

**To Reproduce**
Steps to reproduce the behavior:
Install just the [Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) as recommended by `psutil` when its install fails.

**Expected behavior**
Briefcase better detects when Visual Studio is altogether missing.

If `vswhere.exe` returns an empty list, it may be better to assume it isn't installed at all.

**Environment:**
- Operating System: Windows 10
- Python version: 3.10.8
- Software versions:
- Briefcase: `0.3.12.dev47+g50014d1b`

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with `briefcase build windows visualstudio` after installing only the C++ Build Tools, then trace the Visual Studio detection entry point that invokes `vswhere.exe`. Done means an empty `vswhere.exe` result is treated as Visual Studio being absent rather than producing the installation-metadata error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.