We ran into this issue when deploying an Aspose.Total application.
All Dll's are deployed with the Web App to the server. But a FileNotFound Exception is thrown.
The stack trace suggests that happens when applying the licence.
'Aspose.Cells, Version=5.2.1.0, Culture=neutral, PublicKeyToken=716fcc553a201e56' on SIACWebExterno.Global.Application_Start(Object sender, EventArgs e)
The Dll is in the applications Bin folder, licence is applied on the Global Asax.
We solved the problem by deleting the Dll on the Bin folder, and installing Aspose.Total on the server. But with this approach is hard to keep the references updated.
Well, the exception “FileNotFoundException” suggests that it could not find the a file for some odd reason, this error is regarding System.IO namespace. May be the reason is by default your VS.NET project refers to the component’s dll file in “/Aspose/Aspose.Cells for .NET/bin/net2.0/” folder and not in the project’s own /bin folder. You may try to place Aspose.Cells.dll file in some other folder (other than /bin at some other location), remove the existing Reference and then Add Reference to the file. We are also not sure when you say: “when applying the licence…”. Could you confirm whether the lic file could not be found or the Aspose.Cells.dll file could not be found.
Thanks for your reply it was most helpful. It seems that the Dll in C:\Program Files (x86)\Aspose\Aspose.Cells for .NET\Bin\net3.5_ClientProfile\Aspose.Cells.dll is compiled against Net 2.0. Please do check the screenshot provided.
Well, you should use Aspose.Cells.dll file under “\bin\net2.0” directory for Aspose.Cells for .NET v5.2.1. For Aspose.Cells.dll file present in “\bin\net3.5_ClientProfile” directory is for different purpose, i.e., when you need to create console application for .NET client profile as target framework. Since you are using a web application, so you should use dll file in net2.0 folder, this will work fine on any framework, i.e. 2.x, 3.5, 4.x etc. Please check readme.txt file for complete reference. Also check the topic: http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/using-aspose-cells-component-on-32bit-and-64bit-platforms.html
Didn't know that, I have referenced the v2.0 library, and I get the following exception (is actually the same exception)
Could not load file or assembly 'Aspose.Cells, Version=5.1.2.0, Culture=neutral, PublicKeyToken=716fcc553a201e56' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
When I the "Copy Local" property to True. When is set to false, all works fine, but I need this dll to be part of the project for deployment porpuses.
I still have a doubt if you are using correct dll for your project.
Anyways, I have attached latest version/fix v5.2.1.2 that should work fine on any .net framework greater than or equal to 2. Please try it and let us know if it works fine now.
It looks very strange that you are still getting the exception. Your log shows that it tried to load v5.1.2 assembly although you have added reference to v5.2.2 dll.
We recommend you to first uninstall any/all older versions installed on your system, then try installing Aspose.Cells for .NET v5.2.2 using its MSI Installer:
Now in your new project, add reference to Aspose.Cells (from .net2.0 installation folder) in VS.NET, it should work fine. Our hundreds of users are using Aspose.Cells in their diverse environments on different frameworks without any issue at all.
By the way, here is a similar issue from some user on Stack OverFlow:
If you still find the issue, please create a simple project, zip it and post to us via email to show the issue. We will check it soon.
To email (with your attachment(s)), please follow the below mentioned steps:
1: click the Contact button in the Post
2: In the drop down list options click "Send Amjad Sahi an Email”.
3: Attach the project and send it (you may zip the files prior attaching it).
4: Once you have done it, kindly confirm us here in this thread.
It's very strange, only when I put the new assembly in the GAC, the problem goes away. I noted this because the installation package puts the aspose.cells assembly there (And only puts that assembly there, none of the others is there ie aspose.words). Is it a requirement of aspose.cells?
Still, we could not find your mentioned issue. When you install Aspose.Cells for .NET v5.2.2 (latest version), it does register the assembly in GAC. There is no requirement for Aspose.Cells to be registered into GAC to work with it or for other needs, the requirement in a sense that if it registered into GAC, in VS.NET e.g 2010, you will see Aspose.Cells for .NET reference in .NET tab in Add Reference dialog box while working with your projects.