Quantcast
Channel: SharpDevelop Community
Viewing all articles
Browse latest Browse all 1764

Creating a Python Windows Application causes a crash

$
0
0

I've started to learn Python using Visual Studio 2017 and Ironpython but found that there was no Form Designer in VS2017.  After a bit of reseach I found that SharpDevelop did.  I downloaded the latest (4.4.2) version and installed it.  On selecting a Python Windows Application I immediately get a large screen that starts with "The Addin IronPython.Modules.dll could not be loaded......." followed by multiple"Unhandled exception has occured" with the following:

-------------------------------------------------------------------------------------------------------------------------------------------------

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 (United Kingdom) (en-GB)
Running under WOW6432, processor architecture: x86-64
Working Set Memory   : 106516kb
GC Heap Memory       : 25719kb

Error on LoadSolutionProjects thread
Exception thrown:
System.AggregateException: One or more errors occurred. ---> System.ApplicationException: Error parsing C:\Users\Dennis\Documents\SharpDevelop Projects\test2\test2\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\Dennis\Documents\SharpDevelop Projects\test2\test2\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\Dennis\Documents\SharpDevelop Projects\test2\test2\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 )<---


---- Recent log messages:
11:20:03.813 [LoadSolutionProjects] DEBUG - Try find XMLDoc @C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.X\en\System.Windows.Forms.xml
11:20:03.813 [LoadSolutionProjects] DEBUG - Try find XMLDoc @C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.X\System.Windows.Forms.xml
11:20:03.813 [LoadSolutionProjects] INFO - XmlDoc C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Windows.Forms.xml is redirecting to C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.X\System.Windows.Forms.xml
11:20:03.813 [LoadSolutionProjects] DEBUG - Loading XmlDoc for C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.X\System.Windows.Forms.xml
11:20:03.842 [LoadSolutionProjects] DEBUG - RefreshProjectContentForReference: not refreshing (rpc.IsUpToDate) C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Windows.Forms.dll
11:20:03.842 [LoadSolutionProjects] DEBUG - Loading PC for System.Xml
11:20:03.842 [LoadSolutionProjects] DEBUG - Try find XMLDoc @C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\en\System.Xml.xml
11:20:03.842 [LoadSolutionProjects] DEBUG - Try find XMLDoc @C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.xml
11:20:03.842 [LoadSolutionProjects] DEBUG - Loading XmlDoc for C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.xml
11:20:03.842 [LoadSolutionProjects] DEBUG - Try find XMLDoc @C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.X\en\System.XML.xml
11:20:03.842 [LoadSolutionProjects] DEBUG - Try find XMLDoc @C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.X\System.XML.xml
11:20:03.843 [LoadSolutionProjects] INFO - XmlDoc C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.xml is redirecting to C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.X\System.XML.xml
11:20:03.843 [LoadSolutionProjects] DEBUG - Loading XmlDoc for C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.X\System.XML.xml
11:20:03.897 [LoadSolutionProjects] DEBUG - RefreshProjectContentForReference: not refreshing (rpc.IsUpToDate) C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.dll
11:20:03.897 [LoadSolutionProjects] DEBUG - Loading PC for System.Xml.Linq
11:20:03.898 [LoadSolutionProjects] DEBUG - Try find XMLDoc @C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\en\System.Xml.Linq.xml
11:20:03.898 [LoadSolutionProjects] DEBUG - Try find XMLDoc @C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.Linq.xml
11:20:03.898 [LoadSolutionProjects] DEBUG - Loading XmlDoc for C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.Linq.xml
11:20:03.898 [LoadSolutionProjects] DEBUG - Try find XMLDoc @C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.X\en\System.Xml.Linq.xml
11:20:03.898 [LoadSolutionProjects] DEBUG - Try find XMLDoc @C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.X\System.Xml.Linq.xml
11:20:03.898 [LoadSolutionProjects] INFO - XmlDoc C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.Linq.xml is redirecting to C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.X\System.Xml.Linq.xml
11:20:03.898 [LoadSolutionProjects] DEBUG - Loading XmlDoc for C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.X\System.Xml.Linq.xml
11:20:03.899 [LoadSolutionProjects] DEBUG - RefreshProjectContentForReference: not refreshing (rpc.IsUpToDate) C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.Linq.dll
11:20:03.914 [LoadSolutionProjects] ERROR - Error on LoadSolutionProjects thread
--> Exception:
System.AggregateException: One or more errors occurred. ---> System.ApplicationException: Error parsing C:\Users\Dennis\Documents\SharpDevelop Projects\test2\test2\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\Dennis\Documents\SharpDevelop Projects\test2\test2\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\Dennis\Documents\SharpDevelop Projects\test2\test2\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 )<---

11:20:03.917 [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()

---- Post-error application state information:
Installed 3rd party AddIns:
Workbench.ActiveContent: --> Exception thrown by the state getter:
System.InvalidOperationException: This operation can be called on the main thread only.
   at ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.AssertMainThread()
   at ICSharpCode.SharpDevelop.Gui.WpfWorkbench.get_ActiveContent()
   at ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.<InitializeWorkbench>b__0()
   at ICSharpCode.Core.ApplicationStateInfoService.GetCurrentApplicationStateInfo()
ProjectService.OpenSolution: [Solution: FileName=C:\Users\Dennis\Documents\SharpDevelop Projects\test2\test2.sln, HasProjects=True, ReadOnly=False]
ProjectService.CurrentProject: <null>

-------------------------------------------------------------------------------------------------------------------

What am I doing wrong?

I'd read such good things about SharpExpress that this is a bit of a dissapointment!

 

 

 

Normal 0 false false false EN-GB JA X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";}

 

 


Viewing all articles
Browse latest Browse all 1764

Trending Articles