OfficeCLI/src/officecli/officecli.csproj
zmworm 99a6ac1a8c fix(xlsx): wrap non-Office OLE payloads in CFB Ole10Native
- pdf/txt/binary payloads embedded via `add ole src=...` were written raw
  into xl/embeddings/embeddedObject.bin; Excel rejected the workbook at
  open with 0x800A03EC.
- Wrap non-Office payloads in a CFB container holding a \x01Ole10Native
  stream (OpenMcdf 3.1.2) so Excel treats them as proper OLE Package
  objects. Office OOXML payloads (.docx/.xlsx/.pptx) continue to embed
  raw via EmbeddedPackagePart with the matching progId.
- Unwrap the CFB on read so TryExtractBinary and node.Format["fileSize"]
  report the original payload bytes/size for Excel, Word, and PowerPoint.
2026-04-18 16:27:10 +08:00

50 lines
1.9 KiB
XML

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace>OfficeCli</RootNamespace>
<AssemblyName>officecli</AssemblyName>
<Version>1.0.52</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<PublishTrimmed>true</PublishTrimmed>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DocumentFormat.OpenXml" Version="3.4.1" />
<PackageReference Include="OpenMcdf" Version="3.1.2" />
<PackageReference Include="System.CommandLine" Version="3.0.0-preview.2.26159.112" />
</ItemGroup>
<ItemGroup Condition="Exists('wiki/')">
<EmbeddedResource Include="wiki/**/*.md" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources/preview.css" />
<EmbeddedResource Include="Resources/preview.js" />
<EmbeddedResource Include="Resources/watch-sse-core.js" />
<EmbeddedResource Include="Resources/watch-overlay.js" />
<EmbeddedResource Include="Resources/cx-gallery/index.json">
<LogicalName>OfficeCli.Resources.cx-gallery.index.json</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Resources/cx-gallery/fragments/*.xml">
<LogicalName>OfficeCli.Resources.cx-gallery.fragments.%(Filename)%(Extension)</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Resources/chartex-colors.xml" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="../../skills/**/*" LogicalName="skills/%(RecursiveDir)%(Filename)%(Extension)" />
<EmbeddedResource Remove="../../skills/**/*.glb" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="../../SKILL.md" LogicalName="OfficeCli.Resources.skill-officecli.md" />
</ItemGroup>
</Project>