fsprojects / fsprojects/FSharp.Data.SqlClient

Must System.Configuration.ConfigurationManager be manually installed?

Open
#358 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
F#
Stars
206
Forks
66
PR merge metrics
No merged PRs in 30d

Description

In a netstandard2.0 project I have this:

new SqlCommandProvider<const(SqlFile<"myfile.sql">.Text), "name=MyConnStr">()

When I run the app (ASP.NET Core targeting net472) and make a DB query, I get an exception saying "Could not load file or assembly 'System.Configuration.ConfigurationManager`.

The problem goes away if I manually install the System.Configuration.ConfigurationManager NuGet package, or if I use a complete connection string instead of name=MyConnStr.

Is manual installation of System.Configuration.ConfigurationManager required, or is this an issue with SqlClient? Perhaps it's related to https://github.com/fsprojects/FSharp.Data.SqlClient/issues/349#issuecomment-536443977?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SqlCommandProvider connection-name path used by name=MyConnStr, and compare it with the complete connection-string path. Review the related issue comment and the package dependency behavior for an ASP.NET Core app targeting net472. Done means establishing whether System.Configuration.ConfigurationManager must be installed manually and documenting or correcting the dependency behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp, sql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.