вівторок, 14 листопада 2017 р.

tips and tricks :: TargetFrameworkVersion v8.0

Today I was creating a new template - I've created a new project and updated all nuget packages in Visual Studio (on the non-Linux computer), so I have got a new template with Xamarin.Forms version 2.4.0.74863 , but ... I can't compile it.

error XA0001: Unsupported or invalid $(TargetFrameworkVersion) value of 'v8.0'. Please update your Project Options.

In the configuration files I have this:

packages.config
<package id="Xamarin.Forms" version="2.4.0.74863" targetFramework="monoandroid80" />
(and there are a lot of "monoandroid80" packages now)

*.Droid.csproj
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>

My compiled Xamarin.Android contains only v7.1 , so I've made a temporary trick (and maybe this is a very incorrect thing):

cd xamarin-android/bin/Debug/lib/xbuild-frameworks/MonoAndroid
ln -s v7.1 v8.0

Now I can build that project and run it - this simple project works. How it will be with a more complex project - I don't know, probably it will not work.

Normally I should re-compile the Xamarin.Android on Linux from zero (or maybe not from zero) - but I don't have many free space today on my ssd, so I don't want to try.

пʼятниця, 27 жовтня 2017 р.

tips and tricks :: VSCode and dotnetstandard libraries

If we use "dotnetstandard" libraries then VSCode may print some warnings:

Some projects have trouble loading. Please review the output for more details.

[warn]: OmniSharp.MSBuild.ProjectFile.ProjectFileInfo
        The primary reference "..." could not be resolved because it was built against the ".NETPortable,Version=v5.0" framework. This is a higher version than the currently targeted framework ".NETPortable,Version=v4.5,Profile=Profile111".

So the Droid project may have the disabled intellisense, because the PCL dll has not been built.

[fail]: OmniSharp.MSBuild.ProjectFile.ProjectFileInfo
        The "ResolveLibraryProjectImports" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load assembly 'MyPCLProject, Version=0.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'MyPCLProject.dll'

To avoid these warnings in VSCode we may run xbuild.sh or xfast.sh first before opening the VSCode.

It is not necessary if we work with the PCL files only.
And PCL project doesn't see these libraries anyway in VSCode.


четвер, 19 жовтня 2017 р.

warning :: 5.4.0 in the stable branch


Mono 5.4 is on the Stable branch now.

Mono 5.4.0.201 has not been tested with Xamarin Android,
but 5.4.0.199 have very serious issues with Xamarin Android,
so probably 5.4.0.201 will not work for Xamarin Android / Xamarin.Forms today.
Anyway it should be verified (maybe I will try it a bit later).

Please use this:
http://www.mono-project.com/docs/getting-started/install/linux/#accessing-older-releases

My settings:
deb http://download.mono-project.com/repo/debian stretch/snapshots/5.2.0.224 main

пʼятниця, 29 вересня 2017 р.

msbuild 15.3 and Microsoft.Bcl.Build issue

P.S. September 2017, current msbuild 15.3.0.0 works normally.


update :: VSCode 1.16.1 and C# (OmniSharp) 1.12.1


Visual Studio Code 1.16.1
C# plugin (powered by OmniSharp) 1.12.1

works normally with both - Droid and PCL projects.

needs only one link (similar to the previous version):

To fix the next issue:
~/.vscode/extensions/ms-vscode.csharp-1.12.1/.omnisharp/xbuild/Microsoft/Portable/v4.5/Microsoft.Portable.CSharp.targets was not found.

cd ~/.vscode/extensions/ms-vscode.csharp-1.12.1/.omnisharp

ln -s /usr/lib/mono/xbuild

But it can't see the netstandard dlls.
Monodevelop 5.10 can.

P.S. My settings:

{
"editor.minimap.enabled": false,
"editor.fontSize": 15,
"workbench.colorTheme": "Default Light+",
"editor.codeLens": false,
"omnisharp.loggingLevel": "information",
"extensions.autoUpdate": false,
"update.channel": "none",
"workbench.editor.enablePreview": false,
"workbench.editor.enablePreviewFromQuickOpen": false,
"editor.renderWhitespace": "all"
}

issue :: Culture name ... is not supported


Solution: rebuild may help.

Issue:

Target _ResolveSatellitePaths:
/usr/lib/mono/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: error : Error executing task ResolveAssemblyReference: Culture name % �b is not supported.
Parameter name: name
Build FAILED.

