0
votes

I'm facing an issue with my visual studio 2013 (ultimate & expression). Since 2 weeks I can't build any project without having a just in time debugger popup. It says "An unhandled Mictosoft .Net Framework exception occured in MyApp.exe [5892]"

If I open a new visual studio to debug this issue it says ;

An unhandled exception of type 'System.Exception' occurred in App6.exe Additional information: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

at

static void Main(string[] args)
{
    global::Windows.UI.Xaml.Application.Start((p) => new App());
}

And the output is

'App6.exe' (CLR v4.0.30319: App6.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Cannot find or open the PDB file. 'App6.exe' (CLR v4.0.30319: App6.exe): Loaded 'C:\users\david\documents\visual studio 2013\Projects\App6\App6\bin\Debug\AppX\App6.exe'. Symbols loaded. 'App6.exe' (CLR v4.0.30319: App6.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll'. Module was built without symbols. 'App6.exe' (CLR v4.0.30319: App6.exe): Loaded 'C:\WINDOWS\system32\WinMetadata\Windows.UI.Xaml.winmd'. Module was built without symbols. 'App6.exe' (CLR v4.0.30319: App6.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.InteropServices.WindowsRuntime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.InteropServices.WindowsRuntime.dll'. Module was built without symbols. 'App6.exe' (CLR v4.0.30319: App6.exe): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'. The program '[5732] App6.exe' has exited with code 0 (0x0).

I have no clue how to fix it.

  • I tried to uninstall and reinstall .net framework, (4.5.1 sdk + 4.5 sdk + multi targeting pack).
  • I tried to install visual studio 2013 express

PS: it does not occurs with visual studio 2012. Also, this exception is thrown but the application is working fine after that.

1

1 Answers

0
votes

Google: 0x80040154 explains quite clearly that either MyApp.exe or App6.exe (they are both your) needs some COM object and the COM object is not registered.

As first hint try Google: "c# comvisible attribute" as it is quite possible that in some of your projects you have set it to "true"...

It is your application and you know (should know) which COM objects your application needs, so check their registration in registry.

"regsvr32" and "UAC" are related magic Google words for troubleshooting the installation process.

Windows Sysinternals Process Monitor can show you quite clearly where exactly does your application search for the registration records as all registry reads will be captured.

In order to diagnose the problem little bit further I'd recommend you to configure Visual Studio so that you can catch and see exceptions occuring inside the .NET framework code and see and read the .NET framework code shown in the call stack.

This http://msdn.microsoft.com/en-us/library/vstudio/cc667410(v=vs.120).aspx article should be enough.

And then use the Visual Studio debugger and your common sense. Whenever you see a word/term you don't know, learn what it means and continue.

With the amount of information you have provided it is not possible to guess/suggest something better.


I can try better if you provide some more information. After all your question is worth 100 rep points