18

I am using my class "Invoice" as a Data Source. But after adding more properties to it, Visual Studio refuses to refresh the data source and I can't find the new properties in my data source.

Tried restarting project, deleting and adding object as datasource again. Did not work.

OMGKurtNilsen
  • 5,048
  • 7
  • 27
  • 36

6 Answers6

19

Problem was Intellisense going out of date due to changes in the Data Source.

Solution was to simply to rebuild the project.

one.beat.consumer
  • 9,414
  • 11
  • 55
  • 98
OMGKurtNilsen
  • 5,048
  • 7
  • 27
  • 36
1

OMGKurtNilsen is right:

You don't need to delete and re-create the datasource - a project rebuild will do!

I tested it with a datasource in a VS 2010 project, that takes its data from a simple C# object.

Knasterbax
  • 7,895
  • 1
  • 29
  • 23
1

That problem ocurrs in report designer where use data source object, when i add or remove a property in my class and i refresh the data source in data panel on report data sources, this don't show last changes. I resolved adding reference to Microsoft.CShart assembly. You could try this to resolve you problem.

1

Are you using any source control ? also, .datasource file gets created under Properties folder, try to remove and re-add the object by opening Data Sources tab.

also your new properties in Invoice should have access modifiers (at least { get;} ) otherwise it might not show up AFAIK.

Nasreddine
  • 36,610
  • 17
  • 75
  • 94
Bek Raupov
  • 3,782
  • 3
  • 24
  • 42
0

This what you should do.

Refresh the Data Source, Remove the entity and Add it back in before it would change.

Ivan Rey
  • 177
  • 1
  • 1
  • 10
0

If you keep your datasource and your form element in different class libraries, sometimes you have to rebuild your class libraries, this situation mostly occurs when the reference bound with static way.

s.umutcan
  • 33
  • 6