@@ -68,7 +68,7 @@ public async Task E2E_WinFormsApp_CreateBuildManifestAndPackage_ShouldSucceed()
6868 } ;
6969
7070 var manifestParseResult = manifestGenerateCommand . Parse ( manifestArgs ) ;
71- var manifestExitCode = await manifestParseResult . InvokeAsync ( ) ;
71+ var manifestExitCode = await manifestParseResult . InvokeAsync ( cancellationToken : TestContext . CancellationToken ) ;
7272 Assert . AreEqual ( 0 , manifestExitCode , "Manifest generate command should complete successfully" ) ;
7373
7474 // Verify manifest generated the necessary files
@@ -90,7 +90,7 @@ public async Task E2E_WinFormsApp_CreateBuildManifestAndPackage_ShouldSucceed()
9090 } ;
9191
9292 var packageParseResult = packageCommand . Parse ( packageArgs ) ;
93- var packageExitCode = await packageParseResult . InvokeAsync ( ) ;
93+ var packageExitCode = await packageParseResult . InvokeAsync ( cancellationToken : TestContext . CancellationToken ) ;
9494 Assert . AreEqual ( 0 , packageExitCode , "Package command should complete successfully" ) ;
9595
9696 // Step 6: Verify the MSIX package was created
@@ -100,7 +100,7 @@ public async Task E2E_WinFormsApp_CreateBuildManifestAndPackage_ShouldSucceed()
100100 Assert . IsGreaterThan ( 0 , fileInfo . Length , "MSIX package should not be empty" ) ;
101101
102102 // Verify the MSIX contains expected files
103- using var archive = ZipFile . OpenRead ( packageOutputPath ) ;
103+ using var archive = await ZipFile . OpenReadAsync ( packageOutputPath , TestContext . CancellationToken ) ;
104104 var entries = archive . Entries . Select ( e => e . FullName ) . ToList ( ) ;
105105
106106 Assert . IsTrue ( entries . Any ( e => e . EndsWith ( "AppxManifest.xml" , StringComparison . OrdinalIgnoreCase ) ) ,
@@ -149,14 +149,14 @@ public async Task E2E_WinFormsApp_WithCustomManifestOptions_ShouldPackageSuccess
149149 } ;
150150
151151 var manifestParseResult = manifestGenerateCommand . Parse ( manifestArgs ) ;
152- var manifestExitCode = await manifestParseResult . InvokeAsync ( ) ;
152+ var manifestExitCode = await manifestParseResult . InvokeAsync ( cancellationToken : TestContext . CancellationToken ) ;
153153 Assert . AreEqual ( 0 , manifestExitCode , "Manifest generate command should complete successfully" ) ;
154154
155155 // Verify custom options were applied
156156 var manifestPath = Path . Combine ( projectDir . FullName , "appxmanifest.xml" ) ;
157157 Assert . IsTrue ( File . Exists ( manifestPath ) , "Manifest should be created" ) ;
158158
159- var manifestContent = await File . ReadAllTextAsync ( manifestPath ) ;
159+ var manifestContent = await File . ReadAllTextAsync ( manifestPath , TestContext . CancellationToken ) ;
160160 Assert . IsTrue ( manifestContent . Contains ( "CustomPackageName" , StringComparison . OrdinalIgnoreCase ) ,
161161 "Manifest should contain custom package name" ) ;
162162 Assert . IsTrue ( manifestContent . Contains ( "CN=TestPublisher" , StringComparison . Ordinal ) ,
@@ -176,7 +176,7 @@ public async Task E2E_WinFormsApp_WithCustomManifestOptions_ShouldPackageSuccess
176176 } ;
177177
178178 var packageParseResult = packageCommand . Parse ( packageArgs ) ;
179- var packageExitCode = await packageParseResult . InvokeAsync ( ) ;
179+ var packageExitCode = await packageParseResult . InvokeAsync ( cancellationToken : TestContext . CancellationToken ) ;
180180 Assert . AreEqual ( 0 , packageExitCode , "Package command should complete successfully" ) ;
181181
182182 Assert . IsTrue ( File . Exists ( packageOutputPath ) , "MSIX package should be created" ) ;
@@ -208,7 +208,7 @@ def main():
208208if __name__ == ""__main__"":
209209 sys.exit(main())
210210" ;
211- await File . WriteAllTextAsync ( scriptPath , pythonScript ) ;
211+ await File . WriteAllTextAsync ( scriptPath , pythonScript , TestContext . CancellationToken ) ;
212212 Assert . IsTrue ( File . Exists ( scriptPath ) , "Python script should be created" ) ;
213213
214214 // Step 2: Run 'winapp manifest generate --template hostedapp --entrypoint main.py'
@@ -222,14 +222,14 @@ def main():
222222 } ;
223223
224224 var manifestParseResult = manifestGenerateCommand . Parse ( manifestArgs ) ;
225- var manifestExitCode = await manifestParseResult . InvokeAsync ( ) ;
225+ var manifestExitCode = await manifestParseResult . InvokeAsync ( cancellationToken : TestContext . CancellationToken ) ;
226226 Assert . AreEqual ( 0 , manifestExitCode , "Manifest generate command should complete successfully" ) ;
227227
228228 // Verify manifest was created with hosted app configuration
229229 var manifestPath = Path . Combine ( projectDir . FullName , "appxmanifest.xml" ) ;
230230 Assert . IsTrue ( File . Exists ( manifestPath ) , "Manifest should be created" ) ;
231231
232- var manifestContent = await File . ReadAllTextAsync ( manifestPath ) ;
232+ var manifestContent = await File . ReadAllTextAsync ( manifestPath , TestContext . CancellationToken ) ;
233233 Assert . IsTrue ( manifestContent . Contains ( "Python314" , StringComparison . OrdinalIgnoreCase ) ||
234234 manifestContent . Contains ( "Python" , StringComparison . OrdinalIgnoreCase ) ,
235235 "Manifest should contain Python runtime dependency" ) ;
@@ -247,7 +247,7 @@ def main():
247247 } ;
248248
249249 var debugIdentityParseResult = createDebugIdentityCommand . Parse ( debugIdentityArgs ) ;
250- var debugIdentityExitCode = await debugIdentityParseResult . InvokeAsync ( ) ;
250+ var debugIdentityExitCode = await debugIdentityParseResult . InvokeAsync ( cancellationToken : TestContext . CancellationToken ) ;
251251 Assert . AreEqual ( 0 , debugIdentityExitCode , "Create debug identity command should complete successfully" ) ;
252252
253253 // Verify the debug identity package was created (sparse package registration)
@@ -258,7 +258,7 @@ def main():
258258 /// <summary>
259259 /// Helper method to run dotnet commands
260260 /// </summary>
261- private async Task < ( int ExitCode , string Output , string Error ) > RunDotnetCommandAsync (
261+ private static async Task < ( int ExitCode , string Output , string Error ) > RunDotnetCommandAsync (
262262 DirectoryInfo workingDirectory ,
263263 string arguments )
264264 {
0 commit comments