无法在 net standard 1.6 class 库项目中使用 DynamicObject

Cannot use DynamicObject in net standard 1.6 class library project

参考下面的截图,我需要在.net standard 1.6 library project中使用DynamicObject

但是,我无法通过右键单击 Visual Studio 2017 Enterprise (15.2) 中的 DependenciesAdd Reference 添加任何其他依赖项。

有人知道如何在 .net standard class library project 中使用 DynamicObject 定位 netstandard 1.6 吗?

您需要添加 System.Dynamic.Runtime NuGet 包,才能使类型在 System.Dynamic 命名空间中可用。在 netstandard2.0 后,它将自动可用。

dotnet add package System.Dynamic.Runtime