简体   繁体   English

Visual Studio的C#设置错误

[英]C# Settings error with visual studio

When I try to build application I get 3 errors dealing with the settings. 当我尝试构建应用程序时,遇到3个处理设置错误。 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 ? 文件的构建动作是否设置为Compile If yes, try again after setting it to None . 如果是,将其设置为None后再试一次。

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

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