Skip to content

Blank Word Doc when including certain dependencies #2

@hecate-nick

Description

@hecate-nick

When I include certain project dependencies or references, saving a word document always produces a blank document.

There are no exceptions or logs, just a blank word document.

It seems like the culprit is DocumentFormat.OpenXml

Example Item Group in .csproj

  <ItemGroup>
    <PackageReference Include="IronWord" Version="2025.5.3" />
    <PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1" />
    <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
    <PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
    <PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0" />

    <!--Seems to cause blank Word Doc, remove reference and it works properly-->
    <PackageReference Include="DocumentFormat.OpenXml" Version="3.1.0" />
  </ItemGroup>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions