开发者

Sharing Config settings between Web App and Console App

I'd like to share my VS2010 3.5 Web Apps settings with my Console App's (2 projects in the same solution).

eg connection string, smtp, log4net settings

This looked close:开发者_Go百科

http://devlicio.us/blogs/derik_whittaker/archive/2008/04/15/how-to-share-configuration-files-between-projects.aspx


The big difference is step 1 (save your special settings in external .config files)

  1. Put your shared .config into external files (attribute on element: configSource="mySpecialConfig.config")
  2. Add the files in a common folder in your solution
  3. Add the files as linked items to each project
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