Question

Im trying to deploy asp.net mvc application to IIS on a remote PC with Fake. I can build everything successfully. I also make nuget package of my webapp as Fake.Deploy use nuget packages for deployment. but what should I add in my fsx script in nuget to stop IIS, then move the bin and content of a new site into virtual directory and then start IIS? I dont want to use octopus deploy, so some fake script or cmd line would be just fine.

Was it helpful?

Solution

You can write any .NET(F#) code in *.fsx file. As far as I know you should be able to reference FakeLib.dll and use all available helper functions

#r "FakeLib.dll"

open System.Diagnostics
open Fake

// Stop IIS process
Process.Start(ProcessStartInfo("iisreset.exe", " /stop"))
// Copy missing/updated files
XCopy "your source directory path" "your destination directory path"
// Start IIS process
Process.Start(ProcessStartInfo("iisreset.exe", " /start"))
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top