Search code examples
c#visual-studio-2010class-library

Referenced class lib doesn't seem


I have a class lib and I referenced it to another windows project. I added its namespace to my Form.cs (using SaglikNetClassLib;). they are seem unknown when I want to access to classes. I can see their properties and methods. But the complier says "Error 7 The type or namespace name 'SaglikNetClassLib' could not be found (are you missing a using directive or an assembly reference?), Do you have any suggestion?

KR,

Çağın

enter image description here


Solution

  • Are you targeting the .net Client Framework? Visual Studio let's you add references to incompatible assemblies, but then gives exactly that error.

    Check your project settings to make sure you're targeting the full .net framework.

    Also, check that the Ilalcar class is public and not internal (which is the default if it's only declared as class without any modifier)