问题
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