To create a type provider use:
dotnet new -i FSharp.TypeProviders.Templates
dotnet new typeprovider -n LemonadeProvider -lang F#
|
The template uses paket to acquire the files of the latest published type provider SDK.
cd LemonadeProvider
dotnet tool restore
dotnet paket update
dotnet build -c release
dotnet test -c release
|
The type provider also contains the logic necessary to package the type provider:
dotnet paket pack nuget --version 0.0.1
|
See examples the examples
directory.
See Debugging Type Providers
See Technical Notes
You can use the TypeProvider SDK via a nuget package instead of by source inclusion. To enable this, use settings like these in the design-time component:
<PackageReference Include="FSharp.TypeProviders.SDK" Version="7.0.3">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Update="FSharp.Core" Version="6.0.5">
<ExcludeAssets>all</ExcludeAssets>
</PackageReference>
|
The runtime-component should not have a reference to FSharp.TypeProviders.SDK.