IDE changes the .csproj file <SubType> between UserControl and Component
-
quarta-feira, 10 de janeiro de 2007 15:46When any file in my project is changed, I have one UserControl that the IDE changes the .csproj file <SubType> between UserControl and Component. This happens even if the UserControl is not changed. Is there any way to stop the IDE from changing this?
Todas as Respostas
-
sexta-feira, 26 de janeiro de 2007 14:08Oh well, this is so far the first mention of that issue? I searched and found equally nothing, we noticed that when we switched to VS2005 from VS2003, one UserControl, nothing unusual, and every time you do Save All it changes the type of that control in csproj file from UserControl to Component. The only thing i found is that it has a name which ends with ...View. Dunno if that really matter...
-
segunda-feira, 19 de fevereiro de 2007 21:24We have the same problem. It is causing problems with our version control. If anyone figures this out, please post. (I am using VS2005, and it is a native VS2005 project).
-
sexta-feira, 23 de fevereiro de 2007 15:44
Yes, this is exactly our problem too.
We use version control and this effect drives the users insane. And the changing .csproj appears in every Change-Set.
We have several of this cases. I have tried to split files with more than one class, but this is not helping. There are UserControls with more or less simple structure, but they are also changing, but not all.
If anyone has a clue, PLEASE post. (Microsoft Most Valuable guys, where are you when we need you? ;-))
-
segunda-feira, 26 de fevereiro de 2007 20:17OK, so here it is: we seemed to get past that by just installing the SP1 :-)
-
terça-feira, 27 de fevereiro de 2007 13:00
unfortunately SP1 does not help for us.
we just started developing for .NET 2.0 and installed VS 2005 SP1 for each developer right from the beginning. After migration from VS 2003, some user controls started to show the described effect.
so: problem still not solved
-
quinta-feira, 1 de março de 2007 21:48"Bump" - we have the problem here too, and it is annoying, and SP1 did not help us either.
-
terça-feira, 13 de março de 2007 17:57
I have the same issue and SP1 installation doesnt help me either.
I also noticed that some unrecognised characters get inserted in the csproj files (specifically the around the "SubType" text and "Include" text) after I edit them in the IDE. Did anyone run into this issue?
-
quarta-feira, 14 de março de 2007 19:04We have this same problem but with VS 2003 (SP1) and the SubType switching back and forth from "Code" to "ASPXCodeBehind". It does this over and over again on more than one machine. No side effect other than svn checks it in as changed (obviously) and then everyone has to reload their projects.
-
terça-feira, 14 de agosto de 2007 01:40
Hello all,
I think another user has hit on the "answer" to this issue here:
http://www.pcreview.co.uk/forums/showpost.php?p=3645831&postcount=5
The IDE seems to get confused if there is more than one class defined in the user control source code file. Moving your extra classes (besides the one inheriting from UserControl) to separate files seems to "solve" the issue. I was having this problem, and a quick test seems to confirm this fix, although I might still be glossing over something else important. This was going to be annoying to me from a source-control perspective, so I'm glad there seems to be an out.
It seems to be a particular problem if the extra classes in your source file inherit from System.Windows.Forms - perhaps this can confuse the IDE as to whether the file should be treated as a user control or designable component.
-
quarta-feira, 29 de junho de 2011 10:24
This annoying, time-wasting problem is still present, for me. I use VS 2008 and the <SubType> tag is randomly added or removed from the csproj file. My Files contain single classes, so the 'fix' explained does not apply. I have been seeing this phenomenon in VS for years now, to a greater or lesser extent.
The have been many threads that do not explain exactly what is going on.
-
segunda-feira, 13 de agosto de 2012 16:55This still happens in VS 2010 SP1, and we do not have multiple classes per file.
Collin Sauve
-
segunda-feira, 13 de agosto de 2012 17:02

