Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. "Could not load type 'pagename'" error on build in VS2008

"Could not load type 'pagename'" error on build in VS2008

Scheduled Pinned Locked Moved ASP.NET
helpcsharpasp-netsysadminquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    goodideadave
    wrote on last edited by
    #1

    I had a working ASP.NET 3.5 project, and I wanted to move the project files from a network drive to my C drive. I deleted the .sln file, copied the pages, codebehinds, and classes to my C: drive, created a new project in VS2008, and added the files to it. Now when building I get errors on about 10 out of 31 pages: "Could not load type 'pagename'". And that's the only errors shown. Googling, I have seen numerous references to the codebehind not being referenced by the page, but I have checked and they are all correct. I don't know what code to upload to better describe my problem. Any ideas on what I should do next? :confused:

    My other signature is witty and insightful.

    C P 2 Replies Last reply
    0
    • G goodideadave

      I had a working ASP.NET 3.5 project, and I wanted to move the project files from a network drive to my C drive. I deleted the .sln file, copied the pages, codebehinds, and classes to my C: drive, created a new project in VS2008, and added the files to it. Now when building I get errors on about 10 out of 31 pages: "Could not load type 'pagename'". And that's the only errors shown. Googling, I have seen numerous references to the codebehind not being referenced by the page, but I have checked and they are all correct. I don't know what code to upload to better describe my problem. Any ideas on what I should do next? :confused:

      My other signature is witty and insightful.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Is it looking in the old location for the files ?

      Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

      G 1 Reply Last reply
      0
      • C Christian Graus

        Is it looking in the old location for the files ?

        Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

        G Offline
        G Offline
        goodideadave
        wrote on last edited by
        #3

        How can I tell? I started with an empty project, moved the files to the new directory on C, then added existing item for each one. So I would think it is looking in the new location. Plus, the new project doesn't "know" about the old location since it was empty of files.

        My other signature is witty and insightful.

        1 Reply Last reply
        0
        • G goodideadave

          I had a working ASP.NET 3.5 project, and I wanted to move the project files from a network drive to my C drive. I deleted the .sln file, copied the pages, codebehinds, and classes to my C: drive, created a new project in VS2008, and added the files to it. Now when building I get errors on about 10 out of 31 pages: "Could not load type 'pagename'". And that's the only errors shown. Googling, I have seen numerous references to the codebehind not being referenced by the page, but I have checked and they are all correct. I don't know what code to upload to better describe my problem. Any ideas on what I should do next? :confused:

          My other signature is witty and insightful.

          P Offline
          P Offline
          Perry Holman
          wrote on last edited by
          #4

          If you created a newly empty project? That maybe causes the error. I suggest you create a normal project including default files like default.aspx etc. And then delete these default files and copy your files to the new project. Generally, the path of source codes is stored in the .sln file. You can open it with NotePad to check it.

          Welcome to www.softwaretree.net! This website is generated completely by static html pages transforming technology. You can find many excellent audio/video tools there!

          G 1 Reply Last reply
          0
          • P Perry Holman

            If you created a newly empty project? That maybe causes the error. I suggest you create a normal project including default files like default.aspx etc. And then delete these default files and copy your files to the new project. Generally, the path of source codes is stored in the .sln file. You can open it with NotePad to check it.

            Welcome to www.softwaretree.net! This website is generated completely by static html pages transforming technology. You can find many excellent audio/video tools there!

            G Offline
            G Offline
            goodideadave
            wrote on last edited by
            #5

            Perry Holman wrote:

            I suggest you create a normal project including default files like default.aspx etc. And then delete these default files and copy your files to the new project.

            I thought that's pretty much what I did. But instead of deleting the files, I copied the original source for default.aspx, web.config, and global.asax to the files created by the new project. Then I copied each file in with "add new item". And I just now looked at the .sln and everything that seems to reference a path has a reasonable directory path in it, like so: Debug.AspNetCompiler.VirtualPath = "/ProfRev" Debug.AspNetCompiler.PhysicalPath = "..\ProfRev\" But it sounds like it's time to start over, because maybe I zigged when I should have zagged. New project, copy in default.aspx, etc.; then add one file, build the page, add another file, build the page, repeat for 31 pages. Sounds like a fun thing to do on a Friday, huh? :)

            My other signature is witty and insightful.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups