开发者

How can I change the name of a dynamic assembly after it has been created?

开发者 https://www.devze.com 2022-12-23 16:24 出处:网络
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 sam

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消