简体   繁体   中英

Copy referenced project's dependency .dll's to target output with Visual Studio 2013

I have an application project App.csproj which has a reference to BaseLib.csproj . BaseLib uses some DevExpress third party libraries and contains references to the thrid party libraries. App does not directly use the DevExpress libraries so does not need a direct reference to the third party libraries. This is the reference list for BaseLib .

BaseLib参考清单

When I build the application, I want the DevExpress libraries to be copied over to the target directory so it will successfully execute. I don't want to introduce a build event since it is something else to maintain - I'd like the maintenance to be localized to the BaseLib project.

This partially works now. I have 7 references and 5 of the .dll's will copy over (NavBar and Office2007 does not). The difference is that BaseLib.dll contains these statements for the 5 that do copy but they are not present for the 2 that do not (output from ildasm ).

.assembly extern 'DevExpress.Xpf.Grid.v13.1.Core'
{
  .publickeytoken = (B8 8D 17 54 D7 00 E4 9A )                         // ...T....
  .ver 13:1:4:0
}
.assembly extern 'DevExpress.Xpf.Grid.v13.1'
{
  .publickeytoken = (B8 8D 17 54 D7 00 E4 9A )                         // ...T....
  .ver 13:1:4:0
}

So, how can I get the other 2 included? All the settings are the same in the properties tab. The other 2 were added at a later time if that makes a difference.

Just to note, this is a followup to these two questions ( Copying a DLL's dependencies in Visual Studio and Msbuild doesn't copy references (dlls) if using project dependencies in solution ).

After a little more information, I was able to determine that 2 missing .dlls had components that were only referenced via XAML and not in code behind. If I added a reference in C# code, then the .assembly directive would be added for that module.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM