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 6971665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:52:10+00:00 2026-05-27T16:52:10+00:00

I have a MonoTouch application which is managing a list of assemblies. I want

  • 0

I have a MonoTouch application which is managing a list of assemblies. I want developers to be able to modify that list of assemblies as easily as possible. I was hoping that I could just have them add an assembly to the application’s references, and that I could then loop through them like this:

foreach (AssemblyName assemblyName in this.GetType().GetReferencedAssemblies())
{
    Assembly assembly = Assembly.Load(assemblyName);
    //Do something with assembly
}

The problem that I’m having is that all assemblies I am not explicitly referencing are not found in the array returned by GetReferencedAssemblies(), and the application compiles with a warning Library 'Unreferenced.dll' missing in app bundle, cannot extract content.

Is there a way to force MonoDevelop or MonoTouch (not sure which is responsible here) to build and load all assemblies in the References folder without an explicit reference to some type in those assemblies?

  • 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-05-27T16:52:11+00:00Added an answer on May 27, 2026 at 4:52 pm

    It starts with a compiler feature. In order to get in the GetReferencedAssemblies list the assembly must be referenced. It can be directly (e.g. an explicit type is referenced) or indirectly (e.g. a reference’s references). If the compiler does not see a reference to an assembly then it won’t be part of the AssemblyRef metadata.

    Afterward the lack of references means the managed linker (first, optional) and then the AOT compiler (second, mandatory for devices) won’t process and compile the assemblies.

    The easy way is to ensure a reference to a type in each assembly exists in your application. It’s one line of code by assembly – but it’s easy to forget too.

    You can automate this by adding a pre-build step (in MonoDevelop) that will read the assemblies (e.g. in a directory) and generated a C# file (e.g. a partial class) that you include in your application. That way people won’t have to remember to add new assemblies to your build.

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

Sidebar

Related Questions

I have made the decision to use monotouch to develop an application that browses
I have a Monotouch iPad application for which I am trying to set up
I have a MonoTouch application that generates some PDFs locally and then prints them
Possible Duplicate: Monotouch or Titanium for rapid application development on IPhone? I have an
I have an monotouch application that includes an objective-c static library. The application runs
I have an application which I have written in MonoTouch. I dropped a file
I am new to MonoDroid, I have developed an application on MonoTouch which uses
I have successfully developed a small iPhone+Monotouch (latest version) application with Monodevelop 2.8, which
I have an iPhone Windows-based Monotouch application that appears to use more memory to
I have a C# application which needs to be ported to several Smartphones. Monotouch

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.