VS2015 C#生成dll文件的方法(32/64)

Bena ·
更新时间:2024-09-21
· 677 次阅读

下面就为大家分享一下在vs2005中生成dll文件的步骤图文版

新建项目> 模板 > windows > 类库

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ClassLibrary2 { public class Class1 { private int _age; public int Age { get { return _age; } set { _age = value; } } } }

当然代码根据自己需要写,要不就参考 //www.jb51.net/article/69020.htm

右键 生成

然后 通过 在文件资源管理器中打开文件夹找到生成的dll文件

VS2015生成64位dll文件

导入自己的源文件,准备生成DLL文件。也可以自己创建。
右键项目,进入属性,修改Configuration Type 为 DLL。

修改为64位,Configureation Manager ->

->Active solution platform ,x新添加一个x64。 下面的会自动变为x64.

然后运行,会生成一个x64\debug的目录,里面即为64位DLL.

错误集:
1. Error D8016 '/ZI' and '/Gy-' ......

解决:Debug -> c/c++里,修改为Program Database(/Zi).

2.LNK2001,LNK2019,添加两个静态库。ws2_32.lib" , "winmm.lib。

您可能感兴趣的文章:C#生成DLL文件的方法小结C#生成DLL文件的方法c++生成dll使用python调用dll的方法C++生成dll和调用dll的方法实例手动把asp.net的类生成dll文件的方法用VB生成DLL封装ASP连接数据库的代码VS2010下生成dll的方法



C# dll 方法 dll文件

需要 登录 后方可回复, 如果你还没有账号请 注册新账号
相关文章