Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load assembly Microsoft.Data.SqlClient #834

Open
halcwb opened this issue Nov 13, 2024 · 0 comments
Open

Could not load assembly Microsoft.Data.SqlClient #834

halcwb opened this issue Nov 13, 2024 · 0 comments

Comments

@halcwb
Copy link

halcwb commented Nov 13, 2024

Describe the bug
When using code with a datacontext in an fsx file, sometimes this works. Sometimes I get the runtime error:

error FS0193: Could not load file or assembly 'C:\Users\bhr-cbollen.nuget\packages\microsoft.data
.sqlclient\5.2.2\runtimes\win\lib\net8.0\Microsoft.Data.SqlClient.dll'. The located assembly's man
ifest definition does not match the assembly reference. (0x80131040)

My current setup looks like:

#r "nuget: Microsoft.Data.SqlClient"
#r "nuget: SqlProvider"

#r "../../Informedica.Utils.Lib/bin/Debug/net9.0/Informedica.Utils.Lib.dll"
#r "../../Informedica.MetaVision.Lib/bin/Debug/net9.0/Informedica.MetaVision.Lib.dll"

#load "../../Shared/Utils.fs"
#load "../../Shared/Query.fs"
#load "../DataContext.fs"
#load "../ForeignKeys.fs"
#load "../Context.fs"
#load "../Parameter.fs"
#load "../Signals.fs"

#time

open System

fsi.AddPrinter(_.ToString("dd-MM-yyyy HH:mm"))

open Informedica.DataServices.Lib
open Informedica.MV6.Lib
open Informedica.MetaVision.Lib
open Informedica.Utils.Lib
open Informedica.Utils.Lib.BCL

open FSharp.Data.Sql.Operators

let ctx =
Context.create connstring

The error occurs at runtime.

To Reproduce
Steps to reproduce the behavior:
I wish I would know how. Probably, then I even could fix it.

Expected behavior
Be able to use SqlProvider in an script setting

Screenshots

Desktop (please complete the following information):
.NET SDK:
Version: 9.0.100
Commit: 59db016f11
Workload version: 9.0.100-manifests.3068a692
MSBuild version: 17.12.7+5b8665660

Runtime Environment:
OS Name: Windows
OS Version: 10.0.17763
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.100\

.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.

Host:
Version: 9.0.0
Architecture: x64
Commit: 9d5a6a9aa4

.NET SDKs installed:
6.0.300 [C:\Program Files\dotnet\sdk]
6.0.321 [C:\Program Files\dotnet\sdk]
6.0.427 [C:\Program Files\dotnet\sdk]
7.0.102 [C:\Program Files\dotnet\sdk]
8.0.404 [C:\Program Files\dotnet\sdk]
9.0.100 [C:\Program Files\dotnet\sdk]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant