且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何添加PDFsharp LIB在C#中?

更新时间:2023-02-12 21:50:32

如果您希望使用包含库这个库,你需要添加一个引用到组件(DLL)。要添加引用只需右键在解决方案资源管理器中点击你的项目,选择添加引用,您将有一个标签式对话框,允许您将引用添加到在GAC中的dll,其他项目在解决方案或浏览到位于任何地方的DLL您PC。

If you wish to use this library you need to add a reference to the assembly (dll) that contains the library. To add references simply right click on your project in solution explorer and select add reference, you will then have a tabbed dialog box that allows you to add references to dlls in the GAC, other projects in your solution or browse to dlls located anywhere on your PC.

所有你看到的文件夹是源代码,并且告诉你如何利用图书馆的样本项目。如果打开一个包含在代码的根目录下的BuildAll-PdfSharp.sln,您将能够建立PDFSharp并获得DLL。这将是该文件夹的用户代码PdfSharp\bin

All the folders you see are the source code and sample projects that show you how to use the library. If you open the "BuildAll-PdfSharp.sln" which is contained in the root of the code directory you will be able to build PDFSharp and get the dll. It will be in the folder user code PdfSharp\bin

一旦你有了你可以浏览到光盘上的DLL的位置添加到您的解决方案的DLL。当我添加第三方库项目中,我在那里所有的DLL都放在我的工作文件夹的根目录下的lib文件夹。引用这些项目中的文件,然后使用相对路径,并提供给其他人时,他们从你的源代码库中的最新的项目。

Once you have the dll you can add it to your solution by browsing to the location of the dll on disc. When I add third party libraries to my project I have a lib folder at the root of my working folder where all the dlls are placed. References to these in the project files then use relative paths and will be available to anyone else working on the project when they get the latest from your source repository.