开发者

CSProj contains a reference

开发者 https://www.devze.com 2022-12-10 12:55 出处:网络
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

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 开发者_如何学Golocalhost/something

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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消