Skip to content

Commit 6345cb2

Browse files
authored
Add global usings and plumb through the WPF (#5183)
1 parent 3f63d5a commit 6345cb2

File tree

3 files changed

+64
-9
lines changed

3 files changed

+64
-9
lines changed

pkg/Microsoft.Private.Winforms/Microsoft.Private.Winforms.csproj

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,35 +58,42 @@
5858
<PackagePath></PackagePath>
5959
</None>
6060
</ItemGroup>
61+
62+
<ItemGroup>
63+
<None Include="sdk\dotnet-wpf\*">
64+
<Pack>True</Pack>
65+
<PackagePath>sdk\dotnet-wpf</PackagePath>
66+
</None>
67+
</ItemGroup>
6168

6269
<!-- Any projects referenced here will have their outputs automatically put into the package -->
6370
<!-- If you add a new csproj, and you want the outputs in the package, you must add it here -->
6471
<ItemGroup>
65-
<!-- Facade for System.Drawing include -->
72+
<!-- Facade for System.Drawing -->
6673
<ProjectReference Include="..\..\src\System.Drawing\src\System.Drawing.Facade.csproj" />
6774

68-
<!-- Facade for System.Design include -->
75+
<!-- Facade for System.Design -->
6976
<ProjectReference Include="..\..\src\System.Design\src\System.Design.Facade.csproj" />
7077

71-
<!-- Facade for System.Drawing.Design include -->
78+
<!-- Facade for System.Drawing.Design -->
7279
<ProjectReference Include="..\..\src\System.Drawing.Design\src\System.Drawing.Design.Facade.csproj" />
7380

74-
<!-- Reference and Source System.Windows.Forms includes -->
81+
<!-- Reference and Source System.Windows.Forms -->
7582
<ProjectReference Include="..\..\src\System.Windows.Forms\src\System.Windows.Forms.csproj" />
7683

77-
<!-- Reference and Source System.Windows.Forms.Primitives includes -->
84+
<!-- Reference and Source System.Windows.Forms.Primitives -->
7885
<ProjectReference Include="..\..\src\System.Windows.Forms.Primitives\src\System.Windows.Forms.Primitives.csproj" />
7986

80-
<!-- Reference and Source System.Windows.Forms.Design includes -->
87+
<!-- Reference and Source System.Windows.Forms.Design -->
8188
<ProjectReference Include="..\..\src\System.Windows.Forms.Design\src\System.Windows.Forms.Design.csproj" />
8289

83-
<!-- Facade for System.Windows.Forms.Design.Editors includes -->
90+
<!-- Facade for System.Windows.Forms.Design.Editors -->
8491
<ProjectReference Include="..\..\src\System.Windows.Forms.Design.Editors\src\System.Windows.Forms.Design.Editors.Facade3x.csproj" />
8592

86-
<!-- Facade for Microsoft.VisualBasic include -->
93+
<!-- Facade for Microsoft.VisualBasic -->
8794
<ProjectReference Include="..\..\src\Microsoft.VisualBasic\src\Microsoft.VisualBasic.Facade.csproj" />
8895

89-
<!-- Reference and Source Microsoft.VisualBasic.Forms includes -->
96+
<!-- Reference and Source Microsoft.VisualBasic.Forms -->
9097
<ProjectReference Include="..\..\src\Microsoft.VisualBasic.Forms\src\Microsoft.VisualBasic.Forms.vbproj" />
9198

9299
<ProjectReference Include="..\..\src\Accessibility\src\Accessibility.ilproj" />
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!--
2+
This props file comes from dotnet/winforms. It gets ingested by dotnet/wpf and processed by
3+
packaging/Microsoft.NET.Sdk.WindowsDesktop project.
4+
5+
It is referenced via Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props.
6+
-->
7+
8+
<Project>
9+
<!--
10+
============================================================
11+
GenerateImplicitNamespaceImports
12+
Generates implicit namespace imports source to intermediate directory for C# projects
13+
============================================================
14+
-->
15+
<ItemGroup Condition="'$(DisableImplicitNamespaceImports_WindowsForms)' != 'true'
16+
and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
17+
and $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '6.0'))
18+
and '$(UseWindowsForms)' == 'true'">
19+
<Import Include="System" />
20+
<Import Include="System.Collections.Generic" />
21+
<Import Include="System.IO" />
22+
<Import Include="System.Linq" />
23+
<Import Include="System.Drawing" />
24+
<Import Include="System.Windows.Forms" />
25+
</ItemGroup>
26+
27+
</Project>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!--
2+
This props file comes from dotnet/winforms. It gets ingested by dotnet/wpf and processed by
3+
packaging/Microsoft.NET.Sdk.WindowsDesktop project.
4+
5+
It is referenced via Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets.
6+
-->
7+
8+
<Project>
9+
<!--
10+
============================================================
11+
GenerateImplicitNamespaceImports
12+
Generates implicit namespace imports source to intermediate directory for C# projects
13+
============================================================
14+
-->
15+
<PropertyGroup>
16+
<DisableImplicitNamespaceImports_WindowsForms
17+
Condition="'$(DisableImplicitNamespaceImports_WindowsForms)' == ''
18+
and '$(DisableImplicitNamespaceImports)' != 'true'">false</DisableImplicitNamespaceImports_WindowsForms>
19+
</PropertyGroup>
20+
21+
</Project>

0 commit comments

Comments
 (0)