Prepare Xamarin.Android for TFS

PDF for offline use

Let us know how you feel about this

Translation Quality


last updated: 2017-03

Xamarin.Android automatically regenerates the /Resources/Resource.Designer.cs file every time the app is compiled, but because this file is included in version control, it's possible that it can be marked as read-only when TFS attempts to run a build. As a result, a build might fail.

Note: this is not a concern Team Foundation Server 2013 and 2015, which automatically check out files that are modified during a build. For earlier versions of TFS it is necessary to add a pre-build event to explicitly check out Resource.Designer.cs and remove the read-only flag so the build can progress:

  1. In Visual Studio, right click on the TaskyAndroid project in Solution Explorer, select Properties, and click the Build Events tab.

  2. Click the Edit Pre-build… button, enter the following snippet, and press OK:

    $(DevEnvDir)tf -checkout $(ProjectDir)Resources\Resource.Designer.cs
    attrib -r $(ProjectDir)Resources\Resource.Designer.cs
  3. The project properties should now look like the following:

  4. Save the TaskyAndroid project to complete the modification.

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.