неділя, 9 вересня 2018 р.

Azure on Linux locally

This August I've tried to run Azure on Linux locally.

I've spent ~10 hours to understand how to configure it on Linux and how to deal with the existing issues to create and run a simple HTTP trigger.

Normally it should not be so hard.

Issues:

* it doesn't work for my locale, so I have to set en_US.utf8 , otherwise "func extensions install" doesn't work; https://github.com/Azure/azure-functions-core-tools/issues/519

* documentation didn't mention that I should run it using the "-build" flag for C#-based projects, i.e. "func host start --build"; https://github.com/MicrosoftDocs/azure-docs/issues/13253

* the latest code that have worked for me on Debian 9 was on the "artful" repository;

четвер, 23 серпня 2018 р.

ConferenceVision build


It was possible to build https://github.com/Microsoft/ConferenceVision

Some details doesn't work, but it builds and run and I was able to get a simple Achievement.

https://github.com/igorkovalchuk/ConferenceVision/tree/linux-build

README-LINUX.md

This application needs Android => 5.0 and it needs lot of Internal Storage to install. I've set 1.5 Gb

The build took 2.5 minutes.

P.S. Don't change the emulator's properties after you have created it, otherwise this application will crash when you open a camera. Probably it doesn't see the sdcard or a file storage after that.



середа, 22 серпня 2018 р.

build #993


I've moved to Xamarin.Android build #993 and Mono 5.14 and nuget,
including the new VSCode 1.25.1 and C# plugin and Monodevelop 7.5

Also I am using the dotnet sdk - it is necessary to build the netstandard2.0 projects and restore the nuget packages.

And I've updated the documentation:
https://goo.gl/mQvTJk

P.S. Monodevelop 7.5 doesn't open the Droid projects.

четвер, 16 серпня 2018 р.

issues :: AotAssemblies and release settings


Don't forget to use <AotAssemblies>false</AotAssemblies> when you build the release apk on Linux.
But I may be wrong, because things are changing from time to time.

Other settings in "Release|AnyCPU" section may include this:

    <DebugSymbols>true</DebugSymbols>
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release</OutputPath>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <AndroidManagedSymbols>true</AndroidManagedSymbols>
    <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>


    <AndroidKeyStore>True</AndroidKeyStore>
    <AndroidSigningKeyStore>/mypathtojks/my_xamarin_keystore.jks</AndroidSigningKeyStore>
    <AndroidSigningStorePass>mystorepass</AndroidSigningStorePass>
    <AndroidSigningKeyAlias>myandroidalias</AndroidSigningKeyAlias>
    <AndroidSigningKeyPass>mykeypass</AndroidSigningKeyPass>

<!--
    <AndroidSupportedAbis>armeabi-v7a;x86;x86_64;arm64-v8a;armeabi</AndroidSupportedAbis>
-->

    <AndroidSupportedAbis>armeabi-v7a</AndroidSupportedAbis>

    <AndroidLinkMode>SdkOnly</AndroidLinkMode>


You may try to use AndroidLinkMode = Full, but for me it doesn't work today.

issues :: msbuild :: "MonoAndroid,Version=v1.0" not found


If msbuild outputs the next error:

The reference assemblies for framework "MonoAndroid,Version=v1.0" were not found.

Please add the TargetFrameworkRootPath to your Droid csproj:

<PropertyGroup>
<AndroidSdkDirectory>/home/myuser/my-android-toolchain-sdk-path</AndroidSdkDirectory>
<TargetFrameworkRootPath>/usr/lib/mono/xbuild-frameworks/</TargetFrameworkRootPath>
</PropertyGroup>

Thanks to Nihal Talur for the TargetFrameworkRootPath advice.

неділя, 29 липня 2018 р.

xamarin-forms-android-linux-tools :: emulator path

If you have this message:

PANIC: Missing emulator engine program for 'x86' CPU.

The newest versions of SDK have a new path

${ANDROID_SDK}/emulator
instead of ${ANDROID_SDK}/tools

https://stackoverflow.com/a/50118004

пʼятниця, 20 липня 2018 р.

funny :: a-no-debugger-land

I have working almost a year on a Xamarin.Forms project where on Linux platform I don't know how to run a debugger. Now I have returned back to the Android, but now I tend to avoid the debugging but writing the logs))

I don't know, maybe it is possible to run the debugger on the Linux+Android+Xamarin.Forms platform, but I afraid that it will take a lot of time to configure, so I haven't configured it.

P.S. I've found an important project which solves this problem. I have not tried it on Linux.

https://github.com/VysotskiVadim/vscode-xamarin-debug
https://github.com/Microsoft/vscode-mono-debug/pull/34
https://youtu.be/RnWTy1D031k

понеділок, 19 лютого 2018 р.

8.0 build

On my previous xamarin-android I can't build and run 8.0 projects - I am getting this exception: I/MonoDroid( 2345): System.MissingMethodException: Method 'Android.Views.View.set_Focusable' not found.

So, I decide to try a newer build #610 (24 Oct 2017 14:05:40) - Revision: a08f8851e2db7c5c44ead3c9a29afc7c2ebc05e4
It works for me:

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

or

https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android-linux/lastStableBuild/Azure/processDownloadRequest/xamarin-android/oss-xamarin.android_8.1.99.90.orig.tar.bz2

cd oss-xamarin.android_v8.1.99.90_Linux-x86_64_HEAD_a08f885/bin/Debug/lib

ln -s xamarin.android/xbuild

ln -s xamarin.android/xbuild-frameworks/

середа, 31 січня 2018 р.

issues :: what to do if I can't build apk on Linux

Today I can't because we have migrated to TargetFrameworkVersion v8.0 and I've got a new issue.

But I still can work with the PCL:

Easiest and fastest solution for me today is to build the apk using the macincloud (using the "x86" ABI for emulator and disabled the "Use Shared Mono Runtime" option), and then using the xfast.sh to work on Linux.

Normally I should try to fix the current Droid build issue, but I have not enough time yet.
I can't say does that library work or not, but now I can build and run the PCL.

Build error (Droid project):

Xamarin.Android.Common.targets (_UpdateAndroidResgen target) ->

.../Droid/obj/Debug/__library_projects__/Xamarin.Android.Support.Design/library_project_imports/res/values-v26/values-v26.xml(2): error APT0000:  Error: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
.../Droid/obj/Debug/__library_projects__/Xamarin.Android.Support.v7.AppCompat/library_project_imports/res/values-v26/values-v26.xml(2): error APT0000:  Error: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'

четвер, 25 січня 2018 р.

issues :: NuGet client version 3.0.0

The 'Xam.Plugin.SecureStorage 1.0.11' package requires NuGet client version '3.0.0' or above, but the current NuGet version is '2.12.0.0'.
I don't know how to resolve it today. Probably I will need to take another/older version of this package (Xam.Plugin.SecureStorage)  if possible.

P.S. The easiest solution that I've found is here:
https://stackoverflow.com/questions/38118548/how-to-install-nuget-from-command-line-on-linux
is to download the nuget.exe 3.3.0 to the project folder and run it with mono:
mono nuget.exe restore