Update implicit global namespace support for WPF (#4963)
This commit is contained in:
Родитель
a1107e9a7a
Коммит
1e17fc97e7
|
@ -0,0 +1,13 @@
|
|||
<Project>
|
||||
<!--
|
||||
Generates implicit global namespace imports file <projectname>.ImplicitGlobalNamespaceImports.cs.
|
||||
-->
|
||||
<ItemGroup Condition="'$(DisableImplicitNamespaceImports_WPF)' != 'true'
|
||||
and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
|
||||
and $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '6.0'))
|
||||
and '$(UseWPF)' == 'true'">
|
||||
<Import Remove="System.IO" />
|
||||
<Import Remove="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,7 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<DisableImplicitNamespaceImports_WPF Condition="'$(DisableImplicitNamespaceImports_WPF)' == ''
|
||||
and '$(DisableImplicitNamespaceImports)' != 'true'">false</DisableImplicitNamespaceImports_WPF>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
|
@ -168,4 +168,6 @@
|
|||
-->
|
||||
<Import Project="Microsoft.NET.Sdk.WindowsDesktop.WindowsForms.props" />
|
||||
|
||||
<Import Project="Microsoft.NET.Sdk.WindowsDesktop.WPF.props" />
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -152,9 +152,6 @@
|
|||
<NetSdkWarning ResourceName="WindowsDesktopFrameworkRequiresVersion30" />
|
||||
</Target>
|
||||
|
||||
<!-- Import WPF Build logic only when we don't import NETFX's WinFX targets -->
|
||||
<Import Project="Microsoft.WinFX.targets" Condition="'$(ImportFrameworkWinFXTargets)' != 'true'"/>
|
||||
|
||||
<!--
|
||||
Import Windows Forms targets.
|
||||
These come via the Windows Forms transport package, that can be found under
|
||||
|
@ -162,4 +159,10 @@
|
|||
-->
|
||||
<Import Project="Microsoft.NET.Sdk.WindowsDesktop.WindowsForms.targets" Condition="'$(UseWindowsForms)' == 'true'"/>
|
||||
|
||||
<!-- Import WPF-specific targets -->
|
||||
<Import Project="Microsoft.NET.Sdk.WindowsDesktop.WPF.targets" Condition="'$(UseWPF)' == 'true'"/>
|
||||
|
||||
<!-- Import WPF Build logic only when we don't import NETFX's WinFX targets -->
|
||||
<Import Project="Microsoft.WinFX.targets" Condition="'$(ImportFrameworkWinFXTargets)' != 'true'"/>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
<AlwaysCompileMarkupFilesInSeparateDomain Condition="'$(AlwaysCompileMarkupFilesInSeparateDomain)' == '' ">true</AlwaysCompileMarkupFilesInSeparateDomain>
|
||||
<LocalizationDirectivesToLocFile Condition="'$(LocalizationDirectivesToLocFile)' == ''">None</LocalizationDirectivesToLocFile>
|
||||
|
||||
<!-- Disable implicit namespace imports for WPF. This should be removed after support is added in .NET 6.0 rc 1. -->
|
||||
<DisableImplicitNamespaceImports Condition="'$(DisableImplicitNamespaceImports)' != 'false' and '$(UseWPF)' == 'true'">true</DisableImplicitNamespaceImports>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Some Default Settings -->
|
||||
|
|
Загрузка…
Ссылка в новой задаче