[英]Global Section inside Solution File (.sln) of Visual Studio Solution secret?
Recently I was trying to load a solution source controlled by TFS but some projects in that solution were not being loaded in solution explorer inside visual studio. 最近我试图加载由TFS控制的解决方案源,但该解决方案中的一些项目没有加载到visual studio内的解决方案资源管理器中。 After spending hours of my time, for temporary reason when I deleted the whole "Global Section" at the end of .sln (solution file) by manually editing it in a notepad and restarted Visual Studio, all projects appeared as expected. 花了几个小时的时间,暂时的原因,当我在.sln(解决方案文件)的末尾删除整个“全局部分”时,通过在记事本中手动编辑并重新启动Visual Studio,所有项目都按预期显示。 I am using VS 2008. It hasn't shown any odd behavior yet, but couldn't understand the reason. 我正在使用VS 2008.它还没有表现出任何奇怪的行为,但无法理解原因。
Does "Global Section" in solution file play and important role? 解决方案文件中的“全局部分”是否起作用和重要作用? Any harm in removing global section? 删除全局部分有什么害处?
Well, you just deleted any source control bindings, plus build configuration and some solution-specific settings. 好吧,您刚刚删除了任何源代码控制绑定,以及构建配置和一些特定于解决方案的设置。
VS should revert to defaults if it doesn't find the section, though I suppose it would have been better if you knew just what was causing the issue. 如果它没有找到该部分,VS应该恢复为默认值,但我想如果你知道导致问题的原因会更好。 If the problem was with TFS then maybe resetting that fixed the problem. 如果问题出在TFS上,那么可能会重置修复问题。
As to harm, again, if VS is able to cope with the removal of the section and can revert to defaults then I see no harm. 至于伤害,再次,如果VS能够应对删除该部分并且可以恢复到默认值,那么我认为没有任何伤害。 Of course you might lose configuration information, which will have to be re-applied. 当然,您可能会丢失必须重新应用的配置信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.