From 6ef2805316d464b404aca03b0555efb1b4f776f2 Mon Sep 17 00:00:00 2001 From: Elshiekh Ahmed Date: Fri, 17 Jul 2026 15:49:42 -0700 Subject: [PATCH] Remove XSAPI dependency workaround SubmissionValidator no longer depends on XSAPI.dll, so stop copying it into the XGPM settings directory before MSIXVC2 packaging. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 58a69b47-ce64-4d96-876d-ec6d4bc70464 --- .../ViewModel/PackageCreationViewModel.cs | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/src/PackageUploader.UI/ViewModel/PackageCreationViewModel.cs b/src/PackageUploader.UI/ViewModel/PackageCreationViewModel.cs index 6ef05281..1ccf86fc 100644 --- a/src/PackageUploader.UI/ViewModel/PackageCreationViewModel.cs +++ b/src/PackageUploader.UI/ViewModel/PackageCreationViewModel.cs @@ -672,9 +672,6 @@ private async void StartMakePackageProcess() if (UseMsixvc2) { - // According to the SubmissionValidator development team, an upcoming version will no longer have this dependency and this workaround will be removable - CopyXsapiDllToSettingsFolder(_settingsFolder); - string msixvc2CmdFormat = "pack /f \"{0}\" /pd \"{1}\" /d \"{2}\" /msixvc2 /updatesubval /validationpath \"{3}\""; arguments = string.Format(msixvc2CmdFormat, MappingDataXmlPath, buildPath, GameDataPath, _settingsFolder); executablePath = _pathConfigurationService.MakePkg2Path; @@ -903,40 +900,6 @@ private bool PopulateSubValArgs(string settingsFolder, ref string arguments) return true; } - /// - /// Copies XSAPI.dll from the GDK bin folder to the settings folder if it exists. - /// SubmissionValidator.dll has a native dependency on XSAPI.dll, and when makepkg2 downloads - /// a fresh validator via /updatesubval, XSAPI.dll must be in the same directory for it to load. - /// - private void CopyXsapiDllToSettingsFolder(string settingsFolder) - { - try - { - string? gdkBinDir = Path.GetDirectoryName(_pathConfigurationService.BaseSubValPath); - if (string.IsNullOrEmpty(gdkBinDir)) - { - return; - } - - string sourceXsapi = Path.Combine(gdkBinDir, "xsapi.dll"); - if (!File.Exists(sourceXsapi)) - { - return; - } - - string destXsapi = Path.Combine(settingsFolder, "xsapi.dll"); - if (!File.Exists(destXsapi)) - { - File.Copy(sourceXsapi, destXsapi, overwrite: false); - _logger.LogInformation("Copied xsapi.dll to settings folder for SubmissionValidator dependency."); - } - } - catch (Exception ex) - { - _logger.LogWarning("Failed to copy xsapi.dll to settings folder: {message}", ex.Message); - } - } - private async Task GenerateMappingFile(string tempBuildPath) { Process? makePackageProcess;