question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:27 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
AndrewKostousovcommented, Nov 24, 2018

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 😃

1reaction
jbogardcommented, Apr 24, 2019

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 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not load file or assembly 'System.ValueTuple'
I've got a VS2017 project that compiles to a DLL which is then called by an EXE written by someone else. Both projects...
Read more >
15.5 Preview cannot build C# projects using System. ...
The moment I updated 15.4 Preview to 15.5 Preview, projects that are using the default 4.7 ValueTuple can't build. I've tried downgrading to ......
Read more >
Compil error CS8179 using a "tuple" after updating Visual ...
Net Framework 4.7, System.ValueTuple is included in mscorlib.dll, so if you are using a newer version, you do not need to reference System....
Read more >
Fixing System Value Tuple Error
To fix the issue, you need to reference the System.ValueTuple NuGet package either via Visual Studio's NuGet manager or via the Package Manager...
Read more >
Could not locate the assembly "System.ValueTuple"
My project has a dependency on System.ValueTuple that is downloaded with NuGet. Everything builds fine in Visual Studio and our build server ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found