VS 2008 bug when using Csla.NameValueBase<K,V>.NameValuePair

VS 2008 bug when using Csla.NameValueBase<K,V>.NameValuePair

Old forum URL: forums.lhotka.net/forums/t/5087.aspx


tetranz posted on Friday, July 11, 2008

Here's something really weird. I wonder if it's a bug in Visual Studio 2008 or am I doing something weird. It's happening in my application but I have reduced it down to a simple test.

If anyone has a couple of minutes, I'd be interested if this happens to you too. I'm using Csla 3.0.4.0

Create a C# class library project.
Switch to target framework 2.0
Add a reference to Csla.dll

Edit Class1 to make it like this:

public static class Class1
{
    public static List<Csla.NameValueListBase<string, string>.NameValuePair> MyList;
}

Compile.

Now reference the resulting assembly in another project in another solution. I'm using a Winforms test.
When I do that, MyList does not appear in the Object browser or Intellisense but I can type it manually and access it in code. However, if I right click on the property in code and choose "Go to Definition" it says "Cannot navigate to ...".

It's something to do with the NameValuePair class. If change the list child type to anything else it appears in the object browser and works normally.

In my real application I have a

ManufacturerList : NameValueListBase<string, string>

and I put the result through something I call a HeadedBindingList which is externally very similar to SortedBindingList so I end up with similar to:

public static SortedBindingList<ManufacturerList.NameValuePair> MyManufacturers
{
}

I'm sure this worked in VS 2005.

Cheers
Ross

Copyright (c) Marimer LLC