简体   繁体   English

Azure WCF服务:csdef文件与app.config

[英]Azure WCF Service: csdef file vs app.config

I just created a new Azure WCF Service project in Visual Studio. 我刚刚在Visual Studio中创建了一个新的Azure WCF服务项目。 Visual Studio added both: a csedf config file and a app.config file. Visual Studio两者都添加了:csedf配置文件和app.config文件。

Why there are two files? 为什么有两个文件? Which file should I use to configure the wcf endpoints? 我应该使用哪个文件来配置wcf端点? In the default project the 'behaviors' are stored in the app.config and the endpoint settings in the csedf file. 在默认项目中,“行为”存储在app.config中,端点设置存储在csedf文件中。 Why not both in one file? 为什么不同时在一个文件中? Where is the difference? 区别在哪里? What should I configure in which file? 我应该在哪个文件中配置什么?

Csdef is the layout of your cscfg file. Csdef是cscfg文件的布局。 Everything defined in csdef should have its corresponding value in cscfg. csdef中定义的所有内容都应在cscfg中具有其对应的值。 Its like a breakdown of app.config into two. 就像将app.config分解为两个一样。 One is definition and other is configuration. 一个是定义,另一个是配置。 The benifit of this approach is that if your cscfg donot contain the value of tag defined in csdef, it will throw an error on build. 这种方法的好处是,如果您的cscfg不包含csdef中定义的标记的值,它将在构建时引发错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM