Note that there are some explanatory texts on larger screens.

plurals
  1. POError when creating an IronPython project in VisualStudio; "Exception has been thrown by the target of an invocation."
    primarykey
    data
    text
    <p>I have a solution which will have a GUI built in on C# and I want to create a IronPython project in the solution which will be called from the C# code but I can't even create it.</p> <p>I'm using the python tools from CodePlex and IronPython 2.7</p> <p>Edit: This is I found in the ActivityLog.xml</p> <blockquote> <p><code>System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Failed to load language 'IronPython 2.7.2.1': Method not found: '!!1[] Microsoft.Scripting.Utils.ArrayUtils.ConvertAll(!!0[], System.Func<code>2&lt;!!0,!!1&gt;)'. ---&gt; System.MissingMethodException: Method not found: '!!1[] Microsoft.Scripting.Utils.ArrayUtils.ConvertAll(!!0[], System.Func</code>2)'. at IronPython.Runtime.PythonContext..ctor(ScriptDomainManager manager, IDictionary<code>2 options) --- End of inner exception stack trace --- at Microsoft.Scripting.Runtime.LanguageConfiguration.LoadLanguageContext(ScriptDomainManager domainManager, Boolean&amp; alreadyLoaded) at Microsoft.Scripting.Runtime.DlrConfiguration.LoadLanguageContext(ScriptDomainManager manager, LanguageConfiguration config) at Microsoft.Scripting.Runtime.DlrConfiguration.TryLoadLanguage(ScriptDomainManager manager, AssemblyQualifiedTypeName providerName, LanguageContext&amp; language) at Microsoft.Scripting.Runtime.ScriptDomainManager.GetLanguageByTypeName(String providerAssemblyQualifiedTypeName) at Microsoft.Scripting.Hosting.ScriptRuntime.GetEngineByTypeName(String assemblyQualifiedTypeName) at IronPython.Hosting.Python.GetEngine(ScriptRuntime runtime) at Microsoft.IronPythonTools.Interpreter.RemoteInterpreter..ctor() at Microsoft.IronPythonTools.Interpreter.RemoteInterpreterProxy..ctor() --- End of inner exception stack trace --- at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean&amp; canBeCached, RuntimeMethodHandleInternal&amp; ctor, Boolean&amp; bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark&amp; stackMark) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark&amp; stackMark) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark&amp; stackMark) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark&amp; stackMark) at System.Activator.CreateInstance(String assemblyName, String typeName) at System.AppDomain.CreateInstance(String assemblyName, String typeName) at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName) at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName) at Microsoft.IronPythonTools.Interpreter.IronPythonInterpreter.CreateDomain(RemoteInterpreterProxy&amp; remoteInterpreter) at Microsoft.IronPythonTools.Interpreter.IronPythonInterpreter.InitializeRemoteDomain() at Microsoft.IronPythonTools.Interpreter.IronPythonInterpreter..ctor(IronPythonInterpreterFactory factory, PythonTypeDatabase typeDb) at Microsoft.IronPythonTools.Interpreter.IronPythonInterpreterFactory.CreateInterpreter() at Microsoft.PythonTools.Repl.PythonReplEvaluator.get_ReplAnalyzer() at Microsoft.PythonTools.Extensions.GetAnalyzer(ITextView textView) at Microsoft.PythonTools.Intellisense.IntellisenseControllerProvider.TryCreateIntellisenseController(ITextView textView, IList</code>1 subjectBuffers) at Microsoft.VisualStudio.Language.Intellisense.Implementation.IntellisenseManagerConnectionListener.&lt;>c_<em>DisplayClass5.b</em>_1(IIntellisenseControllerProvider provider) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension,TMetadata,TExtensionInstance](Object errorSource, Lazy<code>2 provider, Func</code>2 getter)</code></p> </blockquote> <p>The generated code is as following (this project still is not displayed in the Solution)</p> <p>project1.py : </p> <pre><code>print("hello world") </code></pre> <p>Changed the above to <code>print "Hello world"</code> since I'm using Python 2.7 but it didn't fix the problem</p> <p>project1.pyproj:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt; &lt;PropertyGroup&gt; &lt;Configuration Condition=" '$(Configuration)' == '' "&gt;Debug&lt;/Configuration&gt; &lt;SchemaVersion&gt;2.0&lt;/SchemaVersion&gt; &lt;ProjectGuid&gt;690e6ad3-edb2-42cc-8db1-85cdf487d241&lt;/ProjectGuid&gt; &lt;ProjectHome&gt;.&lt;/ProjectHome&gt; &lt;StartupFile&gt;WebScraper.py&lt;/StartupFile&gt; &lt;SearchPath&gt; &lt;/SearchPath&gt; &lt;WorkingDirectory&gt;.&lt;/WorkingDirectory&gt; &lt;InterpreterId&gt;80659ab7-4d53-4e0c-8588-a766116cbd46&lt;/InterpreterId&gt; &lt;LaunchProvider&gt;IronPython (.NET) launcher&lt;/LaunchProvider&gt; &lt;InterpreterVersion&gt;2.7&lt;/InterpreterVersion&gt; &lt;OutputPath&gt;.&lt;/OutputPath&gt; &lt;Name&gt;WebScraper&lt;/Name&gt; &lt;RootNamespace&gt;WebScraper&lt;/RootNamespace&gt; &lt;/PropertyGroup&gt; &lt;PropertyGroup Condition=" '$(Configuration)' == 'Debug' "&gt; &lt;DebugSymbols&gt;true&lt;/DebugSymbols&gt; &lt;EnableUnmanagedDebugging&gt;false&lt;/EnableUnmanagedDebugging&gt; &lt;/PropertyGroup&gt; &lt;PropertyGroup Condition=" '$(Configuration)' == 'Release' "&gt; &lt;DebugSymbols&gt;true&lt;/DebugSymbols&gt; &lt;EnableUnmanagedDebugging&gt;false&lt;/EnableUnmanagedDebugging&gt; &lt;/PropertyGroup&gt; &lt;ItemGroup&gt; &lt;None Include="WebScraper.py" /&gt; &lt;/ItemGroup&gt; &lt;Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" /&gt; &lt;/Project&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload