Invoke xsd.exe thru code
-
Hi.. How to invoke the xsd.exe thru code?.. And also How do u i know the location in which the visual studio is installed. Thanks in advance.
N.Navaneethan
You should be able to use the Process.Start to call it. Looking at the shortcut from the .net command prompt that knows about the xsd.exe program It has this for .net 2.0: %comspec% /k ""C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat"" x86 and this for .net 1.1: %comspec% /k "C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\vsvars32.bat" So if you call that then you could call the xsd.exe with what ever parameters. Hope that helps. Ben
-
You should be able to use the Process.Start to call it. Looking at the shortcut from the .net command prompt that knows about the xsd.exe program It has this for .net 2.0: %comspec% /k ""C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat"" x86 and this for .net 1.1: %comspec% /k "C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\vsvars32.bat" So if you call that then you could call the xsd.exe with what ever parameters. Hope that helps. Ben
-
Hi,... The installation path need not be c:\... How do i find the installation path if it is in some other location?
N.Navaneethan
You just need to start the command shell with those commands. After the command shell is started you can change to any mapped drive you want. The important thing about starting the command shell this way is that the command shell knows what xsd.exe is which is important. Hope that helps. Ben