This project has moved and is read-only. For the latest updates, please go here.

DocumentFormat.OpenXml.dll 2.5

May 26, 2014 at 2:30 PM
Hi, Can i use ClosedXML and DocumentFormat.OpenXml.dll version 2.5?
Thank you
May 26, 2014 at 2:36 PM
I'm going to put this on the FAQ =)

For our purposes OpenXML 2.5 offers absolutely nothing useful other than making the library to only work with .Net 4.0 and up. There's no reason to upgrade the .Net 4 project to OpenXML 2.5
May 26, 2014 at 2:41 PM
Ok, thank you for details.
May 26, 2014 at 10:39 PM
Except for NuGet install and compatibility with other parts of the application that use the latest version of OpenXML. Can't you change the NuGet installer to use OpenXML 1.0 or greater instead of exactly 1.0? Visual Studio keeps wanting to upgrade ClosedXML and then fails.
May 27, 2014 at 4:24 AM
Okay, right now I have a .nupkg file (Nuget Package Explorer) to help me publish a single ClosedXML Nuget package for both .Net 4 & 3.5
If I mark the dependency as >= 1.0 wouldn't .Net 3.5 projects try to upgrade to the unusable (to them) v 2.5?
May 27, 2014 at 6:35 AM
OpenXLM 2.5 has no dependencies listed in the package so I guess they would be offered the option to upgrade. Why is that an issue, if OpenXLM has a dependency on .Net 4.0 they should state it in they dependencies.

Right now I can's install ClosedXL at all because my application already has OpenXML, and if I uninstall OpenXML and install CloedXML I can't do the upgrade.
May 28, 2014 at 3:27 AM
Okay, help me out then. I have one nuget package that serves both .Net 3.5 and .Net 4.0. They have the same dependency. How can you specify one dependency for the .Net 4.0 files and another for the .Net 3.5?

May 28, 2014 at 5:45 AM
The dependence is 1.0 or greater. That will allow people who can upgrade to upgrade but will not cause people running 1.0 to have an issue.
May 28, 2014 at 8:42 AM
but it will not prevent to go for openxml 2.5 even if it would not be supported, right?
May 28, 2014 at 10:14 AM
OpenXML has no dependencies so I assume it will work with ASP 3.5 and 4.0 if that is no correct the issue is with OpenXML.

Jun 4, 2014 at 10:06 AM
Edited Jun 4, 2014 at 10:06 AM
Hi, I very need to use ClosedXML with .NET 4.5 and OpenXML 2.5 by NuGet. Can you do that?
It should help I think.
    <group targetFramework="net35">
        <dependency id="DocumentFormat.OpenXml" version="[1.0]" />
    <group targetFramework="net40">
        <dependency id="DocumentFormat.OpenXml" version="2.5" />
Jun 4, 2014 at 5:36 PM
Finally someone made my life easier. I'll change the package.
Jun 4, 2014 at 6:19 PM
Sorry I never created a NuGet package I just know it could be done.
Sent from my iPhone

Jun 4, 2014 at 6:53 PM
ClosedXML for .Net 4.0 now uses OpenXML SDK 2.5