patrick smacchia is the man
C#
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
src
.gitignore
ProjectManipulator.sln
readme.markdown

readme.markdown

Can manipulate project files to in an effort to bulk update an entire directory structure. For example, turn all project references from this:

<ProjectReference Include="..\somepath\someproject.csproj">
	<Project>{2457953E-5E0E-4B2A-830F-D1FA5F57EE9B}</Project>
	<Name>someproject.name</Name>
</ProjectReference>

to assembly (weak) references:

<Reference Include="assembly.name">
	<HintPath>..\path\to\assembly.dll</HintPath>
</Reference>

Usage

ProjectManipulator.exe switch filepath

Switch:

  • -p - Replace all project references () with assembly/weak () references
  • -cl - Set CopyLocal () to false for all references
  • -hp - Update reference hint paths () to match some desired structure
  • -tp - Update build target paths () to match some desired structure
  • -sp - Update solution item target paths () to match some desired structure

Filepath:

  • The path of the csproj file to update.

Eg.

ProjectManipulator.exe -cl myProject.csproj

Bulk Usage

To replace all csproj files in a directory tree:

find src/ -name *.csproj -exec ProjectManipulator.exe -cl {} \;

Disclaimer!

This is certainly not production ready! Use at your own risk!