Compile time error when using Aspose Cells in C++/CLI project


We have just tried to upgrade to Aspose.Cells V22.1 but we are having a compile issue when using the dll in a C++CLI application.

1>src\CExcelConvHost.cpp(120): error C2365: ‘Aspose::Cells::WorksheetCollection::’: redefinition; previous definition was ‘property’
1>src\CExcelConvHost.cpp(120): note: see declaration of ‘Aspose::Cells::WorksheetCollection::’
1>src\CExcelConvHost.cpp(120): note: This diagnostic occurred while importing type 'Aspose::Cells::WorksheetCollection ’ from assembly ‘Aspose.Cells, Version=, Culture=neutral, PublicKeyToken=716fcc553a201e56’.

A very similar issue was already reported for Aspose.Words. please see

Best regards


Could you please share a standalone sample C++/CLI project to reproduce the issue, we will check it soon.

Hi @amjad_sahi1,

yes, here is the link: Dropbox - File Deleted - Simplify your life


I downloaded your project and extracted to some folder. I opened the project into VS.NET 2019 and tried to build and run but it gives an error, see the screenshot attached.
sc_shot1.png (63.2 KB)

it looks some SDKs/API is missing on my end, could you elaborate on it. Alternatively, you may provide runnable sample project. We will look into your issue soon.

HI @Amjad_Sahi,

I now changed the C++/CLI settings to clr. The project is on my side still compiling (except for the errors why the ticket exists.).

Because the VS2019 project compiles for me all the time, it will be difficult to find out which dependencies are missing on your computer.

Maybe this helps further c# - MSBUILD throws error: The SDK 'Microsoft.NET.Sdk' specified could not be found - Stack Overflow


Thanks for providing further details.

I have logged a ticket with an id “CELLSCPP-675” for your issue. We will investigate your issue in details and try to figure it out soon.

Once we have an update on it, we will let you know.

Hi,we have located the reason, it is the problem of the obfuscation tool, we will fix it in the next release version 22.3.Thank you for your patience.

Hi @xinyazhu,

today I downloaded Aspose.Cells 22.3 and checked whether i can compile now. But I can’t, because of the same error.

Could you please check, whether you can also reproduce the issue with the newest version?


We will provide you the fix in the next week.

Keep in touch.