views:

99

answers:

1

I need to determine all assemblies referenced by a certain .NET Compact Framework assembly. Do you think this is possible with Cecil?

This way our deployment tools could automatically resolve all dependencies of our .NET Compact Framework applications.

+4  A: 

Even without Cecil you should be able to do it with Assembly.GetReferencedAssemblies. Even though that's not supported on the CF itself (as far as I can tell) it should be fine if your deployment tools are server-side.

Jon Skeet
Yes, the deployment tools are server-side. Until now I always was under the impression that loading CF assemblies under .NET Framework fails because the referenced CF assemblies (mscorlib, System, ...) are not available.Anyway, I'll check this out.
Christian Schwarz
You may not be able to load them to execute code, but you should be able to load them for reflection only.
Jon Skeet
Wow! I did a quick check and it seems to work.
Christian Schwarz
You can even load them to execute code. CF assemblies are fully retargetable, so as long as they don't call device-specific features, they'll run as-is on the desktop.
ctacke