Copying a DLL's dependencies in Visual Studio -


I depend on one of the contexts of the project, so to copy the third-party DLL into Visual Studio How do I install a project?

I have a main application project and class library DLL. The main application class library references the DLL, and DLL only references some third-party DLLs. When I compile the main application, it automatically copies its library DLL to its output directory, but it does not copy third-party DLLs.

I do not want to add references to third-party DLLs because the main application does not use them from the main application project, only it is used by the class library.

You can get it with the project properties window Visual Studio lets you create events, first, or Allows to define after creation. To access the project property window, right-click on your project in the Solution Explorer window and click on 'Properties'. Go to the 'Build Event' tab on the left hand side.

For example in the post-build box type in some copy commands: $ (SolutionDir)

  copy "$ (SolutionDir) mydll.dll" Both $ (TargetDir) " 

code> and $ (TargetDir) are both predefined variables. The standard syntax is as follows:

  copy "Source directory and file name" "Destination directory"  

If you click on the 'Edit Post Build.' Button it will bring a box, in which one of these predefined variables The list is, which you can insert (like $ (SolutionDir) and $ (TargetDir) )

As a side note, this It is a useful process to copy other files, such as custom configuration files, images, or other dependencies in your project.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -