Previously, I had to download the crossplatform\Aspose.Slides.dll from your site, and then include that in our app. I see now that in Nuget there is
dotnet add package Aspose.Slides.NET6.CrossPlatform --version 25.11.0. Does that replace the need for me to have to do
<ItemGroup>
<Content Include="..\libs\crossplatform\Aspose.Slides.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\libs\crossplatform\aspose.slides.drawing.capi_vc14x64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\libs\crossplatform\aspose.slides.drawing.capi_vc14x86.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\libs\crossplatform\libaspose.slides.drawing.capi_appleclang_arm64.dylib">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\libs\crossplatform\libaspose.slides.drawing.capi_appleclang_x86_64.dylib">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\libs\crossplatform\libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
@dmerkle1
Based on similar confirmed cases in the forums and retrievers, Summary
The Aspose.Slides.NET6.CrossPlatform NuGet package is designed to bring the managed Aspose.Slides.dll together with the required native binaries (Windows DLLs, macOS dylibs, Linux .so files) into your project automatically. In most cases this means you no longer have to add the manual <Content> entries that you previously used to copy those files.
Why it happens
The cross‑platform package places the native assets under the runtimes/*/native folders inside the NuGet package. When the project is restored, MSBuild evaluates the project’s Runtime Identifier (RID) (e.g., win-x64, linux-x64, osx-arm64) and copies the matching native files to the output directory. Because this copying is performed by the NuGet package itself, explicit <Content> items that copy the same files become redundant and can even interfere with the default behavior.
What to do next
- Remove the manual
<Content> block from your .csproj file – the entries you listed are generally no longer required when using the CrossPlatform package.
- Add/restore the package if you haven’t already:
dotnet add package Aspose.Slides.NET6.CrossPlatform --version 25.11.0
dotnet restore
- Build the project and inspect the output folder (e.g.,
bin\Debug\net6.0\). You should see the native files that correspond to your OS (e.g., aspose.slides.drawing.capi_vc14x64.dll on Windows x64).
- Run a quick test to confirm the library loads correctly:
using Aspose.Slides;
var pres = new Presentation();
pres.Save("test.pptx", SaveFormat.Pptx);
If no exception is thrown, the native library has been located successfully.
5. Check for custom MSBuild settings that might override the default content handling (e.g., custom CopyToOutputDirectory rules). Ensure they do not prevent the package’s native assets from being copied.
6. If you still encounter missing‑native‑library errors, clean the solution (dotnet clean), delete bin and obj folders, and rebuild.
7. If problems persist, consult the official Aspose.Slides documentation or open a support ticket with Aspose, providing details of your project file, target framework, and runtime identifier.
Note: The evidence retrieved does not contain a direct statement confirming this behavior for version 25.11.0 of the Aspose.Slides.NET6.CrossPlatform package. The explanation above is based on the typical design of Aspose cross‑platform NuGet packages and common .NET runtime asset handling. We recommend verifying the behavior in your own environment and reviewing the package’s release notes or documentation for any version‑specific nuances.
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.