3

Context:

I have a MAUI app I have been working on which, for now, only has Windows listed as a TargetFramework in the project file. Until VS2022 17.4 arrived I was able to build and publish this using a publish profile (pubxml) file.

The problem:

Now that 17.4 has dropped, trying to publish the application fails because it no longer uses the pubxml file unless you have more than one platform specified in the TargetFrameworks. I can still publish the app via the command line using -r win10-x64 instead of -a x64 but am completely unable to publish without at least adding android as a TF.

Has anyone else seen this and found a better workaround?

STR:

Create a new MAUI app, enter the project file and remove the line specifying the non-Windows TFs, try to publish using gui.

DTynewydd
  • 310
  • 4
  • 10
  • You can refer to official doc about [Publish a .NET MAUI app for Windows](https://learn.microsoft.com/en-us/dotnet/maui/windows/deployment/publish-cli?view=net-maui-7.0), it could be helpful to you. – Jianwei Sun - MSFT Nov 23 '22 at 03:10
  • 1
    Thanks, I have spent quite a while on the official docs - was there a part of that page specifically you thought would be helpful? – DTynewydd Nov 24 '22 at 08:57
  • 1
    I'm having a similar issue, that compilation trick works for me also, but 17.4 broke a couple of things for me too. – Fritjof Berggren Nov 24 '22 at 16:37

0 Answers0