This is an existing application (.Net 2.0) that was working well on win XP. The development environment moved to Vista RC2 at work. Now the code gives the following error during build:
Error 1 The "GenerateTrustInfo" task failed unexpectedly.
System.BadImageFormatException: Could not load file or assembly 'D:\Working\SourceSafe\Application\AppName\ExternalDlls\Aspose.Word.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
File name: 'D:\Working\SourceSafe\Application\AppName\ExternalDlls\Aspose.Word.dll'
at System.Reflection.AssemblyName.nGetFileInformation(String s)
at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile)
at Microsoft.Build.Tasks.Deployment.ManifestUtilities.SecurityUtilities.RemoveNonReferencedPermissions(String[] setToFilter, ITaskItem[] dependencies)
at Microsoft.Build.Tasks.Deployment.ManifestUtilities.SecurityUtilities.GetNamedPermissionSet(String name, ITaskItem[] dependencies)
at Microsoft.Build.Tasks.Deployment.ManifestUtilities.SecurityUtilities.GetNamedPermissionSetFromZone(String targetZone, ITaskItem[] dependencies)
at Microsoft.Build.Tasks.Deployment.ManifestUtilities.SecurityUtilities.ComputeZonePermissionSet(String targetZone, PermissionSet includedPermissionSet, String[] excludedPermissions, ITaskItem[] dependencies)
at Microsoft.Build.Tasks.GenerateTrustInfo.Execute()
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode howToExecuteTask, Hashtable projectItemsAvailableToTask, BuildPropertyGroup projectPropertiesAvailableToTask, Boolean& taskClassWasFound)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
The short answer is: please upgrade to the latest Aspose.Words 4.0
If you need details:
Aspose uses a 3rd party obfuscation tool to obfuscate its products.
Some versions of the obfuscation tool we used earlier produced assemblies that sometimes failed to loat on .NET 2.0.
Aspose always upgrades to the latest version of the obfuscation tool.
The version of the tool we use to obfuscate Aspose.Words 4.0 works well for .NET 2.0
Another reason to upgrade to Aspose.Words 4.0 is that starting from this version we are providing a special build Aspose.Words.dll for .NET 2.0 as well as for .NET 1.1. Before that you simply used an assembly built for .NET 1.1 that worked on .NET 2.0.
Our subscription for Aspose Word and Excel have expired. Is there a renewal/upgrade option or do we have to purchase a new subscription at the full cost to upgrade?
You can renew at a lower price than full cost. If the subscription has expired, then it will cost 60% of the current price to renew. If you renew before it expires, it costs 50% of current price. Can you help me out with the company name or order id number so I can view your order?
My email is sales@aspose.com if you need to reach me.
That looks strange. We have not heard of such a problem before? Are you using VS2005?
Try to set the references to the dll by specifying the direct path, i.e. C:\Program Files\Aspose\Aspose.Words\Bin\net2.0\Aspose.Words.dll rather than using .NET tab.
I downloaded an evaluation version of Aspose.Word 4.0. Set references to the dll by specifying the direct path. (I also tired the .Net tab.)
Get the error message “The referenced component ‘Aspose.Words’ could not be found”.
On building the application, get the message "Resolved file has a bad image, no metadata, or is otherwise inaccessible. Could not load file or assembly ‘C:\Program Files\Aspose\Aspose.Words\bin\net2.0\Aspose.Words.dll’ or one of its dependencies. The module was expected to contain an assembly manifest.
Tried uninstalling and reinstalling aspose but did not work. (I’m on VS2005 on Vista RC2)