Error using Aspose.Words in .Net framework 4 client profile

Hi,

We currently have an application that has a target framework of .NET Framework 4 Client Profile, and we are attempting to add a reference to Aspose.Words for .NET version 10.2.0.0 and we get the following error:

Warning 1 The referenced assembly "Aspose.Words" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. <>

We're hoping to keep our target framework as-is, and not update it to version 4. Does anyone know if there is a workaround for this other than updating the target framework.

Thanks in advance,

John

Hi John,


Thanks for your inquiry.

First of all, please note that, Aspose.Words currently does not offer DLL specifically written for .Net Framework 4.0 or for .Net Framework 4.0 Client Profile.

Secondly, I would suggest you please first remove Aspose.Words completely from your system. Then remove the reference to old Aspose.Word.dll from your project. Also, delete associated files from your project’s bin folder if present. Then re-install the latest version of Aspose.Word via msi installer. For .Net Framework 4.0 Client Profile, please add reference to the DLL that resides in net3.5_ClientProfile folder in your project and re-build it. Please let us know how it goes on your side.

I hope, this will help.

Best Regards,

Hi there,


Thanks for your inquiry.

The error occurs because you are using the .NET 2.0 DLL in your client profile application. The .NET 4.0 client profile excludes the System.Web assembly therefore you get that exception. You simply need to use the Aspose.Words DLL found under net3.5 folder.

Thanks,