programing

ClickOnce 오류 : 값이 예상 범위 내에 있지 않습니다.

nasanasas 2021. 1. 11. 08:20
반응형

ClickOnce 오류 : 값이 예상 범위 내에 있지 않습니다.


모든 ClickOnce 응용 프로그램에서이 오류가 발생하면 특정 사용자에 대해 시작됩니다. 이것은 버전 업그레이드 후에 시작되었습니다 (그러나 다른 누구에게도 발생하지 않음).

이후 버전 번호 변경, 추가 / 제거, 레지스트리 스크럽, Local Settings \ Apps 폴더 지우기 등을 시도했습니다. 여전히 운이 없습니다.

이 문서 는 사용자 프로필 손상을 가리 키지 만이 사용자를 다시 만드는 것은 옵션이 아닙니다. 이것을 정리하는 다른 아이디어가 있습니까?

 PLATFORM VERSION INFO
    Windows             : 5.1.2600.196608 (Win32NT)
    Common Language Runtime     : 2.0.50727.3082
    System.Deployment.dll       : 2.0.50727.3053 (netfxsp.050727-3000)
    mscorwks.dll            : 2.0.50727.3082 (QFE.050727-3000)
    dfdll.dll           : 2.0.50727.3053 (netfxsp.050727-3000)
    dfshim.dll          : 2.0.50727.3053 (netfxsp.050727-3000)

SOURCES
    Deployment url          : file:///C:/Documents%20and%20Settings/<username>/Start%20Menu/Programs/<programname>/<programname>.appref-ms%7C

ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of \\NDP13\C\Documents and Settings\<username>\Start Menu\Programs\<programname>\<programname>.appref-ms| 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
    * [7/22/2009 10:35:30 AM] : Activation of \\NDP13\C\Documents and Settings\<username>\Start Menu\Programs\<programname>\<programname>.appref-ms| has started.

ERROR DETAILS
    Following errors were detected during this operation.
    * [7/22/2009 10:35:30 AM] System.ArgumentException
        - Value does not fall within the expected range.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Internal.Isolation.IsolationInterop.GetUserStore(UInt32 Flags, IntPtr hToken, Guid& riid)
            at System.Deployment.Internal.Isolation.IsolationInterop.GetUserStore()
            at System.Deployment.Application.ComponentStore..ctor(ComponentStoreType storeType, SubscriptionStore subStore)
            at System.Deployment.Application.SubscriptionStore..ctor(String deployPath, String tempPath, ComponentStoreType storeType)
            at System.Deployment.Application.SubscriptionStore.get_CurrentUser()
            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. 

이것을 시도 할 수 있습니다.

rundll32 %windir%\system32\dfshim.dll CleanOnlineAppCache

제어판에서 응용 프로그램을 제거한 다음 다시 설치하여 문제를 해결했습니다.


Windows 7 x64 컴퓨터에서도이 오류가 발생했습니다. 마침내 레지스트리에서 모든 참조를 완전히 제거한 다음 (충분하지 않음)을 (를) 지워 내 ClickOnce 응용 프로그램을 제대로 설치할 수있었습니다 %user%\AppData\Local\Apps.


나는 이것이 오래된 질문이라는 것을 알고 있지만 동일한 문제를 발견하고 다른 해결책을 찾았습니다. 원인은 ClickOnce 네트워크 설치 경로의 "&"였습니다. Microsoft는이 문제를 확인했으며 해결하지 않을 것이라고 말했습니다. Microsoft 버그 보고서


해당 폴더를 반복적으로 삭제하고 다시 설치하려고 시도한 후 문제가 미스터리하게 사라졌습니다. 아마도 거기에 재부팅이 있었을 것입니다.


간단한 수정 단계 :

1) 제어판에서 제거

2) "2.0"에있는 폴더를 삭제 합니다 %user%\AppData\Local\Apps. 이제 다시 설치할 수 있습니다.


몇 시간 동안이 오류를 해결 한 후 제 경우 에는 UNC 경로 대신 매핑 된 네트워크 드라이브 에서 설치 프로그램을 실행하려고했기 때문이라는 것을 알게되었습니다 . 설치 프로그램을 처음 실행하면 정상적으로 작동합니다. 그러나 다시 실행하면 다음 오류가 발생합니다.

응용 프로그램을 시작할 수 없습니다.

오류 세부 정보를 살펴보면 매우 모호한 오류가 있습니다.

여기에 이미지 설명 입력

대신 UNC 경로에서 응용 프로그램을 실행하면 \\MyServer\MyShare\Deploy...일관되게 정상적으로 실행됩니다.

추가 조사에 따르면 여기에서 진행중인 작업은 설치 관리자가 *.application배포 매니페스트에 지정된대로 인증 된 배포 URL에서 실행되고 있는지 (보안상의 이유로) 확인하는 것 같습니다 .

여기에 이미지 설명 입력

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!! :-)


I solved my exception

System.ArgumentException
    - Value does not fall within the expected range.
    - Source: System.Deployment

Check if the reference has Copy Local= true . For example , my problem was Office reference on true. When it tried to copy it , a conflict occurred, so it couldn't open the program. Hope this solves your problem.


i have been searching for a clean solution for this problem for a while. I could fix it couple of times by trial and error. Finally i could able to nail down exact issue. I thought of sharing it here.

Above error tells it can't find a matching file in deployment folder.

If you are facing this problem for an update check following.

  1. Download application.exe.manifest file from the deployment which is working.
  2. Compare current version of application.exe.manifest file with old one.
  3. Look for any reference added/removed/changed. if you see anything suspicious, manually edit/rollback that part of manifest and try, most cases it will work.

If new Upload

Check you have all assemblies marked as 'copy local=true' got in deployment folder, also check its size once uploaded.

because 'copy local = false' assemblies will be treated as prerequisites in clickonce engine. Most of the application launch problem starts from there.


Deleted everything in %user%\AppData\Local\Apps\2.0\ and it worked.


Curiously, I had the same issue and it was resolved by simply logging in as another user and installing/running the app. When I logged out and then logged in as the original user it all worked again.


My problem was caused by a change in the csproj file. a reference to an assembly was changed from:

HintPath>..\Files\

to

HintPath> .. \ ..\Files\

which added a dependency xml element in the manifest file.

editing the csproj file and publishing, fixed the manifest file.


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.


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.


간단한 구성을 시도했습니다. 로 이동 프로젝트 -> 속성 -> 응용 프로그램 ->

아이콘과 메인 페스트를 확인하고 기본 구성으로 매니페스트 포함 옵션 옆에있는 아이콘을 선택 합니다.

행운을 빕니다

참조 URL : https://stackoverflow.com/questions/1166233/clickonce-error-value-does-not-fall-within-the-expected-range

반응형