Skip to content

Commit fd22002

Browse files
committed
Fix SyncProjects.exe to avoid empty <ItemGroup /> propagation.
1 parent 9ecdd63 commit fd22002

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

src/MsgPack.Xamarin.Android/MsgPack.Xamarin.Android.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,6 @@
679679
</Compile>
680680
<Compile Include="Properties\AssemblyInfo.cs" />
681681
</ItemGroup>
682-
<ItemGroup />
683682
<ItemGroup>
684683
<None Include="..\MsgPack\remarks.xml">
685684
<Link>remarks.xml</Link>

test/MsgPack.UnitTest.Xamarin.Android/MsgPack.UnitTest.Xamarin.Android.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
<Name>MsgPack.Xamarin.Android</Name>
6161
</ProjectReference>
6262
</ItemGroup>
63-
<ItemGroup />
6463
<ItemGroup>
6564
<None Include="..\..\src\MsgPack.snk">
6665
<Link>MsgPack.snk</Link>

tools/SyncProjects/SyncProjects/Program.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,13 @@ private static void SynchronizeProjects( string syncFilePath, string sourceBaseP
165165
}
166166
}
167167

168+
// Avoid empty ItemGroups
169+
projectXml.Root.Elements( Ns + "ItemGroup" ).Where( ig => !ig.HasElements ).Remove();
170+
168171
projectXml.Save( projectFilePath );
169172
}
170173
}
171174

172-
private static IEnumerable<ItemGroup> ToItemGroups( XContainer projectXml )
173-
{
174-
return projectXml.Elements( Ns + "ItemGroup" ).Select( e => new ItemGroup( e ) );
175-
}
176-
177175
private static void CopyItemGroup( string elementName, IEnumerable<XElement> sourceItems, XElement destinationItemGroup, string relativePath, IEnumerable<string> includings, IEnumerable<string> excludings, IEnumerable<string> preservings )
178176
{
179177
var remaining =
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)