Orientation and Welcome

Duration

15 minutes

Goals

In this exercise we will build and run the provided Tasky Pro application. This will ensure you have your development environment setup properly and prepare you for your Xamarin University education.

TaskyPro is a cross-platform todo/task application sample that allows you to track "ToDo" items. It illustrates cross-platform code-sharing for the data and business logic layers and separates out the User Interface and Application Layer into appropriate platform-specific applications.

Assets

The provided Exercise 1 folder contains a subfolder named TaskyPro with the solution you will need to complete this lab exercise.

Running the application

When executing the app, you can test on a real device, or on the emulator / simulator.

Steps

Below are the step-by-step instructions to validate your system setup.

Select the IDE environment you want to work with:   Visual Studio for Mac or Visual Studio on Windows

Open the Solution in Visual Studio for Mac

  1. Open the TaskyPro.sln solution contained in the Exercise 1/TaskyPro folder. This solution contains several projects, take a moment to familiarize yourself with each one.
  2. Project Description
    Tasky.Core This is a Portable Class Library which contains the code that is shared across all the supported platforms (iOS, Android and Windows). The code is all written in C# and is where the business logic and data models used in the application is stored.
    Tasky.Droid This is the Xamarin.Android project which can be deployed onto an Android device or emulator. Use this project to test your Android setup.
    Tasky.iOS This is the Xamarin.iOS project which can be deployed onto an iOS device or simulator.
    Tasky.UWP This is the Microsoft Windows Universal project which can be deployed onto devices running Windows 10. This project is supplied to demonstrate sharing logic with the Universal Windows Platform. It can only be compiled and run on Windows with Visual Studio and will be disabled in the Visual Studio for Mac environment.
  3. Select the platform-specific project you want to run by right-clicking on the project, and select Set as Startup Project from the context menu.
  4. Set the Build Configuration to be Debug and select a simulator or emulator from the drop down in the Toolbar.
  5. Build and run the application by clicking the Play button in the Toolbar.
  6. The application should launch and display an empty task list. You can add new tasks by pressing the (+) button, and tap on entered tasks to display details.
  7. Help! If the application does not build, or fails to deploy, inform the instructor to get assistance.
  8. Repeat the same steps for the other environment(s) you want to test - change the startup project, build and run the application.

Open the Solution in Visual Studio on Windows

  1. Open the TaskyPro.sln solution contained in the Exercise 1/TaskyPro folder. This solution contains several projects, take a moment to familiarize yourself with each one.
  2. Project Description
    Tasky.Core This is a Portable Class Library which contains the code that is shared across all the platforms (iOS, Android and Windows). The code is written in C# and is where the business logic and data models used in the application are stored.
    Tasky.Droid This is the Xamarin.Android project which can be deployed onto an Android device or emulator. Use this project to test your Android setup.
    Tasky.iOS This is the Xamarin.iOS project which can be deployed onto an iOS device or simulator. Use this project to test your iOS setup.
  3. Select which version (iOS or Android) you want to run by right-clicking on the project and selecting Set as Startup Project from the context menu. The startup project is always shown in Bold text in the Solution Explorer.
  4. Set the Build Configuration to be Debug and select a simulator or emulator from the drop down in the Toolbar.
  5. Build and run the application by clicking the Play button in the Toolbar.
  6. The application should launch and display an empty task list. You can add new tasks through the (+) button, and tap on entered tasks to display details.
  7. Help! If the application does not build, or fails to deploy, inform the instructor and get assistance.
  8. Repeat the same steps for the other environment(s) you want to test on - change the startup project, build and run the application.

Summary

In this exercise, you built and ran a cross-platform Xamarin application and verified that the Xamarin tools are properly installed on your machine. You saw an example project that uses a variety of .NET classes as well as unique Windows, iOS and Android features to display and change presented information.

Go Back