[Mono-list] Choosing library to compile against

Francisco Figueiredo Jr. francisco at npgsql.org
Thu Feb 21 20:30:57 UTC 2013


This is really weird :(

What got my attention was the error message saying the Npgsql.NpgsqlCommand
is defined multiple times. It seems that the references to Npgsql from
TestLib and TestReference projects are not being recognized as the same
source.

I'm out of suggestions now. If I come up with any one, I'll let you know.





On Thu, Feb 21, 2013 at 4:40 PM, Peter Hultqvist <phq at silentorbit.com>wrote:

>  On 2013-02-21 20:00, Francisco Figueiredo Jr. wrote:
>
>
> The projects I worked with only had a direct dependency to Npgsql2. I
> never played with a project which had an indirect dependency.
>
>  Are you able to change the TestLib project properties when it is open
> inside TestReferences?
>
>
>  Did you try add a reference to a fixed path to Npgsql2 assembly to both
> TestLib and TestReferences projects instead of pointing them to the Npgsql2
> project? Or maybe just change TestLib reference to a fixed path to Npgsql2
> assembly?
>
>
> I tried a few things without success/same result:
>
> - Change the project reference to a file reference.
> - Changed both references in TestReferences so that they point to the
> Npgsql.dll and TestLib.dll from the output directory of TestLib
> - Change the version of Npgsql from 2 to 22 which I though would note be
> mixed up with the gac
>
> I'm not sure about direct/indirect dependencies, as I'm only using the
> Monodevelop GUI where I can choose package(gac?), project(loaded in
> solution) or file(link to a dll on disk). The dlls have been built with
> local copy checked. I tried checking the "Specific version" for both file
> references with no change in outcome.
>
> When I changed the assembly name of the Npgsql project to NpgsqlX the
> original error was replaced with a new one:
> Program.cs(13,37): error CS0433: The imported type `Npgsql.NpgsqlCommand'
> is defined multiple times
> Program.cs(13,69): error CS0433: The imported type
> `Npgsql.NpgsqlConnection' is defined multiple times
>
> This is weird since the only references are to the NpgsqlX, System(GAC)
> and TestLib.
>
> As stated in my first post, if I remove the distribution installed version
> of npgsql, all problems are gone.
> rm -r /usr/lib/mono/*/Npgsql*
>
>


-- 
Regards,

Francisco Figueiredo Jr.
Npgsql Lead Developer
http://www.npgsql.org
http://gplus.to/franciscojunior
http://fxjr.blogspot.com
http://twitter.com/franciscojunior
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20130221/cc43281e/attachment.html>


More information about the Mono-list mailing list