ClickOnce error: Value does not fall within the expected range

后端 未结 15 1442
旧时难觅i
旧时难觅i 2020-12-01 01:08

Getting this error on ALL ClickOnce application launches for a certain user. This started happening after a version upgrade (but happens to no one else).

I\'ve trie

相关标签:
15条回答
  • 2020-12-01 01:40

    I have also come across this error on a Windows 7 x64 machine. I've finally been able to properly install my ClickOnce application by completely removing any references to in the registry (but that was not enough) and then clearing %user%\AppData\Local\Apps.

    0 讨论(0)
  • 2020-12-01 01:42

    Simple fix steps:

    1) uninstall from control panel

    2) delete "2.0" folder located in %user%\AppData\Local\Apps. You should now be able to re-install

    0 讨论(0)
  • 2020-12-01 01:44

    I un-installed the application from Control Panel then re-installed which fixed the issue for me.

    0 讨论(0)
  • 2020-12-01 01:45

    After hours of troubleshooting this error, I found that in my case it was because I was trying to run the installer from a mapped network drive instead of a UNC path. The first time you run the installer, it works fine. But if you run it again, you get the following error:

    Browsing into the error details, you find the highly ambiguous error:

    If I instead run the application from a UNC path \\MyServer\MyShare\Deploy... Then it runs just fine, consistently.

    Upon further investigation, it sounds like what is going on here is that the installer is verifying (for security reasons) that it is being run from the authorized deployment url, as specified in the *.application deployment manifest.

    Since the current path (mapped drive) is different from the UNC path, the installation fails and the program is removed. Note the difference between the paths in the error log:

    So what the error really means is "Warning! The application cannot be installed because the deployment URL does not match the provider URL specified in the deployment manifest."

    Well, that would have saved me a lot of hours of troubleshooting!! :-)

    0 讨论(0)
  • 2020-12-01 01:46

    I was having a customer installing our VSTO addin MSI and we were seeing this.

    System.ArgumentException: Value does not fall within the expected range. at System.Deployment.Internal.Isolation.IsolationInterop.GetUserStore(UInt32 Flags, IntPtr hToken, Guid& riid)

    After checking their Event logs it was clear to me that they were having issues with thier user profile. They rebuild their user profile and it fixed the issue.

    0 讨论(0)
  • 2020-12-01 01:51

    Have dealt with this error many times, but today it stopped everything and caused us huge issues. I could not figure it out. I opened a critical support case with Microsoft, and in our first phone call, reading through the error log, I figured it out.

    My solution has several projects. Our main program is one, and then there's a common dll. I changed a reference in the common dll for Excel (Microsoft.Office.Interop.Excel) from version 12, and upgraded to v15 due to other issues with debugging and framework compatibility. I then released after doing some work.

    What I noticed after release was that I had not upgraded the Excel dll in my main project also, as it has a few references to it also. Well, even after I upgraded that to v15, the problem still existed. That's when I called microsoft.

    After our first phone call, I noticed a couple lines in the error log when the app start fails.

    * [3/12/2018 2:10:57 PM] : Detecting dependent assembly Microsoft.Vbe.Interop, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C, processorArchitecture=msil using Microsoft.Vbe.Interop, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=msil.
    * [3/12/2018 2:10:57 PM] : Detecting dependent assembly office, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C using office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c.
    * [3/12/2018 2:10:57 PM] : Detecting dependent assembly office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C, processorArchitecture=msil using office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=msil.
    

    Notice how the middle line shows Version 12.0.0.0? Well, I was confused. So I started looking for any other office references. I found that our main program made a reference to just Office.dll, and the Interop.Word dll. I removed them and readded the reference to the Word interop dll of v15, then I released the app again.

    It still didn't work, but as soon as I uninstalled the application then reinstalled, all was good. People who had not yet upgraded had no issue upgrading once I had fixed the issue. The people who had tried to upgrade had to uninstall and reinstall.

    Thankfully, Microsoft closed the case without any charges :)

    Hope this helps someone else.

    0 讨论(0)
提交回复
热议问题