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

SharpDevelop 5.1 Beta

$
0
0

Release Information

As the first point release, SharpDevelop 5.1 contains bug fixes as well as performance and stability improvements. Thanks to an active community which keeps the pull requests coming, we also ship major improvements in the WPF designer and a new assembly info editor panel (project options). Details are documented in the Changes section on the Web site.

Please keep the bug reports coming - either via the forum (preferred when a discussion is needed) or directly on GitHub. Feel free to adopt an issue and provide us with a pull request!

Downloads

SharpDevelop 5.1 Beta

Support

Our primary means of support is via ourWeb-based forum (please do not email team members directly unless they advise you to do so in the forum)


DataGridView Error - SharpDevelop UI Crash

$
0
0

Hei,

i have 2 application compiled with SharpDevelop 4.4. If i want to click (designview) on the dataGridView element the ui from SharpDevelop crashed. I want to edit the columns and modify the dataGridView. On compiling no error occured, the application is working.On my second pc the error also occured. Please help.

Regards Joerg

 

SharpDevelop Version : 4.4.1.9729-7196a277
.NET Version         : 4.0.30319.18444
OS Version           : Microsoft Windows NT 6.1.7601 Service Pack 1
Current culture      : German (Germany) (de-DE)
Running under WOW6432, processor architecture: x86-64
Working Set Memory   : 146144kb
GC Heap Memory       : 29667kb

Exception thrown:
System.InvalidOperationException: Das Objekt wird bereits an anderer Stelle verwendet.
   bei System.Drawing.Graphics.CheckErrorStatus(Int32 status)
   bei System.Drawing.Graphics.FillRectangle(Brush brush, Int32 x, Int32 y, Int32 width, Int32 height)
   bei System.Drawing.Graphics.FillRectangle(Brush brush, Rectangle rect)
   bei System.Windows.Forms.Design.Behavior.SelectionBorderGlyph.Paint(PaintEventArgs pe)
   bei System.Windows.Forms.Design.Behavior.BehaviorService.PropagatePaint(PaintEventArgs pe)
   bei System.Windows.Forms.Design.Behavior.BehaviorService.AdornerWindow.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

---- Recent log messages:
17:40:28.356 [1] DEBUG - Forms designer: Initializing nested service container of label1 [System.Windows.Forms.Label], Text:  using Reflection
17:40:28.361 [1] DEBUG - Forms designer: deserializing a property assignment:
17:40:28.361 [1] DEBUG - -> [CodeAssignStatement: Left=[CodePropertyReferenceExpression: Name=ForeColor, Target=[CodeFieldReferenceExpression: Name=label1, Target=[CodeThisReferenceExpression]]], Right=[CodePropertyReferenceExpression: Name=HotTrack, Target=[CodeTypeReference: System.Drawing.SystemColors]]]
17:40:28.364 [1] DEBUG - Forms designer: deserializing a property assignment:
17:40:28.364 [1] DEBUG - -> [CodeAssignStatement: Left=[CodePropertyReferenceExpression: Name=ForeColor, Target=[CodeFieldReferenceExpression: Name=label1, Target=[CodeThisReferenceExpression]]], Right=[CodePropertyReferenceExpression: Name=HotTrack, Target=[CodeTypeReference: System.Drawing.SystemColors]]]
17:40:28.369 [1] DEBUG - Forms designer: Initializing nested service container of pictureBox1 [System.Windows.Forms.PictureBox], SizeMode: Normal using Reflection
17:40:28.375 [1] DEBUG - Forms designer: Initializing nested service container of progressBar1 [System.Windows.Forms.ProgressBar], Minimum: 0, Maximum: 100, Value: 0 using Reflection
17:40:28.377 [1] DEBUG - Forms designer: Initializing nested service container of label2 [System.Windows.Forms.Label], Text:  using Reflection
17:40:28.378 [1] DEBUG - Forms designer: Initializing nested service container of label3 [System.Windows.Forms.Label], Text:  using Reflection
17:40:28.382 [1] DEBUG - Forms designer: Initializing nested service container of dataGridView1 [System.Windows.Forms.DataGridView] using Reflection
17:40:28.394 [1] DEBUG - Forms designer: Initializing nested service container of btn_csvExport [System.Windows.Forms.Button], Text:  using Reflection
17:40:28.398 [1] DEBUG - Forms designer: Initializing nested service container of comboBox1 [System.Windows.Forms.ComboBox], Items.Count: 0 using Reflection
17:40:28.405 [1] DEBUG - Forms designer: Initializing nested service container of label4 [System.Windows.Forms.Label], Text:  using Reflection
17:40:28.408 [1] DEBUG - Forms designer: Initializing nested service container of groupBox1 [System.Windows.Forms.GroupBox], Text:  using Reflection
17:40:28.410 [1] DEBUG - Forms designer: Initializing nested service container of chkbox_ut_host92 [System.Windows.Forms.CheckBox], CheckState: 0 using Reflection
17:40:28.413 [1] DEBUG - Forms designer: Initializing nested service container of comboBox2 [System.Windows.Forms.ComboBox], Items.Count: 0 using Reflection
17:40:28.416 [1] DEBUG - Forms designer: Initializing nested service container of saveFileDialog1 [System.Windows.Forms.SaveFileDialog]: Title: , FileName:  using Reflection
17:40:28.442 [1] DEBUG - Forms designer: DesignerLoader loaded, HasSucceeded=True
17:40:28.442 [1] DEBUG - FormsDesigner loaded, setting ActiveDesignSurface to System.ComponentModel.Design.DesignSurface
17:40:28.458 [1] DEBUG - IDEContainer: Connecting property grid to service provider
17:40:28.501 [1] INFO - Form Designer: END INITIALIZE
17:40:28.502 [1] DEBUG - FormsDesigner view content activated, setting ActiveDesignSurface to System.ComponentModel.Design.DesignSurface
17:40:28.502 [1] DEBUG - ActiveContentChanged to ICSharpCode.FormsDesigner.FormsDesignerViewContent
17:40:28.516 [1] DEBUG - ParseInformationUpdated D:\Programmierung\SharpDevelop Projects\WTMP Parser\WTMP Parser\MainForm.cs new!=null:True
17:40:31.815 [1] ERROR - ThreadException caught
--> Exception:
System.InvalidOperationException: Das Objekt wird bereits an anderer Stelle verwendet.
   bei System.Drawing.Graphics.CheckErrorStatus(Int32 status)
   bei System.Drawing.Graphics.FillRectangle(Brush brush, Int32 x, Int32 y, Int32 width, Int32 height)
   bei System.Drawing.Graphics.FillRectangle(Brush brush, Rectangle rect)
   bei System.Windows.Forms.Design.Behavior.SelectionBorderGlyph.Paint(PaintEventArgs pe)
   bei System.Windows.Forms.Design.Behavior.BehaviorService.PropagatePaint(PaintEventArgs pe)
   bei System.Windows.Forms.Design.Behavior.BehaviorService.AdornerWindow.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

---- Post-error application state information:
Installed 3rd party AddIns:
Workbench.ActiveContent: ICSharpCode.FormsDesigner.FormsDesignerViewContent
ProjectService.OpenSolution: [Solution: FileName=D:\Programmierung\SharpDevelop Projects\WTMP Parser\WTMP Parser.sln, HasProjects=True, ReadOnly=False]
ProjectService.CurrentProject: [CSharpProject: WTMP Parser]

MVVM and AvalonEdit

$
0
0

Hello,

I bumped into a problem while trying to write application that uses MVVM pattern and AvalonEdit. I think that it is hard or even impossible to write that kind of application at the moment because you can only bind Document property of TextEditor, other important information about current state of this control can't be saved.

