Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

.NET Standard 2.0 with .NET Framework 4.7.1 and System.ValueTuples #731

Closed
dev4fams opened this issue May 14, 2018 · 3 comments
Closed

.NET Standard 2.0 with .NET Framework 4.7.1 and System.ValueTuples #731

dev4fams opened this issue May 14, 2018 · 3 comments

Comments

@dev4fams
Copy link

Keep getting CS8137 / CS8179 Errors regardless if System.ValueTuples is included or not.

Base Project is 4.7.1 with an object model project in .Net Standard 2.0. I do have NuGet System.ValueTuples 4.4.0 included in .Net Standard project.

Solution builds just fine in Visual Studio and when built in VSTS VS2017 Host. However, on our private host agent I get CS8137 and CS8179 errors. I've compared the msbuild command and it appears the "/reference" all use .Net Standard 2.0 but on our private build server it uses older versions.

The VS2017 Host also appears to resolve conflicts and upgrades the system dependencies.

Part of the builds process, I install .Net Core 2.1.4 SDK and use NuGet 4.7.0

I can't figure out what component I'm missing since I would think the solution should build the same, regardless of host.

Thanks

Errors

2018-05-14T21:59:09.7446843Z ##[error]Shared\EManager.cs(33,78): Error CS8137: Cannot define a class or member that utilizes tuples because the compiler required type 'System.Runtime.CompilerServices.TupleElementNamesAttribute' cannot be found. Are you missing a reference?

2018-05-14T21:59:09.7446843Z ##[error]Shared\EManager.cs(33,78): Error CS8179: Predefined type 'System.ValueTuple`2' is not defined or imported

Conflict Resolution
Encountered conflict between 'Reference:C:\Users\VssAdministrator.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Collections.Concurrent.dll' and 'Reference:C:\Users\VssAdministrator.nuget\packages\system.collections.concurrent\4.0.12\ref\netstandard1.3\System.Collections.Concurrent.dll'. Choosing 'Reference:C:\Users\VssAdministrator.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\System.Collections.Concurrent.dll' because AssemblyVersion '4.0.11.0' is greater than '4.0.10.0'.

@YairHalberstadt
Copy link

YairHalberstadt commented Sep 27, 2018

I'm getting the same issue. Did you find a solution?
Thanks

@dev4fams
Copy link
Author

Never did find a solution. Ended up converting everything to .Net Core for now.

@wtgodbe
Copy link
Member

wtgodbe commented May 30, 2019

I believe this issue is a duplicate of many others we've been seeing related to binding redirects - see https://github.com/dotnet/corefx/issues/32561#issuecomment-428138193 for a list of relevant issues where you should be able to find guidance on how to work around it.

@wtgodbe wtgodbe closed this as completed May 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants