mtouch argument -aot "nimt-trampolines=512" is causing build failure on VS for Mac 17.3.6 (20) - xamarin

After upgrading Visual Studio to version 17.3.6 (build 20), the Xamarin.iOS project is failing to build with the following error:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.Shared.targets(4,4): Error MSB4028: The "ParseBundlerArguments" task's outputs could not be retrieved from the "Aot" parameter. Parameter "includeEscaped" cannot have zero length. (MSB4028)
The problem lies in the project file itself:
<MtouchExtraArgs>-i18n=west -aot "nimt-trampolines=512" --registrar:static</MtouchExtraArgs>
It's complaning about -aot parameter and it's value. If I replace it with as following (space replaced with equal sign) then all is compiling fine:
<MtouchExtraArgs>-i18n=west -aot="nimt-trampolines=512" --registrar:static</MtouchExtraArgs>
Does anyone can help to confirm that this is a new correct way for specifying the -aot parameter?
My VS details:
Visual Studio Community 2022 for Mac
Version 17.3.6 (build 20)
Installation UUID: 2895cffa-b375-4042-bae5-5ad18ed7c073
Runtime
.NET 6.0.5 (64-bit)
Architecture: X64
Roslyn (Language Service)
4.3.0-3.22312.2+52adfb8b2dc71ed4278debcf13960f2116868608
NuGet
Version: 6.2.1.2
.NET SDK (x64)
SDK: /usr/local/share/dotnet/sdk/6.0.401/Sdks
SDK Versions:
6.0.401
3.1.423
MSBuild SDKs: /Applications/Visual Studio.app/Contents/MonoBundle/MSBuild/Current/bin/Sdks
.NET Runtime (x64)
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
6.0.9
5.0.17
3.1.29
Xamarin.Profiler
Version: 1.8.0.19
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
Updater
Version: 11
Xamarin Designer
Version: 17.3.0.208
Hash: 0de472ea0
Branch: remotes/origin/d17-3
Build date: 2022-09-22 15:23:48 UTC
Apple Developer Tools
Xcode 14.0.1 (21336)
Build 14A400
Xamarin.Mac
Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.
Xamarin.Android
Version: 13.0.0.0 (Visual Studio Community)
Commit: xamarin-android/d17-3/030cd63
Android SDK: /Users/danielklokov/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
12.1 (API level 32)
12.0 (API level 31)
11.0 (API level 30)
13.0 (API level 33)
SDK Command-line Tools Version: 7.0
SDK Platform Tools Version: 33.0.2
SDK Build Tools Version: 32.0.0
Build Information:
Mono: dffa5ab
Java.Interop: xamarin/java.interop/d17-3#7716ae53
SQLite: xamarin/sqlite/3.38.5#df4deab
Xamarin.Android Tools: xamarin/xamarin-android-tools/main#14076a6
Microsoft Build of OpenJDK
Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk
11.0.12
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
Eclipse Temurin JDK
Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk
1.8.0.302
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
Android SDK Manager
Version: 17.3.0.23
Hash: 965bf40
Branch: remotes/origin/d17-3
Build date: 2022-09-22 15:23:52 UTC
Android Device Manager
Version: 0.0.0.1169
Hash: fafb1d5
Branch: fafb1d5
Build date: 2022-09-22 15:23:52 UTC
Xamarin.iOS
Version: 16.0.0.72 (Visual Studio Community)
Hash: 6756a1146
Branch: release/6.0.4xx-xcode14
Build date: 2022-09-21 08:51:06-0400
Build Information
Release ID: 1703060020
Git revision: f7a6334599543f127e737d6de1f362bbe36cebca
Build date: 2022-09-22 15:21:08+00
Build branch: release-17.3
Build lane: release-17.3
Operating System
Mac OS X 12.6.0
Darwin 21.6.0 Darwin Kernel Version 21.6.0
Mon Aug 22 20:17:10 PDT 2022
root:xnu-8020.140.49~2/RELEASE_X86_64 x86_64

You should specify the -aot parameter like below:
--aot=ARGUMENT
Add ARGUMENT as an argument to the static compiler.

Related

How to execute Embeddinator-4000 within VisualStudio

