Xamarin Studio - James Montemagno https://staging.montemagno.com/tag/xamarin-studio/ https://staging.montemagno.com/content/images/2017/08/MonogramIcon_Orange_NoBuffer.png Xamarin Studio - James Montemagno https://staging.montemagno.com/tag/xamarin-studio/ Hugo -- gohugo.io Tue, 13 Oct 2026 23:21:57 GMT 60 Getting Started With & Learning C# https://staging.montemagno.com/getting-started-with-csharp/ 598df8f2c121b60019bf2fe4 Tue, 15 Nov 2016 17:32:43 GMT In 2006, after years of writing C++ and Java code, while attending UAT an instructor named Phil Miller introduced me to this amazing language called C# and changed my life. It was love at first “Hello World” and I have never looked back. C# is an extremely powerful, mature, and extremely cross-platform programming language that I have been using for decades. The beauty of C# of course is that you get this amazing cross-platform framework called .NET, which gives developers ability to perform RESTful service calls, perform math operations, and just about anything else you can possibly think of. With all my C# love I often forget how I learned it all and when I attempt to walk through the basics with new developers I struggle a bit. After talking with a bunch of developers over the last few months I have a 4 step plan when you want to learn C#. I am often extremely interested in how you learned C# and your recommendations, so leave them in the comments.

Learn & Write Some Code in the Browser

That is right! You would think that you would need a full IDE to even start learning and writing C#, but you would be wrong. There is a lovely and amazing website that Microsoft recently published called www.dot.net. Inside of that website is an overview of what .NET is and the languages you can use, but also an amazing learn section, where you can learn about C#, structures, functions, and TONS more…. ALL IN THE BROWSER! There is an interactive IDE/REPL thingy that will take your code and compile it in the cloud (The Azure Cloud).

Here is the direct link: https://www.microsoft.com/net/tutorials/csharp/getting-started

Grab an IDE

You have to write some code somewhere at some point and you have a lot of great options here.

Visual Studio Code

By far this is the most light weight, cross-platform, and easy to install IDE out there. Simply head to code.visualstudio.com and select Code. It works on PC, macOS, and even Linux. When you want to start writing some C# code you will also need the C# extension… the #1 extension. Simply tap on the extension section on the left and search for C#. Done!

Visual Studio Community Edition for PC

We are now in the full IDE world with Visual Studio, the best IDE ever created, and it is completely free! Community Edition is fully featured and allows you to make apps for a plethora of different platforms including mobile platforms such as iOS and Android in C# with Xamarin!

VS is a bigger install so give it some time, but you can select a console app, WPF, UWP, or Xamarin app and you are off to the races. Get it from http://www.visualstudio.com

Visual Studio for Mac

If you are over on a macOS device do not fear as Visual Studio for Machas you covered. While not as verbose as Visual Studio for PC, Visual Studio for Mac focuses on mobile iOS, Android, and macOS apps written in C# with Xamarin in addition to .NET Core, ASP.NET Core, Azure Functions, and even Unity development. This is also completely FREE and easy to install by heading to visualstudio.com.

On the Go with Continuous for iPad

My good friend Frank Krueger is an absolute genius and created his own fully featured C# IDE for the iPad called Continuous. It is the only paid IDE coming in at $9.99, but it is amazing and you can even write full iOS apps in C# with Xamarin with it.

Check out more at http://continuous.codes

Take Bob Tabor’s MVA Class

One of the biggest recommendations that I have heard is the now extremely famous and completely free C# class by Bob Tabor. This free class on Microsoft Virtual Academy has literally changed my friends careers by teaching them C#. Bob is extremely well known and has great classes on a bunch of awesome languages, but his C# is top rated, so check them out right now on Microsoft Virtual Academy.

Pick a Platform & Go

Once you have C# basics down it is time to go pick a platform to start tackling. Write a simple application for web, mobile, or desktop that does one or two things on a single page. With the C# basics down you are able to go off and learn some platform specifics. Here is a good place to start:

Have Fun

C# is my favorite programming language in the entire world and I hope that it soon becomes your favorite too.

]]>
Add NuGets To All Projects In Xamarin Studio with 1 Click https://staging.montemagno.com/add-nugets-to-all-projects-in-xamarin-studio-with/ 598df8f2c121b60019bf2fff Thu, 27 Aug 2015 23:26:48 GMT I simply love Matt Ward, a wonderful developer who works on NuGet inside of Xamarin Studio. He is always blogging about all of the recent updates to NuGet in XS, so be sure to follow his blog. Matt does so much more though including an awesome add-in for Xamarin Studio to add some awesome new features when using Xamarin Studio. My favorite feature is Solution Level adding of NuGet packages. Why do I love this feature? Well because I use tons of Plugins for Xamarin (and so should you). 

Installing and Using The Add-in

To get started all you need to do is go to the Xamarin Studio Add-in Manager.

You will need to turn on the alpha channel under the Gallery tab by selecting Manage Repositories:

Then turn on Alpha Channel, Hit Close, and then Refresh the list.

You will now see the NuGet Package Manager Extensions available under IDE extensions:

With the add-in installed you can now open up your cross platform native mobile app or create a new one. Now if I want to add my Settings Plugin to all of my projects all I have to do is Right Click on your solution and you will see “Manage Packages”. 

This will bring up an older NuGet package manager (not the new fancy official one), but you can search for a NuGet and then hit Manage to select which projects you want to install them in.

There you have it, easily adding NuGet packages at a solution level to all of your projects. You will then receive all of your normal updates Xamarin Studio offers and still have access to the per platform NuGet Package Manager.

]]>
Editing Markdown in Xamarin Studio https://staging.montemagno.com/editing-markdown-in-xamarin-studio/ 598df8f2c121b60019bf300a Sat, 16 May 2015 02:55:09 GMT I can’t help myself I really love Xamarin Studio. Don’t get me wrong I still love Visual Studio for everything that it does, but with Xamarin Studio 5.9 the best mobile focused IDE just keeps getting better. However, did you know that you don’t have to wait for new releases of Xamarin Studio to get new features? Xamarin Studio has an entire ecosystem of awesome plugins to extend the IDE and I just stumbled upon one that solves one of my common issues, which is the ability to edit and preview Markdown. I love markdown for its simplicity and I often have to edit readme.md files for GitHub and the Markdown Viewer makes everything LOVELY! So here is how you get it:

Installing and Using The Add-in

To get started all you need to do is go to the Xamarin Studio Add-in Manager.

You will need to turn on the alpha channel under the Gallery tab by selecting Manage Repositories:

Then turn on Alpha Channel, Hit Close, and then Refresh the list.

You will now see the Markdown Viewer available under IDE extensions:

With the add-in installed now simply add your readme.md or any other .md file to the solution level. Double clicking the file will bring you into a markdown editor. 

On the bottom you will see a Source/Markdown viewer toggle similar to the Xamarin.Android designer. Simply toggle to see your markdown rendered in realtime!

Enjoy the awesome markdown experience!

]]>
My Favorite Xamarin Studio Features https://staging.montemagno.com/my-favorite-xamarin-studio-features/ 598df8f2c121b60019bf3029 Thu, 07 Aug 2014 23:05:12 GMT There have been a lot of exciting announcements recently from Xamarin for developers. First, is that Xamarin Indie now has a monthly subscription option for just $25 a month! Then there was the release of Xamarin Studio 5.2, which brought awesome new features such as side-by-side editing and awesome new NuGet updates. I have been a Visual Studio user for probably over 10 years and I have been using Xamarin Studio for nearly 3 years now. I have to say I find myself more and more developing on my Mac inside of Xamarin Studio. It is finely tuned for mobile development and has some amazing features packed into it, so I thought I would point out my top 3!

Source Analysis

I have been spoiled for years with ReSharper on Visual Studio, however Xamarin Studio actually ships with Source Code Analysis right out of the box. With the launch of Xamarin 3 this feature has been enabled by default, but I have been using it for some time and it makes daily development so much better. Simply look on the side of your code file for an overview of all the enhancements and optimizations you can make to your code.

TestFlight Integration

Distributing beta builds of my apps to my testers is always tricky. On Google Play you can have a beta/alpha channel and upload your APK and on Windows there is a beta option, but you have to leave the IDE. With TestFlight integration into Xamarin Studio you can easily upload your iOS applications with 1 click!

