Description
Hi,
We are converting .Net4.8 tests to net6.0 and noticed following problem:
It is not possible to create javascript provider using:
System.CodeDom.Compiler.CodeDomProvider.CreateProvider("JScript");
Using "JS", "javascript", "jscript") does not work as well.
Error we get:
System.CodeDom.Compiler.CodeDomProvider+ConfigurationErrorsException
There is no CodeDom provider defined for the language.
at System.CodeDom.Compiler.CodeDomProvider.GetCompilerInfo(String language)
at System.CodeDom.Compiler.CodeDomProvider.CreateProvider(String language)
We can see that different version of System.CodeDom is used for Net48 and different for Net6:
There is no problem for Net48 and we can see after decompiling library that there is a method:
this.AddCompilerInfo(new CompilerInfo(compilerParams3, codeDomProviderTypeName3)
{
_compilerLanguages = new string[3]
{
"js",
"jscript",
"javascript"
},
but this is absent for version 6.0.0 and 7.0.0:
https://github.com/dotnet/runtime/blob/main/src/libraries/System.CodeDom/src/System/CodeDom/Compiler/CodeDomProvider.cs
According to: https://learn.microsoft.com/pl-pl/dotnet/api/system.codedom.compiler.codedomprovider?view=dotnet-plat-ext-7.0
This should work:
provider = CodeDomProvider.CreateProvider("JScript");
but it does not.
Can you please add provider for JavaScript?