...

Errors:
/home/workerlamp/XamarinProject/Xamarin-Fork/Droid/CentroForms.Droid.csproj (default targets) ->
/usr/lib/mono/xbuild/Xamarin/Android/Xamarin.Android.Common.targets (_ResolveSatellitePaths target) ->
/usr/lib/mono/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: error : Error executing task ResolveAssemblyReference: Culture name % �b is not supported.
Parameter name: name

вівторок, 26 вересня 2017 р.

new issues :: Beta Mono release 5.4.0

After the last upgrade (the Mono Beta repository - Beta Mono release 5.4.0 Preview 3)

Unpacking mono-4.0-gac (5.4.0.199-0xamarin2+debian9b1) over (5.2.0.224-0xamarin1+debian9b1)

I've got this:

MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.
System.BadImageFormatException: Could not resolve field token 0x04000304
File name: 'Microsoft.Build'

And I could not use the xbuild.

Probably it needs the clean install and/or the xamarin-android re-build using the newest version. I don't know. I don't have a time for experiments and I don't have one more computer+disk to play with it.

So, I decided to migrate from the Mono Beta repository to the Mono Stable that have Mono version 5.2.0 SR4 (5.2.0.224) today.

Now it works.

Working software versions are:
mono - Mono JIT compiler version 5.2.0.224 (tarball Mon Sep 18 17:31:59 UTC 2017)
msbuild - Microsoft (R) Build Engine version 15.3.0.0 ( Mon Aug 14 21:03:24 UTC 2017) for Mono
monodevelop 5.10
and my "old" (because I've disabled the update) Visual Studio Code 1.13.1 - C# 1.11.0 (1.11.0 can't work with the Droid project, but it can still work with the PCL projects today).

субота, 16 вересня 2017 р.

for myself - .NET Standard links - to review it later



Customizing the Build System

Linux Debian 9, .NET Core 2.0 dotnet Segmentation fault


https://www.microsoft.com/net/core#linuxdebian

dotnet new console -o MyApplication

Помилка адресування
or
Segmentation fault

I've tried
export COREHOST_TRACE=1
but this doesn't help.

gdb --args dotnet new console -o MyApplication

run

.NET standard dll library added to the PCL (an issue)


My partner has added a netstandard1.1 nuget package library to a PCL

Now I can't compile as usually. I've got an error, using the msbuild on Linux:

error CS0246: The type or namespace name could not be found (are you missing a using directive or an assembly reference?)

But, monodevelop doesn't show an error in the similar project.
Macincloud/Mac also doesn't show any errors in the Visual Studio.

I've tried to use the xbuild instead of the msbuild - and it works.

But, now the VSCode doesn't see (intellisense) that netstandard1.1 library (its methods).

Monodevelop works (I am using version 5.10; I don't use the flatpak, because it didn't work for Xamarin.Forms last time that I've tried to use it, but an ordinary Debian 9 Stretch package).

On many sites people write that we should not add the .NET Standard library to the PCL, but using another apporach.

P.S. Interesting that VSCode may work with .NET Standard library + Xamarin.Forms if I use
dotnet restore
and if I create it from the ground (but not transforming the PCL to .NET Standard).

пʼятниця, 1 вересня 2017 р.

If emulator doesn't want to start


Twice I have broken the emulator somehow using my scripts.
So I was able to see only the splash screen.
Solution:  open the Android Studio :: AVD Manager and "Wipe" all data on that emulator.

P.S. For another issue (apk installation) -  INSTALL_FAILED_UID_CHANGED - I use the same fix.

Didn't find class on path: DexPathList


E/AndroidRuntime( 2089): Caused by: android.runtime.JavaProxyThrowable: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Java.Lang.NoClassDefFoundError: md58be56c726d952f1a0d73b5a196744f12/DraggableListView ---> Java.Lang.ClassNotFoundException: Didn't find class "md58be56c726d952f1a0d73b5a196744f12.DraggableListView" on path: DexPathList[[zip file "/data/app/com.companyname.appl-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.companyname.appl-2, /system/lib]]

Solution: make the full build.

середа, 30 серпня 2017 р.

Interesting intro


Seems they can run Xamarin Studio Community on Linux using flatpak.

But I can't find that in the public downloads.

They show it in this video: https://www.youtube.com/watch?v=5I5StuO5ops (20 June 2017)
at 22min:32sec

Xamarin Live Player


Xamarin Live Player (iOS/Windows) makes the development process much faster than before.

https://blog.xamarin.com/xamarin-live-player-preview-2-continuously-run-and-debug-apps/

P.S. So, the Linux-based development is slower now (not as fast as in the Xamarin Live Player for iOS/Windows). But, if I will know the entire mechanism/protocol of pairing and deployment over wifi, then (potentially) it may be possible to do the same on Linux.

Interesting does it re-compile the PCL dll,
(if so then Linux and XAML previewer speed may be very similar).
But, how it re-loads the dll instantly, without stopping/pausing the application activity (does it?) - I don't know.

Generally, I think - before, development on the iOS was as fast like on Linux, and maybe faster (for non PCL code), but today it may be even much more faster with Xamarin Live Player.

P.P.S. They call it "Live Run Current View".
But, "Start Without Debugging" mode that re-starts the application every time also a bit interesting - I think that they re-deploy both dlls (Droid and PCL (or PCLs) ). I doesn't re-deploy the Droid dll, because most of the time I work with PCL and Droid "fast.sh" script needs more time to write/verify for me than for PCL (I should disable, or not enable, the signing process there and I don't need the apk there).

