VS2010 Solution Explorer File Grouping
-
martes, 17 de julio de 2012 13:03
Hello, I
have a silverlight solution which consists in two projects, I created a couple
of resource files (.resx) in one of the projects and add the same files as
links to the other project, in the original project the resource file (.resx)
appears "grouped" with the corresponding designer file (.Designer.cs)
but in the other project the links are not grouped, so my question is:<o:p></o:p>Is there a
way to make VS do the grouping in the second project the same way it does in
the original project?<o:p></o:p>Thanks in
advance<o:p></o:p>Juan Carlos
Galvez<o:p></o:p>P.S.:
Researching on this forum I found an answer to this but is quite old so maybe
things have changed, that's why I'm repeating the question for VS2010 (the
other post is for VS2008)<o:p></o:p>
Todas las respuestas
-
martes, 17 de julio de 2012 14:22
I faced the similar issue with one of my last project and I found some times VS is not able to identify its dependencies while copying and pasting files. I manually edited .csproj file to fix this issue by by editing .csproj file in notepad. It was a Winforms project and I was missing DependentUpon Entry in the proj file for the specific file. Hope it may help.
<Compile Include="Activated.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Activated.Designer.cs">
<DependentUpon>Activated.cs</DependentUpon>
</Compile>
--Krishna
-
martes, 17 de julio de 2012 14:58
Thanks a lot Krishna, worked great, I had to add a couple of other lines which I include
here just in case someone else will needed:<o:p></o:p><Compile Include="..\MedicBase\Resources\RegistrationDataResources.Designer.cs">
<Link>Assets\Resources\Web\RegistrationDataResources.Designer.cs</Link>
<DependentUpon>RegistrationDataResources.resx</DependentUpon>
</Compile><o:p></o:p>and also:<o:p></o:p>
<EmbeddedResource Include="..\MedicBase\Resources\RegistrationDataResources.resx">
<Link>Assets\Resources\Web\RegistrationDataResources.resx</Link>
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>RegistrationDataResources.Designer.cs</LastGenOutput>
</EmbeddedResource><o:p></o:p>Thank you very much<o:p></o:p>
Juan Carlos
Galvez<o:p></o:p>
-
jueves, 19 de julio de 2012 13:54Moderador
I'll point out that VSCommands has an option to group/ungroup files as well (if you can get past the nagware that it has become). It is easier than editing the project file. However it won't help to fix up dependents that require a specific subtype (it uses code). Also note that the embedded stuff can be set via the IDE using the Properties window.
Michael Taylor - 7/19/2012
http://msmvps.com/blogs/p3net

