SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Cannot create an IronPython application

Last post 01-19-2017 4:06 PM by n.jmurov. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 01-19-2017 2:28 AM

    Cannot create an IronPython application

    When trying to create an IronPython project, I get an error saying that IronPython.Modules.dll is missing - although it is located in "C:\Program Files (x86)\SharpDevelop\4.4\AddIns\BackendBindings\PythonBinding" where it seems to be looking for it.

    Then I get this error as well when clicking on Program.py:

    SharpDevelop Version : 4.4.2.9749-39bf891c
    .NET Version         : 4.0.30319.42000
    OS Version           : Microsoft Windows NT 6.1.7601 Service Pack 1
    Current culture      : English (Australia) (en-AU)
    Running under WOW6432, processor architecture: x86-64
    Working Set Memory   : 175060kb
    GC Heap Memory       : 55954kb

    Exception thrown:
    System.ApplicationException: Error parsing C:\Users\sergeyv\Documents\SharpDevelop Projects\wintest\wintest\MainForm.py ---> System.IO.FileNotFoundException: Could not load file or assembly 'IronPython, Version=2.7.0.40, Culture=neutral, PublicKeyToken=7f709c5b713576e1' or one of its dependencies. The system cannot find the file specified.
       at ICSharpCode.PythonBinding.PythonParser.Parse(IProjectContent projectContent, String fileName, String fileContent)
       at ICSharpCode.PythonBinding.PythonParser.Parse(IProjectContent projectContent, String fileName, ITextBuffer textBuffer)
       at ICSharpCode.SharpDevelop.ParserService.FileEntry.ParseFile(IProjectContent parentProjectContent, ITextBuffer fileContent)
       --- End of inner exception stack trace ---
       at ICSharpCode.SharpDevelop.ParserService.FileEntry.ParseFile(IProjectContent parentProjectContent, ITextBuffer fileContent)
       at ICSharpCode.SharpDevelop.ParserService.ParseFile(String fileName, ITextBuffer fileContent)
       at ICSharpCode.PythonBinding.PythonFormsDesignerDisplayBinding.GetParseInfo(String fileName, ITextBuffer textContent)
       at ICSharpCode.PythonBinding.PythonFormsDesignerDisplayBinding.CanAttachTo(IViewContent content)
       at ICSharpCode.SharpDevelop.DisplayBindingService.AttachSubWindows(IViewContent viewContent, Boolean isReattaching)
       at ICSharpCode.SharpDevelop.FileService.LoadFileWrapper.Invoke(String fileName)
       at ICSharpCode.Core.FileUtility.<>c__DisplayClass14.<ObservedLoad>b__13()
       at ICSharpCode.Core.FileUtility.ObservedLoad(FileOperationDelegate loadFile, String fileName, String message, FileErrorPolicy policy)
       at ICSharpCode.Core.FileUtility.ObservedLoad(NamedFileOperationDelegate saveFileAs, String fileName, String message, FileErrorPolicy policy)
       at ICSharpCode.Core.FileUtility.ObservedLoad(NamedFileOperationDelegate saveFileAs, String fileName, FileErrorPolicy policy)
       at ICSharpCode.SharpDevelop.FileService.OpenFile(String fileName, Boolean switchToOpenedView)
       at ICSharpCode.SharpDevelop.Internal.Templates.ProjectTemplate.<>c__DisplayClass2.<ReadAction>b__0(ProjectCreateInformation projectCreateInformation)
       at ICSharpCode.SharpDevelop.Internal.Templates.ProjectTemplate.RunOpenActions(ProjectCreateInformation projectCreateInformation)
       at ICSharpCode.SharpDevelop.Project.Dialogs.NewProjectDialog.CreateProject()
       at ICSharpCode.SharpDevelop.Project.Dialogs.NewProjectDialog.TryCreateProject(Object sender, EventArgs e)
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    ---- Recent log messages:
    08:50:04.041 [LoadSolutionProjects] DEBUG - RefreshProjectContentForReference: not refreshing (rpc.IsUpToDate) C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll
    08:50:04.042 [LoadSolutionProjects] DEBUG - RefreshProjectContentForReference: not refreshing (rpc.IsUpToDate) C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll
    08:50:04.042 [LoadSolutionProjects] DEBUG - RefreshProjectContentForReference: not refreshing (rpc.IsUpToDate) C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.DataSetExtensions.dll
    08:50:04.042 [LoadSolutionProjects] DEBUG - RefreshProjectContentForReference: not refreshing (rpc.IsUpToDate) C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.dll
    08:50:04.042 [LoadSolutionProjects] DEBUG - RefreshProjectContentForReference: not refreshing (rpc.IsUpToDate) C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll
    08:50:04.043 [LoadSolutionProjects] DEBUG - RefreshProjectContentForReference: not refreshing (rpc.IsUpToDate) C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Drawing.dll
    08:50:04.043 [LoadSolutionProjects] DEBUG - RefreshProjectContentForReference: not refreshing (rpc.IsUpToDate) C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Windows.Forms.dll
    08:50:04.043 [LoadSolutionProjects] DEBUG - RefreshProjectContentForReference: not refreshing (rpc.IsUpToDate) C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.dll
    08:50:04.044 [LoadSolutionProjects] DEBUG - RefreshProjectContentForReference: not refreshing (rpc.IsUpToDate) C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.Linq.dll
    08:50:04.052 [10] DEBUG - Git: OverlayIconManager Thread started
    08:50:04.233 [1] DEBUG - CompilerMessageView: Combined 4 appends.
    08:50:04.261 [LoadSolutionProjects] ERROR - Error on LoadSolutionProjects thread
    --> Exception:
    System.AggregateException: One or more errors occurred. ---> System.ApplicationException: Error parsing C:\Users\sergeyv\Documents\SharpDevelop Projects\wintest\wintest\Program.py ---> System.IO.FileNotFoundException: Could not load file or assembly 'IronPython, Version=2.7.0.40, Culture=neutral, PublicKeyToken=7f709c5b713576e1' or one of its dependencies. The system cannot find the file specified.
       at ICSharpCode.PythonBinding.PythonParser.Parse(IProjectContent projectContent, String fileName, String fileContent)
       at ICSharpCode.PythonBinding.PythonParser.Parse(IProjectContent projectContent, String fileName, ITextBuffer textBuffer)
       at ICSharpCode.SharpDevelop.ParserService.FileEntry.ParseFile(IProjectContent parentProjectContent, ITextBuffer fileContent)
       --- End of inner exception stack trace ---
       at ICSharpCode.SharpDevelop.ParserService.FileEntry.ParseFile(IProjectContent parentProjectContent, ITextBuffer fileContent)
       at ICSharpCode.SharpDevelop.ParserService.ParseFile(IProjectContent parentProjectContent, String fileName, ITextBuffer fileContent)
       at ICSharpCode.SharpDevelop.ParseProjectContent.<>c__DisplayClass13.<Initialize2>b__e(FileName fileName)
       at System.Threading.Tasks.Parallel.<>c__DisplayClass31_0`2.<ForEachWorker>b__0(Int32 i)
       at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
       at System.Threading.Tasks.Task.InnerInvoke()
       at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
       at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
       --- End of inner exception stack trace ---
       at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
       at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
       at System.Threading.Tasks.Task.Wait()
       at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
       at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IList`1 list, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
       at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
       at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
       at ICSharpCode.SharpDevelop.ParseProjectContent.Initialize2(IProgressMonitor progressMonitor)
       at ICSharpCode.SharpDevelop.LoadSolutionProjects.JobTask.Run(IProgressMonitor progressMonitor)
       at ICSharpCode.SharpDevelop.LoadSolutionProjects.JobQueue.RunThread()
    ---> (Inner Exception #0) System.ApplicationException: Error parsing C:\Users\sergeyv\Documents\SharpDevelop Projects\wintest\wintest\Program.py ---> System.IO.FileNotFoundException: Could not load file or assembly 'IronPython, Version=2.7.0.40, Culture=neutral, PublicKeyToken=7f709c5b713576e1' or one of its dependencies. The system cannot find the file specified.
       at ICSharpCode.PythonBinding.PythonParser.Parse(IProjectContent projectContent, String fileName, String fileContent)
       at ICSharpCode.PythonBinding.PythonParser.Parse(IProjectContent projectContent, String fileName, ITextBuffer textBuffer)
       at ICSharpCode.SharpDevelop.ParserService.FileEntry.ParseFile(IProjectContent parentProjectContent, ITextBuffer fileContent)
       --- End of inner exception stack trace ---
       at ICSharpCode.SharpDevelop.ParserService.FileEntry.ParseFile(IProjectContent parentProjectContent, ITextBuffer fileContent)
       at ICSharpCode.SharpDevelop.ParserService.ParseFile(IProjectContent parentProjectContent, String fileName, ITextBuffer fileContent)
       at ICSharpCode.SharpDevelop.ParseProjectContent.<>c__DisplayClass13.<Initialize2>b__e(FileName fileName)
       at System.Threading.Tasks.Parallel.<>c__DisplayClass31_0`2.<ForEachWorker>b__0(Int32 i)
       at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
       at System.Threading.Tasks.Task.InnerInvoke()
       at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
       at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---

    ---> (Inner Exception #1) System.ApplicationException: Error parsing C:\Users\sergeyv\Documents\SharpDevelop Projects\wintest\wintest\MainForm.py ---> System.IO.FileNotFoundException: Could not load file or assembly 'IronPython, Version=2.7.0.40, Culture=neutral, PublicKeyToken=7f709c5b713576e1' or one of its dependencies. The system cannot find the file specified.
       at ICSharpCode.PythonBinding.PythonParser.Parse(IProjectContent projectContent, String fileName, String fileContent)
       at ICSharpCode.PythonBinding.PythonParser.Parse(IProjectContent projectContent, String fileName, ITextBuffer textBuffer)
       at ICSharpCode.SharpDevelop.ParserService.FileEntry.ParseFile(IProjectContent parentProjectContent, ITextBuffer fileContent)
       --- End of inner exception stack trace ---
       at ICSharpCode.SharpDevelop.ParserService.FileEntry.ParseFile(IProjectContent parentProjectContent, ITextBuffer fileContent)
       at ICSharpCode.SharpDevelop.ParserService.ParseFile(IProjectContent parentProjectContent, String fileName, ITextBuffer fileContent)
       at ICSharpCode.SharpDevelop.ParseProjectContent.<>c__DisplayClass13.<Initialize2>b__e(FileName fileName)
       at System.Threading.Tasks.Parallel.<>c__DisplayClass31_0`2.<ForEachWorker>b__0(Int32 i)
       at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
       at System.Threading.Tasks.Task.InnerInvoke()
       at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
       at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---

    08:50:04.262 [LoadSolutionProjects] WARN - Stack trace of last exception log:
       at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at ICSharpCode.Core.MessageService.ShowException(Exception ex, String message)
       at ICSharpCode.SharpDevelop.LoadSolutionProjects.JobQueue.RunThread()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
    08:50:04.655 [10] DEBUG - Git: OverlayIconManager Thread finished
    08:50:05.966 [1] DEBUG - Save C:\Users\sergeyv\Documents\SharpDevelop Projects\wintest\wintest\app.config
    08:50:05.982 [1] DEBUG - OpenedFileClosed: C:\Users\sergeyv\Documents\SharpDevelop Projects\wintest\wintest\app.config
    08:50:06.041 [1] DEBUG - NavigationService -- suspend logging
    08:50:06.121 [1] DEBUG - Creating project content for wintest
    08:50:06.132 [1] DEBUG - ProjectBrowser: Loading solution [Solution: FileName=C:\Users\sergeyv\Documents\SharpDevelop Projects\wintest\wintest.sln, HasProjects=True, ReadOnly=False] into project tree view
    08:50:06.148 [3] DEBUG - Git: OverlayIconManager Thread started
    08:50:06.160 [1] INFO - Open file C:\Users\sergeyv\Documents\SharpDevelop Projects\wintest\wintest\MainForm.py
    08:50:06.170 [1] DEBUG - Activated feature 'ICSharpCode.AvalonEdit.AddIn.AvalonEditViewContent/open.py'
    08:50:06.177 [11] ERROR - Error during async parse
    --> Exception:
    System.ApplicationException: Error parsing C:\Users\sergeyv\Documents\SharpDevelop Projects\wintest\wintest\MainForm.py ---> System.IO.FileNotFoundException: Could not load file or assembly 'IronPython, Version=2.7.0.40, Culture=neutral, PublicKeyToken=7f709c5b713576e1' or one of its dependencies. The system cannot find the file specified.
       at ICSharpCode.PythonBinding.PythonParser.Parse(IProjectContent projectContent, String fileName, String fileContent)
       at ICSharpCode.PythonBinding.PythonParser.Parse(IProjectContent projectContent, String fileName, ITextBuffer textBuffer)
       at ICSharpCode.SharpDevelop.ParserService.FileEntry.ParseFile(IProjectContent parentProjectContent, ITextBuffer fileContent)
       --- End of inner exception stack trace ---
       at ICSharpCode.SharpDevelop.ParserService.FileEntry.ParseFile(IProjectContent parentProjectContent, ITextBuffer fileContent)
       at ICSharpCode.SharpDevelop.ParserService.FileEntry.<>c__DisplayClass31.<BeginParse>b__30()
    08:50:06.178 [11] WARN - Stack trace of last exception log:
       at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at ICSharpCode.Core.MessageService.ShowException(Exception ex, String message)
       at ICSharpCode.SharpDevelop.ParserService.FileEntry.<>c__DisplayClass31.<BeginParse>b__30()
       at System.Threading.Tasks.Task`1.InnerInvoke()
       at System.Threading.Tasks.Task.Execute()
       at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
       at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
       at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
    08:50:06.180 [1] ERROR - ThreadException caught
    --> Exception:
    System.ApplicationException: Error parsing C:\Users\sergeyv\Documents\SharpDevelop Projects\wintest\wintest\MainForm.py ---> System.IO.FileNotFoundException: Could not load file or assembly 'IronPython, Version=2.7.0.40, Culture=neutral, PublicKeyToken=7f709c5b713576e1' or one of its dependencies. The system cannot find the file specified.
       at ICSharpCode.PythonBinding.PythonParser.Parse(IProjectContent projectContent, String fileName, String fileContent)
       at ICSharpCode.PythonBinding.PythonParser.Parse(IProjectContent projectContent, String fileName, ITextBuffer textBuffer)
       at ICSharpCode.SharpDevelop.ParserService.FileEntry.ParseFile(IProjectContent parentProjectContent, ITextBuffer fileContent)
       --- End of inner exception stack trace ---
       at ICSharpCode.SharpDevelop.ParserService.FileEntry.ParseFile(IProjectContent parentProjectContent, ITextBuffer fileContent)
       at ICSharpCode.SharpDevelop.ParserService.ParseFile(String fileName, ITextBuffer fileContent)
       at ICSharpCode.PythonBinding.PythonFormsDesignerDisplayBinding.GetParseInfo(String fileName, ITextBuffer textContent)
       at ICSharpCode.PythonBinding.PythonFormsDesignerDisplayBinding.CanAttachTo(IViewContent content)
       at ICSharpCode.SharpDevelop.DisplayBindingService.AttachSubWindows(IViewContent viewContent, Boolean isReattaching)
       at ICSharpCode.SharpDevelop.FileService.LoadFileWrapper.Invoke(String fileName)
       at ICSharpCode.Core.FileUtility.<>c__DisplayClass14.<ObservedLoad>b__13()
       at ICSharpCode.Core.FileUtility.ObservedLoad(FileOperationDelegate loadFile, String fileName, String message, FileErrorPolicy policy)
       at ICSharpCode.Core.FileUtility.ObservedLoad(NamedFileOperationDelegate saveFileAs, String fileName, String message, FileErrorPolicy policy)
       at ICSharpCode.Core.FileUtility.ObservedLoad(NamedFileOperationDelegate saveFileAs, String fileName, FileErrorPolicy policy)
       at ICSharpCode.SharpDevelop.FileService.OpenFile(String fileName, Boolean switchToOpenedView)
       at ICSharpCode.SharpDevelop.Internal.Templates.ProjectTemplate.<>c__DisplayClass2.<ReadAction>b__0(ProjectCreateInformation projectCreateInformation)
       at ICSharpCode.SharpDevelop.Internal.Templates.ProjectTemplate.RunOpenActions(ProjectCreateInformation projectCreateInformation)
       at ICSharpCode.SharpDevelop.Project.Dialogs.NewProjectDialog.CreateProject()
       at ICSharpCode.SharpDevelop.Project.Dialogs.NewProjectDialog.TryCreateProject(Object sender, EventArgs e)
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    ---- Post-error application state information:
    Installed 3rd party AddIns:
    Workbench.ActiveContent: <null>
    ProjectService.OpenSolution: [Solution: FileName=C:\Users\sergeyv\Documents\SharpDevelop Projects\wintest\wintest.sln, HasProjects=True, ReadOnly=False]
    ProjectService.CurrentProject: <null>

  • 01-19-2017 3:12 PM In reply to

    Re: Cannot create an IronPython application

    What I've managed to find out was that the IronPython and IronPython.Modules dll's in GAC have versions 2.7.7.0 but it's looking for 2.7.0.40 which gets redirected to 2.7.5.0 as per publisher policy...unfortunately, I don't really understand how it's supposed to work. Cannot use SharpDevelop at all at the moment.

  • 01-19-2017 4:06 PM In reply to

    Re: Cannot create an IronPython application

    I've figured it out. This probably occurred because I first installed IronPython and then SharpDevelop. It put publisher policy .config files in GAC that I had to edit to make sure there was no version redirect. At the same time, I was unable to find out why SharpDevelop was requesting that specific version 2.7.0.40 and wouldn't let me use 2.7.7.0.

     

     

Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.