Solved

URGENT: Determining all .NET DLLS my App is using

Posted on 2004-04-14
17
255 Views
Last Modified: 2010-04-15
I'm trying to write a config file so that my app can work with 1.0 as well as 1.1.  Is there some program I can use to determine all of the dlls my application is using?

I need this list so I can specifically enumerate all of these dlls in a config file.
0
Comment
Question by:jjacksn
  • 7
  • 5
  • 3
  • +1
17 Comments
 
LVL 12

Expert Comment

by:dfiala13
ID: 10829420
0
 
LVL 37

Assisted Solution

by:gregoryyoung
gregoryyoung earned 150 total points
ID: 10829439
fuslogvw.exe

To log all binds in the viewer

Set the HKLM\Software\Microsoft\Fusion\ForceLog registry value to 1 (the value is a DWORD).
By default, Fuslogvw.exe only logs failed attempts to locate assemblies. You might have a situation where it is useful to view all successful assembly binds. For example, you might want to verify that an assembly is loading from your application directory instead of from the global assembly cache. Setting this registry key forces Fuslogvw.exe to log all assembly binds.
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 10829453
btw if you didnt know ... this is a tool thats included with the framework
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 5

Author Comment

by:jjacksn
ID: 10829852
its listing .resource files... do I need to include these?
0
 
LVL 5

Author Comment

by:jjacksn
ID: 10829873
and mscorlib?
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 10830572
mscorlib is a framework .dll (gac installed)
0
 
LVL 8

Assisted Solution

by:rajaloysious
rajaloysious earned 150 total points
ID: 10830764
You can use ProcessExplorer ( search in the network)  you need to have admin rights....
It shows all files, registry keys, dlls etc.... quite useful
0
 
LVL 5

Author Comment

by:jjacksn
ID: 10832222
I guess my questions is this:  What exactly needs to be listed in the configuration file?  The one that gets generated by Visual Studio 2003 when you select compatability with 1.0 seems to have many irrelevant files and lacks relevant ones...?

Is this just meant to be a template?
0
 
LVL 12

Accepted Solution

by:
dfiala13 earned 200 total points
ID: 10832224
BTW, you don't need any of this stuff. The debug window in VS lists the loaded assemblies when you run a project.
0
 
LVL 12

Expert Comment

by:dfiala13
ID: 10832368
Are you talking about the assemblyBinding element?  How do you set VS to generate it dynamically?
0
 
LVL 5

Author Comment

by:jjacksn
ID: 10832406
dfiala,

You can go to the configuation properties for your .exe and set it to work with both 1.0 and 1.1.  VS.NET then generates an app.config file.  However, this file is generic, and doesn't have any specific data about your progarm.  So, it seems that it doesn't help a great deal.
0
 
LVL 12

Expert Comment

by:dfiala13
ID: 10832486
Interesting.  Yes, that does seem to be a generic list, as I did it in a one form project and got a laundry list.  I'd just roll your own given the assemblies you've identified.  You could even generate it automatically if so inclined, using the AppDomain class to get a list of loaded assemblies.  Would give you everything you need except for the old version #.
0
 
LVL 5

Author Comment

by:jjacksn
ID: 10832660
Yeah, i think I'll just go off the debug window as you suggested.  

I'm still confused though, do I need to include my resource files?  
0
 
LVL 12

Expert Comment

by:dfiala13
ID: 10832688
Include your resource files in the assemblyBinding element?  No.  They are not assemblies.
0
 
LVL 12

Expert Comment

by:dfiala13
ID: 10832714
here's the code for looping through the loaded assemblies.  Throw an XmlTextWriter in the loop and you can create your binding section in no time.

public static string[] WhatAssem
{

      get
      {
            AppDomain ad = AppDomain.CurrentDomain;
            Assembly[] asmb = ad.GetAssemblies();
            string[] sAssembName = new string[asmb.Length];
            for(int i = 0;i < ass.Length; i++)
            {
                  sAssembName[i] = asmb[i].FullName;
                  Debug.WriteLine(sAssembName[i]);

            }

            return sAssembName;


      }


}
0
 
LVL 12

Expert Comment

by:dfiala13
ID: 10832877
Shoudl be:

public static string[] WhatAssem
{

     get
     {
          AppDomain ad = AppDomain.CurrentDomain;
          Assembly[] asmb = ad.GetAssemblies();
          string[] sAssembName = new string[asmb.Length];
          for(int i = 0;i < asmb.Length; i++)
          {
               sAssembName[i] = asmb[i].FullName;
               Debug.WriteLine(sAssembName[i]);

          }

          return sAssembName;


     }


}
0
 
LVL 8

Expert Comment

by:rajaloysious
ID: 10833134
Thanks for your reply, but...
Doesnt work still with your code.
I am playing a lot with the colors
Kindly let me know how can i change the solor of the pen and then call DrawText..
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question