P.P.P.S. https://forums.xamarin.com/discussion/102341/can-you-share-the-protocol-for-linux

UI Sleuth - a Xamarin.Forms Inspector

Linux command line tools


My set of command line tools for Xamarin.Forms Android on Linux.

https://github.com/igorkovalchuk/xamarin-forms-android-linux-tools

XAML previewer (Gtk)


Live XAML development for Xamarin Forms Apps using Gtk Backend (in progress).

https://github.com/jsuarezruiz/FormsGtkLive

четвер, 24 серпня 2017 р.

update :: alpha channel :: mono and msbuild new issue


Solution: use to the beta channel - beta-stretch
http://www.mono-project.com/download/beta/#download-lin-debian

Issue on the alpha channel:

msbuild /t:clean

Microsoft (R) Build Engine version 15.3.0.0 ( Wed Jul 26 17:40:04 UTC 2017) for Mono
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.
System.BadImageFormatException: Could not resolve field token 0x04000304
File name: 'Microsoft.Build'
  at Microsoft.Build.CommandLine.MSBuildApp.BuildProject (System.String projectFile, System.String[] targets, System.String toolsVersion, System.Collections.Generic.Dictionary`2[TKey,TValue] globalProperties, Microsoft.Build.Framework.ILogger[] loggers, Microsoft.Build.Framework.LoggerVerbosity verbosity, Microsoft.Build.CommandLine.DistributedLoggerRecord[] distributedLoggerRecords, System.Int32 cpuCount, System.Boolean enableNodeReuse, System.IO.TextWriter preprocessWriter, System.Boolean debugger, System.Boolean detailedSummary, System.Collections.Generic.ISet`1[T] warningsAsErrors, System.Collections.Generic.ISet`1[T] warningsAsMessages) [0x004b7] in <09b0c4ef186c4daa84c1e4c3bb7b9b37>:0
  at Microsoft.Build.CommandLine.MSBuildApp.Execute (System.String commandLine) [0x00169] in <09b0c4ef186c4daa84c1e4c3bb7b9b37>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.BadImageFormatException: Could not resolve field token 0x04000304
File name: 'Microsoft.Build'
  at Microsoft.Build.CommandLine.MSBuildApp.BuildProject (System.String projectFile, System.String[] targets, System.String toolsVersion, System.Collections.Generic.Dictionary`2[TKey,TValue] globalProperties, Microsoft.Build.Framework.ILogger[] loggers, Microsoft.Build.Framework.LoggerVerbosity verbosity, Microsoft.Build.CommandLine.DistributedLoggerRecord[] distributedLoggerRecords, System.Int32 cpuCount, System.Boolean enableNodeReuse, System.IO.TextWriter preprocessWriter, System.Boolean debugger, System.Boolean detailedSummary, System.Collections.Generic.ISet`1[T] warningsAsErrors, System.Collections.Generic.ISet`1[T] warningsAsMessages) [0x004b7] in <09b0c4ef186c4daa84c1e4c3bb7b9b37>:0
  at Microsoft.Build.CommandLine.MSBuildApp.Execute (System.String commandLine) [0x003d3] in <09b0c4ef186c4daa84c1e4c3bb7b9b37>:0
  at Microsoft.Build.CommandLine.MSBuildApp.Main () [0x00028] in <09b0c4ef186c4daa84c1e4c3bb7b9b37>:0

субота, 5 серпня 2017 р.

Continuous Coding


Continuous Coding is a live coding environment for .NET. With it, you can visualize your apps instantly as you code them. It currently specializes in the development of iOS and Android apps using Xamarin.

It currently only works in Xamarin Studio and only for C#.

https://github.com/praeclarum/Continuous

пʼятниця, 28 липня 2017 р.

Very fast previewing XAML and Linux


Generally, the compiling is very fast,
but there are one more solution, even faster.

While GTK is not ready it is possible to try the next:

http://www.moonmile.net/blog/archives/8669
http://www.moonmile.net/blog/archives/8655

(you may use the Google translation from Japanese language to English)

вівторок, 25 липня 2017 р.

issue :: "XamlCTask" task failed unexpectedly.


Tried to compile https://github.com/davidbritch/xamarin-forms/tree/master/DataBinding101

Xamarin.Forms.targets(62,3): error MSB4018: The "XamlCTask" task failed unexpectedly.

There are something with .csproj file, I don't know what.
So I created a fresh Xamarin project and copied 3 necessary files there - now all works.

Activity name


Activity name can be found here:

/wrk/all/one/projects/SampleResources1/Droid/obj/Debug/android/manifest/AndroidManifest.xml
or here
/wrk/all/one/projects/SampleResources1/Droid/obj/Debug/android/AndroidManifest.xml

понеділок, 24 липня 2017 р.

Visual Studio Code issue

I forget to add 2 imports in the file

using System.Collections.Generic;
using Xamarin.Forms;

and my code may be builded normally from the command line,
but in IDE I can't use the Ctrl+click navigation and intellisense in that file,
so I may
1. close the IDE;
2. build the project from the command line;
3. re-open the IDE and look at the errors' list or if I can't see errors then
to open the files one by one where intellisense doesn't work and find where I missed the import (it may be marked with red lines or not marked at all) or have other errors.

понеділок, 17 липня 2017 р.

Droid resources


If I change the styles (android resources) then sometimes I may need to delete manually the
Droid/Resources/Resource.designer.cs

Но я могу ошибаться...
поскольку я случайно перепутал что в colors.xml я изменений не делал.

понеділок, 3 липня 2017 р.

resgen or ResXFileCodeGenerator


https://forums.xamarin.com/discussion/87175/not-able-to-use-resgen-on-mac-to-generate-cs-strongly-types-resource-class-file

https://docs.microsoft.com/en-us/dotnet/framework/tools/resgen-exe-resource-file-generator

Unfortunately resgen.exe for mono and normal resgen.exe are different software - I can not generate the AppResources.Designer.cs file in Linux.

It doesn't work:

    <EmbeddedResource Include="Resx\AppResources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>AppResources.Designer.cs</LastGenOutput>
    </EmbeddedResource>

And I can't say why.

Interesting that msbuild can generate that file for Droid project (strings.xml), but not for PCL.

Solution:

https://msdn.microsoft.com/ru-ru/library/system.resources.tools.stronglytypedresourcebuilder(v=vs.110).aspx

modify the result .cs:

sed -i 's/using System;/using System;\n    using System.Reflection;\n/g' AppResources.Designer.cs

sed -i 's/typeof(AppResources).Assembly/typeof(AppResources).GetTypeInfo().Assembly/g' AppResources.Designer.cs

It works when I put the AppResources.resx in the root directory of PCL, but if I use other directory, then it may not work. I have no time today to figure out how to configure it if it possible.


P.S. For myself - other related links to review:
https://dzone.com/articles/missing-reswfilecodegenerator )
http://reswcodegen.codeplex.com/
https://github.com/christianhelle/reswcodegen

https://www.codeproject.com/Articles/13830/Extended-Strongly-Typed-Resource-Generator

http://www.linuxonly.nl/docs/49/145_Run_custom_tool_on_each_resx_file_when_building.html

https://stringresourcetool.codeplex.com/SourceControl/latest

https://marketplace.visualstudio.com/items?itemName=JohnAaronNelson.ForceCode (?)

https://marketplace.visualstudio.com/items?itemName=EZSlaver.ExtendedStronglyTypedResourceGenerator (source code exists)

