I get this error when building an MVC project in a solution. No references to those files exists in my solution at all.
C:\\Program Files (x86)\\MSBuild\\14.
Just uninstalling Microsoft.CodeDom.Providers.DotNetCompilerPlatform from one of our projects fixed this issue for me in Visual Studio 2017.