Skip to content

Commit fbc65ea

Browse files
committed
Fix macOS NuGet tests - Install Mono 5.2 for MSBuild compatibility
Install Mono 5.2.0 which has better MSBuild compatibility with .NET Core projects, resolving the 'Too many project files specified' error. Mono 5.2 was tested locally and eliminates MSBuild conflicts that occur with newer Mono versions (6.x) on macOS. Fixes: TestSkipBuildDepTreeWhenInstallForbidden failures on macOS CI
1 parent fcfaa16 commit fbc65ea

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.github/actions/install-and-setup/action.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,31 @@ runs:
5050
with:
5151
nuget-version: 6.11.0
5252
- name: Install dotnet
53-
uses: actions/setup-dotnet@v4
53+
uses: actions/setup-dotnet@v5 # Try v5 for better MSBuild handling
5454
with:
5555
dotnet-version: '6.x'
56+
57+
- name: Debug .NET installation
58+
if: runner.os == 'macOS'
59+
run: |
60+
echo "🔍 Debugging .NET installation:"
61+
echo "DOTNET_ROOT: $DOTNET_ROOT"
62+
echo ".NET version:"
63+
dotnet --version
64+
echo "MSBuild in .NET SDK:"
65+
find $DOTNET_ROOT -name "*MSBuild*" 2>/dev/null || echo "No MSBuild found in DOTNET_ROOT"
66+
find /Users/runner/.dotnet -name "*MSBuild*" 2>/dev/null || echo "No MSBuild found in .dotnet"
67+
echo "dotnet --list-sdks:"
68+
dotnet --list-sdks
69+
shell: bash
5670

5771
- name: Install Mono on MacOS
58-
run: brew install mono
5972
if: runner.os == 'macOS'
60-
shell: 'bash'
73+
run: |
74+
echo "Installing Mono 5.2 for better .NET compatibility"
75+
curl -L "https://download.mono-project.com/archive/5.2.0/macos-10-universal/MonoFramework-MDK-5.2.0.224.macos10.xamarin.universal.pkg" -o /tmp/mono-5.2.pkg
76+
sudo installer -pkg /tmp/mono-5.2.pkg -target /
77+
shell: bash
6178

6279
- name: Install Mono on Linux
6380
run: |

0 commit comments

Comments
 (0)