Visual Studio won't update properties of my Data Source

12,023

Solution 1

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

Solution was to simply to rebuild the project.

Solution 2

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.

Solution 3

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.

Solution 4

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.

Share:
12,023

Related videos on Youtube

OMGKurtNilsen
Author by

OMGKurtNilsen

Updated on July 26, 2020

Comments

  • OMGKurtNilsen
    OMGKurtNilsen almost 4 years

    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.

    • AJG85
      AJG85 about 13 years
      Sounds like your intellisense was out of date. When odd things like this happen the first thing I do is a rebuild.
    • OMGKurtNilsen
      OMGKurtNilsen
      No error. Just won't show the new properties even after refreshing.
    • atrljoe
      atrljoe
      Are you getting an error? If So what is the error message?
  • Travis J
    Travis J over 12 years
    Visual Studio 2010 requires the project to be cleaned and rebuilt every time the data model changes for intellisense to work.
  • Bill Sambrone
    Bill Sambrone about 10 years
    Had a similar situation with VS2012. The cleaning was required, then the rebuild did the trick.
  • Elan Hasson
    Elan Hasson over 9 years
    In VS2013 Update 3 A rebuild wasn't enough. I had to restart VS.
  • ToastyMallows
    ToastyMallows over 9 years
    I'll second @ElanHasson, needed to rebuild and restart all VS instances.