Running ASP. NET Core applications on Windows Subsystem for Linux

Source: Internet
Author: User
Tags gpg creators update

Setting up Linux on Windows 10

First thing is to enable Windows Subsystem for Linux. It doesn ' t install Linux but gets Windows ready for it. Linux support is Windows feature and it must are activated from Windows Features dialog.

After installing the feature Windows needs restart.

As Windows is a ready-to-host Linux now it's time to install one. Windows Fall creators Update supports more than one Linux. I opened Store app and installer Ubuntu Linux from there.

It takes time to get things up and running as after installation there is some configuring needed. User is asked for username and password and everything else is the done by Linux from this point. Just wait until it gets done.

Running Linux on Windows

After installing Linux it was possible to the use of Windows search to run it.

Those need to run it frequently can also pin Ubuntu to taskbar or Start menu.

Installing. NET Core

As I installed Ubuntu Linux then. NET Core Installation commands here is for Ubuntu, came from Windows Store.

Curl HTTPS://PACKAGES.MICROSOFT.COM/KEYS/MICROSOFT.ASC | GPG--dearmor > Microsoft.gpgsudo mv microsoft.gpg/etc/apt/trusted.gpg.d/microsoft.gpgsudo sh-c ' echo ' Deb [ARCH=AMD Https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial Main ">/etc/apt/sources.list.d/ Dotnetdev.list ' sudo apt-get updatesudo apt-get install dotnet-sdk-2.0.2

It takes some minutes to get. NET Core installed as after installation it also initializes things.

Running Application from Local Disk

Linux on Windows uses it own file system and disks on machine is visible through mounting. The following screenshot shows how I moved to project folder on test machine and ran ASP. It's the same folder where I build application on Visual Studio.

And here are the Web front-end of my temperaturestation solution served by Linux on Windows.

nb! I have the experienced some issues this far. Sometimes after running ASP. NET Core Web application on Ubuntu it's not possible to close terminal. When the closing it from Task Manager then on Next Run terminal window opens and nothing happens there. In case of any issues the problems to Windows team using Feedback app.

Wrapping up

Windows Subsystem for Linux are easy to enable and install. It makes Linux available on Windows without hardware level virtualization and there ' s no need to install Hyper-V or some O Ther virtualization platform. When building multi-platform apps it's handy to has Linux environment available to test and try application quickly. Although I faced few issues when working with. NET Core on Linux This-is-it these issues were not show stoppers and I got my Tasks done. Those who build multi-platform apps should give a Linux on Windows a good try.

Running ASP. NET Core applications on Windows Subsystem for Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.