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

VisualStudio Maui templates not working in release #12515

Closed
ZeProgFactory opened this issue Jan 9, 2023 · 5 comments
Closed

VisualStudio Maui templates not working in release #12515

ZeProgFactory opened this issue Jan 9, 2023 · 5 comments
Labels
area-templates Project templates, Item Templates for Blazor and MAUI platform/android 🤖 platform/windows 🪟 t/bug Something isn't working

Comments

@ZeProgFactory
Copy link
Contributor

Description

When trying to deploy Maui app in release mode:

error NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. When targeting .NET 6 or higher, make sure to restore packages with the PublishReadyToRun property set to true.

Debug - Android 12.1 - OK
Release - Android 12.1 - error
Debug - Windows - OK
Release - Windows - error

Would expect templates to build in release without debugging.

Steps to Reproduce

Using Microsoft Visual Studio Enterprise 2022 (64-bit) – Preview - Version 17.5.0 Preview 2.0:

  • Create Maui App (7.0)
  • Add Maui Lib
  • Add ‘Maui Lib’ Project Reference to Maui App

All settings to default values, no changes to the templates.

Link to public reproduction project repository

https://github.com/ZeProgFactory/NETSDK1094

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android, Windows, I was not able test on other platforms

Affected platform versions

Android 12.1

Did you find any workaround?

Cleanning and adding

<PublishReadyToRun>False</PublishReadyToRun>

in first PropertyGroup of app and lib project file solves the issue.

Relevant log output

No response

@ZeProgFactory ZeProgFactory added the t/bug Something isn't working label Jan 9, 2023
@jsuarezruiz jsuarezruiz added the area-templates Project templates, Item Templates for Blazor and MAUI label Jan 9, 2023
@jsuarezruiz
Copy link
Contributor

@jonathanpeppers Thoughts?

@jonathanpeppers
Copy link
Member

@jsuarezruiz wouldn't this be fixed by #12172?

@jfversluis
Copy link
Member

@ZeProgFactory can you try the workaround as specified here: #12114 (comment)

I think this is fixed but has not been released yet.

@ZeProgFactory
Copy link
Contributor Author

@ZeProgFactory can you try the workaround as specified here: #12114 (comment)

I think this is fixed but has not been released yet.

Hi Gerald @jfversluis I think it resembles to my workaround? Do you see any mayor differences?

@jfversluis
Copy link
Member

Ah sorry, overlooked that one. Then use that for now until the next update!

@ghost ghost locked as resolved and limited conversation to collaborators Feb 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-templates Project templates, Item Templates for Blazor and MAUI platform/android 🤖 platform/windows 🪟 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants