Bug 11786 - One resource reference per line in cproj-file
Summary: One resource reference per line in cproj-file
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 6.2.x
Hardware: Macintosh Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2013-04-15 04:15 UTC by Maxim
Modified: 2013-04-22 17:36 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Cproj file. (103.89 KB, application/octet-stream)
2013-04-16 02:51 UTC, Maxim

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Maxim 2013-04-15 04:15:04 UTC
Imagine project with big count of png resources files.

Now when you add them to cproj-file, they references writes on a one row. Example:
    <Content Include="Default-568h%402x.png" />

  <Content Include="Resource\Likes\small_eye.png" />
<Content Include="Resource\Likes\small_smile.png" />
<Content Include="Resource\Likes\small_smile%402x.png" />
<Content Include="Resource\Likes\small_eye%402x.png" /><ProjectExtensions><MonoDevelop><Properties><Policies><DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedHierarchical" ResourceNamePolicy="FileFormatDefault" /><TextStylePolicy inheritsSet="null" scope="text/x-csharp" /><CSharpFormattingPolicy IndentSwitchBody="True" AnonymousMethodBraceStyle="NextLine" PropertyBraceStyle="NextLine" PropertyGetBraceStyle="NextLine" PropertySetBraceStyle="NextLine" EventBraceStyle="NextLine" EventAddBraceStyle="NextLine" EventRemoveBraceStyle="NextLine" BeforeMethodCallParentheses="False" NewParentheses="False" SpacesBeforeBrackets="False" inheritsSet="Mono" inheritsScope="text/x-csharp" scope="text/x-csharp" /><TextStylePolicy inheritsSet="null" scope="application/vnd.apple-interface-builder" /><XmlFormattingPolicy inheritsSet="null" scope="application/vnd.apple-interface-builder" /></Policies></Properties></MonoDevelop></ProjectExtensions><ItemGroup><ITunesArtwork Include="iTunesArtwork" /><ITunesArtwork Include="iTunesArtwork%402x" /></ItemGroup><ItemGroup><BundleResource Include="Default.png" /><BundleResource Include="Default%402x.png" /><BundleResource Include="lookup_amatorka.png"><DependentUpon>Default-568h%402x.png</DependentUpon></BundleResource><BundleResource Include="Image Processing\Lookup Images\lookup_amatorka.png" /><BundleResource Include="Image Processing\Lookup Images\lookup_miss_etikate.png" /><BundleResource Include="Image Processing\Lookup Images\lookup_soft_elegance_1.png" /><BundleResource Include="Image Processing\Lookup Images\lookup_soft_elegance_2.png" /><BundleResource Include="Image Processing\Curves\unblue_top.acv" /><BundleResource Include="Image Processing\Curves\oldprint.acv" /><BundleResource Include="Image Processing\Curves\moonlight.acv" /><BundleResource Include="Image Processing\Curves\lime.acv" /><BundleResource Include="Image Processing\Curves\horror.acv" /><BundleResource Include="Resources\Icon.png" /><BundleResource Include="Resources\Icon%402x.png" /><BundleResource Include="Resources\Icon-72.png" /><BundleResource Include="Resources\Icon-72%402x.png" /><BundleResource Include="Resources\Icon-Small.png" /><BundleResource Include="Resources\Icon-Small%402x.png" /><BundleResource Include="Resource\brightness_icon.png" /><BundleResource Include="Resource\contrast-icon.png" /><BundleResource Include="Resource\default_wallpaper.png" /><BundleResource Include="Resource\girl%402x.png" /><BundleResource Include="Resource\Achiv\85-trophy.png" /><BundleResource Include="Resource\Achiv\85-trophy%402x.png" /><BundleResource Include="Resource\Achiv\aChat.png" /><BundleResource Include="Resource\Achiv\aFriends.png" /><BundleResource Include="Resource\Achiv\aPencil.png" /><BundleResource Include="Resource\Achiv\aPlusFriend.png" /><BundleResource Include="Resource\Achiv\aSmile.png" /><BundleResource Include="Resource\Achiv\achiv1.png" /><BundleResource Include="Resource\Achiv\achiveFinished.png" /><BundleResource Include="Resource\Achiv\bubble.png" /><BundleResource Include="Resource\Achiv\bubble%402x.png" /><BundleResource Include="Resource\Achiv\empty_achieve_bg.png" /><BundleResource Include="Resource\Achiv\empty_achieve_bg%402x.png" /><BundleResource Include="Resource\Achiv\ice.png" /><BundleResource Include="Resource\Achiv\ice%402x.png" /><BundleResource Include="Resource\Achiv\img_bone.png" /><BundleResource Include="Resource\Achiv\img_candy.png" /><BundleResource Include="Resource\Achiv\img_empty.png" />

This looks like (and it is) hell. The most problem is merging versions. Imagine that two developers added resources files. Now it's impossible to merge those changes (split lines manually and them merge them is hardcore). Only simple way now is:
- Take local/remote version for Resources section;
- Remove resources references (hope, they're all places on one folder);
- Add resources references back. Thus both, my and my colleague new files will be added.
Weak solution either.

Suggestion: please proving writing one resource file reference per line in cproj-file.
Comment 1 Maxim 2013-04-15 04:16:06 UTC
* provide.
Comment 2 Mikayla Hutchinson [MSFT] 2013-04-15 16:35:48 UTC
What IDE are you using? What do you do that triggers this change to the csproj formatting?
Comment 3 Mikayla Hutchinson [MSFT] 2013-04-15 16:37:04 UTC
Can you attach an actual project file with this problem? It looks like there are copy/paste errors in your example.
Comment 4 Maxim 2013-04-16 02:51:18 UTC
Created attachment 3815 [details]
Cproj file.


What I do with cproj file during merge see below in "Only simple way
now is".
Comment 5 Mikayla Hutchinson [MSFT] 2013-04-22 17:36:11 UTC
Your csproj file is invalid. It has probably been incorrectly manually edited or merged.

These lines:

    <Content Include="Default-568h%402x.png" />

  <Content Include="Resource\Likes\small_eye.png" />

Should be:

    <Content Include="Default-568h%402x.png" />
    <Content Include="Resource\Likes\small_eye.png" />

Note the trailing "1" and the fact that the ItemGroup is closed, so that the Content items are not in an ItemGroup.