Closed ScottShingler closed 4 years ago
Turns out this problem can be resolved by upgrading to .NET Core 3.0-preview9, which has F# Compiler version 10.6.0.0 for F# 4.7.
Have you seen this problem reassert itself in .netcore 3.0 + npgsql 4.0.1 or 4.1.0? Looks like on my end the generated schema files are no longer including fields (columns) and their type maps, just the names of the tables themselves.
See the response at #644
Description
Running
dotnet build
on a project that uses SqlProvider with Npgsql while a cached schema file is present fails to build. However, the same project is able to build from Visual Studio 2019 Version 16.2.4.Repro steps
Create a basic PostgreSQL schema (single table is enough) and use SqlProvider to generate a schema cache via
GetDataContext().SaveContextSchema()
from Visual Studio 2019.Exit Visual Studio.
Delete the
bin
andobj
folders.Run
dotnet build
.Expected behavior
The project compiles without error.
Actual behavior
Build fails with the following error:
Known workarounds
Delete the schema cache and instead have an instance of the database running. This is not ideal for CI builds.
Related information
Additional Information
Comparing the build command from Visual Studio and
dotnet build
reveals the following differences:dotnet build
c:\program files (x86)\microsoft visual studio\2019\professional\common7\ide\commonextensions\microsoft\fsharp\fsc.exe
C:\Program Files\dotnet\dotnet.exe "C:\Program Files\dotnet\sdk\2.2.401\FSharp\fsc.exe"