Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get Visual Studio's "Publish Website" to 1. not overwrite web.config & 2. promote copies of dlls that were referenced from my GAC

I started using a a library which I reference from the GAC during development. I want the dll included in the project bin directory when I promote it to the webserver. I also need my local and the server web.config to be different. Before I started using this library I really enjoyed using the publish website feature of VS. Now it just seems to be getting in the way.

like image 619
minty Avatar asked Nov 24 '08 15:11

minty


2 Answers

Regarding the web.config deployment problem: Scott Guthrie wrote about here:

Tip/Trick: Automating Dev, QA, Staging, and Production Web.Config Settings with VS 2005

You can easily automate the configuration process within the Visual Studio build environment (and do so in a way that works both within the IDE, as well as with command-line/automated builds).

like image 98
splattne Avatar answered Oct 26 '22 18:10

splattne


Current configuration with the publish tool will send the web.config to the final site, and as far as I know there is no way around this.

Visual Studio 2010 is going to offer the ability to have targeted configurations allowing the deployment process to push out a different configuration.

As for the .dll reference, I believe the only way to get that to work is if you have "Copy Local" set to true on the reference.

like image 21
Mitchel Sellers Avatar answered Oct 26 '22 16:10

Mitchel Sellers