diff --git a/bootstrap/prebuild.dll b/bootstrap/prebuild.dll index 2efe2f7..94d4d0c 100644 Binary files a/bootstrap/prebuild.dll and b/bootstrap/prebuild.dll differ diff --git a/prebuild.xml b/prebuild.xml index bda8613..1b3e275 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -94,6 +94,7 @@ ../../bootstrap/debug/ false false + @@ -104,11 +105,12 @@ - + - + + diff --git a/source/Prebuild/Core/Targets/VSGenericTarget.cs b/source/Prebuild/Core/Targets/VSGenericTarget.cs index 323ac79..445a32f 100644 --- a/source/Prebuild/Core/Targets/VSGenericTarget.cs +++ b/source/Prebuild/Core/Targets/VSGenericTarget.cs @@ -696,7 +696,7 @@ public abstract class VSGenericTarget : ITarget string outputFile = Path.Combine(project.Path, node.OutputName); ps.WriteLine(" "); - ps.WriteLine($" "); + ps.WriteLine($" "); ps.WriteLine($" "); } } diff --git a/source/SnapWrap/SnapWrap.cs b/source/SnapWrap/SnapWrap.cs index bb578b0..ca051f9 100644 --- a/source/SnapWrap/SnapWrap.cs +++ b/source/SnapWrap/SnapWrap.cs @@ -14,16 +14,26 @@ namespace SnapWrap string output = args[1]; var customImports = args[2].Split(".."); + if (customImports.Length == 0) customImports = new string[3] { "System", "System.Diagnostics.Process", "System.IO" }; + try { var inputCode = File.ReadAllText(input); var options = ScriptOptions.Default .WithReferences(AppDomain.CurrentDomain.GetAssemblies()) // Add necessary assemblies + .WithReferences(typeof(Process).Assembly, + typeof(Console).Assembly + ) + .WithOptimizationLevel(Microsoft.CodeAnalysis.OptimizationLevel.Release) .WithImports(customImports) .WithAllowUnsafe(true); + Console.WriteLine("Run Script: " + input); + Console.WriteLine("Script Length: " + inputCode.Length); + + // Capture console output using custom class using (var consoleOutput = new ConsoleOutput()) {