exe or dll Dependencies

G

Guest

I need to write an MSI generator and need to detect dependencies. Does
anyone know how to detect the dependencies of a dll or exe like the visual
studio installer?
 
M

Michael Nemtsev

Hello Rui,

Try to use Reflector API for this

R> I need to write an MSI generator and need to detect dependencies.
R> Does anyone know how to detect the dependencies of a dll or exe like
R> the visual studio installer?
R>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
N

Nicholas Paldino [.NET/C# MVP]

Rui,

You can get the current assembly instance and then recursively call the
GetReferencedAssemblies method.

Just curious, why not use a third-party package. MSI tables are no
small feat to generate, and it is something I would say is better left to a
company that specializes in those things.

Hope this helps.
 
M

Mythran

Rui said:
I need to write an MSI generator and need to detect dependencies. Does
anyone know how to detect the dependencies of a dll or exe like the visual
studio installer?

I dislike the structure of the installer projects that come with the .net
ide. Instead, I use InnoSetup along with ISTool to for more fine-grain
control of the setup package :)

If you really need to auto-detect dependancies, you would need to use
reflection.

HTH,
Mythran
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top