publishing asp.net website give “Object reference not set to an instance of an object.” error

后端 未结 5 950
逝去的感伤
逝去的感伤 2021-02-15 05:05

I am getting fed up with this error. I have search all over the web and tried every possible suggestion to this error I could find.

  1. delete app_code, build, add fil
5条回答
  •  难免孤独
    2021-02-15 05:58

    This error was occurring for me when I tried to compile the project with MSBUILD - it would build fine within Visual Studio, and would even Debug in my local browser. The Publish option within VS worked, as well. But the command-line MSBUILD was causing the project to error out every time.

    I managed to fix this problem in VS 2012 by opening the Property Pages on my Website, opening the 'MSBuild Options' tab, and unchecking the 'Allow this precompiled site to be updatable' option, then hitting 'save all'.

提交回复
热议问题