简体   繁体   中英

C# class library reference

I have created a class library with target framework 4.0 and some classes in it that deal with database connections for SQLite.

Now I want to use that class library in another project, to have it connect to databases, query data, update rows and so on.

But when I "add reference" in the testproject, it seems "empty", ie in the object catalog, I cannot expand the referenced library.

And when typing the using statement, it says it is not known namespace.

What is wrong? Please help.

愚蠢的问题,但你的外部装配中的类肯定是​​公开的吗?

In the 'Solution Explorer' Right Click 'References' and then select 'Add Reference'.

http://msdn.microsoft.com/en-us/library/wkze6zky(v=vs.90).aspx

Your assembly may be using code that requires the full .net profile instead of the client .net profile. Try changing the profile of the new project from Client to Full and see if that helps.

The solution was making the classes in den external assembly public.

Just forgot about that, after moving classes from testproject to classlibrary. Thank you for helping!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM