jcelgin
jcelgin

Reputation: 1174

Appropriate VS Project for Multiple .Net Sites

Here's what I'm working with:

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?

Upvotes: 1

Views: 198

Answers (5)

jcelgin
jcelgin

Reputation: 1174

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.

Upvotes: 1

IrishChieftain
IrishChieftain

Reputation: 15253

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...

Upvotes: 0

Ken Yao
Ken Yao

Reputation: 1516

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.

Upvotes: 1

Jesper Blad Jensen
Jesper Blad Jensen

Reputation: 2751

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.

Upvotes: 1

Neil N
Neil N

Reputation: 25258

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

Upvotes: 1

Related Questions