robcthegeek / csprojsorter Goto Github PK
View Code? Open in Web Editor NEWSimple utility for alpha-sorting CSPROJ files used by Visual Studio to help make resolving merge conflicts less... Eye-gougey.
License: MIT License
Simple utility for alpha-sorting CSPROJ files used by Visual Studio to help make resolving merge conflicts less... Eye-gougey.
License: MIT License
Given an ItemGroup
like the following:
<ItemGroup>
<Reference Include="ReferenceB" />
<Reference Include="ReferenceA" />
<Reference Include="ReferenceD" />
<Reference Include="ReferenceE" />
<Reference Include="ReferenceC" />
</ItemGroup>
We need to have this alpha-sorted based on it's value (in this case "Include"). Like so:
<ItemGroup>
<Reference Include="ReferenceA" />
<Reference Include="ReferenceB" />
<Reference Include="ReferenceC" />
<Reference Include="ReferenceD" />
<Reference Include="ReferenceE" />
</ItemGroup>
Keep in mind that some elements might determine their "value" by a different attribute (such as "Name").
When merging - we often find that multiple ItemGroup
elements are created, that each contain the same sub-elements like so:
<ItemGroup>
<Reference Include="ReferenceB" />
<Reference Include="ReferenceA" />
</ItemGroup>
<ItemGroup>
<Reference Include="ReferenceD" />
<Reference Include="ReferenceE" />
<Reference Include="ReferenceC" />
</ItemGroup>
To make everything else (such as sorting the elements) easier, it would make sense to collapse these nodes down into a single element first. So its more like:
<ItemGroup>
<Reference Include="ReferenceB" />
<Reference Include="ReferenceA" />
<Reference Include="ReferenceD" />
<Reference Include="ReferenceE" />
<Reference Include="ReferenceC" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Areas\EmbeddedResourceC\Resources.resx" />
<EmbeddedResource Include="Areas\EmbeddedResourceB\Resources.resx" />
<EmbeddedResource Include="Areas\EmbeddedResourceA\Resources.resx" />
</ItemGroup>
As a user that wants to consolidate/sort their CSPROJ file
I want a CLI app to run the application
So that I can integrate into my development/deploy process.
For this first version, I think we should just KISS:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.