I am just beginning to use the MailSystem.NET library. However, I cannot figure out where to add the .dll files so I can reference the namespaces in my classes. Can someone please help me? I am using Visual Studio 2010. Thank you for any information, there is so little online.
Copy the downloaded DLL file in a custom folder on your dev drive, then add the reference to your project using the Browse button in the Add Reference
dialog.
Be sure that the new reference has the Copy Local = True
.
The Add Reference
dialog could be opened right-clicking on the References item in your project in Solution Explorer
UPDATE AFTER SOME YEARS
At the present time the best way to resolve all those problems is through the
Manage NuGet packages menu command of Visual Studio 2017/2019.
You can right click on the References node of your project and select that command. From the Browse tab search for the library you want to use in the NuGet repository, click on the item if found and then Install it. (Of course you need to have a package for that DLL and this is not guaranteed to exist)
For Visual Studio 2019 and onward you may not find Project -> Add Reference option. Use Project -> Add Project Reference. Then in dialog window navigate to Browse tab and use Browse to find and attach your dll.
You probably are looking for AddReference dialog accessible from Project Context Menu (right click..)
From there you can reference dll's, after which you can reference namespaces that you need in your code.
Another method is by using the menu within visual studio. Project -> Add Reference... I recommend copying the needed .dll to your resource folder, or local project folder.
Project->AddReference will work if your DLL is a project in your solution.
In the editions of Visual Studio, a Browse option may not be available.
Browse is not available for C++ projects unless the Common Language support is enabled. For many C++ projects you may not want to enable this feature.
If Browse is not available, then your best bet is to copy the required DLLs to a folder in your solution and ADD THEM AS EXISTING ITEM to your project.
Then modify the properties of the item.
Set "Excluded from Build" to NO Set "Content" to YES Set "Item Type" to Copy file.
As other posters have suggested, you can also copy the DLL(s) directly to your Release or Debug folders.
That works just fine - unless you clone a fresh copy of your project from Git and find that Debug and Release folders are normally excluded and won't be in your new copy.
Or if NUGET is available with the required DLL, then use NUGET to obtain the DLL.
© 2022 - 2024 — McMap. All rights reserved.