views:

605

answers:

2

Whenever i try to run sqlmetal, i get this:

'sqlmetal' is not recognized as an internal or external command, operable program or batch file

this is from both CMD and the Visual Studio Command Prompt

I've used sql metal many times on other machines, however it doesn't seem to work on this machine...

Am i missing something?

+1  A: 

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.

Marc S
+1  A: 

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.

Ray Vernagus