Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Website pages fail to load with message "The CodeDom provider type ... could not be located." #116

@seth-capistron

Description

@seth-capistron

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=\&quot;Web\&quot; /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?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions