'Forms' is not a member of 'Windows'?

'Forms' is not a member of 'Windows'?

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


reagan123 posted on Monday, June 02, 2008

Quick question... I just added the CSLA 3.0.4 dll to my project.  When I did this I got the error " 'Forms' is not a member of 'Windows'." on the following line of code.

Windows.Forms.MessageBox.Show("This report is under development.")

Why do I have to qualify my line of code with "System.Windows..."?  Anyone know if CSLA is causing this...?  I know there are a lot of variables to this so it may be hard to pinpoint.  Any ideas of what may be causing this?

It's not really a big deal... just curious as to what may be causing this to happen.

Thanks!

RockfordLhotka replied on Monday, June 02, 2008

It is likely that you have a namespace conflict. There is a Csla.Windows namespace, and perhaps if you import/use Csla and (of course) System then the compiler can't resolve the namespace?

I typically import/use System.Windows if I'm building a UI using that technology.

DeveloperDan replied on Monday, June 02, 2008

Five minutes ago we solved this same problem on a co-worker's pc.  I'll save you the time and hassle we went through... 

Simply download and install Service Pack 1 for Visual Studio 2005 -- you're problem will go away!  I don't have the link handy, but I believe you can search for VS version 50727.762 or knowledge base article KB928957. 

Good luck!

reagan123 replied on Monday, June 02, 2008

Thanks everyone... I'll look into both suggestions.  I know it was a small thing that didn't really matter, but I was just curious.

Thanks again!

Copyright (c) Marimer LLC