none
Cannot Start Application: The referenced Assembly is not installed on your system RRS feed

  • Question

  • I recently wanted to force the update of local files related to clickonce application on my machine.  So i located the files in the cache and deleted them (Which I assumed, apparently wrongly, was the same process that mage.exe -cc would do but I was being more selective).  Unfortunately, this caused an error to start to pop up every time i tried to run the app.

    Here's the log, though it is very unhelpful because it does not describe which assembly or where the information is coming from concerning the assembly:

    PLATFORM VERSION INFO
        Windows             : 5.1.2600.131072 (Win32NT)
        Common Language Runtime     : 2.0.50727.1433
        System.Deployment.dll         : 2.0.50727.1433 (REDBITS.050727-1400)
        mscorwks.dll             : 2.0.50727.1433 (REDBITS.050727-1400)
        dfdll.dll             : 2.0.50727.1433 (REDBITS.050727-1400)
        dfshim.dll             : 2.0.50727.1433 (REDBITS.050727-1400)

    SOURCES
        Deployment url            : 
    [application name]?Report=Equipment+Recap&Form=Full

    ERROR SUMMARY
        Below is a summary of the errors, details of these errors are listed later in the log.
        * Activation of [application name]?Report=Equipment+Recap&Form=Full resulted in exception. Following failure messages were detected:
            + The referenced assembly is not installed on your system. (Exception from HRESULT: 0x800736B3)

    COMPONENT STORE TRANSACTION FAILURE SUMMARY
        No transaction error was detected.

    WARNINGS
        There were no warnings during this operation.

    OPERATION PROGRESS STATUS
        * [7/25/2008 11:39:20] : Activation of
    [application name]?Report=Equipment+Recap&Form=Full has started.

    ERROR DETAILS
        Following errors were detected during this operation.
        * [7/25/2008 11:39:21] System.Runtime.InteropServices.COMException
            - The referenced assembly is not installed on your system. (Exception from HRESULT: 0x800736B3)
            - Source: System.Deployment
            - Stack trace:
                at System.Deployment.Internal.Isolation.IStore.GetAssemblyInformation(UInt32 Flags, IDefinitionIdentity DefinitionIdentity, Guid& riid)
                at System.Deployment.Internal.Isolation.Store.GetAssemblyManifest(UInt32 Flags, IDefinitionIdentity DefinitionIdentity)
                at System.Deployment.Application.ComponentStore.GetSubscriptionStateInternal(DefinitionIdentity subId)
                at System.Deployment.Application.SubscriptionStore.GetSubscriptionStateInternal(SubscriptionState subState)
                at System.Deployment.Application.SubscriptionStore.CheckAndReferenceApplication(SubscriptionState subState, DefinitionAppId appId, Int64 transactionId)
                at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
                at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
                at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension)
                at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

    COMPONENT STORE TRANSACTION DETAILS
        No transaction information is available.

    This application works for everyone else who tries to launch it, except for me, the actual development lead for this app, kind of an embarrassing situation.

    I scoured my system for any traces that this program ever ran, this includes registry, local settings folders, system folders, etc.  I also used the command line to run an uninstall which I would assume doesn't do anything because all files are already gone and there shouldn't have been any special registry entries to begin with.  Does anyone know if there is a location dfsvc.exe looks at to find which assemblies should already be available without downloading?

    Sidenote: The coworker I was trying to help out when I deleted these files had the same issue because he deleted the same files.  However, he waited until the next day then just tried the ClickOnce application again.  It worked perfectly.  Obviously I've restarted several times and waited the same length of time.  The application launches fine locally but since it takes querystring parameters this is not an optimal way to test some features.
    Friday, July 25, 2008 5:55 PM

Answers

  • Didn't muck with any assemblies, I deleted entire folders, anything beginning and ending in the same letters as my application (same process mage.exe -cc uses).  No trace of this application is left, even ran mage.exe -cc multiple times to make sure no trace was left after giving up on leaving my other online click once apps.  Tested to see if other clickonce apps still deployed and they do.

    I've now solved the problem and I should have from the first post been more specific about what I had tried and my knowledge of ClickOnce applications.

    Solution:  Delete files from Local Settings\Application Data\IsolatedStorage, this contained references to the deleted assemblies.  They were in no way named to reflect a relationship with my files but a little digging revealed some references within.

    Final score of locations that needed to be purged:
    Documents and Settings\<UserID>\Local Settings\Application Data\IsolatedStorage
    Documents and Settings\<UserID>\Local Settings\Application Data\assembly
    Documents and Settings\<UserID>\Local Settings\Apps\2.0\Data
    Documents and Settings\<UserID>\<Some Computer Generated Name>
    Note, there was more than one folder that needed to be deleted in each of these, and there was data there that I did not want deleted by mage.exe -cc or heavy handed deleting.  Also, there were registry entries that a regex search turned up that were deleted, this probably was unnecessary because there were just being stored as recently executed programs and a registry cleaner would have probably swept them away.

    Conclusion:  If you'd ever like to clear the cache of just one clickonce application, look for it's files and folders in those folder trees,
    Tuesday, July 29, 2008 7:16 PM

