Skip to content

KeyNotFoundException when setting ApplicationName on NpgsqlConnectionStringBuilder #165

Closed

Description

@pmuessig

From the Nuget Package 'Npgsql 2.1.0-beta1'

Repro steps:

NpgsqlConnectionStringBuilder builder = new NpgsqlConnectionStringBuilder();
builder.ApplicationName = "test";

Throws exception with: The given key was not present in the dictionary.

stack trace:
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Npgsql.NpgsqlConnectionStringBuilder.SetValue(String keyword, Keywords key, Object value)
at Npgsql.NpgsqlConnectionStringBuilder.set_ApplicationName(String value)

looking at the static NpgsqlConnectionStringBuilder() it seems that the Keywords.ApplicationName enum value is omitted from being added to valueDescriptions.

Activity

  1. added a commit that references this issue on Feb 17, 2014
  2. franciscojunior commented on Feb 22, 2014

    @franciscojunior
    Member

    Hi @pmuessig !

    This is now fixed in master. Please give it a try and let me know if you still have this issue.

  3. added a commit that references this issue on Mar 25, 2014
  4. kYann commented on Mar 27, 2014

    @kYann
    Contributor

    Hi @franciscojunior ,

    Fix is not pushed on nuget package, could you please make an update ?

    Thanks,

  5. franciscojunior commented on Mar 27, 2014

    @franciscojunior
    Member

    Hi, Yann!

    I'm on it! I think I'll also have to add add a fix or revert a file version
    because of #193
    I hope to get it out tonight.

    Thanks for your comprehension.
    Em 27/03/2014 13:41, "Yann" [email protected] escreveu:

    Hi @franciscojunior https://github.com/franciscojunior ,

    Fix is not pushed on nuget package, could you please make an update ?

    Thanks,

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/165#issuecomment-38828639
    .

  6. kYann commented on Mar 28, 2014

    @kYann
    Contributor

    Thanks for the package update !

  7. franciscojunior commented on Mar 28, 2014

    @franciscojunior
    Member

    You are welcome! I'm glad to know it's working for you now.

  8. andrew-james-heard commented on Jun 17, 2014

    @andrew-james-heard

    I still get this exception. I built the source from https://github.com/npgsql/Npgsql/archive/v2.1.1.zip & am using the VS2010 solution. As described new NpgsqlConnection("ApplicationName=anything") throws the exception still.

  9. franciscojunior commented on Jun 17, 2014

    @franciscojunior
    Member

    This fix was applied in the Npgsql 2.1.2 version. Please, get the latest version 2.1.3 and give it a try.

  10. andrew-james-heard commented on Jun 17, 2014

    @andrew-james-heard

    Hi Francisco,

    Thanks for the reply. The (latest) ZIPped source from the web site
    yesterday was version 2.1.1.

    cheers
    Andrew

    On 17 June 2014 22:45, Francisco Figueiredo Jr. [email protected]
    wrote:

    This fix was applied in the Npgsql 2.1.2 version. Please, get the latest
    version 2.1.3 and give it a try.

    —
    Reply to this email directly or view it on GitHub
    #165 (comment).

  11. franciscojunior commented on Jun 18, 2014

    @franciscojunior
    Member

    You are welcome!

    Thanks for the heads up! I'll fix it in the website.

  12. added theissue type on Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions