-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
System.Net.Security doesn't support coreclr #15719
Comments
cc: @ericstj It actually does support CoreCLR. The NET46 target applies generally to all .NET. This package has runtime platform dependency packages attached to it. If you follow the runtime.json inside the package, you'll see the other packages such as runtime-System.Net.Security-win7 and other packages for *Nix etc. |
Are you talking about the DLL? That's irrelevant. It's in the wrong folder regardless. |
The packaging is correct, you are looking at the reference package. To pull in the implementation you need to make sure you set a Most of the implementations are in the runtime specific packages defined by runtime.json in both the reference package ( You noticed the @benaadams can you let me know if you are actually having any trouble using the package after following my suggestions? |
I guess that image is only showing the lib no ref. |
@ericstj I just had the workaround break. This was a dup of https://github.com/dotnet/corefx/issues/4230, correct? I put my question over there. I've had to go back to Is that a package name change?
to
... that might explain why it broke for me. |
No |
@ericstj Ah, I see. Any idea then why this used to work ...
... but doesn't now. [EDIT] Answered at https://github.com/dotnet/corefx/issues/4230#issuecomment-157106465 |
ref folder does has it, VS tooling doesn't understand a Having a little investigation to see if there are other issues. |
@guardrex When you say "doesn't work" can you elaborate on the mode of failure? In the other thread you mentioned using a beta8 DNX. That would result in runtime issues due to torn state. @benaadams share your |
@ericstj It throws this again ... like before I had the
|
@guardrex can you share your |
@ericstj Sure ... brb with it. |
Project json {
"version": "1.0.0-*",
"description": "AgeOfAscent.Space Console Application",
"authors": [ "Ben" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"dependencies": {
"Microsoft.AspNet.Server.Kestrel": "1.0.0-*",
"Microsoft.AspNet.Server.Kestrel.Https": "1.0.0-*",
"Microsoft.AspNet.WebSockets.Server": "1.0.0-*",
"Microsoft.AspNet.WebSockets.Protocol": "1.0.0-*",
"Microsoft.Extensions.Logging.Console": "1.0.0-*",
"Microsoft.Extensions.Logging.Debug": "1.0.0-*"
},
"content": "space.aoa.pfx",
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel --server.urls=http://*:80;http://*:443"
},
"compilationOptions": {
"allowUnsafe": true
},
"frameworks": {
"dnxcore50": {
"dependencies": {
"System.Runtime": "4.0.21-*",
"Microsoft.CSharp": "4.0.1-*",
"System.Collections": "4.0.11-*",
"System.Console": "4.0.0-*",
"System.Linq": "4.0.1-*",
"System.Threading": "4.0.11-*",
"System.Threading.Thread": "4.0.0-*",
"System.Threading.Tasks.Parallel": "4.0.1-*",
"System.Numerics.Vectors": "4.1.1-*"
}
}
}
} lock |
It also got upset when I didn't have |
@ericstj I changed it back to ...
... packages and VS auto-restored everything. I ran the app and confirmed the "could not load file or assembly" exception. Here is the |
@benaadams I can't access your gist. @guardrex what runtime are you running on? The lock file has an implementation dll in both
With both of those present it tells me that DNX should be picking that up for those RIDs at least. If you were running on a different RID or TFM that might explain it. Just examining the diff between 23405 and 23409 the difference is that in 23405 we used a single package for all platforms (no unix support) and in 23409 it split it out into multiple packages per OS. That points to a problem with the RID being used by DNX not picking up the right target section in your lock file. /CC @davidfowl @anurse |
@ericstj missed out a 0 should be ok now |
There's a "System.Net.Security/4.0.0-rc2-23513": section that doesn't have a runtime? Though there is also a ""runtime.win7.System.Net.Security/4.0.0-rc2-23513" that does. And also a "System.Net.Security/4.0.0-rc2-23513" section that has all the files |
@benaadams yours looks fine just like @guardrex. The packages are providing an implementation DLL for this assembly on all targets listed in the lock file. I think we need someone from DNX to tell us why they aren't loading it. @davidfowl @anurse. If you guys want to do more self diagnosis you can look at the log spew from DNX run to see if it echos which RID and TFM it is using, thus confirming whether or not it is looking at the right PS: @benaadams you are looking at different sections of the lock file. The way to digest this is the |
No sure how get get the log going? Tried running in VS to scoop the output and its happy; but packaged is unhappy |
What do you mean by this? It sounds like its working for you in VS but not from the commandline, is that true? That would point a problem with the different versions of DNX you are using. You should be able to use DNX run on the project from the commandline to see the output. You had a partial screenshot of it at the beginning of this thread. I'm looking for the whole thing. |
I:\aspnet\approot>dnvm use 1.0.0-rc2-16177 -r coreclr -a x64 I:\aspnet\approot>web Unhandled Exception: Microsoft.AspNet.Server.Kestrel.Networking.UvException: Error -4082 EBUSY resource busy or locked |
@ericstj The app is
I guess I can make Output detailed in VS to see that spew while running locally ... is that right? |
Also I package with the following if that is of help
|
@ericstj Oh ... well I just found out it runs locally just fine. The exception comes up when I run it on the server. Does that mean anything? btw-- I'd be happy to dig deeper on it. I'm not sure what you mean about determining which RID and TFM ... and espeically how to get that info while on 2012R2. Would it help you if I put up a proj that demos the exception? |
RID is the runtime ID that DNX uses for execution and deployment, EG: win7-x86, win8-x64, etc. RID represents the target OS and architecture to use during package resolution. Both of these need to be correct and match what appears in the targets section lock file. If they don't match then it could mean you end up running on something different than you'd expect. I dug into the dnx publish code a bit and it looks like it determines TFM and RID from the runtime you pass in as the --runtime option: https://github.com/aspnet/dnx/blob/9430fbabc6db3b6feb93bbf4997e6764514176fb/src/Microsoft.Dnx.Tooling/Publish/PublishManager.cs#L137 If not specified it looks like it would default to some default. I suspect you're getting the right values when publishing in VS but not when publishing from the command line. |
Assume it did all runtimes declared when not specified? Will specify am only using one :) Wrong arch maybe? |
Arch shouldn't cause it. Wrong framework (DNX vs DNXCore) might. Also a RID that wasn't present in the lock file would (win10-x86 for example) or a RID that wasn't part of the RID graph if they happen to be re-restoring on publish. I'm still waiting for @davidfowl or @anurse to chime in here and explain what's going on during publish. I'm just digging through DNX code to try to find out where this problem is. Seems at the very least there should be logging around this. If we don't hear from them on this thread I reccomend moving this issue over to the DNX repo. |
I'd rather not change the project file... just delete the lock file to force a new one. |
Oh, ok, I just want to make sure that MSDeploy picks up that the file has changed so it will sync for sure. |
Well, that's just outright bizarre ... The Output window is showing the file getting synced ... Locally, the file looks like this ... On the server, the timestamp seems to show the file was updated ... but it looks like it changed the file ... restored packages itself ... Am I even looking at the correct file? |
It looks like you're comparing your project's source lock file with the published output. Those are expected to be different. I thought you said the local publish output lock file and the server lock file were different? Either way, can you post the latter file, the one in the publish output? |
Sure ... brb no ... you are correct. I wasn't looking at the one in the output folder ... my bad. I'll get the publish (the output folder) lock file now. |
good ... 406K ... I'm not going crazy now. have it up in a sec. |
lol, no worries ;) |
Ok, so. This is without |
Actually, I do have that now following what @ericstj said. I can confirm failure with
and the lock file I posted (that one I just put up) was with that setup. |
Hmm, that's very strange because it should at least appear in the lock file if you have it in your project.json. Can you post (yet more stuff ;)) your original project.json? Also, the publish output should have a packages folder, can you check if Microsoft.NETCore.Platforms is in there and what the content is? |
The original Yes ... and yes ... |
It's on the server, too. |
Ok, so to recap, this app works fine locally, but when you publish and deploy to the server, it does not work (failing to load System.Net.Security). I'm working on trying to track down why that could happen. Out of curiosity mostly, can you try running the app from the publish output on your local machine? I'd expect it to fail there as well (thus taking the server machine basically out of the equation) |
Yes. Correct. ok ... I'll try ... brb |
Ok, I can repro something on my box which is a very good thing. The publish process does seem to be truncating the |
Do you need anything else from me? Can I kill those files I posted? I was going to head out and be back in the office around 2-3pm PST. I can pickup when I get back if there is more you need me to do. |
I think I'm good. Go ahead and kill the files, I've got copies and I should be OK without them. Thanks so much for your help gathering data! |
Oh, no prob at all. Happy I could help. I'll be back in ~3 hours if there's more to do. Later --- |
We've identified the issue and are working on a fix. I don't know exactly what form it will be released in though, so stand by on that :). |
@guardrex I am going to close this out since it was a DNX issue: aspnet/dnx#3183 |
Hi there :) "dependencies": { "frameworks": { But the class is "Not available for .Net Plateform 5.4", how can I fix it ? Did I went wrong somewhere ? |
I also have the error: "Could not load file or assembly System.Net.Security Version=4.0.0.0" when deploying an asp.net core app inside a docker container. If I reference: "System.Net.Security": "4.0.0-beta-23516", If instead I reference: "System.Net.Security": "4.0.0-rc2-23826", (taken from the aspnetcidev feed) Any hints please? |
Shouldn't be restoring in docker? |
it should, but I suspect is missing a (native) dependencies ... I don't know how to get a better diagnostics. |
It targets .NETFramework 4.6 but not .NETPlatoform 5.4/netstandard 1.3 or dnxcore5.0
Myget feed
Libs installed
Error using
The text was updated successfully, but these errors were encountered: