Step 1: Ensure the Produce Outputs on build is checked in the Build Option. (Only if this option is checked, the DLL files will be generated.)
Step 2: Build the Web Application in Release mode.
Step 3: The compiled DLLs will be present in: ..\artifacts\bin\WebAppName\Release\dnx451.
Step 4: The generated DLLs can be checked using ILSpy.
Step 5: Select the Web Application and click Publish.
Step 6: Go to the published path: ..\approot\src\WebAppName and delete all the Class files which were compiled into DLLs (after verifying Step 4). If ViewModels are used, those files should not be deleted as they will be used in Views (Refer Step 8).
Step 7: Copy the DLLs generated in Step 3 and paste in the published path: ..\approot\src\WebAppName.
Step 8: Move all the ViewModel files into the Views folder.
Step 9: Open Command Window in the location: ..\approot\src\WebAppName.
Step 10: Type dnx --lib "..\approot\src\WebAppName" web in the Command Window and click Enter. (Enter the path where the Command Window is opened.)
Step 11: Now, the Kestrel Server is Up and you can browse the Web Application by visiting http://localhost:5000/
Note: DNX is being retired in favor of the new .NET Core Command LIne (CLI) Tools.
Tip 1: To view the application from a mobile device, please check: Viewing localhost website from mobile device.