• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 279
  • Last Modified:

C#: check references dynamically

Is it possible to check dynamically where the references point to? If yes, I need some sample code or a link.

Thanks
0
gromul
Asked:
gromul
  • 2
  • 2
1 Solution
 
gregoryyoungCommented:
which type of reference are you talking about? an object reference or a dll reference?

If a dll reference I am not quite sure what you are asking.. Are you trying to figure out which version of a dll will be used and say its file location? This would not be easy to get as its dependent upon your current configuration (things like search paths) as well as things like whether it is GAC installed and/or whether you have overriden the default loading behavior.

Could you clarify a bit what you are trying to do?

Cheers,

Greg
0
 
gromulAuthor Commented:
I need a way to debug why a dll file (added as a reference in the solution) is not found. The issue appears on the build machine when building, but not when in the dev environment.
0
 
gregoryyoungCommented:
ok well is the reference something in a local projectetc or is it in the GAC / a directory? Are you building from visual studio on the build machine? You can expand references and right click (select properties) to view information about them. A reference with an obvious problem will have its icon changed.
0
 
gromulAuthor Commented:
The dll file is in a local project and appears correctly in Visual Studio on the build machine. I'm using Team Foundation Build for building, so if references are correct is not visible.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now