Magick.NET version
Magick.NET-Q16-AnyCPU 14.13.1
Environment (Operating system, version and so on)
Windows, Visual Studio 2026, .NET Framework 4.8, SDK-style project, PackageReference
Description
When referencing Magick.NET-Q16-AnyCPU (14.13.1) from an SDK-style project targeting .NET Framework 4.8 using PackageReference, the three native DLLs (Magick.Native-Q16-arm64.dll, Magick.Native-Q16-x64.dll, Magick.Native-Q16-x86.dll) are displayed directly at the root of the project in Visual Studio's Solution Explorer.
This comes from the package's .targets file, which adds the native DLLs as None items with Link metadata set to %(FileName)%(Extension):
%(FileName)%(Extension)
PreserveNewest
Because these items carry Link metadata, the SDK/CPS project system surfaces them in Solution Explorer even though they originate from an imported .targets file (see
dotnet/project-system#3302). The copy-to-output behavior itself is correct and necessary; the problem is purely the visual clutter at the project root.
Adding Visible set to false on these items from a consuming Directory.Build.targets does not reliably suppress them, since the items are injected by the package's .targets.
Suggested fix: add Visible set to false to the None and Content items in the package's .targets file. The native DLLs still need to be copied to the output directory, but there is no reason for them to be visible in the project tree. This would keep MagickCopyNativeWindows working as it does today, just without the clutter.
Steps to Reproduce
Create an SDK-style project targeting .NET Framework 4.8 in Visual Studio.
Add Magick.NET-Q16-AnyCPU 14.13.1 via PackageReference.
Restore and reload the project.
Observe the three Magick.Native-Q16-*.dll files listed at the root of the project in Solution Explorer.
Images
bug.png
Magick.NET version
Magick.NET-Q16-AnyCPU 14.13.1
Environment (Operating system, version and so on)
Windows, Visual Studio 2026, .NET Framework 4.8, SDK-style project, PackageReference
Description
When referencing Magick.NET-Q16-AnyCPU (14.13.1) from an SDK-style project targeting .NET Framework 4.8 using PackageReference, the three native DLLs (Magick.Native-Q16-arm64.dll, Magick.Native-Q16-x64.dll, Magick.Native-Q16-x86.dll) are displayed directly at the root of the project in Visual Studio's Solution Explorer.
%(FileName)%(Extension) PreserveNewest Because these items carry Link metadata, the SDK/CPS project system surfaces them in Solution Explorer even though they originate from an imported .targets file (see dotnet/project-system#3302). The copy-to-output behavior itself is correct and necessary; the problem is purely the visual clutter at the project root. Adding Visible set to false on these items from a consuming Directory.Build.targets does not reliably suppress them, since the items are injected by the package's .targets. Suggested fix: add Visible set to false to the None and Content items in the package's .targets file. The native DLLs still need to be copied to the output directory, but there is no reason for them to be visible in the project tree. This would keep MagickCopyNativeWindows working as it does today, just without the clutter.This comes from the package's .targets file, which adds the native DLLs as None items with Link metadata set to %(FileName)%(Extension):
Steps to Reproduce
Create an SDK-style project targeting .NET Framework 4.8 in Visual Studio.
Add Magick.NET-Q16-AnyCPU 14.13.1 via PackageReference.
Restore and reload the project.
Observe the three Magick.Native-Q16-*.dll files listed at the root of the project in Solution Explorer.
Images
bug.png