简体   繁体   English

.NET app.config 文件 — 这需要与我的应用程序一起分发吗?

[英].NET app.config file — does this need to be distributed with my app?

I'm ready to release my first .net app, but I'm trying to determine if the {myAppName}.exe.config file that is created at build time needs to be distributed with my app?我已准备好发布我的第一个 .net 应用程序,但我正在尝试确定在构建时创建的{myAppName}.exe.config文件是否需要与我的应用程序一起分发? Or will this be created if it doesn't exist?或者如果它不存在,它会被创建吗?

Thanks.谢谢。

What is in it?里边啥啊? You will probably want to open it up and look and see what in there-- various design time components will modify it, often without you knowing.您可能想要打开它并查看其中的内容——各种设计时组件会修改它,通常您不知道。 As soon as you have 1 dependency on the config file, you need to include it, and it is possible that the dependency originates from a framework or 3rd party assembly.只要您对配置文件有 1 个依赖项,就需要包含它,并且依赖项可能源自框架或第 3 方程序集。

The simple answer is yes, include it.简单的答案是肯定的,包括它。 You don't want to take the chance that you don't need it.你不想冒险你不需要它。 There are a number of things you might need it for.您可能需要它来做很多事情。 If you don't have it, your application will have issues.如果你没有它,你的应用程序就会有问题。 If you don't need it, it won't hurt anything to have it there.如果您不需要它,那么将它放在那里不会有任何伤害。

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

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