2
votes

I have made a c# application and encountered the following error on installation after publishing it.

PLATFORM VERSION INFO
    Windows             : 6.2.9200.0 (Win32NT)
    Common Language Runtime     : 4.0.30319.34014
    System.Deployment.dll       : 4.0.30319.34243 built by: FX452RTMGDR
    clr.dll             : 4.0.30319.34014 built by: FX45W81RTMGDR
    dfdll.dll           : 4.0.30319.34243 built by: FX452RTMGDR
    dfshim.dll          : 6.3.9600.16384 (winblue_rtm.130821-1623)

SOURCES
    Deployment url          : file:///C:/Users/username/New%20folder/HomeProg/WORK/MyApp2/Setup/MyApp/MyApp/publish/MyApp.application
    Application url         : file:///C:/Users/username/New%20folder/HomeProg/WORK/MyApp2/Setup/MyApp/MyApp/publish/Application%20Files/MyApp_1_0_0_5/MyApp.exe.manifest

IDENTITIES
    Deployment Identity     : MyApp.application, Version=1.0.0.5, Culture=neutral, PublicKeyToken=929f04053a5afc91, processorArchitecture=msil
    Application Identity        : MyApp.exe, Version=1.0.0.5, Culture=neutral, PublicKeyToken=929f04053a5afc91, processorArchitecture=msil, type=win32

APPLICATION SUMMARY
    * Installable application.

ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of C:\Users\username\New folder\MyApp\MyApp\publish\MyApp.application resulted in exception. Following failure messages were detected:
        + Reference in the manifest does not match the identity of the downloaded assembly MyApp.exe.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

WARNINGS
    There were no warnings during this operation.

OPERATION PROGRESS STATUS
    * [24/08/2015 11:29:37 PM] : Activation of C:\Users\username\New folder\HomeProg\WORK\MyApp2\Setup\MyApp\MyApp\publish\MyApp.application has started.
    * [24/08/2015 11:29:37 PM] : Processing of deployment manifest has successfully completed.
    * [24/08/2015 11:29:37 PM] : Installation of the application has started.
    * [24/08/2015 11:29:37 PM] : Processing of application manifest has successfully completed.
    * [24/08/2015 11:29:40 PM] : Found compatible runtime version 4.0.30319.
    * [24/08/2015 11:29:40 PM] : Request of trust and detection of platform is complete.

ERROR DETAILS
    Following errors were detected during this operation.
    * [24/08/2015 11:29:41 PM] System.Deployment.Application.InvalidDeploymentException (RefDefValidation)
        - Reference in the manifest does not match the identity of the downloaded assembly MyApp.exe.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.DownloadManager.ProcessDownloadedFile(Object sender, DownloadEventArgs e)
            at System.Deployment.Application.FileDownloader.DownloadModifiedEventHandler.Invoke(Object sender, DownloadEventArgs e)
            at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
            at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
            at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
            at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
            at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
            at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
            at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
            at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

COMPONENT STORE TRANSACTION DETAILS
    No transaction information is available.

Have searched the whole internet for a solution and the solutions i've found are complicated and do not relate to my problem.

The application is a .Net 4.5 wpf application made in visual studio 2013. Any form of help and or links to helpful sources would be much appreciated

1
Have you tried Selecting "Create application without a manifest" in Project Properties - Application - Resources ?Matt
Determine the assembly it mentions "Reference in the manifest does not match the identity". Possibly post your manifest.ΩmegaMan
Tried selecting 'create an application without a manifest' but it did not work. The only thing that worked was copying my new code to an older backup project which had no such problem. It worked once and the error came back soon after adding new code to the 'now working' projectDot Naughty

1 Answers

0
votes

You need to change your project setting to Create application without a manifest.

See: https://stackoverflow.com/a/5339135/1776231

In project properties -> Application tab -> Resources -> checkbox icon and manifest, the setting "Embed manifest with default settings" caused the problem. Setting it to "Create application without a manifest" fixes the problem.