@@ -30,9 +30,9 @@ public async Task<SimulationResult> RunAsync(
3030 Log ( "STEP 1: Validating inputs" , progress ) ;
3131 Validate ( config ) ;
3232
33- // 2. Prepare output
34- Log ( $ "STEP 2: Preparing { config . OutputDirectory } ", progress ) ;
35- Directory . CreateDirectory ( config . OutputDirectory ) ;
33+ // 2. Prepare app directory
34+ Log ( $ "STEP 2: Preparing { config . AppDirectory } ", progress ) ;
35+ Directory . CreateDirectory ( config . AppDirectory ) ;
3636
3737 // 3. Compile test apps to .exe
3838 Log ( "STEP 3: Compiling test apps" , progress ) ;
@@ -60,18 +60,17 @@ public async Task<SimulationResult> RunAsync(
6060 await DotNetPublishAsync ( upgradeProj , exeDir ) ;
6161 Log ( $ " Upgrade.exe → { exeDir } ", progress ) ;
6262
63- // Copy to simulation output AND install path (GeneralUpdate StartApp looks here )
64- var clientDest = Path . Combine ( config . OutputDirectory , "Client.exe" ) ;
63+ // Copy compiled apps into app directory (where the update will run )
64+ var clientDest = Path . Combine ( config . AppDirectory , "Client.exe" ) ;
6565 File . Copy ( Path . Combine ( exeDir , "ClientSample.exe" ) , clientDest , true ) ;
6666
6767 var upgradeExe = Path . Combine ( exeDir , "UpgradeSample.exe" ) ;
68- File . Copy ( upgradeExe , Path . Combine ( config . OutputDirectory , "Upgrade.exe" ) , true ) ;
6968 File . Copy ( upgradeExe , Path . Combine ( config . AppDirectory , "Upgrade.exe" ) , true ) ;
7069 Log ( $ " Upgrade.exe → { config . AppDirectory } ", progress ) ;
7170
7271 // 4. Start server
7372 Log ( "STEP 4: Starting local server" , progress ) ;
74- var serverPatchDir = Path . Combine ( config . OutputDirectory , ".server" ) ;
73+ var serverPatchDir = Path . Combine ( config . AppDirectory , ".server" ) ;
7574 Directory . CreateDirectory ( serverPatchDir ) ;
7675 var patchName = Path . GetFileName ( config . PatchFilePath ) ;
7776 var patchDest = Path . Combine ( serverPatchDir , patchName ) ;
@@ -87,11 +86,11 @@ public async Task<SimulationResult> RunAsync(
8786
8887 // 5. Run client
8988 Log ( "STEP 5: Running Client.exe" , progress ) ;
90- var clientExe = Path . Combine ( config . OutputDirectory , "Client.exe" ) ;
89+ var clientExe = Path . Combine ( config . AppDirectory , "Client.exe" ) ;
9190 var clientArgs = new List < string >
9291 {
9392 "--server-url" , _server . BaseUrl ,
94- "--install-path" , config . OutputDirectory ,
93+ "--install-path" , config . AppDirectory ,
9594 "--current-version" , config . CurrentVersion ,
9695 "--app-secret" , config . AppSecretKey ,
9796 "--product-id" , config . ProductId ,
@@ -160,8 +159,6 @@ private void Validate(SimulateConfigModel config)
160159 throw new DirectoryNotFoundException ( $ "App directory not found: { config . AppDirectory } ") ;
161160 if ( ! File . Exists ( config . PatchFilePath ) )
162161 throw new FileNotFoundException ( $ "Patch file not found: { config . PatchFilePath } ") ;
163- if ( string . IsNullOrWhiteSpace ( config . OutputDirectory ) )
164- throw new ArgumentException ( "Output directory is required" ) ;
165162 try
166163 {
167164 var psi = new ProcessStartInfo ( "dotnet" , "--version" ) { RedirectStandardOutput = true , UseShellExecute = false , CreateNoWindow = true } ;
0 commit comments