I am new to VisualStudio and need help with how to generate a library to be employed with a Native Android Application.
I can build my c# solution/project in VisualStudio fine and have installed NuGet package manager and Embeddinator-4000.
what I can see is how to execute Embeddinator-4000 for it to convert the .dll files and create the artefact to install in my Android Application.
How do I achieve the desired result inside VisualStudio?
Visual Studio Community 2022 for Mac
Version 17.3.6 (build 20)
Installation UUID: f14a24a9-88a8-4bb2-96e9-94f5129c52fd
Runtime
.NET 6.0.5 (64-bit)
Architecture: X64
Roslyn (Language Service)
4.3.0-3.22312.2+52adfb8b2dc71ed4278debcf13960f2116868608
NuGet
Version: 6.2.1.2
.NET SDK (x64)
SDK: /usr/local/share/dotnet/sdk/6.0.401/Sdks
SDK Versions:
6.0.401
3.1.423
MSBuild SDKs: Not installed
.NET Runtime (x64)
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
6.0.9
3.1.29
Xamarin.Profiler
'/Applications/Xamarin Profiler.app' not found
Updater
Version: 11
Apple Developer Tools
A valid Xcode installation was not found at the configured location: '/Library/Developer/CommandLineTools'
Xamarin.Mac
Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.
Xamarin.iOS
Xamarin.iOS not installed.
Can't find mtouch or the Version file at /Library/Frameworks/Xamarin.iOS.framework/Versions/Current.
Xamarin.Android
Not Installed
Microsoft Build of OpenJDK
Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk
11.0.12
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
Eclipse Temurin JDK
Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk
1.8.0.302
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
Android SDK Manager
Version: 17.3.0.23
Hash: 965bf40
Branch: remotes/origin/d17-3
Build date: 2022-09-22 15:23:52 UTC
Android Device Manager
Version: 0.0.0.1169
Hash: fafb1d5
Branch: fafb1d5
Build date: 2022-09-22 15:23:52 UTC
Xamarin Designer
Version: 17.3.0.208
Hash: 0de472ea0
Branch: remotes/origin/d17-3
Build date: 2022-09-22 15:23:48 UTC
Build Information
Release ID: 1703060020
Git revision: f7a6334599543f127e737d6de1f362bbe36cebca
Build date: 2022-09-22 15:21:08+00
Build branch: release-17.3
Build lane: release-17.3
Operating System
Mac OS X 10.15.7
Darwin 19.6.0 Darwin Kernel Version 19.6.0
Tue Nov 10 00:10:30 PST 2020
root:xnu-6153.141.10~1/RELEASE_X86_64 x86_64
Enabled user installed extensions
NuGet Package Explorer 0.10
NuGet Package Management Extensions 0.31

MvvmCross 6.4.1 not can be update with PCL project with Xamarin

