In my Dockerfile, I have...
FROM microsoft/aspnet:4.7.2-windowsservercore-1803
For my ASP.NET project, I have installed the following Nuget package...
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.0" targetFramework="net462" />
Which has added this to my web.config...
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
</compilers>
</system.codedom>
When I build and run the container, hitting my website I get the following error...
The CodeDom provider type "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" could not be located.
However, if I look inside of my C:\inetpub\wwwoot directory, I can clearly see that the CodeDom dll is there...
Directory: C:\inetpub\wwwroot
Mode LastWriteTime Length Name
-a---- 5/24/2018 1:38 PM 40080 Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll
-a---- 5/24/2018 1:38 PM 1805 Microsoft.CodeDom.Providers.DotNetCompilerPlatform.xml
What am I missing? Any idea why IIS can't find the CodeDom file?