lnmipramod / google-language-api-for-dotnet

Automatically exported from code.google.com/p/google-language-api-for-dotnet
0 stars 0 forks source link

MethodAccessException was unhandled #11

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

This is the simple code i have used....
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Try
            Dim trans As New Google.API.Translate.TranslateClient("http://www.aryah.net")
            Dim result As String = trans.Translate("Quality Policy", Google.API.Translate.Language.English, Google.API.Translate.Language.Hindi, Google.API.Translate.TranslateFormat.Text)
            MsgBox(result)
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub
End Class

What is the expected output? What do you see instead?

The string "Quality Policy" which is passed, needs to be converted into hindi 
language.

What version of the product are you using? On what operating system?

GoogleTranslateAPI (in GoogleTranslateAPI.dll) Version: 0.4.0.133 (0.4.0.133)
OS: windowsXP professional sp2
dotnet framework 3.5

Please provide any additional information below.

Pls find the exception details below...
System.MethodAccessException was unhandled
  Message="Google.API.Enumeration.op_Implicit(Google.API.Enumeration)"
  Source="LangAPITest2"
  StackTrace:
       at LangAPITest2.Form1.Form1_Load(Object sender, EventArgs e)
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
       at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
       at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
       at System.Windows.Forms.Control.set_Visible(Boolean value)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(ApplicationContext context)
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       at LangAPITest2.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

----------------------------------------------------------------------
Pls suggest me the sol...
Thank you

Original issue reported on code.google.com by sreeniva...@gmail.com on 17 Jun 2010 at 1:24