sqlmetal.exe not found

The machine must have one or both of the most recent versions of the .NET Framework installed (either 3.0 or 3.5 I'm not sure which introduced sqlmetal.exe).

Additional information is available on MSDN:

The SQLMetal file is included in the Windows SDK that is installed with Visual Studio. By default, the file is located at drive:\Program Files\Microsoft SDKs\Windows\vn.nn\bin. If you do not install Visual Studio, you can also get the SQLMetal file by downloading the Windows SDK.


On my machine it's at "C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\SqlMetal.exe". You could look there for it, and/or once you find it make sure its location is in your PATH environment variable.


in 2019 you can find it at C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7 Tools.

Hope it helps for others