问题描述
有人看过吗?我有一个很大的Visual Studio项目,该项目不断将[Subtype]Designer[/Subtype]
添加到我的.vcproj
中,然后在项目的下一次打开和关闭时将其删除. StoredImageControl.cs
中仅定义了一个类.任何人都知道如何关闭它,因为它确实弄乱了我的修订控制.
Anyone see this before? I have a large Visual Studio project that keeps adding [Subtype]Designer[/Subtype]
to my .vcproj
then removing it on the next open and close of the project. There is only one class defined in StoredImageControl.cs
. Anyone know how to shut this off as it is really messing up my revision control.
在此之前:
<EmbeddedResource Include="StoredImageControl.resx">
<DependentUpon>StoredImageControl.cs</DependentUpon>
</EmbeddedResource>
这是在
<EmbeddedResource Include="StoredImageControl.resx">
<DependentUpon>StoredImageControl.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
推荐答案
这可能与您在已保存的解决方案状态下打开的文件有关.我在VS2010中遇到此问题,发现如果在编辑器中打开.xml文件时关闭解决方案,则在随后重新打开解决方案时,包含该.xml文件的项目将获得此<SubType>Designer</SubType>
行已添加.但是,如果我在未打开该文件的情况下关闭解决方案,则不会尝试在随后的重新打开操作中添加该行.
This might be related to what files you have open in the saved solution state. I ran into this problem in VS2010 and found that if I close the solution while an .xml file was open in the editor, then on the subsequent re-open of the solution, the project containing that .xml file would get this <SubType>Designer</SubType>
line added. If I close the solution without that file open, though, it does not try to add that line on the following re-open.
这篇关于< Subtype> Designer</Subtype>添加,然后在加载/卸载时由Visual Studio删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!