c# - Class file doesn't compile outside of App_Code folder -


i using visual web developer express 2010 edition. have chosen "new website" (and not new project) build website. project targeted .net 2.0

i have class file created under app_code folder. instantiated object of class in default.aspx.cs

myclass m = new myclass(); 

this compiles fine. however, moment deploy on remote iis server, gives compilation error when invoke remote website browser.

error cs0246: type or namespace name 'myclass' not found (are missing using directive or assembly reference?)

so found question here - the type or namespace name 'lad' not found (are missing using directive or assembly reference?)

it says shouldn't put class file app_code directory. asks put in diff place , set build action (in properties) compile. couldn't find build action in properties in "ms visual web developer 2010" - had skip step.

so deleted app_code , recreated in root folder. default.aspx.cs doesn't compile @ - gives

now project doesn't build @ - same error on build phase itself.

error 3 type or namespace name 'myclass' not found (are missing using directive or assembly reference?)

i have strong feeling myclass.cs doesn't built @ all. do? how tell ide build it?

follow step:

1) right click on class file in app_code folder. 2) click on properties. 3) change build action compile 4) build app. 

check works.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -