3

With command line, I use /r: to add reference with VS2010 as follows.

csc Program.cs /r:System.ComponentModel.Composition.dll /r:SharedLibrary.dll

How can I add reference in VS2010 IDE?

I tried to right click on the Solution Explorer, then clicked "Add Reference ...", but I can't find the System.ComponentModel.Composition.

enter image description here

prosseek
  • 182,215
  • 215
  • 566
  • 871

1 Answers1

8

The Add Reference Dialog from the Productivity Power Tools is filtering for 3.5 framework assemblies because you're application is undoubtedly targeting 3.5.

The System.ComponentModel.Composition.dll is a 4.0 Framework dll. You can add the reference by browsing to the 4.0 framework folder but this will stop your application from compiling.

Instead you should change the target of your application to 4.0 if you want to use 4.0 features

Conrad Frix
  • 51,984
  • 12
  • 96
  • 155