вівторок, 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