当以 dnx451 为目标时,我似乎无法添加对 MEF 的引用 (System.ComponentModel.Composition)
When targeting dnx451 I don't seem to be able to add reference to MEF (System.ComponentModel.Composition)
使用最新的测试版 (beta8) 并且只针对 dnx451 我认为我可以使用完整的 .net 客户端框架。我正在尝试在 vnext/dnx 应用程序中创建一个插件基础结构,我可以在其中重新加载插件而无需使用 MEF 重新启动应用程序,并且已经看到了一些示例,但看起来我不能将 MEF 与 dnx451 一起使用(我不是针对 dnxcore)。
因此,以防万一其他人遇到这个问题,我 运行 遇到的主要问题是 Visual Studio 工具没有正确更新 project.json。以下是应如何添加框架程序集引用的示例(例如 MEF)
{
"version": "1.0.0-*",
"description": "AutoSpark.Runner Class Library",
"authors": [ "bferr" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"frameworks": {
"net451": {
"frameworkAssemblies": {
"System.ComponentModel.Composition": "4.0.0.0",
"System.Reflection.Context": "4.0.0.0",
"System.ComponentModel.Composition.Registration": "4.0.0.0"
}
}
}
}
使用最新的测试版 (beta8) 并且只针对 dnx451 我认为我可以使用完整的 .net 客户端框架。我正在尝试在 vnext/dnx 应用程序中创建一个插件基础结构,我可以在其中重新加载插件而无需使用 MEF 重新启动应用程序,并且已经看到了一些示例,但看起来我不能将 MEF 与 dnx451 一起使用(我不是针对 dnxcore)。
因此,以防万一其他人遇到这个问题,我 运行 遇到的主要问题是 Visual Studio 工具没有正确更新 project.json。以下是应如何添加框架程序集引用的示例(例如 MEF)
{
"version": "1.0.0-*",
"description": "AutoSpark.Runner Class Library",
"authors": [ "bferr" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"frameworks": {
"net451": {
"frameworkAssemblies": {
"System.ComponentModel.Composition": "4.0.0.0",
"System.Reflection.Context": "4.0.0.0",
"System.ComponentModel.Composition.Registration": "4.0.0.0"
}
}
}
}