title: How to reference LeadTools to Unit Test project?
body: <p>Evaluating Document Imaging SDK, I'm trying to create a unit test project in my Visual Studio 2012 to check some code snippets. I have referenced LeadTools dlls from installation directory '<em>C:\LEADTOOLS 18\Bin\Dotnet4\Win32</em>' and pointed my unt test project output directory to the same directory (to have all LeadTools binaries next to my output). But running the unit test I'm getting the following execption:</p>
  
  <blockquote>
    <p>Test method
    LeadTools.Evaluation.UnitTests.Snippets.PdfToTiffTest.PdfToTiffTest
    threw exception: Leadtools.RasterException: Raster PDF Engine is
    needed to use this feature</p>
  </blockquote>
  
  <p>I suspect that problem is caused by VSTest process is running outside the 'C:\LEADTOOLS 18\Bin\Dotnet4\Win32' and can' find necessary LeadTools binaries.</p>
  
  <p><strong>Question: What is the correct way of refencing LeadTools binaries to the test project?</strong></p>
  
  <p>Unit test code: </p>
  
  <pre><code>using System.IO;
  using Leadtools;
  using Leadtools.Codecs;
  using Leadtools.Pdf;
  using Microsoft.VisualStudio.TestTools.UnitTesting;
  
  namespace LeadTools.Evaluation.UnitTests.Snippets
  {
      [TestClass]
      public class PdfToTiffTest
      {
          [TestMethod]
          public void PdfToTiffTest()
          {
              const string pdfPath = "C:\Samples\source.pdf";
              var tiffPath = Path.ChangeExtension(pdfPath, "tiff");
  
              // Load the input PDF document
              var document = new PDFDocument(pdfPath);
              using (var codecs = new RasterCodecs())
              {
                  // Loop through all the pages in the document
                  for (var page = 1; page &lt;= document.Pages.Count; page++)
                  {
                      // Render the page into a raster image
                      using (var image = document.GetPageImage(codecs, page))
                      {
                          // Append to (or create if it does not exist) a TIFF file
                          codecs.Save(image, tiffPath, RasterImageFormat.TifJpeg, 24, 1, 1, -1, CodecsSavePageMode.Append);
                      }
                  }
              }
          }
      }
  }
  </code></pre>