I ran into this issue today, and found a solution for me that worked here:
https://web.archive.org/web/20100330064330/http://blogs.msdn.com/raffael/archive/2008/03/18/x-inf-contains-dirids-which-are-not-supported.aspx
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, version 4.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.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).