Dll does not copy to bin folder

I have a problem with Devart libraries that are not copied to the bin folder of my web application. I have a web application project that references projectA. ProjectA refers to projectB. Devart Dlls are used in projectB and are not copied to the bin folder of web application project projects at build time. ProjectB also references EL Unity DLLs and they are copied correctly. All the Dlls in question are physically located in a folder in projectB, and this is the starting point. (I have no links pointing to the GAC)

The correct DLLs are Microsoft.Practices.Unity, Microsoft.Practices.Unity.Configuration, and Microsoft.Practices.ServiceLocation.

DLLs that are not copied correctly are Devart.Data, Devart.Data.Oracle and Devart.Data.Oracle.Design.

Here are the links for each dll ...

<Reference Include="Devart.Data, Version=5.0.124.0, Culture=neutral, PublicKeyToken=09af7300eec23701, processorArchitecture=MSIL"> <HintPath>..\Dtn.PetroDex.Dal\ThirdPartyDlls\Devart.Data.dll</HintPath> <SpecificVersion>False</SpecificVersion> <Private>True</Private> </Reference> <Reference Include="Devart.Data.Oracle, Version=5.70.170.0, Culture=neutral, PublicKeyToken=09af7300eec23701, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\Dtn.PetroDex.Dal\ThirdPartyDlls\Devart.Data.Oracle.dll</HintPath> <Private>True</Private> </Reference> <Reference Include="Devart.Data.Oracle.Design, Version=5.70.170.0, Culture=neutral, PublicKeyToken=09af7300eec23701, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\Dtn.PetroDex.Dal\ThirdPartyDlls\Devart.Data.Oracle.Design.dll</HintPath> <Private>True</Private> </Reference> <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <HintPath>..\Dtn.PetroDex.Dal\ThirdPartyDlls\Microsoft.Practices.ServiceLocation.dll</HintPath> <SpecificVersion>False</SpecificVersion> <Private>True</Private> </Reference> <Reference Include="Microsoft.Practices.Unity, Version=2.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <HintPath>..\Dtn.PetroDex.Dal\ThirdPartyDlls\Microsoft.Practices.Unity.dll</HintPath> <SpecificVersion>False</SpecificVersion> <Private>True</Private> </Reference> <Reference Include="Microsoft.Practices.Unity.Configuration, Version=2.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <HintPath>..\Dtn.PetroDex.Dal\ThirdPartyDlls\Microsoft.Practices.Unity.Configuration.dll</HintPath> <SpecificVersion>False</SpecificVersion> <Private>True</Private> </Reference> 

Does anyone else have this problem? Am I doing it wrong? Thanks

EDIT I โ€‹โ€‹opened the file monitor and looked where the visual studio downloaded the link, and for Unity it got the DLL from the location I specified. But for Devart dll he looks in the GAC! Can the Devart DLL somehow call this?

+6
reference dll visual-studio
source share
5 answers
  • right-click on the reference dll and check if the copy location is local.
  • you can also try reading your links once, this solved a similar problem for me when I converted the VS2005 project to the VS2008 project.
+8
source share

I had a similar problem with external links. The fact is that unused libraries are not copied. Are you using Devart libraries from your projectB? Any instance, inheritance, anything ... ?? Try the following: Install some layout of a class of three libraries in your projectB and recompile. It worked for me. I would like an official explanation.

+11
source share

The problem also arises when you have dlls that are dependent on others. For example, Microsoft.ApplicationServer.Caching.AzureClientHelper.dll is used internally by Microsoft.ApplicationServer.Caching.Client. Despite the fact that I have copyLocal = True, the auxiliary assembly is not copied, because it is not mentioned anywhere directly in my code. To avoid this problem, you can make a private type variable like this:

Type dependOnThisTypeOfAssembly = typeof (TypeFromDependentAssembly);

This will make a reference to the type, and the assembly will be copied locally during the assembly process.

+3
source share

Install as Copy local does not work for me. The only thing that allows (not applicable) is to refer to some type contained in the assembly.

+1
source share

If these DLLs are in a subdirectory of project B, make sure that the Copy Local property for each link is set to True.

Also, if the DLL files are included as files in your project, check the visual studio properties for the files themselves. The assembly action should be set to No, and Copy to Output Directory should be set to Do Not Copy. EDIT: Just using them as links with a copy of local = true will take care of copying.

If these settings are different for different DLLS, this may explain why some of them are copied to the bin folder, while others are not.

0
source share

All Articles