Reference to Specific Version AutoMapper causing downstream issues
The latest Umbraco build has a reference to a specific version of AutoMapper. This was causing conflicts for me. My resolution was to download the source, update the package and build; then I used the built DLLs in my project. So far so good.
Problem: I wanted to try out LeBlender grid editor. It too had a specific reference to AutoMapper; my guess is due to the fact that it was referencing the same DLLs as the current Umbraco build. So I tried to do the same, download the source, update AutoMapper and build. This failed due to some missing or incorrect source project configuration. I could probably figure out the issue, but instead will just forego use of LeBlender.
The real issue is the Umbraco specific version. My suggestion would be for Umbraco to fix the current build so that more packages are not created that have this problem as a result.
Note: I did try to handle this issue through Assembly Binding, but for some reason that did not work. I tried a number of different configurations:
Hi, we've just discovered thanks to twitter that others have had an issue. Automapper 3.1 signs their assembly which means its a huge breaking change and you'd need to rebuild all projects referencing it. See: https://github.com/AutoMapper/AutoMapper/issues/373
It's very unfortunate because people will upgrade to latest AutoMapper thinking it won't break. You'll have to stick to 3.0 for now.
That's a little spooky... I was literally just looking into trying to fix this in testing the 7.3 beta on an upgraded site. Googled and ended up here just an hour after you posted.
So does this mean 7.3 will need to change what it's built against, as currently the beta is depending on Automapper 3.3.1?
Specifically I'm having trouble with Archetype that looks to be built against 3.0.0.
is there any way to add binding redirects or probing paths to run multiple versions of automapper needed for other packages.. I've tried the following but with no success:
You can do binding redirects via code, for example the only way to do a binding redirect from a non signed assembly to a signed assembly is to do it via code. You can also redirect to specific versions ... however you'll run into issues because you would always need to load the assembly in the "Load" (Fusion) context which means you'd have to do Assembly.Load which would mean the app domain would need to know about it already. You would not be able to use Assembly.LoadFrom and specify a file path because that will not be in the "Load" (Fusion) context and you'll probably run into issues.
Reference to Specific Version AutoMapper causing downstream issues
The latest Umbraco build has a reference to a specific version of AutoMapper. This was causing conflicts for me. My resolution was to download the source, update the package and build; then I used the built DLLs in my project. So far so good.
Problem: I wanted to try out LeBlender grid editor. It too had a specific reference to AutoMapper; my guess is due to the fact that it was referencing the same DLLs as the current Umbraco build. So I tried to do the same, download the source, update AutoMapper and build. This failed due to some missing or incorrect source project configuration. I could probably figure out the issue, but instead will just forego use of LeBlender.
The real issue is the Umbraco specific version. My suggestion would be for Umbraco to fix the current build so that more packages are not created that have this problem as a result.
Note: I did try to handle this issue through Assembly Binding, but for some reason that did not work. I tried a number of different configurations:
Hi, we've just discovered thanks to twitter that others have had an issue. Automapper 3.1 signs their assembly which means its a huge breaking change and you'd need to rebuild all projects referencing it. See: https://github.com/AutoMapper/AutoMapper/issues/373
It's very unfortunate because people will upgrade to latest AutoMapper thinking it won't break. You'll have to stick to 3.0 for now.
That's a little spooky... I was literally just looking into trying to fix this in testing the 7.3 beta on an upgraded site. Googled and ended up here just an hour after you posted.
So does this mean 7.3 will need to change what it's built against, as currently the beta is depending on Automapper 3.3.1?
Specifically I'm having trouble with Archetype that looks to be built against 3.0.0.
Andy
is there any way to add binding redirects or probing paths to run multiple versions of automapper needed for other packages.. I've tried the following but with no success:
You can do binding redirects via code, for example the only way to do a binding redirect from a non signed assembly to a signed assembly is to do it via code. You can also redirect to specific versions ... however you'll run into issues because you would always need to load the assembly in the "Load" (Fusion) context which means you'd have to do
Assembly.Load
which would mean the app domain would need to know about it already. You would not be able to useAssembly.LoadFrom
and specify a file path because that will not be in the "Load" (Fusion) context and you'll probably run into issues.Not sure how the
codeBase
stuff works but you could try a combination of redirection via code and also specify a few probingPath's: https://msdn.microsoft.com/en-us/library/4191fzwb(v=vs.110).aspxHere's the redirection via code example: https://github.com/umbraco/Umbraco-CMS/blob/dev-v7.6/src/Umbraco.Core/BindingRedirects.cs
And this
Initialize
method would be need to be called as early as possible, you could use an PreApplicationStartMethod attribute: https://msdn.microsoft.com/en-us/library/system.web.preapplicationstartmethodattribute(v=vs.110).aspxGood luck!
Thanks Shannon, I'll give it a whirl. Appreciate the time.
Any news on this? Im facing the same problem... :/
I think I may have pulled leBlender. I cannot quite remember. I do have the binding redirects specified above.
is working on a reply...