I used xsd.exe
to generate a schema file for some XML. I want to include that schema file in my C# project in Visual Studio, but every time I add the .xsd
file to my project and then double-click it to open it, Visual Studio creates these .xss
and .xsc
files for my .xsd
file, and it alters my .xsd
file. How can I get it to stop automagically doing this and altering my schema?
After generating the XSD file, open it in Notepad and update the following:
msdata:IsDataSet="false" (was true)
When you now import the file into Visual Studio, it shouldn't create the extra files.
More info here.
If you're okay with just dealing with the raw XML
Right-Click the XSD, choose Open With.
In the dialog, choose XML editor and Click 'Set as Default.'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With