views:

268

answers:

2

The only referenced assembly from the 3.5 framework in my project was System.Data.DatasEtextensions

What i get now, is 102+ errors after swiching the target framework from 3.5 to 2.0 in visual studio.

Of course the project is not compiled anymore and my typed dataset seems to be destroyed. What can i do?

Here are some of the errors just for reference

Error   1 Type 'System.Data.TypedTableBase' is not defined.
Error   2 function 'Clone' cannot be declared 'Overrides' because it does not override a function in a base class.
Error   3 function 'CreateInstance' cannot be declared 'Overrides' because it does not override a function in a base class.
A: 

System.Data.Datasetextensions is not something that was in 2.0. It was an addition in 3.5, so really the only solution you have is to refactor your code, unfortunately.

I would suggest isolating all the 3.5 related code into a separate assembly, then creating a new assembly to mirror that assembly but targetting 2.0. That way if you ever go back to 3.5 you can reuse the 3.5 code.

Joseph
+1  A: 

You need to re-generate the automatically generated code for your datasets.

Make sure the "Custom Tool" property for your xsd file reads "MSDataSetGenerator".

Right-click your xsd file and in the context-menu click "Run Custom Tool".

If this does not succeed right-away, try deleting the Designer.cs under your xsd file and repeat "Run Custom Tool".

YOU ARE MY HERO!
Chocol8