Visual Studio Live! – Redmond

Posted May 27, 2014 8:03 PM Categories: Events | VSLive Redmond | Async | Visual Studio

I will be presenting 2 sessions at Visual Studio Live! in Redmond this August 18-22.  The conference is a full 4 day event and there’s still time to register and save $500 if you register before 6/11/14!  For this event, I’ll be presenting:

TH15 Performance and Diagnostics Hub in Visual Studio 2013
Date:
Thursday, August 22, 2014
Time: 11:00am – 12:15pm
Level: Intermediate

Visual Studio 2013 has introduced a new Performance and Diagnostics hub which encompasses a variety of new and old tools to profile your Windows Store applications. In this session, we will take a detailed look at all of the tools that the Performance and Diagnostics Hub has to offer with both XAML and HTML/JavaScript Windows Store apps.

TH25 Writing Asynchronous Code Using .NET 4.5 and C# 5.0
Date:
Thursday, August 22, 2014
Time: 3:45pm – 5:00pm
Level: Introductory

A variety of new features were added to the .NET 4.5 Framework, including support for easily writing asynchronous code. This session will introduce the concepts of asynchronous programming, .NET Tasks, how to ensure your UI remains responsive, and how to do all of this properly in your own applications using the new "async" and "await" keywords. If you're looking for ways to provide a better, smoother experience for your users, don't miss this session!

RDSPK23

Get more information on the conference at:

Visual Studio Live! – Las Vegas

Posted January 10, 2014 11:18 AM Categories: .NET | Bing | Events | Visual Studio | VSLive Vegas | Windows 8.1

imageI will be presenting 3 sessions at Visual Studio Live! in Las Vegas this March 10-14.  The conference is a full 5 day event and there’s still time to register and save $500 if you register before 1/22/14!  For this event, I’ll be presenting:

LT20 Controlling Hardware using Windows 8.1
Date:
Tuesday, March 11, 2014
Time: 4:15pm – 5:30pm
Level: Introductory

Windows 8.1 allows developers to communicate with a variety of devices through several interfaces. In this session, we will look at how to talk to hardware connected via USB and Bluetooth, as well as some of the new APIs which allow Windows 8.1 to talk to Point of Sale (POS) devices, scanners, and even 3D printers using real examples with real hardware!

LT27 Performance and Diagnostics Hub in Visual Studio 2013
Date:
Wednesday, March 12, 2014
Time: 1:15pm – 2:30pm
Level: Intermediate

Visual Studio 2013 has introduced a new Performance and Diagnostics hub which encompasses a variety of new and old tools to profile your Windows Store applications. In this session, we will take a detailed look at all of the tools that the Performance and Diagnostics Hub has to offer with both XAML and HTML/JavaScript Windows Store apps.

LW30 Overview of the Bing Platform
Date:
Wednesday, March 12, 2014
Time: 4:30pm – 5:45pm
Level: Introductory

Bing has a variety of controls, APIs, and web services designed to enhance your application and provide users with an interactive way to explore the world around them. In this session we will take a look at several of these items and how they can be used from a Windows desktop, Store or Phone application.

LSPK35

Get more information on the conference at:

NuGet-enabled WiimoteLib and ThinkGearNET

Posted January 21, 2011 3:00 AM Categories: .NET | Neurosky MindSet | NuGet | Visual Studio | Wiimote

With the official release of NuGet and the NuGet gallery, I decided to try it all out by uploading the current versions of WiimoteLib and ThinkGearNET to the gallery.  The process was pretty smooth, but I learned a little bit along the way which I thought I’d share.

So what’s NuGet?
From their own page:  NuGet (formerly known as NuPack) is a free, open source developer focused package management system for the .NET platform intent on simplifying the process of incorporating third party libraries into a .NET application during development.

In short, this means you can right-click and add a reference to a third party library without having to download it yourself, extract it, locate it manually on your drive, deal with dependencies, etc.  All of this is handled automatically, as is finding and integrating new versions of those libraries with your projects.

