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

后端 未结 10 1523
遥遥无期
遥遥无期 2021-02-15 05:24

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
10条回答
  •  清歌不尽
    2021-02-15 06:03

    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'.

提交回复
热议问题