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. Publication (web): Object reference not set to an instance of an object.

Publication (web): Object reference not set to an instance of an object.

Scheduled Pinned Locked Moved ASP.NET
csharpvisual-studiocomdebuggingquestion
8 Posts 4 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.
  • C Offline
    C Offline
    Colin Angus Mackay
    wrote on last edited by
    #1

    I'm stumpt on this one. I have a Visual Studio 2005 web site project that we've successfully published for well over a year now. Unfortunately yesterday it started to fail with the message:

    ------ Build started: Project: C:\...\WebSite\, Configuration: Debug .NET ------
    Pre-compiling Web Site

    Building directory '/App_GlobalResources/'.
    Building directory '/App_WebReferences/'.
    Building directory '/App_Code/CSCode/'.
    Building directory '/App_Code/VBCode/'.
    Building directory '/App_Code/'.: Publication (web): Object reference not set to an instance of an object.

    Pre-compilation Complete
    ------ Skipped Publish: Project C:\...\WebSite\, Configuration: Debug .NET ------

    I've had a look around and I couldn't find any solution to this. Some say it was intermittent and it goes away after a while, but I've had umpteen failed publish operations since yesterday and see no evidence that it will just go away on its own. Any ideas of what I can look in to?

    User group: Scottish Developers Blog: Can Open... Worms? Everywhere! Quote: Man who stand on hill with mouth open wait long time for roast duck to drop in.

    V D P 3 Replies Last reply
    0
    • C Colin Angus Mackay

      I'm stumpt on this one. I have a Visual Studio 2005 web site project that we've successfully published for well over a year now. Unfortunately yesterday it started to fail with the message:

      ------ Build started: Project: C:\...\WebSite\, Configuration: Debug .NET ------
      Pre-compiling Web Site

      Building directory '/App_GlobalResources/'.
      Building directory '/App_WebReferences/'.
      Building directory '/App_Code/CSCode/'.
      Building directory '/App_Code/VBCode/'.
      Building directory '/App_Code/'.: Publication (web): Object reference not set to an instance of an object.

      Pre-compilation Complete
      ------ Skipped Publish: Project C:\...\WebSite\, Configuration: Debug .NET ------

      I've had a look around and I couldn't find any solution to this. Some say it was intermittent and it goes away after a while, but I've had umpteen failed publish operations since yesterday and see no evidence that it will just go away on its own. Any ideas of what I can look in to?

      User group: Scottish Developers Blog: Can Open... Worms? Everywhere! Quote: Man who stand on hill with mouth open wait long time for roast duck to drop in.

      V Offline
      V Offline
      Vimalsoft Pty Ltd
      wrote on last edited by
      #2

      What did you add or remove Recently on your Project it cannot just give this Error.

      Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

      C 1 Reply Last reply
      0
      • V Vimalsoft Pty Ltd

        What did you add or remove Recently on your Project it cannot just give this Error.

        Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

        C Offline
        C Offline
        Colin Angus Mackay
        wrote on last edited by
        #3

        Vuyiswa Maseko wrote:

        What did you add or remove Recently on your Project it cannot just give this Error.

        Well, one would think. That's what I cannot figure out. The bit that it is failing has had zero changes. There have been no changes to the AppCode folder. There have been changes elsewhere, but it builds and debugs fine, but if I try and publish it then it doesn't work.

        User group: Scottish Developers Blog: Can Open... Worms? Everywhere! Quote: Man who stand on hill with mouth open wait long time for roast duck to drop in.

        V 1 Reply Last reply
        0
        • C Colin Angus Mackay

          Vuyiswa Maseko wrote:

          What did you add or remove Recently on your Project it cannot just give this Error.

          Well, one would think. That's what I cannot figure out. The bit that it is failing has had zero changes. There have been no changes to the AppCode folder. There have been changes elsewhere, but it builds and debugs fine, but if I try and publish it then it doesn't work.

          User group: Scottish Developers Blog: Can Open... Worms? Everywhere! Quote: Man who stand on hill with mouth open wait long time for roast duck to drop in.

          V Offline
          V Offline
          Vimalsoft Pty Ltd
          wrote on last edited by
          #4

          This is really strange. ok back up your App_Code and delete everything there. Build your Project , you will obviously get Errors and copy back the backup contents. Don't copy the folder copy only the contents and built it again and see if this line appears again

          Building directory '/App_Code/'.: Publication (web): Object reference not set to an instance of an object.

          Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

          C 1 Reply Last reply
          0
          • V Vimalsoft Pty Ltd

            This is really strange. ok back up your App_Code and delete everything there. Build your Project , you will obviously get Errors and copy back the backup contents. Don't copy the folder copy only the contents and built it again and see if this line appears again

            Building directory '/App_Code/'.: Publication (web): Object reference not set to an instance of an object.

            Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

            C Offline
            C Offline
            Colin Angus Mackay
            wrote on last edited by
            #5

            I've not tried that yet - I will add it to the list of things to try. I'm currently seeing what it does if I build it in Debug mode (seeing as it seemed to think already it was in debug mode, when I thought I'd set it to release)

            User group: Scottish Developers Blog: Can Open... Worms? Everywhere! Quote: Man who stand on hill with mouth open wait long time for roast duck to drop in.

            V 1 Reply Last reply
            0
            • C Colin Angus Mackay

              I've not tried that yet - I will add it to the list of things to try. I'm currently seeing what it does if I build it in Debug mode (seeing as it seemed to think already it was in debug mode, when I thought I'd set it to release)

              User group: Scottish Developers Blog: Can Open... Worms? Everywhere! Quote: Man who stand on hill with mouth open wait long time for roast duck to drop in.

              V Offline
              V Offline
              Vimalsoft Pty Ltd
              wrote on last edited by
              #6

              I had such Problems before. now i dont change it , i leave it with "Release"

              Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

              1 Reply Last reply
              0
              • C Colin Angus Mackay

                I'm stumpt on this one. I have a Visual Studio 2005 web site project that we've successfully published for well over a year now. Unfortunately yesterday it started to fail with the message:

                ------ Build started: Project: C:\...\WebSite\, Configuration: Debug .NET ------
                Pre-compiling Web Site

                Building directory '/App_GlobalResources/'.
                Building directory '/App_WebReferences/'.
                Building directory '/App_Code/CSCode/'.
                Building directory '/App_Code/VBCode/'.
                Building directory '/App_Code/'.: Publication (web): Object reference not set to an instance of an object.

                Pre-compilation Complete
                ------ Skipped Publish: Project C:\...\WebSite\, Configuration: Debug .NET ------

                I've had a look around and I couldn't find any solution to this. Some say it was intermittent and it goes away after a while, but I've had umpteen failed publish operations since yesterday and see no evidence that it will just go away on its own. Any ideas of what I can look in to?

                User group: Scottish Developers Blog: Can Open... Worms? Everywhere! Quote: Man who stand on hill with mouth open wait long time for roast duck to drop in.

                D Offline
                D Offline
                Daniel Flower
                wrote on last edited by
                #7

                That used to happen when the root folder of the website was '/' (rather than the default website name). Try changing the root folder (properties on web site project) and see if it works. If that's the problem, there was probably a hotfix or something for it (?)

                1 Reply Last reply
                0
                • C Colin Angus Mackay

                  I'm stumpt on this one. I have a Visual Studio 2005 web site project that we've successfully published for well over a year now. Unfortunately yesterday it started to fail with the message:

                  ------ Build started: Project: C:\...\WebSite\, Configuration: Debug .NET ------
                  Pre-compiling Web Site

                  Building directory '/App_GlobalResources/'.
                  Building directory '/App_WebReferences/'.
                  Building directory '/App_Code/CSCode/'.
                  Building directory '/App_Code/VBCode/'.
                  Building directory '/App_Code/'.: Publication (web): Object reference not set to an instance of an object.

                  Pre-compilation Complete
                  ------ Skipped Publish: Project C:\...\WebSite\, Configuration: Debug .NET ------

                  I've had a look around and I couldn't find any solution to this. Some say it was intermittent and it goes away after a while, but I've had umpteen failed publish operations since yesterday and see no evidence that it will just go away on its own. Any ideas of what I can look in to?

                  User group: Scottish Developers Blog: Can Open... Worms? Everywhere! Quote: Man who stand on hill with mouth open wait long time for roast duck to drop in.

                  P Offline
                  P Offline
                  pablop2006
                  wrote on last edited by
                  #8

                  I suggest you try this: http://www.integrationpractices.com/post/2010/02/17/Publication-(web)-Object-reference-not-set-to-an-instance-of-an-object.aspx It perfectly worked for me.

                  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