Solution for ASPNETCOMPILER ASPRUNTIME error: Object reference not set to an instance of an object

By , August 17, 2009 3:12 pm

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.

17 Responses to “Solution for ASPNETCOMPILER ASPRUNTIME error: Object reference not set to an instance of an object”

  1. Tungster says:

    thank you for a great post. I was already wasted so many hours and couldn’t resolve this issue until now. Thank you again…

  2. Ravi says:

    Thanks allot buddyy…its like a life jacket for me..

    again thank . Great solution

  3. aguirre says:

    tnx dude! Im just wondering! what is the connection *.compiled files to the error..

    anyway! Thanks again and Great solution!

  4. Rahul says:

    this a fantastic solution as i was scrubbing my head for past hours to overcome this issue.

  5. AR says:

    Thank you so much 😀

  6. Ahmad Ali says:

    Thank you. You rescued me before my deadline 🙂

  7. Jim says:

    Thanks for the post. Simple solution for such an abstract error message.

  8. Dima says:

    Man you’re a genius. You saved me a lot of time. Good job

  9. Leslie says:

    Thank you very much, you saved us a lot of time. By the way what is the reason for this fail?

  10. Nice Work says:

    Worked for me. Great post!

  11. Mohit Juneja says:

    I don’t have *.compiled files over there but still i am getting this issue … m stuck

  12. Jhonattan says:

    When select publish, in the settings section -> File Publish Options check “Exclude files from the App_Data folder”. Work for me.

  13. Ann says:

    well i am using FTP deploy and there are no .complied in my bin folder. any other option ?

  14. Wei Xiong says:

    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.

  15. Sean Lyttle says:

    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.

  16. Neil says:

    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.

  17. Raziel says:

    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.

Leave a Reply

Panorama Theme by Themocracy