Resolving Web Site Project References
I have an ASP.NET web site (not web project). It somehow stores references to the other projects in the solution. At build time it needs to copy them over.
I'm trying to reproduce this in an MSBuild script. I know normal references are handled by refresh files and that's good and working.
How can I get the 开发者_如何学GoDLL files for the project references (and their dependencies)?
For website projects, the easiest way is to add a Web Deployment project to your solution. This is a special project type (available from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=0AA30AE8-C73B-4BDD-BB1B-FE697256C459) that mimics the "Publish" action in Visual Studio.
Once you've added it to your solution, you can then call MSBUILD.EXE to compile your web site and all of its dependencies:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\MSBUILD C:\MyWebSite\MyWebSiteDeployProj\MyWebSiteDeployProj.wdproj /target:Clean;Rebuild
I haven't been able to answer this question, so I'll present an alternative
Having a main project that has all the dependencies, and the website only having a reference to one project. This seems to work well as I can just copy the contents of the main project bin
directory. It also forces a design type which can be either good or bad, however it's worked well so far.
精彩评论