我有一个VB NET应用程序,可以在开发环境中正常工作(Windows 8.1)。
当我分发到带有Windows 7的计算机时,它正常运行。 但是当使用Windows 10分发到计算机时,我收到此错误。
找不到方法:无效 Google.apis.Calendar.v3.CalendarService..ctor(初始化程序)。
给我错误的程序如下:
Try
Dim scopes As IList(Of String) = New List(Of String)()
scopes.Add(CalendarService.Scope.Calendar)
Dim credential As UserCredential
Dim cs As New ClientSecrets
cs.ClientId = wclientId
cs.ClientSecret = wclientSecret
credential = GoogleWebAuthorizationBroker.AuthorizeAsync(cs, scopes, "user", CancellationToken.None).Result
Dim initializer As New BaseClientService.Initializer()
initializer.HttpClientInitializer = credential
initializer.ApplicationName = wapplicationName
service = New CalendarService(initializer)
clientIdAutenticado = wclientId
Catch ex As Exception
Throw New Exception("autenticate:" & ex.Message & ":" & ex.StackTrace)
End Try