Search code examples
c#androidxamarinxamarin.formsxamarin-studio

Xamarin Studio: Cannot copy System.Diagnostics.Tools.dll, as the source file doesn't exist


I am a newbie to Xamarin, and still hitting it hard even at the smaller things. :)

Have developed a Xamarin.Forms app which will be working in iOS and Android.

I added the code for location services of Android. For that, followed these links: 1. http://developer.xamarin.com/guides/android/platform_features/maps_and_location/location/ 2. https://blog.xamarin.com/introducing-the-google-play-services-component-for-xamarin-android/

But, found a lot of errors as google play services, that I added using Android SDK manager was latest. After scratching head for a couple of hours on how to get and where to get older version using SDK Manager or command line, found that Xamarin does give components at the xamarin store, which is having Google Play Services component. I added version 22.0.0 of it to the components folder of the project.

After that, all my errors related to google play services vanished, but started getting following error:

Cannot copy System.Diagnostics.Tools.dll to /bin/Debug/System.Diagnostics.Tools.dll, as the source file doesn't exist.

(I have truncated the dll path for ease of reading)

My questions are:

  1. How to resolve the dll issue?
  2. Whatever steps I did to fix the Google Play Services, are they good enough? or do I need to take care something more in the IDE?
  3. Is adding the Google play services has anything to do with the DLL issue?

Solution

    1. I restarted the xamarin studio, that fixed DLL issue for me.
    2. Google Play Services are getting added to the project following above steps. Adding Google Play Servies was not related to the DLL issue. So, moving forward to face other issues ;)