AutoMapper: System.ValueTuple package should not be referenced for .NET 4.7+ projects

Version: 7.0.1

Expected behavior

System.ValueTuple dependency should not be included in projects that target .NET 4.7 and up.

Actual behavior

System.ValueTuple dependency is added and causes our web projects, which target .net 4.7.2, to require the following web.config binding redirect:

<dependentAssembly>
	<assemblyIdentity name="System.ValueTuple" publicKeyToken="CC7B13FFCD2DDD51" culture="neutral"/>
	<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0"/>
</dependentAssembly>

Which is in turn leading to a System.ExecutionEngine exception for us in w3wp.exe that I’ve been unable to track down. Our projects are a mix of .NET 4.7.2 and .NET Standard 2.0 projects and the dependency is likely causing a binary compatibility issue between the different implementations. We’ve experienced similar issues with System.Net.Http in the past.

With AutoMapper 7.0.0, the dependency is not there, and all works well.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 27 (14 by maintainers)

Commits related to this issue

Most upvoted comments

I’m also experiencing troubles with System.ValueTuple versions conflict when referencing AutoMapper v8.0.0 package in net472-targeted projects.

I’ve got the following weird build warning:

There was a conflict between "System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" and "System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51".
"System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" was chosen because it was primary and "System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" was not.

There were no such problems with AutoMapper v7.0.0 package.

Just curious, what the overhead for you will bring adding an extra net47 build target to AutoMapper?

I think dropping net461 build target will work for me also 😃

Yep!

On Wed, Apr 24, 2019 at 9:45 AM SkinnySackboy notifications@github.com wrote:

Do you think we are still able to have a new official version released soon?

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/AutoMapper/AutoMapper/issues/2750#issuecomment-486272974, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAZQMRXRVPAIYGYQJN7ZXTPSBXA7ANCNFSM4FOLQKPA .

I think with the last PR we’re ready. Next day or so?

On Wed, Apr 17, 2019 at 12:03 PM SkinnySackboy notifications@github.com wrote:

Hi all. Does anyone know when a version might be released that doesn’t require System.ValueTuple? Thanks!

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/AutoMapper/AutoMapper/issues/2750#issuecomment-484176980, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGYMmxCG1_cycULpdubh_FMfjHch66Nks5vh1PegaJpZM4Vy4Ke .

Ha no I have many clients still on 4.6

On Wed, Feb 20, 2019 at 10:48 AM Lucian Bargaoanu notifications@github.com wrote:

What can I say, you can have the same issue without using AM, .Net Standard is simply broken before 4.7.2. But I guess not using ValueTuple is just an inconvenience. So dropping 4.6.1 and just going with .Net Standard 2.0 is not cool? 😃

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/AutoMapper/AutoMapper/issues/2750#issuecomment-465660646, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGYMtys_7gu6QKxMgrbECiaalrLkZmVks5vPXxNgaJpZM4Vy4Ke .