This is a simple library allowing to write MSBuild tasks to modify assemblies after build. It allows to debug tasks because they can be build as applications. It uses the excellent dnlib to modify assemblys.
Available as a NuGet package.
Current build status: .
Create a project which generates a console application. Then add two classes:
- The processor:
publicclassMyStitcher:SingleStitcher{protectedoverrideboolProcess(ModuleDefMDmoduleDef,stringassemblyPath,ProjectDefinitionproject,stringprojectPath,stringsolutionPath){// ... Play with the assembly}}- And the entry point:
publicclassMyTask:StitcherTask<MyStitcher>{publicstaticintMain(string[]args)=>Run(newMyTask(),args);}// TODO (lazy boy)
Simply set the following command-line parameters ProjectPath=<pathToCSProj>SolutionPath=<pathToSln>.
- VersionSticher: a task to inject version information after build, based on values injected in strings.