[dotnet watch] Tests failing on Mac
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
**BrowserTests.BrowserDiagnostics**
```
[TEST BrowserTests.cs:46] Test waiting for output: '🧪 Test browser opened at 'http://localhost:7001'.'
Failed to load /private/tmp/helix/working/A3CA08FE/p/d/host/fxr/10.0.2/libhostfxr.dylib, error: dlopen(/private/tmp/helix/working/A3CA08FE/p/d/host/fxr/10.0.2/libhostfxr.dylib, 0x0001): tried: '/private/tmp/helix/working/A3CA08FE/p/d/host/fxr/10.0.2/libhostfxr.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/private/tmp/helix/working/A3CA08FE/p/d/host/fxr/10.0.2/libhostfxr.dylib' (no such file), '/private/tmp/helix/working/A3CA08FE/p/d/host/fxr/10.0.2/libhostfxr.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
The library libhostfxr.dylib was found, but loading it from /private/tmp/helix/working/A3CA08FE/p/d/host/fxr/10.0.2/libhostfxr.dylib failed
```
**Aspire_BuildError_ManualRestart**, **Aspire_NoEffect_AutoRestart**
```
[xUnit.net 00:01:11.99] Microsoft.DotNet.Watch.UnitTests.ApplyDeltaTests.Aspire_BuildError_ManualRestart [OUTPUT] dotnet watch 🔨 EXEC : Failed to load /private/tmp/helix/working/B4C30A15/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib, error : dlopen(/private/tmp/helix/working/B4C30A15/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib, 0x0001): tried: '/private/tmp/helix/working/B4C30A15/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/private/tmp/helix/working/B4C30A15/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib' (no such file), '/private/tmp/helix/working/B4C30A15/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')) [/private/tmp/helix/working/B4C30A15/t/dotnetSdkTests.1kApxTR7/Aspire_BuildE---04F22750/WatchAspire.AppHost/WatchAspire.AppHost.csproj]
[xUnit.net 00:01:11.99] Microsoft.DotNet.Watch.UnitTests.ApplyDeltaTests.Aspire_BuildError_ManualRestart [OUTPUT] dotnet watch 🔨 /private/tmp/helix/working/B4C30A15/t/dotnetSdkTests.1kApxTR7/.nuget/packages/aspire.apphost.sdk/9.4.0/Sdk/Sdk.targets(134,5): error : Failed to run Aspire.RuntimeIdentifier.Tool. Exit code: 130. Output: Failed to load /private/tmp/helix/working/B4C30A15/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib, error: dlopen(/private/tmp/helix/working/B4C30A15/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib, 0x0001): tried: '/private/tmp/helix/working/B4C30A15/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/private/tmp/helix/working/B4C30A15/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib' (no such file), '/private/tmp/helix/working/B4C30A15/p/d/shared/Microsoft.NETCore.App/8.0.0/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'));An error occurred while loading required library libhostpolicy.dylib from [/private/tmp/helix/working/B4C30A15/p/d/shared/Microsoft.NETCore.App/8.0.0] [/private/tmp/helix/working/B4C30A15/t/dotnetSdkTests.1kApxTR7/Aspire_BuildE---04F22750/WatchAspire.AppHost/WatchAspire.AppHost.csproj]
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with BrowserTests.cs:46 and the BrowserDiagnostics failure, then inspect Aspire_BuildError_ManualRestart and Aspire_NoEffect_AutoRestart in ApplyDeltaTests. Reproduce the dotnet watch tests on the affected Mac architecture and determine why the test environment loads incompatible libhostfxr.dylib or libhostpolicy.dylib binaries. Done means the named tests pass on Mac without architecture-loading failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, macos
- Domain
- cli, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100