Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
每次我在更新或添加新的数据库对象后保存我的 dbml 文件时,都会创建一个新的 Designer.cs 文件,而旧的设计器保持不变。我相信 dbml 已损坏,但不确定解决方案。谷歌似乎也不是特别有帮助。任何帮助表示赞赏。
起初,每次更改模型上的某些内容时都会生成一个新的代码文件,这听起来很正常。
但是因为您说“旧设计器保持不变”,所以我假设新的 Designer.cs 文件在其文件名中有一些扩展名,以将其与旧设计器区分开来。一个目录中不能有两个同名文件。您是否检查过旧的设计器文件不是只读的?也许是由于您使用了一些文件版本控制系统。
在完美的世界中,我认为您在这种情况下会收到错误消息,但是对于您永远不知道的计算机。