“网站无法控制命名空间”是什么意思?
您如何理解“无法控制您的命名空间”命名空间问题,引用自
http://reddnet.net/code/asp-net-web-site-vs-web-application-project-part-2/
这里有更多背景:
一VSTS 2005 网站项目类型的缺点是,我的困惑是“无法控制您的命名空间”到底意味着什么?
- 无法控制您的名称空间。 当然,您可以手动将命名空间添加到几乎所有内容,但 Visual Studio 会在每一步中与您作斗争。 对于生成的代码(例如 ADO.NET DataSets 等),这变得非常难以控制。 最终你会放弃并让 VS 将所有内容放在默认命名空间中。 在大型应用程序中,这会变得非常烦人,特别是如果您喜欢结构良好的应用程序。
如果有人可以在这里展示示例,我们将不胜感激。
How do you understand "No control over your namespaces" namespace issue, quoted from,
http://reddnet.net/code/asp-net-web-site-vs-web-application-project-part-2/
Here are more background:
one of the cons of web site project type of VSTS 2005 is, my confusion is what exactly means "no control over your namespace"?
- No control over your namespaces. Sure, you can manually add namespaces to pretty much anything, but visual studio will fight you every step of the way. With generated code such as ADO.NET DataSets and such, this gets very hard to control. Eventually you will give up and just let VS put everything in the default namespace. In large applications this gets very annoying, especially if you like a well structured application.
Appreciate if anyone could show a sample here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只需测试一下:创建一个 Web 应用程序和一个网站,然后查看在 Default.aspx.cs 中创建的命名空间:
当您有一个非常大的应用程序时,不可能找到您的 命名空间。没有命名空间的类。
现在创建一个数据集:
Just test this: create a Web Application and a Web Site, then take a look to the namespaces created into the Default.aspx.cs:
When you have a very big application it's impossible to find your classes without namespaces.
Now create a DataSet:
George,网站并非特定于 VSTS。 这是一个正常的 Visual Studio 功能,自 Visual Studio 2005 以来一直困扰着我们。
另请参阅 https://stackoverflow.com/questions/237664/web-site-vs-asp-net-web-application-in-visual-studio。
George, Web Sites are not specific to VSTS. That's a normal Visual Studio feature, haunting us since Visual Studio 2005.
Also, see https://stackoverflow.com/questions/237664/web-site-vs-asp-net-web-application-in-visual-studio.