In my view I've got TextEditor which Document field is bound to Document property of ViewModel. There is ObservableCollection of ViewModels which is bound to TabControl's data source. If you change tab, TabControl reuse View. It does so by binding appropriate fields of View to ViewModel. At the moment I can only bind Document property so I lose information about current caret position, current selection and probably TextAnchors (I didn't test that one).

 

There are a few solutions which can be applied:

  • placing TextEditor control in model
  • subclassing TabControl so it won't reuse View

Are there any plans of making AvalonEdit more MVVM friendly?

NRefactory 4.4 und 5.0 in einem Projekt nutzen

$
0
0

Hallo,

ich habe mir zwei DLLs erstellt. Die eine nutzt ICSharpCode.NRefactory und ICSharpCode.NRefactory.CSharp in der Version 5.0 und die andere ICSharpCode.NRefactory und ICSharpCode.SharpDevelop.Dom in der Version 4.4

Beide DLLs funktionieren separat einwandfrei.

Wenn ich nun aber ein Projekt erstelle, in dem beide DLLs referenziert werden (mit Copy Local = False, damit sich die NRefactories im Bin-Ordner des Projektes nicht gegenseitig überschreiben), so bekomme ich von der einen DLL die Fehlermeldung:

'Die Datei oder Assembly "ICSharpCode.NRefactory, Version=4.4.1.9729, Culture=neutral, PublicKeyToken=efe927acf176eea2" oder eine Abhängigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assembly stimmt nicht mit dem Assemblyverweis überein. (Ausnahme von HRESULT: 0x80131040)

Was tun?
Danke im voraus & Grüße ... Peter

icsharp syntax highligthing

$
0
0

How i can do syntax with letter and number like to gcodes.

example.

 

DI5000  I knoe if use only DI as keyord works but i need with numbers to. can be possible.

SA5000

SV2500

 

any help.

thanks.

 

PRAISE!

$
0
0

  • WPF Designer: enable XamlDesigner to develop the XamlDesigner

I'm pretty sure not many people other than the team itself realizes what kind of milestone that is.  It's a big milestone.

Congratulations!

I never was able to get my project to that point, such that my project could consume itself to develop itself.  :-(  *sad panda*

(My project was called Expression Blend.  You may have hard of it.  I was a mere SDE on the project, not the PM or anyone important.)

 

Error while opening the solution

$
0
0

SharpDevelop Version : 5.0.0.4053-Beta 2-c42c4dab

.NET Version         : 4.0.30319.34011

OS Version           : Microsoft Windows NT 6.3.9600.0

Current culture      : English (India) (en-IN)

Running under WOW6432, processor architecture: x86-64

Working Set Memory   : 192720kb

GC Heap Memory       : 94699kb

 

Exception thrown:

System.TypeInitializationException: The type initializer for 'SharpDevTFS.TFS' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.TeamFoundation.VersionControl.Client, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

   at SharpDevTFS.TFS..cctor()

   --- End of inner exception stack trace ---

   at SharpDevTFS.TFS.GetFileStatus(String fileName)

   at SharpDevTFS.OverlayIconManager.RunStep(AbstractProjectBrowserTreeNode node)

   at SharpDevTFS.OverlayIconManager.Run(Object state)

 

---- Recent log messages:

23:53:30.879 [LoadSolutionProjects] DEBUG - Deserializing C:\Users\lenovo\AppData\Local\Temp\SharpDevelop5.0\TASConfs.169b825f.prj

23:53:30.923 [LoadSolutionProjects] DEBUG - TASConfs: ParseFiles() finished. 6 files were re-used from CC cache; 0 files were parsed (0 of those are serializable)

23:53:30.926 [LoadSolutionProjects] DEBUG - TASConfsController: ParseFiles() finished. 0 files were re-used from CC cache; 2 files were parsed (2 of those are serializable)

23:53:30.952 [LoadSolutionProjects] DEBUG - Deserializing C:\Users\lenovo\AppData\Local\Temp\SharpDevelop5.0\TASReports.cabdc91f.prj

23:53:30.999 [LoadSolutionProjects] DEBUG - TASReports: ParseFiles() finished. 6 files were re-used from CC cache; 0 files were parsed (0 of those are serializable)

23:53:30.999 [LoadSolutionProjects] DEBUG - Deserializing C:\Users\lenovo\AppData\Local\Temp\SharpDevelop5.0\TASReportsController.35219b5f.prj

23:53:31.063 [LoadSolutionProjects] DEBUG - TASReportsController: ParseFiles() finished. 6 files were re-used from CC cache; 0 files were parsed (0 of those are serializable)

23:53:31.069 [LoadSolutionProjects] DEBUG - TASControllerGeneric: ParseFiles() finished. 0 files were re-used from CC cache; 3 files were parsed (3 of those are serializable)

23:53:31.102 [LoadSolutionProjects] DEBUG - TASBCUGeneric: ParseFiles() finished. 0 files were re-used from CC cache; 2 files were parsed (2 of those are serializable)

23:53:31.194 [LoadSolutionProjects] DEBUG - Deserializing C:\Users\lenovo\AppData\Local\Temp\SharpDevelop5.0\TASSerialPortComm.f9651541.prj

23:53:31.242 [LoadSolutionProjects] DEBUG - TASSerialPortComm: ParseFiles() finished. 4 files were re-used from CC cache; 0 files were parsed (0 of those are serializable)

23:53:31.292 [LoadSolutionProjects] DEBUG - TASBayManager: ParseFiles() finished. 0 files were re-used from CC cache; 2 files were parsed (2 of those are serializable)

23:53:31.432 [LoadSolutionProjects] DEBUG - DBAccessCommon: ParseFiles() finished. 0 files were re-used from CC cache; 2 files were parsed (2 of those are serializable)

23:53:31.458 [LoadSolutionProjects] DEBUG - Deserializing C:\Users\lenovo\AppData\Local\Temp\SharpDevelop5.0\TASMasters.9dd7205f.prj

23:53:31.627 [LoadSolutionProjects] DEBUG - TASMasters: ParseFiles() finished. 47 files were re-used from CC cache; 0 files were parsed (0 of those are serializable)

23:53:31.765 [CopyInfoToClipboard] DEBUG - Service startup: ICSharpCode.SharpDevelop.IClipboard

23:53:32.067 [LoadSolutionProjects] DEBUG - Deserializing C:\Users\lenovo\AppData\Local\Temp\SharpDevelop5.0\TASSAP.2ef158ff.prj

23:53:32.117 [LoadSolutionProjects] DEBUG - TASSAP: ParseFiles() finished. 10 files were re-used from CC cache; 0 files were parsed (0 of those are serializable)

23:53:32.207 [LoadSolutionProjects] DEBUG - Deserializing C:\Users\lenovo\AppData\Local\Temp\SharpDevelop5.0\TASNHTransporters.ecc999bd.prj

23:53:32.276 [LoadSolutionProjects] DEBUG - TASNHTransporters: ParseFiles() finished. 16 files were re-used from CC cache; 0 files were parsed (0 of those are serializable)

23:53:32.403 [LoadSolutionProjects] DEBUG - LoadSolutionProjectsThread finished after 00:00:13.3975589

23:56:12.577 [5] ERROR - 

--> Exception:

System.TypeInitializationException: The type initializer for 'SharpDevTFS.TFS' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.TeamFoundation.VersionControl.Client, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

   at SharpDevTFS.TFS..cctor()

   --- End of inner exception stack trace ---

   at SharpDevTFS.TFS.GetFileStatus(String fileName)

   at SharpDevTFS.OverlayIconManager.RunStep(AbstractProjectBrowserTreeNode node)

   at SharpDevTFS.OverlayIconManager.Run(Object state)

23:56:12.578 [5] WARN - Stack trace of last exception log:

   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)

   at System.Environment.get_StackTrace()

   at ICSharpCode.SharpDevelop.Logging.SDMessageService.ShowException(Exception ex, String message)

   at ICSharpCode.Core.MessageService.ShowException(Exception ex, String message)

   at SharpDevTFS.OverlayIconManager.Run(Object state)

   at System.Threading.QueueUserWorkItemCallback.WaitCallback_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.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()

   at System.Threading.ThreadPoolWorkQueue.Dispatch()

   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

23:57:03.297 [5] ERROR - 

--> Exception:

System.TypeInitializationException: The type initializer for 'SharpDevTFS.TFS' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.TeamFoundation.VersionControl.Client, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

   at SharpDevTFS.TFS..cctor()

   --- End of inner exception stack trace ---

   at SharpDevTFS.TFS.GetFileStatus(String fileName)

   at SharpDevTFS.OverlayIconManager.RunStep(AbstractProjectBrowserTreeNode node)

   at SharpDevTFS.OverlayIconManager.Run(Object state)

23:57:03.298 [5] WARN - Stack trace of last exception log:

   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)

   at System.Environment.get_StackTrace()

   at ICSharpCode.SharpDevelop.Logging.SDMessageService.ShowException(Exception ex, String message)

   at ICSharpCode.Core.MessageService.ShowException(Exception ex, String message)

   at SharpDevTFS.OverlayIconManager.Run(Object state)

   at System.Threading.QueueUserWorkItemCallback.WaitCallback_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.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()

   at System.Threading.ThreadPoolWorkQueue.Dispatch()

   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

 

---- Post-error application state information:

Installed 3rd party AddIns: [PInvoke Add-in 0.0.0.0], [Mono 0.0.0.0], [SharpDevTFS 0.0.0.0], [WSPBuilderAddinV5 0.0.0.0]

ProjectService.CurrentSolution: [Solution D:\Projects\ABB\Source\TAS\TAS.sln with 38 projects]

ProjectService.CurrentProject: <null>

Workbench.ActiveContent: System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it.

   at System.Windows.Threading.Dispatcher.VerifyAccess()

   at ICSharpCode.SharpDevelop.DispatcherMessageLoop.VerifyAccess()

   at ICSharpCode.SharpDevelop.Workbench.WpfWorkbench.get_ActiveContent()

   at ICSharpCode.SharpDevelop.Workbench.WorkbenchStartup.<InitializeWorkbench>b__0()

   at ICSharpCode.Core.ApplicationStateInfoService.GetCurrentApplicationStateInfo()

Checking broken file of .tar.gz

$
0
0

I am extracting .tar.gz files in c# windows application using SharpZipLib. There are some files in my archive that when I extract them manually with e.g. 7zip, give me error "Broken file", but when I decompress the same file with SharpzipLib it extract some files. I want to know that how can I quickly check before extracting a .tar.gz file that whether its corrupted or not? 


SharpDevelop

$
0
0

SharpDevelop Version : 5.1.0.4936-Beta-3ea20cfa
.NET Version         : 4.5.53344
OS Version           : Microsoft Windows NT 6.3.9600.0
Current culture      : Russian (Russia) (ru-RU)
Working Set Memory   : 33416kb
GC Heap Memory       : 1031kb

