App.Config Transformation for projects which are not Web Projects in Visual Studio?

后端 未结 14 2540
走了就别回头了
走了就别回头了 2020-11-22 04:06

For Visual Studio 2010 Web based application we have Config Transformation features by which we can maintain multiple configuration files for different environments. But the

14条回答
  •  长发绾君心
    2020-11-22 04:13

    proposed solution will not work when a class library with config file is referenced from another project (in my case it was Azure worker project library). It will not copy correct transformed file from obj folder into bin\##configuration-name## folder. To make it work with minimal changes, you need to change AfterCompile target to BeforeCompile:

    
    

提交回复
热议问题