You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A program with the SqlDataProvider for SQLite can be compiled with dotnet build (.NET SDK 6.0.102) but not in Visual Studio 2022 (17.0.7):
To Reproduce
The following program cannot be compiled in Visual STudio 2022:
open FSharp.Data.Sql
[<Literal>]
let private ConnStringDevel =
"Data Source=" +
"Foo.sqlite; foreign keys=true"
[<Literal>]
let private ResolutionPath =
"Stub.System.Data.SQLite.Core.NetStandard"
type private CcMon =
SqlDataProvider<Common.DatabaseProviderTypes.SQLITE, SQLiteLibrary=Common.SQLiteLibrary.SystemDataSQLite, ConnectionString=ConnStringDevel, ResolutionPath=ResolutionPath>
FS3033 The type provider 'FSharp.Data.Sql.SqlTypeProvider' reported an error: Method not found: 'System.String System.Runtime.InteropServices.Marshal.PtrToStringUTF8(IntPtr, Int32)'. TryTypePro Program.fs
Narrowing the problem
I tracked the problem down to fscAnyCpu.exe bundled with Visual Studio. VS calls the compiler with this command line (modified to be pasteable in PowerShell):
I can't get this to work with dotnet build either. I'm able to get it to work if I create a .net Framework project but I'm unable to get it working with a .net 6.0 project in Visual Studio 2022 or standalone using dotnet build. The instructions about copying DLLs around are not very clear in the docs at https://fsprojects.github.io/SQLProvider/core/sqlite.html so I'm not sure if I'm doing something wrong but for .net Framework it just works.
@mattnewport and @florenzen With the latest version, in a .net 6 project, I can get dotnet build to work, and it builds in visual studio. Currently design time only works for me in Visual Studio, both Neovim and VSCode give this error:
Do you guys get Visual Studio to build now as well, or are you guys still getting no love there?
Describe the bug
A program with the
SqlDataProvider
for SQLite can be compiled withdotnet build
(.NET SDK 6.0.102) but not in Visual Studio 2022 (17.0.7):To Reproduce
The following program cannot be compiled in Visual STudio 2022:
Referenced NuGet packages:
The error in Visual Studio is:
Narrowing the problem
I tracked the problem down to
fscAnyCpu.exe
bundled with Visual Studio. VS calls the compiler with this command line (modified to be pasteable in PowerShell):The command line used by
dotnet build
is exactly the same apart from the executable called, which isIf I replace the
fscAnyCpu.exe
invocation by thedotnet.exe
invocation the program is compiled.I am not sure if I should report this to Visual Studio development, to the F# compiler folks, or here. Please direct me else where if appropriate.
The text was updated successfully, but these errors were encountered: