Skip to content

Preventing initialization exceptions in Xamarin client  #358

Open
@sschaub

Description

@sschaub

Issue Description

Special configuration is required to prevent the following exception from being thrown during ParseClient initialization on Xamarin platform:

Value cannot be null. Parameter name: element

The issue is caused by an assumption encoded into the HostManifestData.Inferred property (Assembly.GetEntryAssembly() is non-null) that is not true on Xamarin. This has been noted in various issues such as #344.

Suggestions

Two suggestions come to mind to improve the situation:

  1. Modify HostManifestData.Inferred so that it populates the Version, Name, and ShortVersion properties with some kind of reasonable default value (empty strings?) if Assembly.GetEntryAssembly() is missing instead of throwing an exception.
  2. Modify HostManifestData.Inferred to throw an exception with a more meaningful error message to help Xamarin users realize that special configuration is needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions