Dynamic endpoints in ServiceReferences.ClientConfig

后端 未结 5 1068
醉话见心
醉话见心 2020-12-16 13:56

When building an app, it is often deployed in different environments (test, dev, prod), and therefore the endpoint addresses are changing. As the ServiceReferences.ClientCon

5条回答
  •  再見小時候
    2020-12-16 14:30

    Great solution to the problem
    I could not get the section to work effectively in my solution.
    I removed it and added the following script to my Prebuild event in the project:

    del $(ProjectDir)ServiceReferences.ClientConfig;
    copy $(ProjectDir)ServiceReferences.$(ConfigurationName).ClientConfig $(ProjectDir)ServiceReferences.ClientConfig;
    

提交回复
热议问题