Hoping you can help me with this strange error. I've developed a very simple ASP.NET Core web application on windows 10 using visual studio code. I've run dotnet publish
command and tried running the application from under the "publish" folder, which was created. I used the command dotnet Project.dll
. It worked and I was able to browse localhost on port 5000 to view the application.
I then zipped the content of the "publish" folder and copied to a linux VM running Ubuntu 16.04, but I've received the following strange error on the command line when I try to execute the application using: dotnet Project.dll
. I was using ssh to remote to linux vm and execute the command above.
ERROR MESSAGE SEEN ON COMMAND LINE:
Error: assembly specified in the dependencies manifest was not found -- package: 'System.Net.NetworkInformation', version: '4.1.0', path: 'runtimes/linux/lib/netstandard1.3/System.Net.NetworkInformation.dll'
I used the following link to install .net core on the vm: https://www.microsoft.com/net/core#ubuntu
When I do dotnet --version
on windows I see: 1.0.0-preview2-003121
When I do dotnet --verison
on Ubuntu I see: 1.0.0-preview2-003131
Any help to resolve the above error would be greatly appreciated!
Here is the project.json file:
{
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0",
"type": "platform"
},
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
"Microsoft.AspNetCore.Mvc": "1.0.0",
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Configuration":"1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Configuration.CommandLine": "1.0.0",
"MailKit": "1.8.1"
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"portable-net45+win8"
]
}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
},
"publishOptions": {
"include": [
"wwwroot",
"Views",
"web.config",
"appsettings.json"
]
},
"tooling": {
"defaultNamespace": "Company.Website"
}
}