Skip to content

Commit f5f2e4f

Browse files
danmoseleyjoperezrViktorHoferericstjstephentoub
authored
[release/5.0] Backport System.Speech to compat pack (#46729)
* Port System.Speech to .NET Core (#45941) * Initial sources, with banners * Run the code formatter * Fix hang in XUnit due to failing to complete all AsyncOperation-s * Remove reflection over RegistryKey * Add ref and packaging * Add tests * Add sln * Fix CS1584 * Fix CA1823 * Fix CA1834 * Unnecessary suppressions * Fix SA1028 * Fix CA1507 * Fix CA1810 * Fix CA1825 * Fix CA1825 * Unnecessary suppressions * Fix CA1805 * Fix IDE0004 * Fix IDE0090 * Remove CAS * Remove tabs and dead code * Unnecessary suppressions * Fix SA1212 * Fix SA1121 * Disable SA1129 * Fix SA1206 * Fix SA1518 * Fix SA1617 * Fix SA1001 * Fix CS0618 * Remove unnecessary comments * Remove unnecessary whitespace * Remove low value xml doc comments * Unused usings * dead files * Remove CAS * More junk * Fix obvious original bug * Remove/insert newlines * Remove reference to old design document * Fix spacing * Fix typo name * Fix file casing * Remove dead code * Add to compat pack * Remove AppDomain etc * Fix casing of .NET * Remove low value XML docs * Remove code that relies on compiling assemblies * Fix inadvertently removed padding * Use EDI to preserve stack when rethrowing * Fix misaligned resource ID's to match sperror.h * Skip SpeechRecognitionEngine tests if no installed recognizers * Fix misformatted string bug * Logging for CI error * Fix NRE trying to map phonemes for voice for culture for which we do not have phoneme map * Fix 153 spelling errors in comments using `Visual Studio Spell Checker` * Remove extraneous file * Fix spacing * Fix project reference * Reorder properties in csproj * Change from netcoreapp2.0 to netcoreapp2.1 * Update src/libraries/System.Speech/pkg/System.Speech.pkgproj Co-authored-by: Jose Perez Rodriguez <[email protected]> * Add build error for targeting netcoreapp2.0 * Suppress new error during packaging testing * Update System.Speech.targets * Remove ref comments * Update pkgproj * Remove placeholder Co-authored-by: Jose Perez Rodriguez <[email protected]> Co-authored-by: Viktor Hofer <[email protected]> * Fix port * Disable some Speech tests on Server Core * Set PackageVersion in Directory.Build.props * Change packageIndex back to 5.0.0 * Don't rev the platforms package unless we ship it * Fix PKT * Add to libraries-packages.proj * Fix SAPI error code mappings (#46841) * Fix PKT * Fix SAPI errors * Disable test as appropriate * enable more tests to fail to get messages * reenable tests * Update src/libraries/System.Speech/tests/SpeechRecognizerTests.cs Co-authored-by: Stephen Toub <[email protected]> Co-authored-by: Stephen Toub <[email protected]> Co-authored-by: Jose Perez Rodriguez <[email protected]> Co-authored-by: Viktor Hofer <[email protected]> Co-authored-by: Eric StJohn <[email protected]> Co-authored-by: Stephen Toub <[email protected]> Co-authored-by: Anirudh Agnihotry <[email protected]>
1 parent c9e1648 commit f5f2e4f

File tree

203 files changed

+49430
-4
lines changed

Some content is hidden

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

203 files changed

+49430
-4
lines changed

src/libraries/Common/src/System/SR.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#nullable enable
55
using System.Resources;
6-
using System.Runtime.CompilerServices;
76

87
namespace System
98
{

src/libraries/System.Private.CoreLib/src/System/Runtime/Versioning/PlatformAttributes.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ public TargetPlatformAttribute(string platformName) : base(platformName)
6666
#else
6767
internal
6868
#endif
69-
sealed class SupportedOSPlatformAttribute : OSPlatformAttribute
69+
sealed class SupportedOSPlatformAttribute : OSPlatformAttribute
7070
{
71-
public SupportedOSPlatformAttribute (string platformName) : base(platformName)
71+
public SupportedOSPlatformAttribute(string platformName) : base(platformName)
7272
{
7373
}
7474
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project>
2+
<Import Project="..\Directory.Build.props" />
3+
<PropertyGroup>
4+
<PackageVersion>5.0.0</PackageVersion>
5+
<!-- this assembly is inbox in desktop, do not version it unless you
6+
plan on shipping a new desktop version out of band. Instead add API
7+
to a different assembly. -->
8+
<AssemblyVersion>4.0.0.0</AssemblyVersion>
9+
<StrongNameKeyId>MicrosoftShared</StrongNameKeyId>
10+
<IsWindowsSpecific>true</IsWindowsSpecific>
11+
</PropertyGroup>
12+
</Project>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30709.18
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Speech", "src\System.Speech.csproj", "{D6377882-BD90-46D6-AC60-83498E4BA2B3}"
7+
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Speech.Tests", "tests\System.Speech.Tests.csproj", "{E26B6065-4016-4385-9AB2-EEBE2C97CEE7}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|Any CPU = Debug|Any CPU
13+
Release|Any CPU = Release|Any CPU
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{D6377882-BD90-46D6-AC60-83498E4BA2B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17+
{D6377882-BD90-46D6-AC60-83498E4BA2B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
18+
{D6377882-BD90-46D6-AC60-83498E4BA2B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
19+
{D6377882-BD90-46D6-AC60-83498E4BA2B3}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{E26B6065-4016-4385-9AB2-EEBE2C97CEE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{E26B6065-4016-4385-9AB2-EEBE2C97CEE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{E26B6065-4016-4385-9AB2-EEBE2C97CEE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{E26B6065-4016-4385-9AB2-EEBE2C97CEE7}.Release|Any CPU.Build.0 = Release|Any CPU
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {5BD9DF41-48EC-4FB8-998D-122857C5CA73}
30+
EndGlobalSection
31+
EndGlobal
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<Project DefaultTargets="Build">
2+
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
3+
<ItemGroup>
4+
<ProjectReference Include="..\ref\System.Speech.csproj">
5+
<SupportedFramework>netcoreapp2.0;net45;uap10.0.16299;$(AllXamarinFrameworks)</SupportedFramework>
6+
</ProjectReference>
7+
<ProjectReference Include="..\src\System.Speech.csproj" />
8+
<InboxOnTargetFramework Include="net45">
9+
<AsFrameworkReference>true</AsFrameworkReference>
10+
</InboxOnTargetFramework>
11+
<PackageFile Include=".\build\System.Speech.targets">
12+
<TargetPath>build\netcoreapp2.0\</TargetPath>
13+
</PackageFile>
14+
</ItemGroup>
15+
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
16+
</Project>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Project InitialTargets="_ValidateSystemSpeechNotNetCoreApp20">
2+
<Target Name="_ValidateSystemSpeechNotNetCoreApp20"
3+
Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(TargetFrameworkVersion)' == 'v2.0'">
4+
<Error Condition="'$(SuppressTfmSupportBuildWarnings)' == ''"
5+
Code="SYSLIB9000" Text="System.Speech doesn't support netcoreapp2.0. Consider updating your TargetFramework to netcoreapp2.1 or later." />
6+
</Target>
7+
</Project>

src/libraries/System.Speech/ref/System.Speech.cs

Lines changed: 1157 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFrameworks>netstandard2.0</TargetFrameworks>
4+
</PropertyGroup>
5+
<ItemGroup>
6+
<Compile Include="System.Speech.cs" />
7+
</ItemGroup>
8+
</Project>

0 commit comments

Comments
 (0)