태터데스크 관리자

도움말
닫기
적용하기   첫페이지 만들기

태터데스크 메시지

저장하였습니다.



2009.03.16 18:13

xxx.inf contains DirIDs, which are not supported 에러 해결법



흠..곤란한 문제----> 결국엔 파일의 갯수와 관련한 에러로 판명되어..

WM6 sdk안의 cabwiz를 카피하는 것으로 해결함.
(wm6 sdk의 cabwiz.exe는 파일 갯수 제한이 패치되었다.)

 http://blogs.msdn.com/raffael/archive/2008/03/18/x-inf-contains-dirids-which-are-not-supported.aspx

 Since looking around over the web I didn't find any reference to this particular case, I think it's worth writing it here. I tracked down this issue recently together with a developer that wanted to package "many" files within a single .CAB (1000+). He was using a quite old version of CabWiz.exe, launched through an application he wrote. So, as the initial troubleshooting step, I tried to reproduce the issue with the CabWiz.exe shipped with Visual Studio 2008: same problem.

Above all, this error can arise from CabWiz (which is internally invoked by VS2008 when creating Smart Device CAB Projects) also if you're using '%' in registry keys, as my friend Chris reported in hisHow to avoid hardcoding file paths within CAB file registry settings, in order to add registry values that refer to the location of files installed as part of the application.

So I thought: ok, he's hitting the known limit of 998 files that could be packaged in a CAB... Wrong: the problem happened also when using much less files, say 300... I'm still talking about C:\Program Files\Microsoft Visual Studio 9.0\SmartDevices\SDK\SDKTools\CabWiz.exe, version4.0.4332.0.

After running some tests, I reached a magic number: 262. With 262 files VS2008 could create a Smart Device CAB successfully, with 263 files it gave error "x.inf contains DirIDs, which are not supported". At this point I noticed that in the .INF file that VS2008 creates and gives to CabWiz.exe, it wrote an entry under [DestinationDirs] for each added file, even if the target folder on the device is the same, as it was in my case. By manually editing the INF (using some applications that automated lines-creation...), I could successfully create a CAB for 263+ files, specifying only one entry under [DestinationDirs]. So, another limit I wasn't aware of is:VS2008's CabWiz can parse up to 262 different entries under [DestinationDirs].

Now: Windows Mobile 6 SDKs ship with a newer version of CabWiz.exe, v4.5.5102.0and, very interestingly, it overcame not only the limitation about 998 files, but also the one about 262 entries under [DestinationDirs]. So the "simple" solution in this case was to

 

download one of the 2Windows Mobile 6 SDKsand use that CabWiz.exe (C:\Program Files\Windows Mobile 6 SDK\Tools\CabWiz).

Playing with files under C:\Program Files\Microsoft Visual Studio 9.0 is not recommended (and probably "not supported"), however for testing purposes I replaced C:\Program Files\Microsoft Visual Studio 9.0\SmartDevices\SDK\SDKTools\CabWiz.exe and CabWiz.ddf with the ones under C:\Program Files\Windows Mobile 6 SDK\Tools\CabWiz, and now my VS2008 can continue creating one entry under [DestinationDirs] for each file, independently if the target folder will the be same, but now it successfully creates the CAB. I imagine there are still some limits, but this may be a topic of another post...

사용자 삽입 이미지

신고
크리에이티브 커먼즈 라이선스
Creative Commons License
Trackback 0 Comment 0


티스토리 툴바