ASPNETCOMPILER(0,0): Error ASPRUNTIME: Object reference not set to an instance of an object

六眼飞鱼酱① 提交于 2019-12-18 04:47:10

问题


I'm Trying to publish a website, using Visual Studio 2013. I'm getting an error:

ASPNETCOMPILER(0,0): Error ASPRUNTIME: Object reference not set to an instance of an object.

It happens also on Visual Studio 2010. I tried to restart VS, and PC. I removed *.dll.refresh from my bin directory. I don't have <clear/> tags in my web.config. I think it all started when I accidently removed my *.suo file.

Any ideas?

Update:

I just noticed it happens only when I try to precompile my site. If I publish without precompilation it works fine...


回答1:


OK. After wasting so many hours I somehow got to this blog: http://thesoftwarepractice.net/development-things/object-reference-not-set-to-an-instance-of-an-object

Turned off the McAfee Real Time Scanning and its works...




回答2:


I also had this problem and it was not solved by any of the ideas mentioned previously. The problem was that somehow compresssion had been enabled on the subfolder of my drive containing the ASP.NET website. The solution is to right-click, choose properties and in the general tab, click Advanced and under the 'Compress or Encrypt attributes' section, make sure 'Compress contents to save disk space' is unchecked. Upon prompting do this for all files and subfolders (note it may take some time). Hope this helps someone.




回答3:


Have you tried creating a new website, adding all the files from old website to the new one and adding all the references used?




回答4:


I also had this issue, and I fixed it by clearing and re-configuring all the dependencies and the dll's of the project.



来源:https://stackoverflow.com/questions/26838946/aspnetcompiler0-0-error-aspruntime-object-reference-not-set-to-an-instance-o

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!