http://blog.baltrinic.com/software-development/dotnet/t4-template-replace-resxfilecodegenerator

Interesting:

https://forums.xamarin.com/discussion/58542/resx-localization-not-working-on-real-devices

To answer:

https://forums.xamarin.com/discussion/80627/can-i-generate-resource-designer-cs-programatically
https://forums.xamarin.com/discussion/86800/is-there-any-way-to-generate-designer-cs-files-from-command-line


субота, 1 липня 2017 р.

Exceptions...


E/AndroidRuntime( 1892): Caused by: android.runtime.JavaProxyThrowable: System.DivideByZeroException: Attempted to divide by zero.
E/AndroidRuntime( 1892):   at Sample.PersonalBudget..ctor () [0x00230] in <f5634a8f2718474699a651b585799c90>:0
E/AndroidRuntime( 1892):   at Sample.App..ctor () [0x0000f] in <f5634a8f2718474699a651b585799c90>:0

vs

I/MonoDroid( 2066): System.DivideByZeroException: Attempted to divide by zero.
I/MonoDroid( 2066):   at Sample.PersonalBudget..ctor () [0x00230] in /wrk/all/one/projects/Sample/Sample/PersonalBudget.cs:70 
I/MonoDroid( 2066):   at Sample.App..ctor () [0x0000f] in /wrk/all/one/projects/Sample/Sample/App.xaml.cs:14 
I/MonoDroid( 2066):   at Sample.Droid.MainActivity.OnCreate (Android.OS.Bundle bundle) [0x00027] in /wrk/all/one/projects/Sample/Droid/MainActivity.cs:27 

Seems this is a solution:
./adb shell setprop debug.mono.debug 1


пʼятниця, 23 червня 2017 р.

Compilation: every .cs file in .csproj


You should add a .cs file to the Sample.csproje, to the appropriate <ItemGroup> manually:

<Compile Include="MyButton.cs" />

otherwise you may get this:

I/MonoDroid( 2017): UNHANDLED EXCEPTION:
I/MonoDroid( 2017): Xamarin.Forms.Xaml.XamlParseException: Position 8:3. Type local:MyButton not found in xmlns clr-namespace:Sample

P.S. seems that MonoDevelop may add it automatically.

Compilation prerequisites

On Linux you can't create the Xamarin.Forms project from zero.

And for the compilation it is necessary to take the good template (!!!),
then msbuild will compile it correctly in many cases,
otherwise you may have a very strange errors in runtime,
or you will be able to build it only with xbuld.

Today you may try to use the xamarin-forms-samples for your experiments.

Sample.sln

Please comment out #
lines for iOS (and other, UWP, if any) project(s) - there are 3 lines for each project to comment out.

And every Sample.Droid.csproj will need the next:

<PropertyGroup Condition=" '$(OS)' == 'Unix' ">
  <AndroidSdkDirectory>/home/workerlamp/android-toolchain/sdk</AndroidSdkDirectory>
</PropertyGroup>

(please refer to this link to use more properties)

Also I set for all three PropertyGroup(s) the next line

<AndroidSupportedAbis>armeabi-v7a,x86</AndroidSupportedAbis>

x86 allows me to run it on emulator,

but if I will set pure "armeabi" as in some of examples it will not work on emulator at all,
but "armeabi-v7a" and "x86" works ok for me.
Usually I use only x86: <AndroidSupportedAbis>x86</AndroidSupportedAbis>

I don't know is it possible to make release builds on Linux to work on different devices, but for the development it is enough.

Making the xaml page


It is not enough to create 2 files:

SomePage2.xaml

<?xml version="1.0" encoding="utf-8"?>
  <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:local="clr-namespace:Sample" x:Class="Sample.SomePage2">
  <Label Text="Welcome to Xamarin Forms!" VerticalOptions="Center" HorizontalOptions="Center" />
</ContentPage>

SomePage2.xaml.cs

using Xamarin.Forms;
  namespace Sample
  {
    public partial class SomePage2 : ContentPage
    {
      public SomePage2()
     {
       InitializeComponent();
     }
   }
 }

Additionally you will need to edit the Sample.csproj file manually, for example:

<ItemGroup>
  <EmbeddedResource Include="App.xaml" />
  <EmbeddedResource Include="SamplePage.xaml" />
  <EmbeddedResource Include="SomePage2.xaml" />
</ItemGroup>

