views:

328

answers:

1

This might be a duplicate question as I have found a few that are similar, but not exactly the same. The title pretty much says it all, but here are the details:

The basic setup I have in VS2008 is two web site projects (not web application projects!) living in the same solution; call them A and B. A depends on B, since B contains a user control which I build into a custom server control.

Ideally, what I would like to do is have a one-click way to build everything: generate the precompiled DLL for B (without having to separately click "Publish") and then build/publish A to my IIS virtual directory. So, how do I accomplish this?

The reason for doing everything in a single click (which "Build Solution" doesn't seem to do right now) is twofold: first, fewer clicks means fewer opportunities to forget a step, or do something out-of-order, and generally less chance of making a mistake (K.I.S.S., right?). Second, I can't figure out how to configure my user control web site project (B) so that it generates the DLL in a location that I specify - or if this is even possible to do. Ideally I could just set it up so that the DLL ends up in "[B's project directory]/bin/debug/" or something like that. I want to avoid using the command line (e.g. msbuild) if possible, since I understand that even less than the VS GUI.

EDIT: Another, related question is - instead of building my ASP.NET user control (which gets built into a custom server control) inside of a Web Site Project (B), is it possible to just build it in a C# class library project, which should solve all of these issues?

A: 

Hi,

You can use Web Deplooyment Projects which are integrated into VS and have some customizations through its UI but if you want to really dig into and customize the process you will have to know MSBuild.

Sayed Ibrahim Hashimi