We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Migrate to Latest Version of Aspose.Words for .NET via NuGet | Assembly has Dependencies on Version of .NET Framework that is Higher than Target

I recently updated from Aspose.Words version 13.9 to version 20.7 in a few of my projects. After fixing all the compiler errors, I built and ran my app locally without any issues. When I tried to deploy the app to our dev environment, the publish failed. I have tried using many different versions of Aspose.Words, and they all seem to cause this same issue. I am installing Aspose.Words using NuGet.

The errors that I receive are below:

Dialog Box:
Publish has encountered an error.
Build failed. Check the Output window for more details.

A diagnostic log has been written to the following location:
“C:\Users\AppData\Local\Temp\tmp86AC.tmp”

Diagnostic Log:
7/8/2020 1:23:17 PM
System.AggregateException: One or more errors occurred. —> System.Exception: Build failed. Check the Output window for more details.
— End of inner exception stack trace —
—> (Inner Exception #0) System.Exception: Build failed. Check the Output window for more details.<—

System.Exception: Build failed. Check the Output window for more details.

===================

Output Window (I removed paths and names):
3>------ Publish started: Project: , Configuration: Debug Any CPU ------
3>Connecting to
3>Transformed Web.config using
3>Copying all files to temporary location below for package/publish:
3>obj\Debug\AspnetCompileMerge\Source.
3>C:\WINDOWS`Microsoft.NET`\Framework\v4.0.30319\aspnet_compiler.exe -v / -p C: -u C:
3>ASPNETCOMPILER(0,0): Warning : The following assembly has dependencies on a version of the .NET Framework that is higher than the target and might not load correctly during runtime causing a failure: NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. The dependencies are: System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089. You should either ensure that the dependent assembly is correct for the target framework, or ensure that the target framework you are addressing is that of the dependent assembly.
3>/DocViewer.aspx(1,0): Error ASPPARSE: Error parsing attribute ‘title’: Could not load file or assembly ‘Aspose.Words, Version=19.1.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
3>/DocViewer.aspx(1,0): Error ASPPARSE: Error parsing attribute ‘masterpagefile’: Could not load file or assembly ‘Aspose.Words, Version=19.1.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
3>/DocViewer.aspx(1,0): Error ASPPARSE: Error parsing attribute ‘enableeventvalidation’: Could not load file or assembly ‘Aspose.Words, Version=19.1.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
3>/DocViewer.aspx(1,0): Error ASPPARSE: Error parsing attribute ‘enableviewstate’: Could not load file or assembly ‘Aspose.Words, Version=19.1.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
3>/DocViewer.aspx(1,0): Error ASPPARSE: Error parsing attribute ‘enableviewstatemac’: Could not load file or assembly ‘Aspose.Words, Version=19.1.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
3>
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

@Rurik_dao_hctx_net,

Please first remove all old references of Aspose.Words DLLs from your visual studio project and clear the contents of bin, debug, release, obj folders and remove the folder where you are publishing the files. Then reinstall Aspose.Words 20.7 via NuGet, clean/rebuild the project and publish the files for deployment. You may also want to take a look at this thread that may help you to resolve the problem:

Thanks for the suggestion, but this did not work. After completing the steps you listed, I received the same errors as before.

@Rurik_dao_hctx_net,

Can you please also list the complete steps that we can perform on our end to be able to observe this undesired issue?

Please also provide your simplified visual studio application that will help us to reproduce this problem on our end, ZIP and attach it here for testing. Please do not include Aspose.Words DLL files in it to reduce the file size.