Saturday, June 18, 2016

CheckOut a Pull Request in Git


Set-Up your Local Git Config

Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = git@github.com:joyent/node.git
    fetch = +refs/pull/*/head:refs/remotes/origin/pr/*

Use the Command Line to Checkout a Pull Request

Now fetch all the pull requests:
$ git fetch origin
From github.com:joyent/node
 * [new ref]         refs/pull/1000/head -> origin/pr/1000
 * [new ref]         refs/pull/1002/head -> origin/pr/1002
 * [new ref]         refs/pull/1004/head -> origin/pr/1004
 * [new ref]         refs/pull/1009/head -> origin/pr/1009
...
To check out a particular pull request:
$ git checkout pr/999
Branch pr/999 set up to track remote branch pr/999 from origin.
Switched to a new branch 'pr/999'

Use Source Tree to Checkout a Pull Request

First, fetch all the open Pull Requests:

Then, simply right click the appropriate Pull Request and select Checkout.

Done.

Saturday, April 30, 2016

A couple of odd questions in a Xamarin University course

These answers don't seem correct to me.  Anyone agree, disagree?




Sunday, April 24, 2016

Resolving common issues loading Xamarin Forms 2.0+ examples

After downloading and trying to run through a few Xamarin Forms demos, I've found that upgrading them to Forms 2.x seems to create errors.  Also you can encounter these errors even if you don't upgrade to the latest version of Forms. These issues will tend to focus on Android.

Issue 1: System.IO.FileNotFoundException: 

Could not load assembly 'Microsoft.Windows.Design.Extensibility, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile?

Just delete the references which ends with *.Design. In my project it was: Xamarin.Forms.Core.Design,
Xamarin.Forms.Xaml.Design, 
Xamarin.Android.Support.Design.

See Also


Issue 2: Resources.String.ApplicationName and Resources.String.Hello are not defined

global::MYNAMESPACE.Resource.String.ApplicationName = global::MYNAMESPACE.Android.Resource.String.ApplicationName;

If you are getting an undefined error for either a resource string "Hello" or "ApplicationName" you have this issue.  These strings do not appear to be defined anywhere in the application code. Deleting it from the Resources.cs doesn't resolve the issue as it will just come back next time you build.
Fix it by running a clean and rebuild.

See also

Issue 3: Unsupported Android Target version.

If either the targeted version, or compile using version are set to a version of Android that your locally installed Android SDK doesn't support.  This is fixed either by installing that version using the Android SDK Manager or setting the Target and Compile versions in the Android project properties to something you do have locally installed.

 This App has an unsupported compile target.

Start the Android SDK Manager from Visual Studio

Or from Windows Start.

You can see here my current setup doesn't support Jelly Bean.  

In this case I chose to compile using Marshmallow, which is supported by my current setup.

Issue 4: Not configured to Deploy on Run (F5).

If you expect the App to compile, deploy and run when you press F5 or "Run" on the toolbar and it doesn't, then you'll need to adjust the build options.

You can see in this screen shot the Android project is not configured to deploy automatically when it is "Run".  Tick the box highlighted above, and you're set.



Wednesday, April 20, 2016

Auckland Xamarin Meet-Up Talk links

Steve Chadbourne – @stevechadbourne
Ben Rees @benrnz

Here some links to the tools Steve and I talked about tonight.  

Simple Xamarin Form Example: 
Learning Forms 
Gorilla Player
Open Source Xaml Viewer