NuGet as a User
If you want to use NuGet to download packages, you’ll first need to install the NuGet Package Manager extension for Visual Studio 2010.  You can find this in the Visual Studio Extension Manager or at the NuGet CodePlex site

image

Install the extension and you’ll find a new right-click entry when adding a reference: Add Library Package Reference….

image

Select this and you’ll be presented with a dialog similar to that of the Extension Manager.  You can see/search what’s installed, what’s in the gallery, and which packages you already have installed have updates available.  As an example, you can search for WiimoteLib or ThinkGearNet and pull down the package.

image

In either case, a reference will be set to the assembly, and, with the way I created the package, you’ll get a readme file as well as an Extras directory with additional documentation, license info, samples, etc.

NuGet as a Package Developer
If you are the developer of a third party library, getting it up to the NuGet Gallery for the rest of the world to consume is pretty simple.  Full documentation on all of the advanced features is located on CodePlex, but I’m going to explain the basics using WiimoteLib as an example.

First, you will need to download the command line NuGet Command Line Tool from CodePlex to create packages.  Put this executable in a location in your PATH or somewhere else that’s easily accessible.

Next, you will need to organize your library, documentation, etc. in a way that NuGet can handle.  Three main directories will exist inside any package.  Use those which make sense for your distribution.

Directory

Usage

\lib The assemblies that will be referenced by the user’s project when this package is installed
\content Anything in here will be copied to the user’s project root and added to the project/solution
\tools Executables that will get copied to the target project and will be added to the PATH environment variable

For my packages, I only needed the lib and content directories.  Inside of the lib directory, I copied the WiimoteLib.dll assembly.  Inside of the content directory, I created a directory named Wiimote_Extras in addition to a Wiimote_Readme.txt file.  Inside the Wiimote_Extras directory, I placed a zipped copy of the WiimoteLib samples, a docs directory containing the CHM help file and license files, and a MSRS directory containing the MSRS libraries for the Wiimote.  So, my full directory list looked as follows:

image

One of the issues I ran into was including the samples as projects/source directly.  When they get added to the project as shown, they become source code for the project, and that can cause conflicts.  So, to work around the issue, I just zipped up the projects and made them easily accessible.  Just remember if you include a source code file directly in that content directory, it will become part of the user’s project.

You can go much further with this by specifying subdirectories for different versions of your library with multiple subdirectories, PowerShell scripts, etc. but for my needs this was all that was required.

The final piece of the puzzle is creating a manifest file, called the .nuspec file, which details the package and its contents.  You can find full documentation for the .nuspec file on CodePlex, but I’ll cover the basic items that are required.  Here is the .nuspec file for WiimoteLib:

<?xml version="1.0" encoding="utf-8"?> 
<package> 
  <metadata> 
    <id>WiimoteLib</id> 
    <version>1.7</version>
    <title>WiimoteLib</title>
    <authors>Brian Peek</authors>
    <description>Managed Library for Nintendo's Wiimote</description> 
    <summary>A library for using a Nintendo Wii Remote (Wiimote) from .NET.</summary>
    <language>en-US</language>
    <licenseUrl>http://wiimotelib.codeplex.com/license</licenseUrl>
    <projectUrl>http://wiimotelib.codeplex.com/</projectUrl>
    <tags>Wiimote Nintendo Games</tags>
  </metadata> 
</package>

Of the items listed, only the id, version, authors and description fields are required.  The rest add some useful data that will get displayed in the package manager and on the Gallery site.

Element

Description

id A unique identifier for the package.  Make this something short but unique.
version The version of the library this package contains
title A pretty title for the package
authors A comma-delimited list of authors
description A longer description of the package
summary A shorter description of the package
language Locale ID for the package
licenseUrl URL pointing to the license file on the web
projectUrl URL pointing to the project homepage on the web
tags A space-delimited list of tags to help find the package when searching

