问题
Every time I use Setup & Deployment to create a new Web Setup, and run it (after edit all the nice things in the properties), the output is always a copy of the Web Site project...
How can I output a PreCompile version of the WebSite project?
What I did was, publish the Web Site (so I get the precompiled version), add this new precompiled web site as an existing Web site to my solution and add it to the content output of the Setup...
well, the idea was good but I get an error saying:
"This application is already precompiled."
alt text http://www.balexandre.com/temp/stackoverflow_precompiledquestion.png
:-(
Bottom line is that I just want a Setup file that gives me the precompiled version of my Web project, how can I accomplish this?
回答1:
I see you tried the standard Web Setup project from VS. Scott Gu's blog post takes you to this page:
Visual Studio 2008 Web Deployment Projects
which is a plugin for Visual Studio that activates an additional "right click" option to any Web Site project to add such a deployment project. You can see here what I created.... And the output is a pre-compiled web application. Now, if you add a regular Web Setup project to your solution, and point it to the previously created Web Deploy project as its content, ... I got a valid build, no errors and an MSI file was created...with dlls inside it.
http://img222.imageshack.us/img222/6177/71881923mj9.jpg
I hope this helps you.
回答2:
I was searching for this solution from google for long days. What i did is i precompiled my website to one folder and added that folder as a new website to my solution(While adding it will give a warning message that it was already precompiled content. No probs). Now add this project output to the my setup project and one more important thing is in my web deployment project i just disabled Building of my precompiled website.
I just got my thinks working. If you want you can try that.
Regards, Rousseau.A
回答3:
you may be having "PrecompiledApp.config" file in the root of your web application (please check in solution explorer).
I faced this issue and removed "PrecompiledApp.config" from solution explorer and solved the issue.
来源:https://stackoverflow.com/questions/461842/pre-compile-website-in-setup-deployment