c# - How to ignore only one line in svn? -


i have line of code in config file:

<appsettings>     <add key="microsoft.servicebus.connectionstring" value="endpoint=sb://{computername}/servicebusdefaultnamespace;stsendpoint=https://{computername}:9355/servicebusdefaultnamespace;runtimeport=9354;managementport=9355" />   </appsettings> 

and can see {computername} there. name depends on current computer name. , if using source control tool, problem cause in other computer project doesn't run connectionstring.

how can avoid problem?

i cann't ignore file in svn cause change in future , can lose changes.

maybe problem can solved on svn layer or in visual studio.

you use localhost instead of computer name, or have placeholder , replace @ runtime.

or put key separate config file not go source control:

<!-- in regular app.config/web.config --> <appsettings file="user.config">   <!-- can have normal stuff here --> </appsettings>  <!-- in file called user.config --> <appsettings>   <add key="whatever" value="joesmachine" /> </appsettings> 

user.config not in source control @ all, have live on each person's machine. that's step when set new developer, might work you. (if it's windows app, not web app, make sure set copy output directory copy on user.config in project, makes way bin directory.)


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -