我已經寫了一個小型的winform應用程序,它在IDE中運行良好。它的構建沒有錯誤或警告。它沒有使用任何第三方控件。我在Visual Studio 2008中使用C#編寫代碼。當我編譯 - >發佈應用程序時,一切似乎都正常。但是,當我嘗試通過setup.exe文件安裝應用程序時,出現錯誤消息,提示「應用程序無法啓動」。錯誤的細節如下:在Visual Studio 2008中發佈後運行安裝程序包時出現問題
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)
我不知道還有什麼要做。我在這個應用程序中使用的唯一有點奇怪的事情是SQL Compact Server。任何幫助,將不勝感激。
感謝,
安德魯
在先決條件對話框中選擇SQL Server Compact 3.5。在「應用程序文件」對話框中,System.Data.SqlServerCe.dll文件設置爲「包含」和「必需」。我已經在「先決條件」和「先決條件(自動)」上嘗試過了。他們都給我同樣的錯誤。 – 2010-03-18 17:02:03
您可以打開發布生成的* .exe.manifest文件,並驗證列出的所有相關程序集在系統上均可用。 – 2010-03-18 17:24:38