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

[Properties > Build Actions] options available depend on order of TargetFrameworks in .csproj - Cannot see all options at once - Only the first OS's options are shown #23523

Closed
jonmdev opened this issue Jul 10, 2024 · 7 comments
Labels
platform/android 🤖 platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 s/move-to-vs-feedback Tells automation to ask the person to use VS Feedback to report the issue s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@jonmdev
Copy link

jonmdev commented Jul 10, 2024

Description

When you build a default Maui project, it will create a line in the csproj file like:

<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>

However, the order of these affects the options if you right click on something > Properties > Build Actions.

Only the OS-specific options for the first one in the list are shown. For example if iOS is first, you will get an option like "ITunes Artwork" but not with Android first.

And all the Android options like "AndroidAsset" or "ProguardConfiguration" only show up if Android is first.

It took me hours today to try to add a ProguardConfiguration until I figured out this bug. I had no option for it.

Steps to Reproduce

  1. File > New > Maui Project
  2. Open csproj and change order of line: <TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
  3. Close and re-open project
  4. Right click anything > Properties > Build Actions and see that the special OS-specific options provided are only for the first entry in the list

Link to public reproduction project repository

n/a, default Maui Project

Version with bug

8.0.70 SR7

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows, macOS

Did you find any workaround?

None. If you need OS specific type, place it first in list. Bizarre.

@jonmdev jonmdev added the t/bug Something isn't working label Jul 10, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@Zhanglirong-Winnie Zhanglirong-Winnie added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 10, 2024
@Zhanglirong-Winnie
Copy link

This issue has been verified using Visual Studio 17.11.0 Preview 3.0(8.0.70). Can repro on all platforms.
image

@drasticactions
Copy link
Contributor

drasticactions commented Jul 10, 2024

I think this is all handled by Visual Studio tooling. I don't think MAUI UI itself influences what's shown in those menus (As in, if you have a multiple targeted project that doesn't implement MAUI UI or reference it, the same thing will happen). Unless I'm mistaken (@PureWeen?) I think this should be moved to VS Feedback.

Copy link
Contributor

Thanks for the issue report @jonmdev! This issue appears to be a problem with Visual Studio, so we ask that you use the VS feedback tool to report the issue. That way it will get to the routed to the team that owns this experience in VS.

If you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks.

  1. Go to the Visual Studio for Windows feedback tool or Visual Studio for Mac feedback tool to report the issue
  2. Close this bug, and consider adding a link to the VS Feedback issue so that others can follow its activity there.

Copy link
Contributor

Thanks for the issue report @jonmdev! This issue appears to be a problem with Visual Studio (Code), so we ask that you use the VS feedback tool to report the issue. That way it will get to the routed to the team that owns this experience in VS (Code).

If you encounter a problem with Visual Studio or the .NET MAUI VS Code Extension, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks.

  1. Go to the Visual Studio for Windows feedback tool or .NET MAUI VS Code Extension repository to report the issue
  2. Close this bug, and consider adding a link to the VS Feedback issue so that others can follow its activity there.

@jonmdev
Copy link
Author

jonmdev commented Jul 11, 2024

I do not see any easy way to report a Visual Studio problem so I will leave this up to Microsoft employees if they wish to report or fix it. At least it is now documented here if anyone wants to know why this behavior is happening.

For reference, this issue was previously reported in May 2023, which I found when I was initially trying to figure out this issue. However, that user seems to have gotten the nature of the problem slightly wrong:

https://developercommunity.visualstudio.com/t/MAUI-build-actions-such-as-AndroidResou/10374447?

They thought the issue was using net7.0-android33.0 instead of net7.0-android but if you look at their "working" version for Android, the main difference is again that they put Android first not last, suggesting this is the same issue and that was the actual "solution".

Thus I expect this bug has been present since at least that time or longer.

That report was closed by Microsoft with no action taken.

@drasticactions
Copy link
Contributor

I have reopened that feedback item and tried to direct it to the correct resources. Based on the internal ticket, it was being worked on but, at some point, was directed to the wrong team to look at and eventually closed due to the low feedback. To me, this feels like a general issue around multiple target frameworks in VS and how they are considered (With possible issues in the runtime as well), but they are most likely not MAUI specific, especially not something that could be addressed in this repo.

I would upvote that bug and direct your issues onto it. Sorry for the trouble.

@drasticactions drasticactions closed this as not planned Won't fix, can't repro, duplicate, stale Jul 11, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform/android 🤖 platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 s/move-to-vs-feedback Tells automation to ask the person to use VS Feedback to report the issue s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants