Xamarin - How to reference specific Xamarin.iOS and Mono.Android version

I'm coming from a native iOS and Android background so I'm not too familiar with the Visual Studio (.sln/.csproj) structure.

I'm interested in a mechanism to lock down the Xamarin.iOS and Mono.Android used in a Xamarin project.

Currently it seems that both .iOS and .Droid projects reference the current Xamarin.iOS and Mono.Android versions, which means that if we'd create a tag today, if we try to rebuild it in 6 months, we might reference a different Xamarin.iOS / Mono.Android version, since we might have updated our current versions, so therefore we loose repeatability.

I wonder why this wasn't somehow made easier by the Xamarin team? It seems like a good / safe practice.

Having a look at the .csproj files I can see the following:

iOS:

  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Core" />
    <Reference Include="Xamarin.iOS" />
    <Reference Include="Calabash">
      <HintPath>..\packages\Xamarin.TestCloud.Agent.0.20.3\lib\Xamarin.iOS10\Calabash.dll</HintPath>
    </Reference>
  </ItemGroup>

Android:

  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Core" />
    <Reference Include="Mono.Android" />
  </ItemGroup>

Should I just go ahead and manually edit the .csproj file? That seems quite naive :-?

Thank you,
Cosmin

Answers

  • CosminStirbuCosminStirbu ROMember ✭✭

    @JamesMontemagno - Not sure if you mind me tagging you in this post but I wanted to reach out to you since I feel repeatability is a critical feature that we want for our builds, so I was wondering what can we do to achieve that in relation to the Xamarin iOS and Android "SDKs".

    Thank you,
    Cosmin

Sign In or Register to comment.