15

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

Luke Puplett
  • 42,091
  • 47
  • 181
  • 266

4 Answers4

17

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.

Gerben Limburg
  • 581
  • 5
  • 16
  • 19
    This wasn't the answer, exactly, but it made me look again at everything in the Properties page for the app. The Startup Object had become empty!! Probably some bug in the IDE resets it when the namespace, or app name, etc. is changed. Grr. But thanks Gerben, you made me look again at that bit. – Luke Puplett Jul 11 '11 at 19:51
  • Thank you for the comment. I'll now look there too if I've changed my namespace. – Gerben Limburg Jul 11 '11 at 20:24
  • 2
    Same here. Namespace changed caused startup object to be cleared. – David Jul 26 '13 at 03:42
10

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 ;)

misato
  • 185
  • 2
  • 7
7

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.

trocca
  • 71
  • 1
  • 1
  • Thank you for adding the details @trocca. I found it right away. There are a few places in the Package and WMApp manifests that have this set and I was having trouble finding it!! – gcoleman0828 Jan 24 '16 at 13:49
0

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")]
LittleSweetSeas
  • 6,786
  • 2
  • 21
  • 26