Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 00b2a85

Browse files
sepidehkhdanmoseley
authored andcommitted
Add nice messages for assemblies with autogenerated PNSE (#19506)
* Add nice messages for assemblies with autogenerated PNSE * Fix failing builds * Apply feedback * Temporary workaround for Microsoft.Win32.Registry which needs using System statement * Add new resource files * Temporary workaround for System.Security.Cryptography.Cng which needs using System statement on Unix platforms * Update BuildTools version and use resource strings for all PNSE messages * Fix builds * Fix typo
1 parent b92843e commit 00b2a85

File tree

42 files changed

+285
-39
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+285
-39
lines changed

BuildToolsVersion.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.0-prerelease-01609-03
1+
2.0.0-prerelease-01610-01

src/Microsoft.Win32.Registry.AccessControl/src/Microsoft.Win32.Registry.AccessControl.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<AssemblyName>Microsoft.Win32.Registry.AccessControl</AssemblyName>
66
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
77
<ResourcesSourceOutputDirectory Condition="'$(TargetGroup)' == 'netfx'">None</ResourcesSourceOutputDirectory>
8-
<GeneratePlatformNotSupportedAssembly Condition="'$(TargetsWindows)' != 'true'">true</GeneratePlatformNotSupportedAssembly>
8+
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_RegistryAccessControl</GeneratePlatformNotSupportedAssemblyMessage>
99
<ProjectGuid>{0E23F29E-6BB0-4B94-A5DA-B5E50601E0F2}</ProjectGuid>
1010
</PropertyGroup>
1111
<!-- Help VS understand available configurations -->
@@ -22,6 +22,9 @@
2222
<Reference Include="Microsoft.Win32.Registry" />
2323
<Reference Include="System.Security.AccessControl" />
2424
</ItemGroup>
25+
<ItemGroup Condition="'$(TargetsWindows)' != 'true'">
26+
<Reference Include="System.Resources.ResourceManager" />
27+
</ItemGroup>
2528
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
2629
<Compile Include="Microsoft\Win32\RegistryAclExtensions.cs" />
2730
</ItemGroup>
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<root>
3+
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
4+
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
5+
<xsd:element name="root" msdata:IsDataSet="true">
6+
<xsd:complexType>
7+
<xsd:choice maxOccurs="unbounded">
8+
<xsd:element name="metadata">
9+
<xsd:complexType>
10+
<xsd:sequence>
11+
<xsd:element name="value" type="xsd:string" minOccurs="0" />
12+
</xsd:sequence>
13+
<xsd:attribute name="name" use="required" type="xsd:string" />
14+
<xsd:attribute name="type" type="xsd:string" />
15+
<xsd:attribute name="mimetype" type="xsd:string" />
16+
<xsd:attribute ref="xml:space" />
17+
</xsd:complexType>
18+
</xsd:element>
19+
<xsd:element name="assembly">
20+
<xsd:complexType>
21+
<xsd:attribute name="alias" type="xsd:string" />
22+
<xsd:attribute name="name" type="xsd:string" />
23+
</xsd:complexType>
24+
</xsd:element>
25+
<xsd:element name="data">
26+
<xsd:complexType>
27+
<xsd:sequence>
28+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
29+
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
30+
</xsd:sequence>
31+
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
32+
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
33+
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
34+
<xsd:attribute ref="xml:space" />
35+
</xsd:complexType>
36+
</xsd:element>
37+
<xsd:element name="resheader">
38+
<xsd:complexType>
39+
<xsd:sequence>
40+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
41+
</xsd:sequence>
42+
<xsd:attribute name="name" type="xsd:string" use="required" />
43+
</xsd:complexType>
44+
</xsd:element>
45+
</xsd:choice>
46+
</xsd:complexType>
47+
</xsd:element>
48+
</xsd:schema>
49+
<resheader name="resmimetype">
50+
<value>text/microsoft-resx</value>
51+
</resheader>
52+
<resheader name="version">
53+
<value>2.0</value>
54+
</resheader>
55+
<resheader name="reader">
56+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
57+
</resheader>
58+
<resheader name="writer">
59+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
60+
</resheader>
61+
<data name="PlatformNotSupported_RegistryAccessControl" xml:space="preserve">
62+
<value>Access Control List (ACL) APIs are specific to the way in which Windows manages access to resources, and are not supported on this platform.</value>
63+
</data>
64+
</root>

src/Microsoft.Win32.Registry/src/Microsoft.Win32.Registry.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
99
<DefineConstants>$(DefineConstants);REGISTRY_ASSEMBLY</DefineConstants>
1010
<IsPartialFacadeAssembly Condition="'$(TargetGroup)' == 'netfx'">true</IsPartialFacadeAssembly>
11-
<GeneratePlatformNotSupportedAssembly Condition="'$(TargetGroup)' == 'netstandard'">true</GeneratePlatformNotSupportedAssembly>
11+
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetGroup)' == 'netstandard'">SR.PlatformNotSupported_Registry</GeneratePlatformNotSupportedAssemblyMessage>
1212
<!--
1313
Temporarily necessary as this is only being built for UWP due to an unwanted dependency on it
1414
https://github.com/dotnet/corefx/issues/15966

src/System.Data.SqlClient/src/Resources/Strings.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,4 +1042,7 @@
10421042
<data name="LocalDBNotSupported" xml:space="preserve">
10431043
<value>LocalDB is not supported on this Platform.</value>
10441044
</data>
1045+
<data name="PlatformNotSupported_DataSqlClient" xml:space="preserve">
1046+
<value>System.Data.SqlClient is not supported on this platform.</value>
1047+
</data>
10451048
</root>

src/System.Data.SqlClient/src/System.Data.SqlClient.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<!-- Although we have a NS configuration, we know we use API that's not currently whitelisted: just validate against OneCore -->
99
<UWPCompatible>false</UWPCompatible>
1010
<IsPartialFacadeAssembly Condition="'$(TargetGroup)' == 'netfx'">true</IsPartialFacadeAssembly>
11-
<GeneratePlatformNotSupportedAssembly Condition="'$(OSGroup)' == 'AnyOS'">true</GeneratePlatformNotSupportedAssembly>
11+
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(OSGroup)' == 'AnyOS'">SR.PlatformNotSupported_DataSqlClient</GeneratePlatformNotSupportedAssemblyMessage>
1212
<AssemblyVersion Condition="'$(TargetGroup)' == 'netstandard1.2'">4.0.0.0</AssemblyVersion>
1313
<AssemblyVersion Condition="'$(TargetGroup)' == 'netstandard1.3'">4.1.0.0</AssemblyVersion>
1414
</PropertyGroup>
@@ -27,7 +27,7 @@
2727
<ItemGroup Condition="'$(TargetGroup)' == 'netstandard'">
2828
<Compile Include="System.Data.SqlClient.TypeForwards.cs" />
2929
</ItemGroup>
30-
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true' AND '$(GeneratePlatformNotSupportedAssembly)' != 'true'">
30+
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true' AND '$(OSGroup)' != 'AnyOS'">
3131
<Compile Include="Microsoft\SqlServer\Server\ITypedGetters.cs" />
3232
<Compile Include="Microsoft\SqlServer\Server\ITypedGettersV3.cs" />
3333
<Compile Include="Microsoft\SqlServer\Server\ITypedSetters.cs" />
@@ -286,7 +286,7 @@
286286
</Compile>
287287
</ItemGroup>
288288
<!-- Common (Windows and Unix) dependencies for MANAGED_SNI build -->
289-
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true' AND '$(GeneratePlatformNotSupportedAssembly)' != 'true'">
289+
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true' AND '$(OSGroup)' != 'AnyOS'">
290290
<Compile Include="$(CommonPath)\System\Net\ContextFlagsPal.cs">
291291
<Link>Common\System\Net\ContextFlagsPal.cs</Link>
292292
</Compile>
@@ -318,7 +318,7 @@
318318
<Link>Common\System\Net\NegotiationInfoClass.cs</Link>
319319
</Compile>
320320
</ItemGroup>
321-
<ItemGroup Condition=" '$(TargetsWindows)' != 'true' And '$(IsPartialFacadeAssembly)' != 'true' AND '$(GeneratePlatformNotSupportedAssembly)' != 'true'">
321+
<ItemGroup Condition=" '$(TargetsWindows)' != 'true' And '$(IsPartialFacadeAssembly)' != 'true' AND '$(OSGroup)' != 'AnyOS'">
322322
<Compile Include="System\Data\ProviderBase\DbConnectionPoolIdentity.Unix.cs" />
323323
<Compile Include="Interop\SNINativeMethodWrapper.Unix.cs" />
324324
<Compile Include="$(CommonPath)\System\Net\Security\NegotiateStreamPal.Unix.cs">
@@ -371,7 +371,7 @@
371371
<Reference Include="System.Threading.Tasks" />
372372
<Reference Include="System.Xml.ReaderWriter" />
373373
</ItemGroup>
374-
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true' AND '$(GeneratePlatformNotSupportedAssembly)' != 'true' ">
374+
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true' AND '$(OSGroup)' != 'AnyOS'">
375375
<Reference Include="Microsoft.Win32.Primitives" />
376376
<Reference Include="System.Collections" />
377377
<Reference Include="System.Collections.Concurrent" />

src/System.IO.FileSystem.AccessControl/src/Resources/Strings.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,7 @@
8282
<data name="ObjectDisposed_FileClosed" xml:space="preserve">
8383
<value>Cannot access a closed file.</value>
8484
</data>
85+
<data name="PlatformNotSupported_AccessControl" xml:space="preserve">
86+
<value>Access Control List (ACL) APIs are part of resource management on Windows and are not supported on this platform.</value>
87+
</data>
8588
</root>

src/System.IO.FileSystem.AccessControl/src/System.IO.FileSystem.AccessControl.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<ProjectGuid>{D77FBA6C-1AA6-45A4-93E2-97A370672C53}</ProjectGuid>
1010
<AllowUnsafeBlocks Condition="'$(TargetGroup)'=='netcoreapp'">true</AllowUnsafeBlocks>
1111
<IsPartialFacadeAssembly Condition="'$(TargetGroup)'=='netfx'">true</IsPartialFacadeAssembly>
12-
<GeneratePlatformNotSupportedAssembly Condition="'$(TargetsUnix)' == 'true' OR '$(TargetGroup)' == 'netstandard'">true</GeneratePlatformNotSupportedAssembly>
12+
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsUnix)' == 'true' OR '$(TargetGroup)' == 'netstandard'">SR.PlatformNotSupported_AccessControl</GeneratePlatformNotSupportedAssemblyMessage>
1313
</PropertyGroup>
1414
<!-- Default configurations to help VS understand the options -->
1515
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Unix-Debug|AnyCPU'" />

src/System.IO.Pipes.AccessControl/src/Resources/Strings.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,7 @@
7070
<data name="IO_IO_PipeBroken" xml:space="preserve">
7171
<value>Pipe is broken.</value>
7272
</data>
73+
<data name="PlatformNotSupported_AccessControl" xml:space="preserve">
74+
<value>Access Control List (ACL) APIs are part of resource management on Windows and are not supported on this platform.</value>
75+
</data>
7376
</root>

src/System.IO.Pipes.AccessControl/src/System.IO.Pipes.AccessControl.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<AssemblyName>System.IO.Pipes.AccessControl</AssemblyName>
66
<ProjectGuid>{40059634-BB03-4A6F-8657-CCE2D376BC8B}</ProjectGuid>
77
<AllowUnsafeBlocks Condition="'$(TargetGroup)'=='netstandard'">true</AllowUnsafeBlocks>
8-
<GeneratePlatformNotSupportedAssembly Condition="'$(TargetGroup)' == 'netstandard' AND '$(TargetsWindows)' != 'true'">true</GeneratePlatformNotSupportedAssembly>
8+
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetGroup)' == 'netstandard' AND '$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_AccessControl</GeneratePlatformNotSupportedAssemblyMessage>
99
<IsPartialFacadeAssembly Condition="'$(TargetGroup)'=='netfx'">true</IsPartialFacadeAssembly>
1010
</PropertyGroup>
1111
<!-- Default configurations to help VS understand the options -->

0 commit comments

Comments
 (0)