WPF application fails to start due to strange dll error - c#

UPDATE: The error described below happens also with an empty Windows Forms Application.
I have a simple WPF application in C# that works with Bing maps API.
The application does nothing except from showing a Bing map that was integrated through xaml code:
<m:Map CredentialsProvider="my api key that I removed here"
x:Name="myMap"
Center="47.620574,-122.34942" ZoomLevel="12" Height="Auto"
"/>
I don't reference any particular third-party libraries except the Microsoft.Maps.MapControl.WPF.
When I run the application it exits without giving any particular error message. By checking error logs with eventvwr I discovered that it has problems with some dll file stored in my AppData\Local\Admworks folder. The file is probably generated dynamically as it has a different name each time I restart the computer. The first time it was jgmrysmv.dll, the second gfphosrs.dll and so on.
If I rename the Admworks folder the application works. However, when I restart the computer the problem returns. The Admworks folder is still there and the name of the dll file is different.
This is the error reported in event viewer:
Faulting application name: WpfApplication2.vshost.exe, version: 12.0.30723.0, time stamp: 0x53cf4fe5
Faulting module name: gfphosrs.dll, version: 0.0.0.0, time stamp: 0x5547e370
Exception code: 0xc000041d
Fault offset: 0x000024ce
Faulting process ID: 0xcbc
Faulting application start time: 0x01d08d4c5b92cf13
Faulting application path: C:\Users\alber_000\documents\visual studio 2013\Projects\WpfApplication2\WpfApplication2\bin\Debug\WpfApplication2.vshost.exe
Faulting module path: C:\Users\alber_000\AppData\Local\Admworks\gfphosrs.dll
Report ID: 9a3939cb-f93f-11e4-bf2f-74e5437876cd
Faulting package full name:
Faulting package-relative application ID:
This is the output I get in the debug window:
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\Users\alber_000\documents\visual studio 2013\Projects\WpfApplication2\WpfApplication2\bin\Debug\WpfApplication2.vshost.exe'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Xaml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\PresentationCore\v4.0_4.0.0.0__31bf3856ad364e35\PresentationCore.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0x1db0 has exited with code 259 (0x103).
The thread 0x1d78 has exited with code 0 (0x0).
The thread 0x1d80 has exited with code 259 (0x103).
'WpfApplication2.vshost.exe' (CLR v4.0.30319: WpfApplication2.vshost.exe): Loaded 'C:\Users\alber_000\documents\visual studio 2013\Projects\WpfApplication2\WpfApplication2\bin\Debug\WpfApplication2.exe'. Symbols loaded.
The program '[7516] WpfApplication2.vshost.exe' has exited with code -1073740771 (0xc000041d).
I tried putting the breakpoint at InitializeComponent() in
public MainWindow()
{
InitializeComponent();
}
but the application stops before reaching that point.

Not solved yet? Tried compiling to 32 bit instead of 64 yet? Frequent cause for dll problems.

Related

Visual Studio user cache

