Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8618015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:00:37+00:00 2026-06-12T06:00:37+00:00

I’ve seen a few discussions regarding this issue, but I’ve yet to see clear-cut

  • 0

I’ve seen a few discussions regarding this issue, but I’ve yet to see clear-cut answers, certainly not for MonoTouch / Mono for Android.

I’m developing a Xamarin-based multi-target solution and naturally I have a lot of common code. Ideally, this code will reside in a “common” standard .NET class library project (or project). When I reference this project in platform-specific project, I do get the warning “The project ‘Common’ cannot be referenced. The referenced project is targeted to a different framework family (.NETFramework)”, but the solution is still compiled successfully.

Essentially, I’m asking if I must use the file links approach when my common code is addressing multiple targets. In more detail, my questions are:

  1. Is the above approach valid when my “common” projects reference only assemblies which are supported by Mono* targets?
  2. If the answer to the above is yes: Say I reference a 3rd party .NET library (in a form of a DLL, not a project) in my “common” project, and this library does have different assemblies for different targets (but it doesn’t reference an assembly not supported by Mono*), can I still reference the Windows version of the assembly and get away with it?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T06:00:39+00:00Added an answer on June 12, 2026 at 6:00 am

    There is something called Portable Class Libraries that have been on its way for some time. Starting with Visual Studio 2012 (released 2012-09-12), it is now a first class citizen of Visual Studio so that you can share libraries between Windows 8, Windows Phone, Silverlight, Windows <8 etc.

    I expect MonoDevelop to follow this track so that portable libraries can be sharable even with Mono for Android and MonoTouch.

    In the mean time, you should create one project for each platform, even though the link to the same source files. I have found this to be the best solution:

    The project files named like this

    MyCompany.MyProduct.MyModule.Ios.csproj
    MyCompany.MyProduct.MyModule.Android.csproj
    MyCompany.MyProduct.MyModule.WinPhone.csproj
    

    The namespaces in all the projects are only MyCompany.MyProduct.MyModule.

    You link to the same cs files from the projects to a “Shared” folder.

    If you need to expose some extra class in the Ios version, you simply add that file to the Ios project (not linked) and you add .Ios to the namespace since you want the cross platform namespace to not be cluttered with platform specific stuff.

    Here is a folder structure that wont break the Windows Path Length Issue:

    /MyCompany/MyProduct/
    

    Here you put the solution files for all target platforms, named like this:

    MyCompany.MyProduct.Ios.sln
    MyCompany.MyProduct.Wpf.sln
    ...
    

    Folder for each assembly:

    /MyCompany/MyProduct/MyModule/
    

    Here you put one “Shared” folder and one folder for each platform, so:

    /MyCompany/MyProduct/MyModule/Shared/
    

    Cross platform code only (linked to from each project file)!!!

    /MyCompany/MyProduct/MyModule/Android/
    /MyCompany/MyProduct/MyModule/Ios/
    /MyCompany/MyProduct/MyModule/WinPhone/
    /MyCompany/MyProduct/MyModule/Wpf/
    /MyCompany/MyProduct/MyModule/Mac/
    ...
    

    This is where you put the project files for each platform for the module and also where you put any platform specific cs files that is needed to implement the module on the specific platform.

    This works very well for us.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.