Hasan A Yousef Hasan A Yousef - 20 days ago 6
ASP.NET (C#) Question

publishing self contained development SCD

I'm using a

win10-x64
development machine to develop
.NET CORE
app.

I followed the steps explained here for publishing my
SCD
app.

as the user machine is
win10-x86
I used the below:

package.json:

"runtimes": {
"win10-x64": {},
"win10-x86": {}
}


commands:

dotnet build -r win10-x86
dotnet publish -c release -r win10-x86


then copied the full folder
myapp\bin\release\netcoreapp1.0\win10-x86
to flash memory, then into the user machine.

once run at the user machine, I got the below error:

enter image description here

UPDATE

Based on the comments below the full
project.json


{
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"runtimes": {
"win10-x64": {},
"win10-x86": {},
"osx.10.10-x64": {},
"ubuntu.16.04-x64": {}
},
"dependencies": {
"Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
"Microsoft.AspNetCore.Mvc": "1.0.1",
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
"Microsoft.AspNetCore.Cors":"1.0.0",
"System.Data.SqlClient": "4.1.0",
"MailKit" : "1.10.0"
},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.1"
}
},
"imports": "dnxcore50"
}
}
}


the user machine has
.NET Core Installer DotNetCore.101.1-Runtime-x86.exe
installed, though i think this is not required for the SCD

Answer

I found my mistake, it was that I was running the .exe file appearing at the ..\APPFOLDER\bin\release\netstandard1.6\win10-x86.

The correct action is: Take the publish folder only, no need for any other file before or with it, only the files inside it, then run the .exe file inside the publish folder, i.e. the executed file path is:

..\APPFOLDER\bin\release\netstandard1.6\win10-x86\publish\FILENAME.exe

Comments