Help! Error only shows up when I try to publish my website: The type or namespace name 'Slot' does not exist in the namespace 'ASP' (are you missing an assembly reference?)

Hey guys,

I’m getting this weird error when I try to publish my website, it reads:

 

Error    5          The type or namespace name 'Slot' does not exist in the namespace 'ASP' (are you missing an assembly reference?) X:\Visual Studio 2005\WebSites\Site1\App_UserControls\SlotsTable.ascx.cs           143

 

Line 143 of the SlotsTable.ascx.cs file is a method I created to dynamically create instances of the Slot user control. The method’s signature is as follows

 

protected ASP.Slot GenerateDivSlot(...)

 

I don’t know why this is happening because I can successfully build both the website and the solution, but I can publish. I followed this (http://msdn2.microsoft.com/en-us/library/c0az2h86(VS.80).aspx) tutorial on the MSDN website that explains how to dynamically create instances of user controls. It explains that by adding the ClassName to the Control tag of the user control will add it to the ASP namespace, so why isn’t it?

 

Here is the first line of Slot.ascx

 

<%@ Control ClassName="Slot" Language="C#" AutoEventWireup="true" CodeFile="Slot.ascx.cs" EnableViewState="false" Inherits="App_UserControls_Slot" %>

 

And here is the line in SlotsTable.ascx I use to reference the Slot user control.

 

<%@ Reference Control="~/App_UserControls/Slot.ascx" %>

 

I can view the SlotsTable user control fine when I preview them in a browser, so what gives?

0
johnnyICON
5/14/2007 4:08:52 AM
asp.net.config-deploy 12495 articles. 0 followers. Follow

3 Replies
982 Views

Similar Articles

[PageSpeed] 47

1. Are you sure the Slot class is under the namespace "ASP"?

2. Did you copy the \bin folder of your deployment to the webserver?

Thanks


Mark post(s) as "Answer" that helped you

Electronic Screw
Website||Blog||Dub@i.net
0
e_screw
5/14/2007 5:19:59 AM

I just had a similar problem, and found that allowing the deployed site to be updateable triggers this bug.  If you make everything precompiled, it should work.

0
groker
12/10/2007 11:40:49 PM

 Hi,

 Hmm I've come across this problem on my build machine.  The build machine checks out the latest code and msbuild builds the sln.  Of course, on all our local dev boxes this build is working, but not on the build server since one of the developers checked in some code that dynamically added user controls.

 The offending line is:

 

ASP.ArtistLookup _artist = (ASP.ArtistLookup)rptArtists.Items[i].FindControl("alNew");
 

 
0
Perhentian
12/17/2007 6:01:37 PM
Reply:

Similar Artilces:

The type or namespace name 'ListView' does not exist in the namespace 'System.Web.UI.WebControls' (are you missing an assembly reference?) error
I have created a ASPX form with a ListView See below: <form id="form1" runat="server"> <asp:ListView id="ProductList" runat="server" > <LayoutTemplate> <h3>Product Listing</h3> <blockquote> <asp:PlaceHolder runat="server" ID="itemPlaceholder"></asp:PlaceHolder> </blockquote> </LayoutTemplate> <ItemSeparatorTemplate> <hr /> </ItemSeparatorTemplate> <ItemTemplate> <h4><%#Eval("ProductName")%> (<%# Eval("Catego...

Compiler Error Message: CS0234: The type or namespace name 'Global' does not exist in the namespace 'UChat' (are you missing an assembly reference?)
Compiler Error Message: CS0234: The type or namespace name 'Global' does not exist in the namespace 'Chat' (are you missing an assembly reference?)  suggest the above error   i am having Global.asax file and codebehind Global.asax.cs under App_code folder..in my local system it working fine but  when i copy paste the code in server it showing the error ...  Hi, senthil_os: Compiler Error Message: CS0234: The type or namespace name 'Global' does not exist in the namespace 'Chat' (are you missing an assembly reference?) I ...

The type or namespace name 'Linq' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)
 Hi everybody,I have a Web app project that uses Linq. I am receiving the following error:The type or namespace name 'Linq' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)in the line:using System.Data.Linq;The reference points to the correct file and in other projects everything is fine. the projects builds successfully and gives this error right after that.If someone has an idea what is happening or some previous experience with such an error - please.Thank you in advance.  Bulgaria Did you install Linq on the server? Jef...

The type or namespace name 'Core' does not exist in the namespace 'YASUTech.QRDN.WebEditor' (are you missing an assembly reference?)
Hi,I am getting the following error message - "The type or namespace name 'Core' does not exist in the namespace 'YASUTech.QRDN.WebEditor' (are you missing an assembly reference?) " - when I try to build the web application I had migrated from VS2003 to VS2005.--------------------------------------- In the web application i had created using 1.1 Framework I had created a folder - "Core" - which contained 2 web pages and one class file.The following occured when I migrated by making use of the Conversion Wizard - 1. A folder "Core" was create...

CS0234: The type or namespace name 'Windows' does not exist in the class or namespace 'System' (are you missing an assembly reference?)
Anyone get this, i added system.windows.form to my references in my project and still get this... CS0234: The type or namespace name 'Windows' does not exist in the class or namespace 'System' (are you missing an assembly reference?) Line 3: using System.Collections; Line 4: using System.ComponentModel; Line 5: using System.Windows.Forms; //ERROR Line 6: using System.Data; Line 7: You're compiling from the command line, right? You have to add a reference to the System.Windows.Forms.dll to the compile line, using the /r switch. Eno...

