Geeks With Blogs

Michael Freidgeim's Blog MS .Net Development

If you are working with Web Site porjects, VS 2005 Web Setup Project out-of-the-box is almost useless. The only option is to add content (including source code files).

The recommended solution  is to publish web project to create  precompiled web application.

 Then you can add Procomiled site content to Web Setup Project.

Note that you will see VS warning that precompiled Web Site is not recommended to be added to solution.

When you will build Web Setup Project, the error will be shown

Error 1 This application is already precompiled. 

You have to ignore both warning and error to make MSI built.

It is not user friendly process!

If you are working with Web Application Projects(WAP), see ScottGu's Creating Packaged ASP.NET Setup Programs with VS 2005  (thanks to Dave's comment below for pointing to the article).

Posted on Friday, February 3, 2006 8:48 AM | Back to top


Comments on this post: Using VS 2005 Web Setup Project Web Site porject - not user friendly process.

# re: Using VS 2005 Web Setup Project - not user friendly process.
Requesting Gravatar...
Hi Michael,

You can eliminate this as follows:

In Solutions Explorer, right-click on the setup project to bring up the properties window.

Click on the Configuration Manager button

This will show you a list of files included within the setup.

Against your precompiled outputs, uncheck the checkbox in the "build" column

try and rebuild the setup, it will proceed beautifully

Left by vaishali on May 01, 2006 12:40 PM

# re: Using VS 2005 Web Setup Project - not user friendly process.
Requesting Gravatar...
Hi,
I am having the same problem and tried the above resolution. Unfortunately it made absolutely no difference and I still get the "This application is already precompiled" message. A very frustrating problem.
Left by Pete on Jun 23, 2006 7:41 PM

# re: Using VS 2005 Web Setup Project - not user friendly process.
Requesting Gravatar...
Pete,
Solution, suggested by vaishali, definitely works to avoid build error. Ensure that your Configuration Manager canges are done for the correct mode ("debug" or "release").
Left by Michael Freidgeim on Jun 28, 2006 4:18 PM

# re: Using VS 2005 Web Setup Project - not user friendly process.
Requesting Gravatar...
Had the same problem, and tried the above. No results. In the solution explorer i deleted the PrecompiledApp.config . Voila.
Left by Chris on Sep 08, 2006 10:18 PM

# re: Using VS 2005 Web Setup Project - not user friendly process.
Requesting Gravatar...
Deleting PrecompiledApp.config solved the case. Yay!
Left by Ali on Sep 27, 2006 2:21 AM

# re: Using VS 2005 Web Setup Project - not user friendly process.
Requesting Gravatar...
Ali,
The PrecompiledApp.config file is used to keep track of how the app was deployed and whether ASP.NET needs to compile any files at request time.
So by deleting the file you will lost the important information and the deployed site will start slower.
Left by Michael Freidgeim on Sep 27, 2006 12:12 PM

# re: Using VS 2005 Web Setup Project - not user friendly process.
Requesting Gravatar...
The above solution worked for me, I also removed PrecompiledApp.config file.
Left by Jagadeesh on Mar 06, 2008 10:49 PM

# re: Using VS 2005 Web Setup Project - not user friendly process.
Requesting Gravatar...
Check out ScottGu's blog. Excellent example!
http://weblogs.asp.net/scottgu/archive/2007/06/15/tip-trick-creating-packaged-asp-net-setup-programs-with-vs-2005.aspx
Left by dave on Mar 19, 2008 2:35 AM

# re: Using VS 2005 Web Setup Project - not user friendly process.
Requesting Gravatar...
Dave,
Thanks to pointing to good ScottGu's blog post.
However he is talking about Web Application Project(which is better for all not-trivial web applications). My post was about Web SITE project(only one that was available in VS 2005 at Feb 2006)
Left by Michael Freidgeim on Mar 19, 2008 8:53 AM

# re: Using VS 2005 Web Setup Project Web Site porject - not user friendly process.
Requesting Gravatar...
John,
Without the PrecompiledApp.config file ASP.NET will compile any .ASPX/ASCX files at request time, that will slow down start an application for the first user.
see http://msdn2.microsoft.com/en-us/magazine/cc163675.aspx
Left by Michael Freidgeim on Apr 18, 2008 7:08 AM

# re: Using VS 2005 Web Setup Project Web Site porject - not user friendly process.
Requesting Gravatar...
yes, but deleting your precompiledApp.config is not a solution, well... in case of you want to deliver the source code into your application...

i still working in andother solution...

Left by celerno on Jun 05, 2008 12:35 PM

# re: Using VS 2005 Web Setup Project Web Site porject - not user friendly process.
Requesting Gravatar...
i have install the vs 2005 .and start the vs 2005 i am not using the web port.\
please help me.

thanks
umesh mishra
Left by umesh on Dec 04, 2008 7:49 PM

# re: Using VS 2005 Web Setup Project Web Site porject - not user friendly process.
Requesting Gravatar...
I ported and upgraded a VS2005 website to VS2008. Having got the Precompiled error, I removed the precompliledApp.config, but still got the error.

The solution, I found, was then to delete the whole 'ProjectSection' from the .sln file. Viola!!
Left by JulesH on Jan 15, 2009 11:17 PM

# re: Using VS 2005 Web Setup Project Web Site porject - not user friendly process.
Requesting Gravatar...
hey vaishali solution is very helpful to me and it solved my prob thanks yar ... :)
Left by pshah on Apr 02, 2009 9:06 PM

# re: Using VS 2005 Web Setup Project Web Site porject - not user friendly process.
Requesting Gravatar...
I have so many problems with the installation of my website.
First when I am creating a setup project and need to select project output
I do not have primary output so I am adding a deploy project.
The deploy project add deploy to the name of all assembly dll's and can not find them afterwards.
I am changing the dll's name in bin folder and I still can not see page on browser in IIS.

Left by orly on Jun 25, 2009 1:09 AM

# re: Using VS 2005 Web Setup Project Web Site porject - not user friendly process.
Requesting Gravatar...
Hey Vaishali!
Your suggested solution worked for me as well.
Thanks for saving my day.
Left by Umesh Kumar on Nov 25, 2009 5:12 AM

# re: Using VS 2005 Web Setup Project Web Site porject - not user friendly process.
Requesting Gravatar...
vaishali solutiion worked for me
Left by claire on Jul 15, 2010 11:45 AM

Your comment:
 (will show your gravatar)


Copyright © Michael Freidgeim | Powered by: GeeksWithBlogs.net | Join free