When developing my project in VS, I am using Syncfusion's tools to make a ribbon and support docking. While editing the ribbon with the "Customize Ribbon" dialogue, the program crashed. Now when I try opening the program. I get this error:
System.Windows.Markup.XamlParseException: 'Root element is missing.
Here is the output from the Debug Console:
'Analyze 2017.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\git\RevolveAnalyze2017\Revolve Analyze\Analyze 2017\bin\Debug\Analyze 2017.exe'. Symbols loaded.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\PresentationCore\v4.0_4.0.0.0__31bf3856ad364e35\PresentationCore.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Xaml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Step into: Stepping over non-user code 'Analyze_2017.App..ctor'
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Step into: Stepping over non-user code 'Analyze_2017.App.InitializeComponent'
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\git\RevolveAnalyze2017\Revolve Analyze\Analyze 2017\bin\Debug\Syncfusion.Tools.Wpf.dll'. Module was built without symbols.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\git\RevolveAnalyze2017\Revolve Analyze\Analyze 2017\bin\Debug\SciChart.Charting.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\git\RevolveAnalyze2017\Revolve Analyze\Analyze 2017\bin\Debug\SciChart.Data.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\git\RevolveAnalyze2017\Revolve Analyze\Analyze 2017\bin\Debug\SciChart.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\git\RevolveAnalyze2017\Revolve Analyze\Analyze 2017\bin\Debug\Syncfusion.SfSkinManager.WPF.dll'. Module was built without symbols.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Users\kiddi\AppData\Local\Temp\VisualStudio.XamlDiagnostics.7564\Microsoft.VisualStudio.DesignTools.WpfTap.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\git\RevolveAnalyze2017\Revolve Analyze\Analyze 2017\bin\Debug\Syncfusion.Shared.Wpf.dll'. Module was built without symbols.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\SMDiagnostics\v4.0_4.0.0.0__b77a5c561934e089\SMDiagnostics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Internals\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Internals.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'SciChart.Core&'. Module was built without symbols.
The thread 0x2734 has exited with code 0 (0x0).
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\git\RevolveAnalyze2017\Revolve Analyze\Analyze 2017\bin\Debug\AvalonDock.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\UIAutomationProvider\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationProvider.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\UIAutomationTypes\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationTypes.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\git\RevolveAnalyze2017\Revolve Analyze\Analyze 2017\bin\Debug\Syncfusion.Themes.Blend.WPF.dll'. Module was built without symbols.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework.Aero2\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.Aero2.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\git\RevolveAnalyze2017\Revolve Analyze\Analyze 2017\bin\Debug\SciChart.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsFormsIntegration\v4.0_4.0.0.0__31bf3856ad364e35\WindowsFormsIntegration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework.Luna\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.Luna.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework.Aero\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.Aero.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework-SystemXml\v4.0_4.0.0.0__b77a5c561934e089\PresentationFramework-SystemXml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Exception thrown: 'System.Exception' in Analyze 2017.exe
Downloaded valid unpacking rules from https://raw.githubus10000ercontent.com/RevolveNTNU/Telemetry-unpacking-rules-2017/master/parsing.cs?token=AVaK2e3AkDmrF7Ypd7KRW8qImovRfKs4ks5YjzTdwA%3D%3D
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Users\kiddi\AppData\Local\Temp\keucrxun.dll'. Module was built without symbols.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\git\RevolveAnalyze2017\Revolve Analyze\Analyze 2017\bin\Debug\LiteDB.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'Anonymously Hosted DynamicMethods Assembly'.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Analyze 2017.exe' (CLR v4.0.30319: Analyze 2017.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework-SystemXmlLinq\v4.0_4.0.0.0__b77a5c561934e089\PresentationFramework-SystemXmlLinq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
I think what happened is that I managed to create a new element in the ribbon, that does not exist anywhere else except in my user cache. I've tried to delete some of the caches in e.a. appdata and the local appdata. I have also tried reinstalling VS (RC 2017).
I have tried re-cloning the project and re-installing VS, but nothing seems to work. I am also able to run the project on a different PC.
There is probably an easy solution to my problem, but I cannot seem to find it after some hours of searching around. I'd be happy to be refereed to the an external website if it exists :)
Forwarding Syncfusion's answer here if anyone was wondering:
As you have mentioned that you are facing the exception while using
Ribbon control in your application, we need to analyze the features of
Ribbon which has been used in your application. This may help us to
narrow down the issue from our side. Also, we suspect that have set
“AutoPersist” property as true for Ribbon as you mentioned that your
problem is related to local cache. If so, then Ribbon state has been
saved in below location in “.dat” format.
Location: C:\Users\<UserName>\AppData\Local\IsolatedStorage\
What I ended up doing was deleting all the contents of the IsolatedStorage. It worked perfectly. Thanks to Syncfusions excellent customer service!
Ifthe usual visual studio stuff doesn't work you'll have to try Syncfusion's support (it looks quite specific to them).
The usual Visual Studio stuff ...
Remove the file, create a new one, copy the content from the old one
in.
Recreate the project.
Rollback (using version control tools)
Hard to say how else we could help on here without knowing a lot more about what's actually going on under the hood here (which the Syncfusion guys should be able to look at for you).

VS 2015: Getting "Exception thrown: 'System.Data.OleDb.OleDbException' in System.Data.dll" When Attempting Connect to Excel

Okay so here is my code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.OleDb;
namespace DisplayingDataFromExcelSheets
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
string datasource = #"C:\Users\E180728\Documents\FakeGradesTable.xlsx";
string cs = #"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + datasource + ";Extended Properties='Excel 12.0;HDR=YES'";
OleDbConnection cn = new OleDbConnection(cs);
Console.WriteLine("Connecting to: " + cs);
OleDbDataAdapter da = new OleDbDataAdapter("select * from [marks$]", cn);
DataSet ds = new DataSet();
da.Fill(ds, "marks");
dataGridView1.DataSource = ds.Tables[0];
}
}
}
When I attempt to run this, the form comes up with a blank DataGridView, and the following shows up in the output:
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\14.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\14.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\14.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\Users\E180728\Documents\Visual Studio 2015\Projects\ADOProject\DisplayingDataFromExcelSheets\bin\Debug\DisplayingDataFromExcelSheets.vshost.exe'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Deployment\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0x3218 has exited with code 0 (0x0).
The thread 0x2b8c has exited with code 0 (0x0).
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\Users\E180728\Documents\Visual Studio 2015\Projects\ADOProject\DisplayingDataFromExcelSheets\bin\Debug\DisplayingDataFromExcelSheets.exe'. Symbols loaded.
Running Application
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_32\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Connecting to: Provider=Microsoft.ACE.OLEDB.12.0; Data Source=C:\Users\E180728\Documents\FakeGradesTable.xlsx;Extended Properties='Excel 12.0;HDR=YES'
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'DisplayingDataFromExcelSheets.vshost.exe' (CLR v4.0.30319: DisplayingDataFromExcelSheets.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.Wrapper.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Exception thrown: 'System.Data.OleDb.OleDbException' in System.Data.dll
I am running Visual Studio 2015. The file is in built in Excel 2010. Both office and VS 2015 are x64 versions on a x64 laptop. Any ideas what might be happening here?
I figured it out. See my last comment for the solution. I found the error by adding the code to a button instead of a form load. It showed that my sheet name was wrong in the excel file. Updated it and it worked just fine. Thanks for all the help guys!

Stop loading unnecessary symbols

I'm working with nopCommerce and it works well. The only problem is that it takes a lot of time for web app to start. After I hit F5 it takes around 45 seconds before it gets to Application_Start method. (If I hit 'Start Without Debugging' it takes like 7 seconds). So I believe the problem is because symbols being loaded and I can't disable them. I tried to set 'Only specified modules' (Debug-> Options-> Debugging -> Symbols) but anyway it keeps trying to load dozens of unnecessary symbols files:
'iisexpress.exe' (CLR v4.0.30319: DefaultDomain): Loaded
'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll'.
Skipped loading symbols. Module is optimized and the debugger option
'Just My Code' is enabled. 'iisexpress.exe' (CLR v4.0.30319:
DefaultDomain): Loaded
'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'.
Skipped loading symbols. Module is optimized and the debugger option
'Just My Code' is enabled. 'iisexpress.exe' (CLR v4.0.30319:
DefaultDomain): Loaded
'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'.
Skipped loading symbols. Module is optimized and the debugger option
'Just My Code' is enabled. 'iisexpress.exe' (CLR v4.0.30319:
DefaultDomain): Loaded
'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll'.
Skipped loading symbols. Module is optimized and the debugger option
'Just My Code' is enabled. 'iisexpress.exe' (CLR v4.0.30319:
DefaultDomain): Loaded
'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'.
Skipped loading symbols. Module is optimized and the debugger option
'Just My Code' is enabled. 'iisexpress.exe' (CLR v4.0.30319:
DefaultDoma
Is it possible just to load symbols only for some of dlls?

wpf app and external processes

I've wrote an wpf app, from which i would like to call 20 external processes, after all processes are finished wpf app should continue normal execution.
I succeded in calling those processes and they work just fine. They receive parameters from wpf, but afterwards wpf gui is not showing and qouted message is showed in console.
When I call process from the following code once or twice it works well, but after few times it stops working. I already tried commented lines
string arguments = "thumbnail " + input + " " + output.LocalPath;
Process p = Process.Start(videoToolPath, arguments);
while(!p.HasExited)
{
Thread.Sleep(1000);
}
//p.Dispose();
//p.Kill();
//p.Close();
Console:
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'E:\Projects\MediaGUI\newVSProject\VJProject\VJProject\bin\Debug\VJProject.vshost.exe'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Xaml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\PresentationCore\v4.0_4.0.0.0__31bf3856ad364e35\PresentationCore.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0x1ee4 has exited with code 259 (0x103).
The thread 0x1e18 has exited with code 259 (0x103).
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'E:\Projects\MediaGUI\newVSProject\VJProject\VJProject\bin\Debug\VJProject.exe'. Symbols loaded.
Step into: Stepping over non-user code 'VJProject.App..ctor'
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Step into: Stepping over non-user code 'VJProject.App.Main'
Step into: Stepping over non-user code 'VJProject.App.InitializeComponent'
The thread 0x26d8 has exited with code 259 (0x103).
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework.Aero2\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.Aero2.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework-SystemXml\v4.0_4.0.0.0__b77a5c561934e089\PresentationFramework-SystemXml.dll'. Cannot find or open the PDB file.
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework-SystemXmlLinq\v4.0_4.0.0.0__b77a5c561934e089\PresentationFramework-SystemXmlLinq.dll'. Cannot find or open the PDB file.
'VJProject.vshost.exe' (CLR v4.0.30319: VJProject.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\UIAutomationTypes\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationTypes.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
If you just want to wait for the external program to exit:
var process = Process.Start(...);
process.WaitForExit();
int code = process.ExitCode;
if (code != 0)
{
//failure
}
else
{
//success
}
(Don't do this inside your UI-Thread, it will block it)
You want to do this asynchronously. The easiest way to do this is with the async await pattern. The bad news is that Process does not support Task async.
public Task ProcessVideo(string input, xxx output)
{
string arguments = "thumbnail " + input + " " + output.LocalPath;
Process p = Process.Start(videoToolPath, arguments);
var tcs = new TaskCompletionSource<object>();
p.Exited += (o, e) =>
{
if(p.ExitCode == 0)
{
tcs.SetResult(null);
}
else
{
tcs.SetException(someException);
}
p.Dispose();
}
return tcs.Task;
}
//Then call it by
var listOfFilesToProcess = new List<string>(){ ... };
await Task.WhenAll(listOfFilesToProcess.Select(file => ProcessVideo(file, output));

Visual Studio debugger does not exit after application was killed

Whenever I run the code via Visual Studio after second run it does not exit, meaning it is still running but visually it is down, yet it is visible via Taskmanager. I believe it has to do with buffer being filled with keys and it cannot handle the flow (after running the code without the method showed below it works fine).
_Controls _Movement; //Creates an object of the class
public void MainWindow1_KeyDown(object sender, KeyEventArgs e) //Eventhandler method, being called when key is pressed.
{
if (_Movement == null)
{ //assign value to the object ONCE
_Movement = new _Controls(CharacterBody, CharacterFeet);
}
_Movement.Controlling(e); //calling method whether the key is pressed
}
Above is the code where the method is being called when key is pressed it does call the method Controlling every time key press occurs.
class _Controls : MainWindow
{
private RotateTransform rotateAll;
private Image _CharacterBody, _CharacterFeet;
public _Controls(Image _CharacterBody, Image _CharacterFeet)
{
this._CharacterBody = _CharacterBody;
this._CharacterFeet = _CharacterFeet;
}
public void Controlling(KeyEventArgs e)
{
}
}
After second run and spamming key or keys it does not exit. Yet it works well when I run it directly (.exe).
Here is the Output:
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Users\Unranked\documents\visual studio 2013\Projects\Shooter2D\Shooter2D\bin\Release\Shooter2D.vshost.exe'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Xaml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\PresentationCore\v4.0_4.0.0.0__31bf3856ad364e35\PresentationCore.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0x1108 has exited with code 259 (0x103).
The thread 0x1550 has exited with code 0 (0x0).
The thread 0x1730 has exited with code 259 (0x103).
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Users\Unranked\documents\visual studio 2013\Projects\Shooter2D\Shooter2D\bin\Release\Shooter2D.exe'. Symbols loaded.
Step into: Stepping over non-user code 'Shooter2D.App..ctor'
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Step into: Stepping over non-user code 'Shooter2D.App.Main'
Step into: Stepping over non-user code 'Shooter2D.App.InitializeComponent'
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework.Aero\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.Aero.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework-SystemXmlLinq\v4.0_4.0.0.0__b77a5c561934e089\PresentationFramework-SystemXmlLinq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework-SystemXml\v4.0_4.0.0.0__b77a5c561934e089\PresentationFramework-SystemXml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Shooter2D.vshost.exe' (CLR v4.0.30319: Shooter2D.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\UIAutomationTypes\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationTypes.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
How would it be possible to make the software exit?
You may want to try setting
App.Current.ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose;
This will force the application to shut down as soon as the Main window
of your application has been closed.
Side note: It looks like you're trying to build a game loop, WPF might
not be the best solution for that. You may want to look into
MonoGame or Unity.

Categories

Resources