Monthly Archives

October 2015

Remote Debugging Azure Websites – Day 31 – Visual Studio 2015

By | Visual Studio | 5 Comments

This is post 31 of 31 in the series “31 Days of VS2015 Tricks and Treats” In this post we will learn about how we can debug a site that is hosted in Azure using Visual Studio 2015. Remote Debugging Azure Websites has been around since Visual Studio 2013, as a feature of Azure SDK 2.2. So to use Remote Debugging following the steps below, you have to install Azure SDK 2.2 or later. Using Azure SDK you can debug a published live website on Azure and debug any issues that may only come up in your production environment. To…

Read More

Controlling an RGB LED on a Photon with a UWA Color Picker

By | .NET, Blogs, C#, Fun, IoT, Microsoft, Mobile, Multi-Device, News, Photon, Visual Studio, Windows Universal Apps | 3 Comments

The Particle Photon makes it easy to control the color of an RGB LED. There are a number of color picker controls you can use in Windows apps. I wanted to see how easy it was to hook a Photon RGB LED up to a Windows app color picker. It ended up being a snap by using the Particle cloud functions. In this project I wrote a simple UWA that calls a Particle cloud function called “setRGB” on my targeted Photon whenever I change the selected value on the color picker. Then I implemented an event handler on that Photon’s…

Read More

Build in Visual Studio Online – Day 30 – Visual Studio 2015

By | News, Visual Studio Online | No Comments

This is post 30 of 31 in the series “31 Days of VS2015 Tricks and Treats” Build Build has been a solid mainstay since the early days dotNet. It provide a reliable method of reliably building applications in a consistent manner regardless of the machine running the build. Like its predecessor make and other current products such as ant it’s operation can scripted to significantly customize its execution. Its capabilities have grown over the years, but being designed as a tool for converting dotNet code and supporting files into applications, libraries, et cetera it can be rather cumbersome to use when…

Read More

GitHub Integration – Day 29 – Visual Studio 2015

By | Visual Studio | 4 Comments

This is post 29 of 31 in the series “31 Days of VS2015 Tricks and Treats” git I do not miss the old days of source control tools. Using source control was arguably the poster child for benevolent evil, or to some Lavful Evil. The value of maintaining good source control discipline has always been immense, but the client tools have historically varied from awkward, to buggy, to 2:00 A.M. musings as to whether XCOPY and Robocopy weren’t actually a better idea; if not evil themselves then certainly tainted with an evil aura. And let’s not forget buying everyone on the…

Read More

IntelliTest – Day 28 – Visual Studio 2015

By | Testing, Visual Studio | 2 Comments

This is post 28 of 31 in the series “31 Days of VS2015 Tricks and Treats” One of the drawbacks to unit testing has always been that you, as the developer, actually had to code the unit tests.  In complex scenarios writing unit tests to exercise all the different permutations of logic can become very tedious and time consuming.  I’ve often thought to myself, “Wouldn’t it be great if there was tooling built in to Visual Studio that could automatically generate a unit test suite?”.  In Visual Studio 2015, with the introduction of IntelliTest (formally known as “Smart Unit Tests”), this is…

Read More

Generic UI Testing with Coded UI – Day 27 – Visual Studio 2015

By | .NET, C#, News, Testing | 6 Comments

This is post 27 of 31 in the series “31 Days of VS2015 Tricks and Treats” As we all know, testing is one of the hardest parts of delivering quality testing. What I really mean by testing is Automated Testing. Sure, we all test our code as we develop, but having a comprehensive suite of tests to run as part of a CI Build or Deployment is key in delivering quality software efficiently. As part of Visual Studio 2010, Microsoft released a Coded UI Testing Framework that had lots of promise. There have been some updates since then, but IMHO…

Read More

Azure Mobile Apps: Writing a Fast Custom DomainManager, Part 2

By | Azure, C#, SQL Server | 3 Comments

This is post 7 of 11 in the series “Azure for Developers” Picking Up Where We Left Off Last time, I wrote about how to develop a custom DomainManager to plug into an Azure Mobile Apps TableController. The goal is to implement a DomainManager that works seamlessly with the Azure Mobile App client SDKs, enables CRUD against database tables with non-string keys, and generates good SQL that can be supported with ordinary general-purpose indexes. I covered which class to inherit from, the methods you’ll need to implement, and some of the helpful utilities that the parent class affords you. In this…