How do I solve the "Package MvvmCross 6.4.1 is not compatible" error? I am using NETPortable,Version=v4.6,Profile=Profile44.
Here's the diagnostic logs:
Estou tentando atualizar o package do MvvmCross para o 6.4.1 em projeto PCL com o visual Studio for Mac:
*"Package MvvmCross 6.4.1 is not compatible with portable46-net451+win81 (.NETPortable,Version=v4.6,Profile=Profile44). Package MvvmCross 6.4.1 supports"*
Visual Studio detials:
"Visual Studio Community 2019 for Mac
Version 8.3.11 (build 1)
Installation UUID: 358942d8-ccc4-4e01-be4d-8b50089ff31c
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.16.1.24 (d16-3 / 08809f5b)
Package version: 604000208
Mono Framework MDK
Runtime:
Mono 6.4.0.208 (2019-06/07c23f2ca43) (64-bit)
Package version: 604000208
Xamarin Designer
Version: 16.3.0.256
Hash: 8a223bfd7
Branch: remotes/origin/d16-3
Build date: 2019-11-01 21:02:02 UTC
NuGet
Version: 5.3.0.6192
.NET Core SDK
SDK: /usr/local/share/dotnet/sdk/3.0.101/Sdks
SDK Versions:
3.0.101
3.0.100
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.4.0/lib/mono/msbuild/Current/bin/Sdks
.NET Core Runtime
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
3.0.1
3.0.0
2.1.14
2.1.13
Xamarin.Profiler
Version: 1.6.12.29
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
Updater
Version: 11
Apple Developer Tools
Xcode 11.2.1 (15526.1)
Build 11B53
Xamarin.Mac
Version: 6.6.0.12 (Visual Studio Community)
Hash: e3c2b406d
Branch: xcode11.2
Build date: 2019-11-01 00:12:07-0400
Xamarin.iOS
Version: 13.6.0.12 (Visual Studio Community)
Hash: e3c2b406d
Branch: xcode11.2
Build date: 2019-11-01 00:12:08-0400
Xamarin.Android
Not Installed
Microsoft Mobile OpenJDK
Java SDK: /Users/iterative/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
Android SDK Manager
Version: 1.4.0.65
Hash: c33b107
Branch: remotes/origin/d16-3
Build date: 2019-11-19 20:33:22 UTC
Android Device Manager
Version: 1.2.0.116
Hash: d2b2af0
Branch: remotes/origin/d16-3
Build date: 2019-11-19 20:33:42 UTC
Xamarin Inspector
Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1
Build Information
Release ID: 803110001
Git revision: 6ee6ad2ec46ae5a08a1999ee4c815ac656a35b91
Build date: 2019-12-05 16:09:27+00
Build branch: release-8.3
Xamarin extensions: 56bd70ef2e327f71c615cfc29a47fd50685fadcb
Operating System
Mac OS X 10.14.6
Darwin 18.7.0 Darwin Kernel Version 18.7.0
Tue Aug 20 16:57:14 PDT 2019
root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64"
Welcome to SO!
The reason you are getting the error is because the version of Nuget Package you are trying to add is Not Compatible with the target framework of your project.
You have two options:
You would have to either convert your project to use .NET Standard from PCL, as shown here. It can be painful if your solution is big and old. Personally I suggest starting from a blank .NET Standard project and bringing in items from your existing project instead one at a time.
Or you have to use a lower version of MVVMCross.
I would suggest staying away from the second option though, because the lower MVVMCross package does not support Android Target Framework 10.0, and it will bite you in the distant future.

Why can't Visual Studio find my assemblies?

I'm new to Visual Studio, but not to programming. I tried to open a project which someone else sent me, and there are lots of errors (they are all the same). Please see the image below:
When I tried to check the runtimes installed, I see this:
I know that Newtonsoft.Json is installed, because I can see it in the packages folder.
So far I have looked at:
Getting "type or namespace name could not be found" but everything seems ok?
But I can't figure out how to fix the problem, as I'm using VS after several years. What should I do ?
I am using Visual Studio for Mac Community edition, version 8.2.3 (build 16)
EDIT: More Information from about Visual Studio:
=== Visual Studio Community 2019 for Mac ===
Version 8.2.3 (build 16) Installation UUID:
024bbaaf-47dd-4755-982d-29b842a90ef4 GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.14.0.85 (d16-2-fix-mac-updates / 86973979)
Package version: 600000319
=== Mono Framework MDK ===
Runtime: Mono 6.0.0.319 (2019-02/52203786470) (64-bit) Package
version: 600000319
=== NuGet ===
Version: 5.1.0.6013
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet Runtime Versions:
2.1.12
2.1.2 SDK: /usr/local/share/dotnet/sdk/2.1.701/Sdks SDK Versions:
2.1.701
2.1.302 MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.0.0/lib/mono/msbuild/Current/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.6.11 Location: /Applications/Xamarin
Profiler.app/Contents/MacOS/Xamarin Profiler
=== Updater ===
Version: 11
=== Xamarin.Android ===
Version: 9.4.1.0 (Visual Studio Community) Commit:
xamarin-android/d16-2/ebd65c9 Android SDK:
/Users/morgoth/Library/Android/sdk Supported Android versions:
4.4 (API level 19)
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)
SDK Tools Version: 26.1.1 SDK Platform Tools Version: 29.0.1 SDK Build
Tools Version: 28.0.3
Build Information: Mono: mono/mono/2019-02#e6f5369c2d2 Java.Interop:
xamarin/java.interop/d16-2#d64ada5 LibZipSharp:
grendello/LibZipSharp/d16-2#caa0c74 LibZip:
nih-at/libzip/rel-1-5-1#b95cf3f ProGuard:
xamarin/proguard/master#905836d SQLite: xamarin/sqlite/3.27.1#8212a2d
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-2#6f6c969
=== Microsoft Mobile OpenJDK ===
Java SDK:
/Users/morgoth/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL
=== Android Device Manager ===
Version: 1.2.0.60 Hash: 686c817 Branch: remotes/origin/d16-2 Build
date: 2019-08-07 15:49:58 UTC
=== Apple Developer Tools ===
Xcode 10.3 (14492.2) Build 10G8
=== Xamarin.Mac ===
Version: 5.14.0.114 (Visual Studio Community) Hash: c6691164 Branch:
d16-2 Build date: 2019-07-29 15:54:06-0400
=== Xamarin.iOS ===
Version: 12.14.0.114 (Visual Studio Community) Hash: c6691164 Branch:
d16-2 Build date: 2019-07-29 15:54:05-0400
=== Xamarin Designer ===
Version: 16.2.0.379 Hash: 3f0652957 Branch: remotes/origin/d16-2 Build
date: 2019-08-01 17:32:50 UTC
=== Xamarin Inspector ===
Version: 1.4.3 Hash: db27525 Branch: 1.4-release Build date: Mon, 09
Jul 2018 21:20:18 GMT Client compatibility: 1
=== Build Information ===
Release ID: 802030016 Git revision:
f438e4b3ac81dbc614da2f2d9ac3c70ea2e5c350 Build date: 2019-08-09
09:07:01+00 Build branch: release-8.2 Xamarin extensions:
67f026710e882e318fb0c90077b429be3dc0e688
=== Operating System ===
Mac OS X 10.14.5 Darwin 18.6.0 Darwin Kernel Version 18.6.0
Thu Apr 25 23:16:27 PDT 2019
root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
I opened the project in VS 2017 on Windows 10. I uninstalled Newtonsoft.json, and reinstalled it. Everything seems to work (on Windows). I guess VS for Mac isn't pulling its weight.

