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

ID: Q200508


The information in this article applies to:


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 this to be a bug in the Microsoft products 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:

http://support.microsoft.com/support/visualj/

http://support.microsoft.com/support/java/

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

Additional query words:


Keywords          : kbVJ600bug kbGrpJava 
Version           : WINDOWS:6.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: January 15, 1999