Commit Graph
550 Commits
Author SHA1 Message Date
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
Viktor Hofer ceaa8ae8f7 Inline package descriptions and remove descriptions.json files across the repo (#46306)
* Support runtime package descriptions

* Update arcade Packaging pkg

* Inline pkg descriptions for coreclr

* Inline pkg descriptions for mono

* Inline pkg descriptions for installer

* Inline pkg descriptions for libraries
2020-12-22 16:07:56 +01:00
Anirudh AgnihotryandViktor Hofer 659c5fbc7f disable restore in vs for projects targeting platform specific old frameworks (#44932)
* disable vs restore in vs for projects targeting platform specific older frameworks

* Add infra to auto-update solution files for restore

* Add NuGet.config files for solutions affected by restore issue

Co-authored-by: Viktor Hofer <[email protected]>
2020-12-02 23:18:52 +01:00
Viktor Hofer ed295782bf Add workflow to update solution files with SlnGen and update them initially (#44703)
* Add slngen infra

* Update all solution files
2020-11-17 18:23:30 +01:00
Stephen Toub dc3101bc11 Remove some unnecessary GetTypeInfo usage (#44414) 2020-11-09 13:11:41 -08:00
Anirudh Agnihotry b37f10a504 Changing Windows_NT -> Windows for enabling TargetPlatformMoniker feature of the sdk for platform specific tfms. (#43651)
* eng change

* coreclr change

* libraries change

* tests change

* installer & mono change

* py files changed

* .md change

* .yml change

* remove redundant targetos property

* Windows_NT -> windows after ninja change

* fixing runtime build failure
2020-11-02 14:25:58 -08:00
Anirudh AgnihotryandViktor Hofer 3fca0837b8 Replace net6.0 TargetFramework Equality Conditions with msbuild intrinsic functions (#43857)
* using msbuild intrinsic functions to get tfm identifier and tfv version

* Update src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft.Win32.SystemEvents.csproj

Co-authored-by: Viktor Hofer <[email protected]>

* Update build-native.proj

* Update build-native.proj

Co-authored-by: Viktor Hofer <[email protected]>
2020-10-28 11:09:40 -07:00
Buyaa 5d702f8768 Fix new warnings (#43097)
* Fix CA1416 warnings in runtime repo
2020-10-16 16:39:19 -07:00
Tarek Mahmoud SayedandStephen Toub 547b2018a9 Support cp1252 codepage alias (#42599)
* Support cp1252 codepage alias

* Apply suggestions from code review

Co-authored-by: Stephen Toub <[email protected]>

* Fix teh License comment in the file headers

Co-authored-by: Stephen Toub <[email protected]>
2020-09-23 18:34:33 -07:00
Alexander KöplingerandSteve Pfister c6eac1f2d5 Cleanup old corefx/coreclr GitHub issue links (#40286)
Replace them with the current URL after the redirect.

Similar to https://github.com/dotnet/runtime/pull/2063.

Co-authored-by: Steve Pfister <[email protected]>
2020-08-13 23:13:51 +02:00
Viktor Hofer 809a06f451 Remove depprojs in favor of PackageReferences (#35606)
- Remove depprojs which currently binplace external references into the RefPath folders in favor of PackageReference and PackageDownload items.
- Build all configurations by default when building an individual project (either on the CLI or inside VS) same as with the official SDK. This enables .NETFramework Test Explorer support.
- Centrally define libraries that compose the shared framework instead of in each Directory.Build.props file to be able to build the targeting pack first and consume it in the OOB libraries.
- Use ProjectReferences to reference OOB projects. Compile against the reference assembly but use the implementation assembly app-local during runtime.
- Remove OOBs from the testhost and remove the testhost folder for .NETFramework as it isn't required anymore.
- Only binplace for $(NetCoreAppCurrent) to compose a) the targeting pack, b) the runtime pack, c) the testhost, d) a full closure for the shims.
- Use Targeting Packs for OOB projects (with their implicit assembly references) but still explicitly define granular references for .NETCoreApp configurations (DisableImplicitAssemblyReferences switch). Use the implicit targeting pack references in some Microsoft.Extensions.* cases.
- Remove placeholder configurations as they aren't needed anymore with explicit P2Ps vs Targeting Pack references.
- Remove implicit assembly references (ie for .NETFramework, mscorlib)
- Remove AssemblySearchPath hacks that were introduced with b7c4cb7 as the targeting pack is now used by default.
- Reduce unnecessary .NETFramework configurations that were added to run tests in favor of the already existing ref&src configurations.
- Stop hardcoding the paths for wasm assemblies and use the returned TargetPath of the ProjectReferences.
- Addressed formatting (ItemGroups, References at the bottom of the project file, ordering of references, use LibrariesProjectRoot instead of a relative path, unnecessary AssemblyName and RootNamespace properties which are identical to the project name, ordering of tfms)
- Revert "fix clean (#33758)"
2020-07-23 17:20:26 +02:00
Jose Perez RodriguezandEric StJohn b7c4cb71fe Add NetFramework Configurations to OOB packages (#39099)
* Porting new netfx configurations for packages

* Add Netfx configurations to Microsoft.Extensions and missing System packages

* Making sure net461 configurations build against targeting pack assembly versions

* Undo changes to add netfx configurations on reference projects that don't ship in their package

* Fix issue with M.E.FP.P package by removing NetStandard.Library metapackage dependency

* Fix issues with depending on higher version than the one available in net461

* Disable UTF8String verifyClosure on package

* Undo changes to Microsoft.XmlSerializer.Generator

* Update src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Microsoft.Extensions.FileProviders.Physical.csproj

Co-authored-by: Eric StJohn <[email protected]>

Co-authored-by: Eric StJohn <[email protected]>
2020-07-14 21:59:55 -07:00
Stephen Toub 6072e4d3a7 Update license headers (#38793) 2020-07-08 09:23:11 -04:00
Levi Broderick 74cfc0f25c Obsolete Encoding.UTF7 property and UTF7Encoding ctors (#37535)
- Disallow Encoding.GetEncoding("utf-7", ...) from returning an Encoding instance
- Minor code cleanup by removing unused ifdefs
- A compat switch is available to re-enable Encoding.GetEncoding("utf-7", ...)
2020-06-30 13:10:48 -07:00
Stephen Toub ed78fadab6 Fix CA1805 for unnecessary initialization of fields (#38410)
This has three primary benefits:
1. In some cases, in particular for static fields where other static fields have non-default initialization, the C# compiler can't elide the default initialization, resulting in more IL.
2. It highlights places where the field is otherwise unused and can be deleted, but where the presence of the initialization was silencing the C# compiler's warnings about the unused field.
3. It increases consistency and decreases maintenance / code size / etc.
2020-06-26 07:52:35 -04:00
Alexander Köplinger 076d5fa350 Disable two more tests that use RemoteExecutor on platforms where it's not supported (#37992)
Those sneaked in with https://github.com/dotnet/runtime/pull/37528 which was merged at the same time as my PR https://github.com/dotnet/runtime/pull/37479.
2020-06-17 12:32:34 +02:00
Alexander Köplinger da10ba8ca7 Use ConditionalFact/Theory for skipping RemoteExecutor on unsupported platforms (#37479)
RemoteExecutor doesn't work on platforms that can't spawn processes like iOS/Android/WebAssembly.
2020-06-09 12:40:44 +02:00
Tarek Mahmoud Sayed efe9663636 Support the Encoding enumeration in the Encoding Providers (#37528)
* Support the Encoding enumeration in the Encoding Providers

* Fix build

* Fix netstandard build

* Address the feedback

* More Feedback

* More Feedback
2020-06-08 19:21:01 -07:00
Anirudh Agnihotry 0ac72ac366 Remove TargetsNet* from the runtime repo (#35589)
* feedbacl from previous time

* remove TargetsNet* from ItemGroup

* removing targetFramework from .targets
2020-05-04 17:12:23 +02:00
Anirudh Agnihotry 4c4b2635ed Remove Targets* instances from .props files (#35353)
* remove TargetsNetfx from isPartialFacadeAssembly property

* Omit Resources corrected

* fix partial facade

* GeneratePlatformNotSupportedAssemblyMessage corrected

* OmitResources made similar to isPartialFacadeAssembly

* fixes omitsources

* moving targetFramework dependent properties to second property Group

* fix GeneratePlatformNotSupportedAssemblyWithGlobalPrefix

* correct define constants

* fix no warn

* fix assembly version

* fix packageTargetFramework

* fix the build

* src and ref intell working

* remove targets properties from tests file

* adding comment
2020-04-28 13:36:53 -07:00
Marcus Turewicz 890fab0a64 Use attribute Link syntax for Common files (#35436)
* Change <Link>...</Link> to Link="..."

* Format existing Link="..."
2020-04-25 05:26:50 -07:00
Viktor Hofer d0dc66bc0b Rename CoreFx.Private.TestUtilities and reference it in slns (#34656)
* Rename CoreFx.Private.TestUtilities to TestUtilities

* Add TestUtilities reference to slns
2020-04-08 01:26:53 +02:00
Anirudh AgnihotryandViktor Hofer df3930ecd2 fixing the order of targetFrameworks to show appropriate files in the VS (#32206)
* fixing the vs

* Update System.Runtime.Serialization.Formatters.Tests.csproj

Co-authored-by: Viktor Hofer <[email protected]>
2020-02-14 10:16:54 -08:00
Levi Broderick 0d08b0232d API review URL should be HTTPS, not HTTP (#32281) 2020-02-14 08:07:46 -08:00
Anirudh Agnihotry 83b76b2b27 add fromPackage to exclude properties (#32063) 2020-02-11 00:33:55 +00:00
Anirudh Agnihotry 725968c3c5 New Configuration System (#1787)
* libraries -restore for vertical build without test restore

* Automatic test change and regex to remove the addition of an extra line at eof

* manual test restore fixed (restore completely done for vertical build)

* build native done

* Automatic ref change and regex to remove the last line

* manual reference assebly change and generated shims build

* automatic src change and regex

* native bin place and src build manual change

* apicompat and pretest.csproj done

* fixing the package build

* fixing all config

* packaging and feedback

* adding back placeholder configuration

* fixing the shims

* delete configuration.props

* making the build work in master

* Test Change

* fixing the packageing, test restore replacing TargetFramework -> OriginalTargetFramework

* delete test configuraiton.props, trailing semicolon and use targetFramework

* reverting the package change

* enable apicompat and fixing configurationGroup for individual projects

* fixing the api compat

* making ilproj work

* adding the outerBuildTest

* adding the arcade package version

* fixing the merge conflicts

* minor changes

* adding additional configs and setting the runtimeOS

* making the  vs stuff work

* removing the target Group to fix the apicompat

* fixing the linux build and some minor changes

* making additionalBuildTargetFramework LOcalProperty

* fixing the allConfigurations build

* fixing the netfx build

* fixing package Testing and restore

* Missing  TargetFrameworks tag

* making the VSdesgin stuff work

* Remove OriginalFramework Entirely

* some minor pr feedback

* RemoveExtraSemicolon

* use boolean exclude flag

* fixing yml scripts to pass tests

* adding comments and some minor feedback

* moving packaging property to correct plave

* fixing the build for web assembly

* Fixing the live ci build

* Fixing the live build for shims

* fixing the tests

* fixing the packaging and enterprise linux

* fixing  package sizes

* Fix the targetFramework

* updating the targetFramework sdl

* removing the buildOS and be able to use OSGroup as done in the old system

* Fixing the osgroup stuff for send to helix task

* Fix OSX failures

* Fixing the osx build

* uploading tmp folder to artifacts

* running restore for runtime.deproj correctly
2020-02-06 05:24:08 +00:00
Erhan Atesoglu caa2ed9698 Rebased version of CoreFX renames (#1941)
* FinalCoreFXRenames

The last of the CoreFX renames.

* Update DirectorySearcher.cs

Fixed typo in DirectorySearcher.cs

* Update TestClasses.SimpleTestClassWithObjectArrays.cs

This fixes the expected value of the tests to runtime, instead of corefx.

* Update PersistedFiles.Names.Unix.cs

Adds a note to not update the corefx reference.
2020-01-21 20:05:51 -08:00
Jan KotasandStephen Toub 0b25063ec0 More renames of full framework to .NET Framework (#1900)
* More renames of full framework to .NET Framework

* Apply suggestions from code review

Co-Authored-By: Stephen Toub <[email protected]>
2020-01-18 11:04:59 -08:00
Jan Kotas f1c7ed882a Move most of CoreLib interop under Common (#1247)
Contributes to #1232
2020-01-02 20:21:27 -08:00
Jan Kotas 0647ec3149 Replace GetDirectoryNameOfFileAbove with GetPathOfFileAbove where possible (#1175) 2019-12-27 00:31:18 -08:00
Anirudh Agnihotry 3b9abae5aa Removing "netcoreapp" and "netfx" TargetGroup (#457)
* netcoreapp -> netcoreapp5.0 in .sln files

* netcoreapp; -> netcoreapp5.0;  , netcoreapp- to netcoreapp5.0-

* netcoreapp- -> netcoreapp5.0 in .csproj

* 'netcoreapp -> 'netcoreapp5.0 in .csproj

* done with libraries sub folder

* missed semicolon

* minor changes

* netcoreapp -> netcoreapp5.0 in some extra files

* vNext target variable in configurations.props

* netcoreapp => netcoreapp5/0 in some other .props file

* netcoreapp -> vnext in .csproj

* making the netcorepap framework switch work

* fixing sendToHelix and linux build

* TargetFrameworkVNext -> netcoreappCurrent

* case correct netcoreappcurrent

* fixing send to helix zip path

* netfx -> net472 in .sln

* netfx; -> net472; in .props

* netfx- -> net472- in .props

* netfx - -> net472- in .csproj

* 'netfx-> 'net472 in .csproj

* netfx -> net472 manual change

* fixing ci build for netfx

* Not trying to change the global property

* Fixing build failure due to master changes in net https tests

* adding documentaiton and fixing filtering

* netcoreapp -> netcore5.0 in py file

* changing the path to use netcoreapp5.0 version

* feedback and override corefx path corrected in installers

* remaing netcoreapp5.0 changes done

* netcoreapp-> netcoreapp5.0 after live builds

* net472 -> netframeworkcurrent
2019-12-14 12:22:29 -08:00
Santiago Fernandez Madero d8adaeeff2 Fix test build of test project that referenced corefx shared corelib directly and cleanup common path usages (#47)
* Fix test build break and update common path usages to use property

* Use normalize directory for CommonPath and CommonTestPath

* Update instances of CommonPath and CommonTestPath to not use trailing \
2019-11-14 21:03:07 +01:00
Viktor Hofer 8e3694fbdd Fix CodeAnalysis.ruleset path (#35) 2019-11-14 15:38:15 +01:00
Viktor Hofer 00d3a3b733 Update CoreLib path for consolidation (dotnet/corefx#42577)
Commit migrated from https://github.com/dotnet/corefx/commit/dc6136f34c7d4ebbc493a7bb6cf1d15bc82250e6
2019-11-13 20:48:15 +01:00
Anirudh Agnihotry 3679e373a3 Bumping the assembly version to 5.0.0.0 (dotnet/corefx#41723)
* bumping the assembly Version

* correcting the resx file

* keeping netfx for oleDb

* fiixing the netfx tests as well

* fixing the DataSetExtensionsVersion

* removing netstandard2.0 from ref in datasetextensions


Commit migrated from https://github.com/dotnet/corefx/commit/9a4ed0d00bc642b015974684c32b00650426429f
2019-11-11 10:43:58 -08:00
Eirik Tsarpalis c645a5bb73 Centralize fix for nullability annotations in netstandard builds (dotnet/corefx#42391)
* centralize fix for nullability in netstandard2.0

* remove project property from conditional

* Revert "remove project property from conditional"

This reverts commit dotnet/corefx@ffc54a15a4.

* move to Directory.Build.targets

* Add netcoreapp2.x check

* update logic for projects that use nullable annotations without it being enabled

* add nullable property to System.Data.SqlClient

* address newly added annotated project

* add nullable annotations to System.Security.Cryptography.Pkcs


Commit migrated from https://github.com/dotnet/corefx/commit/e52be6965496af9de49de585e6c62bdb0915c775
2019-11-06 23:10:27 +00:00
Viktor Hofer d2999dc804 Remove versionless netstandard target group (dotnet/corefx#41984)
Commit migrated from https://github.com/dotnet/corefx/commit/26d7b6626ab0385a1158e674855f81ab73f628e0
2019-10-27 17:08:59 +01:00
Stephen Toub 52eb946d92 Annotate System.Text.Encoding.CodePages for nullable reference types (dotnet/corefx#41991)
* Annotate System.Text.Encoding.CodePages for nullable reference types

* Fix .NET Core 2.0 build

I'm not sure why we still build for this as a target, but there a bunch of nullability failures in the build because Debug.Assert isn't annotated in .NET Core 2.0's surface area, and thus places we're relying on Debug.Assert to suppress nullable warnings are failing.


Commit migrated from https://github.com/dotnet/corefx/commit/d850afb1435c27ee036a09c564bfd84607fb0e94
2019-10-22 16:29:31 -04:00
Viktor Hofer 9b88ca1d72 Remove UAP target (dotnet/corefx#41759)
* Remove Uap target

* Remove RemoteInvokeForUap wrapper calls entirely

* Harvest S.D.SqlClient on UWP

* Disable UWP PInvoke analyzer

* Enable WindowsRuntime* tests on netcoreapp

Commit migrated from https://github.com/dotnet/corefx/commit/3b6ec2ba944fb72f921f95b99b6ebf2e7bb3dc5a
2019-10-17 15:04:39 +02:00
Viktor Hofer d5079dda17 Remove ProjectGUIDs from project files and Project and Name attributes from P2Ps (dotnet/corefx#40926)
* Remove ProjectGUIDs from P2Ps

* Remove ProjectGUIDs from project files

Commit migrated from https://github.com/dotnet/corefx/commit/c22714d65151968a17c3b232748880d5e7961dee
2019-09-09 18:21:25 +02:00
Stephen Toub 4fc5d8971d Contribute to IDE0055 (fix formatting)
Commit migrated from https://github.com/dotnet/corefx/commit/b49a8a9be1d53cd9e50cb68fd8540be25c65d433
2019-08-24 07:47:35 -04:00
Stephen Toub 7bdae2162f Contribute to StyleCop SA1002 (semicolon spacing)
However, I'm not enabling the rule permanently, as it disagrees with VS IDE0055 about the spacing around semicolons at the end of empty while and for loops.

Because this also impacts `for (;;)` loops, I also searched and replaced those with `while (true)`, to standardize on that across the codebase.


Commit migrated from https://github.com/dotnet/corefx/commit/93285e4511a9656a30b92b8b6a9088608aac40e0
2019-08-24 07:47:35 -04:00
Stephen Toub 9885a60658 Fix IDE0066 across corefx (dotnet/corefx#40288)
* Fix IDE0066 across corefx

"Fix all", but then manual tweaking to accommodate places the rule doesn't work quite right.

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/f71a5a1d88214a9e2c26ff2ff8bcfb1017aa6713
2019-08-16 11:24:54 -04:00
Stephen Toub 9548bea38a Make many fields readonly or const across corefx (dotnet/corefx#40298)
* Make many fields readonly or const

* Address PR feedback

- Updated asn.xslt
- Regenerated .xml.cs files


Commit migrated from https://github.com/dotnet/corefx/commit/0cc22ccba707d7552159363d586262fa9c4e8a2a
2019-08-14 14:19:30 -04:00
Stephen Toub 60d1224ddd Re-enable StyleCop warnings SA1028 and SA1518 (trailing whitespace and blank lines) (dotnet/corefx#40113)
Mechanical/automated change.  The only manual changes were a) removing the two rules from the CodeAnalysis.ruleset file, b) removing spaces from one line of a .targets file that is used to generate a .cs file, and c) reverting the changes in a few test files where the naive replacement happened in the middle of a verbatim string where the whitespace actually mattered.

Commit migrated from https://github.com/dotnet/corefx/commit/09a6e66b0c2b31bd0f6e7e3170537d14027aeed0
2019-08-07 21:07:58 -04:00
Stephen Toub c8df52dd02 Re-enable xunit warning 1026 (unused theory arguments) (dotnet/corefx#40079)
* Re-enable xunit warning 1026 (unused theory arguments)

Some of these were addressed by explicitly discarding theory arguments, generally in cases where either a) the argument was being used as a description to aid in debugging failures, or b) the argument was part of a member data that was used by some theories and not by others all sharing the same member data.

However, there are quite a few legitimate bugs being fixed here, enough that highlights it's worthwhile to have the rule enabled.  Some are cases where the argument was supposed to be used but wasn't.  Some are cases where the argument isn't used at all, and in many cases where we end up running the same test over and over and wasting cycles.  Some are cases where we're unnecessarily including irrelevant inputs to the tests and making the input data more complicated than it needs to be.  Etc.

(Along the way, I also fixed some cases where VS was warning about lambdas being used instead of local functions, and in cases where I agreed I fixed them, via auto-fixers.)

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/daf93ee0e5e5233141eb762c64b6049cfd7d123e
2019-08-07 08:00:27 +02:00
Stephen Toub 6e335aa872 Enable several StyleCopAnalyzers (dotnet/corefx#39921)
* Fix ordering of keywords in member signatures

* Add StyeCop.Analyzers

Most rules are disabled.  Many of them we'll want to leave disabled, however there are a handful it'll be good to enable over time.

* Use built-in type alias

* Fix straggling stylecop warnings in all configurations

* Replace tabs with spaces


Commit migrated from https://github.com/dotnet/corefx/commit/a12c557a72988070b8624cc7ecc46899629895c4
2019-07-31 19:10:59 -04:00
Stephen Toub 3364838e1e Re-enable CA1823 (unused private fields) (dotnet/corefx#39899)
Commit migrated from https://github.com/dotnet/corefx/commit/e5d38a54cf21f6427ae4fe99c3841c8067139e75
2019-07-31 08:04:33 -04:00
Stephen Toub 51727a6ef6 Fix ordering of visibility and abstract/virtual/override (dotnet/corefx#39590)
To conform to expected style across corefx.

Commit migrated from https://github.com/dotnet/corefx/commit/b95ad3c0f9066fa426754bd6e3379fbaca24834e
2019-07-18 14:21:08 -04:00
Viktor Hofer ef7a0e676a Enable XUnit Analyzers (dotnet/corefx#38676)
* Enable XUnit Analyzers


Commit migrated from https://github.com/dotnet/corefx/commit/b8a7f34e1b64e5c594f591aa8683f34506eb9736
2019-07-05 22:50:57 +02:00