views:

400

answers:

2

In VS 2008 / SDK 6.0 I used the /t option of the XSD utility to automatically generate XSD files from existing assemblies / classes. With VS 2010 and SDK 7.0 this isn’t working any longer, because the XSD.EXE can’t process the new Framework 4.0 assemblies. It stated to be a Framework 2.0 tool and can’t process assemblies of newer runtimes.

Where is my mistake?

+1  A: 

It sounds like you are using xsd.exe that came with VS 2008 to create xsd files for .net 4 assemblies. Should you not be using the version that came with VS 2010

Ben Robinson
No, but your answer leads me to the right solution. I used the xsd.exe that came with VS 2010 to create xsd files for .net 2 assemblies! +1 for that :-)
Dirk
A: 

A second opinion (Ben Robinson), a closer look and there is the answer to my own question:

There are two XSD tools coming with VS 2010!

Microsoft SDKs/Windows/v7.0A/bin/xsd.exe – the XSD tool for the older frameworks

Microsoft SDKs/Windows/v7.0A/bin/NETFX 4.0 Tools/xsd.exe – the XSD tool for framework 4.0 assemblies

The first time I take the wrong one :-)

Dirk