Commit Graph
35 Commits
Author SHA1 Message Date
Elinor Fung 8193214f08 Use GeneratedDllImport in Microsoft.Extensions.Hosting.WindowsServices, System.Drawing.Primitives, System.Management, System.Security.Cryptography.ProtectedData, System.Speech, System.Windows.Extensions (#61949) 2021-11-23 00:10:45 -07:00
Elinor Fung a508fb574c [DllImportGenerator] Enable on projects without System.Memory and System.Runtime.CompilerServices.Unsafe (#61704) 2021-11-17 09:12:15 -07:00
Andrii Kurdiumov 072e8761df Improve System.Speech trimmability (#61566)
by removing obvious warnings
2021-11-15 12:50:53 -07:00
Viktor Hofer 0964be0ae9 Update slngen and solution files (#60871)
Update slngen tooling to latest stable version and solution files since
a lot changed since the last time they were updated:
- NET7 (removal of older TFMs)
- Source Generators
2021-10-26 21:23:54 +02:00
Alexander Radchenko 5cd1454bfb Fixed  SampleSynthesisTests.OtherTests.PromptBuilder test (#59524) 2021-10-01 09:38:40 -06:00
Alexander RadchenkoandDan Moseley 0d05e3eda4 Add checking SpeechRecognitionEngine Culture to GrammarBuilder test (#59516)
* Add checking SpeechRecognitionEngine Culture to GrammarBuilder test.

* Update GrammarTests.cs

Co-authored-by: Dan Moseley <[email protected]>
2021-09-27 13:24:18 -06:00
Viktor Hofer 67354a2fb4 Upgrade to net7.0 and remove target frameworks (#58011)
* Remove EOL tfms and upgrade to net7.0

* Make linker tests net7 aware

Make installer tests run on net7.0

Don't attempt to use live apphost

Fix payloads

Regenerate test files

Fix package testing
2021-09-08 22:04:23 +02:00
Viktor Hofer 36b6247cc7 Update solution files for correct ordering of elements (#58655)
With the newest udpate of slngen, the order of elements (configuration, folders, etc.) is in sync with how Visual Studio arranges them.
Also the order is now deterministic.

Based on that, updating all solution files to have the correct ordering of elements. This change also unblocks adding CI protection for
making sure that solution files are up-to-date in regards to their dependencies as slngen is now generating the files deterministically.
2021-09-04 00:16:15 +02:00
Viktor HoferandSantiago Fernandez Madero 4d82932722 Automatically generate .NETStandard compat errors (#57057)
* Automatically generate .NETStandard compat errors

Before this change, a project had to explicitly add a
NETStandardCompatError item to declare that a given tfm range
shouldn't be supported when packaging.

Automate this logic so that projects don't need to specify the item
themselves anymore. Instead condition the NETStandardCompatError target
calcuation logic on the existence of both a .NETStandard and a
.NETCoreApp tfm.

* Update Directory.Build.targets

* Update packaging.targets

* Update eng/packaging.targets

Co-authored-by: Santiago Fernandez Madero <[email protected]>

Co-authored-by: Santiago Fernandez Madero <[email protected]>
2021-08-10 07:19:06 +02:00
Viktor Hofer 503ae5145a Replace all remaining pkgprojs with NuGet Pack task (#56712)
* Runtime specific and doc file packaging fixes

* Replace all remaining pkgprojs with NuGet Pack task

* Avoid NuGet/Home/issues/10368

* Update PackageValidation package to latest
2021-08-05 11:03:23 +02:00
Viktor Hofer a6b9a63f35 Update libraries solution and NuGet.config files (#56430)
* Update slngen and invocation

* Update NuGet.config files

* Update solution files with slngen
2021-07-28 18:44:17 +02:00
Stephen Toub dfd618dc64 Use interpolated strings in more places 2021-07-13 10:11:51 -04:00
Viktor Hofer b056b7b6a1 Add NetCoreAppCurrent configuration to libs (Phase 1) (#54544)
* Use property to indicate NetCoreApp min version

* Add NetCoreAppCurrent to S.Numerics.Tensors

* Add NetCoreAppCurrent to S.T.AccessControl

* Add NetCoreAppCurrent to System.Memory.Data

* Add NetCoreAppCurrent to S.Composition.* projects

* Add NetCoreAppCurrent to System.IO.Packaging

* Add NetCoreAppCurrent config to System.IO.Ports

Adding a NetCoreAppCurrent configuration to System.IO.Ports and
reducing package size, build times and platform specific assets by
using runtime checks on Unix derivates for the slightly diverging
SerialPort implementation.

Contributes to https://github.com/dotnet/runtime/issues/54012

* Add NetCoreAppCurrent to System.Data.OleDb

* Add NetCoreAppCurrent to M.W32.Registry.AccessControl

* Add NetCoreAppCurrent to S.Reflection.Context

* Add NetCoreAppCurrent to S.C.Composition.Registration

* Add NetCoreAppCurrent to S.Resources.Extensions

* Add NetCoreAppCurrent to S.N.H.WinHttpHandler
2021-06-29 22:15:47 +02:00
Stephen ToubandViktor Hofer cd0b3ef669 Update NetAnalyzers version (#54511)
* Update NetAnalyzers version

* Add NetAnalyzers to dependency flow

Co-authored-by: Viktor Hofer <[email protected]>
2021-06-23 08:34:38 +02:00
Viktor Hofer 663c40dbc4 Expose missing references which are present in the runtime and in packages in the targeting pack (#54147)
* Expose missing refs from runtime in targeting pack

The platform analyzers warns for usages of APIs which aren't available
on specific platforms. Exposing the missing reference assemblies which
are already part of the runtime pack in the targeting pack.

The big benefit of doing so is that customers don't need to reference
the corresponding packages to target these APIs and that these five
packages can be dead-ended.

For more in-depth reasoning, see the detailed summary:
https://github.com/dotnet/runtime/issues/53892#issuecomment-858542280

Fixes https://github.com/dotnet/runtime/issues/53892

* Update dependents of dead-ended packages

Update depents by referencing the latest available package. Making sure
that packages are never used on NetCoreAppCurrent by applying
.NETCoreApp version conditions.

* Fixes

* Remove pkg validation suppression file

* Update Windows Compatibility pack

* Fix DirectoryServices pkg references

* Fix netfx Pkcs restore/build

* Fix version conflict

* Packageindex and nits

* nits
2021-06-15 19:32:15 +02:00
Viktor Hofer b90631f648 Add NetCoreAppCurrent config to where it's missing (#54215)
* Add NetCoreAppCurrent config to where it's missing

This is addressing the following scenarios in order:
- When there is a netcoreapp3.1 or net5.0 asset available in the lib,
  also add a NetCoreAppCurrent configuration to avoid PackageReferences
  to libraries that are inbox in net6.0 but not in previous .NetCoreApp
  versions. Examples are M.Win32.Registry which will be inbox soon.
- When there's a NetCoreAppCurrent config in the lib but not in the ref,
  add it there as well to always resolve the ref of the current version.
- When there are NetCoreAppCurrent rid specific configuration in the lib
  not a non-rid configuration, add one so that P2Ps from rid-less
  NetCoreAppCurrent configs in other projects, pick the
  NetCoreAppCurrent config from the lib and the ref.
2021-06-15 16:40:46 +02:00
Viktor HoferandBuyaa Namnan bbf96599d5 Don't reference the netstandard shim inside the shared framework (#53023)
* Don't reference ns.dll inside shared framework

The netstandard.dll shim shouldn't be referenced inside the shared
framework as it's a compat shim that shouldn't be required to compose
the shared framework.

This removes the necessity of a separate RefPath build and improves
incremental build times as only the few OOB projects that require the
shim would need to rebuild.

* Reference netstandard shim in OOBs that require it

There are a few OOB projects that require the netstandard.dll shim as
they intentionally reference projects that only expose a netstandard
configuration.

Co-authored-by: Buyaa Namnan <[email protected]>
2021-06-11 00:32:53 +02:00
Viktor Hofer 0377558d94 Include NetCoreAppCurrent configs in packages (#53439)
* Include NetCoreAppCurrent configs in packages

The NetCoreAppCurrent configurations were omitted from packages to avoid
ever growing packages. Now that we adhere to the support policy for
packages we don't need to exclude them anymore as the policy defines a
baseline for .NETCoreApp configurations.

This will remove an artificial difference when source building the
repository and also make it so that partner repositories which don't
depend on a transport package like windowsdesktop (winforms) receive
the very latest assets that are included in the shared framework as
well.

* Fix package validation for non exposed inbox libs
2021-06-08 23:36:01 +02:00
Stephen Toub 72ff0df463 Enable recently added Microsoft.CodeAnalysis.NetAnalyzers rules (#53158) 2021-05-28 14:46:46 -04:00
Viktor Hofer 4214222bc4 Upgrading netcoreapp2.x and NCA3.0 to netcoreapp3.1 (#53358)
Upgrading the netcoreapp2.x and netcoreapp3.0 build configurations in
projects to netcoreapp3.1 and cleaning up conditions so that future
tfm upgrades require less project file changes.

Adding NETStandardError markers to prevent available netstandard2.0
assets being picked instead, same as already done for System.Speech
and others.

For more details please see the reasoning in the linked issue.

Contributes to #53282
2021-05-28 13:11:03 +02:00
Viktor Hofer 5f66f8866c Remove netframework assets older than net461 from builds and packaging (#53319)
Only a very few number of projects still built for net45-net46.
This PR trims out these assets from the build which of course
results in them not being packaged (as there is no harvesting
mechanism in the repository present anymore).

Suppressing the package warnings for the intentionally dropped
assets and cleaning up conditions in the project file as well.

For more details please see the reasoning in the linked issue.

Contributes to #53282
2021-05-27 08:17:21 +02:00
Viktor Hofer 293d472861 Generate targets files that throws for unsupported netstandard applicable tfms (#53244)
* Generate targets files that throw for unsupported NS tfm

For S.D.Common, S.Speech and S.Sec.Crypto.Pkcs we manually added a
targets file to mark the .NETStandard asset as not applicable.
This was done to allow defining a minimum supported .NETCoreApp
version, even though a compatible .NETStandard asset is available.
This commit automatically generates that targets file based on
items.
2021-05-26 12:09:00 +02:00
Jose Perez Rodriguez d3a72e5164 Adding Infrastructure to run linker on OOB Assemblies by manually calling the Linker (#52272)
* Adding infrastructure to run the linker on OOB Assemblies manually

* Refactoring to abstract shared infrastructure

* Add OOB ignore list

* Address PR comments

* Rename properties so they don't intentionally get reused

* Addressing PR Feedback

* Addressing PR Feedback
2021-05-07 13:43:09 -07:00
Viktor Hofer d3c5a63db7 Avoid target for Speech in common path (#51925)
* Avoid target for Speech in common path
2021-04-28 00:04:29 +02:00
Jeff Handley c7e02f3773 Refactor build to use SupportedOSPlatforms instead of IsWindowsSpecific (#51450) 2021-04-19 21:52:12 -07:00
kronicandkronic 62170c1147 remove repetitions ';' (#50236)
Co-authored-by: kronic <[email protected]>
2021-03-25 20:59:08 -04:00
Viktor HoferandDan Moseley 4c2f931391 Fix casing of compile items in System.Speech and add CI protection (#50102)
* Fix casing of compile items in System.Speech and add CI protection

* Add CI protection for allconfigurations build Unix

Co-authored-by: Dan Moseley <[email protected]>
2021-03-23 21:12:11 +01:00
Stephen Toub 48679143aa Seal private classes in libraries (#49969) 2021-03-23 06:14:55 -04:00
Eric Erhardt f7de865465 Remove unnecessary references to System.ComponentModel.TypeConverter (#49068)
These references don't appear to be needed, so I removed them.
2021-03-03 16:45:11 -05:00
Dan Moseley c037f8e949 Adjust some naming (#47662) 2021-01-29 15:46:08 -08:00
Jeremy Koritzinsky 3cbdf4c57e Update SafeHandle types to have public parameterless constructors and add InitHandle API (#47189)
* Update public SafeHandle types to have public parameterless constructors.

Remove now-unneeded ILLink trim files.

Make public abstract SafeHandle constructors protected.

Remove comment on SafeWaitHandle

* Make SafeHandle constructors public for internal types.

Make internal abstract SafeHandle default constructors protected. Make non-abstract internal SafeHandles sealed when possible.

More internal SafeHandle types.

* Add new Marshal.InitHandle API.

Fix SetHandle accessibility

Fix test.

Use Marshal.InitHandle.

* PR feedback.

* Remove trailing whitespace.
2021-01-20 22:01:09 +00:00
Dan MoseleyandStephen Toub 430c07afa6 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]>
2021-01-12 11:38:07 -08:00
Johan Lorensson 0f5948fc18 Disable Speech Tests on Mono. (#46828)
Mono on netcore doesn't support COM wrappers that System.Speech depends
on. Disable System.Speech.Tests on Mono.
2021-01-11 23:27:13 +01:00
Dan Moseley c40ef745d1 Disable some Speech tests on Server Core (#46756) 2021-01-08 12:58:27 -08:00
1b1ff800da 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]>
2021-01-07 19:04:13 -08:00