开发者

ServiceModel and f#

开发者 https://www.devze.com 2023-01-12 01:06 出处:网络
I am just starting with f# so the question may seem easy for some of you. so, I am trying to use SyndicationFeed which is located in System.ServiceModel.Syndication namespace. I added following refere

I am just starting with f# so the question may seem easy for some of you. so, I am trying to use SyndicationFeed which is located in System.ServiceModel.Syndication namespace. I added following references: System.ServiceModel and System.ServiceModel.Web to the project. The 开发者_如何学Goresult is that it builds successfully, but when I switch to "F# interactive" window I got an error which reads "error FS0039: The namespace 'ServiceModel' is not defined".

I goggled that I should also add reference to FSharp.PowerPack, in order to get rid this error but unfortunately it did not help. So guys I count on your help


references in script files (and FSI) are added via #r directive

#r "System.ServiceModel"

you can add parts like below to you source code so it can be both used by fsc and sent to fsi

#if INTERACTIVE
#r "System.ServiceModel"
#endif
0

精彩评论

暂无评论...
验证码 换一张
取 消