为什么我的类库不被引用? [英] Why would my Class Library not get referenced?

查看:192
本文介绍了为什么我的类库不被引用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个类库文件,不是没有得到,当我把它添加到参考和bin文件夹。

I have a class library file that is not is not getting picked up when I add it to the reference and bin folder.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace SecuritySettings
{
     public class Security
     {
          ...
          public Security()
          {...}    
     }
}

场景或其他?

推荐答案

尝试检查您的.csproj fie(在记事本中打开)以确保路径正确。

Try checking your .csproj fie (open in notepad) for the reference and ensure the path is correct.

此外,不要将文件直接复制到bin文件夹(这是基本上糟糕的,因为这是Visual Studio deploy构建的dll文件夹),创建一个新文件夹在您的项目中(例如名为libs的文件夹),并从中引用它。

Also, instead of copying the file directly into the bin folder (which is genrally bad as this is the folder Visual Studio deploy built dll's into), create a new folder in your project (for example a folder called 'libs') and reference it from there.

这篇关于为什么我的类库不被引用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