BUG: Resource File Does Not Show Up in EXE/CAB Packages (200508)



The information in this article applies to:

  • Microsoft Visual J++ 6.0

This article was previously published under Q200508

SYMPTOMS

When you try to run a Windows EXE with a form that uses a resource file, and the output directory is set for the project in the Project Properties dialog box, you cannot load the resource file and the following exception occurs:
'com.ms.wfc.core.WFCException was not handled'
This also occurs with all other types of packages (for example, cab packages). In this case, the resource file does not show up in the contents of the cab.

CAUSE

This problem only occurs if the project directory is a subdirectory (directly or indirectly) of the output directory.

RESOLUTION

Build the EXE in the project directory, copy it to some other directory, and run it from the other directory.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

This problem only occurs if the project directory is a subdirectory (directly or indirectly) of the output directory.

Steps to Reproduce Behavior

  1. Create a new Windows application project.
  2. Add a graphic file (for example, a .gif or a .bmp) to the project.
  3. Add a Picture Box to the form.
  4. In the Picture Box Properties dialog box, set the image property to be the included graphic file.
  5. Under the Project Properties menu, click the Compile tab, and set the Output Directory to be a non-project directory (for example, C:\Xyz). Click the Output Format tab and specify a Packaging type (for example, Windows EXE).

    NOTE: The project directory needs to be a subdirectory (directly or indirectly) of this output directory.
  6. On the Build menu, click Build Solution.
  7. Run the EXE from its non-project directory (for example, C:\Xyz).
RESULT: The following error occurs:
An exception of type 'com/ms/wfc/core/WFCException' was not handled.

REFERENCES

For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, see the following pages on the Microsoft Technical Support site:



(c) Microsoft Corporation 1999, All Rights Reserved. Contributions by Mohan Ananthakrishnan, Microsoft Corporation.


Modification Type:MinorLast Reviewed:8/25/2005
Keywords:kbBug kbpending KB200508