How to fix "Please ensure that target device has developer mode enabled" error in Hololens Emulator - visual-studio-2017

The problem that I have is that after I have built my Unity project using Microsoft's Mixed Reality Toolkit and the Windows SDK 10.0.18362.0 I try to deploy it using the Hololens 2 emulator (version: 10.0.18362.1019). The result is that even though the emulator opens, my Unity application does not get deployed and the following error is being shown in Visual Studio's error list:
Please ensure that target device has developer mode enabled. Could not
obtain a developer license on 192.168.9.57 due to error 80004005
I found several articles online that had the same problem like me, and they either referred to resetting the HoloLens device (which I do not need to do, since it is an emulator) or enabling the Developer Mode on the host machine (in my case a fully updated Windows 10 Enterprise Edition computer), which I already have. Nevertheless the error persists.
I just hope that there will be a way to get rid of this error and manage to deploy my Unity application onto the HoloLens emulator.

It seems that the solution is very simple. If you actually run Visual Studio as an Administrator the application is successfully deployed onto the emulator.

Related

Flashing firmware Google Enterprise Edition 2

My GEE2 is currently running on version OPM1.190831.007, and I can't find a way to get a more recent version running. I've tried the flashing tool and manual flashing, but both methods came with their own issues. I'll give them below:
Flashing tool: I get either a 'device already in use' connection error or the device is offline. This besides the more common message that the flashing tool has some problems on windows sometimes, and that I should try refreshing the webpage.
Manual flashing: once I have given the adb reboot-bootloader command, the fastboot devices command won't recognize the device (listed as ???????? instead of the device name/number) or it will be offline. As a result, the commands that should be given afterwards according to the Readme file don't work.
I have the adb debugger from the Android Studio SDK platform-tools folder, so I updated the driver software of the GEE2 with the use of that folder initially. Afterwards I tried installing other adb software as well but that didn't help either.
I have also tried a couple of the simpler solutions, as unplugging and plugging, refreshing the site, using another computer, using another internet browser, deinstallation of the driver software, a factory reset of the GEE2, installing less recent firmware instead of the latest. None of these things changed the outcome.
Any suggestions would be highly appreciated!
Firstly, check if you have enabled developer options on EE2.
I had a hard time flashing it on Windows due to driver issues. My Android studio or ADB had no problem deploying apps to EE2, but the fastboot never worked. I ended up flashing it on a Mac using brew installed adb.
I had similar issues with Windows, the driver, and fastboot not working using the flash tool. I was told by support to use a USB 2.0 port. I used a Mac with USB 2.0 to flash it and it was successful.
There's a flaw with the instructions on google glass firmware update - for Windows only, there's a USB driver you need that is glass-specific which isn't mentioned anywhere on the page. I can't even find the page where I found that out right now and I know what I'm looking for. Which isn't very helpful.
The best I can give you is a link to this installer tool might sort out your problem judging this reddit post.
If that doesn't work, use a mac or linux.

ERROR: x86 emulation currently requires hardware acceleration!` in android studio on google cloud virtual machine

Currently new to google cloud
and working on vm.
Can anyone help me how can i use android emulator on vm.
it shows me
Emulator: emulator: ERROR: x86 emulation currently requires hardware acceleration!
now how can i enable hardware acceleration on vm??
First of all you can not access BIOS on Google Compute Engine VM. When you restart the instance you will be automatically disconnected from the SSH session. As soon as you open another SSH session again you will be already logged in to the os.
Android Studio Emulator is another Virtual Machine that emulates the operation of an Android device. So what you are looking for is VM nested inside a Google Compute Engine VM, you can refer to the Enabling Nested Virtualization for VM Instances documentation, for further information.
However, you can use arm64-v8a or armeabi-v7a ABI. They are pretty slow but you will be able to test your applications there. You can make them faster, but it will require a powerful VM that will cost a lot of money. To use those images in Android Studio emulator:
Go to Tools > AVD Manager.
On the bottom left corner click on + Create Virtual Device ....
In Choose a device definition, choose any device you want and click Next
In Select a system image go to Other images tab
Choose any arm64-v8a or armeabi-v7a ABI. (Download if you don't have one)
Click on Next, give a name and click Finish
Run the Virtual Device and give it some time, according to how powerful is your VM it will take some time to load. You will see an Android logo loading and after few minutes you will see the Home Screen. If it takes too long, try restarting the AVD and the Android Studio, then leave it some time to load. It is pretty slow, but it is working, I tested it myself.
Try below steps -
Open SDK Manager (In Android Studio, go to Tools > Android > SDK Manager) and Download Intel x86 Emulator Accelerator (HAXM installer) if you haven't.
Now go to your SDK directory C:\users\%USERNAME%\AppData\Local\Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager\ and run the file named intelhaxm-android.exe.
In case you get an error like "Intel virtualization technology (vt, vt-x) is not enabled". Go to your BIOS settings and enable Hardware Virtualization.
Restart Android Studio and then try to start the AVD again.

Unable to connect to the Remote Debugging - Web App Azure

I am trying to remote debug an Asp.Net Core Web Application (with Web API) project deployed as an Azure App Service with Visual Studio 2017 Professional.
Followed the instructions as documented here. Essentially, using the Server Explorer-->App Service-->Attach Debugger
Also, enabled the necessary firewall ports as mentioned. The ones I opened are TCP (4022, 4023) and UDP (3702). Also, ensure remote debugger application is in allowed list of apps in Windows Firewall. Documentation for the firewall steps.
Despite all the settings, I am getting following error
System.Runtime.InteropServices.COMException (0x89710023): Unable to connect to the Microsoft Visual Studio Remote Debugger named 'essamplepoc2.azurewebsites.net'. The Visual Studio 2017 Remote Debugger (MSVSMON.EXE) does not appear to be running on the remote computer. This may be because a firewall is preventing communication to the remote computer. Please see Help for assistance on configuring remote debugging.
at Microsoft.VisualStudio.Debugger.Interop.Internal.IDebuggerInternal120.ConnectToServer(String szServerName, VsDebugRemoteConnectOptions[] pConnectOptions, CONNECT_REASON ConnectReason, Int32 fIncrementUsageCount, IDebugCoreServer3& ppServer)
at Microsoft.VisualStudio.Web.Azure.MicrosoftWeb.Operations.RemoteDiagnosticsSessionBase.ConnectToServer(String site, String user, String password)
Any suggestion would be helpful.
The issue is resolved. We had to open outbound ports 4024 for VS 2019, 4022 for VS 2017 and 4020 for VS 2015 on corporate firewall.
For more info check these out:
https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugger-port-assignments?view=vs-2019
https://learn.microsoft.com/en-us/visualstudio/debugger/configure-the-windows-firewall-for-remote-debugging?view=vs-2019
I also had this problem. I solved it by changing the Platform from 32-bit to 64-bit in Application Settings as I am trying to debug from 64-bit machine.
It seems remote debugging is not turned on for your App Service.
Open your App Service in the Azure portal and go to Application Settings. Then turn Remote Debugging to On and select Visual Studio Version to 2017.
It should look like this:
Screenshot source
I hope this helps.
First, what did NOT work. Opening the port in my Firewall did not work for me. Restarting my local machine did not work, neither did restarting the app in Azure, nor updating VS2019 with the installer. I kept getting:
System.Runtime.InteropServices.COMException (0x89710023): Unable to connect to the Microsoft Visual Studio Remote Debugger named 'empirepipedriveapi-newversion.azurewebsites.net'. The connection with the remote endpoint was terminated.
Finally, what DID work, I deleted the deployment slot and then added it again, I deleted the publish profile in Visual Studio 2019 and recreated it again, a published the app (without even recompiling it) and then WAS able to connect (I did refresh the available slots in the Cloud Explorer first just to be overly careful). I believe, and this is the 2nd time in about a year, that, on rare occasion, the deployment slot can become corrupted. I noticed this time when I published the app, it took longer and it seemed much more activity took place, leading me to believe that there was code in the old slot that was is not refreshed on each and every publish and it must have become corrupted.

Visual studio debugger not working

I am using Microsoft Visual Studio debugger to debug a remote application. These are the steps I have done
I have taken the x86 version of the msvsmon.exe in the remote machine (which has 32 bit OS) where the application to be debuggedis running. I have started the exe with the options No authentication and Allow any user to debug.
In Visual studio I set Debug option as Win32, go to Tools and Attach the process. I give the IP, choose the transport type as remote and try to start the debugger. However, I am getting the following error message --
Unable to connect to ‘MyMachine’. The Microsoft Visual studio Remote debugging monitor is either not running on the remote machine or is running in windows authentication mode.
I have checked the firewall settings. Please help if you have any idea as to what could be the issue.
If you are debugging native code then run the remote debugger in no-authentication mode. MSDN has notes here. Note that you have to connect to the remote debugger quickly (within 30 seconds) in this mode, otherwise it times-out.
Did you specify "Native debugging" in Attach to process dialog?

Win Mobile 5.0 Can't Debug and user WiFi

I have an app that I have to debug. It is C++ on Windows Mobile 5.0, and it uses a network connection via WiFi. (Visual Studio 2008.)
Disconnected from USB and active sync the app connects to the network just fine, but as soon as I plug it into the cradle, (and consequently connect via ActiveSync) it automatically disables the WiFi network, and I can't seem to find anyway to turn it back on.
I need ActiveSync to control the program in the debugger, and I need WiFi to have the application run, but I seem to only be able to have one or the other.
Does anyone have any ideas? Please save me from having to resort to debugging via printf statements :-)
Don't use ActiveSync - debug directly through the WiFi connection.
I've recently been having reliable fortune debugging over WiFi. The magic seems to be configuring the device's transport IP address and using ActiveSync to jump-start the process.
(I'm using Visual Studio 2008 on a Windows 7 (x64) system; and a Windows Mobile 6.5 device, in case it matters.)
Start up copying the five files listed below unto the mobile device.
Make sure your WiFi is connected and your WM device had a valid IP.
Inside Visual Studio, select Tools .. Options .. Device Tools; then select Devices
Select the "Device" you want to debug; I used "Windows Mobile 6.5.3 Professional Device"
Properties
The Transport should be "TCP Connect Transport", click Configure.
Select "Use a specific IP address" and enter the address.
Exit the dialogs
Connect the WM device via ActiveSync; connect the project to the device within Visual Studio and run it (inside the VS debugger).
Exit the application, waiting to make sure the debugger completes normally.
Disconnect the device from the USB ActiveSync connection.
Run CMAccept (see below) on the mobile device
Run the debugger. (Don't wait to long, because there might a time-window.)
With any luck, the app will start just as if it were still connected to ActiveSync. You can even compile and deploy updated files without needing to reconnect ActiveSync.
First time this worked, I think my jaw hit the ground; I stumbled upon it by chance and simply couldn't believe it was working.
[Debugging on CE5.0 device without ActiveSync] discusses this for Visual Studio 2005 beta2; it seems to be relevant. (This link is also cited in another answer to this question).
The instructions include copying 5 files from host \Program Files\Common Files\Microsoft Shared\CoreCon\1.0\Target\wce400\<CPU> to \windows on the device.
I copied the 5 files from \Program Files (x86)\Common Files\Microsoft Shared\CoreCon\1.0\Target\wce400\armv4 to \VSDebugFiles on my device (expecting to experiment with them). What I did find was that, if Visual Studio refused to connect following the above steps, running CMAccept on the device would help.
In case the link is ever removed, the five files are:
clientshutdown.exe
CMAccept.exe
eDbgTL.dll
CommanClient2.exe
TcpConnectionA.dll
Ok, I admit that this is still very hit or miss, but it is hitting more often than not.
If you don't have a convenient way to check your device's IP, try VxUtil; it's my go-to network utility for validating Windows Mobile network connections.
Good luck, hope it works.