views:

28

answers:

2

I've got a small winform application that I've written that is running fine in the IDE. It builds with no errors or warnings. It's not using any third party controls. I'm coding in C# in Visual Studio 2008. When I Build --> Publish the application, everything seems to work fine. However, when I go and attempt to install the application via the setup.exe file I get an error message that says, "Application cannot be started." The error details are below:

ERROR DETAILS
Following errors were detected during this operation.
* [3/18/2010 10:50:56 AM] 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.GetAssemblyManifest(DefinitionIdentity asmId)
        at System.Deployment.Application.ComponentStore.GetSubscriptionStateInternal(DefinitionIdentity subId)
        at System.Deployment.Application.SubscriptionStore.GetSubscriptionStateInternal(SubscriptionState subState)
        at System.Deployment.Application.ComponentStore.CollectCrossGroupApplications(Uri codebaseUri, DefinitionIdentity deploymentIdentity, Boolean& identityGroupFound, Boolean& locationGroupFound, String& identityGroupProductName)
        at System.Deployment.Application.SubscriptionStore.CommitApplication(SubscriptionState& subState, CommitApplicationParams commitParams)
        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)

I'm not sure what else to do. The only slightly odd thing I used in this application is the SQL Compact Server. Any help would be appreciated.

Thanks,

Andrew

+1  A: 
João Angelo
SQL Server Compact 3.5 is selected in the Prerequisites dialogue. In the Application Files dialogue the System.Data.SqlServerCe.dll file is set to "Include" and "Required". I've tried it on "Prerequisite" and "Prerequisite (Auto)" as well. All of them give me the same error.
Andrew Cooper
You could open the *.exe.manifest file generated by the publish and verify that all dependent assemblies listed are available on the system.
João Angelo
+1  A: 

This looks like a very low-level Windows error. With some luck there's a breadcrumb in the Windows event log that tells you what DLL is missing on the target machine. A damaged registry is possible too.

Hans Passant