WebApp vs Somee and .cs files.

Jun 10 2015 1:14 AM

Hello everyone.

As the title said..

I have a WebApplication in Visual studio 2013 with MasterPage and one Home.aspx page. Also i have a class MyItem.cs (Build Action-->Compile) in one folder with name MyClasses.

In the Page_Load of Home.aspx.cs, i have this:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebApplication2.MyClasses;

namespace WebApplication2
{
     public partial class Home : System.Web.UI.Page
     {
         protected void Page_Load(object sender, EventArgs e)
         {
             MyItem itm = new MyItem();
             itm.x = 5;
         }
     }
}

When i run the projet local with visualStudio it runs with no problem. Everything ok.

However when i deploy the project in somee (ftp) i take this error:

Compiler Error Message: CS0234: The type or namespace name 'MyClasses' does not exist in the namespace 'WebApplication2' (are you missing an assembly reference?)

If i dont use the reference of object My item in PageLoad it will run with success...

I have 10 days without solution and i search all google and youtube without success.

Pls help me..


Answers (13)