无法运行...错误
在 VS2k8 prj 上的 .tt 上运行“运行自定义工具”后,我无法运行我的程序。显示 8 个错误,例如:
错误 23 类型“SouthWind.LanguageText”已包含“KeyName”C 的定义:\Documents and Settings\Administrador\Meus documentos\Visual Studio 2008\Projects\WindowsFormsApplication4\WindowsFormsApplication4\ActiveRecord.cs 41320 23 WindowsFormsApplication4
错误 30 “SouthWind.LanguageText.KeyName()”和“SouthWind.LanguageText.KeyName”之间存在歧义 C: \Documents and Settings\Administrador\Meus documentos\Visual Studio 2008\Projects\WindowsFormsApplication4\WindowsFormsApplication4\ActiveRecord.cs 41243 25 WindowsFormsApplication4 ... ...和其他人
我的数据库有问题吗?你能帮助我吗?使用 MS SQL 2008
我还想知道是否需要创建新表/列,是否应该再次运行 .tts 来更新类?
我是 OR/M 新手!谢谢
After running "Run Custom Tool" on the .tt dropped on my VS2k8 prj I'm not able to run my program.. shows 8 errors like:
Error 23 The type 'SouthWind.LanguageText' already contains a definition for 'KeyName' C:\Documents and Settings\Administrador\Meus documentos\Visual Studio 2008\Projects\WindowsFormsApplication4\WindowsFormsApplication4\ActiveRecord.cs 41320 23 WindowsFormsApplication4
Error 30 Ambiguity between 'SouthWind.LanguageText.KeyName()' and 'SouthWind.LanguageText.KeyName' C:\Documents and Settings\Administrador\Meus documentos\Visual Studio 2008\Projects\WindowsFormsApplication4\WindowsFormsApplication4\ActiveRecord.cs 41243 25 WindowsFormsApplication4
...
... and others
Any problem on my DB? Can you help me? Using MS SQL 2008
I'd also like to know if there's a need to create a new table/column, should the .tts runs again to update the classes?
I'm a OR/M newbie! Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
KeyName 是 IActiveRecord 接口中方法的名称,因此这可能与 LanguageText 表中的列名称冲突。如果您重命名该列,那么应该没问题。
重命名该列后,您将需要再次运行 .tt 文件才能使更改生效。
KeyName is the name of a method in the IActiveRecord interface so this is probably conflicting with the name of a column in your LanguageText table. If you rename the column then you should be OK.
Once you're renamed the column you will need to run the .tt files again for your changes to be picked up.