Creating A MASM Project Wizard For Visual Studio 2010

Posted on Updated on

In my post Setting Up Visual Studio 10 For MASM32 Programming, we saw how to configure Visual Studio 2010 for masm programming. In this article I will show you the process of creating a project wizard for a masm console application. A project wizard is similar to a regular project template; however, the export to template does not allow for exporting and use of a C++ application. Since a C++ template was the basis for masm_demo we will be using a C++ Custom Wizard template to create our new masm wizard.  Let’s see how this is done.

  1. Create a new C++ Custom Wizard
  2. Uncheck user interface check box since we will not be displaying any screens.
  3. This step will require that you complete  Setting Up Visual Studio 10 For MASM32 Programming successfully. If you have then, open the masm_demo project in your favourite editor. Copy the contents of that file and use it to replace the contents of the default.vcproj in your wizard.
  4. Copy the source.asm from masm_demo project and paste it into Templates\1033\ folder of your wizard project.
  5. Delete the .txt from your wizard project and add the source.asm file from Templates\1033\.
  6. Replace contents of  Templates.inf and add source.asm
  7. Navigate to “C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\VCWizards” then add a folder named “Macro Assembler”
  8. Replace all references to to the .txt file in default.js with “source.asm”
  9. Replace contents of Macro Assembler.vsz file with
                VSWIZARD 7.0
                Param="WIZARD_NAME = Macro Assembler"
                Param="ABSOLUTE_PATH = C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\VCWizards\Macro Assembler"
                Param="FALLBACK_LCID = 1033"
                Param="WIZARD_UI = FALSE"
                Param="SOURCE_FILTER = asm"
                Param="PROJECT_TEMPLATE_PATH = C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\VCWizards\Macro Assembler"
  10. Replace .vsdir and .vsz files in C:\Users\[username]\Documents\Visual Studio 2010\Wizards with the ones from Macro Assembler project directory.
  11. Copy contents of Macro Assembler project directory and paste it into directory created at step 7
  12. Done 🙂 now when you run visual studio  you should see a new entry under Wizards thats says Macro Assembler. If you double click on that you will get a default masm project already set up for coding. Enjoy!