F# script can't load .Net 4.5? -
i have f# library uses .net 4.5 httpclient. compiles fine when try call functions in library after loading in script script says can't find system.net.http.
both script , library in same project targeted @ .net 4.5.
the library (in tdapi.fs) open system.net.http; when script #load "tdapi.fs" error in interactive window tdapi.fs(6,17): error fs0039: namespace 'http' not defined.
i'm using vs2012 , getting started in f#.
there difference between compiled library , script file.
when compile tdapi.fs file part of library project, dependencies (in case, http library) specified in project properties. compiler uses fsproj file find dependencies (and compiles fine).
when #load tdapi.fs file script, not know project - , not know dependencies. fix this, can either use #r "tdapi.dll" tdapi.dll compiled library, or can use like:
#r "someplace/system.net.http.dll" #load "tdapi.fs" so, can use #r explicitly load http library first , tdapi.fs see it.
Comments
Post a Comment