Click here to Skip to main content
13,552,926 members
Click here to Skip to main content
Add your own
alternative version


7 bookmarked
Posted 1 Apr 2013
Licenced CPOL

PCL Targets for Mono / MonoGame Projects

, 6 Apr 2013
Rate this:
Please Sign up or sign in to vote.
PCL targets for Mono / MonoGame projects


I’ll be blogging over the next few weeks about my involvement with the MonoGame project in the dark dark backgrounds, all around the area of PCL support within the project.

I’ve been focusing on two aspects:

  • Spiting up the MonoGame code base into two parts, the first part containing all code that will work on any platform without modification and the second part containing platform specific code that today is managed with #if statements to target each platform
  • Creating a full PCL MonoGame Project which can be used to build games against that will work on any platform without worrying about platform specifics. (my previous post about portable MonoGame gave an overview on this)

Now in order to use PCL projects in development, you must enable your development environment to be able to target Mono platforms. For Windows based solutions, Visual Studio already enables you to target .NET / Silverlight environments, with the Phone SDK you can also include Windows Phone and with Win8 / VS2012 you get Store app support out of the box.

For Mono platforms such as iOS and Android however, you need to enable these manually (at least until Xamarin studio comes out with official support)

*Note, yes you will need to install either Mono or Xamarin Studio to enable Mono platform targeting support.

Worry not young Padawan, this process is very easy!

The PCL Target Files

The first easy part is to create the PCL target files, one for each Mono platform, just open up Notepad and create the following files:


<?xml version="1.0" encoding="utf-8"?>
<Framework DisplayName="Mono for Android"




  MaximumVersion="*" />

MonoTouch,Version=v1.0+ .xml

<?xml version="1.0" encoding="utf-8"?>
<Framework DisplayName="Mono for iOS"




  MaximumVersion="*" />

Alternatively, you can download the files from here.


Now for the really tricky part, installation, this really challenging and hard to master process needs to be attempted many times before you can become proficient at it.

You need to COPY the files into a folder!, try not to be too daunted by this task. Open-mouthed smile

Take the above files you have created and copy them to the following folder:

x64 Development Machine

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\

x32 Development Machine

C:\Program Files\Reference Assemblies\Microsoft\Framework\

Now on some machines / environments, you might also need to put the files into an additional / alternative folder. The reason being the profile that is used by PCL projects on your development machine, I’m sure there is a perfectly good reason for this yet the answer eludes me, so if the above doesn’t work, then you need to copy the files into the folder for profile 104 instead of 2, as follows:

x64 Development Machine

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\

x32 Development Machine

C:\Program Files\Reference Assemblies\Microsoft\Framework\


You’re Ready

Now your development environment is setup to work with PCL support for all of Mono / MonoGame’s supported platforms.



If you select XBOX360 as an additional framework to support due to its very restricted nature, you will now be able to enable Mono platforms. Also it renders the scope of what you can have in a PCL project to next to nothing. Best advise, keep XBOX projects separate and use “Copy” projects to support that platform.

Coming Up Next

I’ve taken my leave of work for the next few weeks (nice Easter break from work) and plan to re-up my blogging efforts with my activities of late with MonoGame and other projects, this includes:

The splitting up of MonoGame

How-to : Use MonoGame PCL to build games

A book review of the excellent “Kinect for Windows SDK Programming Guide” by Abhijit Jana

The AdRotator V2 roadmap & progress

All that as well as have a play around with the new Unity3D SDK’s for Windows Phone and Windows 8 plus many other personal projects, should be a fun holiday (provided I get permission from the wife Smile with tongue out).


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Simon Jackson
Architect ZenithMoon Studios
United Kingdom United Kingdom
Long time game developer / IT maniac.
By day working as a lowly Technical Architect for a healthcare software firm, by night Masquerading as the Master Chief of ZenithMoon Studios.

At heart I'm a community developer breaking down lots of fun and curious technologies and bringing them to the masses.

I'm also a contributor to several open source projects, most notably the AdRotator advertising rotator project for Windows and Windows Phone.

After a hefty break with Windows Phone and Windows 8 I'm heading back to my XNA roots to show how beginners and current XNA devs can take their skills forward with XNA's bleak future.

ID&Xbox MVP & Best selling author
[Mastering Unity 2D Game Development] (
[Unity 3D UI Essentials] (

You may also be interested in...


Comments and Discussions

GeneralMy vote of 5 Pin
Mihai MOGA10-May-13 18:35
memberMihai MOGA10-May-13 18:35 
GeneralRe: My vote of 5 Pin
Simon Jackson12-May-13 12:03
memberSimon Jackson12-May-13 12:03 
QuestionI vote 5 Pin
cjhazard26-Apr-13 23:59
membercjhazard26-Apr-13 23:59 
AnswerRe: I vote 5 Pin
Simon Jackson12-May-13 12:02
memberSimon Jackson12-May-13 12:02 
GeneralMy vote of 2 Pin
ramanujkumar10-Apr-13 20:28
groupramanujkumar10-Apr-13 20:28 
GeneralRe: My vote of 2 Pin
Simon Jackson11-Apr-13 10:30
memberSimon Jackson11-Apr-13 10:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01-2016 | 2.8.180515.1 | Last Updated 7 Apr 2013
Article Copyright 2013 by Simon Jackson
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid