Commit Graph
936 Commits
Author SHA1 Message Date
e10532af7e Obsolete thumbtacked AssemblyName properties (#59522)
* Obsolete thumbtacked AssemblyName properties

Fix #59061

* Ignore obsoletion

* Fix pragma

* Merge the AssemblyName member obsoletions into a single diagnostic id

* Fix pragma to use updated diagnostic id

* Suppress SYSLIB0037 in reflection tests

* Suppress SYSLIB0037 warnings

Co-authored-by: Jeff Handley <[email protected]>
Co-authored-by: Jeff Handley <[email protected]>
2021-11-15 17:06:46 -08:00
Elinor Fung 2da44f3262 Use DllImportGenerator in System.Diagnostics.PerformanceCounter (#61389) 2021-11-11 08:18:30 -08:00
Michal Strehovský b6657214f4 Remove sorting requirement for interface lists (#60541)
Fixes #60454.
2021-11-08 13:55:37 -08:00
Steve Pfister 8c6aeea1d8 Bring up full library test CI runs on iOS / tvOS devices (#59503)
This change enables device runs on CI by building each test app on the helix instance it was deployed to. In past attempts, we looked at enhancing what takes place on the build machine via build tricks, compressing / cleaning up files early, etc and we could not overcome the need for excessively long timeouts and far more disk space.

The change also adopts the patterns established in the wasm test build, giving us the opportunity to support different scenario runs as well as workloads testing in the future.
2021-11-02 07:43:15 -04:00
Theodore Tsirpanis db9c3f1aeb Remove legacy light-up code from System.Reflection.Metadata et.al. (#56587)
* Remove legacy light-up code for the pointer-based Encoding.GetString.

* Remove legacy light-up code for the memory-mapped file block code.

* Remove FileStreamLightUp.IsFileStream and the need for it.

* Address PR feedback.

* Use hardware-accelerated population count where available.

* Remove a try/finally with an empty try where CERs are not supported.

* Use named arguments when constructing a memory-mapped file.
2021-09-16 08:48:06 +02: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 Hofer 49c74eec15 Update changed solution files under src/libraries (#57483)
* Update slngen logic and remove unnecessary P2Ps

* Update changed soluion files under src/libraries

* Fix Platforms build

* Update comment in slngen.targets
2021-08-18 19:35:54 +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
Tomáš Matoušek 2a02896735 Use native allocator instead of pinning when decompressing embedded PDB (#56336) 2021-07-27 15:16:59 -07:00
Stephen Toub dfd618dc64 Use interpolated strings in more places 2021-07-13 10:11:51 -04: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
Viktor Hofer c95aa3f48a Remove NS1.x assets from building and packaging (#53283)
* Remove NS1.x assets from build and packaging

These ten projects still built for netstandard1.x. This PR
trims out these assets from both the build which also results
in them not being packaged anymore as there is no harvesting
mechanism in the repository 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 https://github.com/dotnet/runtime/issues/53282
2021-05-26 21:51:12 +02:00
hrrrrustic 57c3a8558e System.Reflection.* missed Equals nullable annotations (#52162)
* add NotNullWhen attribute
2021-05-22 13:54:40 -07:00
Ankit Jain d36313d3da [wasm][aot] Update disabled tests to track new fixes on main (#52396)
* [wasm][aot] System.Runtime.Tests failing with a different issue now

The earlier one (https://github.com/dotnet/runtime/issues/51960) was
fixed.
New: https://github.com/dotnet/runtime/issues/52393

* Enable Common.Tests test tracked in https://github.com/dotnet/runtime/issues/50955, already fixed on main

* [wasm] System.Reflection.Tests - update to track change from crash to a

.. test failure.
Issue: https://github.com/dotnet/runtime/issues/51673

* Re-enable System.Collections.Tests, issue: https://github.com/dotnet/runtime/issues/51037

* Disable Microsoft.Extensions.Logging.Generators, and System.IO.Pipelines

Issue: https://github.com/dotnet/runtime/issues/52384
Issue: https://github.com/dotnet/runtime/issues/50959

* Enable two System.Reflection.Metadata* tests

Issue: https://github.com/dotnet/runtime/issues/51958

* Fix path for Microsoft.Extensions.Logging.Generators.Tests
2021-05-06 19:39:37 -05:00
Ankit Jain f372f6b5fd [wasm][tests] Fix test failures due to trimming (#51697)
- Both EAT, and AOT builds are completely green now.
- Number of tests for EAT goes from 147 -> 185
- Number of tests for AOT goes from 147 -> 174 (the difference is because of aot only failures)
- Test run on a regular wasm build runs 206 libraries
2021-04-28 15:19:10 -04:00
Ankit JainandLarry Ewing fa7c6a93a8 [wasm][aot] Disable failing AOT tests, to get a green build (#51724)
Co-authored-by: Larry Ewing <[email protected]>
2021-04-27 01:55:45 -04:00
Tomáš Matoušek 22dc92037b Fix disposal of MetadataProvider on failure to read Embedded PDB (#51288) 2021-04-14 20:56:59 -07:00
Alexander Köplinger bc9f00c226 Cleanup PlatformSpecific/SkipOnMono attributes that skip a platform (#50907)
We have a bunch of test assemblies that don't make sense on some platforms, e.g. Browser.
Right now we're skipping them via `[SkipOnMono("reason", TestPlatforms.Browser)]` but there's nothing that inherently ties this to Mono other than the current implementation.

The more generic `SkipOnPlatform` attribute can be used instead.
We can also use it in places where we do `[PlatformSpecific(~TestPlatforms....)]` to avoid the double inversion.
2021-04-09 13:20:18 +02:00
Stephen Toub 0c793920f6 Clean up string formatting in a variety of places (#50267)
Mostly just replacing string.Format calls with equivalent interpolated string uses.  In some cases, I replaced lots of string creations with a StringBuilder or equivalent.
2021-04-04 23:16:23 -04:00
Adam Sitnik bce310d872 ensure MetadataReader fast path works with every FileStream on every OS (#50367) 2021-03-31 08:53:52 +02:00
Stephen Toub 0817e748b7 Seal internal types in libraries (#50225) 2021-03-25 20:50:33 -04:00
Michal Strehovský f690d59f4e Don't remove trailing \0 in custom attributes (#50088)
As the comment says - this behavior goes against the spec. Fixes #49756.
2021-03-23 08:19:58 -07:00
Stephen Toub 48679143aa Seal private classes in libraries (#49969) 2021-03-23 06:14:55 -04:00
Ulrich Weigand ce9dd6b0ec Big-endian fix: System.Reflection.Metadata BlobBuilder/BlobWriter (#49812)
* BlobBuilder: do not use Encoding.Unicode.GetBytes but simple
  byte-swaps on big-endian systems (fixes a semantic difference
  to little-endian code w.r.t. surrogate char handling)

* BlobWriter: add big-endian WriteUTF16 code path like BlobBuilder
2021-03-19 07:55:37 -07:00
Ulrich Weigand c37395208c Big-endian fix: GUID handling (#49813)
* Fix Utf8Formatter.Guid on big-endian systems
  (first three fields are stored in native byte order, not always
  little-endian)

* Use Guid constructor in BlobContentId.FromHash to remove
  endian-dependent code accessing the structure directly
2021-03-19 13:00:15 +01:00
Ulrich Weigand 8ad1d7d665 Big-endian fix: PEBuilder.CalculateChecksum (#49816)
* Always use little-endian encoding to compute checksum
2021-03-19 06:46:08 -04:00
Marek Safar aeaa103edd Better windows only guard which can be removed by linker (#48594)
Also, remove superfluous test poking into an internal state to mimic
non-Windows test environment
2021-03-17 07:20:52 -04:00
Ulrich Weigand 66e665ffe8 Big-endian test case fixes: System.Reflection (#49693)
* Fix endian assumptions in tests operating on PE headers / IL metadata
  (this is always encoded in little-endian byte order)

* Fix expected result for BlobReader test (always little-endian)

* Fix expected results for GUID tests
2021-03-16 20:33:19 -04:00
Viktor Hofer 3553284bea Rename mention to master branch to main (#48824) 2021-03-01 10:09:31 +01: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
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
hrrrrustic eebeb86924 Make DebugDirectoryBuilder.AddCodeViewEntry public (#43267) 2020-10-22 21:27:00 -07:00
Eric StJohn 731eaf3545 Renable AddMethodBody tests (#41613) 2020-08-31 13:58:16 -07:00
Stephen Toub e7204f5d6f Use T? for unconstrained nullable types (#40197)
* Temporarily upgrade compiler version for T? support

* Use T? for unconstrained nullable types
2020-08-07 11:25:42 -04:00
Steve Pfister d575f10471 [Wasm] Ensure monovm_initialize is called on startup and address other startup items (#39446)
This PR addresses:

- Calling monovm_initialize matches how other mono platforms init themselves (Fixes https://github.com/dotnet/runtime/issues/39074)
- Set the entry assembly (Fixes https://github.com/dotnet/runtime/issues/38994)
- Make sure the assembly location is set to empty for assemblies that are loaded from memory (Fixes https://github.com/dotnet/runtime/issues/39650)
2020-08-07 09:30:15 -04:00
Santiago Fernandez Madero e10da01d65 WASM: Enable GetAssemblyNameTest_ValidAssembly and add hook to include custom files into vfs (#40032) 2020-07-29 11:55:56 +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
Alexander Köplinger f501577ae0 WASM: Enable System.Reflection tests (#39696)
Disable tests that won't work on browser.
2020-07-21 21:25:24 +02:00
Aaron Robinson 874399ab15 Declare AllowReversePInvokeCallsAttribute as Obsolete. (#39636) 2020-07-20 14:24:50 -07:00
Jeff Handley 329f0dbfa3 Mark Obsoletions for .NET 5 (#39269)
* Mark new obsoletions for .NET 5; update existing obsoletions

* Exclude DirectoryServicesPermission/DirectoryServicesPermissionAttribute from obsoletions for now

* No need to restore SYSLIB0003 at end of Forwards files

* Use a common Obsoletions.cs file for all SYSLIB obsoletions

* Resurrect CER code behind #ifdef in EventSource

* Mark GlobalAssemblyCache overrides as Obsolete

* Suppress Thread.Abort() error in ImageAnimator.Unix.cs

* Unconditionally mark RoAssembly.GlobalAssemblyCache as obsolete

* Rename MSLIB0001 to SYSLIB0001 in ref assembly

* Suppress obsoletion warnings in tests

* Adopt a uniform #ifdef for NET50_OBSOLETIONS

* Fix BinaryFormatter obsoletion message after the rebase

* Use SYSTEM_PRIVATE_CORELIB constant instead of NETCOREAPP

* Remove the code comment on the ifdef

* Apply feedback related to CER obsoletions

* Apply feedback related to CAS

* Update ref assembly to reflect SecurityManager obsoletion

* Fix regression in System.IO.Pipes.NamedPipeServerStream.Windows.RunAsClient
2020-07-17 17:09:29 -07: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 cb1a7feaa4 Fix remaining license headers (#38953)
* Fix license in remainder of .cs files

* Fix license header in .vb files

* Fix license header in .py files

* Fix license headers in .c, .cpp, .h

* Fix licensing on .dat files

* Fix license header in generators

* Fix license headers in .asm

* Fix license headers in .xml

* Fix remainder of license headers

* Add license default to .editorconfig

* Add some missing headers

* Fix Doundation to Foundation in some license headers

* Add missing license headers under libraries
2020-07-08 20:35:26 -04:00
Stephen Toub 6072e4d3a7 Update license headers (#38793) 2020-07-08 09:23:11 -04:00
Aaron Robinson affc43dad5 Add new Unmanaged MD calling convention value (#38357)
* Respect new MD bit in runtime

* Throw "not implemented".

* Update parser for ILAsm
Add text based grammar file for IL tooling

* Update ILDasm

* Add disabled test project for function pointers.

* Add feature detection.
2020-07-02 16:44:39 -07:00
Stephen Toub 3c9fcce29d Disable P/Invoke analyzer (#38550) 2020-06-29 18:06:21 -04: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