none
the type or namespace could not be found

    Question

  • Hi,

    In my solution I got three project

    Window service

    DataProject

    UI

    Everything was wporking fine and suddenly I am getting error message that the "Error 94 The type or namespace name 'DatProject' could not be found (are you missing a using directive or an assembly reference?)" getting this error in windows service project. The UI project works fine as I amd using DataProject in UI project as well. I have added reference to DataProject in windows service and also I got Using directive in every class in window service. The strange thing is it was working fine and just suddenly I am getting this error.

    Any suggestion.

    Thanks

    Friday, March 09, 2012 8:55 AM

Answers

  • Check the CPU settings of all the projects...

    If all are "Any CPU" then it should work, if not make sure they all are in the same cpu settings.


    With great code, comes great complexity, so keep it simple stupid...

    • Proposed as answer by Paw Jershauge Friday, March 09, 2012 12:11 PM
    • Marked as answer by xFahadx Friday, March 09, 2012 12:22 PM
    Friday, March 09, 2012 10:43 AM

All replies

  • In which file is the error? The problem is that your project is named DataProject and not DatProject.

    Look at the line and position in the file an change it manually.

    Friday, March 09, 2012 9:14 AM
  • sorry it was typing mistake in my post. it is

    ""Error 94 The type or namespace name 'DataProject' could not be found (are you missing a using directive or an assembly reference?)""

    Friday, March 09, 2012 9:30 AM
  • Check the CPU settings of all the projects...

    If all are "Any CPU" then it should work, if not make sure they all are in the same cpu settings.


    With great code, comes great complexity, so keep it simple stupid...

    • Proposed as answer by Paw Jershauge Friday, March 09, 2012 12:11 PM
    • Marked as answer by xFahadx Friday, March 09, 2012 12:22 PM
    Friday, March 09, 2012 10:43 AM
  • solved

    Cpu setting was "ANY CPU" for all the projects. for one project the target framework was set to >net Framework client profile I chnaged it to .Net Framework 4.

    Thanks

    Friday, March 09, 2012 12:09 PM
  • your welcome, please mark as answer then...

    With great code, comes great complexity, so keep it simple stupid...

    Friday, March 09, 2012 12:11 PM