One of the most wanted feature missing in Visual Developer 2008 Express Edition is precompiling/publish feature which is available in Visual Studio Professional Edition.
I don't want to deploy the website with code behind and class source files. So, I googled on this and found interesting sources online.
Have consolidated and below are the steps to precompile/publish your websites in Visual Developer 2008 Express Edition
- Launch Visual Web Developer Express Edition.
- Select Tools > External Tools to access the External Tools dialog.
- Type Pre-&Compile (non-updatable) in the Title text box. The ampersand in the title means that the character immediately after will be defined as a hotkey for the menu item.
- Click the browse button next to the Command text box and browse to aspnet_compiler.exe in the Windows\Microsoft.NET\Framework\v2.0.50727 directory.
- Click Open to select the aspnet_compiler.exe application.
- Type -p " in the Arguments text box.
- Click the right-facing arrow button on the right edge of the Arguments text box and select Project Directory, as shown in below screenshot
You configure the arguments for aspnet_compiler.exe by using the menu to the right of the Arguments text box.
- Enter a closing quote at the end of the arguments you've entered so far. At this point, the Arguments text box should contain the following text:
-p "$(ProjectDir)"
- Press the spacebar to add a space at the end of the arguments you've entered so far, and then type -v / ".
- Click the right-facing arrow button at the right edge of the Arguments text box again and select Project Directory.
- Type \..\Compiled" after the existing arguments. At this point, the Arguments text box should contain the following text:
-p "$(ProjectDir)" -v / "$(ProjectDir)\..\Compiled"
- Check the Close on Exit check box.
- Click OK to add the new external tool to the list.
You now have a new menu option in Visual Web Developer Express Edition (see below screenshot) that enables you to precompile your web application as a non-updatable application.
That's it!!! Now compile/publish your websites in Visual Developer 2008 Express Edition and start rocking!!!
Very nice.
ReplyDeleteThank you!
You are welcome Quinton :)
ReplyDeletethank you very much for your nice article ! i used it on Visual Web Develpoer 2010 Express Edition.
ReplyDeleteit's working fine !
Can work for VWD 2010 ? seems like the 2010 doesnt have external tools under tools menu.
ReplyDeleteFor anybody who's faced with this problem:
DeleteTools -> Settings -> Expert Settings
This will show the External Tools under Tools menu.
reza, can i ask which compiler you select? the Microsoft.net 4.0 or the sample one which is 2.0 ? Now it's able to generate the compiled folder, but when i launch from browser, it prompt me something like "The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map." .. wondering what problem.
ReplyDeleteThe PreCompile option appears on the Tools menu but when I select it a Command Window pops up for a second and disappears.
ReplyDeleteDoes this mean the application has been compiled?
Which folder is it compiled into?
Thanks Swami, this is really handy :)
ReplyDeleteAvron - the application is compiled into a folder called "Compiled", one level up from the project directory.
For example, if your project directory is C:\WebSites\TestWebSite, you'll find the compiled files in C:\WebSites\Compiled.
Hope that helps!
Hi,muneer here,application is compiled into folder called "Compiled".when iam running my files,its displaying as "This is a marker file generated by the precompilation tool, and should not be deleted!".and my all aspx files are of 1kb.and my besite also contains masterpage.
ReplyDeleteHi, I'm complete novice in .NET. I've followed the instructions I think! I end up with an empty folder called "Compiled", what have I missed? And once the folder contains the files, how do I upload them to the web space? Sorry, I'm used to Dreamweaver on a Mac!!
ReplyDeleteGreat!
ReplyDeleteReally thanks a lot. It was more than usefull
here is the page where you will find the options for the compiler
ReplyDeletehttp://msdn.microsoft.com/en-us/library/ms229863.aspx
also, please make sure (if your app is data-driven and the database is in the app_data folder) to disconnect from the database before running the precompile as it will give you an "being used by another process" error and will not continue.
ReplyDeletethis looks good, but gives me two errors. The first is /Basket.ascx(1) error ASPPARSE: Could not load type 'ezone.Basket'.
ReplyDeletethe second is/basket.aspx(1): error ASPPARSE: 'ezone.basket' is not allowed here becuase it does not extend 'System.Web.UI.Page'.
My website is called ezone. I have a web page ShoppingBasket.aspx, which uses the class basket.cs
On a separate note, I'm using access database files, will I be able to publish this for use? I wan to publish the website on this machine, so that it is accessible from elsewhere.
Presumably this is compiling with ASP.NET v2.0.50727, is there a way to use v3.0 or 3.5? (Their folders don't have an aspnet_compiler.exe file)
I know this post is a little old, but if anyone is getting the message "This is a marker file generated by the precompilation tool, and should not be deleted!" when they try to edit an .aspx file after compiling, the simple fix is to add the -u parameter to the external tool.
ReplyDeleteso, it should look like
-p "$(ProjectDir)" -u -v / "$(ProjectDir)\..\Compiled"
All the code behind files will still be compiled, but you can edit content and design elements through VWD.
yes its working fine with the appended option.
DeleteHello,
ReplyDeleteHowever, a good wed programmer should expertise in web integration, CMS development and integration, social networking application, Zend, CakePHP, Symfony, Codeigniter and so on. So, hire a perfect PHP developer
Hire Web Developer
Works perfect in Visual Web Developer 2010 Express. All you have to do to see "External Tools" is changing "Settings" to "Advanced Settings".
ReplyDeleteThanks a lot!
Hi..is there an option to hold the console window that comes up.. cos i would like to see when warnings are raised .
ReplyDeleteThis is a must read blog. The technical help presented on this blog is just so amazing. I don’t know where else I would have got all the information I had, but from this article. I count myself lucky for having come across this great work. I’m so impressed with this blog.
ReplyDeleteHire web developer
after compiling....what has to be done to upload this site on web server.HELP anyone PLEASE
ReplyDeleteNice your blog has many valuable info's posted...
ReplyDeleteGood work...
hire web developer
nice article...
ReplyDeletethanx a lot
Thanks for the article :-) Still useful after nearly 4 years!!
ReplyDeleteHave just compiled on VWD 2010, but it only worked when I selected the aspnet_compiler in the v4.0.30319 directory.
hi!!i am working on vwd 2010...followed all the steps...a new tool is now available in my tools menu...it does show some kind of a compilation window for a split second but cannot find the 'compiled' folder anywhere...help please!!
ReplyDeletePS-working on a database driven website
This comment has been removed by the author.
Deletecheck inside your project directory i.e. C:\Documents and Settings\\My Documents\Visual Studio 2010\WebSites. but this trick is deleting all of the data from aspx files in VWD2010.
DeleteThat was a lovely concept. Thanks for sharing the same here.
ReplyDeleteWeb development Company
worked like a charm on the VWD 2010 with the new option
ReplyDelete-p "$(ProjectDir)" -u -v / "$(ProjectDir)\..\Compiled"
thanks to all for sharing such a topic.
Thank you Nanba..
ReplyDeleteits grate article working fine for me on VWD 2008 .... :)
ReplyDeleteSir, i have 1 question i want to deploy this complied web application on godaddy server how to do this?? if any idea please help me.
Thanks. Very nice tip
ReplyDeleteMoneylenders offering these sorts of here and now credits can be discovered online and in customer facing facade areas. https://www.usacheckcashingstore.com/san-diegowww.usapaydayloanstore.com/chicagowww.usapaydayloanstore.com/chicago
ReplyDeleteMoreover, most moneylenders will expect you to think of them a check for the measure of the advance in addition to charges, which they will hold until the point that your next payday at which time they will store the check and get their "pay back."
ReplyDeleteCheck Cashing Corona
On the off chance that you are considering getting a loan credit, there are various contemplations that you have to investigate before you round out that application frame. Payday Loans near me san diego
ReplyDelete