ASP.NET Core is a cross-platform, high-performance, open-source framework for building modern, cloud-enabled, Internet-connected apps. It is a cross-platform successor to .NET Framework. Ability to develop and run on Windows, macOS, and Linux.
But everyone tends to run the application in Windows only. Lets us consider a scenario that your application will be installing in both windows and linux platforms and when you want to test some packages ( say for example DinkToPdf — open-source package for converting HTML to PDF) across all the platforms to make sure the particular package is working in our application, at the time, the below steps can be found very useful to test in Linux environment.
Let's see how to do it. The prerequisite is Docker should be installed in Windows System through Oracle Virtual Box. Already I shared the steps in my previous blogs, see here for reference.
Step 1
Let's prepare your working environment by creating a new ASP.NET Core Project.

Step 2
Make sure you check the “Enable Docker Support” checkbox. This will create a dockerfile for you in the solution.

Step 3
Visual Studio will create you a project that looks something like this.

Step 4
Let’s run the project with IIS Express to make sure that everything is working normally. You should see something like this.

Step 5









Join the conversation! Your thoughts help the community grow.