advertisement
Login | Register   
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   TIP BANK
Browse DevX
Download the code for this article
Partners & Affiliates
advertisement
advertisement
advertisement
advertisement
 

Use Reflection to Validate Assembly References—Before Your Customers Do

Developers are familiar with reflection as a way to create object instances, and discover and call object properties and methods, but reflection's usefulness extends even further—you can also use it to create a diagnostic tool to discover and validate dependencies for deployed code, and to report missing dependencies. 


advertisement
eflection is truly a paradigm shift for developers using Microsoft's line of development tools. The runtime availability of assembly metadata provides developers with new flexibility and the ability to develop interesting software tools. Developers often use reflection to load assemblies and instantiate classes dynamically, or to invoke methods, but you can also use reflection to inspect assembly metadata.


That capability leads to a way to solve an often-experienced problem—application deployment failures due to missing project dependencies on a machine. When you deploy a new .NET DLL or executable, knowing that a dependency is missing would aid greatly in fixing the problem before customers report the problem. Using reflection, you can easily build a tool to validate an assembly's dependencies and report on which ones are missing.

It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com.
Already a member?



advertisement