The problem is, that both IronPython 2.7.2 and IronPython 2.7.4 have the same assembly version number, which is, as you reported, 2.7.0.40
.
So, given that, your issue is that apparently, there is a version of the IronPython.dll
assembly in the GAC, and a local version, with the same version number. According to that answer, there is no way to load your local version instead of the GAC version.
Given that situation, I can think of two possibilities:
- Recompile (or postprocess and re-sign) the
IronPython.dll
assembly with a new version number, and use an assembly redirection so that requests to the regularIronPython.dll
assembly are redirected to your local assembly; When starting your application, check the IronPython version and, if you detect an inappropriate version of IronPython, ask your consumers to update their installations to IronPython 2.7.4. E.g.:
string ironPythonFileVersion = ((AssemblyFileVersionAttribute)typeof(IronPython).Assembly.GetCustomAttributes(typeof(AssemblyFileVersionAttribute), false)[0]).Version; if (ironPythonFileVersion == "2.7.2.1001") { // IronPython 2.7.2 was loaded. Deal as appropriate. }