0

This is not a standard nullreferenceexception question because there are no objects instantiated that this initialization relies on, only namespaces

I've been racking my brain for a couple of days on this one. The code works on another developer's machine (who is no longer here), so I have installed MySQL and imported the configuration, but I keep coming back to this exception. MySqlDB.MySQL is a namespace and MySQL() is just a method stub from the metadata.

The DLL is MySqlDB.dll, which lives with the project.

I have confirmed the executable by itself doesn't work on my machine either, so I know it is an environmental issue. Here's the list of other things I've tried (the application also has a dependency on SQL Server).

  • install SQL Server Express
  • uninstall SQL Server Express
  • install SQL Server
  • install Excel 2016 version for mysql plugin for Excel that was missing
  • moved executable from developer's machine to attempt running outside of Visual Studio - confirmed environmental issue
  • checked .NET version
  • Remove and Add MySQL DLL
  • Reinstall MySQL
  • Copied MySQL DLLs from GAC on developer's machine
  • Export and Import MySQL DB Configuration

var mySql = new MySqlDB.MySql.MySql();

at MySqlDB.MySql.MySql.c909228df886bcca197ed06f91ce6af71() at MySqlDB.MySql.MySql..ctor() at BCS_UI.App.Register() in c:\GitCode\Windows_UI_Beta\UI\UI\App.xaml.cs:line 47 at BCS_UI.App.Application_Startup(Object sender, StartupEventArgs e) in c:\GitCode\Windows_UI_Beta\UI\UI\App.xaml.cs:line 23 at System.Windows.Application.OnStartup(StartupEventArgs e) at System.Windows.Application.<.ctor>b__1_0(Object unused) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Jesse Roper
  • 1,269
  • 7
  • 31
  • 56
  • "I know it is an environmental issue" Did you check both machines are running on 32 or 64 bits and installed the correct bits related software? – Raymond Nijland Jul 10 '18 at 21:19
  • Are you asking if both machines are running the same version of the software or do you mean 32/64 bit Windows version? – Jesse Roper Jul 11 '18 at 12:19
  • Software versions and windows versions.. – Raymond Nijland Jul 11 '18 at 12:20
  • Good question. Machines are all x64 and target CPU was set to "any" until I changed it to x86 the other day in attempt to fix this issue. Don't ask me why. Will try to reproduce by setting them to x64. – Jesse Roper Dec 11 '18 at 18:49

0 Answers0