Windows Mobile Compact Framework Build Error: CAB file … could not be created

冷暖自知 提交于 2019-11-28 04:08:46

问题


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?


回答1:


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




回答2:


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.




回答3:


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.




回答4:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!