Open jeromelaban opened 4 years ago
This seems like either an issue with MSBuildExtras itself, or just a limitation of the fact that building projects targeting UAP isn't supported on Linux.
FYI @clairernovotny
just a limitation of the fact that building projects targeting UAP isn't supported on Linux.
That's not it, you can reproduce with just
<Project Sdk="MSBuild.Sdk.Extras">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
</Project>
This error is caused by a casing issue, where the import here:
Does not match the casing in this folder:
gitpod@ws-XXX:/workspace/uno$ ll /usr/share/dotnet/sdk/3.1.201/Sdks/Microsoft.NET.Sdk.WindowsDesktop/targets
total 72
drwxr-xr-x 2 root root 4096 Mar 18 17:39 ./
drwxr-xr-x 5 root root 4096 Mar 18 17:39 ../
-rw-r--r-- 1 root root 11191 Feb 28 17:55 Microsoft.NET.Sdk.WindowsDesktop.props
-rw-r--r-- 1 root root 6543 Feb 28 17:55 Microsoft.NET.Sdk.WindowsDesktop.targets
-rw-r--r-- 1 root root 1482 Feb 28 17:55 Microsoft.WinFx.props
-rw-r--r-- 1 root root 40124 Feb 28 17:55 Microsoft.WinFx.targets
The Fix is here: dotnet/wpf#2975
Still happening even with the merged fix (SDK 3.1.302)
This got fixed in https://github.com/dotnet/wpf/commit/b198dcfba5ad68db829dadc4637e244129a3c23b - or at least the failing line removed in that commit.
It seems the fix is not merged into SDK 3.1.302! So, I've asked whether it is possible for back porting the fix into 3.1.
The workaround implemented by Jerome in https://github.com/unoplatform/docker/pull/4/commits/8e13b5b5f68ccc082048913dac88bc86ffe6006b finally made it possible to use MsBuild.Sdk.Extras
with .NET Core 3.1 on my Linux machine! Posting this message here for dumb people like me who didn't notice this easy workaround when viewing the issue for the first time. Thank you @jeromelaban! <3
still issue in 3.1.421
fixed with:
sudo \
cp \
/usr/local/share/dotnet/sdk/3.1.421/Sdks/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.WinFx.props \
/usr/local/share/dotnet/sdk/3.1.421/Sdks/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.WinFX.props
MSBuild extras validates that projects can successfully build under a variety of .NET Runtimes and OSes, and a recent addition of validation of .NET Core 3.1 fails the build under Linux with the following error:
This error does not happen with .NET Core 3.0 and 2.2.
The error happens when building this project, with this script.