Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Error on Build: Dependent project AppTest.csproj failed to build, using old version.

$
0
0

I'm very new with Xamarin and I want to test the Geolocator Plugin to get GPS Coordinates. I installed the plugin in all projects of my Native Project Solution and write code but when I play the solution with Xamarin Live I have this error:

"Dependent project AppTest.csproj failed to build, using old version."

I tried to clean the solution without effect.

Can someone help me? Many thanks.

This is my code:

using System;
using Xamarin.Forms;
using Plugin.Geolocator;

namespace Apptest
{
    public partial class MainPage : ContentPage
    {
        public MainPage()
        {
            InitializeComponent();
        }

        private async void onButtonClicked(object sender, EventArgs e)
        {
            var locator = Plugin.Geolocator.CrossGeolocator.Current;
            locator.DesiredAccuracy = 50;

            var position = await locator.GetPositionAsync(TimeSpan.FromSeconds(100));

            LatLabel.Text = position.Latitude.ToString();
            LongLabel.Text = position.Longitude.ToString();
        }
    }
}

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>