This is a migrated thread and some comments may be shown as answers.

Could not load assembly or file Telerik.Windows.Zip

3 Answers 704 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
NTS
Top achievements
Rank 1
NTS asked on 02 Nov 2016, 09:08 PM

Hi,

I use the spreadsheet part with much satisfaction, but since a while I get the following error

'Could not load file or assembly Telerik.Windows.Zip, Version=2016.1.106.40'

And i can't get any solution. I tried to upgrade all Telerik controls, but that didn't work yet.I will try again...

 

Can someone please help?

It breaks on the last line of my code block.

IWorkbookFormatProvider formatProvider = new XlsxFormatProvider();
 
var workbook = new EpicExcelExportManager().GetFilledWorkbook();
byte[] renderedBytes;
 
using (var ms = new MemoryStream())
{
    formatProvider.Export(workbook, ms);

 

Thanks.

John

3 Answers, 1 is accepted

Sort by
0
Anton
Telerik team
answered on 03 Nov 2016, 09:49 AM
Hello,

This error indicates problem loading the assembly.
I would ask you to:

1) Make sure you have referenced all the assemblies and they are with the same version.
2) After 1) delete the Bin and obj folders of the project manually, Clean and Rebuild it.

Regards,
Anton
Telerik by Progress
Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
0
NTS
Top achievements
Rank 1
answered on 04 Nov 2016, 09:03 AM

Hi Anton,

Thanks. After a few tries this is solved.

But now I am running into another issue.

I have an Error: 'HtmlImportSettings' does not contain a definition for 'ImageRootPath'

I use a htmlFormatProvider with HtmlExportSettings and HtmlImportSettings. But it seems there is not ImageRootPath property in the HtmlImportsettings. That is strange, because in your Api documentation it says there is.

http://docs.telerik.com/devtools/winforms/api/html/t_telerik_wincontrols_richtextbox_formatproviders_html_htmlimportsettings.htm

In the documentation it says it is in the dll below, but there is not such dll in the winforms package

Telerik.WinControls.RichTextBox (in Telerik.WinControls.RichTextBox.dll) Version: 2016.3.1024.40 (2016.3.1024.40)

So now I use it from:Telerik.WinForms.Documents.FormatProviders.Html

See for the code:

_htmlFormatProvider = new HtmlFormatProvider
{
    ExportSettings = new HtmlExportSettings
    {
        DocumentExportLevel = DocumentExportLevel.Fragment,
        ImageExportMode = exportImages ? ImageExportMode.ImageExportingEvent : ImageExportMode.None,
    },
    ImportSettings = new HtmlImportSettings
    {
        ImageRootPath = $@"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\",
    }
};

 

Can you help me again?

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 07 Nov 2016, 12:07 PM
Hello , 

Thank you for writing back. 

Since R3 2016 SP1 (version 2016.3.1024) RadRichTextBox is removed from codebase. Please use RadRichTextEditor instead, which is an improved and much more feature rich replacement of the RadRichTextBox. Feel free to use the providers located in the Telerik.WinForms.Documents.FormatProviders namespace: http://docs.telerik.com/devtools/winforms/richtexteditor/import/export

I hope this information helps. If you have any additional questions, please let me know. 

Regards,
Dess
Telerik by Progress
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
Tags
Spreadsheet
Asked by
NTS
Top achievements
Rank 1
Answers by
Anton
Telerik team
NTS
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or