views:

931

answers:

2

We're using a dataset to throw a small amount of data around amongst various nodes within our application.

The dataset is in an assembly by itself as it is reference from many other components.

The Visual Studio dataset tool has developed a strange habit of creating a new designer everytime a build is done.

So, the project looks like this

MyDataSet.xsd
 - MyDataSet.cs
 - MyDataset.designer.cs
 - ....

Then a build is performed and the result is

MyDataSet.xsd
 - MyDataSet.cs
 - MyDataset.designer.cs
 - MyDataset1.designer.cs
 - ....

The MyDataSet1 designer contains the new changes and the original designer is unchanged. My current solution is to replace MyDataset.designer with MyDataset1.designer then rebuild.

Its a minor inconvenience but if anyone makes a change and doesn't perform the above the resulting assembly doesn't contain their changes.

Any suggestions, other than not using datasets?

A: 

I have had this problem once but don't remember exactly how I fixed it.

I believe I did :

  • Delete all de *.cs files behind the XSD (they are generated so no probl). You can do this from the solution explorer.

I that is not enough..

  • Delete all *.cs files behind the XSD and then remove the esd from the project. (copy it to a backup location) And then add it bij "add existing file" from backup location.
Julian de Wit
A: 

From what I understand, you can right-click on the data set in the Data Sources tab. Hit the Configure Dataset with wizard and choose the new or modified data objects, and you should be good to go.

Justin