Issue while building IOS app in visual studio - c#

Severity Code Description Project File Line Suppression State
Error The type 'CoreLocation.CLBeaconIdentityConstraint' (used as a
parameter in
CoreLocation.CLLocationManager/_CLLocationManagerDelegate.DidFailRangingBeacons)
is not available in iOS 12.2 (it was introduced in iOS 13.0). Please
build with a newer iOS SDK (usually done by using the most recent
version of Xcode).
Note: I did not face this issue before a day, suddenly I was getting this Error,Can anyone help out.
OS version : 10.14.5
Xcode 10.2

The latest version of Xcode is 11.3.1 and you are running 10.2. The message you posted suggests using the most recent version. Here is a post explaining how to upgrade Xcode: How do you update Xcode on OSX to the latest version?
In all likelihood, some change you made to the app caused the need to upgrade.

You recently use _CLLocationManagerDelegate.DidFailRangingBeacons in your project and it is only available in iOS 13.
While with XCode 10.2 you use, it uses sdk iOS 12.2. That method is not available under your current version of XCode so you get the error message.
Solution is update both your Visual-Studio and XCode to meet the iOS 13 SDK requirement.
Here is the Visual Studio 2019 Release Notes

Related

C# MAUI - Pair to Mac failed with "No receiver was found for topic xvs/idb/initialize-dotnet-sdk"

Running C# MAUI for Android/Windows and it build and runs well.
Now, i want to build and run for iOS but get problems.
When installed Visual studio for Mac, XCode on a Mac and using Pair to Mac I get this error:
Error dotnet validation failed, an unexpected error occurred No
receiver was found for topic xvs/idb/initialize-dotnet-sdk
Someone got this problem?
Some details about the setups I have:
My developer computer, Windows 10:
Microsoft Visual Studio Community 2022
Version 17.4.3
VisualStudio.17.Release/17.4.3+33205.214
Microsoft .NET Framework
Version 4.8.04084
...
VisualStudio.Mac 1.0
...
Xamarin 17.4.0.312 (d17-4#be7e8d1)
Visual Studio extension to enable development for Xamarin.iOS and
Xamarin.Android.
...
Xamarin.iOS and Xamarin.Mac SDK 16.1.1.27 (933c6c2c9)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
My Mac, MacOS Monterey 12.6.2
Microsoft Visual Studio for Mac 17.4.2 (Build 17)
...
.NET 6.0.12 (64-bit)
Architecture: X64
...
Apple Developer Tools
Xcode 14.2 (21534)
Build 14C18
...
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.
In my case Visual studio restart helped
What version is your Maui project, .Net 6 or .Net 7? If it is .Net 7. You need to install the latest Visual Studio 2022 for Mac version 17.5 Preview on your Mac. You can also check the following:
1.You can also check whether your Mac is enabled for remote login (open System Preferences and go to the Sharing pane->Check Remote Login in the Service list- >configured to allow access for All users).
2.You can right-click your project and select Properties->iOS->Build->Linker behavior to check whether you have selected Link Framework SDKs Only.
3.According to your error
Xamarin.Mac not installed.
Xamarin.iOS not installed.
You can check whether Xamarin.iOS and Xamarin.Mac are installed on your Mac when installing VS.
For more details, you can refer to the official document:
Installation
Pair to Mac for iOS development

Visual studio for some reason says that i don't have netcore installed even tho i do (macos)

i wanted to make pong with monogame using C# but VS told me otherwise...
Error: .NET Core 6.0 SDK is required to build this application, and is not installed.
Install the latest update to the .NET Core 6.0 SDK by visiting https://aka.ms/vs/mac/install-netcore6 (Pong)
but it is installed, i just don't understand
i even reinstalled it, but it didn't work
(Yeah, i know, installing .net on mac IS a stupid idea, but i didn't find a way to get monogame running with mono.)
You already know that i just wanted no errors but i got one

Running dotnet run from terminal Mac M1 .net SDK

I am running Visual Studio 2019 on a MacBook Air M1 and I have installed and downloaded the .NET Core SDK. When I am trying to run an asp.net solution from the terminal with the 'dotnet run' command I get the following message:
Failed to load /opt/homebrew/Cellar/dotnet/6.0.103/libexec/host/fxr/6.0.3/libhostfxr.dylib, error: dlopen(/opt/homebrew/Cellar/dotnet/6.0.103/libexec/host/fxr/6.0.3/libhostfxr.dylib, 0x0001): tried: '/opt/homebrew/Cellar/dotnet/6.0.103/libexec/host/fxr/6.0.3/libhostfxr.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
The library libhostfxr.dylib was found, but loading it from /opt/homebrew/Cellar/dotnet/6.0.103/libexec/host/fxr/6.0.3/libhostfxr.dylib failed
Installing .NET prerequisites might help resolve this problem.
I have installed and downloaded both the .net SDK for 3.1, 5.0 and 6.0. The solution runs fine from the play button in Visual Studio, but it will not work with the command.
I am just wondering if anyone knows if there is a workaround on this?
Thanks in advance!

Unable to install Xamarin.Android.Support.Compat

I'm working on android project, for which I'm using xamarin.
So after creating a blank application which has a target version 6.0 Marshmallow, I'm trying to install Xamarin.Android.Support.Compat nuget library, but I'm getting this error
Could not install package 'Xamarin.Android.Support.Compat 24.2.1'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v6.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
I don't know how to solve this issue. I'm new to mobile developing.
Could anyone please help me with this issue. I'm sure I'm not the one with this issue here.
Thanks before hands.
You'll need to install API 24(7.0) and set your Droid TargetFrameworkVersion to Android 7.0 or bigger.
Read the following documentation about android versions.
All the API version , included version 25, are installed and the Target Version is set to Android 7.0, but I'm still getting that error message.
We should always use the same API level as the version for the Support Libraries you reference, for the Xamarin.Android.Support.Compat lib version 24.2.1, it is for API level 24 (Android 7.0). We need to make sure Target Android version as well as the Compile using Android version are all set to Android 7.0 in order to install this package of version 24.2.1 or 25.1.1.
For API level 23(Android 6.0), the package version should be 23.x, but I just failed to find the package of that version.
Restart Your Pc. It fixed for me
even i was doing every thing right while installing support v7 but i was getting the same error as yours so i restarted my pc and tried installing again and it has successfully installed.

Mono for Android 4.0 Error compilation

I have updated the lates version of mono for android 4.0, and in the runtime itg gets me an Internal Error. Argument cannot be null. Parameter name: source.
How can I fix it?
What version of MonoDevelop are you running? Mono for Android 4.0 requires v2.8.4.1
http://android.xamarin.com/Releases/Mono_for_Android_4/Release_4.0.0
Edit: This was brought up on the mailing list today and is a bug:
This is a bug that's been identified today, and it's due to the project having external assembly references. While this is being fixed, disable "Fast Deployment" on the Project Options / Mono for Android Build panel.
This was just fixed in MonoDevelop 2.8.4.2.
Download from: http://monodevelop.com/Download

Categories

Resources