views:

109

answers:

5

Here's what I'm working with:

  • Several websites
  • Classes/data shared between them (registration systems on individual sites, and management on a central site)
  • A workflow application that runs nightly.

I need to be able to cleanly and easily share the classes between the websites and workflow component. I know this is textbook 'DLL!', but I'm wondering what kind of Visual Studio (2008) project(s) you recommend to make all this happen in a clean, logical fashion.

What do you suggest?

Edit: I seem to remember some kind of project type (in VS05?) that allowed me to contain several sites and projects (all related) in the same solution. Am I nuts?

+1  A: 

this is sort of a no brainer, unless I am missing something in your question.

You would have a website project for each website, and a class library project for your dll.

But what I THINK you meant is how to easily share the DLL(s) across all sites? In that case try coding some post build events for the DLL to deploy it to all appropriate BIN folders

Neil N
Yeah, it's a funny question, and you're probably correct. See my edit for a little more info, but odds are I'll try to figure out something similar to your suggestion.
jcelgin
+1  A: 

A whole other way to share the code between the websites is though webservices that run locally, and closed for outsiders to see. That way, you share functionality, but only have one update point for the logic - but then again, this make it hard to upgrade your code, as you need to make sure, that none of your websites will break, when chaning code, and fix bugs etc.

For multiple sites in one solution, then yes. You can have milions of website projects in the same solution. There are two website options: Website and Web Application.

Jesper Blad Jensen aka. Deldy
+1  A: 

Create a bland solution first.

Then add site 1, 2, 3.... to the solution as you need.

Add the workflow project to the solution

Add a Class library project to the solution.

Reference the Class library project in all of other projects.

Ken Yao
A: 

There seems to be some ambiguity in our terminology here. We are presuming that when jcelgin posed the question, he was referring to the Website (or Web site) template. If this is the case, then he is going to encounter difficulties sharing the library. Are the sites actually based on the Web Application Project template? If so, then it should be straightforward...

IrishChieftain
+1  A: 

Here was the problem I was running into. In Visual Studio 2008, the Solution View is hidden by default, making it hard to add other projects, websites, etc.

Enabling the Solution View solved all of my problems.

jcelgin
Interesting, I never noticed this problem. Perhaps because I upgraded from VS2005 that I never picked up this new default setting.
Neil N
but +1 for coming back and posting the solution almost 2 months later
Neil N