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 3681458
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:41:27+00:00 2026-05-19T03:41:27+00:00

I have two same project in which I have two classes under same namespace

  • 0

I have two same project in which I have two classes under same namespace in one project. In the second project I have added reference to that project and have specified using statement in second project to use namespace (classes under that) of first project.

The problem is it allows me to use 1 class but doesn’t allow me to use second class.

?????Why????

Here’s the code:

Project 1

using System; 
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LibraryProject
{
    public class test
    {
        public static string ErrorMessage = "";


        public test(string code)
        {
           ErrorMessage = code;

        } 


    }

    public class FirstClass
    {
        public static string ErrorMessage = "";

        public RFIDHW(string code)
        {
            ErrorMessage = code;

        }

    }
}

Second Project

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using LibraryProject;

namespace Engine
{
    /*
     * Connect engine logic with back end DB and other library
     */
    public class BackEnd
    {

        //Return tag list from the connected reader as List<Tag>
        public string GetMessage()
        {
            FirstClass fc = new FirstClass();  //OK no problem

            test tt = new test(); // Error message

        }//End of GatTagList method

    }//End of BackEnd class
}//End of namespace

Error message that I am getting is

The type or namespace name “test” could not found (are you missing a using directive or an assembly reference?).

I have added reference to second project in first project.

I have tried same mechanism in new solution just by taking that piece of code and it worked. (unfortunately I can’t move by whole project so have to fix this.)

Please help

Thanks a lot
in advance

  • 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-05-19T03:41:28+00:00Added an answer on May 19, 2026 at 3:41 am

    Try building each assembly separately, sometimes there are build errors that are not shown on a build all command because of the build order.

    You should also set the build order so the first project is always built before the second.

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

Sidebar

Related Questions

I use JPA and Hibernate for my project. I have two classes with same
Need to add two same name .csproj class libraries in my solution.Have two project
I have two SQL Server (2000) databases. Both are used for the same project,
I have two web application projects (project A and project B) in the same
I have two .ascx files in the same folder in an ASP.NET MVC project.
In Eclipse I have two projects with the same package structure. In one of
I'm developing a project where I have an entity which may have two kinds
I'm developing a project where I have an entity which may have two kinds
I have many custom classes that I am using that I will explain and
I have a Maven-based project, in which I trying to add some JAXB classes

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.