* 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]>
* 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.
* 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
Use TargetFramework instead of TargetFrameworks property whenever a
test project targets a single target framework only.
This avoid unnecessary outer builds and evaluations and makes the build
faster.
* 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
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.
PLINQ's QueryTaskGroupState handles joining with queued tasks, and handles the exceptions that emerge from waiting on them. AggregateExceptions are special-cased, and are flattened to eliminate extra levels that may have been added explicitly or implicitly; the code then checks to see whether all of the exceptions contained in the aggregate represent cancellation. However, it fails to account for the possibility that there are no exceptions it contains, which could happen if the only exceptions thrown are themselves empty AggregateExceptions. If that happens, the code makes some invalid assumptions that lead to a failed assert and then throwing an ObjectDisposedException.
The fix is just to check whether the flattened AggregateException is empty and to treat that not as cancellation but as a normal exception.
* Handle browser warnings
* Apply feedback, revert updates handled with different PRs
* Add misssing diagnotic id
* Address multitargeted warnings
* Apply feedback
* Small type/comment updates
* Apply more feedback
* Use project settings instead adding Directory.Build.props
* Annotate APIs injecting unsupported type through DI
* Fix window support related warnings found with generic type parameter
* Fix another browser warning found with generic type parameter bug fix
* All public APIs of ConsoleLoggerExtensions are unsupported, so marking entire type as unsupported on browser
* Try handle mono warnings
* Revert mono related changes, it was mistake
* Try handle browser warninga in mono
* Apply feedback and fix new warnings caused from corelib changes
* Review update
* Apply feedback
* Move platform specific section from HttpTelemetry
* Revering unwanted changes
* Remove redundant attributes
* Exclude cross platform build with browser target
* small updates
* Annotate entire type DiagnosticCounter unsupported
* Apply feedback, improve suppression comments
* Remove Unsupported browser from TypeDescriptor.CreateInstance, TypeDescriptionProvider.CreateInstance and related updates
- 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)"
* Add ExcludeFromCodeCoverage.Justification property
Delete some ExcludeFromCodeCoverages that aren't warranted, and add justifications almost everywhere else (only not doing so where a project builds for targets without the member).
* Update src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/PointerType.cs
Co-authored-by: Levi Broderick <[email protected]>
Co-authored-by: Levi Broderick <[email protected]>
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.
Addresses https://github.com/dotnet/runtime/issues/1980
* [xunit tests][mono] Remove disabled Microsoft.VisualBasic.Core.Tests tests from rsp file.
* [xunit tests][mono] Remove System.Collections.Specialized.Tests.Ctor_NegativeCapacity_ThrowsArgumentOutOfRangeException from rsp file
* Remove System.Collections.Concurrent.Tests.ConcurrentQueueTests.ReferenceTypes_NulledAfterDequeue from rsp file because it passes on release mono
* Remove BasicEventSourceTests.TestsManifestNegative.Test_GenerateManifest_InvalidEventSources from rsp file because it passes locally
* Remove ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Methods.Oneclass2methods.twoprms004.twoprms004.Test.DynamicCSharpRunTest from rsp file
* Remove System.IO.Tests.*.CopyFileWithData_MemberData from rsp file
* Move a set of skipped System.Linq.Expressions.Tests out of rsp file.
* Annotate System.Collections.Concurrent.Tests.ConcurrentQueueTests.ReferenceTypes_NulledAfterDequeue with ActiveIssue attribute
* Move another set of skipped System.Linq.Expressions.Tests out of rsp file.
* Move skipped System.Linq.Parallel.Tests.PlinqModesTests.WithExecutionMode_Multiple test out of rsp file
* Move skipped System.Memory.Tests out of rsp file
* Move skipped System.Net.Http.Functional.Tests.PlatformHandler_HttpClientHandler.* tests out of rdp file
* Remove System.Net.Sockets.Tests.SocketOptionNameTest.MulticastInterface_Set_AnyInterface_Succeeds because it passes locally.
* Move System.Reflection tests with an active issue out of rsp file
* Move skipped System.Runtime.InteropServices.Tests out of rsp file
* Replace closed CoreFX GH issue with the active Runtime one
* Move skipped System.Runtime.Serialization.Formatters.Tests out of rsp file
* Move skipped System.Runtime.Tests with an active issue out of rsp file
* Move skipped System.Threading.Tests with an active issue out of rsp file
* Remove skipped System.Data.Common.Tests because the related issue was addressed
* Move skipped System.Data.Common.Tests.DbConnectionTests.ProviderFactoryTest with an active issue out of rsp file
* Move skipped System.Diagnostics.StackTrace.Tests with an active issue out of rsp file
* Move skipped System.Numerics.Vectors.Tests with an active issue out of rsp file
* Move skipped System.Reflection.Context.Tests with an active issue out of rsp file
* Move skipped System.Threading.ThreadPools.Tests.ThreadPoolTests.SetMinMaxThreadsTest with an active issue out of rsp
* Move skipped System.ComponentModel.Composition and Tests.Integration namespaces with an active issue out of rsp file
* Update a message in skipped System.Runtime.InteropServices.Tests
* Move skipped System.Reflection.Tests.MetadataTokenTests.SuccessImpliesNonNilWithCorrectTable with an active issue out of rsp file
* Move skipped/no repro System.Threading.Overlapped.Tests with an active issue out of rsp file
* Move skipped System.Runtime.Extensions with an active issue out of rsp file
* Re-enable skipped System.Runtime.Handles.Tests because the related issue was addressed
* Move skipped System.Reflection.TypeExtensions.Tests with an active issue out of rsp file
* Move skipped System.Reflection.Emit.Lightweight.Tests with an active issue out of rsp file
* Move skipped System.Reflection.MetadataLoadContext.Tests with an active issue out of rsp file
* Move skipped System.Xml.Xsl.XslTransformApi.Tests with an active issue out of rsp file
* Move skipped System.Security.Cryptography.Encoding.Tests with an active issue out of rsp file
* Move System.Drawing.Imaging.Tests.ImageAttributesTests.SetColorMatrix_InvalidFlags_ThrowsArgumentException out of rsp file
* Add an active issue attribute to System.Drawing.Imaging.Tests.ImageAttributesTests.SetColorMatrix_InvalidFlags_ThrowsArgumentException test; add a comment about libgdiplus dependency to PlatformDetection.IsDrawingSupported method.
* Move System.Net.Http.Functional.Tests.SocketsHttpHandler_HttpClientHandler_ClientCertificates_Test.AutomaticOrManual_DoesntFailRegardlessOfWhetherClientCertsAreAvailable out of rsp because it has an active corefx issue; see https://github.com/dotnet/corefx/issues/37336
* Remove System.Net.Http.Functional.Tests.SocketsHttpHandler_HttpClientHandler_DangerousAcceptAllCertificatesValidator_Test.SetDelegate_ConnectionSucceeds from rsp because it's already disabled as part of system.net.* tests; see https://github.com/dotnet/runtime/pull/2318
* Move skipped System.Reflection.Emit.ILGeneration.Tests with an active issue out of rsp file
* Move skipped System.Reflection.Emit.Tests with an active issue out of rsp file
* Remove skipped System.Reflection.Tests from rsp file because they pass locally
* Try to re-enabled skipped System.Reflection.Tests.AssemblyTests.LoadFromStream_Location_IsEmpty
* Remove broken namespace
* Add an active issue to System.Reflection.Tests.AssemblyTests.LoadFromStream_Location_IsEmpty
* Add an active issue to several System.Reflection tests
* Remove skipped System.Tests.ExitCodeTests.SigTermExitCode because it passes locally.
* Remove skipped System.Tests.Types.VoidTests.IsByRef_Get_ReturnsExpected from rsp file because it passes locally
* Remove skipped System.Tests.GCTests.LatencyRoundtrips from rsp file because it passes locally
* Remove skipped System.Tests.GCExtendedTests.GetGCMemoryInfo from rsp-file because the related functionality has been implemented (see https://github.com/mono/mono/issues/15236)
* Remove skipped System.Tests.GetEnvironmentVariable.EnvironmentVariablesAreHashtable from rsp file because it passes locally
* Turn System.Threading.Tasks.Tests.ExecutionContextFlowTest.TaskCompletionSourceDoesntCaptureExecutionContext into a conditional theory because it requires precise GC
* Try to re-enable System.Threading.Tasks.Tests.TaskContinueWithTests.LongContinuationChain_ContinueWith_DoesNotStackOverflow
* Remove skipped System.Threading.ThreadPools.Tests.ThreadPoolTests.SetMinThreadsTo0Test from rsp file because it passes locally
* Remove System.Threading.ThreadPools.Tests.ThreadPoolTests.SetMinMaxThreadsTest_ChangedInDotNetCore from rsp file because it's explicitly skipped on Mono using SkipOnTargetFramework attribute
* Add an active issue to System.Tests.ExitCodeTests.SigTermExitCode and System.Tests.GCTests.LatencyRoundtrips tests
* Remove skipped System.Data.Tests.SqlTypes.SqlCharsTest.ReadWriteXmlTest from rsp file because it passes locally
* Add an active issue to System.Tests.GCExtendedTests.GetGCMemoryInfo because it fails on helix
* Add an active issue
* Add an active issue
* Re-add an active issue to System.Tests.ExceptionTests.ThrowStatementDoesNotResetExceptionStackLineOtherMethod
* Move skipped System.ComponentModel.Composition.MetadataViewProviderTests.GetMetadataView_InterfaceWithIndexer_ShouldThrowNotSupportedException with an active issue out of rsp file (see https://github.com/mono/mono/issues/15169)
* Remove skipped Tests.Integration.ExportFactoryTests.ExportFactoryStandardImports_ShouldWorkProperly from rsp file because it's already disabled within the entire Tests.Integration.ExportFactoryTests class (see https://github.com/mono/mono/issues/16417)
* Remove several skipped System.ComponentModel.Composition.Tests from rsp file because they pass locally.
* Move skipped System.ComponentModel.Composition.ExportCollectionTests.ImportCollectionsFromContainerOnly with an active issue out of rsp file
* Move skipped System.Diagnostics.Tests.StackTraceTests.Ctor_Exception_SkipFrames and System.Diagnostics.Tests.StackTraceTests.Ctor_Exception_SkipFrames_FNeedFileInfo tests with an active issue out of rsp file.
* Move skipped System.Diagnostics.Tests.StackTraceTests.ToString_Invoke_ReturnsExpected with an active issue out of rsp file
* Remove skipped System.Reflection.Tests.MetadataLoadContextTests.RelocatableAssembly from rsp file because it passes locally.
* Move skipped System.Runtime.Loader.Tests.RefEmitLoadContextTests.LoadRefEmitAssembly with an active issue out of rsp file
* Moved skipped ThreadPoolBoundHandleTests.PreAllocatedOverlapped_NullAsCallback_ThrowsArgumentNullException with an active issue out of rsp file (see https://github.com/mono/mono/issues/15313)
* Move skipped System.Runtime.Tests.ProfileOptimizationTest.ProfileOptimization_CheckFileExists with an active issue out of rsp file
* Move skipped System.Reflection.Emit.Tests.DynamicILInfoTests with an active issue out of rsp file
* Move skipped System.Reflection.Emit.Tests.DynamicILInfoTests.SetX_NullInput_ThrowsArgumentNullException and System.Reflection.Emit.Tests.DynamicMethodctor1.InvalidOwner_ThrowsArgumentException with an active issue out of rsp file
* Add an active issue to System.Threading.Tasks.Tests.TaskContinueWithTests.LongContinuationChain_ContinueWith_DoesNotStackOverflow because it's flaky
* Add an active issue to Tests.Integration.DiscoveryTests.DiscoverAddinsWithCombinedCustomExportAndMetadataAttribute
* Add an active issue to System.Threading.ThreadPools.Tests.ThreadPoolTests.SetMinMaxThreadsTest_ChangedInDotNetCore
* Add an active issue to System.ComponentModel.Composition.MetadataAttributeTests.StronglyTypedStructureTestWithTransparentViews
* Replace TargetFrameworkMonikers.Mono with TestRuntimes.Mono
* Remove redundant space
* Remove all -notrait category
* Add an active issue to System.ComponentModel.Composition.MetadataAttributeTests.StronglyTypedStructureTest
* Add an active issue to System.ComponentModel.Composition.CompositionContainerTests.GetExportOfTTMetadataView1_TypeAsMetadataViewTypeArgument_IsUsedAsMetadataConstraint
* Disable the whole System.ComponentModel.Composition.Tests namespace
* Move some System.Runtime.Loader.Tests, which rely on collectible AssemblyLoadContext, out of rsp file
* Remove three System.Runtime.Loader.Tests.AssemblyLoadContextTest tests with no local failures from rsp file
* Remove System.Runtime.Loader.Tests.DefaultLoadContextTests.LoadNonExistentInDefaultContext and System.Runtime.Loader.Tests.DefaultLoadContextTests.LoadInDefaultContext from rsp file because the related issues should be addressed
* Add an active issue to System.Runtime.Loader.Tests.DefaultLoadContextTests.LoadNonExistentInDefaultContext and System.Runtime.Loader.Tests.DefaultLoadContextTests.LoadInDefaultContext because they fail on CI
* Move several System.Runtime.Loader.Tests.AssemblyLoadContextTest with an active issues out of rsp file
* Remove System.Utf8String.Experimental.Tests from rsp file to verify how they behave on CI
* Clean up rsp file to check all remaining failures
* Skip the entire System.ComponentModel.Composition.Registration.Tests namespace on Mono
* Disable a set of classes in System.Utf8String.Experimental.Tests workspace.
* Add stubs for Utf8String and Utf8Span.cs classes to fix the test build on Mono
* Remove nint/nunit aliases unused in PNSE version of Utf8Span
* Remove CoreFX.issues.rsp file because it has been cleaned up
* Help compiler enforce nullability annotations
* Revert repro changes
* Simplifications
* Address feedback
* Tweak
* Another cleanup
* Fixup on ImportTypes
* Revert from T? to [AllowNull]T
* Enable nullability on one file
* Addressing PR feedback from Stephen
* Use Debug.Assert instead of pragma
* Revert "Use Debug.Assert instead of pragma"
This reverts commit f7175ba5427729ce60c898d5e7f00d9a4550e12d.
* 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