Unhandled exception terminated SharpDevelop
Exception thrown:
System.TypeInitializationException: The type initializer for 'ICSharpCode.SharpDevelop.Project.ProjectService' threw an exception. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> ICSharpCode.Core.TreePathNotFoundException: Treepath not found: /SharpDevelop/Workbench/ProjectBindings
   at ICSharpCode.Core.AddInTreeImpl.GetTreeNode(String path, Boolean throwOnNotFound) in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\Core\Project\Src\AddInTree\AddInTree.cs:line 151
   at ICSharpCode.Core.AddInTreeImpl.BuildItems[T](String path, Object parameter, Boolean throwOnNotFound) in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\Core\Project\Src\AddInTree\AddInTree.cs:line 190
   at ICSharpCode.SharpDevelop.Project.SDProjectService..ctor() in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\SharpDevelop\Project\ProjectService.cs:line 39
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at ICSharpCode.Core.AddIn.CreateObject(String className) in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\Core\Project\Src\AddInTree\AddIn\AddIn.cs:line 61
   at ICSharpCode.Core.ServiceDoozer.<>c__DisplayClass0.<BuildItem>b__2(IServiceContainer , Type ) in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\Core\Project\Src\AddInTree\AddIn\DefaultDoozers\ServiceDoozer.cs:line 59
   at ICSharpCode.SharpDevelop.SharpDevelopServiceContainer.GetService(Type serviceType) in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\Base\Project\Util\SharpDevelopServiceContainer.cs:line 57
   at ICSharpCode.SharpDevelop.SharpDevelopExtensions.GetService[T](IServiceProvider provider) in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\Base\Project\Util\SharpDevelopExtensions.cs:line 880
   at ICSharpCode.SharpDevelop.SD.GetService[T]() in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\Base\Project\Services\SD.cs:line 84
   at ICSharpCode.SharpDevelop.Project.ProjectService..cctor() in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\Base\Project\Src\Services\ProjectService\ProjectService.cs:line 238
   --- End of inner exception stack trace ---
   at ICSharpCode.SharpDevelop.Project.ProjectService.add_BuildStarted(EventHandler`1 value)
   at ICSharpCode.SharpDevelop.Sda.CallHelper.InitSharpDevelopCore(CallbackHelper callback, StartupSettings properties) in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\SharpDevelop\Sda\CallHelper.cs:line 123
   at ICSharpCode.SharpDevelop.Sda.SharpDevelopHost..ctor(AppDomain appDomain, StartupSettings startup) in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\SharpDevelop\Sda\SharpDevelopHost.cs:line 108
   at ICSharpCode.SharpDevelop.Startup.SharpDevelopMain.RunApplication() in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\SharpDevelop\Startup\SharpDevelopMain.cs:line 203
   at ICSharpCode.SharpDevelop.Startup.SharpDevelopMain.Run() in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\SharpDevelop\Startup\SharpDevelopMain.cs:line 124
   at ICSharpCode.SharpDevelop.Startup.SharpDevelopMain.Main(String[ args) in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\SharpDevelop\Startup\SharpDevelopMain.cs:line 71

---- Recent log messages:
16:49:11.345 [1] INFO - InitSharpDevelop...
16:49:11.471 [1] INFO - Looking for AddIns...
16:49:12.162 [1] INFO - Loading AddInTree...
16:49:13.381 [1] INFO - Running autostart commands...
16:49:13.382 [1] DEBUG - Service startup: ICSharpCode.SharpDevelop.Parser.IAssemblyParserService
16:49:13.387 [1] DEBUG - Service startup: ICSharpCode.SharpDevelop.Project.IProjectService
16:49:13.580 [1] INFO - Leaving RunApplication()
16:49:13.591 [1] FATAL - System.TypeInitializationException: The type initializer for 'ICSharpCode.SharpDevelop.Project.ProjectService' threw an exception. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> ICSharpCode.Core.TreePathNotFoundException: Treepath not found: /SharpDevelop/Workbench/ProjectBindings
   at ICSharpCode.Core.AddInTreeImpl.GetTreeNode(String path, Boolean throwOnNotFound) in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\Core\Project\Src\AddInTree\AddInTree.cs:line 151
   at ICSharpCode.Core.AddInTreeImpl.BuildItems[T](String path, Object parameter, Boolean throwOnNotFound) in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\Core\Project\Src\AddInTree\AddInTree.cs:line 190
   at ICSharpCode.SharpDevelop.Project.SDProjectService..ctor() in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\SharpDevelop\Project\ProjectService.cs:line 39
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at ICSharpCode.Core.AddIn.CreateObject(String className) in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\Core\Project\Src\AddInTree\AddIn\AddIn.cs:line 61
   at ICSharpCode.Core.ServiceDoozer.<>c__DisplayClass0.<BuildItem>b__2(IServiceContainer , Type ) in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\Core\Project\Src\AddInTree\AddIn\DefaultDoozers\ServiceDoozer.cs:line 59
   at ICSharpCode.SharpDevelop.SharpDevelopServiceContainer.GetService(Type serviceType) in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\Base\Project\Util\SharpDevelopServiceContainer.cs:line 57
   at ICSharpCode.SharpDevelop.SharpDevelopExtensions.GetService[T](IServiceProvider provider) in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\Base\Project\Util\SharpDevelopExtensions.cs:line 880
   at ICSharpCode.SharpDevelop.SD.GetService[T]() in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\Base\Project\Services\SD.cs:line 84
   at ICSharpCode.SharpDevelop.Project.ProjectService..cctor() in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\Base\Project\Src\Services\ProjectService\ProjectService.cs:line 238
   --- End of inner exception stack trace ---
   at ICSharpCode.SharpDevelop.Project.ProjectService.add_BuildStarted(EventHandler`1 value)
   at ICSharpCode.SharpDevelop.Sda.CallHelper.InitSharpDevelopCore(CallbackHelper callback, StartupSettings properties) in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\SharpDevelop\Sda\CallHelper.cs:line 123
   at ICSharpCode.SharpDevelop.Sda.SharpDevelopHost..ctor(AppDomain appDomain, StartupSettings startup) in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\SharpDevelop\Sda\SharpDevelopHost.cs:line 108
   at ICSharpCode.SharpDevelop.Startup.SharpDevelopMain.RunApplication() in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\SharpDevelop\Startup\SharpDevelopMain.cs:line 203
   at ICSharpCode.SharpDevelop.Startup.SharpDevelopMain.Run() in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\SharpDevelop\Startup\SharpDevelopMain.cs:line 124
   at ICSharpCode.SharpDevelop.Startup.SharpDevelopMain.Main(String[ args) in C:\Users\kristian\Desktop\SharpDevelop_5.1.0.4936_Beta_Source\src\Main\SharpDevelop\Startup\SharpDevelopMain.cs:line 71

---- Post-error application state information:
Installed 3rd party AddIns:

 

OpenCover: "An item with the same key has already been added"

$
0
0

I've been having problems running unit tests with code coverage for a while now and I'd appreciate some pointers. If I run my unit tests with code coverage, the tests run, but then I get an error right at the end, when SD is interpreting the results from OpenCover to display in the code coverage tab:

SharpDevelop Version : 4.4.1.9729-7196a277
.NET Version         : 4.0.30319.18444
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   : 133836kb
GC Heap Memory       : 27460kb

Unhandled exception
Exception thrown:
System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at ICSharpCode.CodeCoverage.CodeCoverageResults.AddAssembly(XElement reader)
   at ICSharpCode.CodeCoverage.CodeCoverageResults.ReadResults(XContainer reader)
   at ICSharpCode.CodeCoverage.CodeCoverageResults..ctor(XContainer reader)
   at ICSharpCode.CodeCoverage.CodeCoverageTestRunner.ReadCodeCoverageResults()
   at ICSharpCode.CodeCoverage.RunTestWithCodeCoverageCommand.CodeCoverageRunFinished(Object source, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at ICSharpCode.UnitTesting.TestRunnerBase.OnAllTestsFinished(Object source, EventArgs e)
   at ICSharpCode.SharpDevelop.Util.ProcessRunner.OnProcessExited(Object sender, EventArgs e)
   at System.Diagnostics.Process.OnExited()
   at System.Diagnostics.Process.RaiseOnExited()
   at System.Diagnostics.Process.CompletionCallback(Object context, Boolean wasSignaled)
   at System.Threading._ThreadPoolWaitOrTimerCallback.WaitOrTimerCallback_Context(Object state, Boolean timedOut)
   at System.Threading._ThreadPoolWaitOrTimerCallback.WaitOrTimerCallback_Context_f(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._ThreadPoolWaitOrTimerCallback.PerformWaitOrTimerCallback(Object state, Boolean timedOut)

---- Recent log messages:
16:31:31.773 [20] DEBUG - Received command ReportEvent
16:31:31.774 [20] DEBUG - Received command ReportEvent
16:31:31.774 [20] DEBUG - Received command BuildDone
16:31:31.774 [20] INFO - Finished building ImageTools.UnitTests, success=True
16:31:31.774 [20] INFO - Start building
16:31:31.774 [14] INFO - Finished building , success=True
16:31:31.775 [1] DEBUG - ActiveContentChanged to ICSharpCode.SharpDevelop.Gui.ErrorListPad
16:31:33.193 [1] DEBUG - CompilerMessageView: Combined 6 appends.
16:31:33.194 [1] DEBUG - CompilerMessageView: Combined 2 appends.
16:31:33.203 [1] DEBUG - CompilerMessageView: Combined 2 appends.
16:31:35.006 [1] DEBUG - TestClass not found: SDE.ImageTools.NUnit.ColourTest.TestFixtureBase
16:31:35.007 [1] DEBUG - TestClass not found: SDE.ImageTools.NUnit.ColourTest.TestFixtureBase
16:31:35.007 [1] DEBUG - TestClass not found: SDE.ImageTools.NUnit.ColourTest.XmlSerializableItemTestBase`1
16:31:35.007 [1] DEBUG - TestClass not found: SDE.ImageTools.NUnit.ColourTest.XmlSerializableItemTestBase`1
16:31:35.007 [1] DEBUG - TestClass not found: SDE.ImageTools.NUnit.ColourTest.XmlSerializableItemTestBase`1
16:31:35.007 [1] DEBUG - TestClass not found: SDE.ImageTools.NUnit.ColourTest.XmlSerializableItemTestBase`1
16:31:35.007 [1] DEBUG - TestClass not found: SDE.ImageTools.NUnit.ColourTest.XmlSerializableItemTestBase`1
16:31:35.007 [1] DEBUG - TestClass not found: SDE.ImageTools.NUnit.ColourTest.XmlSerializableItemTestBase`1
16:31:35.029 [1] DEBUG - CompilerMessageView: Combined 2 appends.
16:31:35.030 [1] DEBUG - CompilerMessageView: Combined 3 appends.
16:31:35.177 [1] DEBUG - CompilerMessageView: Combined 2 appends.
16:31:35.177 [1] DEBUG - CompilerMessageView: Combined 2 appends.
16:31:35.178 [1] DEBUG - CompilerMessageView: Combined 2 appends.
16:31:35.284 [6] FATAL - UnhandledException caught
--> Exception:
System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at ICSharpCode.CodeCoverage.CodeCoverageResults.AddAssembly(XElement reader)
   at ICSharpCode.CodeCoverage.CodeCoverageResults.ReadResults(XContainer reader)
   at ICSharpCode.CodeCoverage.CodeCoverageResults..ctor(XContainer reader)
   at ICSharpCode.CodeCoverage.CodeCoverageTestRunner.ReadCodeCoverageResults()
   at ICSharpCode.CodeCoverage.RunTestWithCodeCoverageCommand.CodeCoverageRunFinished(Object source, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at ICSharpCode.UnitTesting.TestRunnerBase.OnAllTestsFinished(Object source, EventArgs e)
   at ICSharpCode.SharpDevelop.Util.ProcessRunner.OnProcessExited(Object sender, EventArgs e)
   at System.Diagnostics.Process.OnExited()
   at System.Diagnostics.Process.RaiseOnExited()
   at System.Diagnostics.Process.CompletionCallback(Object context, Boolean wasSignaled)
   at System.Threading._ThreadPoolWaitOrTimerCallback.WaitOrTimerCallback_Context(Object state, Boolean timedOut)
   at System.Threading._ThreadPoolWaitOrTimerCallback.WaitOrTimerCallback_Context_f(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._ThreadPoolWaitOrTimerCallback.PerformWaitOrTimerCallback(Object state, Boolean timedOut)
16:31:35.285 [6] FATAL - Runtime is terminating because of unhandled exception.

---- 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\Simon\Documents\SD\SDE\Source\GifComponents\GifComponents.sln, HasProjects=True, ReadOnly=False]
ProjectService.CurrentProject: [CSharpProject: ImageTools]

So I downloaded the SD source code, and using the stack trace I tracked down the point where this exception is being thrown. It's reading Module nodes from the file OpenCover\coverage.xml in the unit test project folder, which is presumably created by OpenCover, and adding their hash attribute and ModuleName element to a dictionary, with the hash as the dictionary key. And looking at that coverage.xml file, it's pretty clear why the exception is being thrown - it contains two entries for my business logic project, both with the same hash:

    <Module hash="76-FF-A4-ED-FA-92-BC-E6-06-AE-5A-90-93-5B-FA-D9-C2-FD-65-5B">
      <FullName>C:\Users\Simon\AppData\Local\Temp unit20\ShadowCopyCache\7328_635550354934239533\Tests_704519562\assembly\dl3\8b33b4af\b08bb4f5_961fd001\SDE.ImageTools.dll</FullName>
      <ModuleName>SDE.ImageTools</ModuleName>

    <Module hash="76-FF-A4-ED-FA-92-BC-E6-06-AE-5A-90-93-5B-FA-D9-C2-FD-65-5B">
      <FullName>C:\Users\Simon\Documents\SD\SDE\Source\GifComponents\ImageTools.UnitTests\bin\Debug\SDE.ImageTools.dll</FullName>
      <ModuleName>SDE.ImageTools</ModuleName>

And likewise, two entries for my unit test project:

    <Module hash="CA-6E-3D-B2-A4-36-D2-3A-46-B1-51-70-73-16-32-C7-F1-04-55-CE">
      <FullName>C:\Users\Simon\AppData\Local\Temp unit20\ShadowCopyCache\7328_635550354934239533\Tests_704519562\assembly\dl3\53ae0dc4\754fcff6_961fd001\SDE.ImageTools.UnitTests.dll</FullName>
      <ModuleName>SDE.ImageTools.UnitTests</ModuleName>

    <Module hash="CA-6E-3D-B2-A4-36-D2-3A-46-B1-51-70-73-16-32-C7-F1-04-55-CE">
      <FullName>C:\Users\Simon\Documents\SD\SDE\Source\GifComponents\ImageTools.UnitTests\bin\Debug\SDE.ImageTools.UnitTests.dll</FullName>
      <ModuleName>SDE.ImageTools.UnitTests</ModuleName>

So in each case, it seems to be recording the dll file twice, once in the project output folder, and once in a shadow copy location.

I tried reproducing this problem with a new solution containing a business logic project with only one class and a unit test project with just one test, however I don't get the same error with that solution. Looking at the coverage.xml file for that solution, there's only one entry for each project:

    <Module hash="DB-39-9C-F6-A3-71-13-06-D8-CD-5D-1E-F7-AE-0D-62-B5-E0-CD-17">
      <FullName>C:\Users\Simon\AppData\Local\Temp unit20\ShadowCopyCache\8384_635549652165979974\Tests_634242734\assembly\dl3\b40ad16d\86b93173_f31ed001\TestProject.dll</FullName>
      <ModuleName>TestProject</ModuleName>

    <Module hash="9C-DE-AB-80-F7-9F-73-11-C5-52-97-FD-E8-D2-57-21-FE-7F-85-BC">
      <FullName>C:\Users\Simon\AppData\Local\Temp unit20\ShadowCopyCache\8384_635549652165979974\Tests_634242734\assembly\dl3\7de45542\9420162f_f31ed001\ProjectOne.dll</FullName>
      <ModuleName>ProjectOne</ModuleName>

And both point to the shadow copy location, not to the project's output folder. So what could be causing OpenCover to create the extra entry in this file, pointing to the project's output folder?

Error appears with a simple Label and TextBox

$
0
0

Error appears with a simple Label and TextBox. 

Thanks,

John

 

Here is the XML code:

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 

xmlns:sys="clr-namespace:System;assembly=mscorlib" 

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

<StackPanel Orientation="Horizontal">

<Label>Name:</Label>

<TextBox Width="90" />

</StackPanel>

</Page>

 

Here is the error I see:

Sharp

Develop Version : 5.1.0.4936-Beta-3ea20cfa

.NET Version         : 4.5.53349

OS Version           : Microsoft Windows NT 6.3.9600.0

Current culture      : Invariant Language (Invariant Country) ()

Current UI language  : en

Running under WOW6432, processor architecture: x86-64

Working Set Memory   : 178520kb

GC Heap Memory       : 25217kb

 

Unhandled exception terminated the workbench

Exception thrown:

System.ArgumentNullException: Value cannot be null.

Parameter name: path1

   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

   at System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(String name, CultureInfo culture, Version version, Boolean throwOnFileNotFound, StackCrawlMark& stackMark)

   at System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(CultureInfo lookForCulture, StackCrawlMark& stackMark)

   at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)

   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)

   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)

   at System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream)

   at System.Resources.ResourceManager.GetStream(String name, CultureInfo culture)

   at System.Windows.SystemResources.ResourceDictionaries.LoadDictionary(Assembly assembly, String assemblyName, String resourceName, Boolean isTraceEnabled)

   at System.Windows.SystemResources.ResourceDictionaries.LoadGenericDictionary(Boolean isTraceEnabled)

   at System.Windows.SystemResources.FindDictionaryResource(Object key, Type typeKey, ResourceKey resourceKey, Boolean isTraceEnabled, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache)

   at System.Windows.SystemResources.FindResourceInternal(Object key, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference)

   at System.Windows.StyleHelper.GetThemeStyle(FrameworkElement fe, FrameworkContentElement fce)

   at System.Windows.FrameworkElement.UpdateThemeStyleProperty()

   at System.Windows.FrameworkElement.OnInitialized(EventArgs e)

   at System.Windows.FrameworkElement.TryFireInitialized()

   at System.Windows.FrameworkElement.OnVisualParentChanged(DependencyObject oldParent)

   at System.Windows.Media.Visual.FireOnVisualParentChanged(DependencyObject oldParent)

   at System.Windows.Media.Visual.AddVisualChild(Visual child)

   at System.Windows.FrameworkElement.set_TemplateChild(UIElement value)

   at System.Windows.Controls.ContentPresenter.UseContentTemplate.BuildVisualTree(FrameworkElement container)

   at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)

   at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)

   at System.Windows.FrameworkElement.ApplyTemplate()

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)

   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at System.Windows.ContextLayoutManager.UpdateLayout()

   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)

   at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()

   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()

   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)

   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)

   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

   at System.Windows.Threading.DispatcherOperation.InvokeImpl()

   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(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.Windows.Threading.DispatcherOperation.Invoke()

   at System.Windows.Threading.Dispatcher.ProcessQueue()

   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)

   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)

   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)

   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)

   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)

   at System.Windows.Threading.Dispatcher.Run()

   at System.Windows.Application.RunDispatcher(Object ignore)

   at System.Windows.Application.RunInternal(Window window)

   at System.Windows.Application.Run(Window window)

   at ICSharpCode.SharpDevelop.Workbench.WorkbenchStartup.Run(IList`1 fileList)

   at ICSharpCode.SharpDevelop.Sda.CallHelper.RunWorkbenchInternal(Object settings)

 

---- Recent log messages:

20:49:51.322 [1] DEBUG - ActiveContentChanged to ICSharpCode.SharpDevelop.Gui.ErrorListPad

20:49:51.963 [1] DEBUG - ActiveContentChanged to ICSharpCode.SharpDevelop.Gui.TaskListPad

20:49:52.835 [1] DEBUG - ActiveContentChanged to ICSharpCode.WpfDesign.AddIn.WpfViewContent

20:49:53.236 [1] DEBUG - ActiveContentChanged to ICSharpCode.SharpDevelop.Gui.TaskListPad

20:49:53.356 [1] DEBUG - ActiveContentChanged to ICSharpCode.WpfDesign.AddIn.WpfViewContent

20:49:53.966 [1] DEBUG - ActiveContentChanged to ICSharpCode.SharpDevelop.Gui.TaskListPad

20:49:54.101 [1] DEBUG - ActiveContentChanged to ICSharpCode.WpfDesign.AddIn.WpfViewContent

20:49:54.769 [1] DEBUG - ActiveContentChanged to ICSharpCode.SharpDevelop.Gui.TaskListPad

20:49:54.869 [1] DEBUG - ActiveContentChanged to ICSharpCode.WpfDesign.AddIn.WpfViewContent

20:58:31.250 [1] DEBUG - NavigationService

ActiveViewContent: Page1.xaml

         Subview: ${res:FormsDesigner.DesignTabPages.SourceTabPage}

20:58:31.251 [1] DEBUG - ActiveViewContentChanged to [AvalonEditViewContent 9742\Page1.xaml]

20:58:31.254 [1] DEBUG - ActiveContentChanged to [AvalonEditViewContent 9742\Page1.xaml]

20:58:32.587 [1] DEBUG - Resolved (Line 11, Col 8) to [ErrorResolveResult ?]

20:58:32.587 [1] DEBUG - ParseInformationUpdated 9742\Page1.xaml (updated)

20:58:36.999 [1] DEBUG - NavigationService

ActiveViewContent: Page1.xaml

         Subview: ${res:FormsDesigner.DesignTabPages.DesignTabPage}

20:58:36.999 [1] DEBUG - ActiveViewContentChanged to ICSharpCode.WpfDesign.AddIn.WpfViewContent

20:58:37.019 [1] ERROR - Error in loading app.xaml

--> Exception:

System.NullReferenceException: Object reference not set to an instance of an object.

   at ICSharpCode.WpfDesign.AddIn.WpfViewContent.LoadInternal(OpenedFile file, Stream stream)

20:58:37.019 [1] DEBUG - ActiveContentChanged to ICSharpCode.WpfDesign.AddIn.WpfViewContent

21:04:10.781 [1] DEBUG - ActiveContentChanged to 

21:04:10.785 [1] INFO - Unloading services...

21:04:10.834 [1] DEBUG - Service shutdown: ICSharpCode.SharpDevelop.Workbench.IOutputPad

21:04:10.834 [1] DEBUG - Service shutdown: ICSharpCode.SharpDevelop.Debugging.IDebuggerService

21:04:10.834 [1] DEBUG - Service shutdown: ICSharpCode.Core.IAnalyticsMonitor

21:04:10.888 [1] INFO - Finished running workbench.

21:04:10.888 [1] FATAL - System.ArgumentNullException: Value cannot be null.

Parameter name: path1

   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

   at System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(String name, CultureInfo culture, Version version, Boolean throwOnFileNotFound, StackCrawlMark& stackMark)

   at System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(CultureInfo lookForCulture, StackCrawlMark& stackMark)

   at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)

   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)

   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)

   at System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream)

   at System.Resources.ResourceManager.GetStream(String name, CultureInfo culture)

   at System.Windows.SystemResources.ResourceDictionaries.LoadDictionary(Assembly assembly, String assemblyName, String resourceName, Boolean isTraceEnabled)

   at System.Windows.SystemResources.ResourceDictionaries.LoadGenericDictionary(Boolean isTraceEnabled)

   at System.Windows.SystemResources.FindDictionaryResource(Object key, Type typeKey, ResourceKey resourceKey, Boolean isTraceEnabled, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache)

   at System.Windows.SystemResources.FindResourceInternal(Object key, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference)

   at System.Windows.StyleHelper.GetThemeStyle(FrameworkElement fe, FrameworkContentElement fce)

   at System.Windows.FrameworkElement.UpdateThemeStyleProperty()

   at System.Windows.FrameworkElement.OnInitialized(EventArgs e)

   at System.Windows.FrameworkElement.TryFireInitialized()

   at System.Windows.FrameworkElement.OnVisualParentChanged(DependencyObject oldParent)

   at System.Windows.Media.Visual.FireOnVisualParentChanged(DependencyObject oldParent)

   at System.Windows.Media.Visual.AddVisualChild(Visual child)

   at System.Windows.FrameworkElement.set_TemplateChild(UIElement value)

   at System.Windows.Controls.ContentPresenter.UseContentTemplate.BuildVisualTree(FrameworkElement container)

   at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)

   at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)

   at System.Windows.FrameworkElement.ApplyTemplate()

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)

   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at System.Windows.ContextLayoutManager.UpdateLayout()

   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)

   at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()

   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()

   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)

   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)

   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

   at System.Windows.Threading.DispatcherOperation.InvokeImpl()

   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(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.Windows.Threading.DispatcherOperation.Invoke()

   at System.Windows.Threading.Dispatcher.ProcessQueue()

   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)

   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)

   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)

   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)

   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)

   at System.Windows.Threading.Dispatcher.Run()

   at System.Windows.Application.RunDispatcher(Object ignore)

   at System.Windows.Application.RunInternal(Window window)

   at System.Windows.Application.Run(Window window)

   at ICSharpCode.SharpDevelop.Workbench.WorkbenchStartup.Run(IList`1 fileList)

   at ICSharpCode.SharpDevelop.Sda.CallHelper.RunWorkbenchInternal(Object settings)

 

