Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use RoslynCodeDomProvider on .NET 7 #160

Open
matteot opened this issue Dec 29, 2023 · 0 comments
Open

Cannot use RoslynCodeDomProvider on .NET 7 #160

matteot opened this issue Dec 29, 2023 · 0 comments

Comments

@matteot
Copy link

matteot commented Dec 29, 2023

Hi, I'm trying to use your package from a console app (.NET 7) and I obtain the error shown below. On the other hand everything works correctly if I reference and run your package in .NET 4.8. Is .NET7+ is a supported scenario ? Best regards, Matteo

Unhandled exception. System.TypeInitializationException: The type initializer for 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CompilationUtil' threw an exception.
 ---> System.TypeLoadException: Could not load type 'System.Web.Configuration.WebConfigurationManager' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
   at Microsoft.CodeDom.Providers.DotNetCompilerPlatform.AppSettings.EnsureSettingsLoaded()
   at Microsoft.CodeDom.Providers.DotNetCompilerPlatform.AppSettings.get_RoslynCompilerLocation()
   at Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CompilationUtil.GetProviderOptionsFor(String fileExt)
   at Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CompilationUtil..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CompilationUtil.get_CSC2()
   at Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider..ctor(IProviderOptions providerOptions)
   at Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider..ctor()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant