Issues during "Publish Web Site" from Visual Studio
Hi,
I'm currently trying to precompile my umbraco website as the hosting provider I am using takes a considerable amount of time to compile the site upon the first request after uploading changes.
The site compiles fine locally and runs in debug mode without any problems. However, when I "Publish web site" I am constantly receiving a "Object reference not set to an instance of an object" error message. The folder that the message refers to is the root folder. When I remove the Default.aspx from the root folder as a test to leave no code files in that directory the compiler then moves to the next descendant folder and repeats the error. I can iteratively remove files or mark folders hidden in order to remove them from the compilation process but the error simply repeats on the first remaining folder in the site.
I had read an article about moving all custom app_code into a seperate library. I have now done this but still receive the same issue.
Can someone please help as this is now becoming increasingly frustrating.
Mark the website project through vs to not build that should then work. It is good practice to move all your stuff out of app_code its what we do at cogworks and we deploy with cruisecontrol. If we have the website set to build then cruise control fails with similar errors to yours mostly it complains on about the master page references.
How can I publish a precompiled without Visual Studio building the website project? Are you suggesting that there is a way to publish the previousl succesfully built project without the publish mechanism recompiling it?
when you are running your site locally your custom components are already build, otherwise it wouldn't work even locally. All you would need to do is manually copy over the dll files and aspx/ascx/ashx/etc files to the correct directories if you were doing a manual upload. So there is actually no need - once you've compiled it to run locally - to compile it again before uploading to the server. You should not compile the Umbraco web site anyway as it will give you trouble since you won't have the full source code and it would be unnecessary anyway.
You can define which projects in your VS solution get compiled by going to the properties page for the solution and then modifying the list in the Configuration menu.
Issues during "Publish Web Site" from Visual Studio
Hi,
I'm currently trying to precompile my umbraco website as the hosting provider I am using takes a considerable amount of time to compile the site upon the first request after uploading changes.
The site compiles fine locally and runs in debug mode without any problems. However, when I "Publish web site" I am constantly receiving a "Object reference not set to an instance of an object" error message. The folder that the message refers to is the root folder. When I remove the Default.aspx from the root folder as a test to leave no code files in that directory the compiler then moves to the next descendant folder and repeats the error. I can iteratively remove files or mark folders hidden in order to remove them from the compilation process but the error simply repeats on the first remaining folder in the site.
I had read an article about moving all custom app_code into a seperate library. I have now done this but still receive the same issue.
Can someone please help as this is now becoming increasingly frustrating.
Thanks,
Brian.
Brian,
Mark the website project through vs to not build that should then work. It is good practice to move all your stuff out of app_code its what we do at cogworks and we deploy with cruisecontrol. If we have the website set to build then cruise control fails with similar errors to yours mostly it complains on about the master page references.
Regards
Ismail
Hi Ismail,
How can I publish a precompiled without Visual Studio building the website project? Are you suggesting that there is a way to publish the previousl succesfully built project without the publish mechanism recompiling it?
Thanks,
Brian.
Hi Brian,
when you are running your site locally your custom components are already build, otherwise it wouldn't work even locally. All you would need to do is manually copy over the dll files and aspx/ascx/ashx/etc files to the correct directories if you were doing a manual upload. So there is actually no need - once you've compiled it to run locally - to compile it again before uploading to the server. You should not compile the Umbraco web site anyway as it will give you trouble since you won't have the full source code and it would be unnecessary anyway.
You can define which projects in your VS solution get compiled by going to the properties page for the solution and then modifying the list in the Configuration menu.
Hope that helps,
Sascha
is working on a reply...