Article ID: 971052
RAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.
Application failed to run with clues of some older binaries are used. An example is System.IO.FileLoadException: Could not load file or assembly 'XXXX, Version=x.x.x.x, Culture=neutral, PublicKeyToken=…' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
When the Framework 3.5SP1 is installed and the ClickOnce store is used for the first time cdf-ms files maybe deleted. This can also be caused by deleting the registry key HKEY_CURRENT_USER\Software\Classes\Software\Microsoft\Windows\CurrentVersion\Deployment\ClickOnce35SP1Update. The missing cdf-ms files will cause ClickOnce to wrongly share strong named assembly with the same version but different file hash.
To avoid the problem before it happens make sure that all shared assemblies that you are using in your updated ClickOnce application have a new assembly version.
If the problem has already happened then you need to clear online cache by running “mage.exe –cc”, uninstall all versions of installed applications that might have a strong named assembly with the same version, and reinstall the application.
Mage.exe is available in various locations, including the following:
· The .NET Framework 2.0 SDK. The .NET Framework 2.0 SDK is available as a component of the Visual Studio 2005 setup or can be downloaded from the Microsoft Download Center
· The Windows SDK for Windows Vista. The Windows SDK for Windows Vista can be downloaded from the Microsoft Download Center.
· Visual Studio 2008. Later versions of Mage.exe and MageUI.exe are included as a component of the Visual Studio 2008 setup.
More information: http://msdn.microsoft.com/en-us/library/acz3y3te.aspx
MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE “MATERIALS”) FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE.
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.
Article ID: 971052 - Last Review: May 7, 2009 - Revision: 1.0