在ClickOnce部署中无法启动应用程序错误

时间:2012-03-12 01:21:10

标签: c# visual-studio-2010 deployment clickonce rights

我使用ClickOnce在Visual C#中创建了一个应用程序。 我通过压缩的ClickOnce发布文件夹将此应用程序发送给用户,但是我(开发人员)无法安装它,而其他人没有问题。

我执行以下步骤: - 在VS 2010中,“项目设置”,“发布”选项卡,单击“立即发布”按钮 - 在创建的目录中我运行setup(这是创建的ClickOnce安装文件) - 我收到错误对话框:无法启动应用程序。联系应用程序供应商。

顺便说一句,我没有签署我的申请并将申请分配为完全信托申请。

我已经尝试过(也根据评论): - 以管理员身份运行时(本地文件夹中的clickonce设置为RMB),我收到同样的错误。 - 直接从bin目录运行它时,它可以正常工作。 - 添加睡眠以附加调试器时,它会立即给出相同的错误。 - 我清除了缓存,但没有帮助。

以下是完整的详细信息:

PLATFORM VERSION INFO
Windows             : 6.1.7601.65536 (Win32NT)
Common Language Runtime     : 4.0.30319.261
System.Deployment.dll       : 4.0.30319.245 (RTMGDR.030319-2400)
clr.dll             : 4.0.30319.261 (RTMGDR.030319-2600)
dfdll.dll           : 4.0.30319.1 (RTMRel.030319-0100)
dfshim.dll          : 4.0.31106.0 (Main.031106-0000)

SOURCES
Deployment url          : file:///D:/PcgTools%20Publish2/PcgTools.application
Application url         : file:///D:/PcgTools%20Publish2/Application%20Files/PcgTools_0_5_0_149/PcgTools.exe.manifest

IDENTITIES
Deployment Identity     : PcgTools.application, Version=0.5.0.149, Culture=neutral, PublicKeyToken=0000000000000000, processorArchitecture=msil

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 D:\PcgTools Publish2\PcgTools.application resulted in exception. Following failure messages were detected:
    + Specified cast is not valid.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
* The manifest for this application does not have a signature. Signature validation will be ignored.
* The manifest for this application does not have a signature. Signature validation will be ignored.

OPERATION PROGRESS STATUS
* [12-3-2012 2:18:04] : Activation of D:\PcgTools Publish2\PcgTools.application has started.
* [12-3-2012 2:18:04] : Processing of deployment manifest has successfully completed.
* [12-3-2012 2:18:04] : Installation of the application has started.

ERROR DETAILS
Following errors were detected during this operation.
* [12-3-2012 2:18:04] System.InvalidCastException
    - Specified cast is not valid.
    - Source: System.Deployment
    - Stack trace:
        at System.Deployment.Application.DownloadManager.VerifyRequestedPrivilegesSupport(String requestedExecutionLevel)
        at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
        at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, Uri& appSourceUri, String& appManifestPath)
        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.

0 个答案:

没有答案