All replies

  •  

    Hi marr75,

    Does your ClickOnce application is an online only application? The cc command line of mage.exe clears the downloaded application cache of all online-only applications. For your question about which assembly that dfsvc.exe tries to find, you can use the Process Monitor to get these information.

    For details about Process Monitor, please check the following page:
    http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx?PHPSESSID=d926

    Best regards.
    Rong-Chun Zhang

    Windows Forms General FAQs
    Windows Forms Data Controls and Databinding FAQs

    Tuesday, July 29, 2008 11:14 AM
  • Yes, it's connected to a webserver for remote data access and takes a querystring to specify some items, so there's no value in having it available offline or in the start menu.

    Process monitor and Lutz Roeder's Reflector are 2 items I live by for pieces of systems I didn't write but I was unable to figure out what file or registry item is being accessed.

    I very much appreciate the suggestion of the process monitor but I looked through the strings, threads, and resources of dfsvc.exe and was unable to find my problem.

    To more clearly define the problem for anyone who has looked at this thread but didn't have a suggestion at the time, on a client machine (my computer) I deleted the assemblies referenced by a click-once application, and removed references to this particular application in the registry, but when trying to launch the application again, some item is being looked up by the click-once service and shows that these references should exist on my computer, and when trying to determine their version, the installation fails (why this causes the install to fail instead of just downloading the newest version of the files requested, I might never know).  Is there some under-documented file that the dfsvc.exe process checks on your local machine to see which files and assemblies should already be present on your machine when you try and launch a clickonce application online that is not in any of the well documented locations (2 folders in the Local Settings tree of folders that contain application data, assemblies, etc.)?
    Tuesday, July 29, 2008 4:18 PM
  • Didn't you say in your first post that you selectively deleted some entries from the clickonce deployment location? You've completely mucked up your deployment.

     

    Go back into the apps2.0 folder and remove the entire thing. Then run the application using the link.

     

    Running it online still copies the files down locally. I think the only real differences between online and offline are that it runs the app by invoking the call to open the application file on the server, and it doesn't put the entry in add/remove programs so you can't remove the files without doing it yourself.

     

    So try removing all of it and then running it, and see if that works.

     

    Note that it does incremental updates, so it only copies down files that have changed. You just update the version on the web server, and ClickOnce handles the rest. You don't need to muck with the assemblies, and in fact, shouldn't, as everything is defined in the manifests, and it messes it up if you do (which you have discovered).

     

    RobinS.

    GoldMail.com

    Tuesday, July 29, 2008 6:39 PM
    Moderator
  • Didn't muck with any assemblies, I deleted entire folders, anything beginning and ending in the same letters as my application (same process mage.exe -cc uses).  No trace of this application is left, even ran mage.exe -cc multiple times to make sure no trace was left after giving up on leaving my other online click once apps.  Tested to see if other clickonce apps still deployed and they do.

    I've now solved the problem and I should have from the first post been more specific about what I had tried and my knowledge of ClickOnce applications.

    Solution:  Delete files from Local Settings\Application Data\IsolatedStorage, this contained references to the deleted assemblies.  They were in no way named to reflect a relationship with my files but a little digging revealed some references within.

    Final score of locations that needed to be purged:
    Documents and Settings\<UserID>\Local Settings\Application Data\IsolatedStorage
    Documents and Settings\<UserID>\Local Settings\Application Data\assembly
    Documents and Settings\<UserID>\Local Settings\Apps\2.0\Data
    Documents and Settings\<UserID>\<Some Computer Generated Name>
    Note, there was more than one folder that needed to be deleted in each of these, and there was data there that I did not want deleted by mage.exe -cc or heavy handed deleting.  Also, there were registry entries that a regex search turned up that were deleted, this probably was unnecessary because there were just being stored as recently executed programs and a registry cleaner would have probably swept them away.

    Conclusion:  If you'd ever like to clear the cache of just one clickonce application, look for it's files and folders in those folder trees,
    Tuesday, July 29, 2008 7:16 PM