I am working on an issue with UWP application with Xamarin.Forms. I have noticed that when I set the build configuration to Release mode MessagingCenter class stop working without crashing but in Debug mode MessagingCenter works fine.
I set my output log to verbose mode and it is clean without any error or exception. I guess that ".Net Native tool chain" is optimizing the code and aggressively removing some of the dependencies. Has anyone faced this issue before or maybe know a workaround for this?
Related
Creating a new Blazor WASM project will not run using dotnet run or Visual Studio non-debug mode. It will run in Visual Studio debug. Blazor server works properly. I do my development using VS debug mode, so I have no idea how long this has been broken.
The browser tools shows an exception while running WebAssemblyHostBuilder.CreateDefault(args); in Program.cs
Exception: System.TypeInitializationException: The type initializer for 'System.UriParser' threw an exception.
Any ideas? I am really stuck on this!
Thanks
I have tried reinstalling .NET sdks, Visual Studio, but am unable to fix this.
Well, don't I feel like an idiot. I spent all this time trying to fix the development environment, and in a last act of desperation, I tried a repair on the Edge browser...and that fixed it.
Sometimes it is better to be lucky than good...
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 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've just installed Visual Studio on my Mac and started my first Xamarin Forms project. I've clicked "Getting Started" for my HelloWorld, and tried to run in the iOS simulator and got the following error :
the selected execution mode is not supported for .net projects
Could anyone please explain to me why this problem appears and how to open the simulator? Android simulator works just fine.
For those having similar issues, it seems as though the Getting Started doesn’t quite work well on Mac.
Instead of using it to open the simulators, simply right click your project and run from simulator there instead.
I'm working with a webapp that uses ASP.NET for the front end and vb.net for the backend. I worked with the app in debug mode while developing on my local machine but switched it to release mode when I was going to build it for release on my webserver. When I change it to release mode and try to build it I get thousands of errors that say things like "#object# is not defined". I went to the vb page of one of them and the imports statement for one of the .dlls at the top is grayed out. The second I switch back to debug mode the imports statement is no longer grayed out and all of the errors go away. I checked all of the release folders vs the debug folders and they both have all of the .dlls in them that they should. Please help me understand what is going on here.
It is possible that the dll reference requires a X86 or X64 Target CPU designation. It can be set in Debug mode and would require also changing the setting in Release mode.
You should be able to check it under Target CPU under Compile options.