SCM

Forum: help

Monitor Forum | Start New Thread Start New Thread
RE: npgsql binary install [ reply ]
By: Josh Cooley on 2011-09-04 22:00
[forum:1015001]
If your config file lists 2.0.11.91 and the gac has 2.0.11.0 then that's your problem.

RE: npgsql binary install [ reply ]
By: David Rooke on 2011-09-04 21:47
[forum:1014999]
Sorry for not getting back sooner but I've been without internet access for a week and tearing my hair out as a result...

Yes, the path you list there is correct. gacutil shows this:

C:\Users\David\Documents\Visual Studio 2008>gacutil /l npgsql
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.

The Global Assembly Cache contains the following assemblies:
npgsql, Version=2.0.11.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, pr
ocessorArchitecture=MSIL

Number of items = 1

Regards,
Dave

RE: npgsql binary install [ reply ]
By: Josh Cooley on 2011-08-24 21:44
[forum:1014962]
Do you mean C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config? Is the 2.0.11.91 version in the .NET 4.0 gac?

RE: npgsql binary install [ reply ]
By: David Rooke on 2011-08-21 23:56
[forum:1014949]
I editted:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\machine.config

and:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\machine.config


Regards,
David

RE: npgsql binary install [ reply ]
By: Josh Cooley on 2011-08-21 23:39
[forum:1014948]
There are several machine.config files with the various framework versions. Which framework machine. Config did you edit.

RE: npgsql binary install [ reply ]
By: Francisco Figueiredo jr. on 2011-08-21 23:34
[forum:1014947]

Hmmmm, I think I got it:

Unless there is a typo somewhere, when you list the Npgsql you have in GAC you got:

Version=2.0.11.0

But in your machine.config you are saying you put:

Version=2.0.11.91

Maybe that's why it isn't working....

RE: npgsql binary install [ reply ]
By: David Rooke on 2011-08-21 23:31
[forum:1014946]
Hi,
Yes I did, in the DbProviderFactories section. I also added it to the 64 bit framework config too:

<add name="Npgsql Data Provider" invariant="Npgsql" support="FF" description=".Net Framework Data Provider for Postgresql Server" type="Npgsql.NpgsqlFactory, Npgsql, Version=2.0.11.91, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" />


Regards,
David

RE: npgsql binary install [ reply ]
By: Francisco Figueiredo jr. on 2011-08-21 22:47
[forum:1014945]

Hmmmm, did you add Npgsql to the machine.config registered data providers?

RE: npgsql binary install [ reply ]
By: David Rooke on 2011-08-21 22:41
[forum:1014944]
Hi,
Thanks for the clarification. I'm running edmgen as follows and getting an error:

C:\Windows\Microsoft.NET\Framework64
\v4.0.30319\edmgen /mode:FullGeneration /provider:Npgsql /connectionstring:"Serv
er=<ap_address>;Port=5432;UserId=<login>;Password=<pass>;Database=<instance>;" /
project:PG_SQL1
Microsoft (R) EdmGen version 4.0.0.0
Copyright (C) 2008 Microsoft Corporation. All rights reserved.

error 7001: Failed to find or load the registered .Net Framework Data Provider.

Generation Complete -- 1 errors, 0 warnings

When I query the GAC npgsql.dll is listed:

Setting environment for using Microsoft Visual Studio 2010 x86 tools.

C:\Windows\system32>cd \users\David\Documents

C:\Users\David\Documents>cd Projects
The system cannot find the path specified.

C:\Users\David\Documents>cd "Visual Studio 2008"

C:\Users\David\Documents\Visual Studio 2008>dir
Volume in drive C is OS
Volume Serial Number is B845-7168

Directory of C:\Users\David\Documents\Visual Studio 2008

23/04/2011 23:05 <DIR> .
23/04/2011 23:05 <DIR> ..
23/04/2011 23:05 <DIR> Templates
0 File(s) 0 bytes
3 Dir(s) 522,835,980,288 bytes free

C:\Users\David\Documents\Visual Studio 2008>cd Projects
The system cannot find the path specified.

C:\Users\David\Documents\Visual Studio 2008>
C:\Users\David\Documents\Visual Studio 2008>pwd
'pwd' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\David\Documents\Visual Studio 2008>cwd
'cwd' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\David\Documents\Visual Studio 2008>dir
Volume in drive C is OS
Volume Serial Number is B845-7168

Directory of C:\Users\David\Documents\Visual Studio 2008

23/04/2011 23:05 <DIR> .
23/04/2011 23:05 <DIR> ..
23/04/2011 23:05 <DIR> Templates
0 File(s) 0 bytes
3 Dir(s) 522,835,120,128 bytes free

C:\Users\David\Documents\Visual Studio 2008>dir
Volume in drive C is OS
Volume Serial Number is B845-7168

Directory of C:\Users\David\Documents\Visual Studio 2008

23/04/2011 23:05 <DIR> .
23/04/2011 23:05 <DIR> ..
23/04/2011 23:05 <DIR> Templates
0 File(s) 0 bytes
3 Dir(s) 522,835,087,360 bytes free

C:\Users\David\Documents\Visual Studio 2008>C:\Windows\Microsoft.NET\Framework\v
3.5\edmgen /mode:FullGeneration
Microsoft (R) EdmGen version 3.5.0.0
Copyright (C) 2008 Microsoft Corporation. All rights reserved.

error 7004: The argument 'connectionstring' is missing. The mode 'FullGeneratio
n' requires the argument 'connectionstring'.

C:\Users\David\Documents\Visual Studio 2008>/provider:Npgsql /connectionstring:"
Server=myServerIp;Port=5432;
The filename, directory name, or volume label syntax is incorrect.

C:\Users\David\Documents\Visual Studio 2008>UserId=myUsername;Password=myPasswor
d;Database=MyDbName;"
'UserId' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\David\Documents\Visual Studio 2008>UserId=holdem;Password=holdem;Databa
se=HEM_2011;"
'UserId' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\David\Documents\Visual Studio 2008>C:\Windows\Microsoft.NET\Framework\v
4.0\edmgen /mode:FullGeneration /provider:Npgsql /connectionstring:"Server=169.2
54.100.253;Port=5432;UserId=holdem;Password=holdem;Database=HEM_2011;" /project:
Holdem_Database
The system cannot find the path specified.

C:\Users\David\Documents\Visual Studio 2008>C:\Windows\Microsoft.NET\Framework64
\v4.0.30319\edmgen /mode:FullGeneration /provider:Npgsql /connectionstring:"Serv
er=169.254.100.253;Port=5432;UserId=holdem;Password=holdem;Database=HEM_2011;" /
project:Holdem_Database
Microsoft (R) EdmGen version 4.0.0.0
Copyright (C) 2008 Microsoft Corporation. All rights reserved.

error 7001: Failed to find or load the registered .Net Framework Data Provider.

Generation Complete -- 1 errors, 0 warnings

C:\Users\David\Documents\Visual Studio 2008>
C:\Users\David\Documents\Visual Studio 2008>
C:\Users\David\Documents\Visual Studio 2008>gacutil /l npgsql
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.

The Global Assembly Cache contains the following assemblies:
npgsql, Version=2.0.11.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, pr
ocessorArchitecture=MSIL

Number of items = 1

C:\Users\David\Documents\Visual Studio 2008>C:\Windows\Microsoft.NET\Framework64
\v4.0.30319\edmgen /mode:FullGeneration /provider:Npgsql /connectionstring:"Serv
er=169.254.100.253;Port=5432;UserId=holdem;Password=holdem;Database=HEM_2011;" /
project:Holdem_Database
Microsoft (R) EdmGen version 4.0.0.0
Copyright (C) 2008 Microsoft Corporation. All rights reserved.

error 7001: Failed to find or load the registered .Net Framework Data Provider.

Generation Complete -- 1 errors, 0 warnings

So it seems that while the dll is in the cache (Mono.Security is there too) edmgen can't see it. Am I encountering some kind of versioning issue here?


Regards,
David

RE: npgsql binary install [ reply ]
By: Josh Cooley on 2011-08-21 21:35
[forum:1014943]
We don't have designer support for the entity framework yet. You can use edmgen to build your model. Once we've released standard ado.net designer support (in cvs now) we should be able to work on getting the ef designer working.

npgsql binary install [ reply ]
By: David Rooke on 2011-08-21 21:24
[forum:1014942]
Hi,
I'm trying to install the npgsql 2.0.11 binaries for .Net 4.0 and am hitting issues in VS2010. Hopefully, someone can put me on the right track.

- I have added tnpgsql.dll and Mono.Security.dll to the GAC
- I have editted the machine.conf files so that Visual studio will know about the new provider

However, when I try to set up the provider by adding an Entity Data Model to my project npgsql is not listed as one of the available providers when in the new connection configuration dialogue.

Clearly, I'm missing a step here and will appreciate someone clarifying things for me.


Regards,
David

Powered By FusionForge