Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Problems building SkiaSharp 2.88.4 using dotnet build #2579

Open
1 task done
TommiGustafsson-HMP opened this issue Aug 23, 2023 · 3 comments
Open
1 task done

Comments

@TommiGustafsson-HMP
Copy link

TommiGustafsson-HMP commented Aug 23, 2023

Description

Using Visual Studio Community 17.7.2 and Developer PowerShell.

After installing all required workloads to build SkiaSharp 2.88.4, including Tizen (using Visual Studio Tools for Tizen), I get the following error using dotnet build:

PS C:\repos\mono\SkiaSharp\source> dotnet build
MSBuild version 17.8.0-preview-23367-03+0ff2a83e9 for .NET
  Determining projects to restore...
C:\Program Files\dotnet\sdk\8.0.100-preview.7.23376.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(117,5): error NETSDK1139:
The target platform identifier tizen was not recognized. [C:\repos\mono\SkiaSharp\binding\SkiaSharp.NativeAssets.Tizen\SkiaSharp.NativeAssets.Tizen.csproj::Ta
rgetFramework=net7.0-tizen]
C:\Program Files\dotnet\sdk\8.0.100-preview.7.23376.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(117,5): error NETSDK1139:
The target platform identifier tizen was not recognized. [C:\repos\mono\SkiaSharp\binding\HarfBuzzSharp.NativeAssets.Tizen\HarfBuzzSharp.NativeAssets.Tizen.cs
proj::TargetFramework=net7.0-tizen]

Build FAILED.

C:\Program Files\dotnet\sdk\8.0.100-preview.7.23376.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(117,5): error NETSDK1139:
The target platform identifier tizen was not recognized. [C:\repos\mono\SkiaSharp\binding\SkiaSharp.NativeAssets.Tizen\SkiaSharp.NativeAssets.Tizen.csproj::Ta
rgetFramework=net7.0-tizen]
C:\Program Files\dotnet\sdk\8.0.100-preview.7.23376.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(117,5): error NETSDK1139:
The target platform identifier tizen was not recognized. [C:\repos\mono\SkiaSharp\binding\HarfBuzzSharp.NativeAssets.Tizen\HarfBuzzSharp.NativeAssets.Tizen.cs
proj::TargetFramework=net7.0-tizen]
    0 Warning(s)
    2 Error(s)

Time Elapsed 00:00:14.05

If I try to install tizen with dotnet, I get:

PS C:\repos\mono\SkiaSharp\source> dotnet workload install tizen
Workload ID tizen is not recognized.

dotnet workload list gives:

PS C:\repos\mono\SkiaSharp\source> dotnet workload list

Installed Workload Id      Manifest Version                            Installation Source
---------------------------------------------------------------------------------------------------------------
android                    34.0.0-rc.1.429/8.0.100-preview.7           SDK 8.0.100-preview.7, VS 17.7.34018.315
maui                       8.0.0-preview.7.8922/8.0.100-preview.7      SDK 8.0.100-preview.7
tvos                       16.4.8694-net8-p7/8.0.100-preview.7         SDK 8.0.100-preview.7
maui-windows               8.0.0-preview.7.8922/8.0.100-preview.7      VS 17.7.34018.315
maui-maccatalyst           8.0.0-preview.7.8922/8.0.100-preview.7      VS 17.7.34018.315
maccatalyst                16.4.8694-net8-p7/8.0.100-preview.7         VS 17.7.34018.315
maui-ios                   8.0.0-preview.7.8922/8.0.100-preview.7      VS 17.7.34018.315
ios                        16.4.8694-net8-p7/8.0.100-preview.7         VS 17.7.34018.315
maui-android               8.0.0-preview.7.8922/8.0.100-preview.7      VS 17.7.34018.315

Use `dotnet workload search` to find additional workloads to install.

Updates are available for the following workload(s): maui tvos. Run `dotnet workload update` to get the latest.

There's no tizen to be found there. Then, I try dotnet workload restore, and it says:

PS C:\repos\mono\SkiaSharp\source> dotnet workload restore
Installing workloads:

Removing Microsoft.Android.Ref.31.Msi.x64 ............ Failed
Warning: Workload garbage collection failed with error: Failed to remove Microsoft.Android.Ref.31.32.0.476-x64.msi. Error: 0x00000643. Fatal error during installation..

Successfully installed workload(s) android maui tvos.

What might be the problem? Is there something I can do to build SkiaSharp?

Code

No code, see description.

Expected Behavior

SkiaSharp will build.

Actual Behavior

SkiaSharp will not build.

Version of SkiaSharp

Other (Please indicate in the description)

Last Known Good Version of SkiaSharp

Other (Please indicate in the description)

IDE / Editor

Visual Studio (Windows)

Platform / Operating System

All

Platform / Operating System Version

Using Windows 11 for building.

Devices

No response

Relevant Screenshots

No response

Relevant Log Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mattleibow
Copy link
Contributor

This does mean that for some reason tizen was not installed correctly. I usually use the script installer.

But, you can skip it for now by passing /pIsNetTizenSupported:false on the build.

@TommiGustafsson-HMP
Copy link
Author

Thanks. I somehow managed to get the tizen workload installed and dotnet build is working. However, when I try to open the solution in Visual Studio, it cannot load projects but says:

C:\repos\mono\SkiaSharp\source\SkiaSharp.Views\SkiaSharp.Views\SkiaSharp.Views.csproj : error  : The expression "[MSBuild]::NormalizePath( Condition="'' == ''"C:\sdk-manifests\, microsoft.net.sdk.macos\WorkloadManifest.json)" cannot be evaluated. Illegal characters in path.  C:\repos\mono\SkiaSharp\source\SkiaSharp.Build.props

Any idea about this one?

@cyraid
Copy link

cyraid commented Sep 29, 2024

For those of you curious on how to get the Tizen Workload installed, go here: https://github.com/Samsung/Tizen.NET/wiki/Installing-Tizen-.NET-Workload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants