Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specify MSDataSetGenerator tool version to use?

I am attempting to upgrade a VS 2008 project to work in VS 2010, there are lots of .xsd files that generate a typed dataset using the Custom Tool MSDataSetGenerator

The build works fine in 2008, but when building in 2010 it generates hundreds of errors, presumably because the MSDataSetGenerator it is using in 2010 is different than the one that VS 2008 uses. Is it possible to tell 2010 to use the same tool version as 2008?

I get errors such as

The type 'XXX' already contains a definition for 'YYY'

Ambiquity between 'XXX' and 'XXX'

In the generated designer.cs file 2010 shows:

// This code was generated by a tool. // Runtime Version:4.0.30319.17020

[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]

2008 shows:

// This code was generated by a tool. // Runtime Version:2.0.50727.3053

[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]

like image 370
BrandonAGr Avatar asked Jun 23 '26 18:06

BrandonAGr


1 Answers

It turns out that this was a result of

  • Namespace being changed when VS2010 converted the projects, I was able to go in to properties and set the Custom Tool Namespace to what the namespace needed to be for those files whose namespace was different than the folder they were placed in
  • Because of incorrect csproj structure VS generated a second *.Designer.cs file in addition to one that already existed. The issue was the original Designer.cs was dependent on the .cs file instead of the .xsd file, by deleting the duplicate it would then compile

So the MSDataSetGenerator used by 2010 works fine after making those fixes

like image 161
BrandonAGr Avatar answered Jun 26 '26 07:06

BrandonAGr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!