I have updated the project as per the Visual Studio prompt to Xamarin Forms 5.0.0.2012.
When I deploy my Xamarin Forms app I see in the hot reload section of Vs 2019 that Hot Reload is initialising. When I make changes to the XAML and save I see that Hot Reload in connected and appears to be sending the XAML changes. However, there are no changes applied to the running app's screen. I have tried two diffrent Emulator versions and my own Samsung S8 device running Android 9.Tried scanning S.O. for answers but none.
Microsoft Visual Studio Community 2019 Preview
Version 16.10.0 Preview 1.0
Xamarin 16.10.000.21 (main#240d4e4)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 16.10.0.0 (remotes/origin/8affbf0abc24122abd5517b2b52f1073cb52bd7b#8affbf0ab)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Make sure that all projects use Xamarin.Forms packages of the 5th version.
Check the MS VS studio version. Make sure that you have installed the latest stable release.
Make sure you have installed latest SDKs for Android and IOS platforms.
Check XAML Hot reload settings. It must be enabled.
There are two modes of reloading in settings:
a) reload only components with changes (default)
b) reload a page entirely
if the first does not work, try the second mode.
The latest MS VS version (16.11.3.0) has the button having the fire icon which forces to apply Hot reload.
Also one important setting that can be enabled: all changes will be applied on you click Save. So hot reload will applied only after you save the xaml (ctrl+s)
Open Visual Studio Output window, choose Xamarin Hot Reload from the dropdown list, check whether a reload is started and whether changes are sent to your app using the appeared logs.
How to locate settings: MS Visual Studio Options -> Debugging-> Hot Reload.
Watch the screenshot with setting using the link below:
Hot Reload settings screenshot
Do something like this :
"Tools => Options => Xamarin => Hot Reload"
Click this link for more informations
Related
Hello I have been trying to debug an Android project on mac os that was built with Xamarin Forms but have been unable to hit a single breakpoint in the Portable Class Library.
After deployment I get hollow type debugger.
Hollow breakpoint image
But its working fine on .Android and .IOS
Here is a list of everything I have tried so far:
Deleting the bin and obj folders then clean and rebuild Setting the
Android build property "Link Behavior" to "Don't Link" Unselecting Strip
native debugging symbols Removed all symbols on path to debug file
Fresh installation of Xamarin
fresh cloning
changing Debug information to "Symbol only"
Can you please suggest any answer that can help me in this ?
This issue was introduced in a recent visual studio update and should be fixed soon
Visual studio for Mac
While I wait for the new visual studio update I manage to fix this by enabling Fast Assembly Deployment located at: Android Project Options -> Android build
https://developercommunity.visualstudio.com/t/Debugging-of-Xamarin-application-on-Andr/10001903
Visual studio for Windows
Try enabling Use Fast Deployment check this thread:
https://developercommunity.visualstudio.com/t/breakpoint-not-hit-debugging-xamarin-android-proje/1561025
According to the screenshot you provided, it seems on Windows Visual Studio.
The hollow red circle in your screenshot means disable a breakpoint without deleting it. It shows the breakpoint, but it would not work in debug.
You could click the black circle in the screenshot to enable breakpoint.
For more details, you could refer to the MS docs. https://learn.microsoft.com/en-us/visualstudio/debugger/using-breakpoints?view=vs-2022
I've read and followed all the hints for Hot Reloading in UWP on this page:
https://learn.microsoft.com/en-us/visualstudio/xaml-tools/xaml-hot-reload-troubleshooting?view=vs-2019
Just can't get it to work. It works in Android not iOS (which is not supported at the moment).
Any additional thought to the page mentioned above?
Recently Hot Reload "2.0" was shipped in Visual Studio 2019 16.8, which finally includes Hot Reload support for UWP. But it only works if you go into the Visual Studio settings and set it Changes Only (Preview), as shown in the screenshot below.
See this post for more details:
https://devblogs.microsoft.com/xamarin/dotnetconf-2020-xamarin-recap/#xaml-hot-reload-2-0
No additional installation or setup is required to use XAML Hot Reload. It's built into Visual Studio and can be enabled in the IDE settings. Once enabled, you can start using XAML Hot Reload by debugging your app on an emulator, simulator, or physical device.
On Windows, XAML Hot Reload can be enabled by checking the Enable Xamarin Hot Reload checkbox at Tools > Options > Xamarin > Hot Reload.
For more information, please visit the documentation.
I am getting an error in Xamarin when building a release version. I actually have never released code before, and i have no idea what im doing. if you could tell me, i am getting this error but i do not know how to follow the instructions because my Visual Studio doesnt have a menu called properties
Debug is not enabled in the current configuration. Please Start
Without Debugging or change it in Properties -> iOS Build.
Right click to IOS project--> open Proprieties page and enabled debug for IOS
I am having issue debugging Android project. I can deploy to device and run it, all works fine but if I try to debug, the app gets deployed to the device and very briefly opened, splash screen shows up but the app then closes.
I am using Xamarin Forms on Visual Studio 2015.
Device is running Android Oreo (8.0.0). Another device running Android 6.0.1 is debugging fine.
The output shows following:
InspectorDebugSession(11): StateChange: Start -> EntryPointBreakpointRegistered
InspectorDebugSession(11): Constructed
Android application is debugging.
InspectorDebugSession(11): HandleTargetEvent: TargetExited
InspectorDebugSession(11): Disposed
Couldn't connect to logcat, GetProcessId returned: 0
I checked Logcat and it seem to be having issues finding FFImageLoading library:
Time Device Name Type PID Tag Message
09-18 14:35:52.361 Huawei Nexus 6P Debug 1560 Mono AOT:
image '/usr/local/lib/mono/aot-cache/arm/FFImageLoading.Platform.dll.so'
not found: dlopen failed: library "/data/app/myapp.android.dev-
WEb1bz8edgF7vwx6uCoZ-A==/lib/arm/libaot-FFImageLoading.Platform.dll.so" not found
I have added Nuget package for FFImageLoading to my projects and Droid project references show it as in image below:
This worked for me :-
Deselecting the 'Use Shared Runtime' in Project Properties > Android
Options > Packaging properties
I also had this issue with Android 8.1 and Visual Studio 2017 15.7.4.
There are three steps to got it working again.
Under Android Options, go to Advanced and add your device architecture, in my case it was x86_64.
Go to Tools -> Options -> Xamarin > Android Settings and enable: Provide debug symbols for shared runtime and base class libraries.
And the final step is to delete following Apps from your device:
All Xamarin.Android API Support libraries
Mono Shared Runtime
Your App
After these steps you don't need to disable "Use Shared Runtime" and can Deploy and Debug much faster.
This is a known issue with Oreo and Xamarin Android on Visual Studio for Windows. It works on Visual Studio for Mac apparently. It will be fixed in an upcoming release. In the mean time there is a work around down near the bottom of the bug link above (comment 20).
deselecting 'Use Shared Runtime' in Project Properties > Android Options
delete bin & obj files from solution
clean solution
rebuild the solution it works
One another reason for that is if you dont enable usb debugging on your device, VS 2017 still recognizes your phone and installs the app on your phone. Just after debugging starts, it will throw this error and not continue debugging. Make sure to enable Developer Mode -> Usb debugging like described here
https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/set-up-device-for-development
We just started creating cross platform mobile apps using "Visual Studio Tools for Apache Cordova".
I followed the procedures described in Install Tools to Build for iOS and To run your app on an iOS device. Everything works nicely, the app gets deployed on my USB attached iPhone and runs as expected.
I then tried to upload the app to iTunes, to provide the app via TestFlight to testers and to generally see how app-submitting works:
Build the iOS app as "Release" in VS: it builds and deploys to the iPhone nicely
On the Mac: Start Application Loader, click on "Deliver your App" and navigate to "...remote-builds/builds/"xxx-buildnmb"/cordovaApp/plattforms/iOS/build/device/APPNAME.ipa"
Several checks run OK ("verifying assets, etc.), but it then stops with the error
ERROR ITMS-90161: "Invalid Provisioning Profile. The provisioning profile included in the bundle xxx.yyyyyy.zzzz [Payload/xxx.yyyyyy.zzzz.app] is invalid. [Missing code-signing certificate.] For more information, visit the iOS Developer Portal."
I then discovered the Xcode Project in ".taco_home/remote-builds/taco-remote/builds/<build-number>/cordovaApp/platforms/ios/" and used Xcode to define the code signing identities in "Build Settings" and the Team information in "General", created the archive via Product-->Archive and submitted it in the Organizer - Archives. And voila it worked!
My questions:
Do I have to use Xcode to submit?
If not, what might I be missing in a) regard to building and signing apps with vs-mda-remote, and b) submitting it with Application Loader?
What are Microsoft's plans in regard to providing access the build settings from within Visual Studio (similar to the ones in Xcode)?
Thanks a lot for any pointers in the right direction.
Thomas
You need to use distribution provisioning profile to sign the package and apps are published to the App Store by using the iTunes Connect website along with the Xcode Archive Tool, which is included with the iOS SDK.