BENBUN Coder
BENBUN Coder

Reputation: 4881

Visual Studio and namespaces

I am attempting to move some code from one VS2008 project to another.

The project I am taking the code from works perfectly and I am not changing the code in any way when copying it to the new project.

The code is along the lines of :

using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using System.Diagnostics;

using System.ComponentModel;
using System.ComponentModel.Design;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
using System.Windows.Forms;
using System.Windows.Forms.Design;

namespace CommonTools
{

public class ColumnCollectionEditor : CollectionEditor
{
     .....
}
}

The problem I have is that in the "new" project VS does not find "CollectionEditor" within the supplied namespaces and as such the project will not build.

Both the "new" and "old" projects are targeting .NET 3.5

Any ideas where I am going wrong here.

Upvotes: 0

Views: 181

Answers (4)

sushz
sushz

Reputation: 11

Do you have include this "System.Design.dll"?

Upvotes: 1

michael.bartnett
michael.bartnett

Reputation: 777

Make sure your new project references the same assemblies that your old project did.

MSDN Says that System.ComponentModel.Design.ColectionEditor is in System.Design.dll.

Upvotes: 3

Rox
Rox

Reputation: 2023

Have you tried using 'Go To Definition' on CollectionEditor in the original solution to see what you should have included?

Upvotes: 2

Adriaan Stander
Adriaan Stander

Reputation: 166346

Do you have the

 System.Design.dll

assembly added to your refenerances?

you can see in which namespace and assembly it is at CollectionEditor Class

Upvotes: 6

Related Questions