Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7945385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:50:57+00:00 2026-06-04T00:50:57+00:00

I have a project named AAA.System that contains some simple base functions to be

  • 0

I have a project named AAA.System that contains some simple base functions to be shared by all of our other projects. This has been around for about 5 years or so, and we have many projects that reference it which are all working fine.

Now, I am creating a new project (WCF service) and I’m having some issues with namespace resolving. Specifically, I have these usings:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Configuration;
using System.Configuration.Install;
using System.Reflection;
using System.ServiceModel;
using System.ServiceProcess;
using System.Text;
using System.Threading;
using System.Xml;

at some point, I have this line of code:

string fqdn = System.Net.Dns.GetHostName();

which is generating the error:

The type or namespace name 'Net' does not exist in the namespace 'AAA.System' (are you missing an assembly reference?)

So it seems that somehow the visual studio (2010) is trying to resolve to AAA.System.Net.Dns.GetHostName() instead of System.Net.Dns.GetHostName(), but I don’t have any using statements indicating the use of AAA.System. What am I missing here that is indicating to the compiler to use AAA.System?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T00:50:58+00:00Added an answer on June 4, 2026 at 12:50 am

    Is the namespace of the class you are calling the following line set to AAA?

    string fqdn = System.Net.Dns.GetHostName(); 
    

    e.g.

    namespace AAA
    {
        static void M()
        {
            string fqdn = System.Net.Dns.GetHostName(); 
        }
    }
    

    To fix it you should be able to prefix the line with global::.

    string fqdn = global::System.Net.Dns.GetHostName(); 
    

    Or just add System.Net to you using directives

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project named HubHub that contains 2 apps named DrHub and AgencyHub
I have checked-out a project from SourceForge named HadoopDB . It uses some class
I have a Camtasia project named aaa.camrec and want to capture an image in
I have some database tables named Project , Employee and Branch . An employee
Assuming that we have a project named project and modules module1 and module2 ,
In Zend project named pro1 I have one module named Admin.In this module I
I have added a controller to my project named UserManager (automatically generated from the
I have the following in a project named testApp: (testAppViewController is the valid name
I have a class named project with the following data members. class Project {
I Have a DataBase in my project With Table named 'ProcessData' and columns named

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.