Workspaces

I am often working on multiple apps at the same time and Workspaces make it extremely easy to work on everything all at once. With this feature you don’t need multiple instances of Xamarin Studio open to work on multiple libraries or apps. Simply create a workspace and add as many solutions or projects as you would like.

So Much More

These are just 3 features I chose to highlight, but there is so much more include all of the unit test features, app archiving, universal search, version control, and about a thousand other awesome features. I would love to see what features of Xamarin Studio you love the most.

]]>
Xamarin Studio + NuGet PCL Support! https://staging.montemagno.com/xamarin-studio-nuget-pcl-support/ 598df8f2c121b60019bf303e Sun, 15 Dec 2013 22:05:10 GMT From @SharpDevelop comes a long awaited update to the Xamarin Studio NuGet Manager Plugin. I wrote about this plugin before, but with this update brings updated support for NuGet including PCLs for Xamarin.Android and Xamarin.iOS. It is extremely easy to add this functionality to Xamarin Studio and I made a short video to get you going.

Unable to display content. Adobe Flash is required.

]]>
How to setup Xamarin Studio for iOS 6 Support https://staging.montemagno.com/how-to-setup-xamarin-studio-for-ios-6-support/ 598df8f2c121b60019bf3041 Mon, 09 Dec 2013 20:06:52 GMT Even though iOS 7 has been dominating the market and is now on over 75% of iOS devices, it might still be important for you or your company to support iOS 6. It was for me recently when I was developing Puppy Kitty Overflow as my girlfriend is unable to upgrade her phone and I wanted to ensure she could run the app. So I sent out on a quest to get iOS 6 support working in the latest version of Xamarin Studio and XCode 5.

Get the old SDK

First things first, you will need to download the old version of XCode from the Apple Developers page to get the iOS 6 SDK. Go to the downloads page and then find XCode 4.6.3 and download it. It is important to NOT install this, we just want to explore it to find the SDKs. To do so double click the .dmg file. It will mount the .dmg and will ask you to drag it to Applications. Do NOT do this, simply command + click the XCode icon and select display contents.

First copy:

Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk

to

Second copy:

Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk

to

After that when you create a new project you will want to do a few things:

  1. Open Project Options
  2. Under iOS Build set SDK version to “Default”
  3. IMPORTANT: Set Link behavior to: Link SDK Assemblies Only
  4. Under iOS Application set “ Deployment Target” to 6.1

When you open up XIB files to edit inside of XCode they will default to supporting version 7.0 only, however you can change this under “Identity and Type” on the main view with these settings:

This will also allow you to go back and view this in an older Xcode version as well.

After that you should be all setup to build for both iOS 6 and iOS 7!

There are a few thing to be aware of. When you are developing for both versions of iOS if you want to use anything specific in iOS 7 you will want to ensure you check the version numbers before actually calling the new APIs. Failure to do this will cause you app to crash :(. Here is a helper method that I use:

To make your life really easy you can also turn on Xamarin Studio’s code inspection which will notify you with a green squigly that the API you are referencing is only iOS 7:

]]>
Xamarin + PCL + MAC Xamarin Studio + Visual Studio #LetsDoThis New Project -> PCL. I have a webinar: you can find here So last night at the Xamarin drinkup in Bellevue there was a lot of discussion about PCL and also bout MVVM frameworks such as the one I am using MVVMCross (Mvx). While PCL is “sorta”/“kinda”/“it should just …]]> https://staging.montemagno.com/xamarin-pcl-mac-xamarin-studio-visual-studio/ 598df8f2c121b60019bf304c Wed, 21 Aug 2013 17:37:00 GMT This blog is now obsolete as official PCL support has been added to Xamarin.Android and Xamarin.iOS for both Visual Studio and Xamarin Studio. There is no longer a need to do any file copying or anything fancy, simply hit File->New Project -> PCL. I have a webinar: you can find here

So last night at the Xamarin drinkup in Bellevue there was a lot of discussion about PCL and also bout MVVM frameworks such as the one I am using MVVMCross (Mvx). While PCL is “sorta”/“kinda”/“it should just work” on the Xamarin platforms there still seems to be a lot of confusion and a lot of issues setting up. So this morning I am going to do a quick overview of What is PCL, Why you should use PCL and how to get it setup inside of Visual Studio on your PC and also inside of Xamarin Studio on your Mac. I blame this entire article on Frank Krueger so thank him on twitter and buy is amazing apps.

