locked
Website publishing error : Publication (web): Object reference not set to an instance of an object RRS feed

  • Question

  • User1082022916 posted

    First of all, i find runtime exception when publishing a website pretty odd. This error pops up semi-randomly in two different ASP.NET solutions that I have in Visual Studio 2008.

    Odd things like deleting a sub folder (just the contents aren't enough) resolve the issue temporarily til I need to publish again. These solutions "Build Solution" with no errors or warnings, but die when I try to publish.

    Specifically, this happens after the "Pre-compiling Web Site" stage.

    Tuesday, April 3, 2012 12:20 PM

All replies

  • User1082022916 posted

    Other times, I get random erros like these:

    Building directory '/Admin/'.(0): Publication (web): vbc : Command line (0): error BC2017: could not find library 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\admin\ae313a49\4a2c106d\App_Web_menu.ascx.e3bf02fb.dll'
    (0): Publication (web): vbc : Command line (0): error BC2017: could not find library 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\admin\ae313a49\4a2c106d\App_Web_menu.ascx.e3bf02fb.dll'
    (0): Publication (web): vbc : Command line (0): error BC2017: could not find library 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\admin\ae313a49\4a2c106d\App_Web_menu.ascx.e3bf02fb.dll'
    (0): Publication (web): vbc : Command line (0): error BC2017: could not find library 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\admin\ae313a49\4a2c106d\App_Web_menu.ascx.e3bf02fb.dll'
    
    vbc : Command line (0,0): error BC2017: could not find library 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\admin\ae313a49\4a2c106d\App_Web_menu.ascx.e3bf02fb.dll'
    vbc : Fatal (0,0): error BC2000: compiler initialization failed unexpectedly: The filename, directory name, or volume label syntax is incorrect. 
    vbc : Command line (0,0): error BC2017: could not find library 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\admin\ae313a49\4a2c106d\App_Web_menu.ascx.e3bf02fb.dll'
    vbc : Fatal (0,0): error BC2000: compiler initialization failed unexpectedly: The filename, directory name, or volume label syntax is incorrect. 
    vbc : Command line (0,0): error BC2017: could not find library 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\admin\ae313a49\4a2c106d\App_Web_menu.ascx.e3bf02fb.dll'
    vbc : Fatal (0,0): error BC2000: compiler initialization failed unexpectedly: The filename, directory name, or volume label syntax is incorrect. 
    vbc : Command line (0,0): error BC2017: could not find library 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\admin\ae313a49\4a2c106d\App_Web_menu.ascx.e3bf02fb.dll'
    vbc : Fatal (0,0): error BC2000: compiler initialization failed unexpectedly: The filename, directory name, or volume label syntax is incorrect. 
    Pre-compilation Complete



    Tuesday, April 3, 2012 12:25 PM
  • User-101068015 posted

    Hi

    Sounds like you assembly still the old one.

    You can clean your solution first.(right click the explore and choose clean)

    If yo project is build in .net 3.5 you should use v3.5 to compile it , not v2.0.

    Hope it helpful.

    Thanks.

    Wednesday, April 4, 2012 10:16 PM
  • User1082022916 posted

    Nope. I have deleted BIN folder DLLs, .NET temporary files, and CLEANed soltions several files.

    Thursday, April 5, 2012 8:46 AM
  • User1082022916 posted

    Any reason to believe that I am using v2.0 to compile it?

    Thursday, April 5, 2012 8:47 AM
  • User-101068015 posted

    Hi

    In this error you can find it's use v2.0.50727.

    That's .net 2.0.

    1 And you can try to shut down VS.

    2 Delete all files and folders in user temp folder(e.g. C:\Documents and Settings\Administrator\Local Settings\Temp).

    3 Start VS.

    4 Rebuild solution

    Hope this helps.

    Monday, April 9, 2012 9:41 PM
  • User1082022916 posted

    I have tried all these things. This problem has survived several entire reboots of the computer.

    Tuesday, April 10, 2012 8:38 AM
  • User261291722 posted

    try turn off your antivirus worked for me

    Thursday, October 25, 2012 8:44 PM