Adding DLL References

Ensure that when you add references to any DLLs that are found in the DNN Bin folder that Copy Local is set to false. In order to do this, right click on the DLL in the references folder and choose properties. Then change the setting as seen below.

copy-local-false.png

All other DLL references can be added as you normally would. However, any 3rd party (non-DNN and non-Microsoft) will need to be added to the build file for that specific project in order to be properly copied and packaged. See the example for the DNN Media module below.

  <Target Name="CopyBin">
    <Copy SourceFiles="$(MSBuildProjectDirectory)\bin\Third-Party-Code.dll" DestinationFolder="$(WebsitePath)/bin" />
    <Copy SourceFiles="$(MSBuildProjectDirectory)\bin\$(AssemblyName).dll" DestinationFolder="$(WebsitePath)/bin" />
    <Copy SourceFiles="$(MSBuildProjectDirectory)\bin\$(AssemblyName).pdb" DestinationFolder="$(WebsitePath)/bin" />
    <Copy SourceFiles="$(MSBuildProjectDirectory)\bin\$(AssemblyName).xml" DestinationFolder="$(WebsitePath)/bin" />
  </Target>

updated-dll-reference.png

Last edited Feb 9, 2014 at 9:48 PM by hismightiness, version 3