I was using Google Drive API go get File Name of the stored file in Google drive
Although following the sample code provided by Google I encountered following error:
Cannot implicitly convert type 'Google.Apis.Drive.v2.Data.File' to 'System.IO.File'. I was surprised to find there were not much written about this.
I thought it would be a small but helpful post to some. Instead of wasting precious time you can just do following to resolve this issue:
- If you are using System.IO in your program, then it will first pickup System.IO.File and ignore the Google.Apis.Drive.v2.Data.File.
- Therefore to resolve this issue you need to give full path of the Google Drive File
- For Eg:
Hope this helps, Enjoy coding guys........