Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to build on Ubuntu/Linux with .net core 3.0.100 #637

xinyu391 opened this issue Nov 1, 2019 · 1 comment


Copy link

@xinyu391 xinyu391 commented Nov 1, 2019

build openxml-sdk failed with .net cor 3.0 on ubuntu19.04


  • OS: Ubuntu 19.10
  • .NET Target: .net core 3.0.100
  • DocumentFormat.OpenXml Version: (2.9.1)


download and install .net core 3.0

cd openxml-sdk
dotnet build # failed


/home/jesse/Software/dotnet3.0/sdk/3.0.100/Microsoft.Common.CurrentVersion.targets(1175,5): error MSB3644: The reference assemblies for .NETFramework,Version=v4.6 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at [/data2/jesse/work/Open-XML-SDK-2.9.1/test/DocumentFormat.OpenXml.Packaging.Tests/DocumentFormat.OpenXml.Packaging.Tests.csproj]

But in the folder bin/Debug/DocumentFormat.OpenXml/netstandard1.3/, I got dll files

I copy these dll to my c# project (dotnet new console -o myApp, and copy code from here
then dotnet build, get error

**Build FAILED.

Program.cs(14,51): error CS0012: The type 'Package' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.IO.Packaging, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. [/data2/jesse/work/myApp/myApp.csproj]
0 Warning(s)
1 Error(s)**

BUT finally, I got myApp works:
use this command to fix the above error.

dotnet add package System.IO.Packaging
my project file is

<Project Sdk="Microsoft.NET.Sdk">

    <Reference Include="openxml-sdk">
    <PackageReference Include="System.IO.Packaging" Version="4.6.0" />


then dotnet build success!


This comment has been minimized.

Copy link

@twsouthwick twsouthwick commented Nov 19, 2019

Looks like when I added a sample that was .NET Framework specific, the sln file still picks it up. I've added a fix in #638. Please update and try again. I'll close for now, but please reopen if you're still having an issue. Worked for me on WSL with ubuntu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.