* 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.
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.
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.
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
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.
* Replace a few unnecessary uses of Convert.ToString
* Update src/libraries/System.Private.Xml/src/System/Xml/Schema/ContentValidator.cs
Co-authored-by: Christopher Watford <[email protected]>
Co-authored-by: Christopher Watford <[email protected]>
Since AOT'ing each test suite takes between 3-9 min, we need to shift the burden over to helix.
## This is done by:
1. building the test assemblies on the build machine
- the wasm part of the build is not executed on the build machine,
because it has the AOT build part
2. Zip up the test assembly+friends, *and* any bits required to run the wasm
app build for that on helix (eg. emsdk, wasm app targets, cross compiler etc)
3. Send all this to helix, and use a custom `aot-build.proj`
- which recreates all the build inputs for the `WasmBuildApp` target
using the paths for the assets on helix
- then we can run `WasmBuildApp` for the build, resulting in a wasm app
bundle.
4. Run the tests!
- We already have the bits required for building wasm apps on helix, supported
for `Wasm.Build.Tests`, which we can use here too.
## Trimming:
- Since, AOT can be so expensive, we use `EnableAggressiveTrimming=true`(EAT), but
that means that we could have issues due to trimming.
- And it can sometimes be unclear whether the build/test failures are due to trimming
or AOT.
- Because these builds+test runs are different from other builds, owing to the
"build partially on helix" step, a normal EAT build would not be the same as
- to help with testing this, we add two lanes to `runtime-staging`:
- `*_Mono_AOT`: builds AOT+EAT on helix
- `*_Mono_EAT`: builds EAT, on helix
- this is required because we want to run almost the same kinda
build: 1. build test assembly; *2. send to helix; 3. build wasm app;* 4. run tests
- This should effectively mean that we can see which errors might be due to EAT, and
which are clearly because of EAT+AOT.
Co-authored-by: Steve Pfister <[email protected]>
Co-authored-by: Marek Safar <[email protected]>
Co-authored-by: Mitchell Hwang <[email protected]>
Co-authored-by: Ankit Jain <[email protected]>
* Use [NotNullWhen(true)] in more places
Did a quick search/audit for methods that returned bool and took nullable object as the first input, and added [NotNullWhen(true)] where it was obviously correct.
* Address PR feedback
* Resolve ILLink warnings in System.Runtime.InteropServices
* Resolve ILLink warnings in System.ObjectModel
* Resolve ILLink warnings in System.Drawing.Primitives
Contributes to #45623
* Remove suppression no longer needed with the latest ILLinker.
* Annotate ComEventInterfaceAttribute.EventProvider to make it trim compatible.
* Added Rebecca Purple
Added Rebecca Purple color to System.Drawing.Color
Added RebeccaPurple (#663399) to KnownColorNames.cs, Color.cs, KnownColortable.cs and KnownColor.cs
#38244
* Added RebeccaPurple to UnitTest and Ref
Added RebeccaPurple color to the UnitTest and to the ref
Added RebeccaPurple a,r,g,b value to unittest in System.Drawing.Primitive. Also updated the ref.
#38244
* Added RebeccaPurple to the system.drawing.primitive ref
Added RebeccaPurple color to the System.Drawing.Primitive ref file.
"RebeccaPurple = 141" was added. I updated the other colors to their previous number by one.
#38244
* Reverted breaking changes in drawing.primitive ref
Reverted the breaking changes in system.drawing.primivite ref.
the numbers of colors were restored back and i removed rebeccapurple.
#38244
* Added RebeccaPurple to the ref
I added rebeccapurple to the ref file with value 175.
RebeccaPurple was added with value 175 to the bottom of the enum.
#38244
* Added rebeccapurple to bottom of Knowncolors.cs
I added rebeccapurple to theend of the file
RebeccaPurple was added to the bottom of the enum.
#38244
* Added Rebecca Purple
Added Rebecca Purple color to System.Drawing.Color
Added RebeccaPurple (#663399) to KnownColorNames.cs, Color.cs, KnownColortable.cs and KnownColor.cs
#38244
* Added RebeccaPurple to UnitTest and Ref
Added RebeccaPurple color to the UnitTest and to the ref
Added RebeccaPurple a,r,g,b value to unittest in System.Drawing.Primitive. Also updated the ref.
#38244
* Added RebeccaPurple to the system.drawing.primitive ref
Added RebeccaPurple color to the System.Drawing.Primitive ref file.
"RebeccaPurple = 141" was added. I updated the other colors to their previous number by one.
#38244
* Reverted breaking changes in drawing.primitive ref
Reverted the breaking changes in system.drawing.primivite ref.
the numbers of colors were restored back and i removed rebeccapurple.
#38244
* Added RebeccaPurple to the ref
I added rebeccapurple to the ref file with value 175.
RebeccaPurple was added with value 175 to the bottom of the enum.
#38244
* Added rebeccapurple to bottom of Knowncolors.cs
I added rebeccapurple to theend of the file
RebeccaPurple was added to the bottom of the enum.
#38244
* Fixed some of the requested changes with ordering of Enum
Removed a comment in "knowncolor.cs" and moved rebeccapurple to match enum order.
moved rebeccapurple in knowncolortable.cs, color.cs, and knowncolornames.cs
#38244
* Removed duplicates and added a comment
Added a comment in KnownColorNames.cs stating that the array follows order of knowncolor enum. Also removed duplicate rebeccapurple entries
#38244
* Fixing up the handling of RebeccaPurple
* Added a comment to explain changes
Added a comment in KnownColortable.cs stating that the code accounts for the system colors and new rebeccapurple color
#38244
Co-authored-by: Tanner Gooding <[email protected]>
* Add server core testing to Windows x64
* Add server core testing
* Use 20h1 queue instead
* Remove runtime testing until we get more capacity on 20H1 queue
* Use 2004 image
* Skip tests on Server core
* PR Feedback and fix build
* Disable more server core tests
* Disable more tests on Server Core
* Attempt fixing failing process test in server core
address feedback
* Fix PlatformDetection.IsInContainer for windows and feedback from Eirik's change
* PR Feedback
* Don't run server core on PRs yet until we get more capacity
Co-authored-by: Eirik Tsarpalis <[email protected]>
* Add granular suppressions for linker warnings
* Add suppressions for mono SPC
* Misc additions
* Add suppressions for Debug config
* Fix Android xml file
* Include System.ComponentModel.Annotations suppressions
* Add suppressions for System.Security.Cryptography.X509Certificates on Linux
* Fix TargetOs exists check
* Add IL2077 to System.Security.Cryptography.X509Certificates on Android
* Generalize some System.Security.Cryptography.X509Certificates suppressions to 'NonWindows'
* Remove ref to catch-all System.Security.Cryptography.X509Certificates file
* Misc clean up and some feedback
* Use ILLinkDirectory in CreateRuntimeRootILLinkDescriptorFile.targets
* Update paths for directories
* Set TargetPath as part of include
* Delete bin-placing TODO
* Include more xml files during per-library run
* Include more xml files during per-library run, pt 2
* Include more xml files during per-library run, pt 3
* Try including System.ComponentModel.Annotations based on BuildingNETCoreAppVertical
* Switch to BuildAllConfigurations
* Include xml extension in file paths
* Remove version number from assembly suppression files
* Delete ILLink.Suppressions.xml
* Try removing IL2035 nowarn
* Remove version from Microsoft.VisualBasic.Core assemly name
* Move EditorAttribute to System.ComponentModel.Primitives
* Add EditorAttribute to types that had it in netfx and fix some DesignerSerializableAttributes
* PR Feedback
* PR Feedback
- 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)"
Some of our full facades are missing `<Nullable>enable</Nullable>`. I don't think the lack of these causes any issues, but having them makes it easy to confirm what ref assemblies remain to be annotated.
* Enable analyzer rule xUnit1024
* Remove redundant test in System.Text.Json
The very next method is a Theory with inline data that tests this
exact scenario.
* Rename test methods in System.Text.Json
* Rename test methods in System.ComponentModel.Annotations
* Private methods -> local functions in System.Text.Json
* Rename test methods in System.Collections.Immutable
For RemoveNonExistingTest, just moved the logic from the single-use
helper into the method with the Fact attribute.
* Rename test methods in System.Globalization
* Rename test methods in System.Runtime.Extensions
In Math.cs, removed Round_Decimal_Digits Fact which manually tested
cases included in the MemberData of a Theory with the same name.
* Rename test methods in System.Private.Uri
* Rename test methods in System.Runtime.WindowsRuntime.UI.Xaml
* Rename test methods in System.Security.Cryptography.X509Certificates
* Rename test methods in System.Reflection
* Remove redundant test in System.IO.FileSystem.Watcher
Theory EndInit_ResumesPausedEnableRaisingEvents alredy tests
the same scenario as the removed Fact of the same name.
* Rename test methods in System.IO.FileSystem.Watcher
* Rename test methods in System.Composition.Runtime
* Rename test methods in System.Drawing.Primitives
* Rename test methods in System.Reflection.Emit
* Rename test methods in System.Text.RegularExpressions
* Private methods -> local functions in System.Threading.Tasks.Parallel
* Rename test methods in System.Threading.Tasks.Parallel
* Rename test methods in System.Threading.Tasks
* Simplify tests in System.Threading
* Rename test methods in System.Threading
* Rename test methods in Microsoft.VisualBasic.Core
* Rename test methods in System.DirectoryServices.AccountManagement
* Private methods -> local functions in System.Text.Encoding
* Rename test methods in System.Text.Encoding
* Rename test methods in System.Security.Cryptography.Primitives
* Rename test methods in System.Runtime.Numeric
* Rename test methods in System.CodeDom.Tests
* Rename test methods in System.Reflection.Emit.ILGeneration
* Rename test methods in System.Composition.AttributedModel
* Rename test methods in System.Data.DataSetExtensions
* Rename test methods in System.Runtime
* Rename test methods in System.Runtime.InteropServices
* Remove redundant test in System.ServiceModel.Syndication
* Rename test methods in System.ServiceModel.Syndication
* Rename test methods in System.Data.Common
* Rename test methods in System.Security.Cryptography.Xml
* Private methods -> local functions in System.Security.Cryptography.Xml
* Simplify tests in System.Security.Cryptography.ProtectedData
* Replace private methods with local functions...
In System.Security.Cryptography.Algorithms
* Rename test methods in System.Security.Cryptography.Algorithms
* Simplify tests code in System.Collections.Concurrent
* Rename test methods in System.Drawing.Common
* Rename test methods in System.Data.OleDb
* Rename test methods in System.ComponentModel.TypeConverter
* Rename test methods in System.Web.HttpUtility
* Rename test methods in System.Linq
* Private method -> local function in System.Linq
* Rename test methods in System.Memory
* Rename test methods in System.IO.IsolatedStorage
* Rename test methods in System.DirectoryServices.Protocols
* Rename test methods in System.Globalization.Extensions
* Private methods -> local functions in System.Globalization.Extensions
* Rename test methods in System.IO.Compression
* Rename test methods in System.Security.Cryptography.Encoding
* Rename test methods in Microsoft.Win32.Registry
* Rename test methods in System.IO.UnmanagedMemoryStream
* Rename test methods in System.Collections
* Rename test methods in System.Collections.Specialized
* Rename test methods in System.Private.Xml
* Rename test methods in System.IO.FileSystem
* Rename test methods in System.Diagnostics.StackTrace
* Rename test methods in System.Diagnostics
* Improve some test method renames
* Minor nit fixing
* More improvements to test method names
* 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
* 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.
* Address more issue numbers in the code
Replaced a bunch of unadorned issue numbers with links, so we know which repo the issue is for. In some cases the repo was named, but for consistency I still replaced it with a link.
In some cases, in particular where the issue had been closed saying effectively "we're not going to do anything here", I removed TODOs and the associated issue numbers.
In a few cases, the TODO and issue number was to say "we should do X when Y is fixed", so I did X since Y was fixed.
* Apply suggestions from code review
Co-Authored-By: Jan Kotas <[email protected]>
* Address PR feedback
* Fix OrderedEnumerable by using MemoryExtensions.Sort
Co-authored-by: Jan Kotas <[email protected]>
* 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
* 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 \