Author Archives: gabrewer

Learning Current Angular Tool Best Practices

Over the last couple of weeks I have been diving back into Angular development using Angular 6 and ngrx.  One of the things that quickly became apparent is that now the best practices of installing JavaScript tools is to install them locally instead of globally to prevent version collisions.

When I first started I installed the angular cli globally and encountered this type of error when running many of the sample apps that I downloaded.

Your global Angular CLI version (6.0.8) is greater than your local version (1.7.3). The local Angular CLI version is used.

This didn’t seem to cause me an issues but still the error bugged me and when I was reading the book Angular 6 for Enterprise-Ready Web Applications by Doguhan Uluca he really drives home that you should keep the number of globally installed packages to a minimum. 

I was able to find out what commands I had installed globally using this command

npm list -g --depth=0

Which showed I only had the angular cli and npm install globally.

So I was able to uninstall the global angular cli and get rid to the ugly warnings.

Doguhan also points our that you should use npm-windows-upgrade instead of using npm i -g npm to upgrade npm on Windows or you are going to run into npm corruption issues.

Random stuff I want to remember

Windows 10 Home password expiration.

Today I had a couple of Windows 10 Home machines had their passwords expire. 

To turn off the Windows 10 password expiration

net accounts /maxpwage:0


Upgrading npm on Windows

I was installing jspm on a new machine and after I installed node 4.3.1 it was running npm I was trying to upgrade npm.  I tried a bunch of different commands I found on stack overflow but this command from the npm site (I feel like Colonel Sanders looking for the Nashville Hot Chicken Recipe) did the trick on both Windows and the Mac.

npm install [email protected] –g



In my recent javascript library/framework exploration I found myself needing a quick way to server html without having to have gulp or more permanent web server.  I found http-server fits the bill nicely. 

npm install –g http-server

http-server –o –c-1

-o opens browser window after starting the server

-c-1 disables caching


VisualStudio Code fix for icons not appearing

When VisualStudio code was announced I went out and installed it right away on my Mac and Windows machines.  One my home development machine I was unable to see the icons.  I was thinking that it was due to my 4K display and an High DPI issue but it turns out not to be the case.


In reading the Reacting to feedback, common issues, and our first update post on the Visual Studio Code bug it was due to the svg file extension being associated to something other than image/svg+xml in my case due to Inkscape it was set to application/svg. 


Changing the Content Type to image/svg+xml made the icons visible.


There is a FAQ with several fixes and workarounds for Visual Studio Code at

Display Collection+JSON in the browser

In the last year I have become enamored with Hypermedia APIs and the Collection+JSON API in particular that I first came across in Mike Amundsen’s book Building Hypermedia APIs with HTML5 and Node.  It seems to be a perfect fit for many of the APIs that I have been working on.  Glenn Block created the CollectionJson.Net library to make it easy to create Collection+JSON based ASP.NET Web APIs. 

However when I browse to a WebAPI endpoint that returns a Collection+JSON result in Internet Explorer or Firefox I get a prompt to download the file. 



Chrome displays the raw JSON result in a more friendly manner.


Continue reading

Unable to open Database Project after upgrading to SQL Server 2012 SP1

I recently upgraded SQL Server 2012 on my development machine to SP1.  Once it was installed, my solutions with SQL Server Database Projects complain that the version of SQL Server Data Tools is not compatible with the database runtime components install on this computer.


Both the “Learn more…” and “Get the latest version of SQL Server Data Tools…” links do not currently resolve to an active page.

Luckily  I was able to find Mr. Wharty’s Ramblings – Everything SQL blog which had the solution, install the latest version of the SQL Server Data Tools – November 2012 update and migrate the database projects.

Windows 8 installed on Lenovo W520 – Finally

Well, I finally got around to figuring out why I could not install the Windows 8 Release Preview on my Lenovo ThinkPad W520.  Every time I went to install the OS it would hang during boot.  That issue turned out to be that I needed to install on a GPT disk using the UEFI bios.

Before doing that I installed the latest bios from the Lenovo site.

After upgrading the Bios and backing up the little data I wanted to save, I proceeded to install the OS.  I went through the boot process fine, installed the installation files reboot and then hung at 90% when configuring devices.  After fiddling with the video driver settings Optimus, Integrated and Discrete, I tired disabling the wireless card and the install completed successfully.

After the installation was complete, I installed the Lenovo Windows 8 beta drivers turned the wireless adapter back on, crossed my fingers and rebooted and I am finally running Windows 8 on my Lenovo W520!


Update:  After installing all the Windows 8 drivers there was one unknown device.  Turns out it was the ThinkPad Power Management Device.  I downloaded the Windows 7 driver from the Lenovo site and everything seems good.

Cool Development Utility: smtp4dev

The other day I needed to test the Mail functionality of an application I was developing on Windows 7 and I realized that the built in SMTP server had been removed.  I initially thought about just installing the free version of SmarterMail and configuring that but I decided to take a look and see what else I could find.  I ran across smtp4dev on CodePlex.  Codeplex Link

smtp4dev captures emails that are sent to localhost on whatever port you configure smtp4dev to listen on.  You can then inspect the formatting and content by choosing an entry in the list and selecting Inspect or View.

smtp4dev main screen

Inspect shows a window that lets you see the MIME parts (Source, Headers, Body) and the raw Message Source. View opens the email message in your default email program.

Message Inspect Window

smtp4dev even supports SSL/TTL allowing you to specify a certificate to use for the secure connection.

smtp4dev options

smtp4dev is an easy to use utility that provides some powerful capabilities that can make integration testing email functionality in your apps easier.