42

I have used the xsd.exe utility in Visual Studio 2003 and 2008 to generate typed datasets from a 3rd party XSD file. The third party has changed their schema so I need to regenerate the datasets but I can't find XSD.EXE.

The win8 search gives me information about the utility but not where it is, I tried a search in Windows explorer and didn't get any results.

I read posts regarding Win7/VS 2008 that say it is part of the WinSDK but I can't find it in that folder either.

Some poster say it now needs to be downloaded but from where. I am running 64 bit Windows 8 pro and Visual Studio 2013 Ultimate.

bigmike7801
  • 3,908
  • 9
  • 49
  • 77
user3010967
  • 421
  • 1
  • 4
  • 3

5 Answers5

77

Once you have the SDK installed * (either Manually, or with Visual Studio), you'll find it in the following directories:

SDK 8 and later

There is an an additional FX version subdirectory:

%programfiles(x86)%\Microsoft SDKs\Windows\{ver}\bin\{FXVer} Tools

Where

  • {ver} is the SDK version (e.g. v8.1A)
  • and {FXVer} is the applicable .Net Framework version, e.g. NETFX 4.0v

e.g.

C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools 

SDK 7 and lower

%programfiles(x86)%\Microsoft SDKs\Windows\{ver}\Bin\

Where {ver} is the SDK version (e.g. v7.0A)

On a 32 bit O/S, replace %programfiles(x86)% with %programfiles%

* Wikipedia maintains a fairly recent set of download links to the various SDK versions - scroll to the bottom of the table for recent ones.

StuartLC
  • 104,537
  • 17
  • 209
  • 285
  • For quick reference, on Win 7, the .NET 4 version of the XSD tool is found at "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools" (given that windows is installed at the default location) – Sudhanshu Mishra Nov 12 '15 at 23:11
  • 1
    Win10 C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools – SimplyInk Jan 22 '16 at 04:32
  • 1
    https://msdn.microsoft.com/en-us/library/x6c1kb0s(v=vs.110).aspx ... all the documentation you want on how to use it - none on where to find it! Good job MS! *facepalm* – maplemale Apr 10 '17 at 22:27
  • I found that it was insufficient to have just the Windows xxx SDK installed. I added the "Games and Graphics" individual component "Unreal Engine installer", which pulled in a bunch of other individual components. Only then did "...SDKs\Windows\v10.0A..." path show up with the corresponding xsd.exe installed. Not sure which of those components actually caused this to exist. – Bryn Wolfe Feb 12 '19 at 20:34
5

This is part of the Windows SDK. I know that you can download the Windows 7 SDK for .NET 4.0 and the files will be installed and will be fully functional on Windows 8. (It is installed in C:\Program Files (x86)\Microsoft SDKs\Windows?version?\bin\NETFX 4.0 Tools where version will be OS version like v8 or similar)

http://www.microsoft.com/en-us/download/details.aspx?id=8279

You may also find the xsd application as part of the full SDK.

For Windows 8: http://msdn.microsoft.com/en-us/windows/desktop/hh852363.aspx
For Windows 8.1: http://msdn.microsoft.com/en-us/windows/desktop/bg162891.aspx
Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
HeXanon
  • 514
  • 1
  • 8
  • 12
3

Add the following to your environment variable PATH:

C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools

  • Go to C:\Program Files (x86)\Microsoft SDKs\Windows\
  • Click latest version (e.g. v10.0A)
  • Click Bin
  • Select latest .NET Version e.g. NETFX 4.7.2 Tools
  • There is xsd.exe

Run via command line using xsd /c filename.xsd

Nick N.
  • 12,902
  • 7
  • 57
  • 75
1

If you have Visual Studio installed, then you may locate Developer Command Prompt (it is a shortcut in Start menu, or it should be available from VS IDE). A cmd window opens and you are able to run xsd.exe from it.

Ivan P.
  • 832
  • 2
  • 9
  • 26
-2

Someone has posted a zip file with xsd.exe (from 2011) and xsd.exe.config on his personal web site:

(https://juliankay.com/development/download-xsd-exe/).

Download of the zipfile worked for me in 03/2017 .

Output (on Linux, with Mono Support built into the kernel):

/home/knut/bin/xsd.exe /?
WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v4.0.30319
Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework, Version 2.0.50727.3038]
Copyright (C) Microsoft Corporation. All rights reserved.

xsd.exe -
    Utility to generate schema or class files from given source.
knb
  • 9,138
  • 4
  • 58
  • 85
  • 1
    Are you suggesting to use an exe without license, and / or with the risk of malware? – Roland Feb 18 '21 at 15:00
  • 1
    Yes. As far as I remember, the xsd.exe is a small binary and It is part of an earlier release of the Resource Kit which used to have a liberal license. - Downloading .exe files from some random site - that was and is quite common. - Malware checks are left as an exercise for the user. (Try in a virtualised computer first). – knb Feb 19 '21 at 11:23