diff --git a/src/NSwag/Commands/Base/OutputCommandBase.cs b/src/NSwag/Commands/Base/OutputCommandBase.cs index b126853c31..4a0afd2aff 100644 --- a/src/NSwag/Commands/Base/OutputCommandBase.cs +++ b/src/NSwag/Commands/Base/OutputCommandBase.cs @@ -20,6 +20,12 @@ protected void WriteOutput(IConsoleHost host, string output) host.WriteMessage(output); else { + var file = new FileInfo(OutputFilePath); + var directory = file.Directory; + + if (!directory.Exists) + directory.Create(); + File.WriteAllText(OutputFilePath, output, Encoding.UTF8); host.WriteMessage("Code has been successfully written to file.\n"); } diff --git a/src/UpgradeLog.htm b/src/UpgradeLog.htm new file mode 100644 index 0000000000..97eda433e2 Binary files /dev/null and b/src/UpgradeLog.htm differ