Visual Studio 2019 for Mac: debugger doesn't connect to iOS device

I'm trying to debug a long suffered Xamarin app using visual studio 2019 on a brand new MacBook Pro (Mojave).
The solution builds, transfers to the device and starts the app, but the debugger will connect neither via cable or wifi. A dummy project in Visual Studio for Mac won't connect either, though a dummy project in xcode will.
VS just says "waiting for the debugger to connect to ... on port 10000 via Wifi"
Here are my VS details:
Visual Studio Community 2019 for Mac
Version 8.1.3 (build 19)
Installation UUID: 76ac8505-c20b-434f-95d4-c8266d3517f2
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.6.0.25 (d16-0 / 50f75273)
Package version: 518010028
Mono Framework MDK
Runtime:
Mono 5.18.1.28 (2018-08/223ea7ef92e) (64-bit)
Package version: 518010028
NuGet
Version: 5.0.2.5988
.NET Core
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
3.0.0-preview6-27804-01
2.1.11
2.1.9
SDK: /usr/local/share/dotnet/sdk/3.0.100-preview6-012264/Sdks
SDK Versions:
3.0.100-preview6-012264
2.1.700
2.1.505
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Sdks
Xamarin.Profiler
Version: 1.6.10
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
Updater
Version: 11
Xamarin.Android
Not Installed
Microsoft Mobile OpenJDK
Java SDK: Not Found
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
Android Device Manager
Version: 1.2.0.44
Hash: aac645b
Branch: remotes/origin/d16-1
Build date: 2019-05-29 19:55:24 UTC
Xamarin Designer
Version: 16.1.0.467
Hash: f1657e133
Branch: remotes/origin/d16-1-new-document-model
Build date: 2019-06-18 21:57:42 UTC
Apple Developer Tools
Xcode 10.2.1 (14490.122)
Build 10E1001
Xamarin.Mac
Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.
Xamarin.iOS
Version: 12.10.0.157 (Visual Studio Community)
Hash: 6bd94753
Branch: d16-1
Build date: 2019-06-12 17:28:47-0400
Xamarin Inspector
Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1
Build Information
Release ID: 801030019
Git revision: 2d04b0145da8aa946d2cc9898fe2a59484e4f3f4
Build date: 2019-06-26 15:34:25+00
Build branch: release-8.1
Xamarin extensions: de240bddd6d1f96bfb1e7d11ce7ac5398956fe1d
Operating System
Mac OS X 10.14.5
Darwin 18.6.0 Darwin Kernel Version 18.6.0
Thu Apr 25 23:16:27 PDT 2019
root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
Help.
These errors are usually hidden now in VS 2019 for Mac sadly. You need to look at the Build Output window to exactly determine what causes this malfunction.
The behavior you described does not belong to a specific kind of error, it only means that VS didn't visually show its description, rather got stuck because the run process failed while trying to put the build on the physical device.
First of all , ensure xcode and visual studio version the latest.
Also try
Manually start the application by tapping the icon
Deleting the app from the device and redeploying it
Rebooting the device
Change Debugger port
Check this thread : https://forums.xamarin.com/discussion/94088/xamarin-studio-waiting-for-debugger-to-connect-to-the-ios-simulator

