diff --git a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/CsProject.cs b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/CsProject.cs index 98a3669a..238847d1 100644 --- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/CsProject.cs +++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/CsProject.cs @@ -83,10 +83,21 @@ private static string GetExecutingAssemblyPath() } + private string EnsureOutputFolder() + { + if (!Directory.Exists(AxSharpProject.OutputFolder)) + { + Directory.CreateDirectory(AxSharpProject.OutputFolder); + } + + return AxSharpProject.OutputFolder; + } + private void EnsureCsProjFile() { if (AxSharpProject.AxProject.ProjectInfo.Name != null) { + EnsureOutputFolder(); string expectedCsProjFileFullPath = string.Empty; string expectedCsProjFile = string.Empty; if (string.IsNullOrEmpty(this.AxSharpProject.CompilerOptions?.ProjectFile))