Adding GitHub upstream remote in Visual Studio

Forking and opening a GitHub repo in Visual Studio is a matter of seconds. But how to keep your fork up-to-date easily, all within the Team Explorer window? All you need to do is to add the upstream remote.

Navigate to your cloned fork in Team Explorer, click the title bar to reveal repository menu and select Settings.

Settings
Settings

In the opened page select Repository Settings and then find the Remotes section at the bottom:

Remotes
Remotes

Click the Add link to open the Add Remote dialog window. Here fill out:

  • Name – upstream
  • Fetch – URL of the original GitHub repository you forked
  • Push – same as Fetch
  • Push matches fetch – leave checked
Adding upstream remote
Adding upstream remote

Confirm with Save and that’s almost it. Now we just need to do a fetch to get the current state of the upstream. Click the title of the Team Explorer window again and navigate to Sync:

Sync
Sync

And from the top menu click the Fetch link, select upstream from the dropdown menu and click Fetch. Now the branches from the repository should be available in the Branches view and you can merge the latest changes from upstream in your fork.

Notes from Windows Community Standup (February 2018)

Channel9 hosted a Widows Community Standup on February 22 featuring Kevin Gallo and Andrew Whitechapel.

The three main topics that were discussed were UWP Console applications, multi-instance apps and broader file access. You can watch the recording on Channel9 or right here.

If you just want to get a quick peek at the news, read on the rest of the article, because I have prepared a compact summary for you 🙂 .

Continue reading “Notes from Windows Community Standup (February 2018)”

Tip: Force-reinstall NuGet packages

NuGet is a great package manager, but sometimes it misbehaves and packages are either not properly downloaded or are not properly included in your project. Whenever you come across this, I recommend doing a force-reinstall of all packages.

In Visual Studio go to Tools -> NuGet Package Manager -> Package Management Console . In the Package Manager Console window then enter the following command:

This will go package by package and force-reinstall them the opened solution.

If you want to force-reinstall packages only for one specific project instead of the whole solution, you can add the -ProjectName switch:

NuGet

Injecting input in UWP apps

One of the less known capabilities of UWP apps is the ability to inject input. This is especially useful if you want to give the user a guided tour through the app, offer immediate feedback to users with assistive technologies or implement a remote help functionality into your app. In this article we will explore what the Windows.UI.Input.Preview.Injection namespace has to offer and how can you use it in your app. Continue reading “Injecting input in UWP apps”

Connect(); 2017

Another year has come and with it the fourth annual on-line Microsoft Connect conference. Between 15th and 17th November you could watch the newest goodness from Microsoft for all developers on all platforms.

Two main keynotes were dedicated to intelligent cloud and building intelligent applications of the future. Let’s see what Scott Guthrie (of course in his favourite red polo shirt) and other speakers have unveiled. Continue reading “Connect(); 2017”

Checking for design mode in Xamarin.Forms

Visual Studio for Windows and Mac now includes Xamarin XAML Previewer, which allows you to preview your Xamarin.Forms XAML without having to launch the app. Unfortunately, there are times when your page constructor contains code that cannot be run in design mode (for example service resolution, etc.) and causes the previewer to crash. Can we easily check if the app is in preview (design) mode?

XAML Previewer
XAML Previewer

Continue reading “Checking for design mode in Xamarin.Forms”