Visual Studio 的 C# 设置错误
当我尝试构建应用程序时,我在处理设置时遇到 3 个错误。我像往常一样完成了设置,但是这次我遇到了错误,并且不知道为什么。
这是设置文件代码:
<?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>
这是我得到的错误:
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
我再次完全不知道为什么会收到这些错误。因此,任何帮助,无论多么小,我都会非常感激。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
文件的构建操作是否设置为
Compile
?如果是,请设置为None
后重试。Is build action of file is set to
Compile
? If yes, try again after setting it toNone
.