[Mono-dev] How to compile using App_Code folder

Piotr Stulinski jamjar at gmail.com
Tue Nov 28 16:13:05 EST 2006

I am struggling to get my site working with 1.2.1 - App_Code
functionality. I have 3 simple pages.

a Class1.cs in my App_Code folder with literally one method:

public static void HelloWorld()

return "hello world";


a Default.aspx.cs

in the Load method i have

Label1.Text = Class1.HelloWorld();

and finally i have the

Default.aspx page with only

Label1 on it.

I have not changed any of the other Visual Studio 2005 settings extra,
i am not sure if i am supposed to? But when i execute it under the
above scenario i get a error:

Description: Error compiling a resource required to service this
request. Review your source file and modify it to fix this error.
Error message:
/opt/mono_home/code/Default.aspx.cs(15,23) : error CS0103: The name
`Class1' does not exist in the context of `_Default'

File name: /opt/mono_home/code/Default.aspx

Source File: /opt/mono_home/code/Default.aspx.cs

Line 1: No assembly returned after compilation!?

I am very new to compiling under mono. What i do know is that it works
100% if i dont use the Class1.cs file. So for example if i go

Lavel1.Text = "Hello World";

that does work...

Any help or a mini tutorial or something on compiling would be great
doesnt seem to be much info around.



More information about the Mono-devel-list mailing list