Refreshing service references updates the app.config

后端 未结 2 629
情书的邮戳
情书的邮戳 2021-01-14 06:38

Every time I make changes to my WS and update the reference in Visual Studio, VS overwrites my app.config with additional unnecessary information. So when I start my client

相关标签:
2条回答
  • 2021-01-14 07:38

    Stop changing your WS!?! :P

    Seriously though, since you are updating your WS and then updating the reference it is going to update the app.config / web.config. The reason is because there is a section under applicationSettings that reference the WS.

    EX:

     <applicationSettings>
        <RemoteAssessment.CatCall.My.MySettings>
            <setting name="RemoteAssessment_CatCall_CATService01_CATService"
                serializeAs="String">
                <value>URLTOSERVICE/catservice.asmx</value>
            </setting>
        </RemoteAssessment.CatCall.My.MySettings>
    </applicationSettings>
    

    Sadly, I do not think there is a way to stop VS from updating the app.config. I could be wrong though.

    0 讨论(0)
  • 2021-01-14 07:43

    Ended up doing this programmatically which solved the problem.

    0 讨论(0)
提交回复
热议问题