-
-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using mimekit nuget package (via paket) in common project removes existing System.net.http.dll from other projects referencing common project #482
Comments
|
Might just be a bug in paket (I don't even know what that is). |
paket is an alternative to download nuget packages. Later one is the latest Dll from Microsoft . I don't find Mimekit using System.net.http version 4.3.0 anywhere. |
What's your proposed solution? |
You say your project is .NET v4.7, but what framework version of MimeKit is it using? Is it using the .NET v4.5 version? Or the .NETStandard 2.0 version? Maybe if you make it use the net45 version of MimeKit it'll be fine? I don't know. |
Try installing packages from: https://www.myget.org/feed/mimekit/package/nuget/MimeKit There is no longer an explicit NuGet dependency on System.Net.Http for the .NETStandard2.0 version. Maybe that will fix it? |
I used net45 only and when I use mime core DLLs then it's actually copying the required files at the place but then Mime doesn't work and gives exception as below: Inner Exception 1: Inner Exception 2: |
If you are getting that exception, then you've mixed and matched net45 with netstandard2.0 |
I was giving a try to check if that library works for me but appropriately it's not. So currently I am targetting 4.7.1 NET framework and using net45 library where issue is popping up. |
The reason I asked you to try the MyGet packages was because I removed the System.Net.Http nuget references for the netstandard2.0 framework versions of the assemblies. But if you are referencing the net45 versions of MimeKit and MailKit (btw, you need to be consistent with those 2 libs and use the same framework version of each), then your issue is in your own project and not MimeKit or MailKit for sure. |
Did you ever check the MyGet MimeKit packages to see if they fixed your issue? |
Describe the bug
Mimekit used in common project is removing System.net.http used in dependent project.
Expected behavior
System.net.http.dll should be present in dependent project.
Desktop (please complete the following information):
Additional context
I had added a new reference of mimekit library (added mimekit and mailkit via paket) in common project used by several other projects.
To use mimekit I used below code:
using MimeKit;
namespace Project.Common.Email.Interfaces
{ public interface IMailKitBody
{ BodyBuilder BodyBuilder
{ get; set; }
} }
But while building the complete solution after adding above file, System.net.http.dll is getting removed from one of the dependent projects having reference of common project and another project which actually have a reference of System.net.http.dll.
And as soon as I remove this file from Common then System.net.http.dll starts appearing in the dependent project.
Could anyone help me out how this problem be resolved?
I know Mimekit is dependent upon System.net.http.dll and it could conflict with existing one in dependent projects. I have already tried following things:
-removing System.net.http.dll reference from common
-Setting Copy Local property of DLL to True
-Adding reference System.net.http.dll from package folder
The text was updated successfully, but these errors were encountered: