17

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.

Community
  • 1
  • 1
Fr33dan
  • 4,227
  • 3
  • 35
  • 62

10 Answers10

9

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.

jaredbaszler
  • 3,941
  • 2
  • 32
  • 40
  • I want to add this has not been a long term solution for me. This error tends to show its ugly head about every 5th deployment or so. But remains to happen on just one of the computers in the building. Just an FYI if people are looking for a permanent solution. – jaredbaszler Apr 20 '15 at 23:49
  • I only got this bug after 3 years of working on a project! I moved everything from under 2.0. It's now installing. – TedTrippin May 20 '15 at 16:21
  • 1
    Another note that I've recently figured out. My ClickOnce application automates another program. If that automated program doesn't properly get closed by my application this error has a much higher chance of happening after an update. I went ahead and hooked into the updating events of the click once application and destroyed all existing instances of that automated program created by my application before the update runs. So far, so good on this error going bye-bye. It has been about 2 months with no errors and I've released required updates to my application about a dozen times. – jaredbaszler Dec 23 '15 at 20:15
5

Looks like it could be several issues take a look and see if any of them help

  • Check and see if there is a & in the path of the application

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

  • We used to target "any cpu", and had to change it to x86 in order to get it to work on 64-bit machines. For us, this is because we use DirectX, and it only supports 32-bit machines. So even though we put all of the DirectX code in its own project that targeted x86, we had to have our startup project also target x86.

http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/9e4b714e-bad4-4c62-a7ad-3c80e32d95eb/

  • It appears to be caused by an unknown change in the .vbproj file. If you have source control, or backups of your files, restoring an old version of the .vbproj file and republishing seems to fix the problem. You may or may not have to uninstall on the target machine if they tried to run the bad publish.

http://connect.microsoft.com/VisualStudio/feedback/details/437590/value-does-not-fall-within-the-expected-range-click-once-deployment-failure

  • Make sure you don't have any mismatched version numbers on any dlls , or any circular references.

http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/9e4b714e-bad4-4c62-a7ad-3c80e32d95eb/

Micah Armantrout
  • 6,781
  • 4
  • 40
  • 66
  • Thanks for your reply, I do not have an & in my path. I considered the Any CPU solution, but did not try it because the issues stated were on x64 machines and all mine are x86. I went ahead and tried it since that post and did not work. Version #'s are what I suspect to be the issue, but I'm not sure how this could be. My deployment project only references my library project. Which references 4 DLL's that are packaged that project's output, and one other project (that references nothing). There is one new DLL reference in this version, but I tried removing it and still had the problem. – Fr33dan Mar 15 '12 at 14:03
  • Oh and I forgot to address the .vbproj corruption idea. As I stated in my original post I tried completely recreating the project from scratch and copying the code, so I don't know how that could be it. – Fr33dan Mar 15 '12 at 18:30
5

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.

Fr33dan
  • 4,227
  • 3
  • 35
  • 62
1

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

Bashar
  • 109
  • 3
  • 13
1

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.

Ricky
  • 1,587
  • 2
  • 12
  • 20
0

If you are trying to run the clickonce on a UNC share, it may not work. I was getting the same result as yours above, but I just tried deploying to C:\ instead of our share, and it runs just fine. I know this isn't a solution, but at least it's a clue - not sure if this has to do with Authentication... or something deeper. Man, I wish the error message was more helpful.

m1m1k
  • 1,375
  • 13
  • 14
0

Platform target: Any CPU (msil) was definitively the problem for me: Setting to x86 solved the problem

Stephane Ehret
  • 340
  • 2
  • 9
0

I switched publish location to C:\Temp. The installed failed but this time told me I had an existing install from another location. After a bit of poking around, I found I could fix the problem by: 1. Use Control Panel to uninstall my application. 2. Delete publish folder contents.

I haven't been able to figure out what steps actually produce the problem but its gone now for the the time being.

0

In case, any one facing similar issue with WPF application, please take a look at my answer here.

Community
  • 1
  • 1
atp9
  • 890
  • 1
  • 11
  • 23
0

I had this problem with an old app that had some hard-to-find pre-requisites. I found that VSTO does a nice roll-up of a lot of those files (making it a simple troubleshooting step, or simple solution). It helped me with a few old computers:

Visual Studio 2010 Tools for Office Runtime: https://www.microsoft.com/en-US/download/details.aspx?id=48217

tgolisch
  • 6,549
  • 3
  • 24
  • 42