"X. inf contains dirids, which are not supported" during packaging. Cab"

Source: Internet
Author: User

When mobile is packaged as a cab, the following error occurs:

File c: \ docume ~ 1 \ ghqian \ locals ~ 1 \ temp \ wiz196.inf contains dirids, which are not supported

 

BelowArticleFrom: http://blogs.msdn.com/ B /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 particle case, I think it's worth writing it here. I tracked down this issue recently together with a developer that wanted to package "packages" 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 his how 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 cocould 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 cocould 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. 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 automate lines-creation ...), I cocould 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, v 4.5.5102.0 and, 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 2 Windows Mobile 6 sdks and 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 be the same, but now it successfully creates the cab. I imagine there are still some limits, but this may be a topic of another post...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.