Skip to content

Conversation

@eyalk007
Copy link
Contributor

@eyalk007 eyalk007 commented Oct 5, 2025

  • The pull request is targeting the dev branch.
  • The code has been validated to compile successfully by running go vet ./....
  • The code has been formatted properly using go fmt ./....
  • All static analysis checks passed.
  • All tests have passed. If this feature is not already covered by the tests, new tests have been added.
  • Updated the Contributing page / ReadMe page / CI Workflow files if needed.
  • All changes are detailed at the description. if not already covered at JFrog Documentation, new documentation have been added.

Resolves TestSkipBuildDepTreeWhenInstallForbidden failures on macOS CI where Mono's deprecated MSBuild was taking precedence over .NET's MSBuild.

The issue occurred because:

  • Mono MSBuild was in PATH before .NET MSBuild
  • Mono's MSBuild is deprecated and fails with 'Too many project files specified'
  • dotnet restore command was using wrong MSBuild executable

Fix adds .NET paths to front of PATH after Mono installation to ensure .NET's MSBuild is used for NuGet/dotnet operations.

Fixes: MSBUILD error MSBUILD0004: Too many project files specified

@eyalk007 eyalk007 added ignore for release Automatically generated release notes safe to test Approve running integration tests on a pull request labels Oct 5, 2025
@eyalk007 eyalk007 self-assigned this Oct 5, 2025
@eyalk007 eyalk007 force-pushed the fix-macos-nuget-msbuild-priority branch from 0a0d06e to 5ec8b8a Compare October 5, 2025 19:02
@eyalk007 eyalk007 added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Oct 5, 2025
@eyalk007 eyalk007 force-pushed the fix-macos-nuget-msbuild-priority branch from 5ec8b8a to 9c98cfe Compare October 5, 2025 21:24
@eyalk007 eyalk007 added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Oct 5, 2025
@eyalk007 eyalk007 force-pushed the fix-macos-nuget-msbuild-priority branch from 9c98cfe to 6c778d1 Compare October 7, 2025 20:09
@eyalk007 eyalk007 added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Oct 7, 2025
@eyalk007 eyalk007 force-pushed the fix-macos-nuget-msbuild-priority branch from 6c778d1 to 46afd12 Compare October 7, 2025 20:36
@eyalk007 eyalk007 added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Oct 7, 2025
@eyalk007 eyalk007 force-pushed the fix-macos-nuget-msbuild-priority branch from 46afd12 to 4d82dc6 Compare October 7, 2025 20:42
@eyalk007 eyalk007 added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Oct 7, 2025
@eyalk007 eyalk007 force-pushed the fix-macos-nuget-msbuild-priority branch from 4d82dc6 to 8650cb8 Compare October 7, 2025 20:50
@eyalk007 eyalk007 added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Oct 7, 2025
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
@eyalk007 eyalk007 force-pushed the fix-macos-nuget-msbuild-priority branch from 8650cb8 to fbc65ea Compare October 8, 2025 19:09
@eyalk007 eyalk007 added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Oct 8, 2025
Use modern Mono 6.x with MSBuild environment variables pointing to .NET SDK
instead of downgrading to Mono 5.2. This approach was tested locally and
eliminates MSBuild conflicts while maintaining compatibility.

Changes:
- Install modern Mono 6.x (fast, no large downloads)
- Set MSBUILD_EXE_PATH to .NET SDK MSBuild.dll
- Set MSBuildSDKsPath to .NET SDK Sdks directory
- Upgrade to setup-dotnet@v5

This allows NuGet.exe to use Mono runtime while dotnet restore uses .NET MSBuild.
Tested locally - eliminates 'Too many project files specified' errors.
@eyalk007 eyalk007 force-pushed the fix-macos-nuget-msbuild-priority branch from acab218 to c35c532 Compare October 8, 2025 19:41
@eyalk007 eyalk007 added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Oct 8, 2025
Tested locally: dotnet restore works perfectly with .NET 7 + modern NuGet 6.14 + Mono 6.14.
The MSBuild environment variable approach resolves tool conflicts.

Changes:
- Install modern Mono 6.x (with Homebrew caching)
- Set MSBUILD_EXE_PATH and MSBuildSDKsPath to .NET SDK
- Upgrade to setup-dotnet@v5
- Add fast NuGet unit test job for quick feedback

Local testing confirms MSBuild compatibility is resolved.
@eyalk007 eyalk007 force-pushed the fix-macos-nuget-msbuild-priority branch from c35c532 to ba14026 Compare October 8, 2025 20:19
@attiasas attiasas added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ignore for release Automatically generated release notes safe to test Approve running integration tests on a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants