Building Portable Class Library on Mono

gustavo-armenta edited this page Jul 2, 2013 · 2 revisions

mono .nuget/nuget.exe install src/Microsoft.AspNet.SignalR.Client.Portable/packages.config -OutputDirectory packages

xbuild src/Microsoft.AspNet.SignalR.Client.Portable/Microsoft.AspNet.SignalR.Client.Portable.csproj

XBuild Engine Version 3.0.12.0
Mono, Version 3.0.12.0
Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.

Build started 6/30/2013 9:56:37 AM.
__________________________________________________
Project "/Users/signalr/dev/src/Microsoft.AspNet.SignalR.Client.Portable/Microsoft.AspNet.SignalR.Client.Portable.csproj" (default target(s)):
/Users/signalr/dev/src/Microsoft.AspNet.SignalR.Client.Portable/Microsoft.AspNet.SignalR.Client.Portable.csproj:  warning : Target 'AssignProjectConfiguration', not found in the project
    Target RestorePackages:
        Executing: mono ../../.nuget/NuGet.exe install "packages.config" -source "https://nuget.org/api/v2/;http://www.myget.org/F/aspnetwebstacknightly/;http://www.myget.org/F/katana/" -o "../../packages"
    Target PrepareForBuild:
        Configuration: Debug Platform: AnyCPU
    Target GetReferenceAssemblyPaths:
/Library/Frameworks/Mono.framework/Versions/3.0.12/lib/mono/4.0/Microsoft.Common.targets:  warning : Unable to find framework corresponding to the target framework moniker '.NETPortable,Version=v4.0,Profile=Profile158'. Framework assembly references will be resolved from the GAC, which might not be the intended behavior.
    Target ResolveAssemblyReferences:
/Library/Frameworks/Mono.framework/Versions/3.0.12/lib/mono/4.0/Microsoft.Common.targets:  warning : Reference 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' not resolved
        For searchpath /Users/signalr/dev/packages/Newtonsoft.Json.5.0.6/lib/portable-net40+sl4+wp7+win8
        Considered '/Users/signalr/dev/packages/Newtonsoft.Json.5.0.6/lib/portable-net40+sl4+wp7+win8/mscorlib' as a file, but the file does not exist
        Considered '/Users/signalr/dev/packages/Newtonsoft.Json.5.0.6/lib/portable-net40+sl4+wp7+win8/mscorlib.exe' as a file, but the file does not exist
        Considered '/Users/signalr/dev/packages/Newtonsoft.Json.5.0.6/lib/portable-net40+sl4+wp7+win8/mscorlib.dll' as a file, but the file does not exist
        For searchpath {CandidateAssemblyFiles}
        Warning: {CandidateAssemblyFiles} not supported currently
        For searchpath {HintPathFromItem}
        HintPath attribute not found
        For searchpath {TargetFrameworkDirectory}
        For searchpath {PkgConfig}
        Considered mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes, but could not find in any pkg-config files.
        For searchpath {GAC}
        Considered mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes, but could not find in the GAC.
        For searchpath {RawFileName}
        Considered '/Users/signalr/dev/src/Microsoft.AspNet.SignalR.Client.Portable/mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' as a file, but the file does not exist
        For searchpath bin/Debug/
        Considered '/Users/signalr/dev/src/Microsoft.AspNet.SignalR.Client.Portable/bin/Debug/mscorlib' as a file, but the file does not exist
        Considered '/Users/signalr/dev/src/Microsoft.AspNet.SignalR.Client.Portable/bin/Debug/mscorlib.exe' as a file, but the file does not exist
        Considered '/Users/signalr/dev/src/Microsoft.AspNet.SignalR.Client.Portable/bin/Debug/mscorlib.dll' as a file, but the file does not exist

Using Client.Portable DLL compiled on Windows also fails to build

Cleaning: Microsoft.AspNet.SignalR.Client.iOS.Samples (Debug|iPhoneSimulator)
Removing output files...
Clean complete

Building: Microsoft.AspNet.SignalR.Client.iOS.Samples (Debug|iPhoneSimulator)
Performing main compilation...
/Library/Frameworks/Mono.framework/Versions/3.0.12/bin/mcs /noconfig "/r:/Developer/MonoTouch/usr/lib/mono/2.1/mscorlib.dll" -nostdlib "/out:/Users/signalr/dev/samples/Microsoft.AspNet.SignalR.Client.iOS.Samples/bin/iPhoneSimulator/Debug/MicrosoftAspNetSignalRClientiOSSamples.exe" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Net.Http.dll" "/r:/Users/signalr/dev/packages/Microsoft.AspNet.SignalR.Client.Portable/Microsoft.AspNet.SignalR.Client.dll" "/r:/Users/signalr/dev/lib/iOS/Newtonsoft.Json.dll" /nologo /warn:4 /debug:full /optimize- /codepage:utf8 "/define:DEBUG;__MOBILE__;__IOS__"  /t:exe "/Users/signalr/dev/samples/Microsoft.AspNet.SignalR.Client.iOS.Samples/Main.cs" "/Users/signalr/dev/samples/Microsoft.AspNet.SignalR.Client.iOS.Samples/AppDelegate.cs" "/Users/signalr/dev/samples/Microsoft.AspNet.SignalR.Client.iOS.Samples/TextViewWriter.cs" "/Users/signalr/dev/samples/Common/CommonClient.cs" 
Compilation failed: 4 error(s), 2 warnings

warning CS1701: Assuming assembly reference `System.Net.Http, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' matches assembly `System.Net.Http, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. You may need to supply runtime policy
/Users/signalr/dev/samples/Microsoft.AspNet.SignalR.Client.iOS.Samples/AppDelegate.cs(46,11): warning CS4014: The statement is not awaited and execution of current method continues before the call is completed. Consider using `await' operator or calling `Wait' method
/Users/signalr/dev/samples/Common/CommonClient.cs(113,24): error CS0012: The type `System.Net.ICredentials' is defined in an assembly that is not referenced. Consider adding a reference to assembly `System.Net, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'
/Users/signalr/dev/samples/Common/CommonClient.cs(113,38): error CS0029: Cannot implicitly convert type `System.Net.NetworkCredential' to `System.Net.ICredentials'
/Users/signalr/dev/samples/Common/CommonClient.cs(119,41): error CS0029: Cannot implicitly convert type `System.Net.NetworkCredential' to `System.Net.ICredentials'
/Users/signalr/dev/samples/Common/CommonClient.cs(137,57): error CS0266: Cannot implicitly convert type `System.Net.ICredentials [System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]' to `System.Net.ICredentials [System.Net, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]'. An explicit conversion exists (are you missing a cast?)


Build complete -- 4 errors, 2 warnings

---------------------- Done ----------------------

Build: 4 errors, 2 warnings