2

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 Answer 1

1

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).

Sign up to request clarification or add additional context in comments.

1 Comment

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.