We are currently having issues with AzureDevops hosted build servers when trying to build our application.
This is the following error we get:
MTOUCH : error MT2101: Can't resolve the reference 'System.Void
ObjCRuntime.Runtime::ReleaseBlockOnMainThread(System.IntPtr)',
referenced from the method 'System.Void
ObjCRuntime.Trampolines/NIDCompletionHandler::Finalize()' in
'Xamarin.iOS, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=84e04ff9cfb79065'.
[/Users/vsts/agent/2.155.1/work/4/s/Smartphone/......]
We have determined that this is an issue regarding the Xamarin.iOS SDK Version that the Build server is using. When running locally on Xamarin.iOS SDK 12.14.0.114, the build completes fine.
Is there anyway to specify which version an AzureDevOps server uses? I know you can use something similar to :
/bin/bash -c "sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh 5_18_1"
/bin/bash -c "echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]'/Applications/Xcode_10.1.app;sudo xcode-select --switch /Applications/Xcode_10.1.app/Contents/Developer"
In order to change the Mono version. What we really need is a way to select the iOS SDK version.
You can install newer iOS SDK versions using the Boots tool.
Just install it, add the step to your pipeline and put in the installer uri you need.
The download uri is https://dl.xamarin.com/MonoTouch/Mac/xamarin.ios-13.8.2.2.pkg (obviously switch to whatever Xamarin.iOS version you require).
By selecting the Mono version via the Bash script above (select-xamarin-sdk.sh), you set the corresponding Xamarin.iOS SDK version as well. If you use the latest Mono version (6.8.0 at this writing), you set the recent Xamarin.iOS SDK version at the same time.
See James Montemagno's blog entry about this.
Related
Running a .NET Core project on a Mac with .NET 6.0 installed causes a strange error.
lukepuplett#Lukes-Air > ~/Documents/Git/Repo/src/Corp.App.Mvc > > master ± > dotnet run Corp.App.Mvc.csproj
A fatal error occurred. The required library libhostfxr.dylib could not be found.
If this is a self-contained application, that library should exist in [/Users/lukepuplett/Documents/Git/Repo/src/Corp.App.Mvc/bin/Debug/net5.0/].
If this is a framework-dependent application, install the runtime in the global location [/usr/local/share/dotnet/x64] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [/etc/dotnet/install_location].
The .NET runtime can be found at:
- https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=osx.11.1-x64&apphost_version=5.0.12
Note that the project builds fine.
macOS Monterey, Apple Silicon M1 and .NET 6.0 is installed.
This can occur when the project is targeting an older .NET Core version. The error is confusing because the project may build okay, and you'd expect a more accurate message.
A better message can be seen when executing the compiled binary directly, see below.
lukepuplett#Lukes-Air > ~/Documents/Git/Repo/src/Corp.App.Mvc/bin/Debug/net5.0 > > master ± > dotnet Corp.App.Mvc.dll
It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '5.0.0' (arm64) was not found.
- The following frameworks were found:
6.0.0 at [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
- https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=5.0.0&arch=arm64&rid=osx.11.1-arm64
The problem can happen when you've pulled down code from a Git repo that is targeting .NET Core 5, for example.
Some example code I'm playing with informs me that I need ASP.NET Core Runtime 2.1.14. I found it here. I'm on macOS and there is no installer, so I downloaded the "binaries" at the link "x64" under the heading "ASP.NET Core Runtime 2.1.14" on the right. I extracted the compressed folder, called "aspnetcore-runtime-2.1.14-osx-x64", which has the following contents:
dotnet
host
LICENSE.txt
shared
ThirdPartyNotices.txt
Now, I haven't the foggiest idea what I should do with these to install ASP.NET Core Runtime 2.1.14. Could someone please tell me what I should do?
To build and run ASP.NET Core apps on macOS, you need to install the SDK which also contains the runtime. There's an installer for that on the page you linked.
You can check the installed SDKs using dotnet --list-sdks and see where are they located. Same goes for the runtimes with dotnet --list-runtimes. The .NET CLI chooses the SDK version for each dotnet command, so in your case it will pick the one compatible with the version specified in your project. By default, it would use the latest.
There is an installer for MacOS on the download page for 2.1 you visited:
Make sure to download the SDK (it includes the Runtime) in the column Installers, not Binaries.
Then install it as any MacOS application. Once you did it, you can type dotnet --version in a terminal and it will return the version you just installed.
I have a problem completing NativeScript installation requirement. I got stuck at number 5 in the installation guide available here.
When i run the command "tns doctor" in the command prompt, i get the error message below:
Cannot find a compatible Android SDK for compilation. To be able to
build for An droid, install Android SDK 22 or later. Run $
%ANDROID_HOME%\tools\android to manage your Android SDK versions.
You need to have the Android SDK Build-tools installed on your system.
You can i nstall any version in the following range: '>=23 <=27'. Run
$ %ANDROID_HOME%\tools\android from your command-line to install
required An droid Build Tools.
You need to have Android SDK 22 or later and the latest Android
Support Reposito ry installed on your system. Run $
%ANDROID_HOME%\tools\android to manage the Android Support Repository.
I have installed the required sdk and i am still getting the same error message and every time i execute this script in the console, it takes like forever to complete:
"%ANDROID_HOME%\tools\bin\sdkmanager" "tools" "platform-tools"
"platforms;android-25" "build-tools;25.0.2"
"extras;android;m2repository" "extras;google;m2repository"
On OSX, when running an android gradle build it gives me the following:
android-sdk-macosx/cmake/3.6.3155560/bin/cmake: cannot execute binary file
I've tried
chmod +x,
reinstalling the android sdk build tools
googling
OSX 10.11.6 Gradle 2.14.1 Android SDK 23.0.2
Its a Superpowered(.com) Android project
After upgrading to Android Studio 2.2, it installed cmake and it now works correctly. Its unclear exactly why as it seems to be the same exact version of cmake.
Part of the problem was that I was actually using the latest stable version of IntelliJ which is still using Android Studio <2.2 level.
I have create a new Mobile Module Project, but when i try to build it, i have this error:
BUILD FAILED
C:\ProgramData\Titanium\mobilesdk\win32\5.2.2.GA\module\android\build.xml:165:
no executable specified
Did something wrong? I did the following step:
-Installed Appcelerator Studio
-It automatically installed Titanium SDK and i selected to install Android SDK
-Installed JAVA JDK
-Createed new module and tryed to build it
To fix this, edit the file:
C:\ProgramData\Titanium\mobilesdk\win32\5.2.2.GA\module\android\build.xml
Or for any newer SDK versions, just use e.g. 5.3.1 instead of 5.2.2
On line 159, add ".exe" to aidl, like so:
TO
To develop android module you will have to install some additional component and configure some path variables. There is a nice quick start guide where you will find everything. Thinks that need to install:
Android NDK
Ant
Eclipse Java Development Tools plugin
Android Development Tools plugin
gperf
Python
Documentation Link