---- Post-error application state information:

Installed 3rd party AddIns: 

ProjectService.CurrentSolution: <null>

ProjectService.CurrentProject: <null>

Workbench.ActiveContent: <null>

Build Server

Adding Service Reference under Windows 8.1 throws Exception

$
0
0

Hy,

 

I am using the new SharpDevelop Release 5.1.0 Build 4936.
I created a new solution with Console Window and then wanted to add a new Service Reference (SOAP / WSDL Service) with "Project" -> "Add Service Reference".

I tried several URLs but whatever WSDL I use I always get an exception that a file cannot be found.
For example the URL https://webservice.exacttarget.com/etframework.wsdl.
I add it under _Adress and press Go.
The service is found and it shows me the available operations and the namespace.
But as soon as I press OK I get an exception that a given file cannot be found and nothing is added.

So how can I add a WSDL Service?

Note:
As I am using Windows 8.1 I was not able to install the Windows SDK 7.1 which is noted under additional ressources.
So I installed the Windows SDK 8.1 manually. But this could also not be related to this problem.

 

SharpDevelop Version : 5.1.0.4936-Beta-3ea20cfa
.NET Version         : 4.5.51650
OS Version           : Microsoft Windows NT 6.3.9600.0
Current culture      : German (Austria) (de-AT)
Current UI language  : en
Running under WOW6432, processor architecture: x86-64
Working Set Memory   : 195204kb
GC Heap Memory       : 28003kb

