Visual Studio 2019 & Xamarin iOS - Simulator issues - xamarin.forms

I've been trying to rework some pages that needed a change.
When I've edited a xaml page and corresponding xaml.cs page when Visual Studio built the page and ran it on the simulator it behaved like I did no change on it.
I've tried cleaning and building and cleaning and rebuilding my solution but to no avail.
There are some issues with running the simulator as well when sometimes it would start the app normally and the next time I start it I need to kill simulator completely and then re-run it
Is there some kind of setting that I've missed to set-up?

When you are making changes to xaml in debugging mode, you must hit save button to tell VS to push changes to emulator. The screenshot you provided clearly says that you didn't hit save. Also you must to enable hot reload for Xamarin. VS Options -> Xamarin -> Hot Reload.

Related

MRTK: How to fix SpectatorView from Android-device not pairing with HoloLens? (QR-code)

Problem summary
I'm attempting to establish a connection between HoloLens and an Android device, which worked sporadically in the beta-version of the MRTK.
However since moving to the MRTK RC1 (Also Refresh), I've encountered issues regarding the QR-scanning. When pressing connect, the two devices seemingly finds eachother, however when the wearer of the HoloLens1 looks directly into the QR-code, nothing happens. (the white dot and "Locating marker..." text is showing)
Background summary
1. The Setup:
Implemented working MRTK RC1 Refresh
Cloned Feature-SpectatorView separately, copying only the "MixedRealityToolkit.Extensions" folder to the MRTK project.
"Spectator View - HoloLens" prefab added to scene.
First pressing "HoloLens" in the PlatformSwitcher, building for HoloLens1, then switching to "Android" and exporting the project to Android Studio.
Building the .apk from Android Studio
(opencv binaries are downloaded and implemented since beta version, I haven't since changed them from when they worked the last time.)
2. The Proces:
On the HoloLens, I press the "Connect" button in which a white text appears saying "Locating Marker..."
The Android phone presses connect and it goes to "Waiting for User" then as soon as a HoloLens is connected, it switches immediately to a QR code that should be readible from said HoloLens.
Looking directly at the QR-code and nothing new happens, connection does not establish further.
I checked if something was not ticked in Player Settings/Capabilities, but I can't seem to find what the culprit would be. Did I forget something in this proces?
There are a few things that could be causing this issue.
If the Android device is showing a marker, this means the two devices have established a network connection and are communicating with one another. Typically, when I run spectator view I enable the following capabilities: "Internet (Client & Server), Internet (Client), Microphone, Pictures Library, Private Networks (Client & Server), Spatial Perception, Videos Library, Webcam" in the Package.appxmanifest in visual studio. Pressing "HoloLens" on spectator view's unity platform switcher should typically achieve enabling these capabilities, but sometimes the package.appxmanifest doesn't get updated correctly in the visual studio project with subsequent builds in Unity. You can fix this by deleting your visual studio directory and rebuilding the visual studio project in unity.
If these capabilities are checked in the package.appxmanifest, it may be that you rejected a capability request when first running the application. If you open Settings -> Privacy -> Camera on the HoloLens, you can check whether your deployed spectator view application has camera access granted. You should be able to enable the camera functionality here if it is disabled.
There have been changes to both MixedRealityToolkit and MixedRealityToolkit-Unity spectator view logic, so cloning these items at different points in time may cause functions to no longer resolve (We're hoping to consolidate this code into the same repo/commit history in the future to prevent this from continuing to happen). Typically, in the Unity logs there will be errors stating that a function was not found for SpectatorViewPlugin.dll if the dll functionality is not resolving correctly. It sounds like this is not the issue you are hitting if things worked previously. But if it does turn out the case, it may be that you need to rebuild the SpectatorViewPlugin.dll to match the feature/spectatorView code you are using.
If you recently copied the SpectatorViewPlugin.dll and its dependencies to a new unity project, it may be that they aren't getting registered as usable by the windows uwp unity player. Make sure these binaries are in a Plugins\WSA\x86 folder within your assets folder. Also check the *.dll.meta definitions in the unity inspector to ensure the dll's are declared as usable for the unity wsa player/x86 builds.

First ASP.NET webpage launches without debugging, doesn't launch with debugging

Did anyone encounter an error with ASP.NET debugging? I've made a really simple, empty MVC page, I've tried returning /Home/Index.cshtml and a string, and each time I get a windows jingle and the browser can't find the server. It doesn't happen when I run it without debugging though, then the website runs just fine.
I've also tried the default MVC template, with Bootstrap etc, and it's the same - runs without debugging, doesn't run with debugging.
It's probably important: I'm running Visual Studio 2017 on up-to-date Windows 10. I've reinstalled the system several weeks ago, really wouldn't want to do that again :/
Generally we could debug an app with the normal user, but sometimes we need to use the admin, for example, as far as I know, if we want to use the attach to process tool for remote debugging, we often run the VS as the admin or others.
This document share us the tasks we need administrator permissions to completeļ¼š
https://msdn.microsoft.com/en-us/library/jj662724.aspx?f=255&MSPPError=-2147217396
If possible, you could refer to it especially "Debugging" area in above link.
Hope it could help you:)

How do I completely exit a Flex 4.6 Air mobile Android app?

Ive been trying to add a button to properly exit an Android app, built using Flex 4.6. I have used the command NativeApplication.nativeApplication.exit(); which seems to work on the emulator, and kills off the emulator.
When I run it on a device, it doesnt exit, it actually seems to go to start of the app (my login screen) which is kinda strange.
I hypothesise that something system-wide is holding the app in process or re-starting it. Anyone had any experience with this?
That code should work. I use it in my android flex app with no problem. The application quits correctly and I am dropped back at the home screen. What version of Android are you using? I was using 2.3 when I did this. If you have it running in debug mode, do you see any errors output to the console? Using the debugger will also allow you to see if it is not quitting properly or restarting on quit(you would see the splash screen again if this was the case)

How to remove visual studio's popup "Choosing to wait for a request..."

I have a project that has, amongst other things, one web application (mvc) and one WPF application. For the part that matters, the WPF app connect to a WCF service hosted on the website.
What I want to achieve is that when I press Ctrl+F5 (start WITHOUT debugging), the build process kicks in (if needed, in other words, the default VS behavior), the WPF app launched, and if the webdev server is not launched, that it get launched too, but without opening any page on my browser (I'll manage that myself).
I managed to get that working as I want (configuration below), but every time I do a Ctrl+F5, I get a popup from VS that says
Choosing to wait for a request from another process without enabling
ASP.NET debugging results in nothing to debug.
I value the information, and that seems to match pretty much what I'm trying to accomplish anyway, but now, instead of having to close a useless tab in my browser, I have to close a modal dialog. Not a big improvement from my point of view.
So, how do I prevent this popup to show up ?
Additional information:
I don't want to start in debug mode (F5). If I need debug for the website, I'll do my usual (attaching to the webdev server).
I want the webdev server to be running all the time from the first CTRL+F5.
I don't want to publish it on IIS (even the express version)
The solution startup option is set on "Multi startup project" with the WPF app on "Start" and the website on "Start without debugging" (setting it on Start doesn't change anything, except that I also get the popup when debugging with F5 directly).
The website has its start action configured on "Don't open a page. Wait for a request from an external application". The ASP.NET checkbox in the Debuggers is checked.
Internet had not been a big help so far, so all my hopes lies on you SOers !
Edit
It seems that it was flagged as a bug, but I don't see any reference in what version it's supposed to be fixed...
Also, I discovered my question is a duplicate of this one.
I actually found another way : in the start actions, you can set it to "start external program" and reference a self quitting program. I used "C:\Windows\System32\PING.EXE". Not perfect, but also less annoying than the previous solutions.

"Advanced" Edit and Continue?

Alright, I've been searching forever and can't find the answer to this.
So on my work computer I run Windows 7 and Visual Studio 2005. I have a ASP.NET project (2.0) and let's say I hit F5 and start debugging. Now, once a page is done rendering I can edit the content or the codebehind code of the page without it throwing any error messages (just like if the project was stopped). Then if I save the file and hit refresh on the current debugging browser, it'll take a minute to recompile the project automatically and then refresh with the recompiled code. I can ONLY change the code in the ASP.NET project, not any class libraries that the ASP.NET project is dependent upon. I can also set breakpoints and it'll hit them (so it's not like the debugger is not attached or something).
Now on my home computer, I run Windows 7 and Visual Studio 2010. I have an ASP.NET project (4.0) and let's say I hit F5 and start debugging. Now, it doesn't matter if the page it done rendering or not - I cannot change ANY of the code behind, although I can change the content. If I attempt to I get a message saying
"Changes are not allowed while code is running or if the option 'Break all processes when one process breaks' is disabled. The options can be enabled in Tools, Options, Debugging."
That being said, if I put a break point, refresh the page and hit the breakpoint THEN I can change the code and then hit F5 to continue.
So my question is - what EXACTLY do I need to do to get it to work like my work computer? It's REALLY annoying to have to stop the project or be clicking breakpoints all over to edit one little piece of code (especially when I'm so used to not having to do that at work). Is this some change in Visual Studio 2010 or something? From what I've read, how it's working at home is the real "Edit and Continue", but I can't figure out what to call it on how it works with my work pc.
Another difference (might be of help):
I set it up so that my IIS goes to the project folder, and then run the project outside of the debugger on both my work and home machines.
Now on my work machine I can make a change to the code and when I hit refresh on the non-debugged browser it'll do the same pause for recompile and then refresh the screen.
On my home machine if I make a change to the code and save it and then refresh the non-debugged browser it will not recompile the code.
So this makes me think it's some IIS setting in the end to make it auto-recompile? It clearly doesn't seem to have anything to do with VS since I'm not even going through the VS debugger to access to code at that point.
Just my thoughts: maybe you use on the work WebSite project, but at home WebApplication. In case of application all code will be compiled in the single DLL and changes should be recompiled first. In case of WebSite - each page compiles in different DLL and you can chage any of the page and it will recompile it.

Resources