Cannot deploy application - Value does not fall within the expected range

0

I am trying to deploy an early version application I made but I get this stack trace when I install it. Can anyone suggest anything?

I looked around the assembly in Visual Studio but couldn't find the right setting. I doubt it is that much to do with the assembly.

This is the error message I get when I install the application:

ERROR DETAILS

Following errors were detected during this operation. * [20/05/2019 1:58:37 PM] System.Deployment.Application.DeploymentException (ComponentStore) - Exception occurred during store operation. - Source: System.Deployment - Stack trace: at System.Deployment.Application.ComponentStore.SubmitStoreTransaction(StoreTransactionContext storeTxn, SubscriptionState subState) at System.Deployment.Application.ComponentStore.SetPendingDeployment(SubscriptionState subState, DefinitionIdentity deployId, DateTime checkTime) at System.Deployment.Application.SubscriptionStore.SetLastCheckTimeToNow(SubscriptionState subState) at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl, Uri& deploymentUri) at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl) at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state) --- Inner Exception --- System.ArgumentException - Value does not fall within the expected range. - Source: System.Deployment - Stack trace: at System.Deployment.Internal.Isolation.IStore.Transact(IntPtr cOperation, StoreTransactionOperation[] rgOperations, UInt32[] rgDispositions, Int32[] rgResults) at System.Deployment.Internal.Isolation.Store.Transact(StoreTransactionOperation[] operations, UInt32[] rgDispositions, Int32[] rgResults) at System.Deployment.Application.ComponentStore.SubmitStoreTransaction(StoreTransactionContext storeTxn, SubscriptionState subState)

Here is some more information

COMPONENT STORE TRANSACTION DETAILS * Transaction at [21/05/2019 12:08:38 PM] + System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata - Status: Set - HRESULT: 0x0 + System.Deployment.Internal.Isolation.StoreTransactionOperationType (27) - HRESULT: 0x80070057

EDIT: I found the ClickOnce store and also changed the version number of the project because it was wrong. Now the installer ITSELF crashes to this stack trace (which is a good sign):

ERROR DETAILS

Following errors were detected during this operation. * [21/05/2019 2:22:31 PM] System.ArgumentException - Value does not fall within the expected range. - Source: System.Deployment - Stack trace: at System.Deployment.Internal.Isolation.IStore.LockApplicationPath(UInt32 Flags, IDefinitionAppId ApId, IntPtr& Cookie) at System.Deployment.Application.ComponentStore.LockApplicationPath(DefinitionAppId definitionAppId) at System.Deployment.Application.SubscriptionStore.LockApplicationPath(DefinitionAppId definitionAppId) at System.Deployment.Application.FileDownloader.PatchFiles(SubscriptionState subState) at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState, X509Certificate2 clientCertificate) at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options) 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, Uri& deploymentUri) at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(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.

Can anyone fix it now?

EDIT 2: I sort of fixed it by wiping the ClickOnce store as originally directed (but must have deleted the wrong files originally), but I lost all my data although it can be fixed by copying the folders back in. It would be nice to know what exactly was broken though.

EDIT 3: It broke one of my former projects. I fixed that by deleting the certificate, but I wonder if there was another way.

c#
deployment
clickonce
asked on Stack Overflow May 20, 2019 by Jordan Ferrazza • edited May 23, 2019 by Jordan Ferrazza

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0