This FAQ document is based on errors I encountered using a newly created greenfield ASP.NET 5 / ASP.NET Core demo project build using ASP.NET 5 RC1, Visual Studio 2015 Update 1 and Visual Studio Tools for Docker - December Preview. If you’re interested in the demo website and Docker configuration, then it can be found on my GitHub account.
As ASP.NET 5 / ASP.NET Core and Windows Server 2016 are both in release candidate or technical preview at the time of writing this post, I just want to emphasize that the relevance of this post might diminish quite fast after publishing.
Unable To Locate Runtime Error
The resolution is to install the missing DNX runtime. In my case (based on the error message), the installation command for the missing runtime using the DNVM (DotNet Version Manager) was: dnvm install 1.0.0-rc1-final -r coreclr -a x64
Windows vs Linux Dockerfile’s Errors
I ran into two different errors which were both related to the Dockerfile Visual Studio Tools for Docker had generated which are both listed below. The common issue for both of errors is because the Dockerfile generated currently defaults to values suitable to run a Linux based container and not a Windows based container. This means when you try to push this container to a Windows container host, you get some strange (but explainable) errors.
Image microsoft/aspnet:1.0.0-* Not Found Error
Container Command Not Found Or Does Not Exist Error
The resolution is to manually update your Dockerfile to update the containers image name with that of a Windows based container image as well as updating the entrypoint command. Below is a Linux Vs Windows example showing the basic differences.
AspnetPublishHandler With Name Custom Was Not Found
I found the resolution to this error was to delete the ‘publishProfile’ folder from within project and try publishing again.
If you’ve got any comments or other issues you’d like be to add then drop me a note below in the comments!