C# 添加图表错误 DataVisualization.Charting - Visual Studio

问题描述 投票:0回答:3

我正在尝试使用图表在 Visual Studio 2012 中创建图形。我有 .Net 4.0 但是当这样写时:

using System.Windows.Forms.DataVisualization.Charting;

我收到错误:

The type or namespace name 'DataVisualization' does not exist in the namespace 'System.Windows.Forms'
我该如何解决这个问题?

谢谢!

c# graph charts
3个回答
1
投票

在解决方案资源管理器面板中添加对

System.Windows.Forms.DataVisualization
的引用。


0
投票

已编译的程序集不使用解决方案项。 请点击此链接。 这是完整图表的链接


0
投票

使用 Nuget 包管理器作为解决方案。 指南如下。

Steps to Get Nuget package manager

然后搜索“WinForms.DataVisualization”并选择版本旁边的“安装”。

Nuget Search and Install steps

© www.soinside.com 2019 - 2024. All rights reserved.