my error is
The type or namespace name 'commonlib' could not be found (are you mi开发者_运维知识库ssing a using directive or an assembly reference?)
commonlib.DBManager DM = new commonlib.DBManager( ConfigurationManager.ConnectionStrings["Data Source=PERFORMA-18ACD7;Initial Catalog=silk1;Integrated Security=True"].ConnectionString);
Having few info, you forgot to add some assembly reference where commonlib namespace and DBManager class lives in.
That is not a standard assembly / namespace, so it sounds like (as the error message is already telling you) you are missing a reference:
are you missing a using directive or an assembly reference?
If "commonlib" is something of yours, check that this project has a valid reference to it. If the code isn't yours, then you'll need to find what "commonlib" referred to, and either track, re-implement, or excise it.
If you are migrating from VB.NET code, this could just be a case-sensitivity issue, i.e. it might be CommonLib.DbManager
, not commonlib.DBManager
.
精彩评论