Bug 59665 - iOS project with Newtonsoft.JSON - Warning MSB3277 - Microsoft.CSharp
Summary: iOS project with Newtonsoft.JSON - Warning MSB3277 - Microsoft.CSharp
Status: RESOLVED DUPLICATE of bug 57842
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 11.2 (d15-4)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-09-21 19:12 UTC by Nate Cook
Modified: 2017-09-28 17:43 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Sample project demonstrating the problem (11.26 KB, application/zip)
2017-09-21 19:12 UTC, Nate Cook
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 57842

Description Nate Cook 2017-09-21 19:12:13 UTC
Created attachment 24862 [details]
Sample project demonstrating the problem

# Steps to reproduce
Create a blank iOS app
Add a reference to Newtonsoft.JSON version 10.0.3
Build

# Expected behavior
No warnings

# Actual behavior
Warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed. (MSB3277)
- There was a conflict between "Microsoft.CSharp, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".       
- There was a conflict between "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" and "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".
- There was a conflict between "System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" and "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".
- There was a conflict between "System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" and "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".

# Supplemental info (logs, images, videos)
Sample project attached
Comment 1 Jeffrey Stedfast 2017-09-26 16:36:24 UTC
Builds fine for me with this setup:

=== Visual Studio Community 2017 for Mac (Preview) ===

Version 7.2 Preview (7.2 build 583)
Installation UUID: 119afeba-010d-4f09-8021-f77e92bcb3e7
Runtime:
	Mono 5.4.0.174 (2017-06/1afb931de69) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 504000174

=== NuGet ===

Version: 4.3.0.4199

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	1.1.1
	1.0.4
SDK: /usr/local/share/dotnet/sdk/1.0.1/Sdks
SDK Version: 1.0.1
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

'/Applications/Xamarin Profiler.app' not found

=== Apple Developer Tools ===

Xcode 9.0 (13247)
Build 9A235

=== Xamarin.iOS ===

Version: 10.14.0.26 (Visual Studio Community)
Hash: 416f778f
Branch: d15-4
Build date: 2017-08-25 17:30:05-0400

=== Xamarin.Android ===

Version: 7.5.0.15 (Visual Studio Community)
Android SDK: /Users/fejj/Library/Android/sdk
	Supported Android versions:
		4.0.3 (API level 15)
		5.0   (API level 21)
		6.0   (API level 23)
		7.0   (API level 24)
		7.1   (API level 25)

SDK Tools Version: 26.0.2
SDK Platform Tools Version: 26.0.0
SDK Build Tools Version: 25.0.3

Java SDK: /usr
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin.Mac ===

Version: 4.0.0.1 (Visual Studio Community)

=== Xamarin Inspector ===

Not Installed

=== Build Information ===

Release ID: 702000583
Git revision: 861d3eb8f64655762b85235dde49874645208f51
Build date: 2017-09-05 15:23:48-04
Xamarin addins: 838dc0d12bdbb0407ea44b7bfd11fbe30ddac07b
Build lane: monodevelop-lion-d15-4

=== Operating System ===

Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
    Thu Jun 15 17:36:27 PDT 2017
    root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64





I suspect your problem is that you are using a version of Xamarin.iOS w/o support for .NET Core 2.0.
Comment 2 Jeffrey Stedfast 2017-09-26 16:36:49 UTC

*** This bug has been marked as a duplicate of bug 57842 ***
Comment 3 Nate Cook 2017-09-26 19:31:24 UTC
@Jeffrey - When you say "builds fine" you mean without warnings? In what version of Xamarin.iOS was .NET Core 2.0 support introduced?
Comment 4 Nate Cook 2017-09-28 17:43:04 UTC
It looks like you don't have .NET Core 2.0 installed. Can you try installing .NET Core 2.0 and trying again? Here's my version info (latest in stable channel):

=== Visual Studio Community 2017 for Mac ===

Version 7.1.5 (build 2)
Installation UUID: 3234d07d-f7a0-4180-b21d-d2c24ed872f6
Runtime:
	Mono 5.2.0.224 (d15-3/14f2c81) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 502000224

=== NuGet ===

Version: 4.3.0.2418

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	2.0.0
	1.0.3
SDK: /usr/local/share/dotnet/sdk/2.0.0/Sdks
SDK Versions:
	2.0.0
	1.0.0-preview2-003156
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.5
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Xamarin.Android ===

Version: 7.4.5.1 (Visual Studio Community)
Android SDK: /Users/ncook/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.1 (API level 16)
		4.4 (API level 19)
		5.0 (API level 21)
		5.1 (API level 22)
		6.0 (API level 23)
		7.0 (API level 24)
		7.1 (API level 25)

SDK Tools Version: 26.0.2
SDK Platform Tools Version: 26.0.0
SDK Build Tools Version: 25.0.3

Java SDK: /usr
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Apple Developer Tools ===

Xcode 9.0 (13247)
Build 9A235

=== Xamarin.iOS ===

Version: 11.0.0.0 (Visual Studio Community)
Hash: 152b654a
Branch: xcode9
Build date: 2017-09-15 02:25:56-0400

=== Xamarin Inspector ===

Version: 1.3.1
Hash: cbc48dd
Branch: 1.3-release
Build date: Thu, 21 Sep 2017 19:52:53 GMT
Client compatibility: 1

=== Xamarin.Mac ===

Version: 3.6.3.3 (Visual Studio Community)

=== Build Information ===

Release ID: 701050002
Git revision: 7afedcaef8e7542e70e3cf8f9bdb26938b8c0876
Build date: 2017-09-15 08:39:58-04
Xamarin addins: 3262aadf811a18c12eac6742532d052b0139a808
Build lane: monodevelop-lion-d15-3-xcode9

=== Operating System ===

Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
    Thu Jun 15 17:36:27 PDT 2017
    root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

AddinMaker 1.3.7
Manifest.addin 0.0.0.0