Web Services not seeing References anymore

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ocdocdocd
    New Member
    • Jul 2007
    • 7

    Web Services not seeing References anymore

    I started getting errors in my Web Service today that said "The type or namespace 'MyClassLibrary ' could not be found (are you missing a using directive or an assembly reference?)"

    I've added the reference both ways (via Add Reference menu and the Project Property pages). I've deleted and re-added.

    For troubleshooting , I created a brand new solution. Created a c# class library. Then I created a new Web Service project and added that fresh class library to the references. Once I put the "using ClassLibrary1" directive in, I get the same error I mentioned above.

    Any idea of whats going on? This webservice was working a day ago. I'm not sure if I've messed a setting up thats affecting all of my webservices now or if something is corrupt. I've been googling this for a few hours now and I'm at a loss.

    Thanks in advance
  • TRScheel
    Recognized Expert Contributor
    • Apr 2007
    • 638

    #2
    Restarted VS or your computer and see if that fixes it? I know VS has some bugs where similiar things have happenned.

    Comment

    • ocdocdocd
      New Member
      • Jul 2007
      • 7

      #3
      Thanks for the quick response. Yes, I've restarted VS and even my workstation a few times.

      Comment

      • TRScheel
        Recognized Expert Contributor
        • Apr 2007
        • 638

        #4
        That is bizarre. Is it a custom library?

        Edit: Err, is it your custom library or one you found?

        Comment

        • ocdocdocd
          New Member
          • Jul 2007
          • 7

          #5
          I've written 100% of it. I'm really at a loss here because I've written several solutions using this exact architecture.

          I figured something might have been hosed in the original project. But for the heck of it, I decided to rule that idea out by starting a new project and having an empty class library and reference it in a brand new webservice project.

          Here is a screen shot of that barebones project and the error:

          Comment

          • TRScheel
            Recognized Expert Contributor
            • Apr 2007
            • 638

            #6
            Right-click the website project and add reference for the library... that should do it... although I have a feeling you have already tried this.

            Comment

            • ocdocdocd
              New Member
              • Jul 2007
              • 7

              #7
              Yeah I've tried that. The strange thing is, intellisense picked up the "ClassLibra ry1" in the "using ClassLibrary1" line.

              Comment

              • ocdocdocd
                New Member
                • Jul 2007
                • 7

                #8
                Well, I asked my friend over messenger to follow the same steps as me and his worked fine. He sent me his project, and I cannot build - I get the same error.

                I sent him my project that wouldn't build, and he can build it ok.

                So it has to be something specific to my workstation - but I'm not really sure what to look for.

                Comment

                • TRScheel
                  Recognized Expert Contributor
                  • Apr 2007
                  • 638

                  #9
                  Ya, this is really bizarre. Sounds like something got corrupted (?) or maybe you have a setting that is not allowing it to compile.... Although, I havent a clue what it could be.

                  Comment

                  • ocdocdocd
                    New Member
                    • Jul 2007
                    • 7

                    #10
                    The problem is gone finally. I tried running the .net 2.0 framework repair process with no luck. What finally worked was removing .net 2.0 framework, restarting, and installing .net 2.0 framework.

                    Still not sure what caused this to happen, though.

                    Comment

                    • TRScheel
                      Recognized Expert Contributor
                      • Apr 2007
                      • 638

                      #11
                      Originally posted by ocdocdocd
                      The problem is gone finally. I tried running the .net 2.0 framework repair process with no luck. What finally worked was removing .net 2.0 framework, restarting, and installing .net 2.0 framework.

                      Still not sure what caused this to happen, though.
                      Hmmm, bizarre indeed

                      Comment

                      Working...