пʼятниця, 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.