+3 votes

Hi

My C# project frame work version is 4.0. When I add Mail.dll for my project. The following name spaces are not accessing and showing compilation errors.
can you help me?

using Limilabs.Mail;
using Limilabs.Mail.MIME;
using Limilabs.Mail.Headers;
using Limilabs.Client.SMTP;

by
edited by

1 Answer

0 votes

Yes, Mail.dll supports almost all .NET framework versions (except .NET 1.1, and .NET client profile).

It can run on: .NET 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1 and 4.5.2 and Mono.

If you use nuget package appropriate version is referenced automatically.

If you're adding library reference manually, you need to choose appropriate version yourself: in the Redistributes folder there are 2 subfolders: Net20 and Net45:

  • Use Net20 version for frameworks: 2.0, 3.0, 3.5, 4.0;
  • Use Net45 version for frameworks: 4.5, 4.5.1, 4.5.2 and above.

There is no difference between those two assemblies, simply different .NET target is used during compilation.

Mail.dll always runs on the framework you use in your application or have installed on your machine. .NET 4.5.2 can use .NET 2.0 assemblies, and they run in .NET 4.5.2. There is no performance or security impact referencing assembly compiled using previous .NET version.

by (297k points)
...