Skip to content

Conversation

@jcoder76
Copy link

Adds support for choosing the closest assembly match using semantic versioning assuming that a major version bump is most likely incompatible.

bretthysuik and others added 2 commits January 20, 2016 15:04
- Assembly partial name version must be the same as full name version or a previous version.
- Assembly partial name version must have the same major version as full name version. This ensures an assembly containing breaking changes (a different major version) isn't chosen.
Additions:
 - Added support for selecting the maximum element of a collection to select the maximum assembly version
 - Added the ability to specify whether to match assembly versions exactly

Changes:
 - Changed the assembly path search routine to match assemblies by their exact match first, or fall back to the highest compatible version.
@jcoder76
Copy link
Author

This was posted over a month ago without any review @derjabkin, please review.

if (source == null)
throw new ArgumentNullException("source");

var sourceItems = source.ToArray();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, do not convert to array. Use Any()

@derjabkin
Copy link
Owner

Sorry for the delay. Using most recent version of the found assemblies would only work, if you not using strong names. Can You please check, if the assembly that we are looking for has a public key, then we should use exact matching only.

@jcoder76
Copy link
Author

Thanks. I will apply the recommended changes.

@jcoder76
Copy link
Author

Just a note. Binding redirects can permit even newer stong signed assembly versions to work.

So in order to properly handle assembly versioning for strong signed assemblies the binding redirects in app.config also need to be checked if applicable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants