Can somebody point me to working example of generated types F# TypeProvider? Ideally, based on F# sample pack "ProvidedTypes-*.fs" library.

I tried "GeneratedTypeProvider" from F# 3.0 Sample Pack but it doesn't work for me. I received "...'FSharpLib.T' does not contain a definition for 'F1' and no extension method 'F1' accepting a first argument of type 'FSharpLib.T' could be found (are you missing a using directive or an assembly reference?)" for C# project. I don't care much about C# project (ConsoleApplication1) but when I changed ConsoleApplication2 to run as console application that invokes T.F1 I received scary "Error in pass3 for type FSharpLib.Program, error: Error in GetMethodRefAsMethodDefIdx for mref = "F1", error: Exception of type 'Microsoft.FSharp.Compiler.AbstractIL.ILBinaryWriter+MethodDefNotFound' was thrown." And honestly, it's suspicious that source code out of sync with
http://apollo13cn.blogspot.com/2013/01/generated-type-provider-and-code.html

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer
1

In general Tests project in sample pack contains tests for both erased and generated type providers. However when I run tests I saw the same error that you have - seems that 'provided types' API was partially broken recently - now fixed (at least for the tests project, have not tried GeneratedTypeProvider sample)