Handle IBuilder rename to IApplicationBuilder.
Reacting to System.Text.Encoding package version change
Allow MvcRazorHost to run on vanilla .NET45
- Added net45 target and removed specific aspnet50 and aspnetcore50 APIs
from that code path.
#1075: Move CreateSerializer out of the base class of XmlSerializer.

This is to prevent the casting upstream in CreateSerializer(). Since CanWriteResult() depends on CreateSerializer(), it has also been moved along.
PR Comments.
Making sure that CanWriteResult does not modify SelectedContentType if CreateSerializer fails.