Archive for the ‘Windows’ Category

As part of my .NET 301 Advanced class at the fantastic Eleven Fifty Academy, I teach Xamarin development. It’s sometimes tough, as every student has a different machine. Some have PCs, others have Macs running Parallels or Bootcamp. Some – many – have Intel processors, while others have AMD. I try to recommend students come to the class with Intel processors, due to the accelerated Android emulator benefit Intel’s HAXM – Hardware Acceleration Manager – provides. This blog entry is a running list of how I’ve solved getting the emulator running on so many machines. I hope the list helps you, too.

This list will be updated from time to time, as I find new bypasses. At this time, the list is targeted primarily for machines with an Intel processor. Those with AMD and Windows are likely stuck with the ARM emulators. Umm, sorry. I welcome solutions, there, too, please!

Last updated: December 4, 2017

Make sure you’re building from a path that’s ultimate length is less than 248 characters.

That odd Windows problem of long file paths bites us again here. Many new developers tend to build under c:\users\username\documents\Visual Studio 2017\projectname. Add to that the name of the project, and all its subfolders, and the eventual DLLs and executable are out of reach of various processes.

I suggest in this case you have a folder such as c:\dev\ and build your projects under there. That’s solved many launch and compile issues.

Use the x86 emulators.

If you have an Intel processor, then use the x86 and x64 based emulators instead of ARM. They’re considerably faster, as long as you have a) an Intel processor with virtualization abilities, which I believe all or most modern Intel processors do, and b) Intel’s HAXM installed.

Make sure VTI-X / Hardware Virtualization is enabled.

Intel’s HAXM – which you can download here – won’t run if the processor’s virtualization is disabled. You need to tackle this in the BIOS. That varies per machine. Many devices seem to chip with the feature disabled. Enabling it will enable HAXM to work.

Uninstall the Mobile Development with .NET Workload using the Visual Studio Installer, and reinstall.

Yes, I’m suggesting Uninstall + Reinstall. This has worked well in the class. Go to Start, then Visual Studio Installer, and uncheck the box. Restart afterwards. Then reinstall, and restart.

Mobile Development Workload Screenshot

Use the Xamarin Android SDK Manager.

The Xamarin team has built a much better Android SDK Manager than Google’s. It’s easy to install HAXM, update Build Tools and Platforms, and so forth. Use it instead and dealing with tool version conflicts may be a thing of the past.

Make sure you’re using the latest version of Visual Studio.

Bugs are fixed all the time, especially with Xamarin. Make sure you’re running the latest bits and your problems may be solved.

Experiment with Hyper-V Enabled and Disabled.

I’ve generally had issues with virtualization when Hyper-V is enabled. If you’re having trouble with it enabled, try with it disabled.

To enable/disable Hyper-V, go to Start, then type Windows Features. Choose Turn Windows Features On or Off. When the selection list comes up, toggle the Hyper-V feature accordingly.

Note: You may need to disable Windows Device Guard before you can disable Hyper-V. Thanks to Matt Soucoup for this tip.

Use a real device.

As a mobile developer, you should never trust the emulators to reflect the real thing. If you can’t get the emulators to work, and even if you can, you have the option of picking up an Android phone or tablet for cheap. Get one and test with it. If you’re not clear on how to set up Developer Mode on Android devices, it’s pretty simple. Check out Google’s article on the subject.

Try Xamarin’s HAXM and emulator troubleshooting guide.

The Xamarin folks have a guide, too.

If all else fails, use the ARM processors.

This is your last resort. If you don’t have an Intel processor, or a real device available, use the ARM processors. They’re insanely slow. I’ve heard there’s an x86 emulator from AMD, yet it’s supposedly only available for Linux. Not sure why that decision was made, but moving on… 🙂

Have another solution?

Have a suggestion, solution, or feature I’ve left out? Let me know and I’ll update!

 

I recently deployed an Azure Cloud Service with Remote Desktop enabled. However, when I went to connect to it on port 3389, the server refused the connection. I remember there was something I had to do, but I had never written down the steps. So, here’s what you need to do, in case you’re looking 🙂

Note: I use Remote Desktop Connection Manager, a.k.a. RDCMan, also from Microsoft, instead of the standard RDC client. I feel it’s much better, more configurable, and great if you need to work with many remote desktops. I’ve love to know why they don’t include it in Windows!

