Assembly Reference Scanner Sample

Due to an issue with our setup programs, certain files weren't getting updated if the version numbers hadn't changed. This led to crashes if you upgraded from one version to another. I wrote this tool as part of my diagnostic into why the programs were crashing complaining of wrong version numbers. It uses a reflection load only context to scan all assemblies in a folder, and checks each assemblies references against each other to ensure the versions match.

Note: This tool doesn't support assemblies in the GAC, only references to assemblies deployed in a folder. It is also a tool wrote in a hurry to solve a particular problem and may not fit your needs without modifications.

This is an example of expected behaviour:

And here's an example caused by upgrading one version of Sitemap Creator with another with a faulty setup causing some files not to be updated:

Full C# source for the tool is available from the download link above.

Downloads

Filename Description Version Release Date
AssemblyReferenceScanner.zip
  • md5: 47bd4bf571be76c33b954d358dca933b

An example C# project that uses a reflection load only context to scan assemblies in a folder and check that referenced assemblies are present with the correct version.

06/10/2012 Download

About The Author

Gravatar

The founder of Cyotek, Richard enjoys creating new blog content for the site. Much more though, he likes to develop programs, and can often found writing reams of code. A long term gamer, he has aspirations in one day creating an epic video game. Until that time, he is mostly content with adding new bugs to WebCopy and the other Cyotek products.

Leave a Comment

While we appreciate comments from our users, please follow our posting guidelines. Have you tried the Cyotek Forums for support from Cyotek and the community?

Styling with Markdown is supported