title: How to avoid manually browsing DLL in Add Reference of Script Task when deploying package on production?
body: <p>I use <em>EPPlus.dll</em> library for generating Excel files on the fly for attachment and generate mailer in Script Task of SSIS package.</p>
  
  <p>When there is new requirement for change in mailer comes, I do the change in Script Task on my local machine and send the built package file ( .dtsx ) to DBA team for deployment.</p>
  
  <p>Now everytime I have to ask the DBA team to share production server screen with me where I: </p>
  
  <ol>
  <li>Open the file in Visual Studio Data Tools solution </li>
  <li>Browse to the dll location </li>
  <li>Add Reference to the dll in Script Task. </li>
  </ol>
  
  <p>Then they import the package file in MSDB from where scheduled job references and executes the package.</p>
  
  <p>If I dont do the above step, the Script Task throws error of reference not found.</p>
  
  <blockquote>
    <p>Error 1   The type or namespace name 'OfficeOpenXml' could not be found
    (are you missing a using directive or an assembly reference?)</p>
  </blockquote>
  
  <p>I overcame challenge of installing DLL inside GAC that is being referenced in Script Task by dynamically loading the assembly as below'</p>
  
  <pre><code>public void Main()
  {
       AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);
  
  }
    private System.Reflection.Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
    {
              return System.Reflection.Assembly.LoadFrom(System.IO.Path.Combine(strDLLPath, "EPPlus.dll"));
     }
  </code></pre>
  
  <p>But I am, not able to find steps to avoid manually browsing and adding DLL reference. Please help as DBA team is reluctant/ avoids sharing screen.</p>
  
  <p>Alternatively, what is the correct/best practice way to get package file deployed on server in which external dll is used if I dont have direct access to production server.</p>