Wednesday, November 27, 2013

Adding MonoMac and XamMac to Visual Studio references

First, locate MonoMac.dll in

/Applications/Xamarin Studio.app/Contents/MacOS/lib/monodevelop/AddIns

and/or XamMac.dll in the same location, or,

/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/usr/lib/mono

(The Xamarin target may change next month when "Xamarin.Mac.dll" is released.) These I copied to MonoMac and XamMac folders in C:\Program Files (x86)\Reference Assemblies in Windows.


Then, in regedit, create keys

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\MonoMac

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\XamMac

In each, assign the (Default) REG_SZ with the corresponding location in Reference Assemblies. For example:


Now when you Add Reference, you should see both MonoMac and XamMac.


Note that there is no need to involve the GAC.

Friday, November 22, 2013

Pulling from upstream and updating the master

I always forget how to do this. Use something like

git remote add upstream git@github.com:MvvmCross/MvvmCross-SQLite.git

to add the upstream version. Now,

git fetch upstream -v

that's -v for verbose. This should bring in any new branches:

Tims-MacBook-Air:MvvmCross-SQLite tim$ git fetch upstream -v
remote: Counting objects: 123, done.
remote: Compressing objects: 100% (60/60), done.
remote: Total 98 (delta 62), reused 63 (delta 33)
Unpacking objects: 100% (98/98), done.
From github.com:MvvmCross/MvvmCross-SQLite
 * [new branch]      create-experiments -> upstream/create-experiments
 * [new branch]      master     -> upstream/master
From github.com:MvvmCross/MvvmCross-SQLite
 * [new tag]         3.0.13     -> 3.0.13

Now, carefully, make sure you are on the right branch.

Tims-MacBook-Air:MvvmCross-SQLite tim$ git branch
  master
* wm
Tims-MacBook-Air:MvvmCross-SQLite tim$ git checkout master
Switched to branch 'master'

Now it is safe to merge upstream using

git merge upstream/master

When this done go to your dirty branch, and merge from master to get the latest. You will need to push both to the repo. If the branch is not upstream, you may need

git push --set-upstream origin yourbranch

Nuget vs git submodule

Since discovering CI with Team City, my preference has been to host components in nuget - however, I recently ran into an issue where I want a particular set of files to go to .Mac but there is no way to identify them as such. For now I have to revert to get submoduling the project, but if anyone out there has tips it would be much appreciated.