[Mono-aspnet-list] Linq libraries missing?

Mark DevGood dirkroel at gmail.com
Tue Apr 7 09:07:06 EDT 2009


-pkg:dotnet35 - Great thats two new commands you've taught me. Many thanks!

Unfortunately while working perfectly well on my local machine on my server
it reports that it cannot find this package.

Output:
Package dotnet35 was not found in the pkg-config search path.
Perhaps you should add the directory containing `dotnet35.pc'
to the PKG_CONFIG_PATH environment variable
No package 'dotnet35' found

Luckily I'm completely aware of the difference between an assembly and a
namespace. Sorry if you misunderstood me to imply that an assembly of
'System.Linq.dll' existed when I really meant that my file was using the
'System.Linq' namespace. Anyway I think we both understand this so its
really a moot point.

I've checked my Visual Studio and yes you are right it has a reference to
System.Xml.Linq.
Its path I find most odd: c:\Program Files\Reference
Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll

Shouldn't it be in my Gac and not Program Files? Bear in mind this is added
completely automatically by Visual Studio in all its wisdom and an no point
did I tweak this reference myself.

I've gone and copied System.Xml.Linq.dll to the bin folder of my website on
my server and with the inclusion of the -r:System.Xml.Linq it no longer
complains about Linq!!! :)

So thank you very much for your help. I guess that somehow the 3.5 version
of the framework files was included in the Mono2.2 installation on my Mac
OSX local machine somehow because I didn't explicitly install it myself.

Only one other problem remains which is the big compile error I've written
about in another thread which is rather more serious and sadly no one has
responded to it.
It can be found here: http://go-mono.com/forums/#nabble-f36223

Many thanks
Mark



Atsushi Eno-3 wrote:
> 
> 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.
> 
> Atsushi Eno
> 
>> 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'
>> statements. 
>> 
>> In the top of one of my .cs files is:
>> using System;
>> using System.Linq;
>> using System.Xml.Linq;
>> <snip>
>> 
>> 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
>> exist
>> 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=3.5.0.0, Culture=neutral,
>> PublicKeyToken=b77a5c561934e089
>> 
>> So lets hope the System.Xml.Linq library includes the System.Linq
>> namespace
>> too!
>> 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
>> application?
>> 
>> 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
>>> shows.
>>>
>>> "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
>>>> script
>>>> 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
>>>>>> complaining
>>>>>> that
>>>>>> it cannot find the Linq libraries.
>>>>>>
>>>>>> My Script:
>>>>>> gmcs /t:library /out:bin/website.dll -pkg:dotnet -r:System.Linq
>>>>>> <filenames
>>>>>> to compile...>
>>>>>>
>>>>>> If I include the '-r:System.Linq' part or -r:System.Xml.Linq' it
>>>>>> seems
>>>>>> to
>>>>>> make no difference. I thought these Linq libraries should be included
>>>>>> in
>>>>>> my
>>>>>> server Mono2.2 installation by default as they seem to be there on my
>>>>>> local
>>>>>> machine which also has Mono2.2 installed. Any idea how to fix?
>>>>>>
>>>>>>
>>>>> _______________________________________________
>>>>> Mono-aspnet-list mailing list
>>>>> Mono-aspnet-list at lists.ximian.com
>>>>> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
>>>>>
>>>>>
>>> _______________________________________________
>>> Mono-aspnet-list mailing list
>>> Mono-aspnet-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
>>>
>>>
>> 
> 
> _______________________________________________
> Mono-aspnet-list mailing list
> Mono-aspnet-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
> 
> 

-- 
View this message in context: http://www.nabble.com/Linq-libraries-missing--tp22897038p22928523.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.



More information about the Mono-aspnet-list mailing list