Sign in to follow this  
plywood

.NET Configuration & Deployment Strategies

Recommended Posts

plywood    103
I'm a little weak on terminologies here, so before I begin cruising Object Browser (VS 2008) and the MSDN library, I figured I'd start here for some good ole' fashioned advice and explanations. I finally understand the difference between Debug and Release build configurations. So now I'm wondering: (1) Do Debug/Release suffice for like 99% of software projects? Or is it typical to create your own build config, perhaps like one called Staging? This got me thinking: you can create your own build config in VS, and there are also tools like NAnt out there to handle build configurations for you. Then there is also this entire System.Configuration namespace provided by .NET. So: (2) Do these three tools (VS Solution Config Manager, NAnt and System.Configuration) all do the same thing? If not then what are each used for, and how do they relate to each other? Which got me thinking about a solid deployment strategy. My solution will be a web service (running off an HTTP server) that passes incoming requests off to a server-side set of class libraries (C#) for processing and then returns a result back to the client (a browser). I've found two built-in deployment options in VS: ClickOnce and Windows Installer. The installer is clearly not an option because the clients (sending requests through IE, or FF, etc.) should never have to install anything locally. Click once seems like a possible solution, but I'm not confident that its the best tool for the job here. The best description of ClickOnce that I got was that it "copies your solution so that you can publish it to a web server, and then your clients automatically get access to whatever is on that server when they click a link in their browser". So I guess is, given the brief explanation of my web app, does ClickOnce sound like the right choice? I have also noticed a System.Deployment assembly, and figure it is probably used to build services like ClickOnce. So, finally: (3) Does ClickOnce sound valid? (4) What is System.Deployment used for? (5) What is the relation between ClickOnce and System.Deployment? I think that's enough for now ;-) thanks for any help here, ply

Share this post


Link to post
Share on other sites
gan    166
Quote:
(2) Do these three tools (VS Solution Config Manager, NAnt and System.Configuration) all do the same thing? If not then what are each used for, and how do they relate to each other?

"VS Solution Config Manager" need manual attention. NAnt can be automated, like Java counterpart for build nightly version. (MSBUild seems is the MS way to answer it)
"System.Configuration" I not yet try.

Quote:

I've found two built-in deployment options in VS: ClickOnce and Windows Installer. The installer is clearly not an option because the clients (sending requests through IE, or FF, etc.) should never have to install anything locally.


Even the web app also need to install on server side.
Quote:

My solution will be a web service
This might need impersonation. (BEWARE: this will always deal with security issue)

Share this post


Link to post
Share on other sites
plywood    103
So:

(1) Do Debug/Release suffice for like 99% of software projects? Or is it typical to create your own build config, perhaps like one called Staging?

(2) Do these three tools (VS Solution Config Manager, NAnt and System.Configuration) all do the same thing?

(3) Does ClickOnce sound valid?

(4) What is System.Deployment used for?

(5) What is the relation between ClickOnce and System.Deployment?

Share this post


Link to post
Share on other sites
jpetrie    13142
Quote:

(1) Do Debug/Release suffice for like 99% of software projects? Or is it typical to create your own build config, perhaps like one called Staging?

If you need to ask this question, you do not need any configurations other than Debug and Release.

Quote:

(2) Do these three tools (VS Solution Config Manager, NAnt and System.Configuration) all do the same thing?

No.

Quote:

(3) Does ClickOnce sound valid?

Depends. ClickOnce is for client-side installs. If your application runs only a server and produces HTML for display, you may not need any kind of client deployment option.

Quote:

(4) What is System.Deployment used for?

The System.Deployment namespace is provided by ClickOnce... unless you are a ClickOnce application, you can do very little of use with it. It's mostly used to programmatically interact with the ClickOnce system, to check for updates, et cetera.

Quote:

(5) What is the relation between ClickOnce and System.Deployment?

The latter is part of the former.

Share this post


Link to post
Share on other sites
plywood    103
(1) Okay, can one use NAnt to configure a build in a way that is different than the Debug/Release defaults? If so, can you provide an example or two of where one might actually use it to do this, and how?

(2) What are the differences (in functionality - what they do, per se) between VS Solution Configuration, NAnt and System.Confugration?

Share this post


Link to post
Share on other sites
jpetrie    13142
Quote:

(1) Okay, can one use NAnt to configure a build in a way that is different than the Debug/Release defaults? If so, can you provide an example or two of where one might actually use it to do this, and how?

Yes. The NAnt documentation explains how to call csc, the C# compiler, and how to pass options to it. Those options are all the VS IDE's configuration windows are controlling.

Quote:

(2) What are the differences (in functionality - what they do, per se) between VS Solution Configuration, NAnt and System.Confugration?

The VS configuration dialogs control how VS builds the project using MSBuild (for C#). NAnt is another build system like MSBuild. System.Configuration provides methods for access configuration data at runtime -- this is a different kind of configuration data than what NAnt or MSBuild care about. For more information, use Google or read the appropriate documentation for any of those systems.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this