命名空间'< global namespace>'出错已经包含'WindowsApplication'的定义 [英] Error on The namespace '<global namespace>' already contains a definition for 'WindowsApplication'

查看:449
本文介绍了命名空间'< global namespace>'出错已经包含'WindowsApplication'的定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

命名空间'< global namespace =>'已经包含'WindowsApplication'的定义

Error on The namespace '<global namespace="">' already contains a definition for 'WindowsApplication'

推荐答案

如果这是设计器生成的代码,如果是这样的话会有多个文件,那么



你可能会尝试两件事:

1。如果它是一个自动生成的文件(因为'Resources.Designer.cs'倾向于),请尝试删除它并通过VS重新生成它。



2.单独使用或者与上述要点一起,在解决方案资源管理器中选择显示所有文件或在Windows资源管理器中打开解决方案文件夹 - 可能是某个版本的文件以某种方式从项目中排除,因此对VS隐身。这可能会引起一些混乱,它可能会解决您的问题
If this is a designer generated code, there will be multiple files with partial classes, if that is the case then

there are two things you might try:
1.If it's an auto-generated file (as 'Resources.Designer.cs' tend to be), try deleting it and regenerating it through VS.

2.Either separately or along with the aforementioned point, select Show All Files in the Solution Explorer or open the solution folder in Windows Explorer - it could be that a version of the file somehow got excluded from the project and is therefor 'invisible' to VS. This can cause some confusion and it might solve your problem


这篇关于命名空间'&lt; global namespace&gt;'出错已经包含'WindowsApplication'的定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