dotnet publish --configuration Release --runtime win81-x64 --framework "net451"



The page just kept loading
P.S: Hositng using netcoreapp1.0 is absolutely working fine.

By quickly looking at the log, I'd say that's because the native Libuv DLL cannot be found.
Sadly, I have no idea why it's happening. I'd recommend pinging someone from the ASP.NET team (e.g @moozzyk, who's the "IIS publish" specialist :smile:)
The Application log Error code is the same one that is received for ...
If you published a self-contained application, confirm that you didn't set a platform in buildOptions of project.json that conflicts with the publishing RID. For example, do not specify a platform of x86 and publish with an RID of win81-x64 (i.e., dotnet publish -c Release -r win81-x64). The project will publish without warning or error but fail with the above logged exceptions on the server.
It's not likely that that applies here, so I'm all :ear:'s on the cause of this, because I'd like to distinguish between these two exceptions in the IIS doc.
No. The platform is not set.
"compilationOptions": {
"debugType": "portable",
"emitEntryPoint": true,
"preserveCompilationContext": true
},
Another info that i would like to add is when i published using netcoreapp1.0, i got the following folder structure
refs
runtimes
Views
wwwroot
But with net451, runtimes folder is missing.
Can you try running your application without IIS? I expect it will fail the same way. If it does, can you check (e.g. using process monitor) where it is trying to load libuv from? Is libuv.dll there? There can be a few causes of failing to load a dll - from the library not being in the target path to missing dependecies to bitness mismatch.
Looks like the issue is in dotnet publish where libuv.dll is not published if you publish for full .NET and non-win7-x64 RID: https://github.com/dotnet/cli/issues/2956. For now stick to --runtime win7-x64
Ah great, that explains why I was unable to reproduce it on my Windows 7 machine, since I was using win7-x64 and not the buggy win81-x64 :smile:
Thanks for investigating :clap:
Closed as external.
Adding the
"Microsoft.NETCore.Platforms": "1.0.1-*"
dependency to the project.json of Mvc.Server seems to make it publish including the native dependencies as it provides a runtime.json that defines the needed #import definitions.
@dasMulli Indeed ... yes! I should have looked earlier. The deps do not pull ...
Microsoft.NETCore.App, so there is no pull on NETStandard.Library, so there is no pull on Microsoft.NETCore.Platforms, so ... :boom:
[EDIT] I could expand the guidance for Publishing to IIS to include this. /cc @shirhatti, would you like me to add this? ... or do you feel that this really isn't an IIS-thingy? It is kind'a more of a bug in the app dependencies that results in an app that can't run. On the other hand, the current exception for that error code is there because publishing with a platform bitness difference from the publish RID results in this exception. It could be that a dev has the right platform and the right RID and is publishing correctly but will hit this because their deps don't include the platforms package. Of course, that also means that they didn't follow the samples ... something we hope devs will not do.
Reopening, as we'll have to fix the samples to include the Microsoft.NETCore.Platforms package under net451/dependencies.
This appears to still be broken for net451.
You should spend 2 or 3 minutes trying to explain what doesn't work exactly. Or maybe it was just some random rant? :smile: