Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 65 additions & 65 deletions wasm/DocxodusWasm/DocxodusWasm.csproj
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<!-- Disable StyleCop for WASM wrapper -->
<NoWarn>$(NoWarn);SA1633;SA1636</NoWarn>

<!-- WASM specific -->
<WasmMainJSPath>main.js</WasmMainJSPath>

<!-- Size optimization -->
<InvariantGlobalization>true</InvariantGlobalization>

<!-- IL Trimming - removes unused code -->
<PublishTrimmed>true</PublishTrimmed>
<TrimMode>partial</TrimMode>
<!-- Suppress trim warnings for reflection-heavy code (PtOpenXmlUtil.cs uses reflection for SDK 3.x compat) -->
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>

<!-- Webcil format and compression -->
<WasmEnableWebcil>true</WasmEnableWebcil>
<BlazorEnableCompression>true</BlazorEnableCompression>

<!-- Disable unused runtime features -->
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
<UseSystemResourceKeys>true</UseSystemResourceKeys>
<MetadataUpdaterSupport>false</MetadataUpdaterSupport>
<UseNativeHttpHandler>true</UseNativeHttpHandler>

<!-- Debug settings - disable for release -->
<DebuggerSupport Condition="'$(Configuration)' == 'Release'">false</DebuggerSupport>
<EventSourceSupport Condition="'$(Configuration)' == 'Release'">false</EventSourceSupport>
</PropertyGroup>

<ItemGroup>
<!-- Reference Docxodus library directly -->
<ProjectReference Include="../../Docxodus/Docxodus.csproj" />

<!-- SkiaSharp with WASM support (matching Docxodus version) -->
<PackageReference Include="SkiaSharp" Version="2.88.9" />
<PackageReference Include="SkiaSharp.NativeAssets.WebAssembly" Version="2.88.9" />
</ItemGroup>

<!-- Manually link native SkiaSharp library for browser-wasm -->
<!-- Uses Emscripten 3.1.34 (single-threaded, SIMD enabled) -->
<ItemGroup>
<NativeFileReference Include="$(NuGetPackageRoot)skiasharp.nativeassets.webassembly/2.88.9/build/netstandard1.0/libSkiaSharp.a/3.1.34/simd,st/libSkiaSharp.a" />
</ItemGroup>

<ItemGroup>
<WasmExtraFilesToDeploy Include="main.js" />
<WasmExtraFilesToDeploy Include="index.html" />
</ItemGroup>

<!-- Preserve types needed by the library from being trimmed -->
<ItemGroup>
<TrimmerRootAssembly Include="DocxodusWasm" />
<TrimmerRootAssembly Include="Docxodus" />
<TrimmerRootAssembly Include="DocumentFormat.OpenXml" />
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<!-- Disable StyleCop for WASM wrapper -->
<NoWarn>$(NoWarn);SA1633;SA1636</NoWarn>
<!-- WASM specific -->
<WasmMainJSPath>main.js</WasmMainJSPath>
<!-- Size optimization -->
<InvariantGlobalization>true</InvariantGlobalization>
<!-- IL Trimming - removes unused code -->
<PublishTrimmed>true</PublishTrimmed>
<TrimMode>partial</TrimMode>
<!-- Suppress trim warnings for reflection-heavy code (PtOpenXmlUtil.cs uses reflection for SDK 3.x compat) -->
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
<!-- Webcil format and compression -->
<WasmEnableWebcil>true</WasmEnableWebcil>
<BlazorEnableCompression>true</BlazorEnableCompression>
<!-- Disable unused runtime features -->
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
<UseSystemResourceKeys>true</UseSystemResourceKeys>
<MetadataUpdaterSupport>false</MetadataUpdaterSupport>
<UseNativeHttpHandler>true</UseNativeHttpHandler>
<!-- Debug settings - disable for release -->
<DebuggerSupport Condition="'$(Configuration)' == 'Release'">false</DebuggerSupport>
<EventSourceSupport Condition="'$(Configuration)' == 'Release'">false</EventSourceSupport>
</PropertyGroup>
<ItemGroup>
<!-- Reference Docxodus library directly -->
<ProjectReference Include="../../Docxodus/Docxodus.csproj" />
<!-- SkiaSharp with WASM support (matching Docxodus version) -->
<PackageReference Include="SkiaSharp" Version="2.88.9" />
<PackageReference Include="SkiaSharp.NativeAssets.WebAssembly" Version="3.119.1" />
</ItemGroup>
<!-- Manually link native SkiaSharp library for browser-wasm -->
<!-- Uses Emscripten 3.1.34 (single-threaded, SIMD enabled) -->
<ItemGroup>
<NativeFileReference Include="$(NuGetPackageRoot)skiasharp.nativeassets.webassembly/2.88.9/build/netstandard1.0/libSkiaSharp.a/3.1.34/simd,st/libSkiaSharp.a" />
</ItemGroup>
<ItemGroup>
<WasmExtraFilesToDeploy Include="main.js" />
<WasmExtraFilesToDeploy Include="index.html" />
</ItemGroup>
<!-- Preserve types needed by the library from being trimmed -->
<ItemGroup>
<TrimmerRootAssembly Include="DocxodusWasm" />
<TrimmerRootAssembly Include="Docxodus" />
<TrimmerRootAssembly Include="DocumentFormat.OpenXml" />
</ItemGroup>
</Project>
Loading