I have been searching around and everyone provides just a simple answer
Right-click the project, Custom Build Rules, tick \"Microsoft Macro Assembler\
I had to right-click the .asm file first. MASM appeared in this context menu. After doing this, it appeared in the project's context menu as well. Seems like a issue with VS2015. Also, I am working on Windows 10 64-bit.
In order to get the 64-bit versions to compile, I had to set the Entry Point option for the linker to main and I also had to set the LARGEADDRESSAWARE:NO
option as well.
This option can be found in VS2013 Pro under
Configuration Properties->Linker->System->Enable Large Addresses
Choose "No" in the drop-down.
In my case I sorted this problem like this
choose tools > toolbox items > .NET framework components then select Assembly installer (VS C++ 2005 express)
Maybe this will useful:
file_name.asm
(in Solution Explorer)Properties
-> Configuration Properties
-> General
-> Item Type
Microsoft Macro Assembler
Go to Project (you'll find it in the top menu) > Build Customizations...
And check the masm option.
Further, in some cases (like when working with x64), the linker might have some problems finding main. To solve that, you need to manually create an entry point by:
It should work fine after this
Right-click the project, not the solution. Then Build Dependencies + Build Customizations. You get the dialog, tick "masm".