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

Is System.CodeDom a part of .NET Core 2? #1117

Closed
jlahteen opened this issue Nov 27, 2017 · 5 comments
Closed

Is System.CodeDom a part of .NET Core 2? #1117

jlahteen opened this issue Nov 27, 2017 · 5 comments

Comments

@jlahteen
Copy link

According to .NET Api Browser System.CodeDom should be a part of .NET Core 2. However, .NET Core 2 SDK does not seem to contain the library System.CodeDom.dll. Some googling on the topic suggests that .NET Core 2 doesn't cover System.CodeDom. Is this a bug in the documentation?

@terrajobst
Copy link
Member

terrajobst commented Nov 27, 2017

That's a bug in the documentation we're trying to address. CodeDom is available for .NET Core 2.0 but it's not part of .NET Core 2.0. In other words, you'll need to reference the System.CodeDom NuGet package.

@jlahteen
Copy link
Author

jlahteen commented Nov 28, 2017

Thanks for the answer. It's great that CodeDom is available for .NET Core since it enables dynamic code compilation for different scenarios.

However, the current version of System.CodeDom throws PlatformNotSupported for every CompileAssembly* method of CSharpCodeGenerator since they all end up to the method FromFileBatch which throws that exception systematically. Just wondering whether this is still the current state of development or should it already work. Everything works well in my experiment project if I just change the target framework from netcoreapp2.0 to net462.

@terrajobst
Copy link
Member

That's unfortunately by-design as the compilers are not part of the .NET Core runtime. However, given that CodeDOM isn't referenced by the core (it only comes in when people depend on it/via the compat pack) we could probably fix this. I've filed this bug.

@dgamma3
Copy link

dgamma3 commented Aug 16, 2018

I'm getting the same issue as @jlahteen, how do we resolve it?

@terrajobst
Copy link
Member

terrajobst commented Aug 23, 2018

@dgamma3

We don't support compiling with CodeDOM yet. It's tracked by https://github.com/dotnet/corefx/issues/12180.

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

3 participants