f# - How can I reference FakeLib.dll in a Fake.Deploy deployment script? -


i'm trying reference fakelib.dll local fake.deploy installation in deployment script can't seem find correct path use. found environment.currentdirectory points fake.deploy installation, using

#r @"fakelib.dll" 

doesn't work:

deploy messages {   2015-05-12 09::22:50.413   2015-05-12 09::22:50.417   2015-05-12 09::22:50.417 install.fsx(2,1): error fs0082: not resolve reference. not locate assembly "fakelib.dll". check make sure assembly exists on disk. if reference required code, may compilation errors. (code=msb3245)   2015-05-12 09::22:50.432   2015-05-12 09::22:50.432   2015-05-12 09::22:50.433 install.fsx(2,1): error fs0084: assembly reference 'fakelib.dll' not found or invalid } 

examples found on web suggest deploy fake along application in nuget package , reference this:

#r @"tools\fake\tools\fakelib.dll" 

but seems overkill , unnecessary reference.

does know path use reference local fake.deploy installation?

just found answer myself: base directory used references in post-deployment fsx script __source_directory__, directory of deployment itself.

so assuming fake.deploy installed in

 .\fake.deploy\ 

then environment.currentdirectory point directory, whereas __source_directory__ point to

.\fake.deploy\deployments\\{your_app}\active 

so can reference fakelib.dll post-deployment fsx script follows:

 #r @"..\..\..\fakelib.dll" 

i try added documentation page.

that being said, there in fact points made deploying fake application:

  • it makes sure correct version used run deployment script
  • the fake.deploy installation might not be under control, prevented permission-wise accessing binaries
  • the configuration of fake.deploy allows specify different deplyoment location (via "workdirectory"), hardcoded path break when using non-default location

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -