ionide-vscode-fsharp
ionide-vscode-fsharp copied to clipboard
"FSI: Send References from project" sends references assemblies instead of implementation assemblies
Describe the bug The "FSI: Send References from project" command sends reference assemblies instead of implementation assemblies to FSI.
To Reproduce Steps to reproduce the behaviour:
- With the ionide plugin installed in VS Code, open an F# project with nuget references
- Execute the "FSI: Send References from project" command
Expected behaviour The FSI prompt displays the following error:
error FS0193: internal error: Could not load file or assembly ', Version=, Culture=neutral, PublicKeyToken=***********'. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (0x80131058)
Environment (please complete the following information):
- OS: Windows 10
- Ionide version: 4.8.1
- VSCode version: 1.43.2
- dotnet SDK version: 3.1.201
- mono / .Net Framework version: Microsoft.AspNetCore.App 3.1.3 Microsoft.NETCore.App 3.1.3 Microsoft.WindowsDesktop.App 3.1.3
Hey @mydogisbox :wave:,
Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our OpenCollective and consider backing us.
https://opencollective.com/ionide
PS.: We offer
backer
support for all backers. Don't forget to addbacker
label when you start backing us :smile:
I am also experiencing this issue, which is making it difficult to debug / execute / test SQL queries in FSI. Steps are as follows (project attached)
- Open Command Pallette
- Type "FSI: Send References from project" and press enter
- Send the below selection
- Result:
error FS0193: internal error: Could not load file or assembly
'System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a,
processorArchitecture=MSIL'. Reference assemblies should not be loaded for execution.
They can only be loaded in the Reflection-only loader context. (0x80131058)
open System.Data.SqlClient
let myQuery() =
use connection = new SqlConnection(@"Server=Foo;Database=Bar;Trusted_Connection=True;")
use myCommand = new SqlCommand("""DROP TABLE Foo""", connection)
myCommand.ExecuteNonQuery()
Machine infos
- Operating system: Windows_NT
- Arch: x64
- VSCode: 1.49.0
- Ionide: 4.17.0
- Runtime: netcore
- Dotnet version: 3.1.201
- MSBuild version:
Microsoft (R) Build Engine version 4.8.4084.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.