Unable to Load DLL 'aspose.slides.drawing.capi_vc14x64' or One of Its Dependencies

Version:
Aspose.Slides.NET 23.4.0 (NuGet)

Error:
Unable to load DLL ‘aspose.slides.drawing.capi_vc14x64’ or one of its dependencies: The specified module could not be found. (0x8007007E)

Cause:
In the NuGet package’s Aspose.Slides.NET.targets file, the condition for including aspose.slides.drawing.capi_vc14x86.dll in the output is incorrect:
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0'">
This does not work if your TargetFramework includes an OS or OS version target.
e.g. net6.0-windows, net6.0-windows7.0, net6.0-macos, net6.0ios15.1.
See: Target frameworks in SDK-style projects - .NET | Microsoft Learn
In my case, my TargetFramework is set to ‘net6.0-windows7.0’.

Suggested fix for Aspose developers:
In Aspose.Slides.NET.targets, change the condition to use $(TargetFrameworkIdentifier):
'$(TargetFrameworkIdentifier)' == '.NETCoreApp'

Or if you specifically only want to support .net6/.net7:
$(TargetFramework.StartsWith('net6.0')) or $(TargetFramework.StartsWith('net7.0'))

@lf0,
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-43997

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.

A post was split to a new topic: When a Project Targets “net8.0-windows”, the DLLs Fail to Get Copied over on Build