I'm having an issue with Devart DLLs not getting copied to the bin folder of my web app. I have my web app project that references projectA. ProjectA references projectB. The Devart Dlls are used in projectB and are not being copied into the web app projects bin folder during a build. ProjectB also references EL Unity dlls and they are being copied correctly. All of the Dlls in question are physically located in a folder in projectB and that is where the reference point. (I don't have the references pointing to the GAC)
The dlls that copy correctly are Microsoft.Practices.Unity, Microsoft.Practices.Unity.Configuration and Microsoft.Practices.ServiceLocation.
The dlls that are not being copied correctly are Devart.Data, Devart.Data.Oracle and Devart.Data.Oracle.Design.
Here's the references 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>
Anyone else having this issue? Am I doing this wrong? Thanks
EDIT I opened a file monitor and watched where visual studio was loading the reference and for Unity it was getting the dlls from the location I specified. But, for the Devart dlls it's looking in the GAC! Could the Devart dlls be causing this somehow?
I had a similar problem with external references. The thing is that the unused libraries are not copied. Do you use the Devart libraries from your projectB? Any instance, inheritance, anything, ...?? Please try this: Instansiate some mock class from the three libraries in your projectB and recompile. It has worked for me. I would like get to the formal explanation.
- right click on the referenced dlls and check if copy local is true.
- you can also try readding your references once, this had resolved a similar problem for me when i had converted a VS2005 project to VS2008 project.
The problem appears too when you have dlls that are dependencies of others. For example Microsoft.ApplicationServer.Caching.AzureClientHelper.dll is used internally by Microsoft.ApplicationServer.Caching.Client. Even though I have copyLocal = True the helper assembly is not copied because it is not referenced anywhere directly in my code. To avoid this problem you can make a private type variable like this :
Type dependsOnThisTypeOfAssembly = typeof(TypeFromDependentAssembly);
This will make a reference to the type and the assembly will be copied locally while in the build process.
Set as Copy local doesnt work for me. The only thing that resolves (is unusable) is to reference some type contained in assembly.
If these DLLs are in a sub-directory for project B, make sure the "Copy Local" property for each reference 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 "Build Action" should be set to "None" and the "Copy to Output Directory" should be set to "Do not copy". EDIT: Simply having them as references with copy local = true will take care of the copying.
If these settings are different for the different DLLS, that could explain why some are being copied into the bin folder and others are not.
精彩评论