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
                Wizard=VsWizard.VsWizardEngine.10.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!

5 thoughts on “Creating A MASM Project Wizard For Visual Studio 2010

    John said:
    January 26, 2012 at 1:27 pm

    Can creating a template be done in Visual Studio 2010 Express?

      Romaine Carter said:
      January 26, 2012 at 6:42 pm

      Hi John, I have never tried the technique on VS10 Express edition; however, you can go ahead and follow the tutorial using VS10 Express and see what happens.

    Marvin said:
    June 30, 2013 at 3:20 pm

    I tried your guide with VS12 and it works fine. The only issue is that when I make a new project using the wizard, I get a message saying “Error occurred processing template file: C:\Program Files (x86)\Microsoft Visual Studio 11.0\ … \source.asm”. Despite this error, the asm file seems to compile and run correctly.

    Thanks!

    smuaq said:
    August 19, 2013 at 1:37 pm

    Please explain this step in detail im a it confused as to put it in vcxporj or vcporj? i cant find vcporj. “Copy the contents of that file and use it to replace the contents of the default.vcproj in your wizard.”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s