GetCallingAssembly() question

  • Thread starter Thread starter Marty
  • Start date Start date
M

Marty

Hi,

I am using C#.NET 2003.
First step:
When I call
System.Reflection.Assembly.GetCallingAssembly().GetName().Name;
in debug mode from the IDE, I get a specific Assembly name.

Second step:
Then I compile my project in debug mode, and run it fron the builded
..exe file.
I call again the
System.Reflection.Assembly.GetCallingAssembly().GetName().Name;
and I get a different assembly name for the same code as in first step.

Our application call dll#1, and dll#1 call dll#2.
In first step, dll#2 should return "calling assembly = dll#1", but it
return "calling assembly = dll#2".

Does it make sense? Any idea to get the same calling assembly name from
both step?

Regards,
Marty
 
Marty,

Without seeing some code, it is impossible to say. It sounds like it
would be relatively easy to duplicate. Can you create a project and post
it?
 
Hi Nicholas,
Thanks for your fast reply, but I'm at job right now in a rush, I don't
have time to create another project, if I can at end of day I'll do and
post it.

Regards,
Marty
 

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

Back
Top