KirillOsenkov / MSBuildStructuredLog

A logger for MSBuild that records a structured representation of executed targets, tasks, property and item values.
MIT License
1.47k stars 198 forks source link

"Open Project/Solution" does not allow project file selection on Mac #500

Open eatdrinksleepcode opened 3 years ago

eatdrinksleepcode commented 3 years ago

On Mac, the dialog opened by "Open Project/Solution" allows selecting solution (*.sln) files, but not C# project (*.csproj) files (or any other project files). This seems to be because the filter for that dialog is specified as Extensions = { "sln", "*proj" }, but the OpenFileDialog on Mac does not recognize glob patterns.

Two fixes I can think of:

  1. Specify all of the allowed project types (i.e. "vbproj", "csproj", "fsproj"). There is the potential to miss custom project types that by convention are following the same pattern.
  2. Remove the filter and let any file be chosen, and show an error if it is not a valid project file. Allows for custom project types, but loses the affordance in the dialog where non-matching files are grayed out.
KirillOsenkov commented 3 years ago

We should list out all common extensions, this will cover the 99% case.

eatdrinksleepcode commented 3 years ago

What do we consider "supported" project types?

(There are a few more examples here.)

Also, do we only want to make this change for Mac, which has this limitation, and leave it as-is for systems that can handle the glob pattern? Or make it the same everywhere?

ltrzesniewski commented 3 years ago

I'd add .proj to handle custom project types, and I'd leave the .*proj glob pattern if the system supports it.

KirillOsenkov commented 3 years ago

yes, only change for Avalonia where it is a problem