[Mono-aspnet-list] Linq libraries missing?
atsushieno at veritas-vos-liberabit.com
Tue Apr 7 00:38:01 EDT 2009
Aren't you just confusing "assemblies" and "namespaces"? Even if yes, it
is weird that you could successfully build your application with
"reference" (which is to *assembly*, not *namespace*) to "System.Linq.dll".
Since you are likely using Visual Studio, open your project that builds
successfully (if yes) and check if it has an assembly reference to
"System.Linq.dll" and its path from the property sheet (IF exists).
Once you verified that you are at the state you cannot really build your
application with "gmcs -r:System.Linq.dll -pkg:dotnet", then use
-pkg:dotnet35 instead. That will internally add -r:System.Xml.Linq.dll,
which is required.
> Very many thanks for you help...this has been very useful so far. gacutil2 is
> a new command which I am glad you showed me.
> I just wanted to correct a little assumption first and that is at no point
> did I explicitly say that any System.Linq assembly exists. These references
> are added in the standard template used by Visual Studio as 'using'
> In the top of one of my .cs files is:
> using System;
> using System.Linq;
> using System.Xml.Linq;
> When I compile I get:
> The type or namespace name `Linq' does not exist in the namespace `System'.
> Are you missing an assembly reference?
> The type or namespace name `System.Linq' could not be found. Are you missing
> a using directive or an assembly reference?
> The type or namespace name `Linq' does not exist in the namespace
> `System.Xml'. Are you missing an assembly reference?
> The type or namespace name `Xml.Linq' could not be found. Are you missing a
> using directive or an assembly reference?
> On my local system I can confirm using 'gacutil2 -l System.Linq': No files
> On my local system I can confirm using 'gacutil2 -l System.Xml.Linq': The
> response is:
> The following assemblies are installed into the GAC:
> System.Xml.Linq, Version=126.96.36.199, Culture=neutral,
> So lets hope the System.Xml.Linq library includes the System.Linq namespace
> The problem is the server (of which I am not an administrator because its
> hosted) does not recognize the command 'gacutil2'. But I guess probably
> there is no System.Xml.Linq there. So any clues how I can add it? Or even
> better, since i don't have full control over the server, is it possible for
> me to extract it to a dll somehow and include in in the bin folder of my
> Many thanks
> Atsushi Eno-3 wrote:
>> Then you likely have System.Linq.dll on your local machine from some
>> strange ways (e.g. copied from System.Core.dll and installed to the GAC
>> by yourself, or copied from older beta .net versions).
>> Try this: gacutil2 -l System.Linq
>> and if there is one, remove it away (gacutil2 -u <full name>). Then
>> the local machine will report the same (correct) error as the server
>> "gmcs -r:System.Linq ..." should not compile any sources (unless you
>> really have such assembly).
>> Atsushi Eno
>> Mark DevGood wrote:
>>> Yes I agree with you. However bear in mind that my script works perfectly
>>> fine on my local machine, and its only on my server that using the SAME
>>> compile script it reports that it cannot location System.Linq nor
>>> System.Xml.Linq. This tells me that its not a problem with my compile
>>> but with the server. Could this be?
>>> Atsushi Eno-3 wrote:
>>>> There is no such assembly, System.Linq.dll. There is System.Core.dll
>>>> instead. You should not need to specify it though.
>>>> Atsushi Eno
>>>> Mark DevGood wrote:
>>>>> When I try to compile my asp.net website on the server it is
>>>>> it cannot find the Linq libraries.
>>>>> My Script:
>>>>> gmcs /t:library /out:bin/website.dll -pkg:dotnet -r:System.Linq
>>>>> to compile...>
>>>>> If I include the '-r:System.Linq' part or -r:System.Xml.Linq' it seems
>>>>> make no difference. I thought these Linq libraries should be included
>>>>> server Mono2.2 installation by default as they seem to be there on my
>>>>> machine which also has Mono2.2 installed. Any idea how to fix?
>>>> Mono-aspnet-list mailing list
>>>> Mono-aspnet-list at lists.ximian.com
>> Mono-aspnet-list mailing list
>> Mono-aspnet-list at lists.ximian.com
More information about the Mono-aspnet-list