AssemblyBuilder reference assembly
Asked Answered
T

1

5

I am creating a new Assembly using System.Reflection.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?

Treatise answered 26/4, 2011 at 7:40 Comment(0)
N
9

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.

Nikolas answered 20/3, 2014 at 13:51 Comment(1)
You're right, that was what I found out after I asked this question too.Treatise

© 2022 - 2024 — McMap. All rights reserved.