Step 1: Find your Cloud Service and Slot in Azure Portal

In Azure, find your Cloud Service. Also select the slot to which you want to connect, such as Production or Staging.

Step 2: Select the Roles and Instances option

You’ll see it on the left.

Step 3: Choose the item to which you want to connect and click Connect

For example, your web role instance. This will download an .RDP file. You can double-click this file to connect. Ooh! Neat!

Step 4: If you’re using RDCMan…

To connect with RDCMan, you’ll need to grab the Cookie: something something something string out of the RDP file. Open it in Notepad++, or your text editor of choice, and grab that value. Ignore the s: text.

In RDCMan, for the VM, add the string under Connection Settings tab in the Load balance config textbox.

Step 5: You’re Connected!

Enjoy!

 

 

I’m continuing my resolution to record as many of my programming and technical presentations as possible. I recently spoke at the inaugural Indy.Code() conference. It was excellent, with an incredible speaker line-up. I hope they, too, post some of their presentations online!

Watch the Video on YouTube

From the synopsis:

Should you write your app “native” or use a “cross-platform” solution like React Native, Xamarin, or NativeScript? The new wave of native-cross-compiling solutions provide significant cost savings, code reuse opportunities, and lower technical debt. Does wholly native, per platform development, still play a role in future mobile development? Let’s discuss together.

In this presentation, we’ll discuss:

  • The growth of native, hybrid, and cross-platform mobile development solutions
  • Cost analysis of multiple native and cross-platform apps
  • Considerations for each native and cross-platform solution
  • Lessons learned

Slides are available here: https://t.co/5iLhEoEfen

If you have any questions, I’m happy to answer them! Please email me or ask on Twitter.

 

I recently purchased an LG UltraWide 21:9 display. Why an ultra-wide and not 4K? a) I write code for a living and this is a great way to get two windows full size side-by-side without an extra monitor. b) It was only $130 instead of $400 due to a Best Buy sale. Sold!

I get home, connect it to my Surface Book, and nothing works. The screen just blinks on and off, on and off, blinkety blink, blinkety blink. No Bueno. Changing the cable made the blinkety blink go away, but the display control panel would suggest trying different settings, and wouldn’t light things up.

My friend Shane recommended I get an Active MiniDP to HDMI adapter. So I bought one on Amazon. Still, I didn’t want to wait… that’s 2 days with Prime shipping, and not fast enough.

So, I looked into the MiniDP adapter I was using. I found out it only supports up to 1080P! Maybe it’s DP 1.1 or something. Whatever it is, it couldn’t support a 2560×1440 or thereabouts display.

Fry’s had the answer – I made sure I found a MiniDP to HDMI adapter that clearly stated it supports 4K and MiniDP 1.2. The particular product I purchased was the Cirago Mini DisplayPort to HDMI Display Adapter.

I got home and the adapter worked flawlessly.

I hope that helps anyone having a similar issue!

 

I’ve been underwhelmed by Microsoft’s response for documentation regarding SkyDrive and its inner workings. So, I’m on a mission to break things down. I’ll update this blog post as I find more information. As always, any info provided here is used at your own risk. I take no responsibility if you hose a system.

In case you want to see all the SkyDrive process settings:

C:\Users\<your account name>\AppData\Local\Microsoft\Windows\SkyDrive\settings

There are two files of interest:

global.ini and ClientPolicy.ini

There were some settings that surprised me in ClientPolicy.ini:

  • MaxFileSizeBytes = 2147483647 Is the 2 GB max file size mentioned on MSFT’s site? They should probably mention that, since all shipping systems are 64-bit and video files and ISOs can be pretty big.
    • Update 7-Jan-2015: It appears Microsoft has upped this to 10 terabytes.
  • Tier1MaxFileSizeBytes = 2147483647 These would be Microsoft’s Office file types
  • Tier1FileInclusionList = |doc|docm|docx|dot|dotm|dotx|odc|odp|ods|odt|pot|potm|potx|pps|ppsm|ppsx|ppt|pptm|pptx|rtf|vdw|vdx|vsd|vsdm|vsdx|vssm|vssx|vst|vstm|vstx|vsw|vsx|vtx|xla|xlam|xlm|xls|xlsb|xlsm|xlsx|xlt|xltm|xltx|xlw|
  • MaxItemsInOneFolder = 150000 I wonder if this caused my earlier sync problems, since I had more than 150K files in a folder, and then I deleted the folder. Maybe that messed up Microsoft’s storage system in the cloud? When I finally had a Microsoft technician look at my account, things magically started working a day later. I didn’t change anything, but what happened on their end?
  • MaxClientMBTransferredPerDay = 131072
    • Update 7-Jan-2015: It appears Microsoft has upped this to over 250000. Makes sense, given average home broadband speeds.
  • MaxClientRequestsPerDay = 500000 So what happens if you reach your limit?
  • NumberOfConcurrentUploads = 3 I’d rather have more, but it appears the next setting helps here, even though it’s not accessible via the SkyDrive app.
  • AllowUserOverrideOfConcurrentUploads = true
  • SyncTelemetryURL = http://wlepsi3.redmond.corp.microsoft.com/SyncDiag.ashx This one bothers me a bit. What is this URL tracking? And why isn’t it over SSL?
  • LowDiskSpaceLimitMB = 3072 If you want to override the low disk space limit… I’m going to try this on my Dell Venue Pro 8. Update: It worked! Yay!
    • Update 7-Jan-2015: It appears Microsoft has lowered this to 200MB. Much better for tablets! Of course, in the future, tablets will probably have 64GB, 128GB or more by default due to lowered storage costs.
  • AutomaticVerboseLoggingEnabled = true I wonder where the log file is. There’s one in this folder, but it’s used by the SkyDrive process. I’ll play with that in a VM so I don’t mess anything up Smile

I’m also curious as to why SkyDrive.exe can’t be opened in a decompiler. If I request it, the file system says the file doesn’t exist. Is c:\windows\system32\SkyDrive.exe simply a shim? Very interesting.

Breaking down the SkyDrive process, I found what appears to be additional command line parameters. I have not tested these as of yet.

/shutdown
/register
/unregister
/installperfcounters
/uninstallperfcounters
/background
/watson

Until next time… enjoy!

Best,

-Auri

In an earlier post, I pointed to permissions issues causing SkyDrive to stop syncing. I found another solution that also appears to have worked, causing SkyDrive to sync again. Try moving your SkyDrive folder to another location, such as another drive, an SD card you never remove, or other similar area. I suggest a permanent location, not one you unplug and might forget to re-attach Smile I don’t know how long my fix will last this time, but try it and let me know.

Here’s how you change locations:

1. In Windows Explorer, right-click SkyDrive and select Properties.

image

2. When SkyDrive Properties appears, select the Location tab and click Move.

image

Note: In my example, I’ve already moved the folder. In yours, you will probably see c:\Users\username\SkyDrive

3. Choose the folder to move your files to. I called mine Auri’s SkyDrive and put it on my M: drive. Make sure you have plenty of room for your files! This will not trigger a download of all your files. However, you want to have enough room that the copy of existing files doesn’t fail.

4. Click Apply and wait a while. The window may freeze while Windows does its work. On a side note, if any Microsoft engineers are listening, this would be a great place to enhance the user experience. For example, a please wait indicator.

5. Once Windows has copied all the files to the new location, wait a while for Windows to sync, maybe a day. By then, your files may be back in sync and all will be good in the world.

Good luck!

-Auri

I’ve spent the past few days using Dell’s solution for those who need a keyboard for their Venue Pro 8 tablet. It has come in handy when needing to write emails and edit documents. I have yet to write code with it, although I plan to soon. Unfortunately, while the keyboard and case match the Venue Pro 8 perfectly, it’s hard to recommend this accessory for medium to heavy duty work until Dell treats the keyboard with the attention to detail afforded its laptop-bound brethren.

Every time I use a compact keyboard I am reminded all designers of such keyboards must be sadists. They move keys around to obscenely hard to reach places. Sometimes they remove keys altogether, making the keyboard worthless. Dell’s Tablet Wireless Keyboard for their Venue 8 Pro is no exception. Take a gander at the photo below. Why does the keyboard need two Alt keys? Couldn’t that second Alt be used for the apostrophe, which is explicably a Function key combination? Why is the question mark key on the left, next to a full size shift key, when it could have been put in its normal position next to a smaller right shift key?

image

That’s not to say it’s all bad. Actually, the keyboard itself is quite good for short emails and corrections to documents. Expectations are usually low for compact keyboards, so this is better than some when it comes to comfort. I didn’t make many mistakes, although any time I needed certain punctuation I had to stop and think. It’s the ergonomic and functionality decisions, and aforementioned omissions, that make absolutely no sense. For example:

  • The keyboard has no backlight. If Microsoft can insert a backlight in a keyboard half as thin, why can’t Dell?
  • Two watch batteries are required. Yes, it comes with them, but those things are expensive. Why isn’t there a rechargeable battery that could charge via MicroUSB from the Venue Pro’s USB port?
  • I said it before, but come on – what in the world were they thinking with the apostrophe and quote keys? They’ve moved from a normal location – next to : and ; – to requiring a Function Key combination. But they left { and } intact? Who uses those often while typing in Word or web sites? Maybe developers, like me, but we need the quote and apostrophe, too!
  • The keyboard connects magnetically to the case – which is awesome – except, the keyboard doesn’t deactivate itself when the magnet is engaged. That causes key presses to turn the tablet on, thus draining the battery. It also drains the keyboard’s battery. It sounds like a simple engineering task, magnet turning off the power circuit, but maybe I missed something? The magnet is also a bit weak. Don’t treat this like Microsoft’s Surface keyboard. You’ll want to place the keyboard elsewhere if you’re only going to use the Venue Pro 8 as a tablet.
  • If the on-screen keyboard can fit all keys on the Venue Pro’s screen, why can’t the physical keyboard that has more physical room?

If you were a product manager, would you let this thing ship with such obvious issues?

Those gripes aside, I like the keyboard, and its design complements the Venue Pro 8. The design of the folio case, it’s built-in pen holder, and magnetic grip of the keyboard to the case all make this a worthwhile addition to your Dell Venue Pro accessory list. Just don’t expect to get much work done with it if you need apostrophes, dashes, or quotes.

Pros: Keyboard perfectly matches contours of the Venue Pro 8, and connects magnetically. Package comes with a case that looks very nice and can hold the digitizer pen. Keyboard can be left in the car, at home, and so forth, so you don’t have to carry it around when not needed.

Cons: The keyboard + case combo seems to weigh as much as the Venue Pro, practically doubling the weight. Alcohol must have been involved when deciding the keyboard layout. The magnet is a bit weak. The keyboard isn’t good for any long documents due to the layout’s inexplicable key locations.

SAM_8765

Figure: The keyboard connects magnetically to the flap on the case.

SAM_8764

Figure: The keyboard looks great even when not being used. That doesn’t mean it folds back like the Surface – it will fall off if you treat it like Microsoft’s prodigy.

SAM_8763

Figure: The keyboard runs off two CR2025 3 volt batteries. The tray is a bit difficult to remove.

SAM_8776

Figure: The keyboard.

SAM_8762

Figure: Unwrapping.

SAM_8761

Figure: The packaging. Front.

SAM_8760

Figure: The packaging. Back.

There’s no doubt about it – SkyDrive (now OneDrive) is broken in Windows 8.1. At some point, your files may stop syncing, and Windows simply will not let you know. It happened to me across all devices I had upgraded from 8.0 to 8.1. Many forum posts: here, here, here, and here, are complaining about the problem. The real issue? Nobody knows. Microsoft hasn’t been helpful, either, turning a deaf ear to consumer complaints, and offering no advice in their forums other than to run their SkyDrive troubleshooter. What does that do? It simply restarts the SkyDrive service most of the time, which doesn’t solve the problem.

Researching the issue a bit more, I noticed in the File Manager event log, a message of “Error message: Offline availability: found one item with an empty resourceId, aborting”. That sounded like a permissions/access issue may be causing a file to be unreadable. This lead me to try resetting all the permissions on the SkyDrive folder. Guess what? That process caused other pop-ups to appear. Pop-ups with error messages about file permissions being unable to be changed or accessed. Aha! Progress! If those files can’t be read by SkyDrive’s sync tool, maybe that’s holding up all my syncing!

By moving out those files above and restarting the SkyDrive services, my sync is working again! I don’t know how long this will last, but I hope the steps below will help you troubleshoot the issue on your end.

1. Open Explorer and right-click your SkyDrive folder and select Properties.

image

2. Click Security, then Advanced, and you should see something similar to the dialog below. Make sure SYSTEM, Administrators, and your own user name all have Full control.

image

3. Check the box Replace all child object permission entries with inheritable permissions from this object and click Apply.

4. Make note of any files on which you receive errors so you can find them and move them out of the SkyDrive folder to somewhere else. This appears to be what was tripping things up for SkyDrive on my end.

5. Move the files from Step 4 to a folder outside of SkyDrive. I zipped these up and kept that ZIP folder in SkyDrive. I have not yet found the reason for those files to have issues. It’s possible setting their permissions again may fix it. My guess is some files may have domain credentials attached that may cause trouble, since I sync with my work PC.

6. Open an elevated command prompt by pressing Windows + X and selecting Command Prompt (Admin).

image

7. Shut down SkyDrive by typing skydrive /shutdown in c:\windows\system32. You should be starting in c:\windows\system32, but if not, you can type cd “c:\windows\system32” to get there. Wait two minutes.

8. Start up SkyDrive by typing skydrive from that same prompt, this time without the /shutdown command, and wait two minutes. Launch the SkyDrive app from the Start menu as well, just to make sure everything’s kickstarted. Check to see if the SkyDrive Sync Engine Host process is running in Task Manager. You can press Control + Shift + Escape to bring up Task Manager, sort by name, and find SkyDrive Sync Engine Host under Processes. If the SkyDrive process doesn’t launch after a couple minutes, try restarting your machine.

image

9. You’ll see a lot of disk activity while SkyDrive appears to scan your files and folders all over again. Depending on the number of files and folders you have to sync, this could take a while.

10. Check again in a few hours and see if your SkyDrive folder online appears to properly match with your machine. If it does, then my fix worked.

Good luck!

Best,

-Auri

UPDATE (13-Dec-2013): Microsoft has a fix: http://answers.microsoft.com/en-us/windows/forum/windows8_1-networking/dell-venue-pro-loses-wireless-connection-after/bc8a1426-fdb8-466d-b074-c80a06e70d76 and direct link to update http://www.microsoft.com/en-us/download/details.aspx?id=40755

UPDATE (10-Dec-2013): Updated to include fix for WiFi problems caused by latest Patch Tuesday installs.

My WiFi stopped working on my Dell Venue Pro 8. Uninstalling Microsoft Updates KB2887595 and KB2903939 fixed the problem.

TIP: After uninstalling these updates, you can go back to Windows Update via the method below, scan for updates, then right-click the updates and select Hide this Update so Windows doesn’t repeatedly try to reinstall it.

To do this:

1. On the Start menu, swipe down to All Applications

2. Scroll all the way right and tap Control Panel

3. When Control Panel appears on the desktop, search for Windows Update by typing in the search box, and tap it

4. On the left pane there will be an option for View Installed Updates. Tap it.

5. Find Update for Microsoft Windows (KB2887595) and tap it, then tap Uninstall. If you also have update KB2903939, don’t restart yet. Otherwise, skip to step 7.

6. Find Update for Microsoft Windows (KB2903939) and tap it, then tap Uninstall.

7. Restart.

8. Your WiFi should be working again.

I picked up a Dell Venue 8 Pro for $99 as part of Microsoft’s 12 Days of Presents spree. Here are some tips & tricks for the more techy folks out there:

How to Access the BIOS

Press the power button once. Then hold down the Volume Down button until the Dell logo disappears. You don’t need a keyboard – it has an on-screen mouse mapped to the touch screen. Cool, eh?

To access the Advanced settings of the BIOS, follow the instructions through Step 7 below:

How to Speed Up SSD Disk Access by Modifying the EFI / BIOS

Thanks to Sasha for the following steps, which can increase speeds by over 50%!

1) From Windows, bring up the charms (swipe in from right)
2) Select Settings -> Change PC Settings, or Start, then All Apps, then PC Settings.
3) Choose Update and Recovery -> Recovery
4) Under Advanced Startup, select Restart Now
5) From this blue menu, select Troubleshoot, then select Advanced Options
6) Select UEFI Firmware Settings, then click Restart
7) Now, the BIOS shows up, hit the on-screen ESC button ONLY ONCE.
8) You’re now in the Main “tab”, with a vertical list of options, from here you must select Advanced, this lets you see all the BIOS settings and is different from hitting the Advanced tab across the top.
9) Select LPSS & SCC Configuration
10) Select SCC eMMC 4.5 HS200 Support and select Enabled (Mine was disabled by default)
12) Select DDR50 Support for SDCard and select Enabled (Mine was disabled by default)
13) Press F10 on the on-screen keyboard to save, then Save Settings and Exit and you’re all set.

Getting Back ~5 Gigabytes of Space by Removing Recovery Partition

The Dell Recovery Partition is essential for restoring your machine should something catastrophic happen. To add insult to injury, Dell often runs out of stock of recovery media, and won’t send you such after a year or two has passed. That’s hit me before, and it’s not fun. So, make sure you’ve backed it up!

Once you’ve backed up that recovery partition, there’s no point in keeping it. Get those gigs back!

Here’s how:

NOTE: Make sure you have at least 50% of your battery left for this process. I wouldn’t do this when hitting the lower ends of the battery spectrum.

  1. Go to All Applications and scroll all the way right to the Dell group. Tap the My Dell application.
  2. Click Backup, even if it says no backup software is installed.
  3. Click the Download Local Backup button. This will provide a link to download Dell Backup and Recovery, which you should download and install. Basically, once you click the Download button, select Run and wait for Setup to do its job. This process can take a long time. Even the download appears to be huge. It’s probably downloading the latest recovery data, but that’s just a guess.
  4. After the software has installed, it will request a restart. So, restart the tablet.
  5. Go to All Applications and back to the Dell group. Note the new Dell Backup and… option. Tap it.
  6. Wait a few moments for the cool clock animation to complete, then agree to whatever terms are presented, or not.
  7. Tap the Reinstall Disks option. This is the equivalent of a Factory Restore partition backup.
  8. Tap USB Flash Drive, which is probably the only real option you have with this unit. This includes use of the Micro SD card, which is what I used, since I didn’t have a USB adapter handy. If you decide to use an external burner, that’s cool, too. But… why?
  9. Select your USB drive, or the MicroSD card. I backed up to an 8 GB MicroSD. Dell estimates the backup at 4.03 GB, so 8 GB should suit you just fine.
  10. Tap Start, then tap Yes when asked if you’re sure about wiping out the USB or MicroSD drive. Of course you’re sure! (right?)
  11. Wait until it’s done.
  12. When it’s complete, click OK, and put the backup media in a safe place. I put it in my Venue Pro’s box.
  13. Go back to Start, then All Programs, then Desktop.
  14. Hold down on the Start button and select Command Prompt (Admin).
  15. Type diskpart to launch the Disk Partition manager.
  16. Type list partition to see the available partitions.
  17. Type select partition X, where X is the number of the approximately 4 gigabyte recovery partition. On my Venue, it was 6.
  18. Make sure you see “Partition X is now the selected partition”!!!
  19. Type delete partition override and hit enter.
  20. You should be greeting with “DiskPart successfully deleted the selected partition.”
  21. Type exit to quit DiskPart, then exit again to quit Command Prompt.
  22. Now that the partition is gone, we need to expand the size of the main partition.
  23. Open an Explorer window and long press This PC, then select Manage.
  24. When Computer Management appears, select Disk Management under Storage.
  25. You should see the 4.64 gigabytes or so we freed up showing as Unallocated.
  26. Long press your C: drive and select Extend Volume….
  27. The Extend Volume Wizard appears. Click Next.
  28. You’ll be asked where the space to extend the volume should come from. Everything should already be filled out to assign the maximum unallocated space. Simply tap Next or adjust as desired and click Next.
  29. The wizard will confirm the extension settings. Click Finish.
  30. There you go! Your C: drive is now almost five gigabytes larger!

UPDATE: You can also back up to a USB drive by acquiring a USB OTG, or “On-The-Go”, adapter. Pick one up from Fry’s, SKU number 7582626, here. This will also enable you to use thumb drives and such on your Dell Venue 8 Pro.

Disable the Annoying Backlight

Dell’s power management settings for the backlight are wretched, making the display dim almost all the time. Let’s get around that, shall we?

  1. Swipe out the charms menu, then select Settings, then Change PC Settings on the bottom.
  2. Select PC and devices.
  3. Select Power and sleep.
  4. Set Adjust my screen brightness automatically to Off.