Brijraj Beriwal

Brijraj Beriwal

  • NA
  • 1
  • 5.5k

C# WPF

Oct 22 2012 6:20 AM
My code for creating a WPF application was working properly but as soon as I cleaned the solution once I got the following error

System.TypeInitializationException was unhandled by user code
  Message=The type initializer for 'Microsoft.Windows.Controls.Ribbon.RibbonWindow' threw an exception.
  Source=RibbonControlsLibrary
  TypeName=Microsoft.Windows.Controls.Ribbon.RibbonWindow
  StackTrace:
       at Microsoft.Windows.Controls.Ribbon.RibbonWindow..ctor()
       at ProcGap.Mockup.MockMainWindow01..ctor() in C:\Users\brijraj_m_beriwal\Documents\Visual Studio 2010\Projects\tra.1\Source\Mockup\MockMainWindow01.xaml.cs:line 48
       at ProcGap.SplashPG.SplashPG_Closing(Object sender, CancelEventArgs e) in C:\Users\brijraj_m_beriwal\Documents\Visual Studio 2010\Projects\tra.1\Source\Splash.xaml.cs:line 35
       at System.Windows.Window.OnClosing(CancelEventArgs e)
       at System.Windows.Window.WmClose()
  InnerException: System.IO.FileLoadException
       Message=Could not load file or assembly 'Microsoft.Windows.Shell, Version=3.5.41019.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
       Source=RibbonControlsLibrary
       FileName=Microsoft.Windows.Shell, Version=3.5.41019.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35
       FusionLog==== Pre-bind state information ===
LOG: User = TECHLABS\brijraj_m_beriwal
LOG: DisplayName = Microsoft.Windows.Shell, Version=3.5.41019.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35
 (Fully-specified)
LOG: Appbase = file:///C:/Users/brijraj_m_beriwal/Documents/Visual Studio 2010/Projects/tra.1/Source/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : RibbonControlsLibrary, Version=3.5.41019.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\brijraj_m_beriwal\Documents\Visual Studio 2010\Projects\tra.1\Source\bin\Debug\ProcGap.vshost.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.Windows.Shell, Version=3.5.41019.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL file:///C:/Users/brijraj_m_beriwal/Documents/Visual Studio 2010/Projects/tra.1/Source/bin/Debug/Microsoft.Windows.Shell.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

       StackTrace:
            at Microsoft.Windows.Controls.Ribbon.RibbonWindow..cctor()
       InnerException: 



I am getting this exception at the start of application itself.

Could anyone please help to solve the following issue....?