Read More

PerfTips – Day 25 – Visual Studio 2015

By | Visual Studio | One Comment

This is post 25 of 31 in the series “31 Days of VS2015 Tricks and Treats” One of the coolest new enhancements to the debugging experience in Visual Studio 2015 is something called PerfTips. These tips provide timing information as you step through code in your application. Unless today is your first time debugging an application in Visual Studio, you’ve probably used a Stopwatch or Timer at some point in your career. In the past this was the simplest and quickest way to diagnose how long a block of code takes to execute. Not anymore. With PerfTips, this information is tracked and…

Read More

Performance Diagnostics – Day 24 – Visual Studio 2015

By | Visual Studio | No Comments

This is post 24 of 31 in the series “31 Days of VS2015 Tricks and Treats” Yesterday we took a quick look at the memory profiler included in Visual Studio. Today I’d like to introduce you to the other side of that coin, the performance diagnostic tools. You can monitor application performance as it runs using the new Diagnostic Tools window in Visual Studio 2015. This window shows memory and CPU utilization, among other things. While this may not seem extraodinary at first, it can actually be very useful when debugging your application. For starters, the CPU graph only displays…

Read More
Wiring Diagram

Windows IoT Core : Inter-Application Communication using App Services

By | C#, Hardware, IoT, Microsoft, News, Raspberry Pi, Visual Studio, Windows, Windows Universal Apps | 9 Comments

Windows IoT Core applications fall into two categories. Headless applications, also called Background applications, and Headed applications which are applications that expose a user interface. The Windows IoT Core device as a whole can also be run in a headless or headed mode. You are still able to run any number of background applications on a device that is configured in headed mode. These background applications may also be deployed alongside a currently running headed application. It is important to note that there can only be one running UI application at a given time. Background applications can be thought of…

Read More

Memory Diagnostics – Day 23 – Visual Studio 2015

By | Visual Studio | One Comment

This is post 23 of 31 in the series “31 Days of VS2015 Tricks and Treats” One of my favorite debugging features in Visual Studio 2015 is the integrated performance diagnostics tools. If you’ve ever used a commercial profiler like Telerik JustTrace or RedGate ANTS Performance Profiler then this will look familiar. While not as full-featured as the available commercial products, it’s nice to have such a tool integrated into the Visual Studio debugging experience. To use the new built-in memory profiler you don’t have to do anything special. Simply start a debugging session for your application and there should be a…

Read More

Breakpoint Actions & Conditions – Day 22 – Visual Studio 2015

By | Visual Studio | No Comments

This is post 22 of 31 in the series “31 Days of VS2015 Tricks and Treats” For .NET developers everywhere, a new version of Visual Studio brings with it the promise of increased productivity. I think that one of the best ways to increase productivity is to provide greater insight into how our applications behave, and that is why I am the most excited about the debugging improvements delivered in Visual Studio 2015. One such improvement to the debugging experience is how we apply conditions and actions to our breakpoints. When setting a breakpoint we see a new toolbar that allows…

Read More

Live Code Analysis – Day 20 – Visual Studio 2015

By | Visual Studio | 3 Comments

This is post 20 of 31 in the series “31 Days of VS2015 Tricks and Treats” Visual Studio 2015 features live code analysis, powered by Roslyn (.NET Compiler Platform). You can write your own analyers, or access existing analyzers as NuGet packages, including the (still prerelease) FxCop Analyzers published by the Roslyn/Microsoft team. One such third party set of rules and fixes is called Code Cracker. Also currently in pre-release, you can install the C# analyzers using:

Once installed, the light bulbs and quick actions will pick up the rules (over 20 different rules at the time of publication)…

Read More

node.js integration in VS 2015 – Day 19 – 31 Days

By | node.js, Visual Studio, Web | 4 Comments

This is post 19 of 31 in the series “31 Days of VS2015 Tricks and Treats” node.js Ask, “what is node.js?” and one will receive a range of answers with the typical being, Node.js is an open-source, cross-platform runtime environment for developing server-side web applications. — Wikipedia That really doesn’t tell one much and node.js’s usefullness is far broader so I’ll give a thumbnail working description. node.js applications are written in JavaScript or one of the supersets such as TypeScript which compile to JavaScript and are typically run within the node.js runtime. The node.js runtime is available on most OS’s…

Read More

Exploring Multi-Photon and Particle Cloud Functionality with a Useless Machine

By | .NET, Blogs, C#, Fun, Hardware, IoT, Microsoft, Mobile, Multi-Device, News, Photon, Visual Studio, Web, Windows, Windows Universal Apps | 2 Comments

There are many ways for Particle Photons to interact with each other. Even more ways for other devices and apps to interact with Photons through the Particle Cloud. To explore these capabilities, I created a useless machine. My useless machine is made up of two Photons. Photon 1 “falafel_1” has a photo resistor and a green LED. Photon 2 “falafel_2” also has a photo resistor and a green LED. However, Photon 2 also has a servo motor and a second red LED. The servo motor is mounted so that when it is rotated to 90 degrees, it covers both photo…

Read More

Renaming Improvements – Day 18 – Visual Studio 2015

By | News | One Comment

The Rename feature is an IDE improvement you may have seen before as part of an extension. ReSharper and CodeRush users have been happily renaming for a while now, and there’s a reason it’s an often-used feature. Any refactoring operation is likely to involve some renaming, and having to do it just one time is so much faster! Now the rest of us can rejoice – Rename is built-in to Visual Studio 2015 and I like it better than any other method I’ve tried.

Read More

Azure Mobile Apps: Writing a Fast Custom DomainManager, Part 1

By | Azure, C#, SQL Server | 2 Comments

This is post 6 of 11 in the series “Azure for Developers” My last post took you on a journey with me as I analyzed the Azure Mobile App default base entity class and talked about some of the things I saw there. To summarize, I was most disturbed to note that the default choice of primary key was a Unicode string, which as a database and query guy immediately raised all sorts of alarms, flags, flashing lights, klaxons, sirens… well, you get the idea. Strings make inefficient keys to begin with, and Unicode keys literally doubly so. I found a…

Read More

Light Bulbs and Quick Actions – Day 16 – Visual Studio 2015

By | Visual Studio | 5 Comments

Here is another productivity enhancement to Visual Studio 2015 – Light Bulbs and Quick Actions. I love this trend of taking my favorite features from premium paid extensions (like the Light Bulbs I know from ReSharper) and making them an integrated part of the application. I can really tell the Visual Studio team is paying attention to the voices and needs of its users.

Read More

Shared Projects – Day 14 – VS 2015 Series

By | Visual Studio | 2 Comments

This is post 14 of 31 in the series “31 Days of VS2015 Tricks and Treats”   In this post we will learn about Shared Projects support in Visual Studio 2015. Shared Projects support started shipping in Visual Studio from Visual Studio 2013. At that time, to get Shared Projects as one of the option to create a project, we needed to install a separate extension. But, with Visual Studio 2015, support for Shared Projects ships right out of the box. Shared Projects are usually used share code across your solution while still having full API access of the platform…

Read More

Await in Catch and Finally blocks – Day 13 – VS2015 Series

By | ASP.NET, Visual Studio | 2 Comments

This is post 13 of 31 in the series “31 Days of VS2015 Tricks and Treats” Await in Catch and Finally blocks Of all the language additions in C# 6 the added ability to use await in catch and finally blocks is likely my favorite. Previous to C# 6 one couldn’t. This inability could be particularly irksome as it created a conflict between two common good practices: Posting event to logs asynchronously so move the overhead of log I/O out of band from the application Logging errors as they occur. Since exceptions are handled by catch blocks with detection only being…

Read More

Exception Filters – Day 12 – VS2015 Series

By | News | 6 Comments

This is post 12 of 31 in the series “31 Days of VS2015 Tricks and Treats” Exception Filters, simply when Exception filters are a straightforward syntactic extension to C#, at least at first blush. By adding an optional boolean when clause our code can determine whether to catch an exception depending on arbitrary criteria, not merely Exception type. …catch (Exception ex) when (bool)… In other words, we can add a when clause which returns a boolean in order to filter situations to catch. Yeah, so? We’ve always been able to do this:

So, what’s the big deal, except maybe a bit of…

Read More