FSharp.Compiler.CodeDom icon indicating copy to clipboard operation
FSharp.Compiler.CodeDom copied to clipboard

Does CodeDom plan to support .NET Core 2.0?

Open Wingjam opened this issue 7 years ago • 2 comments

Description

As of today, CodeDom cannot be used in .NET Core 2.0 projects for F#. Is it planned to support it in a near future?

Wingjam avatar Feb 13 '18 16:02 Wingjam

Sorry, can you explain what isn't working? Are you trying to generate code? Are you trying to invoke the F# compiler via CodeDom? Are you using CodeDom for ASP?

It looks like CodeDom exists for .NET Core 2.0 in the form of a NuGet package, but this immediately raises a question: what is the equivalent of machine.config in .NET Core? Does it even exist? If not, then third-party CodeDom providers won't work with .NET Core, except for ASP (if you look in the contents of Microsoft.CodeDom.Providers.DotNetCompilerPlatform, you'll see that there's an XDT to add the CodeDom provider configuration to web.config).

drvink avatar Feb 17 '18 23:02 drvink

Also, just FYI, you'd be much better off using FCS if you want programmatic access to the compiler and/or parsing and AST-related services. CodeDom's AST doesn't resemble F# at all, nor does it easily allow you to write natural or efficient F#. (In other words, this provider should be considered only when you absolutely must get F# working with CodeDom for some reason--for example, you want to use PowerShell's ability to Add-Type source code fragments of any language registered with CodeDom).

drvink avatar Feb 18 '18 00:02 drvink