0

I maintain an old winforms application, which was at some point before my time decompiled after the source code was lost.

I've been able to work around most changes and additions by copying existing code and modifying it to suit.

But with the problem I'm currently stuck on (related to setting up functions to interact with a new table), every solution I can find refers to the dataset designer. The project does not contain any (.xsd) design files as referred to in so many 'answers' I've seen.

The only questions I can find related to missing designer files seem to be accidental deletions and are usually either unresolved or resolved by retrieving it from source control.

The project does have:

"MasterDataSet.cs"

and a bunch of "sometableTableAdapter.cs"

Which is generated code, (apart from modifications made to work around the lack of a designer) which should in theory have designer files associated with them, if I understand correctly?

So, my question, I suppose goes like this:

Is there any way to generate new .xsd designer files tied to these generated files using the existing code?

I've attempted to make a new dataset but it always fails with

"An Error occurred while creating the new data source: could not get type information for datasetname"

And I'm not even sure if this is the correct approach...

This does create a new set of files

Datasetname.xsd

Datasetname.Designer.cs

Datasetname.xsc

Datasetname.xss

But the latter two contain no code. Since I have no existing files of this type, I do not know what they are supposed to contain, if anything!

Community
  • 1
  • 1
Ego Placebo
  • 157
  • 2
  • 14

1 Answers1

0

Please check below links:

  1. How to create a xsd schema from a class with well explained solution to your problem.
  2. Microsoft document for tool used (Xsd.exe) in above solution

since you already have auto generated class this solution should help you.

  • This looks promising, thanks! Haven't had success yet; getting a "cannot generate schemas because no suitable types were found" so I'll see if I can figure that out and report back if this eventually does the trick! – Ego Placebo Aug 19 '19 at 07:26
  • I got the file generated in the end, however it didn't seem to find the tableadapters, which was the crucial part so sadly I'm back to trying to edit this stuff manually lol! – Ego Placebo Aug 20 '19 at 05:34