-
-
Notifications
You must be signed in to change notification settings - Fork 830
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
Support for CoreCLR #212
Comments
I'll happily accept a csproj file to build for Core CLR but I don't want to add support for loading default settings from environment variables - it just would not fit nicely with the API. |
if you could send me an empty Library Project .csproj file for CoreCLR, I can probably commit them in a few minutes (I'm betting it compiles without any (or very few) changes). Note: I'd do this myself if I was 1. using Windows and 2. had VS 2015 installed, but I'm on a Mac. |
Actually, can't you just reference a .NET4.5 assembly and be done? |
There are two different run times, the core clr can't reference .net 4.5/4.6 assemblies |
Vnext won't support web.config/ will have generic configuration that runs off anything (environment variables, json, ini, etc) |
Okay, well, if you can get me a blank Library Project template, I can probably copy/paste the |
Do you mean you want a DNX project? |
Yes, DNX which uses a new project format too. |
You can already reference MimeKit and MailKit from DNX projects in VS2015 (I just tested this). |
@jstedfast it only works for the Desktop .NET target, but not for the .NET Core based one, which is what this issue was about: |
Ah, thanks. What's the correct way to create a .NET Core project in VS2015? The NewProject templates I see don't make it obvious (to me, at least). |
@jstedfast If you create a new "Visual C# > Web > Class Library (Package)" project, that should give you the refactored BCL packages in project.json with the new That uses the DNX project system though, I believe there'll be a way to make a csproj targeting .NET Core in the future. |
Thanks, I'll give that a go |
Hmmm, having trouble getting this to work because it wants to slurp up every file in the directory whether I want to include it or not. The only solution I can think of is using symlinks... |
@jstedfast you can include/exclude patterns of files in |
oooooohhhhh, thanks. I'll give that a try. |
@jstedfast that looks like the incompatibility with the Xamarin Tools: https://github.com/dotnet/corefx/issues/449. Uninstall them and it should work (builds fine here). |
Ah, hmmm, how am I going to create a nuget with all these? if I have to uninstall the Xamarin stuff? :( |
I think that's just a point in time thing until the incompatibility is fixed? btw. you can turn on producing a .nupkg from "Properties > Build > Produce outputs on build". |
@jstedfast Here's an interesting blogpost about how to target .NET Core without DNX: http://oren.codes/2015/07/29/targeting-net-core/ |
I just came across this while researching how to send mail in dnxcore50. It seems that getting mailkit/mimekit to work would be the best hope since there is no system.net.mail in the current corefx and it won't be there at the 1.0 release and no timeline has been given for when they will port that. It seems like very important functionality for any web app to send email so I'm kind of surprised MS hasn't given it higher priority. MailKit/MimeKit looks far superior to system.net.mail anyway. I guess the only 3rd option is to use REST apis from 3rd party email services, but I think it will be a big disappointment to many people trying to port their web apps to dnxcore50 when they find there is nothing available to easily send email. I would be glad to help in any way that I can to assist in getting these projects ported. Looking at the code I don't feel like I'm qualified to solve it or send a pull request. But I do know about the new project system and how to resolve errors like the ones in the screenshot you posted so maybe I could help a little. There is a new .xproj file and a project.json file that are the main new things. The project.json file has all the nuget dependencies, framework targets and dependencies and meta data about the project. VS 2015 will automatically restore the dependencies if you edit project.json to add dependencies. you can also use
from the command line in the project directory to restore nuget dependencies. The build output in the new system is a nuget package per project. VS 2015 will create the nuget package for you based on the project.json file. I'm sure there is also a command line way to do it and vs is just automating that stuff. Those errors you had in the screenshot look likely related to some problem in the project.json file. If there is anything I could do to assist you in any way please let me know. If there was a kickstarter to raise money to make it worthwhile for you to work on this as a priority to get it done I would be willing to make a small donation and I'm sure others would too. |
I actually plan to look into this again soon. Hoping the incompat between Xamarin and DNX is gone now. |
That is great news! If you run into unexpected errors please post them and maybe I can help. |
If you can figure out why this is failing, that'd be helpful: https://ci.appveyor.com/project/jstedfast/mimekit/build/1.2.16.191 Also, how do I restore nuget packages in VS2015? |
I just got a report last night that SslStream.AuthenticateAsClient() is missing in nightly builds of RC2, so I might need to use some other solution for SSL/TLS. Hopefully that's just a bug, though. |
I'm still on RC1 here. Seems like the error would be missingmethodexception if that were the problem.
|
@jstedfast the sync versions were removed (dotnet/corefx#4868), only the async versions like AuthenticateAsClientAsync remain. |
@joeaudette Sorry, I didn't meant to say that the reason for the failure in your case was a missing method, just that there seems to be development going on around AuthenticateAsClient and thus the disappearance of that method from RC2 might be related. @akoeplinger ah, thanks. |
so, what should I do at this point, just wait for coreclr RC2 to be released and try again? |
So one place where that error can be thrown from what I can tell is if you connect to a plain-text port and then try to send an SSL handshake (which is what AuthenticateAsClient does). Is it possible that you are connecting to a non-SSL port? |
I'm testing against elastic email smtp relay using port 2525 which they say is a TLS port, but it looks like there are a few supported ports so I could try one of the others, though in my account settings there they indicate 2525 specifically. It appears they have alternate non ssl settings I can try on port 25. I'll report back after trying a few things. |
Sometimes when someone claims a port is a "TLS" port, what they mean is that the client should send a STARTTLS request to toggle into TLS mode, but until then, it is a plain-text port. I don't know if that's the case here or not. |
is there a way I can try that? |
yea, just change your |
I got the same error trying with SecureSocketOptions.StartTLS It did work when I changed to use the non ssl settings though that is not ideal. I will experiment with the other ssl ports they provide. |
Okay, so it sounds like 2525 might really be an SSL-wrapped port (e.g. you need SSL/TLS immediately when you connect after all). Sadly I'm not sure how to work around this issue unless I can just make the code use AuthenticateAsClientAsync() and it'll magically work. |
Good news, when I switched to port 465 it worked with ssl! |
Thanks for your great support! |
Hi @joeaudette and @jstedfast! Thank you in advance!! |
I have some example code here that works https://github.com/joeaudette/cloudscribe/blob/master/src/cloudscribe.Messaging.Email/EmailSender.cs |
Thank you @joeaudette . I'll check it out. I the mean time, I opened an issue (#293) because I'm having a Thank you! |
I can't install MailKit in a ASP.Net 5 Class Library that targets the framework dotnet5.4.
Can you add support for that? |
|
@michielpost Unfortunately, dotnet54 is missing System.Net.Sockets (and I think a few other APIs) that would make it impossible to support MailKit on. Perhaps I can try adding support for net451, though. |
FWIW, if you bump your class library to dotnet5.5, you can install MailKit. |
Thanks. I thought dnxcore50 supported exactly the same as dotnet5.4. Using dotnet5.5 now and that works. Didn't know that, thanks! |
I think the project needs to update for RC2 to "netstandard", old name was "dotnet". Also when changing tfm to netstandard1.x, the core packages need to be updated from here: https://github.com/davidfowl/NetStandard/blob/master/packages/corefx.json - that is curated list of RC2 core packages. |
rc2 has not been released yet |
It got released yesterday. |
Yep, I know. I'll make a new release this weekend when I have enough time to sit down and install all of the updates :) |
I've already updated my projects to ASP.NET Core RTM, and MailKit/MimeKit seem to be working fine for me, I'm able to send email. |
Hey guys, I ended up installing the Core updates last night and was able to make updated releases of MimeKit and MailKit 1.4.0 this morning to nuget.org. Enjoy! :) |
Awesome! Thank you! |
Will there be any support for the new core clr?
https://aspnet.uservoice.com/forums/252111-asp-net-vnext/suggestions/7648077-corefx-should-include-system-net-mail
Also, it would be sweet if we could configure this library with smtp defaults via environmental variables as this is a part of vnext.
The text was updated successfully, but these errors were encountered: