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

Add single target build ProjectCapability #4791

Merged
merged 2 commits into from
Apr 19, 2022
Merged

Add single target build ProjectCapability #4791

merged 2 commits into from
Apr 19, 2022

Conversation

mattleibow
Copy link
Member

Description of Change

Add the capability to make use of new IDE features.

@mattleibow mattleibow added the area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer label Feb 18, 2022
@mattleibow mattleibow added this to the 6.0.300-preview.14 milestone Feb 18, 2022
@@ -104,6 +104,7 @@
<ProjectCapability Include="XamarinStaticLaunchProfiles" Condition=" '$(VisualStudioVersion)' != '' and '$(VisualStudioVersion)' &lt; '17.0' " />
<!-- Otherwise define LaunchProfilesGroupByPlatformFilters by default -->
<ProjectCapability Include="LaunchProfilesGroupByPlatformFilters" Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &gt;= '17.0' " />
<ProjectCapability Include="SingleTargetBuildForStartupProjects" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two questions:

  1. Did we test this works in the IDE? I worry that the capability won't be there, the way workloads work. It seems like the "outer" build doesn't load any workload MSBuild targets.
  2. Should we also put this in each platform workload? Like you could do a <TargetFrameworks>net6.0-android;net6.0-ios;net6.0-windows</TargetFrameworks> and not be using MAUI? Like a multi-targeted SkiaSharp app or something.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To test this try:

<ItemGroup>
  <ProjectCapability Include="DiagnoseCapabilities" />

And it should list them all in the solution tree.

https://www.vsixcookbook.com/tips/projects.html

@mattleibow mattleibow added the partner Issue or Request from a partner team label Feb 23, 2022
@mattleibow mattleibow marked this pull request as draft March 21, 2022 23:42
@Redth Redth requested a review from tmeschter April 18, 2022 18:34
@Redth
Copy link
Member

Redth commented Apr 18, 2022

@tmeschter is this something we should be doing still?

@tmeschter
Copy link
Contributor

Yes, we still need this capability for the feature to light up.

@mattleibow
Copy link
Member Author

Seems to work I think:

  • I see the capability in the IDE
  • I only see a single TFM build on run

image

@Redth
Copy link
Member

Redth commented Apr 19, 2022

@mattleibow can we add a condition to this to disable the include in case someone needs to back out of it?

@Redth
Copy link
Member

Redth commented Apr 19, 2022

I believe this setting needs to be on to do the right thing too?
image

@Redth Redth marked this pull request as ready for review April 19, 2022 15:50
@Redth Redth merged commit 0162958 into main Apr 19, 2022
@Redth Redth deleted the dev/single-target branch April 19, 2022 15:50
@tmeschter
Copy link
Contributor

Actually it's this setting:

image

Possibly we should consolidate both settings onto the "Build And Run" page.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer partner Issue or Request from a partner team
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants