System.Windows.Forms.DataVisualization - namespace in one class, but not in another

I get this error

The type or namespace name 'DataVisualization' does not exist in the namespace 'System.Windows.Forms' (are you missing an assembly reference?)

Here is my usingclass section :

using System;
using System.Collections;
using System.Collections.Generic;
using System.Windows.Forms.DataVisualization.Charting;
using System.Windows.Forms.DataVisualization.Charting.Borders3D;
using System.Windows.Forms.DataVisualization.Charting.ChartTypes;
using System.Windows.Forms.DataVisualization.Charting.Data;
using System.Windows.Forms.DataVisualization.Charting.Formulas;
using System.Windows.Forms.DataVisualization.Charting.Utilities;

namespace myNamespace {
    public class myClass {
        // Usual class stuff
    }
}

The fact is that I use the same DataVisualization as in another class. The only thing I can think of is that the classes that give this missing namespace error are solution elements, not project specific. Projects link to them by reference. Does anyone have any thoughts on what the problem is? I installed the chart component, .NET 3.5 SP1, and the chart add-in for Visual Studio 2008.

UPDATE: I moved elements from solution elements to be permanent members of my project, and I still see the same behavior.

2: . - , , . , , , , ( - , ) .:\

+5
3

, DLL DataVisualization. , System.Windows.Forms.dll, .

+1

squiggles? , ?

VS 2008 1 (SP1) # . , , - . .

If this is not the case, try adding the file directly to the project (without a link). See if this fixes the error. If this is the case, then we know that it is related to the linked file, and this can help identify the problem.

0
source

All Articles