Skip to content

Publishing an unpackaged Windows app fails by default #5881

@eerhardt

Description

@eerhardt

Description

Trying to publish an unpackaged Windows app raises an error that a AppxManifest is specified.

❯ dotnet publish -f net6.0-windows10.0.19041.0 -c Release -p:WindowsPackageType=None
Microsoft (R) Build Engine version 17.2.0-preview-22178-04+ce7523296 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  All projects are up-to-date for restore.
  You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
C:\Users\eerhardt\.nuget\packages\microsoft.windowsappsdk\1.0.2\buildTransitive\Microsoft.Build.Msix.Packaging.targets(
144,5): error : Improper project configuration: WindowsPackageType is set to None, but a AppxManifest is specified. [C:
\DotNetTest\MauiTest\MauiTest.csproj]

Steps to Reproduce

  1. dotnet new maui
  2. Temporary workaround to bring in the 1.0.2 windows sdk. Add the following to the .csproj:
	<ItemGroup>
	  <PackageReference Condition="$(TargetFramework.Contains('-windows'))"
	                    Include="microsoft.windowsappsdk"
						Version="1.0.2" />
	</ItemGroup>
  1. dotnet publish -f net6.0-windows10.0.19041.0 -c Release -p:WindowsPackageType=None

Version with bug

Unknown/Other (please specify)

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

All Windows

Did you find any workaround?

No response

Relevant log output

Microsoft (R) Build Engine version 17.2.0-preview-22178-04+ce7523296 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  All projects are up-to-date for restore.
  You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
C:\Users\eerhardt\.nuget\packages\microsoft.windowsappsdk\1.0.2\buildTransitive\Microsoft.Build.Msix.Packaging.targets(
144,5): error : Improper project configuration: WindowsPackageType is set to None, but a AppxManifest is specified. [C:
\DotNetTest\MauiTest\MauiTest.csproj]

cc @mattleibow

Metadata

Metadata

Assignees

Labels

area-publishingIssues with the app packaging/publishing process (ipk/apk/msix/trimming)fixed-in-6.0.300-rc.2Look for this fix in 6.0.300-rc.2!platform/windowss/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions