爲什麼我不能創建類型提供程序作爲* .exe文件與[<TypeProviderAssembly()>]
和[<EntryPoint>]
裏面?F#類型提供程序編譯爲* .exe文件
當我嘗試TP使用#r @"d:\TP\bin\Debug\MyTypeProvider.exe"
引用這樣的,我看到以下內容:
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.
我需要有單獨的進程類型推斷運行,因爲它應該是64bit
(不像32bit
VS進程)。但我想將所有東西打包到一個文件中,從VS引用它並作爲外部進程啓動。
TP應該能夠連接到SharePoint。它只能從64位進程中獲得。 VS是'32bit'應用程序,這也意味着智能感知。我不能直接從類型提供者那裏做。我看到的唯一可能的解決方案是啓動單獨的64位進程並使用WCF命名管道在它們之間進行通信。將服務和客戶端打包成一個exe將會很好。 –
你可以看看[當前實現](https://github.com/sergey-tihon/PowerShellTypeProvider)。但我想將這些項目合併爲一個。我認爲在這種情況下,它會更容易使用。 –