Why does Visual Studio 2010 randomly alter the project files for web.configs? [duplicate]
Asked Answered
R

1

6

Why does Visual Studio 2010 randomly alter the project files for web.configs?

Using Mercurial I frequently see in commit windows diffs that are

-    <Content Include="Admin\Web.config" />

+    <Content Include="Admin\Web.config">
+      <SubType>Designer</SubType>
+    </Content>

That it will constantly flip the sub types to exist or not exist.

Rightward answered 25/2, 2011 at 17:54 Comment(1)
Do you have any extensions installed?Butterworth
F
1

I've had the same problem on occasion, it occurs for some projects, but not others. It's infuriating.

I haven't figured out the root cause, but I solved this issue by manually inserting the SubType as an attribute.

<Content Include="Admin\Web.config" SubType="Designer" />

It's a hack, but gets rid of the issue, at least in VS2008.

Flourish answered 25/2, 2011 at 18:7 Comment(1)
Adding a SubType attribute in VS2010 makes the project unloadable, as SubType isn't expected to be an attribute of a <Content> element.Respectability

© 2022 - 2024 — McMap. All rights reserved.