Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the "xsd" command not supported in Visual Studio 2012 command window?

Tags:

I've read that it is possible to run xsd commands right in visual studio (2010). I have VS 2012 on my machine and when I run

xsd XMLFile.xml 

I get

Command "xsd" is not valid.

So, is the "xsd" command not supposted in VS 2012 and is there any other way to execute "xsd" in VS 2012?

like image 480
Aleksei Chepovoi Avatar asked Jan 26 '13 09:01

Aleksei Chepovoi


People also ask

How do I get the command window in Visual Studio?

The Command window is used to execute commands or aliases directly in the Visual Studio integrated development environment (IDE). You can execute both menu commands and commands that do not appear on any menu. To display the Command window, choose Other Windows from the View menu, and select Command Window.


2 Answers

xsd.exe is available from the 'Developer Command Prompt for VS2012, not the command window that is part of the VS2012 IDE.

The 'Developer Command Prompt for VS2012' itself can be started from Start Menu -> All Programs -> Microsoft Visual Studio 2012 -> Visual Studio Tools -> Visual Studio Command Prompt For VS2012

like image 179
Glenn Stevens Avatar answered Sep 21 '22 05:09

Glenn Stevens


Under Visual Studio 2012, there is a feature called Past Special which generate the class from an xml file.

Special Paste in VS 2012
See here: Paste XML or JSON as classes in Visual Studio.

Note that this feature requires at least .NET 4.5.

like image 34
hdoghmen Avatar answered Sep 21 '22 05:09

hdoghmen