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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:09:48+00:00 2026-05-28T03:09:48+00:00

I have a C# solution composed of three projects in Visual Sudio 2010. One

  • 0

I have a C# solution composed of three projects in Visual Sudio 2010. One is X.Domain (class library) the second, X.UnitTest and the third X.WebUI (MVC3). I was having problems with the using statement to reference the X.Domain namespace from withing the X.WebUI namespace. I thought it was a client profiling issue and verifired that all of the projects where using “.Net Framework 4” as the target framework. I checked to make sure the project dependencies for X.WebUI included the namesapce X.Domain. The exact errors I’m getting are:
The type or namespace name ‘Domain’ does not exist in the namespace’X’ (are you missing an assembly reference). The error for the interface I’m trying to use from within X.Domain.Abstract: The type or namespace name ‘IPersonRepository’ could not be found (are you missing a using directive or an assembly reference)

In the X.Domain namespace/project, there are public methods, so I’m not sure why it’s not exposed. I looked into these links here on stackoverflow, but they did not resolve the issue. Visual Studio 2010 suddenly can't see namespace?,
The type or namespace name could not be found ,
The type or namespace 'MyNamespace' does not exist etc

It’s worth mentioning that someone posted that it could have something to do with a missed configured global.asax file, here
Type or namespace name does not exist
in that link, but I’m not sure about it. Could be the case, so I am posting my Global.asax file as well. I noticed the problem when I’m trying to create my ‘PersonController’ with ninject MVC3, I used Remo.gloo’s blog to help me create the Global.asax file as posted here http://www.planetgeek.ch/2010/11/13/official-ninject-mvc-extension-gets-support-for-mvc3/ and am following along with some additional code on p.164 of the the Pro ASP.NET MVC3 Framework book to create the controller.

PersonController.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using KLTMCInsight.Domain.Abstract;


namespace KLTMCInsight.WebUI.Controllers
{
    public class PersonController : Controller
    {
        private readonly IPersonRepository repository;

        public PersonController(IPersonRepository personRepository)
        {
            repository = personRepository;
        }
    }
}

Global.asax

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using System.Reflection;
using Ninject;
using Ninject.Modules;
using Ninject.Web.Mvc;

namespace KLTMCInsight.WebUI
{

    public class MvcApplication : NinjectHttpApplication
    {
        public static void RegisterGlobalFilters(GlobalFilterCollection filters)
        {
            filters.Add(new HandleErrorAttribute());
        }

        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                    new { controller = "Home", action = "Index", id = UrlParameter.Optional    }
            );

        }

        protected override IKernel CreateKernel()
        {
            var kernel = new StandardKernel();
            kernel.Load(Assembly.GetExecutingAssembly());
            return kernel;
        }


        protected override void OnApplicationStarted()
        {
            base.OnApplicationStarted();

            AreaRegistration.RegisterAllAreas();
            RegisterGlobalFilters(GlobalFilters.Filters);
            RegisterRoutes(RouteTable.Routes);
        }
    }
}

If I missed something you need, I’ll be more than glad to post it up. Again, Thank you for your help- Very appreciated.

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

    Here is the solution:

    I had used the ‘Project Dependencies’ box listed under the ‘Project’ file menu to select the dependencies of the X.WebUI project. Even though on in it I had checked the box for the X.WebUI project to depend on the X.Domain project… the reference was never created by VS2010.

    To solve the issue it was a simple fix by manually right-clicking the References folder under X.WebUI, and adding the reference to X.Domain through that window. Reference was added problem solved.

    Not sure why the reference was not made from the ‘Project Dependencies’ box in the first place, but if anyone comes across this same problem- this should remind you to check if the reference was actually made.

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

Sidebar

Related Questions

I have a solution with several projects. One of them is a setup project.
I have a solution with many projects. One project contain few custom components. One
I have a c# solution and its composed of numerous projects. I have a
Currently I have solution A that contains a domain layer base and solution B
I have a solution consisting of five projects, each of which compile to separate
I have a solution with several projects, where the startup project has a post-build
I have a solution in Visual Studio 2005(professional Edition) which in turn has 8
I have a solution with other 70 projects into it. My question is :
I have a solution with multiple projects and we need to do some serious
I have a website solution that is composed of a Silverlight Project and an

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.