在工程文件中添加
<Reference Include="Microsoft.CSharp" /> <Reference Include="System.Core" />
如:
<ItemGroup> //... <Reference Include="Microsoft.CSharp" /> <Reference Include="System.Core" /> </ItemGroup>