NuGet chooses the wrong version for a web application

Hi there,


When installing the Cells component through NuGet in my .Net 4.0/Razor application, it automatically chooses the net40-client version which doesn’t feature the save to HTML response option! Please can you adjust your package to use the v2 by default or offer multiple package downloads.

How do I select which version it uses? So far I have deleted the reference and manually chosen the 2 version from the packages folder but this is obviously not ideal!

Thanks
Jon

Hi,


We will get back to you on this with information from our build team.

Hi,

Thanks for your posting and using Aspose.Cells for .NET - NuGet package.

We will fix the bug as mentioned by you in a NuGet package so that it could choose automatically the
correct dll.

We have logged your issue in our database. Our support team will look into this issue and once the issue is fixed, we will update you asap.

In case you have to choose it manually and if you are not using the client profile version of .net framework, then please use the DLL under the directory “net2.0” and not “net3.5_ClientProfile”.

And please check the readme.txt under the directory
“Bin”.

Please see this image for more help.


Hi Jon,


https://nuget.org/packages/Aspose.Cells

Well, it looks like the default behavior of Nuget / VS.NET 2010 as it does choose the client profile Dll from the package. Actually we do provide two types of Aspose.Cells' Dlls specifying in the nuspec file:
1) .NET 2.0 compiled version that was targeted as all .NET framework versions (e.g 2, 3.5, 4.0 etc.)
2) 3.5 .NET Client Profile version that was compiled for 3.5 and 4.0 .NET framework Client Profile version.

If you do create a console, winform or any other desktop project type in VS.NET, now after installing the package, e.g using the command line in VS.NET (in the Package Manager Console) "install-package Aspose.Cells", it will automatically choose and set reference the Aspose.Cells.Dll file from the client profile folder (in the installed package) and you have to remove the existing reference of the component and then add reference to the Aspose.Cells.Dll file in net2.0 folder.

I have looked into it and also will investigate more. We will try to fix it (so that it chooses Aspose.Cells.Dll file (net2.0 file) by default). We will try to do it in the next official release which is due in the mid of this month or so. Mind you, we cannot edit our existing packages that are already deployed over NuGet Repository, so the existing official release (e.g v7.2.1) will still remain as it is.

Thanks for your understanding!

Was this ever fixed? It still chooses the client profile assembly for a SharePoint 2013 project (.NET 4.5)

Hi,


Well, we could not figure it out as it automatically selects the client profile assembly in VS.NET 2010/2013 projects, it, by default chooses the Aspose.Cells.dll from the package with higher .NET framework versions automatically, so it picks the client profile assembly. Please manually choose Aspose.Cells.dll from the respective package (in your .NET project) which is compiled on .NET 2.0 framework version.

Thank you.

Have you completely given up on this issue?
And do you know if this issues also affect the rest of the assemblies (words, pdf, etc.)?

Hi Morten,


We have decided to also add 3.5 .NET Framework compiled Dll version while specifying in the nuspec file, so this Dll would be included in the Nuget package. We will do it from the next release hopefully.

Thank you.
Hi Morten,

mortenma:

And do you know if this issues also affect the rest of the assemblies (words, pdf, etc.)?

Please post your queries in the respective forums e.g Aspose.Words forum, Aspose.Pdf forum etc.

Thank you.

Does that mean that aspose.cells can be installed and maintained in a web application via nuget?

Hi,


Yes, sure, see the document for your reference:


Thank you.