The Problem:
In short, the problem occurs when the MSDataSetGenerator
tool runs, but the System.Data.DataSetExtensions
assembly has not yet been loaded into the current Visual Studio process.
The Solution:
One way to load the assembly is just to open any XSD file and THEN re-generate the designer code.
The following steps should generate the appropriate designer file:
- Open any XSD file to the designer view (this loads
DataSetExtensions.dll
) - Right Click on the XSD and Select
Run Custom Tool
Here's a full step by step walkthrough with pictures of the issue and solution
Other Instances:
This problem has been reported to Microsoft in the following bug tickets:
- #668724 - MSDataSetGenerator generates incorrect output sometimes
- #733077 - MSDataSetGenerator does not generate TypedTableBase derived classes
It is also addressed in the SO Question: