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.