Skip to content

Commit

Permalink
Merge pull request #466 from frankshearar/mkdir-p-the-assemblyinfo-path
Browse files Browse the repository at this point in the history
Let CreateCSharpAssemblyInfo work with as-yet-uncreated paths
  • Loading branch information
forki committed Jun 15, 2014
2 parents 92e8cc3 + a91e783 commit 46dbb1b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/app/FakeLib/AssemblyInfoFile.fs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ type Attribute(name, value, inNamespace) =
let private writeToFile outputFileName (lines : seq<string>) =
let fi = fileInfo outputFileName
fi.Delete()
System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(outputFileName)) |> ignore
use writer = new System.IO.StreamWriter(outputFileName, false, System.Text.Encoding.UTF8)
lines |> Seq.iter writer.WriteLine
tracefn "Created AssemblyInfo file \"%s\"." outputFileName
Expand Down

0 comments on commit 46dbb1b

Please sign in to comment.