Build fails on VS 2013 with Cycle 8, how to fix?

I’m having issues building my libraries with VS 2013 and Xamarin update Cycle 8.
Building with Xamarin Studio does work.
Set-up:
New solution with Android class library
Nuget: Json.Net 9.0.1
1 class with:
public class Class1 { private void Test() { JContainer json = null; string jsonText = null; JsonSerializerSettings settings = new JsonSerializerSettings(); try { json = JsonConvert.DeserializeObject(jsonText, settings) as JContainer; } catch { json = null; } JObject jsonObject = json as JObject; } }

The build of this fails on VS2013, because references are missing.
It used to work with Cycle 7.
My guess it has something to do with Build tools 12 and 14, because that is the main difference I see.

Attached is the sample project I used to prove this.

Output of VS2013:
`Task "Csc"
C:\Program Files (x86)\MSBuild\12.0\bin\Csc.exe /noconfig /nowarn:1701,1702,2008 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;XAMARIN_ANDROID_v1_0;MOBILE;ANDROID;ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4;ANDROID_5;ANDROID_6;ANDROID_7;ANDROID_8;ANDROID_9;ANDROID_10;ANDROID_11;ANDROID_12;ANDROID_13;ANDROID_14;ANDROID_15;ANDROID_16;ANDROID_17;ANDROID_18;ANDROID_19;ANDROID_20;ANDROID_21;ANDROID_22;ANDROID_23 /errorendlocation /preferreduilang:en-US /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\Java.Interop.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v6.0\Mono.Android.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll" /reference:C:\sharedpackages\Newtonsoft.Json.9.0.1\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Runtime.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll" /debug+ /debug:full /optimize- /out:obj\Debug\test1.dll /resource:obj\Debug__AndroidLibraryProjects__.zip,AndroidLibraryProjects.zip /target:library /utf8output Resources\Resource.designer.cs Properties\AssemblyInfo.cs EmptyClass.cs "C:\Users\HorstM\AppData\Local\Temp\MonoAndroid,Version=v6.0.AssemblyAttributes.cs" obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
Microsoft (R) Visual C# Compiler version 12.0.40629.0

for C# 5
Copyright (C) Microsoft Corporation. All rights reserved.

C:\projects\samples\test1\test1\EmptyClass.cs(15,4,15,14): error CS0012: The type 'System.Dynamic.IDynamicMetaObjectProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Dynamic.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
c:\sharedpackages\Newtonsoft.Json.9.0.1\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll: (Location of symbol related to previous error)
C:\projects\samples\test1\test1\EmptyClass.cs(15,4,15,14): error CS0012: The type 'System.Collections.Specialized.INotifyCollectionChanged' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ObjectModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
c:\sharedpackages\Newtonsoft.Json.9.0.1\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll: (Location of symbol related to previous error)
C:\projects\samples\test1\test1\EmptyClass.cs(27,4,27,11): error CS0012: The type 'System.ComponentModel.INotifyPropertyChanged' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ObjectModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
c:\sharedpackages\Newtonsoft.Json.9.0.1\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll: (Location of symbol related to previous error)
The command exited with code 1.
Done executing task "Csc" -- FAILED.`

Below is the VS 2013 setup:
Microsoft Visual Studio Professional 2013
Version 12.0.40629.00 Update 5
Microsoft .NET Framework
Version 4.6.01038

Installed Version: Professional

Xamarin 4.2.0.680 (c4382f5)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android 7.0.0.18 (0e59c36)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS 10.0.0.6 (6c3fee4)
Visual Studio extension to enable development for Xamarin.iOS.

Best Answer

Answers

Sign In or Register to comment.