Trying to use VS.NET to create a CAB file. My C# project contains a lot of
"Content" resources in folders and subfolders, but when I add the Project
Output/Content to my CAB file, all the folder information is lost. All I
get is a flat CAB file with all the resource files in the "top level"
folder. Is this just a VS.NET limitation? If so, I can't believe that too
many people use this feature. Or maybe I am missing something?
Thanks!
Hi Stephen,
>... All I get is a flat CAB file with all the resource files in the "top
level"
>folder. Is this just a VS.NET limitation? If so, I can't believe that too
>many people use this feature. Or maybe I am missing something?
yes, this behavior is as expected, you don't miss anything. The VS.NET's
CAB file project only provides the basic function to cab your project's
content files, it is unable to preserve their original directory hierarchy.
If you want to cab your project's content files with their directory
hierarchy, you have to use the cabarc.exe to make a cab file manually: you
can open the Visual Studio .NET 2003 Command Prompt console window, then go
to your application's project directory, use the following command sample
to cab your content files:
1) All and only the content files exist in the contents directory and its
sub-directories:
cabarc -p -r N cnts.cab contents\*.*
2) All and only the content files exist in the content1 directory(and its
sub-directories) and content2 directory(and its sub-directories) :
cabarc -p -r N cnts.cab content1\*.* content2\*.*
2) Both the xml files and txt files in the content1 directory(and its
sub-directories) and only the txt files in the content2 directory(and its
sub-directories) :
cabarc -p -r N cnts.cab content1\*.xml content1\*.txt content2\*.txt
Also you can type the "cabarc" to review its usage info.
Thanks!
Best regards,
Gary Chang
Microsoft Community Support
--------------------
Get Secure! ??C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.