I have an application created in Visual C# using ClickOnce. I send this application to users via a zipped ClickOnce publish folder, however I (the developer) cannot install it, while others have no problems.
I do the following steps: - In VS 2010, Project settings, Publish tab, click button 'Publish Now' - In the created directory I run setup (this is the created ClickOnce Setup file) - I get the error dialog: Application cannot be started. Contact the application vendor.
Btw, I have not signed my application and assigned the application as a Full Trust application.
What I already tried (also according comments): - When run as administrator (RMB on setup in clickonce in local folder), I get the same error. - When running it directly from the bin directory, it works ok. - When adding a sleep for attaching a debugger, it immediately gives the same error. - I cleared the cache but it does not help.
And below are the complete details:
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.