[Mono-aspnet-list] System.Web.Extensions

Mark Devgood dirkroel at gmail.com
Mon Apr 19 03:14:30 EDT 2010


Hello, I need some help with System.Web.Extensions.

I run the following command to compile my website:

gmcs /t:library /out:bin/Website.dll -pkg:dotnet -r:System.Configuration
-debug+ -recurse:*.cs

This all worked fine up until a week ago when I referenced the class
System.Web.Script.Serialization.JavaScriptSerializer in order to emit JSON.
It all runs fine when I compile it on VisualStudio for WinXP. 

However when I run that gmcs command to compile on my Linux server I get the
following error:

error CS0234: The type or namespace name `Script' does not exist in the
namespace `System.Web'. Are you missing an assembly reference?
error CS0246: The type or namespace name `Script.Serialization' could not be
found. Are you missing a using directive or an assembly reference?
error CS0246: The type or namespace name `ScriptService' could not be found.
Are you missing a using directive or an assembly reference?

I worked out that JavaScriptSerializer lives in System.Web.Extensions.dll.
If I try to add the -r:System.Web.Extensions to my gmcs command it
complains:
error CS0006: cannot find metadata file `System.Web.Extensions'

Looking in the GAC I can see that both version 1.6 and version 3.5 are there
on my Linux server.

I tried adding references to System.Web.Extensions to my web.config, however
I don't think this is going to help because it's a problem emitted by gmcs,
and I'm guessing web.config only comes into play when you load the
application up. I may also not have added it to web.config correctly.

Anybody know what to do?
-- 
View this message in context: http://n4.nabble.com/System-Web-Extensions-tp2015486p2015486.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.


More information about the Mono-aspnet-list mailing list