"Value Does not fall in the expected range" ClickOnce Deployment

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

  • 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/