Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

picrap/StitcherBoy

Open more actions menu

Repository files navigation

StitcherBoy

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: Build status.

In details

Implementing

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);
}

Embedding it as MSBuild task

// TODO (lazy boy)

Debugging it

Simply set the following command-line parameters ProjectPath=<pathToCSProj> SolutionPath=<pathToSln>.

They use StitcherBoy

  • VersionSticher: a task to inject version information after build, based on values injected in strings.

About

Build task to weave generated assembly

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.