I get the following error when trying to build a .CAB in visual studio on my new PC. The source is identical. The Registry warnings are not present on the old PC either.
Windows CE CAB Wizard
Warning: Section [RegKeys] has no data
Warning: Section [DefaultInstall] key "AddReg" - there are no section entries to process
Error: CAB file "D:\Dev\...\MyProject.CAB" could not be created
ERROR: The Windows CE CAB Wizard encountered an error. See the output window for more information.
No other errors show in the build log for the cabwiz.exe build step.
Any suggestions?
Move the source code to C: drive and build it there, instead of D: drive.
It appears that when cabwiz.exe (Visual Studio) is installed on C: drive, it does not like building projects on D: drive.
Similar issues with network drives noted at http://windowsmobilepro.blogspot.co.uk/2005/11/error-cab-file-could-not-be-created-no.html
I know it's a bit too late, but I'll leave this tip for future visits:
Check for whitespaces in Solution & CAB project paths, and also in file names.
Finally I found an answer. All my problems comes from the 8.3 file name generation.
You have to check two thing.
Registry key NtfsDisable8dot3NameCreation under HKLM/SYSTEM/CurrentControlSet/Control/FileSystem
Valid values are:
- 0 - Disable 8.3 name generation
- 1 - Enable 8.3 name generation
- 2 - Name generation will be evaulated by volume settings
Matty Brown suggested the following (not tested, but may help):
Valid values are (Windows 10 1809):
- 0 - Enable 8dot3 name creation on all volumes on the system
- 1 - Disable 8dot3 name creation on all volumes on the system
- 2 - Set 8dot3 name creation on a per volume basis
- 3 - Disable 8dot3 name creation on all volumes except the system volume
Volume based settings.
You need an admin command prompt. Check 8.3 name generation with
fsutil 8dot3name query d:
where "d:" is your volume
If the result inform you that your volume has disabled 8.3 name generation, you can set it easily with
fsutil 8dot3name set d:
Two more step is needed. You need a restart, and you have to move files from there and move it back to the original place.
The 8.3 name generation linked to the file operations.
Thats all.
I'm happy now with my new W10 ultrabook with VS2008 and a big WinCe 6 solution.
I ran into this error while trying to build a legacy CAB project on our new TFS Build Server running Windows 2012. Ironically, the script to build the mobile app and CAB project worked fine on my local development machine, but go the vague "Windows CE CAB Wizard Error: CAB file XXXXXX could not be created" error when I ran it on the build server, via both a TFS build definition or manually.
The article previously mentioned at http://windowsmobilepro.blogspot.co.uk/2005/11/error-cab-file-could-not-be-created-no.html was very thorough and helpful. I used the SUBST trick to shorten the project path and eliminate the spaces in the path names, and the script could then run on TFS / Win2012.
来源:https://stackoverflow.com/questions/21384107/windows-mobile-compact-framework-build-error-cab-file-could-not-be-created