简体   繁体   中英

Simplifying publishing multiple ASP.NET Web Site Projects in VS2008

I have a solution in Visual Studio 2008 that contains three projects: a C# Library and two ASP.NET Web Sites (call them A and B). Web Site A depends on the library, and Web Site B depends on Web Site A.

This means that if I make a change to the library project, I have to build it, then publish A, and then publish B. Similarly, if I change A, I have to publish it and then publish B in order to push my changes through.

Is there any way to make this a one-click process for the entire solution? Basically I'm just looking for a way to, in one opaque step, build the library, build/publish A, and then build/publish B.

I have looked into the Web Deployment Project option and it does not do what I need - as far as I can tell, it kind of does the opposite (highly customized build & deployment for a single web site, rather than pretty much default-config building/publishing for multiple projects all at once).

Basically the best way is to forget clicks and make this single-step deployable from the command line. Check out MsBuild to build the solution, then possibly the aspnet_compiler for build/deploy usage.

I believe that Web Deployments projects will work for multiple projects within the same solution.

http://weblogs.asp.net/scottgu/archive/2005/11/06/429723.aspx

If you look at his examples, you can see that he has a website project or WAP as well as a C# library within the same solution, and he seems to be able to compile and deploy them all together.

You could probably also use multiple WDP within the same solution configued to do multiple things.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM