AngelMunoz / AngelMunoz/NXUIFSharpMultiPlatformTemplate

build fails on macOS .NET 8 preview

Open
#2 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
F#
Stars
9
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Seems to be a problem with .NET 8.0.100-preview.7.23376.3
```
Z% sudo dotnet workspace restore
Password:

Welcome to .NET 8.0!
---------------------
SDK Version: 8.0.100-preview.7.23376.3

Telemetry
---------
The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate, run 'dotnet dev-certs https --trust'
Learn about HTTPS: https://aka.ms/dotnet-https

----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
Installing workloads: wasm-tools-net7 ios

Skipping NuGet package signature verification.
Installing workload manifest microsoft.net.sdk.android version 34.0.0-preview.7.382...
...
Garbage collecting for SDK feature band(s) 7.0.300 8.0.100-preview.7...

Successfully installed workload(s) wasm-tools-net7 ios.

Z% dotnet tool restore
Tool 'fantomas' (version '6.0.3') was restored. Available commands: fantomas

Z% dotnet build
MSBuild version 17.8.0-preview-23367-03+0ff2a83e9 for .NET
/tmp/NXUIFSharpMultiPlatformTemplate/src/Library/Library.fsproj : error MSB4242: SDK Resolver Failure: "The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed while attempting to resolve the SDK "Microsoft.NET.Sdk". Exception: "System.UnauthorizedAccessException: Access to the path '/usr/local/share/dotnet/sdk-manifests/8.0.100-preview.7/microsoft.net.sdk.tvos' is denied.
/tmp/NXUIFSharpMultiPlatformTemplate/src/Library/Library.fsproj : error MSB4242: ---> System.IO.IOException: Permission denied
/tmp/NXUIFSharpMultiPlatformTemplate/src/Library/Library.fsproj : error MSB4242: --- End of inner exception stack trace ---
/tmp/NXUIFSharpMultiPlatformTemplate/src/Library/Library.fsproj : error MSB4242: at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
/tmp/NXUIFSharpMultiPlatformTemplate/src/Library/Library.fsproj : error MSB4242: at System.IO.Enumeration.FileSystemEnumerator`1.Init()
/tmp/NXUIFSharpMultiPlatformTemplate/src/Library/Library.fsproj : error MSB4242: at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
/tmp/NXUIFSharpMultiPlatformTemplate/src/Library/Library.fsproj : error MSB4242: at System.IO.Enumeration.FileSystemEnumerableFactory.UserDirectories(String directory, String expression, EnumerationOptions options)
/tmp/NXUIFSharpMultiPlatformTemplate/src/Library/Library.fsproj : error MSB4242: at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
/tmp/NXUIFSharpMultiPlatformTemplate/src/Library/Library.fsproj : error MSB4242: at System.IO.Directory.GetDirectories(String path, String searchPattern, EnumerationOptions enumerationOptions)
/tmp/NXUIFSharpMultiPlatformTemplate/src/Library/Library.fsproj : error MSB4242: at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider.ResolveManifestDirectory(String manifestDirectory)
/tmp/NXUIFSharpMultiPlatformTemplate/src/Library/Library.fsproj : error MSB4242: at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider.GetManifests()
/tmp/NXUIFSharpMultiPlatformTemplate/src/Library/Library.fsproj : error MSB4242: at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.LoadManifestsFromProvider(IWorkloadManifestProvider manifestProvider)
/tmp/NXUIFSharpMultiPlatformTemplate/src/Library/Library.fsproj : error MSB4242: at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.Create(IWorkloadManifestProvider manifestProvider, String dotnetRootPath, String sdkVersion, String userProfileDir)
/tmp/NXUIFSharpMultiPlatformTemplate/src/Library/Library.fsproj : error MSB4242: at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.CachingWorkloadResolver.Resolve(String sdkReferenceName, String dotnetRootPath, String sdkVersion, String userProfileDir, String globalJsonPath)
/tmp/NXUIFSharpMultiPlatformTemplate/src/Library/Library.fsproj : error MSB4242: at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.WorkloadSdkResolver.Resolve(SdkReference sdkReference, SdkResolverContext resolverContext, SdkResultFactory factory)
/tmp/NXUIFSharpMultiPlatformTemplate/src/Library/Library.fsproj : error MSB4242: at Microsoft.Build.BackEnd.SdkResolution.SdkResolverService.TryResolveSdkUsingSpecifiedResolvers(IList`1 resolvers, Int32 submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, String solutionPath, String projectPath, Boolean interactive, Boolean isRunningInVisualStudio, SdkResult& sdkResult, IEnumerable`1& errors, IEnumerable`1& warnings)""
/tmp/NXUIFSharpMultiPlatformTemplate/src/Project.Browser/Project.Browser.fsproj : error MSB4014: The build stopped unexpectedly because of an internal failure.
/tmp/NXUIFSharpMultiPlatformTemplate/src/Project.Browser/Project.Browser.fsproj : error MSB4014: Microsoft.Build.BackEnd.SdkResolution.SdkResolverException: The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed while attempting to resolve the SDK "Microsoft.NET.Sdk". Exception: "System.UnauthorizedAccessException: Access to the path '/usr/local/share/dotnet/sdk-manifests/8.0.100-preview.7/microsoft.net.sdk.tvos' is denied.
/tmp/NXUIFSharpMultiPlatformTemplate/src/Project.Browser/Project.Browser.fsproj : error MSB4014: ---> System.IO.IOException: Permission denied
/tmp/NXUIFSharpMultiPlatformTemplate/src/Project.Browser/Project.Browser.fsproj : error MSB4014: --- End of inner exception stack trace ---
/tmp/NXUIFSharpMultiPlatformTemplate/src/Project.Browser/Project.Browser.fsproj : error MSB4014: at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
...
```
I fixed the permissions problems, but then I got this:
```
Z% dotnet build
MSBuild version 17.8.0-preview-23367-03+0ff2a83e9 for .NET
Determining projects to restore...
/usr/local/share/dotnet/sdk/8.0.100-preview.7.23376.3/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To build this project, the following workloads must be installed: ios [/tmp/NXUIFSharpMultiPlatformTemplate/src/Project.iOS/Project.iOS.fsproj]
/usr/local/share/dotnet/sdk/8.0.100-preview.7.23376.3/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To install these workloads, run the following command: dotnet workload restore [/tmp/NXUIFSharpMultiPlatformTemplate/src/Project.iOS/Project.iOS.fsproj]
/usr/local/share/dotnet/sdk/8.0.100-preview.7.23376.3/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To build this project, the following workloads must be installed: wasm-tools-net7 [/tmp/NXUIFSharpMultiPlatformTemplate/src/Project.Browser/Project.Browser.fsproj]
/usr/local/share/dotnet/sdk/8.0.100-preview.7.23376.3/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To install these workloads, run the following command: dotnet workload restore [/tmp/NXUIFSharpMultiPlatformTemplate/src/Project.Browser/Project.Browser.fsproj]

Build FAILED.

/usr/local/share/dotnet/sdk/8.0.100-preview.7.23376.3/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To build this project, the following workloads must be installed: ios [/tmp/NXUIFSharpMultiPlatformTemplate/src/Project.iOS/Project.iOS.fsproj]
/usr/local/share/dotnet/sdk/8.0.100-preview.7.23376.3/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To install these workloads, run the following command: dotnet workload restore [/tmp/NXUIFSharpMultiPlatformTemplate/src/Project.iOS/Project.iOS.fsproj]
/usr/local/share/dotnet/sdk/8.0.100-preview.7.23376.3/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To build this project, the following workloads must be installed: wasm-tools-net7 [/tmp/NXUIFSharpMultiPlatformTemplate/src/Project.Browser/Project.Browser.fsproj]
/usr/local/share/dotnet/sdk/8.0.100-preview.7.23376.3/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To install these workloads, run the following command: dotnet workload restore [/tmp/NXUIFSharpMultiPlatformTemplate/src/Project.Browser/Project.Browser.fsproj]
0 Warning(s)
2 Error(s)

Time Elapsed 00:00:01.86
Z%
```
Is there a workaround?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with src/Library/Library.fsproj, src/Project.iOS/Project.iOS.fsproj, and src/Project.Browser/Project.Browser.fsproj, then reproduce the failure using the reported .NET SDK and dotnet build. Check the workload restore output and the SDK manifest permissions. Done means the affected projects build successfully on macOS without the reported resolver or missing-workload errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp, ios, wasm
Domain
build-system, mobile-dev, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.