Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
saigkill opened this issue Jan 3, 2024 · 6 comments
Open

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

saigkill opened this issue Jan 3, 2024 · 6 comments
Labels
Area-MSIX ADO Issues related to MSIX and Azure DevOps, CI/CD Bug Something isn't working

Comments

@saigkill
Copy link

saigkill commented Jan 3, 2024

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.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue needs to be triaged by a member of the core team label Jan 3, 2024
@msftrubengu msftrubengu added Area-MSIX ADO Issues related to MSIX and Azure DevOps, CI/CD Bug Something isn't working and removed Needs-Triage Issue needs to be triaged by a member of the core team labels Feb 26, 2024
@bserrano-aldelis
Copy link

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
Copy link
Member

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
Copy link

bserrano-aldelis commented Mar 15, 2024

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:

  • task: MsixPackaging@1
    inputs:
    solution: '**/WinUI3App.sln'
    outputPath: '$(package)'
    clean: false
    generateBundle: false
    updateAppVersion: false
    buildConfiguration: 'release'
    buildPlatform: '$(buildPlatform)'
    manifestFile: '$(System.DefaultWorkingDirectory)\MyWinUI3App\Package.appxmanifest'
    appPackageDistributionMode: 'SideloadOnly'
    msbuildLocationMethod: 'version'
    msbuildVersion: 'latest'
    msbuildArchitecture: 'x64'

@bserrano-aldelis
Copy link

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
Copy link

bserrano-aldelis commented Mar 19, 2024

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

  • If you want to create a WinUI 3 application with net8, forget (for now) the idea to set CI/CD with Azure Pipelines or GitHub Actions. With a single csproj including msix packaging simply it won't work.

  • To set CI/CD with WinUI 3, you must use net6 and a separate project for the package (in Visual Studio, 'Blank App, Packaged with Windows Application Packaging Project'). But be aware that with this kind of project if you want to migrate to net8 its a true pain (i gived up after hours and hours of trying to solve warnings and errors).

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

@saigkill
Copy link
Author

Does your solution include a Windows Application Packaging Project?

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

  • app.manifest
  • Package.appxmanifest

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-MSIX ADO Issues related to MSIX and Azure DevOps, CI/CD Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants