title: Trying to call IronPython from VB.net -- "Name 'PythonEngine' is not declared."
body: <p>I am trying to replicate <a href="http://msmvps.com/blogs/theproblemsolver/archive/2008/08/14/calling-ironpython-functions-from-net.aspx" rel="nofollow noreferrer">this example of calling IronPython</a> code from VB.net.  I've downloaded and installed <a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython" rel="nofollow noreferrer">IronPython</a> and created a VB.net console application.  I added references to all of the dlls in the IronPython installation folder:</p>
  
  <ul>
  <li>IronPython </li>
  <li>IronPython.Modules</li>
  <li>IronPythonTest</li>
  <li>Microsoft.Scripting.ExtensionAttribute</li>
  <li>Microsoft.Scripting</li>
  <li>Microsoft.Scripting.Core</li>
  </ul>
  
  <p>And I have this source code:</p>
  
  <pre><code>Option Explicit On
  Option Strict On
  
  Imports Microsoft.Scripting.Hosting
  Imports Microsoft.Scripting
  Imports IronPython.Hosting
  Imports IronPython.Runtime.Types
  
  Module Module1
      Public Class HelloWorldVB
          Public Overridable Function HelloWorld(ByVal name As String) As String
              Return String.Format("Hello '{0}' from Visual Basic", name)
          End Function
      End Class
  
      Sub Main()
          Dim helloWorld As New HelloWorldVB()
          Console.WriteLine(helloWorld.HelloWorld("Maurice"))
  
          Dim runtime As ScriptRuntime = PythonEngine.CurrentEngine.Runtime
          Dim scope As ScriptScope = Runtime.ExecuteFile("HelloWorld.py")
          Dim pythonType As PythonType = scope.GetVariable(Of PythonType)("HelloWorldIronPython")
          helloWorld = CType(Runtime.Operations.Call(pythonType), HelloWorldVB)
          Console.WriteLine(helloWorld.HelloWorld("Maurice"))
  
          Console.ReadLine()
      End Sub
  End Module
  </code></pre>
  
  <p>I receive the error "Name 'PythonEngine' is not declared."</p>
  
  <p>I can't seem to find PythonEngine when I search the ObjectBrowser.  </p>
  
  <p>Is the example out of date or do I have an error?</p>