简体   繁体   中英

Visual Studio won't update properties of my Data Source

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.

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

Solution was to simply to rebuild the project.

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.

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.

This what you should do.

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

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.

如果将数据源和表单元素保存在不同的类库中,有时您必须重建类库,这种情况主要发生在以静态方式绑定引用时。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM