2

I added a assembly as reference to my project, I imported its namespace with a using directive, and no problem occurs; IntelliSense finds the namespace, too.

When I try to compile the solution or go into debug mode, suddenly this error appears:

Cannot find the type or namespace name BrightIdeasSoftware; probably missing a using directive or an assembly reference.

How is this possible?

stakx - no longer contributing
  • 83,039
  • 20
  • 168
  • 268
Gasta87
  • 225
  • 5
  • 16
  • 1
    Where is the DLL? I don't suppose you put it in the *output* directory, did you? (The output directory which will be cleaned when you build...) – Jon Skeet Jul 31 '13 at 20:21
  • Try selecting the reference in the Solution Explorer, and changing the Copy Local property to True (and maybe try the Embed Interop Types too) – Alfie Jul 31 '13 at 20:23
  • I try to put the DLL there and out in another directory, but same result! Now is inside the debug folder, so close to the exe file! – Gasta87 Jul 31 '13 at 20:25
  • @Alfie Error 1 Can not embed interop types of the assembly because it lacks the attribute 'ImportedFromTypeLibAttribute' or attribute 'PrimaryInteropAssemblyAttribute' no way! – Gasta87 Jul 31 '13 at 20:28
  • @Hans Passant you are right! the problem was the client profile! The question is resolved! may thanks! – Gasta87 Jul 31 '13 at 20:32

0 Answers0