Visual Studio :: Type Or Namespace Cannot Be Found Error - How To Rectify It
Jan 28, 2011
I started an app in VS2008. I did it as a web site. I installed VS 2010 (yay) today. I wanted to start over as a web project. I made a Master Page. I made content pages. One of my content pages has a form on it. Super simple text boxes and submit.
I added a folder called App_Code and placed my class files there by doing Add New Item and pasting the code into the new class. I have person and persons. The persons collection class references person. In the same folder, the persons class finds the person class. Up one level in a page's code behind, I am gettingthe error
The type or namespace name 'person' could not be found (are you missing a using directive or an assembly reference?)
For giggle, I move person.cs up a folder. Still cannot find the person. Persons collection class still CAN find person. My code behind cannot find it.
A little reading tells me I have to set that folder as an app folder in IIS. I am running Windows 7 ersonal... I cannot find IIS. If not there, I ask myself what they heck is my app running under?
for being such a noob. Anyone know what is going on here?
Error 13 The type or namespace name 'DisplayTrackingController' could not be found (are you missing a using directive or an assembly reference?) c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files emp773b35cbe8ac7005App_Web_wzekhp-n.0.cs 190 People
Although I have deleted this file from my project. why I am getting this error? and what is this file App_Web_wzekhp-n.0.cs
i m developing an application in which i need to capture image via webcam and storing in db.
but i found Error the type or namespace name 'CaptureSource' could be found(are you missing a using directive assembly reference ) ,when i want to use it.i got this code and video from silverlight website
i try both visual studio 2010 and blend 3 still same error
I have an asp.net web site. The reason I'm using web site instead of web application is that my project uses Sitefinity CMS system which uses the web site model.
I have several web user controls (ascx and code behind). I need a reference in the code behind of one control to another. I'm using the following code:
[Code]....
SilverlightShowHeader is the name of the class (the second control) which I need to reference. I haven't set any namespaces for both controls.
When I try to build the web site it shows the following error:
The type or namespace name 'SilverlightShowHeader' could not be found (are you missing a using directive or an assembly reference?)
I am trying to run a sample code for MVP, where I face above compile time error in VS 2008.Currently I am using :Framework version 3.5 OS : Windows XP Professional SP 3
when I put a break point i get this error message:
Error 1 The type or namespace name 'X509Certificate' could not be found (are you missing a using directive or an assembly reference?) D:UsersatttDesktop fre etetrtDefault.aspx.cs 7 53 D:...attt
I'm very, very new to the asp.net world and I was running through the create the movie db tutorial that is located in the learn asp.net mvc section of this website. Everything is fine until I create my home controller and edit it like on the site. Here is the first part of the code I have that has the error in it:
privateMoviesDBEntities _db = new MoviesDBEntities();
This is all on one line in visual studio but i get an error saying that the type or namespace 'MoviesDBEntities' could not be found (are you missing a using directive or an assembly reference?). I have checked the spelling and I have the using MovieApp.Models; up above so if anyone has any insight that would be great.
I have also tried performing the manager contact sheet tutorial and get the same error in this section of the code.
Am using asp.net 2.0 (C#) for developing a web site, and am using two .cs files, one for codes to data base manipulation and other for site,user count information. And it is working good in local.But after uploading to the production server it shows a compilation error like the following.
Server Error in '/' Application.
Compilation Error Description: An error occurred during the compilation of a resource required to service this request.
review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0246: The type or namespace name 'DataManager' could not be found (are you missing a using directive or an assembly reference?
I have class library named n.project. I have a method inside that class library. I changed the name of the class and also namespace of the class. Below is the Code. I changed the name of namespace to InputValueValidator and class to valuevalidator. Now I add the class libarry dll n.project to a web project and when i try to reference n.project in my web project, I get an error saying that " the type or namespace name n could not be found"
I am not sure what am I doing wrong. I have refernce projects several times in the past. this is the first time, i am getting an error.
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace InputValueValidator { public static class ValueValidator { public static bool StringLengthBetween(string input, int min, int max) { if (input == null) { return false; } else { if (input.Length >= min && input.Length <= max) { return true; } else { return false; } } } }
I know that this sounds like a simple referencing problem from the title this is becoming a nightmare!I have a code class that uses the "iAnywhere.Data.AsaClient.dll". This Dll is referenced in the project and in the code class I have added this dll in the Using section.Everything seems fine at build with no errors at all but when I go to run the application it comes up with the following Compilation Error: Compiler Error Message: CS0246: The type or namespace name 'iAnywhere' could not be found (are you missing a using directive or an assembly reference?)The line that the Error points to this line in the class:using iAnywhere.Data.AsaClient;I have set the dll to copy local and it makes no difference, the Dll is installed on my PC so is in the GAC, I use this Dll with many other C# projects and have no problems.I have scoured Google looking for an answer and haven't found anything that points me to an answer to my problem.
CatagoriesController.cs sing System;using System.Linq;using System.Web.Mvc;using ProductSystem.Models;using ProductSystem.ViewModels; namespace ProductSystem.Controllers{ public class CatagoriesController : Controller { public ActionResult Create() { var viewModel = new CatagoriesCreateViewModel { Product_Catagories = new Product_Catagories() [code]...
"The Type or namespace name 'Manufacturers' Could not be found......
I am getting a strange error over one site vs another. I have created a chart web site that works, but now I'm moving that code into an existing website. I'm getting this error (see title) and cannot figure out why. The references are the same and I have the using directives the same (as far as I can tell). I'm stumped.
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.DataVisualization.Charting; using System.Data.SqlClient; using System.Drawing; using System.Data;
...
Charting.Title vbTitle = new Charting.Title( ddlSchool.SelectedItem.Text.ToString() + " Logins per Hour" );
I have downloaded Json.net dll from http://json.codeplex.com/releases/view/43775. I extracted asp.net 2.0 dll and copied into my application bin folder under applicationin folder in inetpubwwwroot.Then I added json refrence in inline aspx code page as<%@ Import Namespace="Newtonsoft.Json" %>Now whenever I try to run my aspx page, it gives me following errorThe type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?) at System.Web.Compilation.AssemblyBuilder.Compile()