* Update System.Net solution files
https://github.com/dotnet/runtime/commit/8823eefe91f6b774961c32800dea977b687d7328 added a dependency onto the source project of System.Net.Security. Because of that, the closure of the System.Net.Quic and System.Net.Http solution files changed. Currently this is manual as we don't have a CI leg that makes sure that solution files are up-to-date.
* Update System.Net.Http.sln
* Minimize the build graph by deleting references
Minimizing projects' dependency graph. There are tons of unnecessary
Reference and ProjectReference items which aren't required anymore as
the referenced projects became full facade assemblies. Removing those
from a leaf's graph makes the graph smaller and therefore the project's
evaluation and build faster.
* Update src/libraries/System.Net.Quic/ref/System.Net.Quic.csproj
Co-authored-by: Jeremy Barton <[email protected]>
* Update Versions.props
Co-authored-by: Jeremy Barton <[email protected]>
* Throw on concurrent operations
* Remove redundant test
* Move _state.SendState access under a lock
* Fix data race on ReceiveResettableCompletionSource
* Remove unnecessary override
* Move task completion outside of the lock
* Fix failing tests
* Update comments
* Add missing case
* fixup! Add missing case
* Fix VS complaining about missing projects in slns
Remove inbox (Project-)References in out-of-band projects as these
projects already build on top of the shared framework (targeting pack).
* Update Microsoft.Extensions ref projects
* Update Microsoft.Extensions src projects
* Update graph dependencies of Microsoft.Extensions*
* Update sources that complained about Span usage
* Change the default Nullable to enabled for src projects
* Set Nullable=enable as the default for ref projects
* Fixup merge conflicts
* Disable nullable on shim projects and EventLog.Messages
* Set Nullable to blank on EventLog.Messages
This way no CodeAnalysis attributes are emitted into the assembly.
* Enable new CA1311 (ToLower/Upper culture) and CA1852 (seal internal/private types)
CA1311 flagged a few issues, all addressed by using ToLowerInvariant/ToUpperInvariant.
CA1852 flagged a bunch that previous cleanups around sealing types missed or that are new since. Sealing types then highlighted places where protected or virtual members were being exposed unnecessarily, so those were fixed, too. Adding sealed to things also highlighted some discrepancies in the order of "unsafe sealed" keywords, where the vast majority in the repo were "sealed unsafe", so I fixed the few that weren't.
* Address PR feedback and fix more CI failures
* Fix unit test build error
* Remove usage of !! from dotnet/runtime
- Use ArgumentNullException.ThrowIfNull instead where possible. It's only usable for projects that only target .NET 6+, and it can't be used in places like this(...) or base(...).
- In other cases, if the project already has a ThrowHelper, augment it for null as needed and use that.
- For most of the extensions projects, add a ThrowHelper.ThrowIfNull that replicates ArgumentNullException.ThrowIfNull.
- For everything else, just use "throw new".
* Address PR feedback
* Address PR feedback
* Remove false positives from searches
* Address PR feedback
* Merge `NativeCallbackHandler` and `HandleEvent`
* Use constants for `_state.ShutdownDone`
* Don't use Handle... prefix for private helpers
* Send state transition comments
* Update to msquic 2, test and code fixes
* feedback
* Fixed more HTTP/3 bugs
* updated fedora image to contain the newest msquic
* Better test debugging, fixed some timeouts
* feedback
* Return some msquic calls into a lock
* Scaffold TLS Support Helper
Scaffolds an interoperable TLS support helper.
Needs to be multi-file so that the Microsoft.Win32 dependency can be safely used in `MsQuicTlsSupportHelper.Windows.cs`
* Invert `IsTls1_3Enabled` to `IsTls1_3Disabled`
Disabling TLS1.3 is an explicit action in supported versions of windows, and we should check for the explicit configuration
* Add check for whether TLS1.3 Is DDisabled
* Add reference to Microsoft.Win32.Registry for windows builds
Need access to Registry API to check whether TLS 1.3 has been disabled
* Remove Platform agnostic MsQuicTlsSupportHelper
* Implement IsTls1_3Disabled
- Checks if key exists
- If not returns false
- Gets Value from Key "Enabled"
- If Enabled == 0 returns true
- Any other case returns false
* Revert some spacing and line changes in csproj
* Remove added spaces from .csproj
* Move to conditional compilation for TLS Check
* Move to TARGET_WINDOWS defined constant
Update to check correct registry keys/values
* Simplify IsTls13Disabled implementation
* Remove IsTls13Disabled from Windows version check
* Add TLS13MayBeDisabled flag
* Add `QuicTlsVersionException`
Throw `QuicTlsVersionException` on specific failures of ConfigurationLoadCredential
Throw this exception if status is 0x80090331 (Algorithm Mismatch), and the registry indicated that Tls13 could be disabled
* Fix IDE resource file whitespace changes
* Update net_quic_tls_version_notsupported message
* Change error code comparison to use Interop.SECURITY_STATUS
Make AlgorithmMismatch check TARGET_WINDOWS only
Interop.SECURITY_STATUS contains status values from SChannel, which is the source of this error in the first place.
* Remove QuicTlsVersionException and update usages
* Remove unused using
* Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20220324.1
Microsoft.CodeAnalysis.NetAnalyzers
From Version 7.0.0-preview1.22166.1 -> To Version 7.0.0-preview1.22174.1
* React to DisableRuntimeMarshalling attribute analyzer by switching a few extraneous places to source-generated marshalling and removing some unused attributes.
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Jeremy Koritzinsky <[email protected]>
* Update coding-style to include target-typed new guideline
Similar to `var` usage, `new()` usage is only allowed when the Type can be understood from the same line.
Fix#53369
* Fix coding style violations
Split the build of shared framework and out-of-band projects so that
it's possible to just build the shard framework projects, which was
requested by the CLR teams. In the next infrastructure rollout, the
current "libs.ref+libs.src" subsets should be removed. Generate the
targeting pack with an incomplete (without shims) frameworklist as part
of the "libs.sfx" subset.
Build the shim projects after the shared framework and oob projects and
re-generate the targeting pack's frameworklist to include the shims.
Refactor the shims so that they aren't grouped anymore by generated &
manual. Instead group them by "ref" and "src" same as other libraries
in the tree which allows to reference the source project shims and read
from the ReferenceAssembly metadata.
Use ProjectReferences in traversal projects and shim projects instead
of named references that point to binplace directories (see graph below)
This allows to build parts of the product dynamically, i.e. the shim
projects, apicompat.proj, sfx.proj and oob.proj.
* Fix slngen.proj
The SolutionName property is defined by the SDK and hence the condition was always true. Also the star (*) didn't expand when using the ValurOrDefault msbuild function. Fixing this by using a different name `SolutionNameOverride` and avoiding the ValueOrDefault msbuild function.
* Update solution files
Updating the solution files as those changed because of
microsoft/slngen@cb57e28 and apparently the solution files never were
updated.
* Don't use Targets* helper properties in libs projs
This change makes it possible to migrate 200+ (ref+src) projects to use
TargetFramework instead of TargetFrameworks which avoids the additional
outer build evaluation and invocation which ultimately makes the overall
build faster.
Targets* properties (i.e. TargetsWindows, TargetsAnyOS, TargetsUnix,
etc.) rely on the TargetFramework property which usually are set
inside a project. The TargetFramework property is only
available before a project specifies it if it's explicitly set in a props
file or if the project is cross-targeting and the outer-build dispatches
into the inner-build. During the dispatch, the TargetFramework property
is passed in as a global property.
Until now that behavior wasn't a problem because every libraries project
cross-targeted (by setting the TargetFrameworks property) even though
many only include a single TargetFramework (i.e. NetCoreAppCurrent).
To allow projects to use the TargetFramework property instead of
TargetFrameworks, the Targets* helper properties can't be calculated
anymore early in a props file as the TargetFramework property isn't set
at that time.
In general, the guidance by the SDK/msbuild team is to not read from the
TargetFramework property before the project sets it
(in a property group). That effectively means that the TargetFramework
property shouldn't be used in props files at all.
Therefore these helper properties can't be used anymore for property
conditions and I'm replacing their usage with TargetPlatformIdentifier
comparisons for both properties and items.
In nearly all cases, the Targets* helper properties can be replaced with
TargetPlatformIdentifier checks on items and in the few cases where
TargetsUnix or TargetsLinux marks multiple tfms as compatible, the exact
tfms must be used instead for the TargetPlatformIdentifier comparison.
Whenever a project needs to condition properties on the platform, I'm
first setting the TargetPlatformIdentifier the same way the SDK sets it
so that the SDK later doesn't need to set it again to avoid the
additional expensive msbuild function call.
* Use TargetFramework singular to avoid outer builds
Use TargetFramework instead of TargetFrameworks property whenever a
projects only targets a single target framework. This avoid unnecessary
outer builds and evaluations and makes the build faster.
* Bump version of C# compiler
This should be reverted when arcade brings in a new enough compiler.
* Fix a few new warnings from updating compiler
* Enable IDE0190 to employ parameter null checking
* Initial roll out of !!
* Fix more compiler warnings from upgrade, plus some test fixes / reverts
* Fix a few more tests
* Disable profiling test
Some libraries still had ProjectReferences to libraries which refs
were added to the targeting pack with the last release. Therefore these
references can just be normal "Reference" items instead of P2Ps.