I've run into an issue with on a branch of FSharp.Data.SqlClient
I am working on with the generative SqlEnumProvider
type provider. When the test project attemps to use a provided type, I get the following compile-time error:
A problem occurred writing the binary 'C:\code\FSharp.Data.SqlClient\src\SqlClient.Tests\obj\Debug\net451\SqlClient.Tests.dll': Error in pass3 for type FSharp.Data.EnumTests, error: Error in GetMethodRefAsMethodDefIdx for mref = ("Parse", "TinyIntMapping"), error: Exception of type 'Microsoft.FSharp.Compiler.AbstractIL.ILBinaryWriter+MethodDefNotFound' was thrown.
At design time, everything appears to be working as expected. (I have intellisense on the provided types, etc.)
I attempted the workaround suggested here, but no joy.
It turns out the answer was in the sample template in the SDK, I just wasn't reading it closely enough:
SqlEnumProvider
) should be added to the executing assembly.SqlEnumProvider<"SELECT * FROM (VALUES(('One'), 1), ('Two', 2)) AS T(Tag, Value)">
) should be added to the provided assembly.In the failing code, we were adding the root types to both assemblies.