Similar to .NET 9 and Aspose.Slides.NET6.CrossPlatform: Unable to Load DLL ‘aspose.slides.drawing.capi_vc14x64’ - Free Support Forum - aspose.com the Aspose.Slides.NET6.CrossPlatform package needs to be updated so that its native files are copied.
Currently the Aspose.Slides.NET6.CrossPlatform.targets file includes this condition:
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0' Or '$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net9.0'">
which needs to be updated for net10.0.
@kaiwachter
Summary
The Aspose.Slides.NET6.CrossPlatform NuGet package currently copies its native DLLs only for target frameworks net6.0, net7.0, net8.0 and net9.0. When you build a project that targets .NET 10.0, the condition in Aspose.Slides.NET6.CrossPlatform.targets does not match, so the native files (e.g., aspose.slides.drawing.capi_vc14x64.dll) are not copied to the output folder, resulting in a runtime “Unable to load DLL …” error.
Why it happens
The .targets file contains an ItemGroup with a hard‑coded list of supported TFM strings:
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0' Or '$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net9.0'">
<!-- copy native files -->
</ItemGroup>
Because net10.0 is not included, MSBuild skips the copy step for that framework.
What to do next
- Edit the .targets file (or create an overriding
.props file in your project) and add net10.0 to the condition, e.g.:
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0' Or '$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net9.0' Or '$(TargetFramework)' == 'net10.0'">
<!-- copy native files -->
</ItemGroup>
- Re‑build the project. The native DLLs should now be copied to the output directory, and the application will start without the missing‑DLL error.
- Check for an updated package. Aspose may release a newer version of
Aspose.Slides.NET6.CrossPlatform that already includes net10.0 support. Updating the NuGet package (e.g., to the latest 25.xx version) could resolve the issue without manual changes.
- Verify at runtime – run the app and confirm that the native DLLs are present next to the executable and that no
DllNotFoundException is thrown.
- Report the gap to Aspose (optional). If you prefer an official fix, open a support ticket or post on the Aspose forum so the maintainers can add
net10.0 to the package’s targets in a future release.
This answer is based on the known structure of the Aspose.Slides.NET6.CrossPlatform.targets file and the pattern used for earlier .NET versions. It does not rely on any undocumented behavior.
I could not fully verify this explanation against the retrieved sources. Please double-check the behaviour in your environment and confirm the exact SDK/version.
SDK version unclear — refer to the official release notes before applying this guidance.
@kaiwachter,
Thank you for describing the issue. I have checked the information you shared, and you are absolutely right about the current condition in Aspose.Slides.NET6.CrossPlatform.targets.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): SLIDESNET-45208
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.