开发者

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 assemb开发者_StackOverflow中文版ly reference?), Do you have any suggestion?

KR,

Çağın

Referenced class lib doesn't seem


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)


You probably need an using statement to put the class into scope.

using SaglikNetClassLib;

C# won't auto suggest it if the project has not been rebuild. Also make sure the class library project has been build before using it in code.

Intellisense seems to lag behind a bit at times. Simply pressing f5 (run) sometimes rebuilds the project completely and simply runs or gives a better error message.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