Aspose.Slides for .NET 6 跨平台 (ZIP 套件)
概觀
本文說明如何從 ZIP 套件使用 Aspose.Slides for .NET 6 Cross-Platform。它描述了如何下載套件、解壓縮 net6.0/crossplatform 資料夾中的檔案、加入對 Aspose.Slides.dll 的參考,並設定專案檔以便將所需的相依庫複製到應用程式輸出目錄。
本文亦說明跨平台套件的內容,包括主要的 Aspose.Slides .NET 組件以及適用於 Windows、Linux 和 macOS 的平台特定圖形子系統庫。
注意
Aspose.Slides for .NET 6 Cross-Platform 也可從 NuGet 取得。從 ZIP 套件使用跨平台 Aspose.Slides
-
從 Release Page 下載最新 Aspose.Slides 的 ZIP 套件。
-
解壓縮 Aspose.Slides.zip\Aspose.Slides\net6.0\crossplatform 中的檔案,並將它們放入專案中用作相依性的資料夾。
-
加入對 Aspose.Slides.dll 的參考。

在我們的範例(如下)中,函式庫位於專案資料夾的以下路徑:ConsoleApp\libs\Aspose.Slides\net6.0\crossplatform...

-
將其餘(Aspose.Slides 所依賴的)檔案放入輸出目錄,方法是於 csproj 專案檔中加入以下指示:
<ItemGroup>
<None Update="libs\Aspose.Slides\net6.0\crossplatform\aspose.slides.drawing.capi_vc14x64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>aspose.slides.drawing.capi_vc14x64.dll</TargetPath>
</None>
<None Update="libs\Aspose.Slides\net6.0\crossplatform\aspose.slides.drawing.capi_vc14x86.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>aspose.slides.drawing.capi_vc14x86.dll</TargetPath>
</None>
<None Update="libs\Aspose.Slides\net6.0\crossplatform\Aspose.Slides.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>Aspose.Slides.xml</TargetPath>
</None>
<None Update="libs\Aspose.Slides\net6.0\crossplatform\libaspose.slides.drawing.capi_appleclang_x86_64.dylib">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>libaspose.slides.drawing.capi_appleclang_x86_64.dylib</TargetPath>
</None>
<None Update="libs\Aspose.Slides\net6.0\crossplatform\libaspose.slides.drawing.capi_appleclang_arm64.dylib">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>libaspose.slides.drawing.capi_appleclang_arm64.dylib</TargetPath>
</None>
<None Update="libs\Aspose.Slides\net6.0\crossplatform\libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23.so</TargetPath>
</None>
</ItemGroup>
-
注意
TargetPath。預設情況下,
<CopyToOutputDirectory>會在保留相對路徑的同時複製檔案,但我們需要將相依的函式庫放到產生輸出的相同資料夾(Aspose.Slides.dll 所在位置)。
注意事項
專有圖形子系統
| Aspose.Slides.dll | 負責所有 Aspose.Slides 邏輯的主要 .NET 組件 |
|---|---|
| aspose.slides.drawing.capi_vc14x64.dll | 相依性:Win x64 圖形子系統實作 |
| aspose.slides.drawing.capi_vc14x86.dll | 相依性:Win x64 圖形子系統實作 |
| libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23.so | 相依性:適用於 Linux (x86/x64) 的圖形子系統實作 |
| libaspose.slides.drawing.capi_appleclang_x86_64.dylib | 相依性:macOS AMD64 (x86-64/x64) 圖形子系統實作 |
| libaspose.slides.drawing.capi_appleclang_arm64.dylib | 相依性:macOS ARM64 (AArch64) 圖形子系統實作 |
Aspose.Slides.dll 會使用執行環境所需的函式庫。這些函式庫通常與 Aspose.Slides.dll 位於相同的目錄中。
ZIP 套件結構
ZIP 套件包含以下資料夾結構:
Aspose.Slides
├─── net6.0
│ ├─── crossplatform
│ └─── default
├─── net20
├─── net462
└─── netstandard2.0
- 每個資料夾皆包含對應 .NET 版本的組件。net6.0 有兩個版本:default 與 crossplatform。後者包含跨平台的 Aspose.Slides.dll 以及所有相依性。解壓縮此資料夾的內容可作為專案的相依項目,用於跨平台開發以及其他 Aspose.Slides 的使用情境。