-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Milestone
Description
Steps to Reproduce
- Clone https://github.com/mfkl/mac-multitarget-net5-cs9 on macOS
- Build with
msbuild - See error
Current Behavior
There are errors when building a multitarget solution with the MSBuildExtra SDK on macOS only (OK on Windows), when using TFMs like net5.0 and xamarin.ios10. It seems Mono is using an out of date SDK.
Using a more recent-ish nightly Mono build results in a C# compiler error CSC : error CS1900: Warning level must be in the range 0-4. Setting that explicitly in the csproj gets ignored (probably another bug?).
Expected Behavior
It should build fine, as it does on Windows.
On which platforms did you notice this
[x] macOS
Version Used:
6.12, 6.13
Stacktrace
Starting: Build
==============================================================================
Task : MSBuild
Description : Build with MSBuild
Version : 1.179.0
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/msbuild
==============================================================================
/Library/Frameworks/Mono.framework/Versions/Current/Commands/msbuild /version /nologo
/Library/Frameworks/Mono.framework/Versions/Current/Commands/msbuild /Users/runner/work/1/s/repro-dotnet-5-mac.csproj
Microsoft (R) Build Engine version 16.6.0 for Mono
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 2/9/2021 4:10:29 AM.
Restoring packages for /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/NuGetScratch/25b452314b6748e2ae47acfeeff57bfb/d32d6f5b3e69424b8453584b01696220.proj...
GET https://api.nuget.org/v3-flatcontainer/msbuild.sdk.extras/index.json
OK https://api.nuget.org/v3-flatcontainer/msbuild.sdk.extras/index.json 73ms
GET https://api.nuget.org/v3-flatcontainer/msbuild.sdk.extras/3.0.23/msbuild.sdk.extras.3.0.23.nupkg
OK https://api.nuget.org/v3-flatcontainer/msbuild.sdk.extras/3.0.23/msbuild.sdk.extras.3.0.23.nupkg 6ms
Installing MSBuild.Sdk.Extras 3.0.23.
Project "/Users/runner/work/1/s/repro-dotnet-5-mac.csproj" on node 1 (default targets).
Project "/Users/runner/work/1/s/repro-dotnet-5-mac.csproj" (1) is building "/Users/runner/work/1/s/repro-dotnet-5-mac.csproj" (1:4) on node 1 (Build target(s)).
/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(127,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 5.0. Either target .NET Core 3.1 or lower, or use a version of the .NET SDK that supports .NET Core 5.0. [/Users/runner/work/1/s/repro-dotnet-5-mac.csproj]
Done Building Project "/Users/runner/work/1/s/repro-dotnet-5-mac.csproj" (Build target(s)) -- FAILED.
Project "/Users/runner/work/1/s/repro-dotnet-5-mac.csproj" (1) is building "/Users/runner/work/1/s/repro-dotnet-5-mac.csproj" (1:5) on node 1 (Build target(s)).
PrepareForBuild:
Creating directory "bin/Debug/xamarin.ios10/".
Creating directory "obj/Debug/xamarin.ios10/".
_BeforeCoreCompileInterfaceDefinitions:
Skipping target "_BeforeCoreCompileInterfaceDefinitions" because it has no inputs.
_BeforeCoreCompileInterfaceDefinitions:
Skipping target "_BeforeCoreCompileInterfaceDefinitions" because it has no inputs.
_BeforeCoreCompileInterfaceDefinitions:
Skipping target "_BeforeCoreCompileInterfaceDefinitions" because it has no inputs.
_CoreCompileInterfaceDefinitions:
Skipping target "_CoreCompileInterfaceDefinitions" because it has no inputs.
_BeforeCoreCompileImageAssets:
Skipping target "_BeforeCoreCompileImageAssets" because it has no inputs.
_BeforeCoreCompileImageAssets:
Skipping target "_BeforeCoreCompileImageAssets" because it has no inputs.
_BeforeCoreCompileImageAssets:
Skipping target "_CoreOptimizePropertyLists" because it has no inputs.
_CoreOptimizeLocalizationFiles:
Skipping target "_CoreOptimizeLocalizationFiles" because it has no inputs.
/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error NETSDK1004: Assets file '/Users/runner/work/1/s/obj/project.assets.json' not found. Run a NuGet package restore to generate this file. [/Users/runner/work/1/s/repro-dotnet-5-mac.csproj]
Done Building Project "/Users/runner/work/1/s/repro-dotnet-5-mac.csproj" (Build target(s)) -- FAILED.
Done Building Project "/Users/runner/work/1/s/repro-dotnet-5-mac.csproj" (default targets) -- FAILED.
nis-spiir
Metadata
Metadata
Assignees
Labels
No labels