Solution for ASPNETCOMPILER ASPRUNTIME error: Object reference not set to an instance of an object
If you’re using Web Deployment project and during build getting errror “Object reference not set to an instance of an object” error from ASPNETCOMPILER, check the BIN folder of the project you’re compiling. Chances are, there’re some *.compiled files there. Remove them and your deployment will go thru.
thank you for a great post. I was already wasted so many hours and couldn’t resolve this issue until now. Thank you again…
Thanks allot buddyy…its like a life jacket for me..
again thank . Great solution
tnx dude! Im just wondering! what is the connection *.compiled files to the error..
anyway! Thanks again and Great solution!
this a fantastic solution as i was scrubbing my head for past hours to overcome this issue.
Thank you so much 😀
Thank you. You rescued me before my deadline 🙂
Thanks for the post. Simple solution for such an abstract error message.
Man you’re a genius. You saved me a lot of time. Good job
Thank you very much, you saved us a lot of time. By the way what is the reason for this fail?
Worked for me. Great post!
I don’t have *.compiled files over there but still i am getting this issue … m stuck
When select publish, in the settings section -> File Publish Options check “Exclude files from the App_Data folder”. Work for me.
well i am using FTP deploy and there are no .complied in my bin folder. any other option ?
I got the same issue recently. None of the options above worked for me. After hours of researching and trying, uncheck Precompile during publishing solved my issue.
In my case, I was using a set of custom DLLs in my website, some of those were dependant on others. When I updated the base DLLs I started getting this error message. Apparently due to a version mismatch.
The solution was to re-build all the DLLs used in my website which also used the updated DLLs to get them all using the latest version.
There’s probably a better way to manage this, as I update the base DLLs quite frequently, but this process works for now.
For a single Web Site project, opening the Solution file and seeing the actual project properties (what gets copied to .metaproj file) gave me some direction that is still pending due to needed config Transforms, however, I did find files in the solution that were added, then git-ignored, which resulted in changes like this having no effect because git was ignoring them and they stayed in the repository that was being built after being removed from the synced local copy.
Hola, Tengo el mismo problema y es intermitente, aplique todas las soluciones propuestas y nada, lo resolvi creando un sitio web en disco duro y posteriormente los subo a servidor, del drirectorio tempral elimino todos los archivos de cada compilacion, de esa manera se soluciono.
Saludos