How can I change the name of a dynamic assembly after it has been created?
Is there any way to change the name of a d开发者_高级运维ynamic assembly after it has been created? I'm using a framework that uses dynamic methods, and it is creating a dynamic assembly with the same name as my main assembly (which causes problems with WPF when it tries to load resources). So I need to find a workaround, and I thought of trying to change the name of the dynamic assembly.
I've tried using GetName() and then setting the Name property, but it appears that GetName returns a clone of the name because my change doesn't stick.
What else can I try?
You should be able to use the Common Compiler Infrastructure to modify the saved assembly and change the stored Assembly Name.
精彩评论