即使我没有对项目进行任何更改,为什么我的数据库项目的 .dbmdl 文件也会发生变化?

发布于 2024-09-14 14:54:10 字数 526 浏览 3 评论 0原文

我遇到了一个小而奇怪的烦恼,似乎也发生在其他人身上(例如,查看 SEDE 的修订历史)。我在 Visual Studio 2010 中有一个可以正常工作的 SQL Server 2008 数据库项目。当我提交/签入源代码管理时,我被告知我的数据库项目的 .dbmdl 文件已更改,即使我没有对项目进行任何更改!

我不确定这些更改是通过构建我的解决方案(其中还包括 ASP.NET MVC 应用程序和单元测试项目)还是通过简单地打开 DB 项目来触发,但这有点烦人,并且会造成混乱源头控制。

是否可以阻止这些更改发生,或者删除 .dbmdl 文件?

I'm running into a small but weird annoyance that seems to be happening to other people, too (for example, check out the revision history of SEDE). I have a SQL Server 2008 database project in Visual Studio 2010 that works properly. When I go to commit/checkin to source control, I'm told that my DB project's .dbmdl file has changed, even when I've made no changes to the project!

I'm not sure if the changes are triggered by building my solution (which also includes an ASP.NET MVC application and a unit test project) or by simply opening the DB project, but this is getting kind of annoying and is creating clutter in source control.

Is it possible to stop these changes from occurring, or get rid of the .dbmdl file whatsoever?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

牵你手 2024-09-21 14:54:11

如果删除 .dbml 文件,它会被重建,不会出现错误或警告,所以我认为它只是一个用于引用、智能感知等的缓存文件。我将把它从源代码管理中排除。

If you delete the .dbml file, it is rebuilt without errors or warnings, so I think it's just a cache file for references, intellisense, etc. I'm going to exclude it from source control.

苦行僧 2024-09-21 14:54:11

我相信每次打开项目时 Visual Studio 都会序列化 dbmdl 文件。唯一可能的解决办法是保持项目开放。

I believe Visual Studio serializes the dbmdl file every time the project is opened. The only possible work around would be to keep the project open.

秋日私语 2024-09-21 14:54:11

请参阅此处相关问题。 .dbmdl 文件对于每个用户都是唯一的(以及某种缓存,如上所述),因此正确的解决方案确实是将其从源代码管理中排除。

See related question here. The .dbmdl file is unique per user (and some kind of cache, as said above) and so the right solution is indeed to exclude it from source control.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文