VS 2008 WinForms 与 SourceSafe
我们正在使用 Visual Studio 2008 开发一个存储在 Visual Source Safe 2005 中的 winforms 应用程序。
如果我们的一位团队成员更改了 *.Designer.cs 文件而不更改表单的源文件,则在“获取”操作期间不会出现更改。 但是,如果在 Visual Studio 中对 *.Designer.cs 文件运行比较,差异将显示在差异查看器中。
仅供参考:我们使用 Visual Studio 的默认 Microsoft Visual SourceSafe 插件。
任何想法为什么“获取”操作不会检测 *.Designer.cs 文件中的更改并建议我们下载最新版本?
感谢您的帮助!
We are using Visual Studio 2008 to develop a winforms application stored in Visual Source Safe 2005.
If one of our team members changes a *.Designer.cs file without changing the form's source file the change doesn't appear during a "Get" operation. However, if in Visual Studio you run a compare on the *.Designer.cs file the differences are displayed in the difference viewer.
FYI: We are using the default Microsoft Visual SourceSafe plug in for Visual Studio.
Any ideas why the "Get" operation will not detect changes in the *.Designer.cs files and suggest we pull down the latest version?
Thanks for your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
设计器文件不适合手动操作。 事实上,向流行的 .Net 语言添加部分类的主要动机之一是将设计者生成的代码与手动用户代码分开。 手动操作重复生成的代码(几乎在任何环境中,而不仅仅是 Visual Studio)都是令人头痛的。
您对设计器文件进行了哪些更改,为什么无法对非设计器源文件进行这些更改?
编辑:
IDE 中的项目是否正确绑定并连接到源代码控制数据库(通过文件 -> 源代码控制 -> 更改源代码控制)? 当在设计器视图中进行更改时,它应该自动检出设计器文件。
Designer files are not intended for manual manipulation. One of the chief incentives for adding partial classes to the popular .Net languages was to segregate the designer-generated code from manual user code, in fact. Manual manipulation of repeatedly-generated code (in pretty much any environment, not just visual studio) is asking for headaches.
What changes are you making to the designer file, and why is it not possible to make those changes to the non-designer source file?
Edit:
Is the project in the IDE properly bound and connected to the source control database (via File->Source Control->Change Source Control)? It should automatically be checking out the designer files when changes are made in the designer view.
我会尝试通过 VSS Explorer(即不是通过 Visual Studio)手动获取,看看它是否有效。 如果没有,请检查该文件是否固定到以前的版本。
I would try doing a Get manually through VSS Explorer (i.e. not through Visual Studio) and see if it works. If not, check to see if the file is pinned to a previous version.
不幸的是,您不得不使用 SourceSafe。 在我的上一份工作中,我们使用了 SourceSafe,但遇到了很多问题。 我们改用 Surround SCM,对此感到非常满意。 在那份工作之前我从未听说过它。
为了回答你的问题,每当我遇到这样的 SS 问题时,我都会执行“强制获取”:在获取最新版本时的选项对话框中,告诉 SourceSafe 从服务器获取最新版本,无论它是否认为该文件是最新的。
编辑:我认为问题是 VSS 的 VS200X 插件。 如果您有 VSS 独立应用程序,您应该能够从那里进行强制获取。 我现在记得必须经常这样做,以至于我停止使用 VS200X 插件。
Woe unto you for having to use SourceSafe. At my last job, we used SourceSafe and had a myriad of problems with it. We switched over to Surround SCM and were really happy with it. I'd never heard of it before that job.
To answer your question, any time I ran into a problem like this with SS, I'd do a "forced get": in the options dialog when you get latest, tell SourceSafe to get the latest version from the server regardless of whether it thinks the file is up to date.
Edit: I think the issue is the VS200X plugin for VSS. If you have the VSS standalone application you should be able to do a forced get from there. I now remember having to do this so often that I stopped using the VS200X plugin.