Question

Randomly and without warning (or apparent reason), VS 2008 decided to act as if debugging was working just like it always does, except for the fact that my application window never shows up on the screen. I’d been running my app from VS all morning, and I don’t see what I could possibly have changed that would make my window no longer show up by the afternoon. Normally, if there is an error in the XAML or a problem with my code somewhere, VS will tell me with a fatal exception error and close the debug session automatically. But now VS seems to be unaware of any problems, as I can see my app running in the output box.

I’ve copied and pasted the entire output box into this post. All info regarding my running app is here.

Notice the familiar line at the bottom: “The program '[328] UI.vshost.exe: Managed' has exited with code 0 (0x0).” This line does not appear until I manually close the debug session by clicking the “stop” button. Until then, the app appears to be running without any major errors or problems.

I see a few possible red-flags: Firstly, a first-chance exception in System.Deployment.dll near the bottom – and I don’t have a clue what this means, and I doubt it is relevant.

Secondly, there are two threads that exit for unknown reasons before my app finishes loading. Again, I don’t imagine this is unusual. I just noticed it.

Thirdly, my app loads "PresentationFramework.Classic.dll". Classic? What does that even mean? And as opposed to what? Should my app not be using the “classic” version of WPF? This seems odd to me …

Fourthly, it names my app as “UI.vshost.exe”. My app’s executable file is “UI.exe” – I don’t recall ever seeing “vshost” attached to my executable’s file name, in any version of VS in the past. I have confirmed that “vshost” appears in the output window in release-mode as well as in debug-mode. Restarting my computer has no effect. Deleting the bin and obj folders and rebuilding has no effect. I’ve checked the “bin” directory, in my project folder. It contains two executable files: UI.exe AND UI.vshost.exe UI.exe is 76KB UI.vshost.exe is 14KB Double-clicking on the files and running them manually has no effect. No windows show up.

Finally, on the eighth line (not accounting for line-wrapping) UI.vshost.exe claims to have essentially “Loaded” itself, like it was a dll referencing itself or something. Again, this raises an eyebrow.

Also, I am using Visual Source Safe for source control. I have heard that VSS is somewhat unreliable from an industry standpoint, and that it is known to have corrupted projects in the past. Could this possibly be the culprit?

Naturally, I'm not an expert on what all of this stuff means - otherwise I probably wouldn't need to post it on StackOverflow.

Let me know if you see anything I might be missing …

'UI.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'
'UI.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'
'UI.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'
'UI.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll'
'UI.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'
'UI.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'
'UI.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'
'UI.vshost.exe' (Managed): Loaded 'C:\Users\hamilton.hollberg\Documents\Visual Studio 2008\Projects\AllSparkAdminTool\AllSparkAdminTool\bin\Debug\UI.vshost.exe'
'UI.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll'
'UI.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll'
'UI.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll'
'UI.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll'
'UI.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll'
'UI.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\UIAutomationProvider\3.0.0.0__31bf3856ad364e35\UIAutomationProvider.dll'
'UI.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\WindowsBase\3.0.0.0__31bf3856ad364e35\WindowsBase.dll'
'UI.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_32\PresentationCore\3.0.0.0__31bf3856ad364e35\PresentationCore.dll'
'UI.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\PresentationFramework\3.0.0.0__31bf3856ad364e35\PresentationFramework.dll'
The thread 0xbc0 has exited with code 0 (0x0).
The thread 0xd78 has exited with code 0 (0x0).
'UI.vshost.exe' (Managed): Loaded 'C:\Users\hamilton.hollberg\Documents\Visual Studio 2008\Projects\AllSparkAdminTool\AllSparkAdminTool\bin\Debug\UI.exe', Symbols loaded.
'UI.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'
'UI.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Deployment\2.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll'
A first chance exception of type 'System.Deployment.Application.InvalidDeploymentException' occurred in System.Deployment.dll
'UI.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\PresentationFramework.Classic\3.0.0.0__31bf3856ad364e35\PresentationFramework.Classic.dll'
The program '[2704] UI.vshost.exe: Managed' has exited with code 0 (0x0).
Was it helpful?

Solution 2

public MainWindow()
{
    InitializeComponent();
}

I've confirmed that an infinite loop occurs during the call to InitializeComponent. It's likely a binding problem. At this point I'll have to start commenting out lines of XAML until I find the source.

OTHER TIPS

All the "vshost" means that your application is being run from within Visual Studio.

If you run the application directly the name won't include this.

I know it sounds silly, but have you tried rebooting? I've had VS 2008 do weird things only to recover after rebooting.

Well, here's what MS has to say about the Deployment Exception. It sounds like that might be the problem to me. I'm also wondering if you accidentally changed your configuration from i.e. 'Debug' to i.e. 'Deploy'.

I had the same problem. In my case the solution was simpler. After searching the internet and trying a bunch of things, the cure was to reboot my computer. I've seen other posts by people with this problem for whom rebooting didn't work, but it did for me.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top