Unhandled WPF exception
Exception thrown:
System.ComponentModel.Win32Exception (0x80004005): Das System kann die angegebene Datei nicht finden
   at ICSharpCode.SharpDevelop.ProcessRunner.CreateProcess(String lpApplicationName, StringBuilder lpCommandLine, IntPtr lpProcessAttributes, IntPtr lpThreadAttributes, Boolean bInheritHandles, UInt32 dwCreationFlags, String lpEnvironment, String lpCurrentDirectory, STARTUPINFO& lpStartupInfo, PROCESS_INFORMATION& lpProcessInformation)
   at ICSharpCode.SharpDevelop.ProcessRunner.DoStart(String commandLine)
   at ICSharpCode.SharpDevelop.ProcessRunner.StartCommandLine(String commandLine)
   at ICSharpCode.SharpDevelop.ProcessRunner.Start(String program, String[ arguments)
   at ICSharpCode.SharpDevelop.ProcessRunner.<RunInOutputPadAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at ICSharpCode.SharpDevelop.Gui.Dialogs.ReferenceDialog.ServiceReference.SvcUtilRunner.<Run>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__4(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

---- Recent log messages:
14:57:27.948 [1] DEBUG - Trying to restore memento of '[AvalonEditViewContent C:\Users\ThomasW.VOXTRONIC\Documents\SharpDevelop Projects\WSDLTest\WSDLTest\Program.cs]' from key '1e13ec5:C:\USERS\THOMASW.VOXTRONIC\DOCUMENTS\SHARPDEVELOP PROJECTS\WSDLTEST\WSDLTEST\PROGRAM.CS'
14:57:27.960 [1] DEBUG - ActiveContentChanged to ICSharpCode.SharpDevelop.Project.ProjectBrowserPad
14:57:27.960 [1] DEBUG - ActiveWorkbenchWindowChanged to [AvalonWorkbenchWindow: Program.cs]
14:57:27.960 [1] INFO - CurrentProject changed to WSDLTest
14:57:27.960 [1] DEBUG - NavigationService
 ActiveViewContent: Program.cs
           Subview: ${res:FormsDesigner.DesignTabPages.SourceTabPage}
14:57:27.960 [1] DEBUG - ActiveViewContentChanged to [AvalonEditViewContent C:\Users\ThomasW.VOXTRONIC\Documents\SharpDevelop Projects\WSDLTest\WSDLTest\Program.cs]
14:57:27.983 [1] DEBUG - NavigationService -- suspend logging
14:57:27.983 [1] DEBUG - NavigationService -- resume logging
14:57:27.983 [1] DEBUG - NavigationService -- suspend logging
14:57:27.983 [1] DEBUG - NavigationService -- resume logging
14:57:28.016 [LoadSolutionProjects] DEBUG - WSDLTest: ParseFiles() finished. 0 files were re-used from CC cache; 2 files were parsed (2 of those are serializable)
14:57:28.046 [LoadSolutionProjects] DEBUG - LoadSolutionProjectsThread finished after 00:00:00.1494585
14:57:28.112 [39] DEBUG - Git: OverlayIconManager Thread finished
14:57:28.225 [22] DEBUG - Serializing to C:\Users\ThomasW.VOXTRONIC\AppData\Local\Temp\SharpDevelop5.1\mscorlib.42f64ccc.dat
14:57:28.226 [1] DEBUG - ParseInformationUpdated C:\Users\ThomasW.VOXTRONIC\Documents\SharpDevelop Projects\NAV_UIDCheck\WSDLTest\Program.cs (new)
14:57:28.226 [1] DEBUG - ParseInformationUpdated C:\Users\ThomasW.VOXTRONIC\Documents\SharpDevelop Projects\NAV_UIDCheck\WSDLTest\Program.cs (updated)
14:57:28.258 [1] DEBUG - Update Foldings
14:57:28.286 [1] DEBUG - Update Foldings
14:57:28.719 [39] DEBUG - Resolved (Line 1, Col 1) to
14:57:28.719 [43] DEBUG - Resolved (Line 1, Col 1) to
14:57:30.167 [1] INFO - Initialize DirectoryNode C:\Users\ThomasW.VOXTRONIC\Documents\SharpDevelop Projects\WSDLTest\WSDLTest
14:57:30.168 [44] DEBUG - Git: OverlayIconManager Thread started
14:57:30.270 [44] DEBUG - Git: OverlayIconManager Thread finished
14:59:24.767 [1] DEBUG - ActiveContentChanged to ICSharpCode.SharpDevelop.Gui.CompilerMessageView
14:59:24.789 [1] ERROR - Unhandled WPF exception
--> Exception:
System.ComponentModel.Win32Exception (0x80004005): Das System kann die angegebene Datei nicht finden
   at ICSharpCode.SharpDevelop.ProcessRunner.CreateProcess(String lpApplicationName, StringBuilder lpCommandLine, IntPtr lpProcessAttributes, IntPtr lpThreadAttributes, Boolean bInheritHandles, UInt32 dwCreationFlags, String lpEnvironment, String lpCurrentDirectory, STARTUPINFO& lpStartupInfo, PROCESS_INFORMATION& lpProcessInformation)
   at ICSharpCode.SharpDevelop.ProcessRunner.DoStart(String commandLine)
   at ICSharpCode.SharpDevelop.ProcessRunner.StartCommandLine(String commandLine)
   at ICSharpCode.SharpDevelop.ProcessRunner.Start(String program, String[ arguments)
   at ICSharpCode.SharpDevelop.ProcessRunner.<RunInOutputPadAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at ICSharpCode.SharpDevelop.Gui.Dialogs.ReferenceDialog.ServiceReference.SvcUtilRunner.<Run>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__4(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

---- Post-error application state information:
Installed 3rd party AddIns:
ProjectService.CurrentSolution: [Solution C:\Users\ThomasW.VOXTRONIC\Documents\SharpDevelop Projects\WSDLTest\WSDLTest.sln with 1 projects]
ProjectService.CurrentProject: [CSharpProject: WSDLTest]
Workbench.ActiveContent: ICSharpCode.SharpDevelop.Gui.CompilerMessageView

error report when dll reference adding. it makes design mode disabled

$
0
0

i try to add dll reference, but sharpdevelop show error dialog.

it works well vs2012. so i report it.

 

this error appeared sharpdevlop version 5.0 and 5.1 beta. didn't test on 4.x

-----

 

SharpDevelop Version : 5.1.0.4936-Beta-3ea20cfa

.NET Version         : 4.5.50938

OS Version           : Microsoft Windows NT 6.1.7601 Service Pack 1

Current culture      : Korean (Korea) (ko-KR)

Current UI language  : pt-br

Working Set Memory   : 98408kb

GC Heap Memory       : 13459kb

 

Error on LoadSolutionProjects thread

Exception thrown:

System.AggregateException: 하나 이상의 오류가 발생했습니다. ---> System.NotSupportedException: 지정한 메서드가 지원되지 않습니다.

   위치: Mono.Cecil.MetadataReader.ReadProperty(UInt32 property_rid, Collection`1 properties)

   위치: Mono.Cecil.MetadataReader.ReadProperties(TypeDefinition type)

   위치: Mono.Cecil.TypeDefinition.<get_Properties>b__14(TypeDefinition type, MetadataReader reader)

   위치: Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)

   위치: Mono.Cecil.TypeDefinition.get_Properties()

   위치: Mono.Cecil.MetadataReader.GetProperty(TypeDefinition type, MetadataToken token)

   위치: Mono.Cecil.MetadataReader.ReadMethodSemantics(MethodDefinition method)

   위치: Mono.Cecil.MetadataReader.ReadAllSemantics(TypeDefinition type)

   위치: Mono.Cecil.MetadataReader.ReadAllSemantics(MethodDefinition method)

   위치: Mono.Cecil.MethodDefinition.<ReadSemantics>b__0(MethodDefinition method, MetadataReader reader)

   위치: Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)

   위치: Mono.Cecil.MethodDefinition.ReadSemantics()

   위치: Mono.Cecil.MethodDefinition.get_SemanticsAttributes()

   위치: ICSharpCode.NRefactory.TypeSystem.CecilLoader.InitMembers(TypeDefinition typeDefinition, IUnresolvedTypeDefinition td, IList`1 members)

   위치: ICSharpCode.NRefactory.TypeSystem.CecilLoader.InitTypeDefinition(TypeDefinition typeDefinition, DefaultUnresolvedTypeDefinition td)

   위치: ICSharpCode.NRefactory.TypeSystem.CecilLoader.LoadModule(ModuleDefinition moduleDefinition)

   위치: ICSharpCode.SharpDevelop.Parser.AssemblyParserService.LoadAssembly(FileName fileName, CancellationToken cancellationToken, Boolean includeInternalMembers)

   위치: ICSharpCode.SharpDevelop.Parser.AssemblyParserService.GetLoadedAssembly(FileName fileName, Boolean includeInternalMembers)

   위치: ICSharpCode.SharpDevelop.Parser.AssemblyParserService.GetAssembly(FileName fileName, Boolean includeInternalMembers, CancellationToken cancellationToken)

   위치: ICSharpCode.SharpDevelop.Parser.ProjectContentContainer.DoResolveReferences(IProgressMonitor progressMonitor)

   위치: ICSharpCode.SharpDevelop.Parser.ProjectContentContainer.<>c__DisplayClass13.<Initialize>b__11()

   위치: System.Threading.Tasks.Task.InnerInvoke()

   위치: System.Threading.Tasks.Task.Execute()

   --- 내부 예외 스택 추적의 끝 ---

   위치: System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)

   위치: System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)

   위치: System.Threading.Tasks.Task.Wait()

   위치: ICSharpCode.SharpDevelop.Parser.ProjectContentContainer.Initialize(IProgressMonitor progressMonitor, List`1 filesToParse)

   위치: ICSharpCode.SharpDevelop.Parser.ProjectContentContainer.<>c__DisplayClass1.<.ctor>b__0(IProgressMonitor monitor)

   위치: ICSharpCode.SharpDevelop.Parser.LoadSolutionProjects.JobTask.Run(IProgressMonitor progressMonitor)

   위치: ICSharpCode.SharpDevelop.Parser.LoadSolutionProjects.JobQueue.RunThread()

---> (내부 예외 #0) System.NotSupportedException: 지정한 메서드가 지원되지 않습니다.

   위치: Mono.Cecil.MetadataReader.ReadProperty(UInt32 property_rid, Collection`1 properties)

   위치: Mono.Cecil.MetadataReader.ReadProperties(TypeDefinition type)

   위치: Mono.Cecil.TypeDefinition.<get_Properties>b__14(TypeDefinition type, MetadataReader reader)

   위치: Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)

   위치: Mono.Cecil.TypeDefinition.get_Properties()

   위치: Mono.Cecil.MetadataReader.GetProperty(TypeDefinition type, MetadataToken token)

   위치: Mono.Cecil.MetadataReader.ReadMethodSemantics(MethodDefinition method)

   위치: Mono.Cecil.MetadataReader.ReadAllSemantics(TypeDefinition type)

   위치: Mono.Cecil.MetadataReader.ReadAllSemantics(MethodDefinition method)

   위치: Mono.Cecil.MethodDefinition.<ReadSemantics>b__0(MethodDefinition method, MetadataReader reader)

   위치: Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)

   위치: Mono.Cecil.MethodDefinition.ReadSemantics()

   위치: Mono.Cecil.MethodDefinition.get_SemanticsAttributes()

   위치: ICSharpCode.NRefactory.TypeSystem.CecilLoader.InitMembers(TypeDefinition typeDefinition, IUnresolvedTypeDefinition td, IList`1 members)

   위치: ICSharpCode.NRefactory.TypeSystem.CecilLoader.InitTypeDefinition(TypeDefinition typeDefinition, DefaultUnresolvedTypeDefinition td)

   위치: ICSharpCode.NRefactory.TypeSystem.CecilLoader.LoadModule(ModuleDefinition moduleDefinition)

   위치: ICSharpCode.SharpDevelop.Parser.AssemblyParserService.LoadAssembly(FileName fileName, CancellationToken cancellationToken, Boolean includeInternalMembers)

   위치: ICSharpCode.SharpDevelop.Parser.AssemblyParserService.GetLoadedAssembly(FileName fileName, Boolean includeInternalMembers)

   위치: ICSharpCode.SharpDevelop.Parser.AssemblyParserService.GetAssembly(FileName fileName, Boolean includeInternalMembers, CancellationToken cancellationToken)

   위치: ICSharpCode.SharpDevelop.Parser.ProjectContentContainer.DoResolveReferences(IProgressMonitor progressMonitor)

   위치: ICSharpCode.SharpDevelop.Parser.ProjectContentContainer.<>c__DisplayClass13.<Initialize>b__11()

   위치: System.Threading.Tasks.Task.InnerInvoke()

   위치: System.Threading.Tasks.Task.Execute()<---

 

 

---- Recent log messages:

22:03:22.464 [1] DEBUG - ActiveViewContentChanged to ICSharpCode.SharpDevelop.Project.Converter.UpgradeViewContent

22:03:22.470 [1] DEBUG - Creating pad ICSharpCode.SharpDevelop.Gui.PropertyPad...

22:03:22.500 [1] DEBUG - Service startup: ICSharpCode.SharpDevelop.WinForms.IWinFormsMenuService

22:03:22.501 [1] DEBUG - PropertyPad created

22:03:22.503 [1] DEBUG - Creating pad ICSharpCode.SharpDevelop.Project.ProjectBrowserPad...

22:03:22.504 [1] DEBUG - Service startup: ICSharpCode.SharpDevelop.WinForms.IWinFormsToolbarService

22:03:22.508 [1] DEBUG - ProjectBrowser: Attempt to load solution [Solution R:\C#\MarsInterface.sln with 1 projects] before handle of ProjectBrowserControl.TreeView created

22:03:22.508 [1] DEBUG - -> Attaching event handler to ProjectBrowserControl.TreeView.HandleCreated

22:03:22.508 [1] DEBUG - Creating pad ICSharpCode.SharpDevelop.Gui.ErrorListPad...

22:03:22.533 [1] DEBUG - ProjectBrowser: Tree view handle created, will load [Solution R:\C#\MarsInterface.sln with 1 projects].

22:03:22.584 [1] DEBUG - ProjectBrowser: Loading solution [Solution R:\C#\MarsInterface.sln with 1 projects] into project tree view

22:03:22.615 [1] INFO - Loading addin F# Binding

22:03:22.625 [1] INFO - Loading addin WiX Binding

22:03:22.653 [1] DEBUG - NavigationService -- suspend logging

22:03:22.653 [1] DEBUG - NavigationService -- resume logging

22:03:22.693 [1] DEBUG - Service startup: ICSharpCode.UnitTesting.ITestService

22:03:22.736 [LoadSolutionProjects] DEBUG - Deserializing E:\WindowsTemp\SharpDevelop5.1\Test.bf237cc7.prj

22:03:22.761 [LoadSolutionProjects] DEBUG - Test: ParseFiles() finished. 12 files were re-used from CC cache; 0 files were parsed (0 of those are serializable)

22:03:22.787 [9] DEBUG - Git: OverlayIconManager Thread started

22:03:23.189 [9] DEBUG - Git: OverlayIconManager Thread finished

22:03:23.900 [1] DEBUG - ActiveViewContentChanged to 

22:03:23.900 [1] DEBUG - ActiveContentChanged to 

22:03:23.900 [1] DEBUG - ActiveWorkbenchWindowChanged to 

22:03:24.134 [LoadSolutionProjects] ERROR - Error on LoadSolutionProjects thread

--> Exception:

System.AggregateException: 하나 이상의 오류가 발생했습니다. ---> System.NotSupportedException: 지정한 메서드가 지원되지 않습니다.

   위치: Mono.Cecil.MetadataReader.ReadProperty(UInt32 property_rid, Collection`1 properties)

   위치: Mono.Cecil.MetadataReader.ReadProperties(TypeDefinition type)

   위치: Mono.Cecil.TypeDefinition.<get_Properties>b__14(TypeDefinition type, MetadataReader reader)

   위치: Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)

   위치: Mono.Cecil.TypeDefinition.get_Properties()

   위치: Mono.Cecil.MetadataReader.GetProperty(TypeDefinition type, MetadataToken token)

   위치: Mono.Cecil.MetadataReader.ReadMethodSemantics(MethodDefinition method)

   위치: Mono.Cecil.MetadataReader.ReadAllSemantics(TypeDefinition type)

   위치: Mono.Cecil.MetadataReader.ReadAllSemantics(MethodDefinition method)

   위치: Mono.Cecil.MethodDefinition.<ReadSemantics>b__0(MethodDefinition method, MetadataReader reader)

   위치: Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)

   위치: Mono.Cecil.MethodDefinition.ReadSemantics()

   위치: Mono.Cecil.MethodDefinition.get_SemanticsAttributes()

   위치: ICSharpCode.NRefactory.TypeSystem.CecilLoader.InitMembers(TypeDefinition typeDefinition, IUnresolvedTypeDefinition td, IList`1 members)

   위치: ICSharpCode.NRefactory.TypeSystem.CecilLoader.InitTypeDefinition(TypeDefinition typeDefinition, DefaultUnresolvedTypeDefinition td)

   위치: ICSharpCode.NRefactory.TypeSystem.CecilLoader.LoadModule(ModuleDefinition moduleDefinition)

   위치: ICSharpCode.SharpDevelop.Parser.AssemblyParserService.LoadAssembly(FileName fileName, CancellationToken cancellationToken, Boolean includeInternalMembers)

   위치: ICSharpCode.SharpDevelop.Parser.AssemblyParserService.GetLoadedAssembly(FileName fileName, Boolean includeInternalMembers)

   위치: ICSharpCode.SharpDevelop.Parser.AssemblyParserService.GetAssembly(FileName fileName, Boolean includeInternalMembers, CancellationToken cancellationToken)

   위치: ICSharpCode.SharpDevelop.Parser.ProjectContentContainer.DoResolveReferences(IProgressMonitor progressMonitor)

   위치: ICSharpCode.SharpDevelop.Parser.ProjectContentContainer.<>c__DisplayClass13.<Initialize>b__11()

   위치: System.Threading.Tasks.Task.InnerInvoke()

   위치: System.Threading.Tasks.Task.Execute()

   --- 내부 예외 스택 추적의 끝 ---

   위치: System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)

   위치: System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)

   위치: System.Threading.Tasks.Task.Wait()

   위치: ICSharpCode.SharpDevelop.Parser.ProjectContentContainer.Initialize(IProgressMonitor progressMonitor, List`1 filesToParse)

   위치: ICSharpCode.SharpDevelop.Parser.ProjectContentContainer.<>c__DisplayClass1.<.ctor>b__0(IProgressMonitor monitor)

   위치: ICSharpCode.SharpDevelop.Parser.LoadSolutionProjects.JobTask.Run(IProgressMonitor progressMonitor)

   위치: ICSharpCode.SharpDevelop.Parser.LoadSolutionProjects.JobQueue.RunThread()

---> (내부 예외 #0) System.NotSupportedException: 지정한 메서드가 지원되지 않습니다.

   위치: Mono.Cecil.MetadataReader.ReadProperty(UInt32 property_rid, Collection`1 properties)

   위치: Mono.Cecil.MetadataReader.ReadProperties(TypeDefinition type)

   위치: Mono.Cecil.TypeDefinition.<get_Properties>b__14(TypeDefinition type, MetadataReader reader)

   위치: Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)

   위치: Mono.Cecil.TypeDefinition.get_Properties()

   위치: Mono.Cecil.MetadataReader.GetProperty(TypeDefinition type, MetadataToken token)

   위치: Mono.Cecil.MetadataReader.ReadMethodSemantics(MethodDefinition method)

   위치: Mono.Cecil.MetadataReader.ReadAllSemantics(TypeDefinition type)

   위치: Mono.Cecil.MetadataReader.ReadAllSemantics(MethodDefinition method)

   위치: Mono.Cecil.MethodDefinition.<ReadSemantics>b__0(MethodDefinition method, MetadataReader reader)

   위치: Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)

   위치: Mono.Cecil.MethodDefinition.ReadSemantics()

   위치: Mono.Cecil.MethodDefinition.get_SemanticsAttributes()

   위치: ICSharpCode.NRefactory.TypeSystem.CecilLoader.InitMembers(TypeDefinition typeDefinition, IUnresolvedTypeDefinition td, IList`1 members)

   위치: ICSharpCode.NRefactory.TypeSystem.CecilLoader.InitTypeDefinition(TypeDefinition typeDefinition, DefaultUnresolvedTypeDefinition td)

   위치: ICSharpCode.NRefactory.TypeSystem.CecilLoader.LoadModule(ModuleDefinition moduleDefinition)

   위치: ICSharpCode.SharpDevelop.Parser.AssemblyParserService.LoadAssembly(FileName fileName, CancellationToken cancellationToken, Boolean includeInternalMembers)

   위치: ICSharpCode.SharpDevelop.Parser.AssemblyParserService.GetLoadedAssembly(FileName fileName, Boolean includeInternalMembers)

   위치: ICSharpCode.SharpDevelop.Parser.AssemblyParserService.GetAssembly(FileName fileName, Boolean includeInternalMembers, CancellationToken cancellationToken)

   위치: ICSharpCode.SharpDevelop.Parser.ProjectContentContainer.DoResolveReferences(IProgressMonitor progressMonitor)

   위치: ICSharpCode.SharpDevelop.Parser.ProjectContentContainer.<>c__DisplayClass13.<Initialize>b__11()

   위치: System.Threading.Tasks.Task.InnerInvoke()

   위치: System.Threading.Tasks.Task.Execute()<---

 

22:03:24.140 [LoadSolutionProjects] WARN - Stack trace of last exception log:

   위치: System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)

   위치: System.Environment.get_StackTrace()

   위치: ICSharpCode.SharpDevelop.Logging.SDMessageService.ShowException(Exception ex, String message)

   위치: ICSharpCode.SharpDevelop.Parser.LoadSolutionProjects.JobQueue.RunThread()

   위치: System.Threading.ThreadHelper.ThreadStart_Context(Object state)

   위치: System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

   위치: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

   위치: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

   위치: System.Threading.ThreadHelper.ThreadStart()

 

