title: How to bundle a required DLL with a solution in Visual C# (Express, 2010)
body: <p>I have an application written in C# which interfaces with some custom hardware using a vendor supplied .Net assembly. The .Net assembly in turn loads another DLL at run time. I can add the vendor supplied assembly to my project but when I run it, the vendor assembly complains that it can't load the required DLL. I can work around this for the moment by copying the DLL to the bin\Debug and bin\Release folder.</p>
  
  <p>The problem is that I will need to distribute this application to clients at some point and they will not have this DLL in place. I can't see how I can make the solution require it; I can't add it as a reference since I get the error <strong><em>"A reference to foo.dll could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component."</em></strong></p>
  
  <p>I can't convert the DLL to a .Net assembly using TlbExp, it gives an error "<strong><em>The module was expected to contain an assembly manifest."</em></strong></p>
  
  <p>I thought if I published the application via "click once" that I could declare the dependency there but I don't see any way for this either. I also tried adding it as a file resource but this didn't seem to help. </p>
  
  <p>I can see other questions on SO relating to how to invoke functionality in an external DLL but in this case, I just need a way to bundle the DLL with the project. </p>
  
  <p>Thanks.</p>