sdk icon indicating copy to clipboard operation
sdk copied to clipboard

dotnet.exe doesn't work on Nano. (unless three dlls are copied advapi32.dll, kernel32.dll and shell32.dll)

Open sivagms opened this issue 10 years ago • 31 comments

Steps to reproduce

Nano Machine - TP5 build Unzip https://dotnetcli.blob.core.windows.net/dotnet/beta/Binaries/1.0.0-rc2-002678/dotnet-dev-win-x64.1.0.0-rc2-002678.zip dotnet --version

Expected behavior

command should return success.

Actual behavior

[10.209.36.6]: PS C:\tmp\dotnet> .\dotnet.exe --version .\dotnet.exe : Failed to load the dll from [C:\tmp\dotnet\shared\Microsoft.NETCore.App\1.0.0-rc2-3002678\hostpolicy.dll], HRESULT: 0x8007007E + CategoryInfo : NotSpecified: (Failed to load ...ULT: 0x8007007E:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError

An error occurred while loading required library hostpolicy.dll from [C:\tmp\dotnet\shared\Microsoft.NETCore.App\1.0.0-rc2-3002678]

Environment data

1.0.0-rc2-002678

Bascially dotnet.exe doesn't work on Nano as is. However this works if three dlls are copied to the dotnet folder: advapi32.dll, kernel32.dll and shell32.dll

sivagms avatar May 09 '16 23:05 sivagms

@refaati Why is this an issue if reverse forwarders are present?

gkhanna79 avatar May 09 '16 23:05 gkhanna79

@sivagms Which build of Nano are you using and where are you copying those 3 binaries from?

gkhanna79 avatar May 09 '16 23:05 gkhanna79

CC @schellap @piotrpMSFT

gkhanna79 avatar May 09 '16 23:05 gkhanna79

Nano Version: 10.0.14338.1000 I'm copying the dlls from C:\Windows\System32\forwarders\

sivagms avatar May 09 '16 23:05 sivagms

@sivagms Are you copying them from Nano image itself?

gkhanna79 avatar May 10 '16 00:05 gkhanna79

I did remote powershell and copied the dlls - FROM "C:\Windows\System32\forwarders\ on the nano machine" TO "dotnet folder on nano machine"

sivagms avatar May 10 '16 00:05 sivagms

@sivagms Are you able to run HelloWorld version of an app on Nano after making this change?

gkhanna79 avatar May 10 '16 00:05 gkhanna79

Also, @sivagms, which version of .NET Core are you using?

gkhanna79 avatar May 10 '16 00:05 gkhanna79

.NET version: 1.0.0-rc2-002678 yes, I'm able to run Helloworld and Musicstore as well after copying the dlls.

sivagms avatar May 10 '16 00:05 sivagms

@SajayAntony

sivagms avatar May 10 '16 01:05 sivagms

This is confirmed to be an issue with the Nano Server build.

gkhanna79 avatar May 10 '16 03:05 gkhanna79

I ended up having to copy more than the three dlls listed here. Copying everything from c:\windows\system32\forwarders next to CoreCLR seemed to work.

Note that if you "publish" an application, you'll need to copy the forwarders to the publish location as well.

ericeil avatar Jun 10 '16 22:06 ericeil

@ericeil which version of the CLI are you using?

dotnet --info

schellap avatar Jun 10 '16 22:06 schellap

@ericeil which version of the Shared FX are you using and is this a recent nano build?

schellap avatar Jun 10 '16 22:06 schellap

[40.78.96.241]: PS C:\l1> C:\dotnet\dotnetnano\dotnet --info
.NET Command Line Tools (1.0.0-preview2-003024)

Product Information:
 Version:            1.0.0-preview2-003024
 Commit SHA-1 hash:  ef4a8e85ef

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14300
 OS Platform: Windows
 RID:         win10-x64

ericeil avatar Jun 10 '16 22:06 ericeil

Also, got my NuGet.config from here: https://gist.github.com/mellinoe/7580563f9850466ac44352d2b1972c7c

ericeil avatar Jun 10 '16 22:06 ericeil

Sounds like a Nano config issue that reverse forwarders are not setup correctly?

gkhanna79 avatar Jun 10 '16 22:06 gkhanna79

dotnet publish and running app in standalone/portable, worked fine against 14339. See below.

.NET Command Line Tools (1.0.0-preview2-003030)

Product Information:
 Version:            1.0.0-preview2-003030
 Commit SHA-1 hash:  c39fbd37d3

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14339
 OS Platform: Windows
 RID:         win10-x64

schellap avatar Jun 10 '16 22:06 schellap

@joshfree I dont believe there is any bug here - see @schellap email above and my responses from last month. This is a Nano configuration issue.

gkhanna79 avatar Jun 11 '16 00:06 gkhanna79

@Priya91 please review

joshfree avatar Jun 11 '16 00:06 joshfree