views:

458

answers:

6

I have an Asp.Net 2.0 (VB.Net) app and I'm trying to export a Control (ASCX) to another project. I need to know what other files that the Control needs in order to work.

Is there any way - using VS.Net 2005 or an external app - to recursively trace the dependencies of a page or control in a solution?

For example, for this file: ~/Controls/SomeControl.ascx, I'd like to get the following list of files that it depends on to run:

~/Controls/SomeControl.ascx
  ~/Controls/SomeControl.ascx.vb
    ~/App_Code/SomeClass.vb
      ~/App_Code/AnotherClass.vb
      ~/App_WebReferences/com/example/SomeWebService/SomeWebService.disco
      ~/App_WebReferences/com/example/SomeWebService/SomeWebService.discomap
      ~/App_WebReferences/com/example/SomeWebService/SomeWebService.wsdl
    ~/App_Code/AnotherClass.vb
+4  A: 

I've used the Assembly Binding Log Viewer (Fuslogvw.exe) or maybe ProcMon...

One of my coworkers suggested this app called Dependency Auditor. I haven't used it though and am not vouching for it necessarily.

Jon Ownbey
Hmm, that addin appears to be for Excel, not VS 2005.
travis
Oh wow! thanks. I'll have to find the correct url...
Jon Ownbey
Fuze is built for this, hard to start with but amazingly useful.
JasonRShaver
hmm, my googling skills can't seem to find fuze/fuse log viewer for vs.net can you provide a link?
travis
I don't think you need to dl it if you are running visual studio. You can access it via the VS Command Window. here is a helpful link.http://msdn.microsoft.com/en-us/library/e74a18c4(vs.71).aspx
Jon Ownbey
oh wow, that's really handy, unfortunately it only shows failures or all assembly binding, it doesn''t show assemblies or files for specific project items
travis
yeah that's true. Sorry about that. It's the best I could come up with.
Jon Ownbey
The MSDN docs for fuslogvw.exe indicate the need to click the ASP.NET option. Unfortunately the version I have on WindowsXP does not have the ASP.NET option.
Frank Schwieterman
+3  A: 

I've used AutomatedQA's AQTime do this kind of thing. You can view sequence diagrams, call graphs, etc.... From there you can see which assemblies and files are being used.

They have a free trial that will give you plenty of time to do what you need to do.

Richard Hein
Hmm, that is interesting, but seems like a bit overkill for what I'm looking for. I just want to select some files in a project and get the other files in the project that they depend on. Thanks.
travis
+3  A: 

MZ Tools 6.0 integrates with Visual Studio and has a "get callers" type feature. http://www.mztools.com/v6/mztools6.aspx

Oorang
Interesting, that Procedure Callers function is pretty sweet. I'm looking for a tool that can just generate a list of files based on other files though. Thanks.
travis
A: 

I would just move the ascx control to a new project and debug stuff one by one. Then, I would compile that into a dll and use it in the different project.

scottschulthess
This is exactly what I'm trying to avoid. :-)
travis
+3  A: 

Have you tried NDepend? There's a plugin for Reflector as well.

andrewbadera
Hey, thanks Andy! Long time no see :-) Those are both cool but a bit overkill for what I'm looking for. While those give great stats for projects, I'm looking for something where I can pick out a few files in a project. At this point I think I may just have to build it myself.
travis
+2  A: 

Nope. There's no way to do that.

Scott Hanselman
Yeah, looks like I'll have to continue doing it by hand. Or write a solution myself...
travis