microsoft / msix-packaging

MSIX SDK
MIT License
963 stars 163 forks source link

[BUG] MSIX doesnt built in Azure DevOps Task #610

Open saigkill opened 6 months ago

saigkill commented 6 months ago

Project MSIX SDK with MAUI app. Project location: https://dev.azure.com/saigkill/JobApplicationManager

Describe the bug I'm using the MSIX build and package task. After the task, it will be marked as succeeded, but no MSIX package can be found.

To Reproduce

  1. Clone the project
  2. Set a build task with the parameters in the screenshot.
  3. Run the pipeline.

Expected behavior In general i'm expecting the produce of a MSIX package, or a failed status.

Screenshots image

Platform Windows

Additional context

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe D:\a\1\s\JobApplicationManager.sln “/p:Platform=any cpu” /p:Configuration=release /p:UapAppxPackageBuildMode=StoreAndSideload /p:AppxPackageSigningEnabled=false /p:AppxBundle=Never /p:AppxPackageOutput=D:\a\1\a\JobApplicationManager.msix Microsoft ® Build Engine version 4.8.9037.0 [Microsoft .NET Framework, version 4.0.30319.42000] Copyright © Microsoft Corporation. All rights reserved.

Building the projects in this solution one at a time. To enable parallel build, please add the “/m” switch. Build started 1/2/2024 6:14:22 PM. Project “D:\a\1\s\JobApplicationManager.sln” on node 1 (default targets). ValidateSolutionConfiguration: Building solution configuration “release|any cpu”. Project “D:\a\1\s\JobApplicationManager.sln” (1) is building “D:\a\1\s\JobApplicationManager\JobApplicationManager.csproj.metaproj” (2) on node 1 (default targets). D:\a\1\s\JobApplicationManager\JobApplicationManager.csproj.metaproj : warning MSB4078: The project file “JobApplicationManager\JobApplicationManager.csproj” is not supported by MSBuild and cannot be built. Done Building Project “D:\a\1\s\JobApplicationManager\JobApplicationManager.csproj.metaproj” (default targets). Project “D:\a\1\s\JobApplicationManager.sln” (1) is building “D:\a\1\s\JobApplicationManager.Tests\JobApplicationManager.Tests.csproj.metaproj” (3) on node 1 (default targets). D:\a\1\s\JobApplicationManager.Tests\JobApplicationManager.Tests.csproj.metaproj : warning MSB4078: The project file “JobApplicationManager.Tests\JobApplicationManager.Tests.csproj” is not supported by MSBuild and cannot be built. Done Building Project “D:\a\1\s\JobApplicationManager.Tests\JobApplicationManager.Tests.csproj.metaproj” (default targets). Done Building Project “D:\a\1\s\JobApplicationManager.sln” (default targets).

Build succeeded.

“D:\a\1\s\JobApplicationManager.sln” (default target) (1) -> “D:\a\1\s\JobApplicationManager\JobApplicationManager.csproj.metaproj” (default target) (2) -> (Build target) -> D:\a\1\s\JobApplicationManager\JobApplicationManager.csproj.metaproj : warning MSB4078: The project file “JobApplicationManager\JobApplicationManager.csproj” is not supported by MSBuild and cannot be built.

“D:\a\1\s\JobApplicationManager.sln” (default target) (1) -> “D:\a\1\s\JobApplicationManager.Tests\JobApplicationManager.Tests.csproj.metaproj” (default target) (3) -> D:\a\1\s\JobApplicationManager.Tests\JobApplicationManager.Tests.csproj.metaproj : warning MSB4078: The project file “JobApplicationManager.Tests\JobApplicationManager.Tests.csproj” is not supported by MSBuild and cannot be built.

2 Warning(s) 0 Error(s)

Time Elapsed 00:00:01.55

So i'm confused. On the one side the project is build correctly, and on the other side not. And i don't know, how i can fix it.

bserrano-aldelis commented 3 months ago

Hi

Same problem here. In my case, I have a WinUI 3 application and my pipeline can't generate msix package through MsixPackaging@1 task. The logs shows 0 warnings and 0 errors and the pipeline finishes OK, but no msix package is generated.

florelis commented 3 months ago

Does your solution include a Windows Application Packaging Project?

This project defines how the package is to be generated, and is what the packaging task uses to drive its work. Behind the scenes, the task is simply calling MSBuild with the appropriate parameters that you could be setting on your own. But if the WAP project is not present, there won't be anything to handle these parameters. That is why there is no generated package or any error. See also #586

bserrano-aldelis commented 3 months ago

So, for a WinUI 3 application, creating a separate WAP project is still mandatory to make MSIX packages in Azure Pipelines?. Here you can read for this kind of project you can set just one project to make MSIX packages. There is no way to set in the pipeline the reference to the WinUI 3 project as a WAP?. Im setting the manifest file of my WinUI 3 app in the pipeline task:

bserrano-aldelis commented 3 months ago

Also I tried with GitHub Actions, following this guide, which starts with a single-project MSIX WinUI 3 project, like mine, but no luck. Exactly the same behavior: 0 errors, 0 warnings and 0 packages generated.

bserrano-aldelis commented 3 months ago

Ok, after lots of hours of research, here are my conclusions:

So for now, we'll start manually creating appinstallers without automatic CI/CD :-(

saigkill commented 3 months ago

Does your solution include a Windows Application Packaging Project?

In genral it is a MAUI Project. Inside platforms/Windows/ the projecttemplate has already:

Maybe the Task don't looks inside that location? Do i need the WAP Project additional?