diff options
author | Santiago Fernandez Madero <safern@microsoft.com> | 2017-10-30 17:14:08 +0300 |
---|---|---|
committer | Stephen Toub <stoub@microsoft.com> | 2017-10-30 17:14:08 +0300 |
commit | 39566c3c02061db78c6068ed8310a55d4757866c (patch) | |
tree | 4f617cf8cd0012d2035acc7af411af74978e1629 /src | |
parent | ed3874a12ff4852c9621be20614f98b9eddefaed (diff) |
Fix DirectoryServices.Protocols packaging and configurations for compat pack (#24905)
* Fix DirectoryServices.Protocols packaging and configurations for compat
pack
* Set configurations to generate PNSE when target group is netstandard since net45 is inbox and we don't support uap
Diffstat (limited to 'src')
7 files changed, 39 insertions, 14 deletions
diff --git a/src/System.DirectoryServices.Protocols/src/Configurations.props b/src/System.DirectoryServices.Protocols/src/Configurations.props index ae7f026927..94ac07fdab 100644 --- a/src/System.DirectoryServices.Protocols/src/Configurations.props +++ b/src/System.DirectoryServices.Protocols/src/Configurations.props @@ -1,9 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> + <PackageConfigurations> + netstandard; + netcoreapp2.0-Windows_NT; + </PackageConfigurations> <BuildConfigurations> - netstandard-Windows_NT; - netstandard; + $(PackageConfigurations); + netcoreapp-Windows_NT; </BuildConfigurations> </PropertyGroup> </Project> diff --git a/src/System.DirectoryServices.Protocols/src/FxCopBaseline.AnyOS.cs b/src/System.DirectoryServices.Protocols/src/FxCopBaseline.AnyOS.cs deleted file mode 100644 index 8f8b8d9856..0000000000 --- a/src/System.DirectoryServices.Protocols/src/FxCopBaseline.AnyOS.cs +++ /dev/null @@ -1 +0,0 @@ -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA1821", Justification = "Finalizer has implementation in Windows version.")]
\ No newline at end of file diff --git a/src/System.DirectoryServices.Protocols/src/Resources/Strings.resx b/src/System.DirectoryServices.Protocols/src/Resources/Strings.resx index 528dff0664..6e3d8eab76 100644 --- a/src/System.DirectoryServices.Protocols/src/Resources/Strings.resx +++ b/src/System.DirectoryServices.Protocols/src/Resources/Strings.resx @@ -489,4 +489,7 @@ <data name="InvliadRequestType" xml:space="preserve"> <value>The specified request is not supported.</value> </data> + <data name="DirectoryServicesProtocols_PlatformNotSupported" xml:space="preserve"> + <value>System.DirectoryServices.Protocols is not supported on this platform.</value> + </data> </root>
\ No newline at end of file diff --git a/src/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj b/src/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj index 03773f23ed..f758cf426b 100644 --- a/src/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj +++ b/src/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj @@ -9,16 +9,15 @@ <!-- Although we have a netstandard configuration, we know we are not currently UAP compatible--> <UWPCompatible>false</UWPCompatible> <IncludeDllSafeSearchPathAttribute>true</IncludeDllSafeSearchPathAttribute> - <GeneratePlatformNotSupportedAssembly Condition="'$(TargetsWindows)' != 'true'">true</GeneratePlatformNotSupportedAssembly> + <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetGroup)' == 'netstandard'">SR.DirectoryServicesProtocols_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Windows_NT-Debug|AnyCPU'" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Windows_NT-Release|AnyCPU'" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp2.0-Windows_NT-Debug|AnyCPU'" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp2.0-Windows_NT-Release|AnyCPU'" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Windows_NT-Debug|AnyCPU'" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Windows_NT-Release|AnyCPU'" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Debug|AnyCPU'" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Release|AnyCPU'" /> - <ItemGroup Condition="'$(TargetsWindows)' != 'true'"> - <Compile Include="FxCopBaseline.AnyOS.cs" /> - </ItemGroup> - <ItemGroup Condition="'$(TargetsWindows)' == 'true'"> + <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'"> <Compile Include="System\DirectoryServices\Protocols\common\AuthTypes.cs" /> <Compile Include="System\DirectoryServices\Protocols\common\BerConverter.cs" /> <Compile Include="System\DirectoryServices\Protocols\common\DereferenceAlias.cs" /> @@ -51,5 +50,25 @@ <Reference Include="System.Security.Permissions" /> <Reference Include="System.Security.Principal.Windows" /> </ItemGroup> + <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'"> + <Reference Include="System.Collections" /> + <Reference Include="System.Collections.NonGeneric" /> + <Reference Include="System.Collections.Specialized" /> + <Reference Include="System.ComponentModel.TypeConverter" /> + <Reference Include="System.Diagnostics.Debug" /> + <Reference Include="System.Net.Primitives" /> + <Reference Include="System.Resources.ResourceManager" /> + <Reference Include="System.Runtime" /> + <Reference Include="System.Runtime.Extensions" /> + <Reference Include="System.Runtime.InteropServices" /> + <Reference Include="System.Security.Cryptography.X509Certificates" /> + <Reference Include="System.Text.Encoding.Extensions" /> + <Reference Include="System.Threading" /> + <Reference Include="System.Threading.Thread" /> + <Reference Include="System.Xml.ReaderWriter" /> + </ItemGroup> + <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'"> + <Reference Include="System.ComponentModel.Primitives" /> + </ItemGroup> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> </Project>
\ No newline at end of file diff --git a/src/System.DirectoryServices.Protocols/tests/Configurations.props b/src/System.DirectoryServices.Protocols/tests/Configurations.props index ed4061c7d6..d8cd9ec843 100644 --- a/src/System.DirectoryServices.Protocols/tests/Configurations.props +++ b/src/System.DirectoryServices.Protocols/tests/Configurations.props @@ -2,7 +2,7 @@ <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <BuildConfigurations> - netstandard-Windows_NT; + netcoreapp-Windows_NT; </BuildConfigurations> </PropertyGroup> </Project> diff --git a/src/System.DirectoryServices.Protocols/tests/SortRequestControlTests.cs b/src/System.DirectoryServices.Protocols/tests/SortRequestControlTests.cs index 485f60edfb..52407eef52 100644 --- a/src/System.DirectoryServices.Protocols/tests/SortRequestControlTests.cs +++ b/src/System.DirectoryServices.Protocols/tests/SortRequestControlTests.cs @@ -92,7 +92,7 @@ namespace System.DirectoryServices.Protocols.Tests } [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/21217", TargetFrameworkMonikers.UapAot)] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The field _keys in full framework is called keys, so GetField returns null and ends up in a NRE")] public void SortKeys_GetNull_ReturnsEmptyArray() { var control = new SortRequestControl(); diff --git a/src/System.DirectoryServices.Protocols/tests/System.DirectoryServices.Protocols.Tests.csproj b/src/System.DirectoryServices.Protocols/tests/System.DirectoryServices.Protocols.Tests.csproj index d537eef937..9d293444d1 100644 --- a/src/System.DirectoryServices.Protocols/tests/System.DirectoryServices.Protocols.Tests.csproj +++ b/src/System.DirectoryServices.Protocols/tests/System.DirectoryServices.Protocols.Tests.csproj @@ -4,8 +4,8 @@ <PropertyGroup> <ProjectGuid>{6638C675-CD62-408F-AB3B-AAFD8A906A96}</ProjectGuid> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Windows_NT-Debug|AnyCPU'" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Windows_NT-Release|AnyCPU'" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Windows_NT-Debug|AnyCPU'" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Windows_NT-Release|AnyCPU'" /> <ItemGroup> <Compile Include="BerConverterTests.cs" /> <Compile Include="LdapSessionOptionsTests.cs" /> |