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?
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 version :-)
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
精彩评论