Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dataset Designer Issue - Visual Studio 2008

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?

like image 247
Frustrating Developments Avatar asked Feb 04 '23 12:02

Frustrating Developments


1 Answers

Close your project. Edit the project.csproj file in XML mode. You will find an entry in the group that reads:

<None Include="*myDataSet*.xsd">
  <SubType>Designer</SubType>
  <Generator>MSDataSetGenerator</Generator>
  <LastGenOutput>*myDataSet*1.Designer.cs</LastGenOutput>
</None>

Change the item to remove the "1". Save and close the file. Reopen your project.

When you regenerate your dataset, it should be back to normal.

like image 76
Suncat2000 Avatar answered Feb 16 '23 04:02

Suncat2000