[Mono-list] The type or namespace name `WebClient' could not be found.

Chris F chris at futuredead.com
Tue Aug 26 18:18:17 EDT 2008


I'm trying to compile a C# app on Ubuntu with Mono 1.9.1
Mono was compiled with only --prefix.

The code is:

using System;
using System.Web;
using System.IO;
using System.Xml;
.
.
.

WebClient imgClient = new WebClient();


Now when I compile:
Target CoreCompile:
                Tool /opt/mono-1.9.1/bin/gmcs execution started with
arguments: /noconfig /debug:full /debug+ /optimize-
/out:bin/Debug/ECommerceBridge.Plugins.dll PluginBase.cs
Properties/AssemblyInfo.cs UserFilesManager.cs CredentialsManager.cs
CartManager.cs /target:library /unsafe- /define:DEBUG;TRACE
/reference:/opt/mono-1.9.1/lib/mono/gac/log4net/1.2.9.0__b32731d11ce58905/log4net.dll
/reference:/d0/ecommercebridge/Bin/ECommerceBridge.API.dll
/reference:/d0/ecommercebridge/Bin/Modules.Model.dll
/reference:/d0/ecommercebridge/Bin/MySql.Data.dll
/reference:/opt/mono-1.9.1/lib/mono/gac/System/2.1.0.0__b77a5c561934e089/System.dll
/reference:/opt/mono-1.9.1/lib/mono/gac/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
/reference:/opt/mono-1.9.1/lib/mono/gac/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
/reference:/opt/mono-1.9.1/lib/mono/gac/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
/reference:/opt/mono-1.9.1/lib/mono/gac/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
/warn:4
UserFilesManager.cs(51,9):   error CS0246:  The type or namespace name
`WebClient' could not be found. Are you missing a using directive or an
assembly reference?
UserFilesManager.cs(90,17):   error CS0246:  The type or namespace name
`WebClient' could not be found. Are you missing a using directive or an
assembly reference?

>From what I gather System.Net is included in System.
Also I've tried adding: using System.net
that doesn't work
Tried prepending WebClient with System.Net
that doesn't work
I've added it as a direct reference in an ItemGroup in the csproj file..
    <Reference Include="System.Net" />

It doesn't like that at all.

How can I get this to compile?
I'm at my wits end.

Thanks

Chris

-- 
View this message in context: http://www.nabble.com/The-type-or-namespace-name-%60WebClient%27-could-not-be-found.-tp19171520p19171520.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list