FIX: Bad .MAK File Prevents Display of Make EXE File Dialog

Last reviewed: October 30, 1997
Article ID: Q94939
2.00 WINDOWS kbenv kbbuglist

The information in this article applies to:

- Microsoft Visual Basic programming system for Windows, version 2.0

SYMPTOMS

The Make EXE File dialog box is not displayed and the program is not compiled if you try to make an executable file when the project (.MAK) file was saved incorrectly. Specifically, this problem occurs if the .MAK file was saved with an invalid path to the executable file.

The project file is saved incorrectly if the directory name containing your project files is derived from the Visual Basic working (or current) directory name. This problem occurs if the working directory for Visual Basic has this pattern:

   C:\XXXYYY

and your project is in a directory that has this pattern:

   C:\XXX\TEMP

where XXX represents the same pattern of characters.

For example, if you run Visual Basic from a directory called C:\VB2 and your project is in C:\VB\CALC, you will encounter this problem. The Make EXE dialog is not displayed, and your program is not compiled.

WORKAROUND

To work around the problem, use a text editor such as Notepad to delete the line containing "Path=" from your project's .MAK file. Then save the .MAK file, and reload your project in Visual Basic. You will now be able to display the Make EXE dialog box. You will need to delete this statement each time you make an .EXE file.

Another alternative workaround is to place all the files for your project in a new directory where the directory name is not derived from the Visual Basic working directory name. You can then delete the "Path=" statement from the .MAK file using a text editor such as Windows Notepad.

STATUS

Microsoft has confirmed this to be a bug in Microsoft Visual Basic version 2.0 for Windows. This problem was corrected in Microsoft Visual Basic version 3.0 for Windows.

MORE INFORMATION

Steps to Reproduce Problem

To reproduce this problem, set the working directory of Visual Basic to the directory where VB.EXE is stored (C:\VB). To do this, highlight the Visual Basic icon in Program Manager and choose Properties from the File menu of Program Manager (PROGMAN.EXE). Then in the Properties dialog box, set the working directory path the same path where VB.EXE is located.

  1. Create a directory with the same name as the directory where Visual Basic is located excluding the right most character. For example, if Visual Basic is in C:\VB2, create a directory called C:\VB.

  2. Create a subdirectory named CALC on the new directory (C:\VB\CALC).

  3. Copy all of the files from the Visual Basic SAMPLES\CALC directory to the C:\VB\CALC directory.

  4. Start Visual Basic and open the CALC.MAK project in the new C:\VB\CALC directory.

  5. From the File menu, choose Make EXE File (ALT, F, K) and choose the OK button to have Visual Basic create an executable using the default name.

  6. From the File menu, choose Save Project (ALT, S, V). The project .MAK file will be saved incorrectly. Specifically an invalid relative path such as Path="..2" will be added to the project .MAK file.

  7. From the File menu, choose Open Project (ALT, F, O) and open the CALC project.

  8. From the File menu, choose Make EXE File (ALT, F, K) and choose the OK button to have Visual Basic create an executable using the default name.

The Make EXE dialog will not be displayed and your program will not be compiled.


Additional reference words: buglist2.00 fixlist3.00 2.00 3.00
KBCategory: kbenv kbbuglist
KBSubcategory: EnvtDes
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.