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.
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.
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,
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.