<ItemGroup>
  <Compile Include="App.xaml.cs">
    <DependentUpon>App.xaml</DependentUpon>
  </Compile>
  <Compile Include="SamplePage.xaml.cs">
    <DependentUpon>SamplePage.xaml</DependentUpon>
  </Compile>
  <Compile Include="SomePage2.xaml.cs">
    <DependentUpon>SomePage2.xaml</DependentUpon>
  </Compile>
...
</ItemGroup>

Visual Studio Code

Visual Studio Code has a limited functionality today, but it is maybe the best tool I see today:

File system links:

~/.vscode/extensions/ms-vscode.csharp-1.10.0/bin

xbuild -> /usr/lib/mono/xbuild
xbuild-frameworks -> /usr/lib/mono/xbuild-frameworks/

~/.vscode/extensions/ms-vscode.csharp-1.10.0/bin/omnisharp/msbuild

Novell -> /home/workerlamp/xamarin_local/xamarin-andr/xamarin-android/bin/Debug/lib/xbuild/Novell
Xamarin -> /home/workerlamp/xamarin_local/xamarin-andr/xamarin-android/bin/Debug/lib/xbuild/Xamarin

where /home/workerlamp/xamarin_local/xamarin-andr/xamarin-android/ is my build path for xamarin-android.

File system links


Usually many of C# IDE on Linux are using the msbuild,
but if you will try to use the msbuild from the command line (you must try it to tune an IDE) you will see the different errors, because it can't find either some targets or it can't find the "The reference assemblies for framework MonoAndroid,Version=v1.0" (thanks to this developer who helped me to fix the MonoAndroid issue).

So we may use the symbolic links:

Path: /usr/lib/mono/xbuild

Novell -> /home/workerlamp/xamarin_local/xamarin-andr/xamarin-android/bin/Debug/lib/xbuild/Novell
Xamarin -> /home/workerlamp/xamarin_local/xamarin-andr/xamarin-android/bin/Debug/lib/xbuild/Xamarin

Path: /usr/lib/mono/xbuild-frameworks

MonoAndroid -> /home/workerlamp/xamarin_local/xamarin-andr/xamarin-android/bin/Debug/lib/xbuild-frameworks/MonoAndroid


Path: /usr/lib/mono/msbuild/15.0/bin

Novell -> /home/workerlamp/xamarin_local/xamarin-andr/xamarin-android/bin/Debug/lib/xbuild/Novell
Xamarin -> /home/workerlamp/xamarin_local/xamarin-andr/xamarin-android/bin/Debug/lib/xbuild/Xamarin

where /home/workerlamp/xamarin_local/xamarin-andr/xamarin-android/ is my build path for xamarin-android.
I use the "ln -s directory" to make a link,
for example:
cd /usr/lib/mono/xbuild
ln -s /home/workerlamp/xamarin_local/xamarin-andr/xamarin-android/bin/Debug/lib/xbuild/Novell

Other solutions


Personally I've found this link:
https://github.com/0xFireball/xamarin-android-linux

Compilation details

Before proceeding, please take a look at this link first: other solutions, maybe it will be better for you than manual compilation.

Xamarin.Android sources:
https://github.com/xamarin/xamarin-android

My environment:
* Debian 9 (probably it will work on Debian 8 also);
* x86_64 computer (probably it may work on x86 also)

I've compiled this version:

commit e83c99c12d9a397457146c639c3d4e85198bda91
Date:   Thu Jun 15 2017

But I would not reccomend to do the same, because I've spent a lot of time to fix the issues.

If you will take a look
https://github.com/0xFireball/xamarin-android-linux
then you may find this very interesting link:

https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android-linux/lastSuccessfulBuild/Azure/

So, you can find the last successful build version and retry the build if you want.

Personally, I have not tried to use files from their Jenkins distribution...

Compilation details:

*  git clone https://github.com/xamarin/xamarin-android.git (it is necessary to don't forget to clone the successful build version);
* http://www.mono-project.com/download/alpha/ (alpha version), because it needs mono => 5.2.0 and msbuild (and later you will need the nuget);
* add javac (version >= 1.8) to the PATH, for example export PATH="$HOME/java/jdk1.8.0_101/bin:$PATH"
* install cmake (an ordinary Linux package);


P.S. Today (27 Sep 2017) it is not the alpha repository, but the stable repository(!)


Xamarin.Forms on Linux

Maybe somebody will find it useful.