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



The information in this article applies to:

  • Microsoft Visual Basic Standard Edition for Windows 2.0

This article was previously published under Q94939

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.

Modification Type:MinorLast Reviewed:1/8/2003
Keywords:kbbug KB94939