I've been working on an application and I was trying to follow this site to add a color picker to one of my pages but when I finally went to test a bit of what I had done so far, the app starts and exits with no information what-so-ever. Output:
'UI Task' (Managed): Loaded 'mscorlib.dll'
'UI Task' (Managed): Loaded 'System.Windows.RuntimeHost.dll'
'UI Task' (Managed): Loaded 'System.dll'
'UI Task' (Managed): Loaded 'System.Windows.dll'
'UI Task' (Managed): Loaded 'System.Net.dll'
'UI Task' (Managed): Loaded 'System.Core.dll'
'UI Task' (Managed): Loaded 'System.Xml.dll'
'UI Task' (Managed): Loaded '\Applications\Install\171F7914-3BB8-44C4-A0CE-A6B9B30A0BF5\Install\LSV_NOGPS.dll', Symbols loaded.
'UI Task' (Managed): Loaded 'Microsoft.Phone.dll'
'UI Task' (Managed): Loaded 'Microsoft.Phone.Interop.dll'
The thread '<No Name>' (0xf01016e) has exited with code 0 (0x0).
The program '[14879802] UI Task: Managed' has exited with code 0 (0x0).
The output I get from other projects seem to have more libraries being loaded and from what I can tell it may be not loading 'System.Device.dll' properly (It's the next one loaded in a normally running app).
I've seen a few very similar problems here:
WP7 App Crashes Immediately upon deploy
Windows Phone 7 - App doesn't start, no errors, just bails on load
Visual Studio 2008 would not debug
But none of the answers presented have helped me any. I haven't changed the namespace at all and I checked the 'startup' object in my properties (its set to Name of my project.App).
I've tried debugging with breakpoints at the start of the constructors and stepping into the project but every time it exits without even getting to any of my code it seems.
I've also tried making a new project, copying only the xaml and cs files into it, adding the necessary references. Same result.
I just tried making a whole new solution, new project with the same name, copying the xaml and respective cs files again. Same result, even though I forgot to add the necessary references, it doesn't even get far enough to realize there are references missing.
I'm not sure what to do other than to make a new project and go through my code, adding snippets until I hit the snag again.
I'm not new to programming but I'm pretty new to .net so go easy on me if I'm missing something obvious.
Please help! Thanks!
EDIT:
I managed to find the offending piece of code but I have no idea why it gives me this problem. I un-commented it from a working version and then I get the problem again. Its located in my App:Application cs file.
public class ColorList {
public ColorList() {
this.Items = new List<ColorItem>()
{
new ColorItem() {Text="orange", Color = Colors.Orange},
new ColorItem() {Text="red", Color = Colors.Red},
new ColorItem() {Text="blue", Color = Colors.Blue},
new ColorItem() {Text="magenta", Color = Colors.Magenta},
new ColorItem() {Text="purple", Color = Colors.Purple},
new ColorItem() {Text="green", Color = Colors.Green},
new ColorItem() {Text="cyan", Color = Colors.Cyan},
new ColorItem() {Text="brown", Color = Colors.Brown},
new ColorItem() {Text="yellow", Color = Colors.Yellow},
};
}
public List<ColorItem> Items {
get;
set;
}
}
public static ColorList theColorsList = new ColorList();
I got this code from the first link above, and I realized its a really weird way of describing the list so I just changed it to the following:
public static List<ColorItem> ColorsList = new List<ColorItem>() {
new ColorItem() {Text="orange", Color = Colors.Orange},
new ColorItem() {Text="red", Color = Colors.Red},
new ColorItem() {Text="blue", Color = Colors.Blue},
new ColorItem() {Text="magenta", Color = Colors.Magenta},
new ColorItem() {Text="purple", Color = Colors.Purple},
new ColorItem() {Text="green", Color = Colors.Green},
new ColorItem() {Text="cyan", Color = Colors.Cyan},
new ColorItem() {Text="brown", Color = Colors.Brown},
new ColorItem() {Text="yellow", Color = Colors.Yellow}
};
but I still get the same problem...