给出的app.config构建之后另一个名字? [英] Give app.config another name after build?

查看:159
本文介绍了给出的app.config构建之后另一个名字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家都知道,当你有一个app.config文件生成一个项目就被复制到bin目录下并重新命名为$(targetFileName)的.config。

As you all know, when you build a project with an app.config file it gets copied to the bin directory and renamed $(targetFileName).config.

是否有可能为它被称为别的东西吗?

Is it possible for it to be called something else?

例如,如果我的可执行文件名为myApplication.exe,我可以在配置文件中调用的settings.config,而不是myApplication.exe.config?

For example if my executable is called myApplication.exe, can I have the config file called settings.config as opposed to myApplication.exe.config?

干杯

推荐答案

由myApplication.exe名称的应用程序需要在配置文件被命名为myApplication.exe.config。如果它命名为其他名称,那么它将无法找到配置文件。

An application by the name of 'myApplication.exe' expects the configuration file to be named 'myApplication.exe.config'. If it's named anything else, then it won't find the configuration file.

所以,是的,你可以把它改成别的。但是,那么它将无法正常工作。

So yes, you can change it to anything else. But then it won't work.

这篇关于给出的app.config构建之后另一个名字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