In the source code, the type provider project references to the library1.dll. Everything seems working correctly, until you try to execute the test code in the second Visual Studio,
type T = Samples.ShareInfo.TPTest.TPTestTypeyou will get error:
let t = T()
let s = t.F2(2)
The type provider 'Samples.FSharp.ShareInfoProvider.CheckedRegexProvider' reported an error in the context of provided type 'Samples.ShareInfo.TPTest.TPTestType', member '.ctor'. The error: Could not load file or assembly 'Library1, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
I bet you must jaw-droppingly stare at the screen when you first see this error. Does Visual Studio hide some secrete from you? If you install this DLL into the GAC, everything should be fine. If you do not want to pollute your GAC, the < visual Studio Installation folder >
\Common7\IDE\PrivateAssemblies is the magic folder you can put your Library1.dll.
After the file is under that magic folder, you do not have to restart Visual Studio. Just hit F5 and everything should work.
If you really want to use the type string as a parameter, there is a tutorial from MSDN. What you need to do is convert the incoming string to type by using Assembly.Load and find the type you want. Please note type provider does not accept System.Type as parameter. It can only take string.