简体   繁体   中英

C# Settings error with visual studio

When I try to build application I get 3 errors dealing with the settings. I've done the settings the same as I always do, but this time I'm getting errors and don't know why.

Here's the settings file code:

<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="SAM.Properties" GeneratedClassName="Settings">
  <Profiles />
  <Settings>
    <Setting Name="AllowGlass" Type="DevExpress.Utils.DefaultBoolean" Scope="User">
      <Value Profile="(Default)">True</Value>
    </Setting>
    <Setting Name="ApplicationSkinName" Roaming="true" Type="System.String" Scope="Application">
      <Value Profile="(Default)" />
    </Setting>
  </Settings>
</SettingsFile>

And here is the errors I get:

Error   1   Too many characters in character literal    1   15  SAM
Error   2   Too many characters in character literal    1   30  SAM
Error   3   A namespace cannot directly contain members such as fields or methods   1   1   SAM

Again I have absolutely no idea why I'm getting these errors. So any help no matter how small will be greatly appreciated by me.

Is build action of file is set to Compile ? If yes, try again after setting it to None .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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