I've had a ClickOnce app in use for a few months now, but recently started getting an error on my deployment of the latest version. With this latest version I've added a reference to a DLL that I hadn't used before (FTD2XX_NET.dll if it's relevant), and suspect that this is related to the issue but I cannot figure out how to fix it.
The actual project being deployed references another library project, which is what references the DLL (it references other DLL's but that has worked for months and they haven't changed). Following these threads I've tried deleting my "Local Settings/Apps" folder and rebooting multiple times, as well as recreating the project and deploying to a different location. The error exists on multiple machines so I do not suspect it's user profile corruption. Here is the full error I'm given:
PLATFORM VERSION INFO
Windows : 5.1.2600.196608 (Win32NT)
Common Language Runtime : 4.0.30319.261
System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
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://nt_server/prog/Publish/Digipot%20Utility/Digipot%20Utility.application
Deployment Provider url : file://nt_server/Prog/Publish/Digipot%20Utility/Digipot%20Utility.application
Application url : file://nt_server/prog/Publish/Digipot%20Utility/Application%20Files/Digipot%20Utility_1_0_0_72/Digipot%20Utility.exe.manifest
IDENTITIES
Deployment Identity : Digipot Utility.application, Version=1.0.0.72, Culture=neutral, PublicKeyToken=1e3769a7c667fbc1, processorArchitecture=msil
Application Identity : Digipot Utility.exe, Version=1.0.0.72, Culture=neutral, PublicKeyToken=1e3769a7c667fbc1, processorArchitecture=msil, type=win32
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 \\nt_server\prog\Publish\Digipot Utility\Digipot Utility.application resulted in exception. Following failure messages were detected:
+ Value does not fall within the expected range.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [3/14/2012 10:17:15 AM] : Activation of \\nt_server\prog\Publish\Digipot Utility\Digipot Utility.application has started.
* [3/14/2012 10:17:15 AM] : Processing of deployment manifest has successfully completed.
* [3/14/2012 10:17:15 AM] : Installation of the application has started.
* [3/14/2012 10:17:15 AM] : Processing of application manifest has successfully completed.
* [3/14/2012 10:17:17 AM] : Found compatible runtime version 2.0.50727.
* [3/14/2012 10:17:17 AM] : Detecting dependent assembly Sentinel.v3.5Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=msil using Sentinel.v3.5Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=msil.
* [3/14/2012 10:17:17 AM] : Detecting dependent assembly System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil using System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil.
* [3/14/2012 10:17:17 AM] : Detecting dependent assembly NationalInstruments.Common.Native, Version=8.6.35.131, Culture=neutral, PublicKeyToken=18CBAE0F9955702A, processorArchitecture=x86 using NationalInstruments.Common.Native, Version=8.9.35.302, Culture=neutral, PublicKeyToken=18cbae0f9955702a, processorArchitecture=x86.
* [3/14/2012 10:17:17 AM] : Detecting dependent assembly NationalInstruments.Common, Version=8.6.35.131, Culture=neutral, PublicKeyToken=18CBAE0F9955702A, processorArchitecture=msil using NationalInstruments.Common, Version=8.9.35.302, Culture=neutral, PublicKeyToken=18cbae0f9955702a, processorArchitecture=msil.
* [3/14/2012 10:17:17 AM] : Request of trust and detection of platform is complete.
ERROR DETAILS
Following errors were detected during this operation.
* [3/14/2012 10:17:18 AM] 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)
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)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
Thanks in advance, Joseph
Edit: It seems the problem is spreading. On the second machine I purged all of the ClickOnce files in the "Local Settings/Apps" so I had to reinstall an old program. When I went to do so it gave me the same error. This program was last updated in February. In response I tried totally removing and reinstalling the .NET framework to no avail.
My cure was a bit different. I was only having problems on one of 3 machines at my workplace. After trying most, if not all, of the solutions above I tried this:
Cleared out my AppData folder but it was hard to find. Mine was located here:
C:\Users\%usernamefolder%\AppData\Local\Apps\2.0\PN1V0WLG.QB8\2RVAAAH2.PA9
this portion "PN1V0WLG.QB8\2RVAAAH2.PA9" might be unique to my machine. But in the 2RVAAAH2.PA9 there were some folders whose name started with the first 4 letters of my application name:
Eg. "prog...exe_f9d3a3c4fe2dee3c_0001.0000_none_81c53bb624457ad3"
I went ahead and actually deleted all folders in the 2RVAAAH2.PA9 directory as they all seemed to pertain to my program or references in my program. I could tell some of them were related to Telerik DLLs that I use so I dumped them too.
I then re-installed my program and it worked.
Looks like it could be several issues take a look and see if any of them help
http://connect.microsoft.com/VisualStudio/feedback/details/361607/clickonce-application-does-not-install-when-the-deployment-path-includes-ampersand
also take a look at this
http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/9e4b714e-bad4-4c62-a7ad-3c80e32d95eb/
http://connect.microsoft.com/VisualStudio/feedback/details/437590/value-does-not-fall-within-the-expected-range-click-once-deployment-failure
http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/9e4b714e-bad4-4c62-a7ad-3c80e32d95eb/
So I found a solution, at the advice of the non-"Answer" solutions on this thread I turned off automatic version incrementing and manually updated the Assembly and File version in the Project settings under "Application > Assembly Information..." and it worked.
Remove any &
from the Folder name if there is any &
in the folder name. I was also having same problem for this reason.
Reference:Check Here
The workaround is just to uninstall and reinstall the application. I have yet to find a solution to the error itself, and why it happens so randomly. I will release a new version, and it will happen to one other person, and nobody else. I just released a new version a few minutes ago, and it screwed up my version on my machine, and nobody else's. I have yet to figure out a solution, since when I publish it works on most machines, but not on a couple. Has been this way for literally 12 years.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With