VS Mac upgrade to 7.2 (build 636) MonoDevelop.CSharp.Project.CSharpProject exception

I just did a stable update of VS Mac Community Edition this morning. The current version shown is 7.2 (build 636). I added the entire About Details below. I'm not sure what specific version I upgraded from, but it was the most recent version before this as I stay up to date.
After doing the upgrade, which worked without displaying an error, I get this message when opening an iOS solution:
Error while trying to load the project '/path/to/project.csproj'. The
type initializer for 'MonoDevelop.CSharp.Project.CSharpProject' threw
an exception.
After dismissing that message, I get another error message with a list of this same error message:
The type initializer for
'MonoDevlop.ide.TypeSystem.MonoDevelopWorkspace' threw an exception.
I did a reboot of the machine, and I still see the error. My next step is to do a complete uninstall/reinstall, but before I do, can someone recommend a less time-consuming approach for diagnosing and fixing this error?
About Details
=== Visual Studio Community 2017 for Mac ===
Version 7.2 (build 636) Installation UUID:
56e643f6-0a84-4995-b464-438c06eb25ee Runtime: Mono 5.4.0.201
(2017-06/71277e78f6e) (64-bit) GTK+ 2.24.23 (Raleigh theme)
Package version: 504000201
=== NuGet ===
Version: 4.3.1.4445
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet Runtime Versions:
2.0.0
1.1.1
1.0.4 SDK: /usr/local/share/dotnet/sdk/2.0.0/Sdks SDK Versions:
2.0.0
1.0.3 MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.0/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.5.6 Location: /Applications/Xamarin
Profiler.app/Contents/MacOS/Xamarin Profiler
=== Xamarin.Android ===
Version: 8.0.0.33 (Visual Studio Community) Android SDK:
/Users/danmiser/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
6.0 (API level 23)
SDK Tools Version: 25.2.5 SDK Platform Tools Version: 26.0.0 SDK Build
Tools Version: 25.0.3
Java SDK: /usr java version "1.8.0_101" Java(TM) SE Runtime
Environment (build 1.8.0_101-b13) Java HotSpot(TM) 64-Bit Server VM
(build 25.101-b13, mixed mode)
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Xamarin Inspector ===
Version: 1.3.2 Hash: 461f09a Branch: 1.3-release Build date: Tue, 03
Oct 2017 18:26:57 GMT Client compatibility: 1
=== Apple Developer Tools ===
Xcode 9.0 (13247) Build 9A235
=== Xamarin.iOS ===
Version: 11.2.0.11 (Visual Studio Community) Hash: 2f8bbec0 Branch:
d15-4-xi Build date: 2017-10-05 20:56:05-0400
=== Xamarin.Mac ===
Version: 3.8.0.49 (Visual Studio Community)
=== Build Information ===
Release ID: 702000636 Git revision:
b349c8fc0c2e1aab0179917d56eed75eb3a03337 Build date: 2017-10-06
15:20:04-04 Xamarin addins: a8da992c78f7eb65b3cdb3f951c34a30337cab35
Build lane: monodevelop-lion-d15-4
=== Operating System ===
Mac OS X 10.12.6 Darwin 16.7.0 Darwin Kernel Version 16.7.0
Thu Jun 15 17:36:27 PDT 2017
root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
=== Enabled user installed addins ===
MFractor 3.00.16
Ensure that you have MFractor extension 'Updated' or Uninstalled. That work for me.
Check:
Visual Studio Community Menu (Top) -> Extensions.... -> Upgrades Tab
Open Extension Editor
Check Upgrades (I remove the extension)

Resources