views:

185

answers:

1

I put my csproj for my web service in sourcesafe.

Now inside of the text of the csproj there is a line stating that the webservice is located at localhost/something

is there a way to not store this info in the csproj so users can move this web service where ever they want?

+1  A: 

csproj isn't the place for this; an app.config or a settings file - fine. But not the csproj. End users should never see this. The standard web-reference tools (wsdl.exe, svcutil.exe, wse*wsdl.exe) all support configuration-based locations, for example (from wsdl.exe):

/appsettingurlkey:

The configuration key to use in the code generation to read the default value for the Url property. The default is to not read from the config file. Short form is '/urlkey:'.

If you mean other developers... it can get messy - especially if the devs have separate client/server setups. One trick I've used successfully is to standardise on the IIS mapping, and for all the developers add a "hosts" entry (perhaps "localserver") to their own server (commonly a VM).

Marc Gravell
How do I avoid putting the stuff in the csproj? VS put it in there by default
zachary