Monday, 12 August 2013

F# Type Provider compiled as *.exe file

F# Type Provider compiled as *.exe file

Why I cannot create Type Provider as *.exe file with
[<TypeProviderAssembly()>] and [<EntryPoint>] inside?
When I try to reference such TP using #r
@"d:\TP\bin\Debug\MyTypeProvider.exe", I see the following:
test.fsx(3,1): error FS3031: The type provider
'd:\TP\bin\Debug\MyTypeProvider.exe' reported an error: Assembly attribute
'TypeProviderAssemblyAttribute' refers to a designer assembly
'MyTypeProvider' which cannot be loaded or doesn't exist. Could not load
file or assembly 'file:///d:\TP\bin\Debug\MyTypeProvider.dll' or one of
its dependencies. The system cannot find the file specified.
I need to have a type inference runtime in separate process, because it
should be 64bit (unlike 32bit VS process). But I want to pack all things
into one file, reference it from VS and start as external process.

No comments:

Post a Comment