Hello all
Apologies if I've picked the wrong forum, but can anybody offer assistance to me? I'm definitely struggling to get my first data access layer generated using the Dataset Designer in Visual Studio 2005. I just can't believe how difficult the process of generating a class library DLL from an XSD file is proving to be, I'm sure I'm not trying to do anything fancy, it seems like it should be very basic functionality to me, so I must be missing something obvious.
My problem is: I have an XSD file created natively in Visual Studio, its not imported from elsewhere or anything fancy, but I can't get it converted to a .vb file, which I believe is the right thing to be doing. So first of all, can I check I understand the process correctly:
1. Create XSD file using Dataset Designer
2. Choose 'Use Custom Tool' to start MSDataSetGenerator
3. MSDataSetGenerator should then create a .vb file
4. Then I can build the class library project to create the DLL
However, when I try to run MSDataSetGenerator, I get the following error:
"Custom tool error: Failed to generate code. Exception of type 'System.Data.Design.InternalException' was thrown."
and the error list complains about very many of the attributes within the XSD file, just a few here for example, although I'm not sure the specific attributes are the important thing here:
AllowDBNull is not declared
ProviderType is not declared
SchemaSerializationMode is not declared
DataAccessModifier is not declared
etc etc., and sure enough each and every one of the attributes is squiggled beneath, back in the code window.
It even complains about:
"The element cannot contain white space. Content model is empty"
before it finally gives up after the maximum errors.
I'm can't see how with the little amount of work I've managed to do so far, I've managed to corrupt a file that much. Is this some sort of referencing issue? How could all of the those attributes automatically generated by the DataSet generator cause so much trouble as soon as I try to generate the code from them?
Can anybody shed some light on what I'm doing wrong? Any advice would be enormously welcome!
Regards
Paul