0

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.

Reference list of 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).

Community
  • 1
  • 1
doobop
  • 4,465
  • 2
  • 28
  • 39
  • MSBuild cannot copy assemblies that are not referenced with a .assembly directive. That's where it ends, do something [like this](http://www.devexpress.com/Support/Center/Question/Details/Q272041). Also the place to get help from the vendor. – Hans Passant Feb 25 '14 at 21:45
  • BaseLib is my assembly. I just don't know how to generate the other two .assembly directives in BaseLib.dll. Visual Studio should do this based on the reference list, yes? Thanks. – doobop Feb 25 '14 at 23:27
  • You probably can't. They are the kind of assemblies that quack like "if it is available then I'll use it". Like plug-ins. So the C# compiler never actually sees a type from the assembly being used, plug-ins use reflection. Easier for the library vendor, they have less ways that their code will fail to compile. Not so easy on a programmer that bought the library because they don't want to know how it works. – Hans Passant Feb 25 '14 at 23:47

1 Answers1

1

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.

doobop
  • 4,465
  • 2
  • 28
  • 39