none
Sharing web content between multiple projects RRS feed

  • Question

  • I'm going nuts managing a C# web application project, or actually projects. I have two sets of the exact same files and I end up having to copy them back and forth as I make changes. Now before you go say something like use links! Read the rest of this post.

    I've tried to find suitable way of organizing these projects within the solution but it's just not meant to be. What happens is that even if I reduce the number of files to just one set of files (using links) they won't end up in the web application directory structure as expected.

    If I use links and then set the Copy to Output Directory property, VS will put all the files in ~/bin/... which just ain't right. That's what the Project property dialog says alright however... I'm under the impression that files in that folder or any of it's sub folders are never served by the hosting environment nor should Content resources be found there. Moreover, I use continuous integration and rely on MSBuild for a lot of things and at some point I have made assumptions that the default ASP.NET project layout remain about the same. I can change the output to simply / but that will end up putting all the *.dll in web site root!

    At this point i'm considering a post build event but there's gotta be a sensible way to make this work with links. Links with Copy to Output Directory would be ideal for me but it completely messes up the directory structure.

    John
    Thursday, July 24, 2008 10:15 AM

All replies