I can't run ASP.NET MVC 5 on Linux (Ubuntu 14). By this article: https://docs.asp.net/en/latest/getting-started/installing-on-linux.html
In virtual Ubuntu 14 terminal I did:
curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh
sudo apt-get install libunwind8 gettext libssl-dev libcurl4-openssl-dev zlib1g libicu-dev uuid-dev
dnvm upgrade -r coreclr
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
sudo apt-get install mono-complete
sudo apt-get install ca-certificates-mono
dnvm upgrade -r mono
sudo apt-get install make automake libtool curl
curl -sSL https://github.com/libuv/libuv/archive/v1.8.0.tar.gz | sudo tar zxfv - -C /usr/local/src
cd /usr/local/src/libuv-1.8.0
sudo sh autogen.sh
sudo ./configure
sudo make
sudo make install
sudo rm -rf /usr/local/src/libuv-1.8.0 && cd ~/
sudo ldconfig
In HelloMvc folder:
dnu restore
Then in Visual Studio Code:
1). Select HelloMvc project.json in file list.
2). Select HelloMvc project in dropdown.
3). Press F1 and type dnx: Run Command and select "web".
In localhost:5004 still "Unable to connect".
If I run app from terminal:
dnx web
I am getting "'Microsoft.AspNet.Server.Kestrel' does not contain a static 'Main' method suitable for an entry point".
Maybe you resolved it just because it is a really old question. But the issue you are facing is you are following asp.net MVC core tutorial which is a framework prepared for running in Linux but you are trying to run mvc5 which is not fully compatible with Linux. The only way you can run mvc5 on Linux is if your project use 100% libraries compatibles with mono project. You can test it by installing the mono project in your Linux instance and try to compile it. If everything works you will be ready for portability.