473,403 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

No Namespace Specified - Where Do the Types Live?

I just converted an ASP.NET Web Site to be an ASP.NET Web Application
project type in Visual Studio 2005. After the conversion, the whole thing
still works - it builds and the Web app runs just fine. However, none of the
classes are placed explicitly in any namespace. The ASP.NET Web Site project
type apparentlyl infers namespace from the site's directory structure. But
Visual Studio's conversion process ("Convert to Web Application") does not
explicitly add any namespaces to any of the classes.

So, where do the classes live after the conversion? Is there some "default"
or "global" namespace into which the classes are placed? Just curious... I'm
not trying to solve any specific runtime problem here.

Thanks.
Nov 17 '08 #1
3 5445
re:
!So, where do the classes live after the conversion?

In the VS 2005 or 2008 IDEs, right-click your Project's name in the Solution Explorer,
select "Properties", then click on the Application menu on the left.

In 2008, you'll see a textbox for the "default namespace";
in 2005, the textbox is named "root namespace".

Set them to whatever you'd like the default/root namespace to be.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Johnson" <A@B.comwrote in message news:up**************@TK2MSFTNGP03.phx.gbl...
>I just converted an ASP.NET Web Site to be an ASP.NET Web Application project type in Visual Studio 2005. After the
conversion, the whole thing still works - it builds and the Web app runs just fine. However, none of the classes are
placed explicitly in any namespace. The ASP.NET Web Site project type apparentlyl infers namespace from the site's
directory structure. But Visual Studio's conversion process ("Convert to Web Application") does not explicitly add any
namespaces to any of the classes.

So, where do the classes live after the conversion? Is there some "default" or "global" namespace into which the
classes are placed? Just curious... I'm not trying to solve any specific runtime problem here.

Thanks.

Nov 17 '08 #2
On Nov 17, 10:50*am, "Johnson" <A...@B.comwrote:
I just converted an ASP.NET Web Site to be an ASP.NET Web Application
project type in Visual Studio 2005. After the conversion, the whole thing
still works - it builds and the Web app runs just fine. However, none of the
classes are placed explicitly in any namespace. The ASP.NET Web Site project
type apparentlyl infers namespace from the site's directory structure. But
Visual Studio's conversion process ("Convert to Web Application") does not
explicitly add any namespaces to any of the classes.

So, where do the classes live after the conversion? Is there some "default"
or "global" namespace into which the classes are placed? Just curious... I'm
not trying to solve any specific runtime problem here.

Thanks.
Hi,

They will live inside teh namespace defined by your project.
Do this test, add a new webform and see where it place it, most
probably you will see the class beind declared inside the namespace as
you expected
Nov 17 '08 #3
On Nov 17, 11:24*am, "Juan T. Llibre" <nomailrepl...@nowhere.com>
wrote:
re:
!So, where do the classes live after the conversion?

In the VS 2005 or 2008 IDEs, right-click your Project's name in the Solution Explorer,
select "Properties", then click on the Application menu on the left.

In 2008, you'll see a textbox for the "default namespace";
in 2005, the textbox is named "root namespace".

Set them to whatever you'd like the default/root namespace to be.

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en español :http://asp.net.do/foros/
======================================
Hi Juan,

Nice seeing you around, been a while since we last talked to each
other.
Hope everything is ok with you.
cheers,
Ignacio.
Nov 17 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Kunle Odutola | last post by:
I have a database that tracks players for children's sports clubs. I have included representative DDL for this database at the end of this post. A single instance of this database supports...
2
by: Edward Yang | last post by:
My XML document has a default namespace specified by xmlns="some_url". Here it is: <?xml version="1.0" encoding="utf-8" ?> <ssmproject name="sample" server="sql"...
2
by: Michal Januszczyk | last post by:
I have a very simple XML document. <SmtpGatewayRules xmlns="http://www.foo.com/schema.xsd"> <rules> <rule> </rule> </rules> </SmtpGatewayRules> When no xmlns is specified I can find rule...
2
by: Corne Rabe | last post by:
Hi all I've got a webservices that will be called by a delphi product. They have defined a soap message that they will use to call my webservice. A header snippet is found below: <soap:Header>...
12
by: Keith Patrick | last post by:
Can someone tell me the difference in terms of actual implications using: namespace MyNamespace { using System; class MyClass {...} } vs. using System;
6
by: Grant Robertson | last post by:
I am relatively new to XML, though I have taught myself a lot in the past month. I keep seeing namespace names with multiple colons in them such as: "urn:oasis:names:tc:entity:xmlns:xml:catalog"...
4
by: Andrew | last post by:
I am having an interesting namespace conflict. When we use a third party lib we create a company assembly for any descending classes to go in. I have simplified the problem into the example...
8
by: tshad | last post by:
Using VS 2008, I have a project that uses the dll from another project. The Namespace is MyFunctions, with a class of DbObject. The beginning of the code is: ***************************...
3
by: Johnson | last post by:
I just converted an ASP.NET Web Site to be an ASP.NET Web Application project type in Visual Studio 2005. After the conversion, the whole thing still works - it builds and the Web app runs just...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.