I'm getting this error when running a .net 2.0 app on a stripped-down XP SP3 x86 virtual machine, even if .net 2.0 framework runtime has already been installed prior to installing the app.
Exception Source: mscorlib
Exception Type: System.IO.FileNotFoundException
Exception Message: Could not load file or assembly 'WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Exception Target Site: GetExportedTypes
---- Stack Trace ----
System.Reflection.Assembly.GetExportedTypes()
XSplit.Core.exe: N 00000
XSplit.Core.Capture.ChannelAddinManager.#Dm( As String)
XSplit.Core.exe: N 00105
XSplit.Core.Capture.ChannelAddinManager.#Cm()
XSplit.Core.exe: N 00265
XSplit.Core.Capture.ChannelAddinManager.Init(path As String, host As IAddinHost)
XSplit.Core.exe: N 00104
XSplit.Core.frmLogin.InitializeAddinComponent()
XSplit.Core.exe: N 00534
XSplit.Core.frmLogin..ctor(args As String[])
XSplit.Core.exe: N 01263
The related code that spawns this error is this
var assembly = Assembly.LoadFrom(dllFile); var assemblyTypes = assembly.GetExportedTypes();
Even after installing framework 2.0 sp2, this error is still thrown.
You guys got any clue on why this is?
The WindowsBase assembly didn't become available until .NET 3.0. If you want to run this code without an exception then you'll need to install 3.0 on the machine, 2.0 isn't good enough. Check the build settings for the add-in project and make sure that it doesn't reference any WPF assemblies.