Hello I have a couple of developers working on a web app.
They all need to be able to change their local copy of the web.config
file to run against their local databases. The copy in VSS needs to
point to the main application database. But only one copy of
web.config can be check-out at once, and undo checkout overwrites the
changes from VSS.
What can I do.When you get the code from VSS, make the file read/write (so uncheck the
readonly flag). I do this in windows (not anything in VS.NET), so then any
modifications won't trigger a checkout.
-Brock
DevelopMentor
http://staff.develop.com/ballen
> Hello I have a couple of developers working on a web app.
> They all need to be able to change their local copy of the web.config
> file to run against their local databases. The copy in VSS needs to
> point to the main application database. But only one copy of
> web.config can be check-out at once, and undo checkout overwrites the
> changes from VSS.
> What can I do.
>
If you're using the AppConfig section for the connection string, you can
use user.config files which are not in VSS. Just on the dev machines. Specif
y
the section in web.config (which is in VSS) like that:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings file="user.config">
<add key="YourConnectionString" value="YourProdOrStagingConnectionStringValu
e"/>
</appSettings>
</configuration>
Place a user.config in the same folder like the web.config on the dev machin
es.
The user.config looks like that:
<?xml version="1.0" encoding="utf-8"?>
<appSettings file="user.config">
<add key="YourConnectionString" value="YourLocalConnectionStringValue"/>
</appSettings>
As long as a user.config is available, the config values from the user.confi
g
are taken. If no user.confiig is in place, the values from the web.config
are taken (can say as a fallback).
That works for the appSettings section only but - of course - you can create
a similar mechanism for your own sections.
Cheers,
Joachim
> Hello I have a couple of developers working on a web app.
> They all need to be able to change their local copy of the web.config
> file to run against their local databases. The copy in VSS needs to
> point to the main application database. But only one copy of
> web.config can be check-out at once, and undo checkout overwrites the
> changes from VSS.
> What can I do.
>
This just leads him down the same path if the user.config is checked in.
At the end of the day, you'll have to somehow edit the file without checking
it out. This means you'll have to do something manually (outside of VS.NET).
-Brock
DevelopMentor
http://staff.develop.com/ballen
> If you're using the AppConfig section for the connection string, you
> can use user.config files which are not in VSS. Just on the dev
> machines. Specify
> the section in web.config (which is in VSS) like that:
> <?xml version="1.0" encoding="utf-8"?>
> <configuration>
> <appSettings file="user.config">
> <add key="YourConnectionString"
> value="YourProdOrStagingConnectionStringValue"/>
> </appSettings>
> </configuration>
> Place a user.config in the same folder like the web.config on the dev
> machines.
> The user.config looks like that:
> <?xml version="1.0" encoding="utf-8"?>
> <appSettings file="user.config">
> <add key="YourConnectionString"
> value="YourLocalConnectionStringValue"/>
> </appSettings>
> As long as a user.config is available, the config values from the
> user.config
> are taken. If no user.confiig is in place, the values from the
> web.config
> are taken (can say as a fallback).
> That works for the appSettings section only but - of course - you can
> create
> a similar mechanism for your own sections.
> Cheers,
> Joachim
"...which are not in VSS." means that the User.config MUST NOT be checked
in to VSS.
> This just leads him down the same path if the user.config is checked
> in. At the end of the day, you'll have to somehow edit the file
> without checking it out. This means you'll have to do something
> manually (outside of VS.NET).
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
Enable multiple checkouts and have the developers leave it checked out. When
it really changes, they'll need to get the latest and then checkout again to
edit it so it points to the proper locations.
I don't know if it's covered here or not, but you might try perusing the
first two articles at:
http://msdn.microsoft.com/ssafe/technical/articles.asp
Joe
"yurps" <yurps@.yahoo.co.uk> wrote in message
news:1116841902.092770.188040@.f14g2000cwb.googlegroups.com...
> Hello I have a couple of developers working on a web app.
> They all need to be able to change their local copy of the web.config
> file to run against their local databases. The copy in VSS needs to
> point to the main application database. But only one copy of
> web.config can be check-out at once, and undo checkout overwrites the
> changes from VSS.
> What can I do.
>
Thanks for all the recommendations all !
The multiple check-out seems to be a bit dangerous,
it is a shame that this cannot be specified on a per file
basis.
Joe Masters wrote:
> Enable multiple checkouts and have the developers leave it checked
out. When
> it really changes, they'll need to get the latest and then checkout
again to
> edit it so it points to the proper locations.
> I don't know if it's covered here or not, but you might try perusing
the
> first two articles at:
> http://msdn.microsoft.com/ssafe/technical/articles.asp
> Joe
>
> "yurps" <yurps@.yahoo.co.uk> wrote in message
> news:1116841902.092770.188040@.f14g2000cwb.googlegroups.com...
web.config
to
the
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment