I am attempting to debug an android app created using Xamarin Forms in Visual Studio 2022. However, the app crashes on launch and no output is shown. When running the app normally, there are no issues. Running or debugging the app on the emulator poses no problems, either. Unfortunately, I have no other information to provide that I can think of.
There seems to be a bug with Visual Studio 2022. I came across similar issue, I've fixed it by changing in your csproj file:
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
To
<EmbedAssembliesIntoApk>false</EmbedAssembliesIntoApk>
It worked like a charm for me :)
Just hit this problem, the work around that worked for me was disable "Use Fast Deployment" in the Properties->Android Options.
The build was crashing before any debugger or log output was generated.
Related
I recently upgraded to Visual Studio 2022, and since then, I can't hit breakpoints any longer during Android shared project debugging, even if they seems to be loaded correctly.
I've set debugType on Pdb only on both projects.
Tried clean/rebuilding many times, remove app and restart emulator but still no luck. Any idea about this issue?
I'm using XF 5.0.0.2337.
As officail community said:
Enable Use Fast Deployment on the Android project.
I updated my Samsung device (Samsung Experience is 9.5) and now the breakpoint works again. Fast deployment/restarting/re-installing was not enough.
My UWP app is building,rebuilding and deploying fine but it is not running.
Although, it works fine in other system.
I am using Visual Studio professional 2015 since 5 month to build this project and all of a sudden it has started showing this.
When i try to uninstall the app it doesn't give any option to uninstall also.
I have tried restarting the system and cleaning,rebuilding the project file but nothing seems to work.
Thanks in advance.
Causes:
It is a known issue in Visual Studio 2015.
For more info: unable to activate Windows Store app
Solution:
Update to Visual Studio 2017
For other solutions:
Unable to activate windows store app the app didn't start
Unable to activate Windows Store app: The App1.exe process started, but the activation request failed with error ‘The app didn’t start’
It seems like the directory or the folder were corrupted so that is why every time when i was running the application it was installing in a non packaged version therefore i was not getting the option to uninstall it properly.
I tried by deleting the whole folder which created in AppData folder of the Users but it didn't work.
So finally i created a new folder and moved my solution over there.And everything is working pretty much fine now.I thought we could solve this problem by repairing Visual Studio but since this issue is not related with Visual Studio and moreover it takes half of your day to repair Visual Studio so only moving the project to a newly created folder would be a good idea in this case.
I have done all visual studio 2015 installation process.
So did Hyper-v settings.
Emulatro starts but does not install a program that I have written on it.
Please help to resolve this problem
Several hours and nothing happens in this case is. The program does not deploy!!!
Would need more details/emulator logs to diagnose issues with the VS emulator, but I would encourage you to disable Hyper-V and then run the Xamarin installer for Windows to get the fast Google Emulators.
They are nice and should fix your problem.
http://xamarin.com/download
I use unmanaged dll with P/Invoke in this app, and I always tested it inside Visual Studio (with debug mode on x86 CPU because the dlls are only x86), and it works just fine. But when I just start the exe manually after some time (probably at the first operation with those dlls, but I don't know exactly) it says the exe has stopped working, and it starts checking for solution (I use Visual Studio 2013 on Windows 8.1, if that matters). I tried to add the dlls to the project as existing item, but that doesn't help. Also I know, that it's not because it can't find those dlls, cause if I delete them, it doesn't crash, just freeze without any error message. Shouldn't it work the same from Visual Studio as manually started?
There is also a weird bug when I run from Visual Studio: everything's work fine, but sometimes Visual Studio just suddenly stops debugging, as if the program were closed and the GUI of my app freezes, and I can only close it by closing Visual Studio (as I close it, the GUI disappears). Maybe it's a totally different problem, but it can be connected.
Edit:
Here's the project on github, if somebody could check it:
https://github.com/geiszla/CycriptGUI
Some news: If I run it with Ctrl+F5 it also crashes. What's the difference between F5 and Ctrl+F5, that can cause this problem?
Searched all over Google with no real simple answers. Here it is folks(at least it worked for me and is simple):
When you run the console app in Visual Studio, look at the output window at the bottom, get the location of the ..\bin\Debug\*.exe
Copy the *.exe and the *.config to your desired folder, run it, it should work the same way in Visual Studio.
Thanks for every help, my problem was solved: I called an unmanaged function with only 2 parameters, while it had 3. However I still don't understand why it worked with debugging mode, and not without debugging.
I wrote a WPF application in C# using VS 2010. The application will run fine in debug mode using Visual Studio, but when I go to run the .EXE from the bin\release folder, nothing happens. I do not get any error messages from windows and there are no errors or warnings in VS. I have tried to build, rebuild and clean the solution (in every possible order) with no luck. My solution contains 2 projects, both of which use .NET 4.0 framework, and I have .NET 4.0 installed on my PC. I have tried on both XP and Win7 and still nothing.
I also just noticed that the output from Debug when I run the application in debug mode says: "Cannot find or open the PDB file" after each .Dll it loads.
I am compiling to the Release folder every time, but i did try changing it to the debug folder and clean/rebuild just to see if that would make a difference, and it didnt, so I changed it back, tried it again, and still nothing.
Any Ideas?
Here are a couple of ideas that come to mind
If you are on a x64 machine, try changing the application from being AnyCPU to x86. This the mode that applications default to in debug mode and it's possible an issue running in x64 is causing a problem in release builds
Possible the Release binaries are out of date. Delete the binaries from the Release folder, rebuild and run the newly generated runs
Run the release build under the debugger in Visual Studio and see if it till crashes
I was experiencing the above issue too, however none of the other solutions worked for me.
My Application logs in Event Viewer listed event ids 1018 and 1022. This appeared to be bizarrely related to an ASP.NET 2.0 dll (bizarre; as this was a blank WPF project only). The logs contained messages like this:
Windows cannot open the 64-bit extensible counter DLL
ASP.NET_64_2.0.50727 in a 32-bit environment
In the end it turned out to be resolved when I disabled my anti-virus. I had read that this resolution worked for someone with McAfee; and it also worked for my environment, which has Avast.
I assume you tried on a machine that doesn't have visual studio installed, and also none of the components you are using for development.
You have only one option: start the application with a debugger on the machine that causes problems and check for exceptions there. (use WinDBG for example - it's light and easy).
This looks like a problem with missing dependencies, but might be something else also.
The Debugging Labs should give you enough information on how to use windbg to find your problem:
.NET Debugging labs
Also use this:
WinDBG Cheat Sheet
(JaredPar) answer looks right (x64), but if not try right clicking on the EXE and running in admin mode for win 7.
I had a very similar issue.
Check out this setting on your App Pool entry:
Go to Advanced Settings.
Change 'Enable 32-bit Applications' to 'TRUE'.
This worked for me!
I'm going to go with a wild guess that:
Either you have some odd corruption in your .NET Framework installation
There is some debug/release-specific code using #if DEBUG or the such that is substantially different to cause issues.
You have not compiled recently into Release yet (Try changing it to Release before compiling your latest code and make sure you get no errors).
Those are the only things I can think of off the top of my head.
I had run into a similar issue, I was missing a custom folder in the release mode I was referencing in the constructor. Adding the folder to the release fixed the problem.