File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Code/UsingMSBuildCopyOutputFileToFastDebug Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 33using System . Collections . Generic ;
44using System . IO ;
55using System . Linq ;
6+ using System . Threading . Tasks ;
67
78namespace UsingMSBuildCopyOutputFileToFastDebug
89{
@@ -79,7 +80,7 @@ public override bool Execute()
7980 return true ;
8081 }
8182
82- private void AddToClean ( string newFileName )
83+ private async void AddToClean ( string newFileName )
8384 {
8485 // 加入到清理文件
8586
@@ -89,11 +90,15 @@ private void AddToClean(string newFileName)
8990 {
9091 newFileName = Path . GetFullPath ( newFileName ) ;
9192 File . AppendAllLines ( CleanFile , new [ ] { newFileName } ) ;
93+
94+ return ;
9295 }
9396 catch ( Exception )
9497 {
9598 // 忽略
9699 }
100+
101+ await Task . Delay ( TimeSpan . FromMilliseconds ( 200 ) ) ;
97102 }
98103 }
99104 }
You can’t perform that action at this time.
0 commit comments