title: MySql.Data reference in my own .dll only functions on development computer, not on end user's computers
body: <p>I have a question as a novice programmer regarding a MySql.data reference I added from the MySql connector net, to my code.  The program that I compile would be made into a .dll that runs from within another application.  The application is a stock trading program, and my code is a strategy that makes evaluations of price data and executes buy and sell orders, etc.</p>
  
  <p>Just when I thought my strategy was fully developed I've run into a new snag I'd love to have someone's help with in solving.</p>
  
  <p>I'm asking stackoverflow because the support forum mods of the trading application removed this question from their forums, probably because it was outsie their supportable boundaries.</p>
  
  <p>I've been adding extra .NET references to my strategy, like windows forms and system.management, etc so that it would be able to check the computer's hard drive 'serial number' to make sure that the strategy is licensed on that computer.  Everything has been working ok so far, and I was able to get the strategy to run on other computers by exporting it as a .dll</p>
  
  <p>The latest and final addition I made was to add a reference to MySql.Data.MySqlClient (which is a .dll that had to be downloaded and installed separately and isn't part of .NET) so that it could check the computer's hardware ID against an online database to see if it's on the whitelist. I got that working perfectly on the development computer, and as soon as I tried to get it running on my other computer, this error message came up in the output window:</p>
  
  <p><strong>NT</strong> Error on calling 'OnStartUp' method for strategy 'MyStrategy/7f5e28c481644cb5a7754d0b7a0be47f': Could not load file or assembly 'MySql.Data, Version=6.1.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.</p>
  
  <p>I don't fully know what is happening, but it seems that in the past all external .dll from microsoft .NET that I referenced in my code were carried over and functioned perfectly on other computers, and while my code runs with the MySql.Data reference, once any MySql commands are run the program terminates and says that error message about a missing file.  (But if I comment out those lines of code it runs fine, just without the licensing checks I need to have)</p>
  
  <p>One last thing I can mention for more information, as I'm new to this area of development and don't know if it matters, is that I installed the most recent MySQL connection net to the laptop which is a later version than the 6.1.6.0 that I have on the development computer.</p>
  
  <p>The strategy runs exactly as intended on the computer it was developed on though.</p>
  
  <p>My main question has two parts to it then:</p>
  
  <p>1) Is there a way to embed or merge the MySql.Data .dll so that it can be a part of my .dll?</p>
  
  <p>2) Will every end user of this software need to have MySql connection net installed on their computer, and the exact same version as whatever it was developed in (noob question)</p>
  
  <p>Any answers, guesses and speculation are welcomed and appreciated.</p>