It may look silly to ask this question but tricky for me to know the technical reason behind, so you might share with me the actual reason ;)
问这个问题可能看起来很傻,但对我来说知道背后的技术原因很棘手,所以你可能跟我分享实际的原因;)
Why when using Visual Studio I check out a single file of all files related to an aspx page (.aspx, .aspx.vb, aspx.designer.vb) then in my pending changes I see all the files are checked out!?
为什么在使用Visual Studio时我查看了与aspx页面相关的所有文件的单个文件(.aspx,.aspx.vb,aspx.designer.vb),然后在我挂起的更改中,我看到所有文件都已签出!?
for example I just do small change e.g. an attribute in login.aspx then in pending changes will see login.aspx.vb and login.aspx.designer.vb are checked out and when compare them with previous version NO CHANGE can be found in them?
例如,我只做一些小改动,例如在login.aspx中的一个属性然后在挂起的更改中将看到login.aspx.vb和login.aspx.designer.vb被检出并且将它们与之前的版本进行比较时可以在它们中找到NO CHANGE?
2 个解决方案
#1
To put it simply, in Visual Studio multiple files can represent a single 'resource' such as a form or a web page. Some of these files are generated automatically by the IDE, and generally contain code which isn't intended to be edited manually.
简单地说,在Visual Studio中,多个文件可以表示单个“资源”,例如表单或网页。其中一些文件由IDE自动生成,通常包含不打算手动编辑的代码。
For example, in a WinForms project, the form.vb
file will contain all of the methods you're used to seeing, and writing code in, while the form.Designer.vb
file has IDE generated code that declares and positions the various controls that have been placed on the form in the designer.
例如,在WinForms项目中,form.vb文件将包含您用来查看和编写代码的所有方法,而form.Designer.vb文件具有IDE生成的代码,用于声明和定位各种控件已被放置在设计师的表格中。
These two files represent code for the same resource (a form), but are kept separate to keep inexperienced programmers from making detrimental changes [easily], and to keep your user generated code cleaner. Naturally, though, since they are merely pieces of a whole, editing one affects the other.
这两个文件代表相同资源(表单)的代码,但是保持独立以防止没有经验的程序员[轻松]进行有害的更改,并保持用户生成的代码更清晰。当然,由于它们只是整体的一部分,编辑一个会影响另一个。
For a detailed list of file types in Visual Studio, have a look here.
有关Visual Studio中文件类型的详细列表,请查看此处。
#2
If you are using TFS as your Source Control... Check what settings you have for Source Control... I'm still using 2010 as I still have to develop in XP. In Team --> Team Project Settings --> Source Control you will see some options. In the Check-Out Settings tab I have the Enable Multiple Checkout option checked and Enable Get Latest On Check-Out is unchecked. This has allowed me to checkout single 'resources' at a time. As mentioned above certain files are grouped and editing one will check-out the group.
如果你使用TFS作为你的源代码控制...检查你有什么设置来源控制...我仍然使用2010年,因为我仍然需要在XP中开发。在团队 - >团队项目设置 - >源代码管理中,您将看到一些选项。在Check-Out Settings选项卡中,我选中了Enable Multiple Checkout选项,并取消选中Enable Get Latest On Check-Out。这让我可以一次查看单个“资源”。如上所述,某些文件被分组,编辑一个将签出该组。
#1
To put it simply, in Visual Studio multiple files can represent a single 'resource' such as a form or a web page. Some of these files are generated automatically by the IDE, and generally contain code which isn't intended to be edited manually.
简单地说,在Visual Studio中,多个文件可以表示单个“资源”,例如表单或网页。其中一些文件由IDE自动生成,通常包含不打算手动编辑的代码。
For example, in a WinForms project, the form.vb
file will contain all of the methods you're used to seeing, and writing code in, while the form.Designer.vb
file has IDE generated code that declares and positions the various controls that have been placed on the form in the designer.
例如,在WinForms项目中,form.vb文件将包含您用来查看和编写代码的所有方法,而form.Designer.vb文件具有IDE生成的代码,用于声明和定位各种控件已被放置在设计师的表格中。
These two files represent code for the same resource (a form), but are kept separate to keep inexperienced programmers from making detrimental changes [easily], and to keep your user generated code cleaner. Naturally, though, since they are merely pieces of a whole, editing one affects the other.
这两个文件代表相同资源(表单)的代码,但是保持独立以防止没有经验的程序员[轻松]进行有害的更改,并保持用户生成的代码更清晰。当然,由于它们只是整体的一部分,编辑一个会影响另一个。
For a detailed list of file types in Visual Studio, have a look here.
有关Visual Studio中文件类型的详细列表,请查看此处。
#2
If you are using TFS as your Source Control... Check what settings you have for Source Control... I'm still using 2010 as I still have to develop in XP. In Team --> Team Project Settings --> Source Control you will see some options. In the Check-Out Settings tab I have the Enable Multiple Checkout option checked and Enable Get Latest On Check-Out is unchecked. This has allowed me to checkout single 'resources' at a time. As mentioned above certain files are grouped and editing one will check-out the group.
如果你使用TFS作为你的源代码控制...检查你有什么设置来源控制...我仍然使用2010年,因为我仍然需要在XP中开发。在团队 - >团队项目设置 - >源代码管理中,您将看到一些选项。在Check-Out Settings选项卡中,我选中了Enable Multiple Checkout选项,并取消选中Enable Get Latest On Check-Out。这让我可以一次查看单个“资源”。如上所述,某些文件被分组,编辑一个将签出该组。