We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c48c076 commit 5c5b5aaCopy full SHA for 5c5b5aa
1 file changed
Code/UsingMSBuildCopyOutputFileToFastDebug/SafeOutputFileCopyTask.cs
@@ -3,6 +3,7 @@
3
using System.Collections.Generic;
4
using System.IO;
5
using System.Linq;
6
+using System.Threading.Tasks;
7
8
namespace UsingMSBuildCopyOutputFileToFastDebug
9
{
@@ -79,7 +80,7 @@ public override bool Execute()
79
80
return true;
81
}
82
- private void AddToClean(string newFileName)
83
+ private async void AddToClean(string newFileName)
84
85
// 加入到清理文件
86
@@ -89,11 +90,15 @@ private void AddToClean(string newFileName)
89
90
91
newFileName = Path.GetFullPath(newFileName);
92
File.AppendAllLines(CleanFile, new[] { newFileName });
93
+
94
+ return;
95
96
catch (Exception)
97
98
// 忽略
99
100
101
+ await Task.Delay(TimeSpan.FromMilliseconds(200));
102
103
104
0 commit comments