System.CodeDom.Compiler 作为 nuget 包
System.CodeDom.Compiler as nuget-package
一整天我都在搜索 System.CodeDom.Compiler
- nuget-packages 中的命名空间。我只找到了 Microsoft.CodeDom.Providers.DotNetCompilerPlatform
(Roslyn?),但似乎不包括我正在搜索的名称空间。有谁知道是否有包含该命名空间的包?
编辑:
这是我现在得到的代码。但是 Visual Studio 2015 在命名空间 System
中找不到 CodeDom
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
{
}
}
它不在包中,它在 System.dll
中并且是框架的一部分。
只需确保您的文件中有 using System.CodeDom.Compiler;
。
所以我自己发现了问题...
在 project.json 我们需要添加一个 targetframework。对我来说,它是在 project.json 中添加框架部分(默认情况下模板不添加框架):
{
"frameworks": {
"dnx451": { }
}
}
一整天我都在搜索 System.CodeDom.Compiler
- nuget-packages 中的命名空间。我只找到了 Microsoft.CodeDom.Providers.DotNetCompilerPlatform
(Roslyn?),但似乎不包括我正在搜索的名称空间。有谁知道是否有包含该命名空间的包?
编辑:
这是我现在得到的代码。但是 Visual Studio 2015 在命名空间 System
CodeDom
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
{
}
}
它不在包中,它在 System.dll
中并且是框架的一部分。
只需确保您的文件中有 using System.CodeDom.Compiler;
。
所以我自己发现了问题... 在 project.json 我们需要添加一个 targetframework。对我来说,它是在 project.json 中添加框架部分(默认情况下模板不添加框架):
{
"frameworks": {
"dnx451": { }
}
}