Skip to content

Commit 651bf8a

Browse files
committed
fixup! Add global usings and plumb through the WPF
1 parent cf4f888 commit 651bf8a

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

pkg/Microsoft.Private.Winforms/sdk/dotnet-wpf/System.Windows.Forms.GlobalUsings.props

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,25 @@
66
-->
77

88
<Project>
9-
10-
<ItemGroup Condition=" '$(UseWindowsForms)' == 'true' ">
11-
<!--
12-
SDK defines the following global usings:
13-
* System
14-
* System.Collections.Generic
15-
* System.Linq
16-
* System.Threading.Tasks
9+
<!--
10+
============================================================
11+
GenerateImplicitNamespaceImports
12+
Generates implicit namespace imports source to intermediate directory for C# projects
13+
============================================================
1714
-->
15+
<PropertyGroup>
16+
<DisableImplicitNamespaceImports_WindowsForms
17+
Condition="'$(DisableImplicitNamespaceImports_WindowsForms)' == '' and '$(DisableImplicitNamespaceImports)' != 'true'">false</DisableImplicitNamespaceImports_WindowsForms>
18+
</PropertyGroup>
19+
20+
<ItemGroup Condition=" '$(DisableImplicitNamespaceImports_DotNet)' != 'true'
21+
and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
22+
and $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '6.0'))
23+
and '$(UseWindowsForms)' == 'true'">
24+
<Import Include="System" />
25+
<Import Include="System.Collections.Generic" />
26+
<Import Include="System.IO" />
27+
<Import Include="System.Linq" />
1828
<Import Include="System.Drawing" />
1929
<Import Include="System.Windows.Forms" />
2030
</ItemGroup>

0 commit comments

Comments
 (0)