Quote:> Hi
> I have 2 c# projects defined in Visual studio ,
> 1. VMS.Image and
> 2. VMS.Windows
> Here is the snapshot of the solution.
> Project VMS.Image has a dummy class, Class2, defined in the namespace
> VMS.Image
> using System;
> namespace VMS.Image
> {
> public class Class2
> {
> public Class2()
> {
> }
> }
> }
> Project VMS.Windows has a class, Class1, defined in the namespace
> VMS.Windows. It has reference to, amongst other things, the project
> VMS.Image & System.Drawing
> using System;
> using System.Drawing;
> namespace VMS.Windows
> {
> public class Class1
> {
> private static Image x; /*The intention here is to refer to
> System.Drawing.Image but the compiler doesn't like it*/
> public Class1()
> {
> }
> }
> }
> When I try to build the solution, I get an error msg
> d:\packagetest\solution2\classlibrary2\class1.cs(10,12): error CS0118:
> 'VMS.Image' denotes a 'namespace' where a 'class' was expected
> If I take away the reference to VMS.Image from the project VMS.Windows, I
> do not get the message. The question I have is
> Why is the compiler "mistaking" the reference to System.Drawing.Image as
the
> namespace VMS.Image ? I haven't even got a 'using VMS.Image' statement in
> Class1.
> Other than modifying the statement in Class1 to "private static
> System.Drawing.Image x;", do I have any other workaround ? Also I do not
> want to rename VMS.Image to something else
> Thanks
> I am attaching the project & class files in case you would like to try and
> play around