Luke Puplett
Luke Puplett

Reputation: 45253

Windows Phone 7 - App doesn't start, no errors, just bails on load

While preparing my phone app for release, I thought I'd change the version numbers on all my assemblies.

I also had an issue with the WCF service client not auto-genning the proxy code, a known bug I've raised and MS have fixed for vNext, but I don't think its related. In any case I sorted that, and am confident its related to the prep I was doing for release.

My app now doesn't load in either the emulator or the device. It just bombs during the CLR bootstrapping with no error to help me. I'm so flummoxed I opened my first support call in a decade with MS.

Here's the content of the output window:

'taskhost.exe' (Managed): Loaded 'mscorlib.dll'
'taskhost.exe' (Managed): Loaded 'System.Windows.RuntimeHost.dll'
'taskhost.exe' (Managed): Loaded 'System.dll'
'taskhost.exe' (Managed): Loaded 'System.Windows.dll'
'taskhost.exe' (Managed): Loaded 'System.Core.dll'
'taskhost.exe' (Managed): Loaded 'System.Xml.dll'
'taskhost.exe' (Managed): Loaded '\Applications\Install\A2C90EB3-BF72-4317-B6FB-7D05843D6E15\Install\Company.Product.Mobile.WindowsPhoneUK.dll', Symbols loaded.
'taskhost.exe' (Managed): Loaded '\Applications\Install\A2C90EB3-BF72-4317-B6FB-7D05843D6E15\Install\Company.Product.Mobile.dll', Symbols loaded.
'taskhost.exe' (Managed): Loaded 'Microsoft.Phone.dll'
'taskhost.exe' (Managed): Loaded 'Microsoft.Phone.Interop.dll'
The thread '<No Name>' (0xc7e00a2) has exited with code 0 (0x0).
The thread '<No Name>' (0xcdd0076) has exited with code 0 (0x0).
The program '[232259726] taskhost.exe: Managed' has exited with code 0 (0x0).

See? No errors! Nothing to go on. It's not like I can set the Fusion log on the blummin' phone.

The log should show many more assemblies loading. I have reversed my changes, the version numbers are no longer auto and I can't think of anything else I might have done that would have caused this!

Definitely need source control.

Thanks, Luke

Upvotes: 15

Views: 3602

Answers (4)

trocca
trocca

Reputation: 71

By renaming your Namespace your Project properties lost the Startup Object.

Just check in Project / "Project Name" Properties / Application => Startup Object, it is very likely empty.

Scroll down and select the new Namespace.Class type for the Startup.

Hope it helps.

Upvotes: 7

LittleSweetSeas
LittleSweetSeas

Reputation: 7084

I post here as reference, as it took me some hours to fix this: I had the same problem, i had to go in Assembly.cs file, then make make sure that the following element has empty value:

[assembly: AssemblyCulture("")]

Putting a culture info there (eg. "en-US") makes the app quit silently on startup, without any exception nor log info.

No problem in leaving culture information in the following field:

[assembly: NeutralResourcesLanguageAttribute("en-US")]

Upvotes: 0

misato
misato

Reputation: 185

Take a look at your .csproj file. In my case, everything was correct but in that file there was a reference to the old name of the project like <SilverlightAppEntry>TheOldNamespace.App</SilverlightAppEntry> So i just changed that to the new namespace name and now it works again ;)

Upvotes: 10

Gerben Limburg
Gerben Limburg

Reputation: 581

Last week I got the same strange bug.

After creating a new solution (which builded and runned without problems) I discovered that changing the namespace caused the bug.

Hope it helps.

Upvotes: 17

Related Questions