Skip to content

Commit 6ad9bc1

Browse files
authored
Merge pull request #19440 from unoplatform/dev/jela/single-startup-tfm
fix(vs): Use single TFM build feature from VS
2 parents b9a091e + e9b7e8d commit 6ad9bc1

File tree

4 files changed

+6
-33
lines changed

4 files changed

+6
-33
lines changed

build/nuget/uno.winui.single-project.targets

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@
118118
<ProjectCapability Include="XamarinStaticLaunchProfiles" Condition=" '$(VisualStudioVersion)' != '' and '$(VisualStudioVersion)' &lt; '17.0' " />
119119
<!-- Otherwise define LaunchProfilesGroupByPlatformFilters by default -->
120120
<ProjectCapability Include="LaunchProfilesGroupByPlatformFilters" Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &gt;= '17.0' " />
121-
<ProjectCapability Include="SingleTargetBuildForStartupProjects" Condition=" '$(EnableSingleTargetBuildForStartupProjects)' != 'false' " />
122121

123122
<ProjectCapability Include="UseMauiCore" />
124123

src/Uno.Sdk/Sdk/Sdk.props.buildschema.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,6 @@
131131
"description": "Disables removing the Microsoft.WindowsDesktop.App from the runtime configuration file in the output layout. Uno relies on loading WPF dynamically by searching for the WPF assemblies in the .NET SDK install folder.",
132132
"type": "bool"
133133
},
134-
"UnoDisableVSFilterTargetFrameworkWithDebuggerTarget": {
135-
"description": "Disables restricting the number of active target frameworks used when building a head project.",
136-
"type": "bool"
137-
},
138134
"DisableWinUI8857_Workaround": {
139135
"description": "Disables the WinUI workaround for issue 8857.",
140136
"helpUrl": "https://github.com/microsoft/microsoft-ui-xaml/issues/8857",

src/Uno.Sdk/targets/Uno.ProjectCapabilities.targets

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@
3030
<ProjectCapability Include="WindowsXamlResourceDictionary"/>
3131
<ProjectCapability Include="WindowsXamlUserControl"/>
3232
<ProjectCapability Include="WindowsUniversalMultiViews"/>
33+
34+
<!--
35+
Allow VS to start using a single TFM, instead of building all available TFMs when starting a debugging session
36+
Note that this capability must be defined on all TFMs to be effectively enabled.
37+
-->
38+
<ProjectCapability Include="SingleTargetBuildForStartupProjects" Condition=" '$(EnableSingleTargetBuildForStartupProjects)' != 'false' " />
3339
</ItemGroup>
3440

3541
<ItemGroup Condition=" '$(TargetFrameworks)' != '' AND ( $(TargetFrameworks.Contains('-ios')) OR $(TargetFrameworks.Contains('-android')) OR $(TargetFrameworks.Contains('-catalyst')) )">
Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,2 @@
11
<Project>
2-
3-
<Target Name="_UnoFilterTargetFrameworkWithDebuggerTarget"
4-
BeforeTargets="_SetBuildInnerTarget;_ComputeTargetFrameworkItems"
5-
Condition="
6-
'$(BuildingInsideVisualStudio)'=='true'
7-
AND '$(UnoDisableVSFilterTargetFrameworkWithDebuggerTarget)' != 'true'
8-
AND '$(IsImplicitlyTriggeredBuild)' == 'true'
9-
AND '$(IsUnoHead)' == 'true'
10-
AND '$(ExcludeRestorePackageImports)' != 'true' ">
11-
12-
<!--
13-
This target is used to restrict the number of active target frameworks used when
14-
building a head project. This current version uses $(_IsExecutable) in order to
15-
allow for faster builds with the uno.templates `Server` project.
16-
17-
Filtering on `IsImplicitlyTriggeredBuild` implies that this target will be
18-
executed only when the debugger command is used. An explicit build or rebuild
19-
on the project will perform a full build.
20-
21-
This will be enhanced in the future to support class libraries as well.
22-
-->
23-
24-
<PropertyGroup Condition=" '$(TargetFramework)'=='' AND '$(_SelectedTargetFramework)' != '' ">
25-
<TargetFramework>$(_SelectedTargetFramework)</TargetFramework>
26-
<TargetFrameworks>$(_SelectedTargetFramework)</TargetFrameworks>
27-
</PropertyGroup>
28-
</Target>
29-
302
</Project>

0 commit comments

Comments
 (0)