新表属性未反映到ApplicationDataObjectContext

编程入门 行业动态 更新时间:2024-10-26 02:32:02
本文介绍了新表属性未反映到ApplicationDataObjectContext-DataClientImplementation错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

(VS2013 upd 4,LS VB Project) 只是为了提前澄清,我通过良好的旧清理/重建解决了这个问题,但是每次在现有表中添加新属性时,我都会在每个最近使用的项目中(而不是在较旧的项目中)收到此错误: 类'< EntityName>'必须实现阴影属性< PropertyName>为< PropertyType>'接口'< EntityName> .DetailsClass.IImplementation' < EntityName>中的简单属性与关系/导航属性相同.类(在ApplicationDataObjectContext.vb文件中)总是缺少新的属性定义. 我可以创建新表,并成功构建并运行它,但是如果以后再向该新表中添加属性,则会出现相同的错误. 清理/重建解决方案后,错误消失了,但是当我在客户端屏幕上更改某些内容时,我得到: 类'ApplicationData'必须声明为'MustInherit'或重写以下继承的'MustOverride'成员: Microsoft.LightSwitch.ClientGenerated.Implementation.DataServiceContext: 受保护的MustOverride函数CreateEntityImplementation(Of as Microsoft.LightSwitch.IEntityObject)()作为Microsoft.LightSwitch.Internal.IEntityImplementation Microsoft.LightSwitch.ClientGenerated.Implementation.DataServiceContext: 受保护的MustOverride子InitializeDataServiceContext() 随之而来的是很多错误. 再次,清理/重建,一切正常. 没有项目升级,没有RIA服务,没有外部数据源,没有VS的最新更新,项目文件夹上没有用户访问问题. 破坏性服务器项目对Microsoft.Lightswitch.dll 10.0.12.1版,较旧的工作项目10.0.12.0版的引用. 有人建议总是清理/重建真的很痛苦吗?

(VS2013 upd 4, LS VB Project) Just to clarify in advance, I solve this problem with good old clean/rebuild but I get this error in every recently used project, not in older projects, every time I add a new property in existing Tables: Class '<EntityName>' must implement 'Shadows Property <PropertyName> as <PropertyType>' for interface '<EntityName>.DetailsClass.IImplementation' It's the same for simple properties as for relations/navigation properties, in <EntityName> Class (in ApplicationDataObjectContext.vb file) new property definition is always missing. I can create new Table, build and run successfully, but if later I add a property to this new Table I get the same error. After clean/rebuild solution the error disappears but as I change something on Client screens I get: Class 'ApplicationData' must either be declared 'MustInherit' or override the following inherited 'MustOverride' member(s): Microsoft.LightSwitch.ClientGenerated.Implementation.DataServiceContext : Protected MustOverride Function CreateEntityImplementation(Of T As Microsoft.LightSwitch.IEntityObject)() As Microsoft.LightSwitch.Internal.IEntityImplementation Microsoft.LightSwitch.ClientGenerated.Implementation.DataServiceContext : Protected MustOverride Sub InitializeDataServiceContext() Followed by a lot of consequent errors. Again, a clean/rebuild and everything works. No project upgrade, no RIA services, no external Data Source, no recent updates to VS, no user access problems on project folder. Breaking server projects reference to Microsoft.Lightswitch.dll v. 10.0.12.1, older working projects v. 10.0.12.0. Is really painful always going clean/rebuild, any suggestion?

================================================ ========================

========================================================================

Microsoft Visual Studio Professional 2013 版本12.0.31101.00更新4 Microsoft .NET Framework 版本4.5.51650 安装的版本:Professional 适用于Visual Studio 2013的LightSwitch 06177-004-0444002-02347 适用于Visual Studio 2013的Microsoft LightSwitch Visual Basic 2013 06177-004-0444002-02347 Microsoft Visual Basic 2013

Microsoft Visual Studio Professional 2013 Version 12.0.31101.00 Update 4 Microsoft .NET Framework Version 4.5.51650 Installed Version: Professional LightSwitch for Visual Studio 2013 06177-004-0444002-02347 Microsoft LightSwitch for Visual Studio 2013 Visual Basic 2013 06177-004-0444002-02347 Microsoft Visual Basic 2013

Marco

推荐答案

没有建议.我只会补充说,对于RIA服务而言,更新数据源向导已损坏甚至更糟. 如果您更改了RIA服务使用的POCO类,则向导将不会进行更改,除非您完全删除该实体,清理, 重建所有内容,等等,然后再添加回去,这将破坏可能引用了它的所有代码或屏幕.维护架构是LightSwitch 应该 擅长的事情,但不是... No suggestions. I will just add that the update datasource wizard is broken even worse for RIA services. If you change a POCO class used by a RIA service, the wizard will not pick up the changes unless you completely remove the entity, clean, rebuild all, etc. and then add it back, which consequently ruins any code or screens that may have referenced it. Maintaining schema is something that LightSwitchshould be great at, but it's not...

更多推荐

新表属性未反映到ApplicationDataObjectContext

本文发布于:2023-11-10 06:36:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1574626.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:属性   ApplicationDataObjectContext

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!