Bug: Partial Classes Seen as 2 Different Types

VS 2005 (C#)
Builds 2.5.327 through 2.5.343 have these bugs. Builds prior to 2.5.327 do not.

To replicate:
1. Create a strongly typed dataset with 1 table in a class file project. Add a partial class file (double click on the dataset designer surface) and a public method to the dataset.

2. Create another project and add a reference to the dataset project. In a code file, add a using statement for the namespace of the dataset.

3. In a method declare an instance of the dataset using just the dataset name. e.g. DataSet1 ds1 = new DataSet1()

The UI will now have these bugs:

bug 1. The using statement for the namespace of the dataset is grayed out and the tooltip says it is not used.

bug 2. The method defined in the partial class will not be available in intellisense. If you type it in manually it will be colored red and shown as an error.

bug 3. Declare another DataSet1, but this time use the full name e.g. Namespace.DataSet1 bar.
Resharper shows an error if you assign 1st dataset instance to 2nd variable.
e.g. bar = foo; <----


shows error "can't assign type DataSet1 to type namespace.DataSet1

bug 4. Go To Declaration doesn't work on the DataSet1 declaration.

I've attached a simple sample solution detailing the issues.

-Ed

Attachment not added (general error): "PartialClassesBug.rar"

2 comments
Comment actions Permalink

I'm currently working with datasets too, and my editor is a mess due to
all the ReSharper errors, warnings and false "using directive is not
required" statements. Would be great to get a fix asap :)

Cheers,
Philipp

0
Comment actions Permalink

These issues appear to be fixed in build 2.5.351.0

Thanks guys!


0

Please sign in to leave a comment.