Application could not be uploaded to the device - xamarin.forms

Following are the details about Xamarin, studio and Mac:
Visual Studio Community 2019 for Mac
Version 8.6.8 (build 2)
Xamarin.Mac 6.18.0.23
.NET Core SDK
SDK: /usr/local/share/dotnet/sdk/3.1.302/Sdks
SDK Version: 3.1.302
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.10.0/lib/mono/msbuild/Current/bin/Sdks
.NET Core Runtime
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
3.1.6
2.1.20
Xamarin.Profiler
Version: 1.6.15.68
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
Updater
Version: 11
Apple Developer Tools
Xcode 12.0 (17189.4)
Build 12A8169g
Xamarin.iOS
Version: 13.18.2.1 (Visual Studio Community)
Operating System
Mac OS X 10.15.6
Darwin 19.6.0 Darwin Kernel Version 19.6.0
Issue:
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mlaunch -sdkroot "/Applications/Xcode-beta.app/Contents/Developer" --installdev "/Users/*******/Projects/testApp/testApp/bin/iPhone/Debug/device-builds/iphone11.6-13.5.1/testApp.app" --device ios "--devname=iPhone XS Max" --install-progress
error HE0004: Could not load the framework 'IDEKit' (path: /Applications/Xcode-beta.app/Contents/Frameworks/IDEKit.framework/IDEKit): dlopen(/Applications/Xcode-beta.app/Contents/Frameworks/IDEKit.framework/IDEKit, 1): Library not loaded: #rpath/DVTAnalyticsKit.framework/Versions/A/DVTAnalyticsKit
Referenced from: /Applications/Xcode-beta.app/Contents/Frameworks/IDEKit.framework/Versions/A/IDEKit
Reason: image not found
All the paths are correct and file exist there.
This is just a sample project and its failing to deploy on physical device. I am able to deploy via XCode but it fails via Mac Visual Studio. Need some help here. I am going to install different version of XCode and try it.

If you are using Xcode 12 beta you need a newer version of Xamarin.iOS from the xcode12 branch. Quoting from the wiki on how to get a build from the said branch:
If you go to our commits page you should be able to see a green checkmark (✔) or a red cross mark (✘) at the right side of the committer's handle. If you click the checkmark (it's usually best to use builds with green checkmarks, but in some cases there may be none, in which case you can likely use builds with red checkmarks as well) you should see a details link which will provide download links for both Xamarin.iOS and Xamarin.Mac packages for that specific commit. Once in a while a commit may not have associated builds (this can occur both for red and green builds) - just try a different commit.
Make sure you download the "Notarized" version of the pkgs.

Uninstalled Xcode 12 beta and installed Xcode 11.6 (Hosted in VM).
It worked successfully.
Now i am able to deploy from Visual Studio 2019 running on windows.

Related

VSCode Omnisharp server A .NET 6 SDK for x86_64 was not found

Omnisharp does not seem to recognize my installed .NET sdk (version 6.0.408).
I have tried manually adding this path via settings to Omnisharp: SDK path i.e.:
C:\Program Files\dotnet\sdk\6.0.403
I have also tried reinstalling the SDK and even VSCode.
This does not seem to solve the issue however, and I am unable to run my asp.net application on VSCode. Running dotnet run from the terminal is fine.
TLDR: Both .NET SDK versions and Visual Studion versions needed to be x64.
Here was the exact error I was seeing in the Output Window:
[ERROR] A .NET 6 SDK for x86_64 was not found. Please install the
latest x86_64 SDK from
https://dotnet.microsoft.com/en-us/download/dotnet/6.0.
[ERROR] Error: OmniSharp server load timed out. Use the
'omnisharp.projectLoadTimeout' setting to override the default delay
(one minute).
When I realized there was a mismatch between my .NET SDKs and Visual Studio Code in terms of being x86 and x64, I did the following:
Deleted the bin/obj folders and .vscode folders in my VS Code project.
Uninstalled my .NET SDKs via Windows (Setings > Apps).
Uninstalled Visual Studio Code via Windows (Setings > Apps).
Installed .NET 7.0 x64 and .NET 6.0 x64.
Opened PowerShell and ran dotnet --info to make sure my .NET runtime and SDK were appearing correctly.
Installed Visual Studio Code x64.
Used PowerShell and cd'd to my project folder. Did a dotnet restore. Then launched Visual Studio Code using code . command.
I could then use the most current version of the VS Code extension (v1.25.2).
Uninstalling and then installing the VSCode extension C# for Visual Studio Code solved the issue for me.
I had the same problem and just solved it. Copy and pasting this from a Youtube comment I just finished writing, so it might sound funny out of context, but the good bits are in there. Hope it helps.
Installed dotnet 7.0, but then it said dotnet 6 was missing...
So I deleted the script asset, exited Unity, went back to their website and installed Net 6.0.403
Error still happened.
I'll note this seemed to push a script compiling error out to Unity in the inspector window, as well.
Deleted the script asset again, exited Unity again, then uninstalled both dotnet 7 and dotnet 6.
Then I reinstalled dotnet 6.
Into unity, made a new script, opened it, and this time no error message about missing net 6.
I just started yesterday. Literally. So if my solution is trash, I'll laugh with you lol. Best of luck.

Upgrading runtime and sdk and packages to .NET 6

I was following this tutorial on building an application with ASP.NET Core API and Angular where I used a laptop that had .NET 5 installed.
I got a new laptop and after I installed all the latest tools, I am now on .NET 6 and when I open my app to carry on where I left off, I get the following error when I run dotnet watch run in the VS Code terminal in the backend folder:
The framework 'Microsoft.AspNetCore.App', version '5.0.0' (x64) was not found.
- The following frameworks were found:
6.0.5 at [C:\Program Files\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=x64&rid=win10-x64
Here are 2 screenshots showing what I have installed in this app from the time I was using it on my old laptop (now opening it and trying to run it on my new laptop)
Is there anyway I can cleanly update everything I need in one go, instead of installing .NET 5 or AspNetCore.App version 5.0.0 etc?
Just correct the TargetFramework element's text content to net6.0.
Also update the NuGet packages.
Don't mind what's inside the bin and obj folders, whereas exist. Even better, make sure to Clean or Rebuild your project.

Xamarin iOS build error - Native linking failed (Link Framework SDKs Only)

Not able to run Xamarin iOS project after Visual studio update.
Because updated IDE requires the latest Xcode (iOS 13.4 SDK shipped with Xcode 11.4)
Environment Details
OS Version : macOS Mojave, OS X 10.14.6
IDE : Visual Studio Community 2019 for Mac Version 8.5.1 (build 42)
Xamarin.iOS Version: 13.16.0.11 (Visual Studio Community)
Xamarin.Mac Version: 6.16.0.11 (Visual Studio Community)
Xcode Version 13.2
What I tried.
Instead of updating the Xcode, I simply changed the Linker Behaviour to Link Framework SDKs Only.
No luck, I got the following errors.
Error MT5210: Native linking failed, undefined symbol: ___darwin_check_fd_set_overflow.
Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210)
Error MT5202: Native linking failed. Please review the build log. (MT5202)
Error: linker command failed with exit code 1 (use -v to see invocation)
Reference.
Linker Behaviour
mtouch arguments
Is there any other option to resolve the issue without update the Xcode and macOS?
Any help will be really appreciated.
Thank you
Cause : Latest visual studio requires latest Xcode (iOS 13.4 SDK
shipped with Xcode 11.4)
To solve the issue install the latest Xcode or use a lower
Xamarin.iOS Version
if you are on a mac, you might be able to find the previous installer here:
~/Library/Caches/VisualStudio/[Replace with Visual Studio Version]/TempDownload
or, if you know the version of the previous version of ios, you can download it from here (change the version number to suite your needs:
https://dl.xamarin.com/MonoTouch/Mac/xamarin.ios-13.14.1.39.pkg.
Xamarin/xamarin-macios Releases, which contains every version
if you are on windows, this post might give you some clues on where to find the local cache instead: https://montemagno.com/cleanup-up-space-xamarin-dev-machine/
For more details: Ans-1 | Ans-2
The latest version of Visual-Studio use the latest version of Xamarin.iOS which may not work with the lower version of Xcode .
So use a lower Xamarin.iOS Version would solve this problem.
It looks like Apple have broken usage of -no_weak_imports with a recent XCode (see https://github.com/mono/mono/issues/19393#issuecomment-606852342 and https://github.com/mono/mono/issues/19393#issuecomment-607126761 ). Upstream Mono appears to have worked around the issue with https://github.com/dotnet/runtime/pull/36436 ) but one wonders why Apple introduced a hard dependency on a weak symbol in their system libraries while still providing the option to disable weak symbols...

The project was restored using Microsoft.NETCore.App version 2.1.3, but with current settings, version 2.1.3-servicing-26724-03 would be used instead

Got this error today after upgrading VS2017 to v15.8.2 and trying to build my dotnet core project (target framework .NET Core 2.1):
Severity Code Description Project File Line Suppression State
Error NETSDK1061: The project was restored using
Microsoft.NETCore.App version 2.1.3, but with current settings,
version 2.1.3-servicing-26724-03 would be used instead. To resolve
this issue, make sure the same settings are used for restore and for
subsequent operations such as build or publish. Typically this issue
can occur if the RuntimeIdentifier property is set during build or
publish but not during restore. For more information, see
https://aka.ms/dotnet-runtime-patch-selection.
What to do?
Found out solution:
Uninstall .NET Core SDK 2.1.401, that came with vs2017 v15.8.2 and install it again using an installer from the .NET Downloads page.
Source: #joshuadavidson https://github.com/dotnet/cli/issues/9897
Also quote #peterhuene:
"It's come to my attention that VS 15.8.2 did not include the correct,
final build of the 2.1.401 SDK. We are working on resolving this
issue. In the meantime, uninstalling the 2.1.401 SDK installed by
Visual Studio and installing the SDK from the .NET Downloads site
should correct the issue."
Update, September 7th 2018:
or simply upgrade to VS2017 v15.8.3, where the problem is resolved:
"Visual Studio 2017 version 15.8.2 contained a pre-release build of
.NET Core SDK 2.1.401 that is incompatible with Visual Studio. We have
corrected this issue with Visual Studio 2017 version 15.8.3."

The .NET Core SDK is not installed or cannot be found under the path

When compiling .Net Core RC2 project under VS 2015 I am receiving following error
GETSDKTOOLINGINFO : error : The .NET Core SDK is not installed or
cannot be found under the path C:\Program Files\dotnet\bin. These
components are required to build and run this project.
Files do exist under that directory.
Also when I input dotnet into command line I do see it's prining proper version number and stuff.(.NET Command Line Tools (1.0.0-beta-001598)
Any idea how to resolve the issue?
Remove all older versions of core
Unistall Microsoft .NET CLI for Windows from control panel if it exists. This helped me.
After you install RC2, Make sure your control panel shows ONLY these for .Net Core
Microsoft .Net Core 1.0.0 RC2 - VS 2015 Tooling Preview 1 (1.0.20513.14)
Microsoft .Net Core 1.0.0 RC2 - SDK Preview 1 (x64) to be version 1.0.0.2702
Hope this helps.
If you install VS 2015 and VS 2017 side by side you may end up with a situation where you have:
.NET Core 2015 x86
.NET Core 2017 x64
(Take a look in Control Panel > Programs and Features)
When you try to open a VS project/solution targeting .NET Core you get the error message described in this posting.
If you search on this error you may get taken to this page:
https://github.com/aspnet/Tooling/blob/master/known-issues-vs2015.md#missing-sdk
But the solutions described there don't work (such as editing your PATH to exclude the x64 version.)
HOWEVER .. from that page, download the x86 version of .NET x86
".NET Core 1.0.1 SDK 1.0.0-preview2-003131 download links"
CLOSE any open sessions of VS. Then uninstall .NET Core 2017 x64 and then install .NET Core x86 version you just downloaded.
Your Control Panel > Programs and Features should now look like this:
Control Panel - After
What this effectively does is that now all your .NET Core is x86 rather than a mix of x86 and x64.
Reboot not required.
Repair Microsoft .Net Core 1.0.0 RC2
In case the previous answer doesn't help you because the right version of dotnet core (SDK & Tools) is already the only one installed (I was in that case):
Repair both and that should fix your problem.
For anyone getting similar messages, here is the official Issue page in the CLI repo.
Of the mentioned workarounds, one is to remove the 'DotNet CLI' entries from the installed programs.
New update: 2021 Jan Update VS Code/ VS 2019/CLI: Get/Download LATEST CORE version
here
A) first check what you have --> run dotnet --info for runtime & dotnet --list-sdks for SDK, from the command line, then B) check which ones can be un/re-installed dotnet-core-uninstall list download MS tool from here IT WILL CLEAN uninstall correctly,
Now you can re/install .Net Core make sure you close your VS Code / VS Studio, and then do your un-install/install
(Windows Skip) for Mac only add your /usr/local/share/dotnet to PATH in your ~/.bash_profile
the install from here on Microsoft
To Fix Path for CLI commands, run these below it will add it to your path:
set DOTNET_ROOT=%USERPROFILE%\dotnet
set PATH=%USERPROFILE%\dotnet;%PATH%
set DOTNET_MULTILEVEL_LOOKUP=0
Check for dotnet --list-sdks.In my case there were none.
Installing the .NET Core sdk worked for me.
If above answers not works
Try this
If you installing 64 bit SDK's, Do uninstall x86 bit SDK's from the control penal
And Try in Visual Studio
It worked from me

Categories

Resources