.dll missing after rebuild / clean-build solution

I have 3 projects in my solution and a bunch of third-party or corporate dlls. Every time I rebuild a project or clean solutions, many of these dlls are deleted, so there aren’t enough of them. It is very annoying to refer to these dll files again and again after recovery. Can someone explain how to avoid this? Thanks in advance.

+4
source share
1 answer

A folder binis just binary output from an assembly, so when you clean up your solution, all the assemblies in the folder binare deleted. You must reference assemblies from another location. One suggestion is to create a folder in your project Shared Resources, copy the assemblies into this folder, and then link them to this folder. This way they will not be removed from binin clean / rebuild, and Visual Studio will copy them there as needed.

  • Right-click on the folder Referencesin your project and selectAdd Reference...
  • Use the browse function to find the assemblies you want to reference (do not worry about manually copying them to / from a folder bin).
  • After adding the link, right-click the link in the list of links and select Properties
  • , Copy Local True

, bin .

+8

All Articles