开发者

AssemblyBuilder reference assembly

I am creating a new Assembly using System.Re开发者_运维百科flection.Emit. I want the new assembly to reference another assembly. There is a method GetReferencedAssemblies() that gets all the referenced assemblies, but there is no method to reference a new one. How can I do it?


An old question i know, but assuming someone else like me stumbles upon it...

The answer I eventually found is that you don't need to add a reference when creating a new assembly. References related to types used in the code you Emit are automatically "added".

Hope this helps.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