ClickOnce Deployment Errors

孤者浪人 提交于 2019-11-28 14:15:35

I had a similar problem.

The solution for me was that ClickOnce craps out if there is an ampersand in the publish path. Being as I was publishing to the folder for our Research and Development department, i.e. "\serverName\r&d\", this was causing me grief, and was giving me the same uncommunicative "Value does not fall within the expected range" that you are seeing.

I don't know if that will solve your problem, but I feel obliged to suggest it.

In the end my only way of resolving the issue was to create an entirely new project and copy the code over from each form and then publish that.

Jonez: Unfortunately moving my user profile would have been a major hassle and it seemed to me that this would've been major overkill to fix a publishing issue.

Gregory: The installation would fail with that error. I tried publishing to a new location (different physical server) and the issue was still present and I confirmed no ampersands were used in either path.

If you're looking for a quick and dirty solution that works 95% of the time for System.Deployment issues, remove and create a new user profile. Be sure to back up any valuable data before doing this, such as the desktop, favorites, "My Documents, "My Pictures", Outlook files, etc.

I've also seen people delete the entire Local Settings directory to fix issues. Note that this directory sometimes contains Outlook .pst files.

Be cognizant that you may be effecting other applications by performing these fixes and that the effects are sometimes irrevisible. These solutions are obviously not ideal, but these are the solutions that Microsoft has provided me.

Good luck.

I just ran into this error and was able to resolve it by simply uninstalling then reinstalling the application on the user's computer.

RobinDotNet

Have you changed the target platform for the application itself? More importantly, does your development machine have .NET 3.5 SP-1 installed on it?

This error occurs when you have mismatched references. So your deployment expects one version, but the machine it's being installed on has a different version. It also happens if you have circular references.

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