System.CodeDom.Compiler as nuget-package

大兔子大兔子 提交于 2019-12-12 03:18:18

问题


The whole day I've been seaching for the System.CodeDom.Compiler - namespace in nuget-packages. I only found the Microsoft.CodeDom.Providers.DotNetCompilerPlatform (Roslyn ?) but it seems as the namespace I'm searching for is not included. Does anyone know if there's a package containing that namespace?

Edit: This is the code I got for now. But Visual Studio 2015 cannot find the CodeDom in namespace System

using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace ICA.CubeSeven.Dynamic
{

    public class Class1
    {
    }

}

回答1:


It's not in a package, it's in System.dll and is part of the framework.

Just make sure you have using System.CodeDom.Compiler; in your file.




回答2:


Soo I found the problem myself... In the project.json we need to add a targetframework. For me it was adding the framework-section in project.json (for default the template doesnot add a framework):

{
      "frameworks": {
        "dnx451": { }
      }
}


来源:https://stackoverflow.com/questions/32426737/system-codedom-compiler-as-nuget-package

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!