---- Post-error application state information:

Installed 3rd party AddIns: 

ProjectService.CurrentSolution: [Solution R:\C#\MarsInterface.sln with 1 projects]

ProjectService.CurrentProject: <null>

Workbench.ActiveContent: System.InvalidOperationException: 다른 스레드가 이 개체를 소유하고 있어 호출한 스레드가 해당 개체에 액세스할 수 없습니다.

   위치: System.Windows.Threading.Dispatcher.VerifyAccess()

   위치: ICSharpCode.SharpDevelop.DispatcherMessageLoop.VerifyAccess()

   위치: ICSharpCode.SharpDevelop.Workbench.WpfWorkbench.get_ActiveContent()

   위치: ICSharpCode.SharpDevelop.Workbench.WorkbenchStartup.<InitializeWorkbench>b__0()

   위치: ICSharpCode.Core.ApplicationStateInfoService.GetCurrentApplicationStateInfo()

IndexOutOfRangeException

$
0
0

Hello,

I have a problem while decompiling the XNA Game Speedrunners.

 

It opened the .exe with ILSpy, it appears in the assembly list, but the Code it self is just an exeption:System.ArgumentException: Ein Element mit dem gleichen Schlüssel wurde bereits hinzugefügt.
   bei System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   bei Mono.Cecil.MetadataReader.AddNestedMapping(UInt32 declaring, UInt32 nested)
   bei Mono.Cecil.MetadataReader.InitializeNestedTypes()
   bei Mono.Cecil.MetadataReader.InitializeTypeDefinitions()
   bei Mono.Cecil.MetadataReader.GetMethodDefinition(UInt32 rid)
   bei Mono.Cecil.MetadataReader.ReadEntryPoint()
   bei Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TRet& variable, TItem item, Func`3 read)
   bei Mono.Cecil.ModuleDefinition.get_EntryPoint()
   bei ICSharpCode.ILSpy.CSharpLanguage.DecompileAssembly(LoadedAssembly assembly, ITextOutput output, DecompilationOptions options)
   bei ICSharpCode.ILSpy.TreeNodes.AssemblyTreeNode.Decompile(Language language, ITextOutput output, DecompilationOptions options)
   bei ICSharpCode.ILSpy.TextView.DecompilerTextView.DecompileNodes(DecompilationContext context, ITextOutput textOutput)
   bei ICSharpCode.ILSpy.TextView.DecompilerTextView.<>c__DisplayClass16.<DecompileAsync>b__15()

That only appears right after I opened it. When selecting another file and going back to Speedrunners I get this


System.IndexOutOfRangeException: Der Index war außerhalb des Arraybereichs.
   bei Mono.Cecil.PE.ByteBuffer.ReadByte()
   bei Mono.Cecil.SignatureReader..ctor(UInt32 blob, MetadataReader reader)
   bei Mono.Cecil.MetadataReader.ReadMethod(UInt32 method_rid, Collection`1 methods)
   bei Mono.Cecil.MetadataReader.ReadMethods(TypeDefinition type)
   bei Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TRet& variable, TItem item, Func`3 read)
   bei Mono.Cecil.MetadataReader.LookupMethod(UInt32 rid)
   bei Mono.Cecil.MetadataReader.ReadEntryPoint()
   bei Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TRet& variable, TItem item, Func`3 read)
   bei Mono.Cecil.ModuleDefinition.get_EntryPoint()
   bei ICSharpCode.ILSpy.CSharpLanguage.DecompileAssembly(LoadedAssembly assembly, ITextOutput output, DecompilationOptions options)
   bei ICSharpCode.ILSpy.TreeNodes.AssemblyTreeNode.Decompile(Language language, ITextOutput output, DecompilationOptions options)
   bei ICSharpCode.ILSpy.TextView.DecompilerTextView.DecompileNodes(DecompilationContext context, ITextOutput textOutput)
   bei ICSharpCode.ILSpy.TextView.DecompilerTextView.<>c__DisplayClass16.<DecompileAsync>b__15()


I don't know why, decompiling Terrarria for example works perfectly fine. I just want to take a look at the source code of this game.
Can you help me with this or is this like unfixable?

Timbo


ScrollViewer Not Scrolling To Bottom Using Avalonedit

$
0
0

I've created a user control which uses the avalonedit control. The XAML for the user control is:

<UserControl x:Class="CodeNote.UserControl1"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:avalonedit="http://icsharpcode.net/sharpdevelop/avalonedit"        
             xmlns:editing="clr-namespace:ICSharpCode.AvalonEdit.Editing">

    <UserControl.Resources>
        <ControlTemplate x:Key="TextBoxBaseControlTemplate1" TargetType="{x:Type TextBoxBase}">
            <Border Background="{TemplateBinding Background}"
                x:Name="Bd" BorderBrush="#D1D1E8"
                BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="10, 10, 0, 0">
                <ScrollViewer x:Name="PART_ContentHost"/>
            </Border>
            <ControlTemplate.Triggers>
                <Trigger Property="IsEnabled" Value="False">
                    <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" TargetName="Bd"/>
                    <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                </Trigger>
                <Trigger Property="Width" Value="Auto">
                    <Setter Property="MinWidth" Value="100"/>
                </Trigger>
                <Trigger Property="Height" Value="Auto">
                    <Setter Property="MinHeight" Value="20"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>


    </UserControl.Resources>

 

 

 

The main window contains the following StackPanel within a ScrollViewer within a Grid

<Window x:Class="CodeNote.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:avalonedit="http://icsharpcode.net/sharpdevelop/avalonedit"        
        xmlns:editing="clr-namespace:ICSharpCode.AvalonEdit.Editing"
        x:Name="mainWin"
        Title="MainWindow" Height="350" Width="525">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <ScrollViewer VerticalScrollBarVisibility="Visible" CanContentScroll="False">

            <StackPanel Grid.Row="0" Margin="10,10,10,0" VerticalAlignment="Top"  x:Name="container">



            </StackPanel>

        </ScrollViewer>

    </Grid>


</Window>

 

 

The user should be able to programmatically add the usercontrol to the main window, which is accomplished in the main window code behind with:

UserControl1 uc1 = new UserControl1();

container.Children.Add(uc1);

My problem is that the scrollviewer does not scroll to the bottom when the avalonedit control's contents becomes too vertically large for the window. The insertion point simply disappears off the bottom of the visible window and the scroll position stays at the top.

I notice that the scroll works correctly if I add a regular textbox instead of a avalonedit control.

How can I rectify this (I am very new to WPF)

Please note that the program needs to be able to add multiple text input controls to this scroll viewer, e.g avalonedit followed by a text box followed by another textbox followed by another avalonedit. Therefore, I can't just use the scrollviewer's ScrollToBottom method because the control being edited might not be the last control in the scrollviewer.

I simply need the insertion point to remain onscreen and the window to scroll accordingly.

Does anyone have any ideas on how to achieve this. Thanks

Not able to open Zip files through cSharp which are created through java.util.zip

$
0
0

Hello Team,

 

We have simple java class which creates zip file, and we are able to open zip through windows unzip, 7-Zip etc... it just works fine. Also when we try using CSHARP we are getting

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

/* 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:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";}

2014-12-08 12:26:51,152 WCProfilerService.BulkDownloadsScheduler:0 [9496] INFO  - Writing to log : Downloaded Confirms G07492038_20140916.zip as User 7690000030

2014-12-08 12:26:51,160 WCProfilerService.ZipUtil:0 [9496] DEBUG - G07492038_20140916/1.pdf

2014-12-08 12:26:51,165 WCProfilerService.BulkDownloadsScheduler:0 [9496] INFO  - Writing to log : Failed to Download: Wrong Local header signature: 0xA4ECFC79 Confirms G07492038_20140916.zip as User 7690000030

2014-12-08 12:26:51,165 WCProfilerService.BulkDownloadsScheduler:0 [9496] ERROR - Error in Downloading G07492038_20140916.zip

Exception: ICSharpCode.SharpZipLib.ZipException

Message: Wrong Local header signature: 0xA4ECFC79

Source: ICSharpCode.SharpZipLib

   at ICSharpCode.SharpZipLib.Zip.ZipInputStream.GetNextEntry()

   at WCProfilerService.ZipUtil.UnzipAllFiles(String zipFile, String destinationFolder)

   at WCProfilerService.DownloadJob.UnzipContents(String path)

   at WCProfilerService.BulkDownloadsScheduler.DownloadNextJob(Profile profile)

Here is the sample java code

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;



public class AppZip {

    List<String> fileList;
    private static final String OUTPUT_ZIP_FILE = "TESTRunFile.zip";
    private static final String SOURCE_FOLDER = "C:/dev/BULK/G06197088_20141030";
 
    AppZip(){
    fileList = new ArrayList<String>();
    }
 
    public static void main( String[ args )
    {
        AppZip appZip = new AppZip();
        appZip.generateFileList(new File(SOURCE_FOLDER));
        appZip.zipIt(OUTPUT_ZIP_FILE);
    }
 
    /**
     * Zip it
     * @param zipFile output ZIP file location
     */
    public void zipIt(String zipFile){
 
     byte[ buffer = new byte[1024];
 
     try{
 
        FileOutputStream fos = new FileOutputStream(zipFile);
        ZipOutputStream zos = new ZipOutputStream(fos);
 
 
        System.out.println("Output to Zip : " + zipFile);
       
        final byte[ newLine = System.getProperty("line.separator").getBytes("UTF-8");
       
        for(String file : this.fileList){
 
            System.out.println("File Added : " + file);
            ZipEntry ze= new ZipEntry(file);
             
            //ze.setCrc(ZipOutputStream12.LOCSIG);
            zos.putNextEntry(ze);
 
            FileInputStream in =
                       new FileInputStream(file);
            BufferedReader bufRed = new BufferedReader(new FileReader(file));
 
            int len;
            String line;
            while ((line = bufRed.readLine()) != null) {
                final byte[ buff = line.getBytes("UTF-8");
                zos.write(buff, 0, buff.length);
                //zos.write(newLine, 0, newLine.length);
            }
 
            in.close();
        }
 
        zos.closeEntry();
        //remember close it
        zos.close();
 
        System.out.println("Done");
    }catch(IOException ex){
       ex.printStackTrace();  
    }
   }
 
    /**
     * Traverse a directory and get all files,
     * and add the file into fileList 
     * @param node file or directory
     */
    public void generateFileList(File node){
 
        //add file only
    if(node.isFile()){
        fileList.add(generateZipEntry(node.getAbsoluteFile().toString()));
    }
 
    if(node.isDirectory()){
        String[ subNote = node.list();
        for(String filename : subNote){
            generateFileList(new File(node, filename));
        }
    }
 
    }
 
    /**
     * Format the file path for zip
     * @param file file path
     * @return Formatted file path
     */
    private String generateZipEntry(String file){
        return file.substring(SOURCE_FOLDER.length()+1, file.length());
    }
}

 

 

Designer de formulário não aparece em visual basic

$
0
0

Não consigo visualiza a aba designer de formulário em visual basic, aparece apenas o código,  porém em c# ela aparece normalmente, como faço para resolver esse problema?

 

float property of custom user control are not handled correctly if negative

$
0
0

I have an UserControl (WinForms) that has a MinValue and MaxValue properties. Seems that both properties are setted to zero only switching from Source/Design.

I have a test case : www.stefanofraccaro.org/sd_bug.zip

How to reproduce :
Set MinValue to -80
Set MaxValue to -20
Switch to Source Code
Switch to Design Mode
MinValue is 0 (expected -80)
MaxValue is 0 (expected -20)

SharpDevelop Version : 5.1.0.4936-Beta-3ea20cfa
.NET Version : 4.5.50938
OS Version : Microsoft Windows NT 6.1.7601 Service Pack 1
Current culture : Italian (Italy) (it-IT)
Running under WOW6432, processor architecture: x86-64
Working Set Memory : 89828kb
GC Heap Memory : 10793kb

The same project works correctly with SD 4.4

This post is same as https://github.com/icsharpcode/SharpDevelop/issues/636
I don't know what's the right place to post

Removing Unused Event Handlers

$
0
0

I have a nasty habit of double clicking on design elements and instantly creating event handlers for the click event.  I do not want all these empty event handlers uglying up my code but I cannot simply delete them without deleting the definition in the MainForm.Designer.Cs. 


Is there a way to easily find and delete unused event handlers like this?


Thank you.


Viewing all 1764 articles
Browse latest View live