sdk icon indicating copy to clipboard operation
sdk copied to clipboard

ClosedXML package doesn't work after upgrade to RC2. Any work around?

Open valcs007 opened this issue 10 years ago • 5 comments

Hi,

We are trying to upgrade from RC1 to RC2 but have few issues with some ClosedXML Nuget package. we use that package for exporting to Excel and it was working with RC1. After upgrading to RC2, adding the package throws below exception.

The dependency ClosedXML doesn't support .Net Core 1.0.

Below is the Json file that was generated when i launch Core template

"dependencies": { "Microsoft.NETCore.App": { "version": "1.0.0-rc2-3002702", "type": "platform" }, "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final", "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final" },

"frameworks": { "netcoreapp1.0": { "imports": [ "dotnet5.6", "dnxcore50", "portable-net45+win8" ] } }, }

Any work around?

Thanks

valcs007 avatar Jun 21 '16 05:06 valcs007

@valcs007 what are the dependencies of ClosedXML? Also, the exception/error happens at restore time, correct?

thesmithee avatar Jun 22 '16 00:06 thesmithee

As per the Nuget webpage (https://www.nuget.org/packages/ClosedXML/), its .Net framework 3.5/4.0 but this was working with RC1 without any issues.

Yes, when i add that Nugetpackage for my project, system restores and i get this exception.

valcs007 avatar Jun 22 '16 00:06 valcs007

/cc @ericstj but I'm thinking this is due to the targets being different and that the library would need to be updated, unless there is some form of imports that can be used to get unblocked.

thesmithee avatar Jul 27 '16 18:07 thesmithee

You can try "imports": ["net4"] but that's a huge hack. Looking at this assembly inside the NuGet package it uses WindowsBase.dll, System.Data.dll, and System.Drawing.dll (and others). None of those have ever existing for .NET Core, even at RC1, so I have a hard time believing this was working. Perhaps you were targeting .NET Desktop rather than .NET Core?

ericstj avatar Jul 27 '16 20:07 ericstj

Given the answers on this thread and lack of activity since summer last year, I will close this issue. Please reopen if you need more information. Thanks!

thesmithee avatar Jan 17 '17 21:01 thesmithee