The type or namespace name 'ScriptManager' does not exist in the namespace 'System.Web.UI' (are you missing an assembly reference?)
Hello, I am trying to add ASP.NET AJAX functionality to an existing project. Here's what I did: I have downloaded and installed the AJAX executable from here: http://ajax.asp.net/ I have done an iisreset I have opened my existing project and modified the Web.config using this guide: http://ajax.asp.net/docs/ConfiguringASPNETAJAX.aspx I opened my MasterPage and I added <asp:ScriptManager ID="ScriptManager1" runat="server" /> just below the form-tag Whenever I try to build, I get this error: Error 36 The type or namespace name 'ScriptManager' does not exist in the nam...

CS0234: The type or namespace name 'Windows' does not exist in the class or namespace 'System' (are you missing an assembly reference?) #2
I included the <%@ import Namespace="System.Windows" %> directive in the code file, but for some reason I'm getting this error. I know it's an issue of assembly referencing and I can solve this in VS.NET but I don't know how to reference it right in WebMatrix. Is it true that all I have to do is include the above aforementioned directive in my code page and I'm set to go or do I need to do some configuration work? Help... Anyone... Please......

Compiler Error: CS0234: The type or namespace name 'DataAccessHelper' does not exist in the namespace 'BCC'
Hi All,I'm new to ASP.NET and trying to create a Database application with MS Visual Web Dev 2005. In my project, I wrote a generic abstract class called DataAccessHelper.cs under App_Code folder which handles all the Database related work, so all my WebForm classes can inherit from itand consume its functions. Inside the VWD, when I press F5, it launches the browser with http://localhost:2739 and everything shows up as expected. However, when I try to access it through a regular port 80, I get the followingerror:*********************************************Compiler Error Message: CS0234: T...

Error "CS0234: The type or namespace name 'Data' does not exist in the namespace 'System'"
Dear all,the following web site ran for months without troubles http://www.fotovoltaico.sanzeno.org/StoricoRS.aspxSuddenly yesterday I started getting the error you can see switching to that site. I am really getting crazy wondering what happened, but I have no idea. Do you have any suggestion? Thank you in advancePierluigi ...

The type or namespace name 'Configuration' does not exist in the namespace 'System.Web'
Hi,  I'm trying to use the the System.Web.Configuration namespace but keep getting this error:   The type or namespace name 'Configuration' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)   Do you have any idea what could be the reason? Hi,You need to add System.Configuration DLL via "Add Reference" dialog box. Right click References and select Add Reference, then select System.Configuration under the .NET tab.Hope this helps,Vivek Social Networking Platform in ASP.NET || Join now: CodeASP.NET Community...

The type or namespace name 'SqlServer' does not exist in the namespace 'System.Data'
Hi, I have created a .net class library and i include the namespace : using System.Data.SqlServer but when i build my .net class library i get the folowing error: The type or namespace name 'SqlServer' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)    your help is highly appreciated Best regards System.Data.SqlClient not System.Data.SqlServerArticles and news on ASP/ASP.NETASPCode.net Thank you for the support I am Creating a Trigger using Managed Code in SQL Server so i create a class contains the following: using Syst...

The type or namespace name 'HttpContext' does not exist in the namespace 'System.Web'
Hi thereI've created a wee class library with which to create a dll used by my web app. A class in the library needs to use System.Web.HttpContext.Current.Server.MapPath in order to get the physical location of a file regardless of where the application currently is.When I'm coding the class, Intellisense tells me that System.Web only has three members: AspNetHostingPermissionAspNetHostingPermissionAttributeAspNetHostingPermissionLevelI ignore it and type in the rest of the 'MapPath' stuff, but when I build the library I get the error I've used as the title of this thread...

The type or namespace name 'OracleClient' does not exist in the class or namespace 'System.Data'
I am using notepad to code my ASP.NET pages. Line 3: using System.Data.OleDb; Line 4: using System.Web; Line 5: using System.Data.OracleClient; Line 6: Line 7: public class OConn .. .. .. Source File: c:\inetpub\wwwroot\Oracle8.cs Line: 5 I know if I precompile the *.dll in my *.aspx page, it will work (<%@ Page language="c#" CompilerOptions=/R:"C:\WINNT\Microsoft.NET\Framework\v2.0.40607\System.Data.OracleClient.dll" Debug="true"%>). But i do not know the equivalent solution to implement in a *.cs file. Please ...

error CS0246: The type or namespace name 'NetworkCredentials' could not be found (are you missing a using directive or an assembly reference?)(are you missing a using directive or an assembly referenc
Hello Everyone, This is my first post on ASP.NET. This is a great website and I have just discovered the forums which I am hoping will help me to resolve my problem. I have been developing in .net for about 9 months now and I am now just learning all the neat features included Visual Studio 2005. I am using the Visual Web Developer and have SP1 installed. My problem is as follows.I am creating a webform that emails the results of the input using the example found here: http://www.systemnetmail.com/faq/4.2.aspx. The code looks as follows. using System.Net.Mail; protected voi...

''''''''''''''''''''
Name: haznen Email: haznenatyahoodotcom Product: Gran Paradiso Alpha 8 Summary: '''''''''''''''''''' Comments: '''''''''''''''''''''''''''''''''''' Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061204 UGES/1.7.2.0 GranParadiso/3.0a1 From URL: http://www.mozilla.org/projects/granparadiso/ Note to readers: Hendrix gives...

Web resources about - Help! Error only shows up when I try to publish my website: The type or namespace name 'Slot' does not exist in the namespace 'ASP' (are you missing an assembly reference?) - asp.net.config-deploy

Resources last updated: 11/22/2015 4:24:16 PM