The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

blueC (3) [Avatar] Offline
I am running into the exception below when launching Snippy.
Downloaded the source, compiles fine, but get the same error when trying to run from VS2008.

I was able to run the exe files for Chapter8 and 11.
Appreciate any pointers to figure out what is missing.

System.TypeInitializationException was unhandled
Message="The type initializer for '<Module>' threw an exception."
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: <CrtImplementationDetails>.ModuleLoadException
Message="The C++ module failed to load during appdomain initialization.
at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* )
at .cctor()
InnerException: System.ComponentModel.Win32Exception
Message="The specified module could not be found"
at CModuleInitialize.LoadWpfGfx(CModuleInitialize* )
at CModuleInitialize.{ctor}(CModuleInitialize* )
at ?A0x0b283f3b.??__E?A0x0b283f3b@cmiStartupRunner@@YMXXZ()
at _initterm_m((fnptr)* pfbegin, (fnptr)* pfend)
at <CrtImplementationDetails>.LanguageSupport.InitializePerAppDomain(LanguageSupport* )
at <CrtImplementationDetails>.LanguageSupport._Initialize(LanguageSupport* )
at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* )
jon.skeet (483) [Avatar] Offline
Re: Unable to run Snippy
That's very odd. It looks at first inspection as if WPF isn't installed, which can't be the case if you've got VS2008.

Do other WPF applications work okay? If you create a new WPF application from scratch, does that work?

blueC (3) [Avatar] Offline
Re: Unable to run Snippy
No, I tried creating a new WPF application, get the following error in VS.
Package Microsoft.VisualStudio.Xaml has failed to load properly.

I tried clearing the reset packages using - 'devenv /resetskippkgs' but did not help.
This is an official installation - not sure why Xaml is not loaded.
jon.skeet (483) [Avatar] Offline
Re: Unable to run Snippy
What operating system are you running on? It sounds like you might need to reinstall Visual Studio from scratch, I'm afraid smilie
blueC (3) [Avatar] Offline
Re: Unable to run Snippy
Windows XP SP2.
Will try to reinstall and give it a try.