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] NativeAssets no longer copied for .NET Framework projects using packages.config #3111

Open
1 task done
sungaila opened this issue Dec 10, 2024 · 4 comments · May be fixed by #3112
Open
1 task done

[BUG] NativeAssets no longer copied for .NET Framework projects using packages.config #3111

sungaila opened this issue Dec 10, 2024 · 4 comments · May be fixed by #3112
Labels

Comments

@sungaila
Copy link
Contributor

Description

Starting with SkiaSharp 3.x the libSkiaSharp.dll is no longer copied into the output directory. This happens for older .NET Framework projects that still use packages.config instead of the new PackageReference inside the csproj file.

This affects both .NET Framework and Mono projects:

Code

Example packages.config file:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="SkiaSharp.NativeAssets.Win32" version="3.116.1" targetFramework="net462" />
</packages>

Expected Behavior

The build directory should contain x86, x64, arm64 containing the libSkiaSharp.dll/libSkiaSharp.so/libSkiaSharp.dylib.

Actual Behavior

Nothing is copied into the output directory. Unless the project was migrated from packages.config to PackageReference.

Version of SkiaSharp

3.116.0 (Current)

Last Known Good Version of SkiaSharp

2.88.9 (Previous)

IDE / Editor

Visual Studio (Windows)

Platform / Operating System

Windows

Platform / Operating System Version

No response

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
@niza93
Copy link
Contributor

niza93 commented Dec 10, 2024

#3107 - the same issue

@beto-rodriguez
Copy link
Contributor

Same for me.

@niza93
Copy link
Contributor

niza93 commented Jan 16, 2025

Same for me.

I solved this issue by updating project to SDK-style.

@sungaila
Copy link
Contributor Author

Same for me.

I solved this issue by updating project to SDK-style.

This works when your own project references SkiaSharp directly.

However, if you have a library that references SkiaSharp and ANOTHER person references your library, it won't work.

Most people still using .NET Framework/Mono use packages.config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: New
Development

Successfully merging a pull request may close this issue.

3 participants