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:
public class MyStitcher : SingleStitcher
{
protected override bool Process(ModuleDefMD moduleDef, string assemblyPath, ProjectDefinition project, string projectPath, string solutionPath)
{
// ... Play with the assembly
}
}
- And the entry point:
public class MyTask : StitcherTask<MyStitcher>
{
public static int Main(string[] args) => Run(new MyTask(), 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.