Skip to content

Commit

Permalink
Merge pull request #51 from microsoft/mauiFix
Browse files Browse the repository at this point in the history
Fix MAUI packaging.
  • Loading branch information
azchohfi committed Jun 25, 2024
2 parents 9fe3b23 + 9b766e0 commit 02aa07c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions MSStore.CLI.UnitTests/PackageCommandUnitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public async Task PackageCommandForMauiAppsShouldCallMSBuildIfWindows()
ExternalCommandExecutor
.Setup(x => x.RunAsync(
It.Is<string>(s => s == "dotnet"),
It.Is<string>(s => s.Contains("publish -f net8.0-windows10.0.19041.0 -r win10-x64 --self-contained /p:Configuration=Release")),
It.Is<string>(s => s.Contains("publish -f net8.0-windows10.0.19041.0 -p:RuntimeIdentifierOverride=win10-x64 --self-contained -c Release")),
It.Is<string>(s => s == dirInfo.FullName),
It.IsAny<CancellationToken>()))
.ReturnsAsync(new Services.ExternalCommandExecutionResult
Expand Down Expand Up @@ -305,8 +305,8 @@ public async Task PackageCommandForMauiAppsShouldCallMSBuildWithOutputParameterI
ExternalCommandExecutor
.Setup(x => x.RunAsync(
It.Is<string>(s => s == "dotnet"),
It.Is<string>(s => s.Contains("publish -f net8.0-windows10.0.19041.0 -r win10-x64 --self-contained /p:Configuration=Release")
&& s.Contains($"AppxPackageDir={customPath}\\;")
It.Is<string>(s => s.Contains("publish -f net8.0-windows10.0.19041.0 -p:RuntimeIdentifierOverride=win10-x64 --self-contained -c Release")
&& s.Contains($"AppxPackageDir={customPath}\\")
&& s.EndsWith($"AppxPackageTestDir={customPath}\\MauiProject_1.0.0.0_X64_Test\\")),
It.Is<string>(s => s == dirInfo.FullName),
It.IsAny<CancellationToken>()))
Expand Down
3 changes: 1 addition & 2 deletions MSStore.CLI/ProjectConfigurators/MauiProjectConfigurator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,7 @@ public override async Task<(int returnCode, DirectoryInfo? outputDirectory)> Pac
{
var runtime = $"win10-{appxBundlePlatform.ToLowerInvariant()}";
// Maybe switch AppxPackageTestDir to bin\Release\{targetFramework}\{runtime}\AppPackages\?
msBuildParamsList.Add($"publish -f {properties.WindowsTargetFramework} -r {runtime} --self-contained /p:Configuration=Release;AppxBundle=Always;Platform={appxBundlePlatform};AppxBundlePlatforms={appxBundlePlatform};AppxPackageDir={escapedOutput}\\;UapAppxPackageBuildMode=StoreUpload;GenerateAppxPackageOnBuild=true;AppxPackageTestDir={escapedOutput}\\{projectName}_{version.ToVersionString()}_{appxBundlePlatform}_Test\\");
msBuildParamsList.Add($"publish -f {properties.WindowsTargetFramework} -p:RuntimeIdentifierOverride={runtime} --self-contained -c Release -p:AppxBundle=Always -p:AppxBundlePlatforms={appxBundlePlatform} -p:AppxPackageDir={escapedOutput}\\ -p:UapAppxPackageBuildMode=StoreUpload -p:AppxPackageTestDir={escapedOutput}\\{projectName}_{version.ToVersionString()}_{appxBundlePlatform}_Test\\");
}
ExternalCommandExecutionResult? result = null;
Expand Down

0 comments on commit 02aa07c

Please sign in to comment.