I'm working on upgrading FSharp.Data.SqlClient to the latest version of the Type Provider SDK and I'm seeing an error when using generated types. The test project, which references numerous generated types, compiles just fine, but when I attempt to run the xunit tests I get the following exception:
System.TypeLoadException: Could not load type 'BTL' from assembly 'SqlClient.Tests, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because the parent does not exist.
at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
at System.Reflection.RuntimeAssembly.GetExportedTypes()
at <StartupCode$FSI_0005>.$FSI_0005.main@()
I'm not sure what the type BTL
refers to - I don't see any symbol with that name anywhere in the test or in the type provider source. And I've confirmed that the issue is related to generated types - if I comment out all references to SqlEnumProvider but leave references to erased types, the tests all pass.