Created
May 25, 2014 13:09
-
-
Save paavohuhtala/ec27031cc066f002189b to your computer and use it in GitHub Desktop.
cecil is awesome
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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