|
|
@ -17,8 +17,12 @@ public class BuildTasksPatcher |
|
|
{ |
|
|
{ |
|
|
if (entry.Name == "Avalonia.Build.Tasks.dll") |
|
|
if (entry.Name == "Avalonia.Build.Tasks.dll") |
|
|
{ |
|
|
{ |
|
|
var temp = Path.Combine(Path.GetTempPath(), Guid.NewGuid() + ".dll"); |
|
|
var tempDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); |
|
|
|
|
|
Directory.CreateDirectory(tempDir); |
|
|
|
|
|
var temp = Path.Combine(tempDir, Guid.NewGuid() + ".dll"); |
|
|
var output = temp + ".output"; |
|
|
var output = temp + ".output"; |
|
|
|
|
|
File.Copy(typeof(Microsoft.Build.Framework.ITask).Assembly.GetModules()[0].FullyQualifiedName, |
|
|
|
|
|
Path.Combine(tempDir, "Microsoft.Build.Framework.dll")); |
|
|
var patched = new MemoryStream(); |
|
|
var patched = new MemoryStream(); |
|
|
try |
|
|
try |
|
|
{ |
|
|
{ |
|
|
@ -57,10 +61,8 @@ public class BuildTasksPatcher |
|
|
{ |
|
|
{ |
|
|
try |
|
|
try |
|
|
{ |
|
|
{ |
|
|
if (File.Exists(temp)) |
|
|
if(Directory.Exists(tempDir)) |
|
|
File.Delete(temp); |
|
|
Directory.Delete(tempDir, true); |
|
|
if (File.Exists(output)) |
|
|
|
|
|
File.Delete(output); |
|
|
|
|
|
} |
|
|
} |
|
|
catch |
|
|
catch |
|
|
{ |
|
|
{ |
|
|
|