Skip to content

Instantly share code, notes, and snippets.

@paavohuhtala
Created May 25, 2014 13:09
Show Gist options
  • Save paavohuhtala/ec27031cc066f002189b to your computer and use it in GitHub Desktop.
Save paavohuhtala/ec27031cc066f002189b to your computer and use it in GitHub Desktop.
cecil is awesome
using System;
using Mono.Cecil;
namespace RenameAssembly
{
class Program
{
static void Main(string[] args)
{
const string fileName = "MeshRenderer.Core.dll";
var asm = AssemblyDefinition.ReadAssembly(fileName);
foreach (var type in asm.Modules[0].Types)
{
type.Namespace = type.Namespace.Replace("MeshRenderer.Core", "TriangleNet.MeshRenderer.Core");
}
asm.Write("TriangleNet.MeshRenderer.Core.dll");
Console.ReadKey();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment