vb.net app.config -- configSections -- sectionGroup: allowExeDefinition="MachineToLocalUser"

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13751425/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-17 11:28:25  来源:igfitidea点击:

app.config -- configSections -- sectionGroup: allowExeDefinition="MachineToLocalUser"

vb.netwinformsapp-config

提问by Susan

What does this mean?

这是什么意思?

allowExeDefinition="MachineToLocalUser"


    <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=99999999999" >
        <section name="MyApp.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=99999999999" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
    </sectionGroup>

回答by Steve

allowExeDefinitioncontrols the location where the user settings are stored.
For userSettings sections the default is MachineToLocalUser and it means that the section could be stored in Machine.config, exe.config or user.config in the local user profile directory.

allowExeDefinition控制存储用户设置的位置。
对于 userSettings 部分,默认值为 MachineToLocalUser,这意味着该部分可以存储在本地用户配置文件目录中的 Machine.config、exe.config 或 user.config 中。

Other values for this property are:

此属性的其他值是:

  • MachineOnly= the ConfigurationSection can be defined only in the Machine.config file.
  • MachineToApplication= the ConfigurationSection can be defined either in the Machine.config file or in the Exe.config file in the client application directory. This is the default value.
  • MachineToLocalUser= the ConfigurationSection can be defined in the Machine.config, in the Exe.config file in the client application directory, in the User.config file in the roaming user directory, or in the User.config file in the local user directory.
  • MachineToRoamingUser= the ConfigurationSection can be defined in the Machine.config file, in the Exe.config file in the client application directory, or in the User.config file in the roaming user directory.
  • MachineOnly= ConfigurationSection 只能在 Machine.config 文件中定义。
  • MachineToApplication= ConfigurationSection 可以在 Machine.config 文件或客户端应用程序目录中的 Exe.config 文件中定义。这是默认值。
  • MachineToLocalUser= ConfigurationSection可以在Machine.config、客户端应用目录的Exe.config文件、漫游用户目录的User.config文件或本地用户目录的User.config文件中定义。
  • MachineToRoamingUser= ConfigurationSection 可以在 Machine.config 文件、客户端应用程序目录的 Exe.config 文件或漫游用户目录的 User.config 文件中定义。