Page 1 of 1

Could not load file or assembly, Operation is not supported

Posted: Wed May 04, 2016 12:25 pm
by 15673778
I have a project I have been using for years, and all of a sudden, it will not compile. I am getting

'Could not load file or assembly TeeChart, Version 4.1.2015.5144, Culture=Neutral, PublicKeyToken-9c8126276c77bdb7 or one of its dependencies. Operation is not supported. Exception from HRESULT:0x8013515'

Licenses.LICX = Steema.Teechart.Tchart, TeeChart, Version=4.1.2015.5144, Culture=neutral, PublicKeyToken=9c8126276c77bdb7

Any ideas on how to fix this issue?

Re: Could not load file or assembly, Operation is not supported

Posted: Wed May 04, 2016 12:41 pm
by Christopher
phil1995 wrote:Licenses.LICX = Steema.Teechart.Tchart, TeeChart, Version=4.1.2015.5144, Culture=neutral, PublicKeyToken=9c8126276c77bdb7

Any ideas on how to fix this issue?
Do you receive this message when you create a new C# project in Visual Studio and then add a TChart component from the toolbox?

Re: Could not load file or assembly, Operation is not supported

Posted: Wed May 04, 2016 12:43 pm
by 15673778
I just tried to compile an existing project. This is a windows forms project, I have not used the Toolbox. It has all been done in VB.

The form itself has a Steema Teechart , but I have not changed it in years.

The Steema objects are not showing up in my toolbox. I just tried to add the Teechart.dll to the toolbox, and it is telling me that it could not be loaded.

What framework should the project be using? It was on 4.5.1, and I changed it to 4.0.

I now get Unable to resolve type Steema.Teechart.Tchart, version 4.1.2015 in the licenses.licx file

Re: Could not load file or assembly, Operation is not supported

Posted: Wed May 04, 2016 1:44 pm
by Christopher
phil1995 wrote: What framework should the project be using? It was on 4.5.1, and I changed it to 4.0.
Which version of TeeChart.dll are you using? TeeChart is built for net20, net35, net40, net45, net451 and net46.

You might like to create a new project and try adding the TeeChart.dll in as a reference. Can it be referenced correctly? Can you create an instance of it at runtime?

Re: Could not load file or assembly, Operation is not supported

Posted: Wed May 04, 2016 1:49 pm
by 15673778
VERSION 4.1.2015.5144

Re: Could not load file or assembly, Operation is not supported

Posted: Wed May 04, 2016 2:15 pm
by Christopher
phil1995 wrote:VERSION 4.1.2015.5144
Build 4.1.2015.05144
Compiled in .NET Framework 4.51
phil1995 wrote:What framework should the project be using? It was on 4.5.1, and I changed it to 4.0.
In which case I wouldn't expect it to reference TeeChart.dll 4.1.2015.05144 in a Windows Forms project set to .NET 4.0.

Can you change your project to .NET 4.51 (or above) and then try and add this TeeChart.dll as a reference? It would be very useful to know whether you can successfully reference TeeChart in a Windows Forms project or not.

Re: Could not load file or assembly, Operation is not supported

Posted: Wed May 04, 2016 3:49 pm
by 15673778
This is the way I have had it running for a long time. I have had 4.5.1 and referencing the Teechart.dll 4.1.2015.05144 from a windows forms project.

It just started giving me this error for some reason.

Re: Could not load file or assembly, Operation is not supported

Posted: Wed May 04, 2016 4:43 pm
by 15673778
My computer had crashed and I am using a backup machine. I noticed that it only had Steema 2012 installed. I downloaded and installed 2015 and removed all of the references to the 2012. Once I drug it in from the toolbox, all of my references were replaced and all seems to be happy now. Thanks for your help.

Re: Could not load file or assembly, Operation is not supported

Posted: Thu May 05, 2016 10:01 am
by Christopher
I'm glad to hear the issue managed to resolve itself for you!