“Value Does not fall in the expected range” ClickOnce Deployment

一世执手 提交于 2019-11-30 17:21:16

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/

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 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.

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

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.

atp9

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!