简体   繁体   English

.NET单击“一次部署” App.config

[英].NET Click Once Deployment App.config

I am using VS2008 SP1 ClickOnce Deployment to deploy an application. 我正在使用VS2008 SP1 ClickOnce部署来部署应用程序。 The application references a web service which stores connection details in the app.config file. 该应用程序引用一个Web服务,该服务将连接详细信息存储在app.config文件中。 For example, the following is stored: 例如,存储以下内容:

<client>
 <endpoint address="http://someservice.com/someservice" binding="customBinding" bindingConfiguration="ServiceSoapBinding" contract="AService.AService" name="AServicePort"  behaviorConfiguration="endPointBehavior"/>
</client>

I need to be able to verify the value of this end point address on the deployed application. 我需要能够在已部署的应用程序上验证此端点地址的值。 I have full access each of the deployed files on the server but I don't see a reference to any of the app.config entries. 我具有服务器上每个已部署文件的完全访问权限,但没有看到对任何app.config条目的引用。

Where are app.config settings stored in the published data and how can I access them? app.config设置存储在发布的数据中的什么位置,我如何访问它们?

Kind Regards, 亲切的问候,
F. F。

Application settings consumes two files: app.exe.config and user.config, where app is the name of your Windows Forms application. 应用程序设置消耗两个文件:app.exe.config和user.config,其中app是Windows Forms应用程序的名称。 user.config is created on the client the first time your application stores user-scoped settings. user.config是在您的应用程序第一次存储用户范围的设置时在客户端上创建的。 app.exe.config, by contrast, will exist prior to deployment if you define default values for settings. 相反,如果您定义设置的默认值,则app.exe.config将在部署之前存在。 Visual Studio will include this file automatically when you use its Publish command. 使用Studio的“发布”命令时,Visual Studio会自动包括该文件。 If you create your ClickOnce application using Mage.exe or MageUI.exe, you must make sure this file is included with your application's other files when you populate your application manifest. 如果使用Mage.exe或MageUI.exe创建ClickOnce应用程序,则在填充应用程序清单时,必须确保此文件包含在应用程序的其他文件中。

Source 资源

It's name is app.exe.config.deploy and its located in the top folder where you deploy under the Application Files folder under the version folder. 它的名称是app.exe.config.deploy ,它位于您在版本文件夹下的“应用程序文件”文件夹下部署的顶部文件夹中。

For example if your app is deployed to " C:\\App " then it will be located on " C:\\App\\Application Files\\DirectoryPerVersion\\ProjectName.exe.config.deploy " 例如,如果您的应用程序部署到“ C:\\App ”,则它将位于“ C:\\App\\Application Files\\DirectoryPerVersion\\ProjectName.exe.config.deploy ”上

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

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