What:

PCL stands for Portable Class Libraries. The whole concept was that different platforms are all crazy with different code such as Xbox, Windows Phone, Silverlight. So why not write a lot of your core logic in a language that any of them can understand. A subset of the full framework that these platforms can consume.

Why:

The what basically summarizes all of this to be honest, but think about writing one core logic for your app with one type of project that anything can consume. No more project or file linking involved, simply add the PCL core project to your client apps and boom tons of functionality for you. Now I wont get into it, but throw in an MVVM framework into this mix and everything should/kind of is amazing. The biggest issue that I have seen from PCL is that not everything supports it, it is only for microsoft platforms, and until recently with .net 4.5 the BCL (which you can look up and I am not going to go into details) weren’t a PCL. However!!! Seeing that Xamarin.iOS and Xamarin.Android allow you to code in C# with the .Net Framework AND that they allow you to use PCL projects…. 1 code base for iOS, Android, Windows Phone, and Windows Store apps.

More Info Before We Begin

Now how PCL stuff works is everything is a Profile. Profiles basically saying hey if you are this profile you can use these dlls. This is nice so PCLs can distinguish between different platforms. I target Profile104. Which allows WP, Windows Store, Android, and iOS apps.

The current issues

I don’t have a 100% work around for getting the BCL nuget package working so async/wait and .net 4.5 will have to wait a bit until Xamarin and Microsoft figure everything out. So for right now I am living in the .net 4.0 world and still loving it.

Visual Studio

My setup is Visual Studio 2012 on Windows 8 Pro with the latest Alpha release of everything Xamarin.

1.) Go to “C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETPortable\v4.0\Profile\Profile104\SupportedFrameworks”

2.) Add these 2 xml documents which will allow MonoAndroid and MonoTouch to be targeted PCL platforms.

3.) Optional: you could add these to other platforms as well if needed, i use 104 because it works.

4.) Start up Visual Studio and create a new Portable Class Libary project.

5.) When you see a pop up for platforms simply select:

After that you should be on your way. Create a new iOS app, android app and just add in the project as a reference. If you don’t want to use the xml files there is another way that my good friend Tomasz Cielecki uses which he blogged about.

Mac:

So things are a bit trickier here. My current setup is the latest version of xamarin.studio (alpha), Mac OSX 10.7.5, XCode 4.6.1.

1.) The biggest issue is that the PCL files that Visual Studio references aren’t actually on your mac or installed when you install Xamarin Studio. You can read about the problem here.

2.) So let’s move them over. If you have a PC there is a folder you want to copy which is located at: “C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETPortable”

3.) Copy this entire folder… or download it RIGHT HERE if you don’t have a PC.

4.) You need to copy it over onto your Mac to this directory: /Library/Frameworks/Mono.framework/External/xbuild-framework/

So all together inside of /Library/Frameworks/Mono.framework/External/xbuild-framework/ should be .NetPortable with .Net4.0 and .net4.5 inside and also MonoTouch.

If you are on a linux box you can copy to: $(libdir)/mono/xbuild-framework

5.) Alright so you should be good to go, but you would need to now create a new PCL project in Xamarin Studio. So Create a new Solution

6.) I like to name “MyApp.Core” and the Solution Name “MyApp”

7.) Once the project is created simply Right Click on the Project and go to: Options -> General and select Mono for Android and MonoTouch.

8.) If for some reason this doesn’t stick or tells you that Profile 104 isn’t installed it is lying and you will need to manually modify your .csproj in a text editor and simply ensure these 3 lines are in your main Property Group:

TargetFrameworkVersion: v4.0
TargetFrameworkProfile: Profile104
FileAlignment: 512

**Sorry about the xml tags missing tumblr is weird and I need to fine a better code plugin.

And if for some reason that doesn’t work… just use my pre-made template you can download from HERE.

So I think that just about wraps it up. If you have issues leave a comment, or hit me up on twitter @JamesMontemagno

]]>