title: IronPython 2.7.7: Could not load type 'System.TypeExtensions' from assembly 'Microsoft.Scripting, Version=1.2.0.0
body: <p>I'm having trouble running some IronPython code in a Visual Studio 2015 C# Console Application project that I've successfully run in a <a href="https://www.linqpad.net/" rel="nofollow noreferrer">Linqpad</a> environment. So I assume there's an issue with how I've set up my environment, but I'm having trouble diagnosing the issue.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>using IronPython.Hosting;
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;    
  
  namespace TestApp
  {
      class Program
      {
          static void Main(string[] args)
          {
              var options = new Dictionary&lt;string, object&gt;();
              options["Frames"] = true;
              options["FullFrames"] = true;
              //The exception is thrown by the line below
              var engine = Python.CreateEngine(options);
              string pyscript = @"";    
  
              var script = engine.CreateScriptSourceFromString(pyscript);
              var paths = engine.GetSearchPaths();
          }
      }
  }
  </code></pre>
  
  <p>Python.CreateEngine(options) ends up throwing an exception:</p>
  
  <pre><code>An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in Microsoft.Scripting.dll
  </code></pre>
  
  <p>Whose inner exception reads:</p>
  
  <pre><code>Could not load type 'System.TypeExtensions' from assembly 'Microsoft.Scripting, Version=1.2.0.0, Culture=neutral
  </code></pre>
  
  <p>Inner Exception Source:</p>
  
  <pre><code>IronPython
  </code></pre>
  
  <p>Inner Exception Stack Trace:</p>
  
  <pre><code>at IronPython.Runtime.PythonContext.GetInitialPrefix()
  at IronPython.Runtime.PythonContext..ctor(ScriptDomainManager manager, IDictionary`2 options)
  </code></pre>
  
  <p>This project references IronPython.StdLib (2.7.7), which is using IronPython (2.7.7)</p>
  
  <p>I've used dotPeek to poke around the IronPython related dlls, and can't seem to find anything that references a type named "System.TypeExtensions". I can't seem to find such a type when I google around for it either.</p>
  
  <p>Any ideas as to why I'm getting this exception?</p>