When uploading to the NuGet Gallery, everything but the id and version can be added or changed on the site itself.  These items are used for display both on the NuGet Gallery site, as well as inside the package manager in Visual Studio.

So, create your .nuspec file and save it somewhere to be reference for the next step.

With the directory organized and the .nuspec file in place, the package can be created with the nuget.exe command line tool downloaded earlier.  At its simplest the command to create a package is as follows:

 
nuget pack <.nuspec file> –b <root package directory>

Running this command will generate a file with a .nupkg extension.  This is your final package ready to upload to the Gallery!

Currently, if you wish to upload a package, you need to register on the NuGet Gallery and then send an email to the address specified to have your account activated.  Once activated, go to the Contribute tab on the site, click Add New Package and follow the steps.  When complete, your package will be available to download by anyone with the package manager installed.

Conclusion
There is obviously a ton more to NuGet, the package manager, the package creator, etc. and I highly recommend going through the documentation on the NuGet CodePlex site to get the full details.  Your package may be far more advanced than this and require additional configuration, so please read up!  Otherwise, take a look at the gallery and get started using some third party libraries in your projects!

Visual Studio Live! Orlando 2010

Posted November 8, 2010 12:46 AM Categories: .NET | Coding4Fun | Events | Visual Studio | VSLive Orlando | NUI

Update: Slides and source for my sessions are posted over on my Events page.  Have a look!  Thanks to everyone that came to my sessions!  Comments and critiques are welcome.

imageI have been selected to speak at the Visual Studio Live! conference in Orlando.  In addition to presenting two sessions at the conference, I’m also coordinating a special event on Tuesday night which we’re calling Devopalozza.  I have created and will host a team Jeopardy! style game-show which will pit three teams of speakers and attendees against each other for fabulous prizes.  I previously created the hardware and software for the Visual Studio Live Redmond conference, which turned into an article on Coding4Fun for those that might want to create a game-show at home or the office.

The two sessions I’m presenting are:

M15 What's New in Visual Studio 2010 Debugging
Date: Monday, November 15, 2010 
Time:  3:00 PM – 4:15 PM
Level: Intermediate

Visual Studio 2010 contains a variety of new debugging features to aid developers in creating bug-free software. In this session, we will explore many of these new features including IntelliTrace (historical debugging), breakpoint enhancements, new tools for debugging multi-threaded and parallel applications, enhancements to DataTips and watch windows, and new tools to better visualize and debug WPF applications and events. With these tools in hand, bugs don't stand a chance!

W13 Multi-touch Madness!
Date: Wednesday, November 17, 2010
Time: 1:45 PM – 3:00 PM
Level: Introductory to Intermediate

Multi-touch technology is popping up everywhere, most recently in Windows 7 and various .NET technologies. Windows 7 has been designed from the ground-up with multi-touch in mind, and the newest versions of WPF and Silverlight are multi-touch capable as well. In this session I will take you through the 4 biggest areas of Microsoft multi-touch technology: Windows 7, WPF 4, Silverlight, and Surface, including the forthcoming Surface Toolkit for Windows Touch. You will learn how to make your applications multi-touch aware and capable using each of these platforms, how to handle gestures and manipulations properly across platforms, and learn where multi-touch is heading in the future with regard to Microsoft development.

  Get more information on the conference at:

Hope to see you all there!

Visual Studio Live! 2010 Redmond – Slides + Source

Posted August 3, 2010 8:22 PM Categories: C# | Events | Multitouch | Visual Studio | VSLive Redmond

Thanks to all who attended my first session today, and a thank you in advance to those attending Thursday’s session on multi-touch.  I’m going to post my slide deck for the What’s New in VS2010 Debugging session now and I will update this post on Thursday/Friday with the source and slides for the multi-touch session.  Feel free to contact me with any comments or suggestions, good or bad.

Enjoy!