This content has moved - please find it at

Although these pages remain accessible, some content may not display correctly in future as the new blog evolves.


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:

A scan of Sitemap Creator showing all references correctly

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:

When you run cyosmc.exe with these version mismatches, things are going to go wrong!

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

Update History

  • 2012-10-06 - First published
  • 2020-11-21 - Updated formatting


Filename Description Version Release Date
  • 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


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