我發現了一個很短的工作實例獲得與谷歌聯繫人API這裏聯繫人:http://www.daimto.com/google-contacts-with-c/,但是當我試圖把它翻譯到VB網,我有以下錯誤:問題從C#轉換到VB網
BC30652 a reference to assembly 'Google.Apis.Core, Version = 1.8.1.31685, Culture = neutral, PublicKeyToken = null' containing the type 'IDataStore' is required. Add it to the project
這是給我的錯誤只有一部分:
UserCredential credential = GoogleWebAuthorizationBroker.AuthorizeAsync(new ClientSecrets { ClientId = clientId, ClientSecret = clientSecret }
, scopes
, "test"
, CancellationToken.None
, new FileDataStore("test")).Result;
在VB中網,我有:
Dim credential As UserCredential = GoogleWebAuthorizationBroker.AuthorizeAsync(New ClientSecrets() With {
.ClientId = clientId,
.ClientSecret = clientSecret
}, scopes, "test", CancellationToken.None, New FileDataStore("test")).Result
錯誤從GoogleWebAuthorizationBroker
出現。任何人都可以幫助我正確翻譯?
您是否添加了程序集參考? –
當你看到錯誤時,你做了什麼?你讀過它嗎? –
該問題與轉換問題無關。只需要在組件中添加一個DLL即可。也許這個話題應該被重新渲染。 – etalon11