Solved

Deploying Websites Via Visual Source Safe

Posted on 2009-05-11
8
691 Views
Last Modified: 2013-11-26
Hello,

We have recently installed a Visual Source Safe solution on our network and we are currently experimenting with deploying from VSS to our live servers.  We've hit two issues that while deploying that we think can probably be handled easier, we're just not sure what we should do.

We place all 3rd party .dlls included in a site within the App_Code\Libraries folder and then we add a reference to that file, which copies those files and their .refresh files to the bin folder.  Every file in the project EXCEPT the dlls in the bin folder are in source safe and get pushed to the live server when we deploy, but the dlls in the bin folder don't so then the site errors out with the message that it can't find the required assemblies.  There doesn't seem to be an option to add them to source control either.  Then what we have to do is FTP the .dll files into the \bin on the live server.  Seems like an unecessary last step, and we'd like it so that the .dlls just get pushed when we deploy from VSS.  What could we do to correct that?

The second issue is a more minor one, but it deals with connection strings in web.config.  We point the web.config for the dev site to a dev version of the related DB, so when we push changes the web.config gets pushed with the dev connection string to the live server.  Is there a way to have the deployment ignore connection strings in web.config so that all other changes are recorded and deployed?  Or will we just have to comment/uncomment the dev and live connection strings just before deploying?

TIA,

Mike
0
Comment
Question by:MClarkCCR
  • 4
  • 2
  • 2
8 Comments
 
LVL 9

Expert Comment

by:tillgeffken
ID: 24358214
Regarding your first question:

We're using Team Foundation Server so i'm not sure if this applies to Source Safe too but MS Source Control systems tend to filter .dll files because they expect them to get compiled on the target. Check if you can find a file filter setting in VSS.
0
 
LVL 3

Author Comment

by:MClarkCCR
ID: 24358235
tillgeffken,

Thanks for the response.  I'll check and see if I can unfilter .dll files, but I actually think it makes more sense for the .dlls to get compiled on the target from the references I added to the project.  Do you think there's something I can enable that will cause this to happen?  Right now it looks like it's just looking for the .dll files without actually attempting to compile them.

Mike
0
 
LVL 9

Expert Comment

by:tillgeffken
ID: 24358326
I was kind of rushing through your question and missed that you mentioned that all files are there except for the one's in bin (which is a good thing, i agree). So the dll's are checked in in VSS and get deployed to production (in /App_Code/Libraries)?
0
 
LVL 3

Author Comment

by:MClarkCCR
ID: 24358485
Yes,  

The reason being that when we simply added a reference to a .dll that we had on our local machine, it seemed that the .refresh file would point to the local folder on our machine where the .dll was stored.  This caused problems for us when modifying the website from another machine and we would get warnings stating 'cannot refresh blah.dll' etc.  By copying all third-party .dlls to the App_Code\Libraries\ and THEN adding a reference to them the relative path to the files remains constant no matter which machine we are working from.

After adding a reference, Visual Studio copies the .dlls to the bin directory and I assume looks for the files in the bin\ specifically when using code that references the libraries.  When we deploy the site from VSS to the live server (or even the public staging server, for that matter) the .dll files from App_Code\Libraries\ get deployed, but the same ones in bin\ do not.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 3

Author Comment

by:MClarkCCR
ID: 24359213
What it seems like to me, if I understand things correctly is that we need some way that we can build the website on the target server after it has been deployed from VSS.  
0
 
LVL 12

Accepted Solution

by:
Hairbrush earned 500 total points
ID: 24363773
Hi Mike

Is your Visual Studio project type a "web site" or "web application"?  If it were a "web site" then your site would get compiled when it is first used.

Did you consider the methods for publishing a site that are included in Visual Studio: http://msdn.microsoft.com/en-us/library/5c12ykae(VS.80).aspx

More powerful still, and I think this would be a good fit for you, is the "web deployment project" described here by Scott Guthrie: http://weblogs.asp.net/scottgu/archive/2005/11/06/429723.aspx

I think deploying directly from VSS is going to limit your options.

0
 
LVL 3

Author Closing Comment

by:MClarkCCR
ID: 31580298
The web deployment project you suggested is awesome.  It allows easy deployment from local, to staging, to production and even substituting the appropriate connection strings on deployment.  We haven't figured out everything out about it yet, but this is exactly what we need.

Thanks again!
0
 
LVL 12

Expert Comment

by:Hairbrush
ID: 24395696
Delighted to have been of help.  Thanks for the great feedback.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now