Some fixes (adding imports, adding Platforms package) were tooled, but more complex ones (forking project.jsons, editing csproj's) were not.
Also makes dependency version validation rules case-insensitive. (I used this fix to update the versions of some packages.)
[tfs-changeset: 1573868]
Commit migrated from https://github.com/dotnet/corefx/commit/84af04317505d48feaa1e83dd5dc27ddc0f6de76
These contain the same libraries shipped at UWP RTM, repackaged in the
latest nuget format (netstandard, runtime packages, etc).
We use them as the baseline for package dependencies so that we can have
CoreFx packages use updated packages with netstandard support without
breaking shared library.
Directory structure:
Folder per package that will be redistributed.
Lib folder contains a deployment project (depproj) to restore and wrap
the old implementation DLLs.
We reuse the ref depproj's in the src tree to restore and wrap the old
reference DLLs.
New package projects are created depending on what type of project we
are trying to redist.
Standalone packages contain a single package, redisting ref and lib.
Runtime packages with API change in latest contain a reference package
redisting ref, and runtime packages redisting lib.
Runtime packages with no API change in latest contain runtime packages
redisting lib, and a validation-only package for reference. These
validation-only packages do not actually build any output since the live
reference packages are sufficient (no API change).
In any case where we needed to insert a version that would collide with
the latest package version we bumped up the current package version.
Here's a table of what is contained here:
Package name | UWP RTM version | Live version | What we need to ship
-------------|-----------------|--------------|---------------------
System.Collections | 4.0.10.0 | 4.0.11.0 | runtime packages
System.Collections.Concurrent | 4.0.10.0 | 4.0.11.0 | pre-versioned standalone package
System.Diagnostics.Tracing | 4.0.20.0 | 4.1.0.0 | pre-versioned ref + runtime packages
System.Dynamic.Runtime | 4.0.10.0 | 4.0.11.0 | runtime packages
System.IO | 4.0.10.0 | 4.1.0.0 | pre-versioned ref + runtime packages
System.Linq | 4.0.0.0 | 4.0.1.0 | pre-versioned standalone package
System.Linq.Expressions | 4.0.10.0 | 4.0.11.0 | runtime packages
System.ObjectModel | 4.0.10.0 | 4.0.11.0 | pre-versioned standalone package
System.Reflection.Extensions | 4.0.0.0 | 4.0.1.0 | runtime packages
System.Reflection.Primitives | 4.0.0.0 | 4.0.1.0 | runtime packages
System.Reflection.TypeExtensions | 4.0.0.0 | 4.1.0.0 | pre-versioned ref + runtime packages
System.Resources.ResourceManager | 4.0.0.0 | 4.0.1.0 | runtime packages
System.Runtime.Extensions | 4.0.10.0 | 4.1.0.0 | pre-versioned ref + runtime packages
System.Runtime | 4.0.20.0 | 4.1.0.0 | pre-versioned ref + runtime packages
System.Text.RegularExpressions | 4.0.10.0 | 4.0.11.0 | pre-versioned standalone package
This change also ensures that our pre-versioned packages include support
for dotnet5.4, and therefor dnxcore50. This garuntees that if someone were
to upgrade an individual package from RTM we still support all frameworks
that were supported at UWP RTM.
This will likely never occur since we'll produce a new lineup that uses
the latest runtime packages on DNXCore50, but we should preserve our
compat promise without requiring folks to update their lineup.
This is part of the work for https://github.com/dotnet/corefx/issues/5707.
/cc @weshaggard @chcosta
[tfs-changeset: 1571918]
Commit migrated from https://github.com/dotnet/corefx/commit/c8896fb3a3346326fb670fca5632527fc0eaf180
This these .builds files were updated and generated from a script
based on the configurations defined in the matching csproj files.
This updates the builds files to specify OSGroup and TargetGroup
as metadata instead of using AdditionalProperties and also sorts them by
TargetGroup followed by OSGroup.
Commit migrated from https://github.com/dotnet/corefx/commit/95efe37475916016a5fc6ee6f0ba584d990c4196
This add a default configuration before the Import of dirs.props
for any projects that don't have Debug as the default configuration.
Removed Configuration and Platform properties set after dirs.props
as they would have no affect and just cause confusion.
Removed OutputType=Library property as it isn't necessary.
Commit migrated from https://github.com/dotnet/corefx/commit/9e1da13cf6d5ff4b37b1867beb3411a2fe61da6a
The internal ReadOnlyList used by NotifyCollectionChangedEventArgs
has all virtual members that don't need to be virtual. This commit
makes ReadOnlyList sealed and includes some minor cleanup (parameter
names to match the interfaces, Debug.Assert, and Object -> object).
Commit migrated from https://github.com/dotnet/corefx/commit/41a1e8b61456644cc6ca58654e06f8a6ba9039f9
These facade project files were generated using a porting tool I wrote,
which examined some information from our internal build and created
appropriate project files. I have also re-generated all of the .builds
files so that they import the facade projects in the correct manner.
Commit migrated from https://github.com/dotnet/corefx/commit/58e2f6e862060039e1ebad727d75c87703fdb2f2
Methods on KeyedCollection<TKey, TItem> will internally loop over its
Items using foreach before the dictionary threshold is reached. Items
is a protected (non-virtual) property defined on the base
Collection<T> class and typed as IList<T>. This means
KeyedCollection<TKey, TValue> members like Contains and Item[TKey]
allocate an enumerator when looping over Items.
We can avoid the enumerator allocations inside
KeyedCollection<TKey, TValue> by providing a new private Items
property that is typed as List<T>, so that List<T>'s struct
enumerator is used, which also avoids interface dispatch.
KeyedCollection<TKey, TItem>'s constructors call the default
Collection<T> constructor which already initializes Items to
an instance of List<T>, so this change is just being explicit
about the use of List<T> for Items.
Commit migrated from https://github.com/dotnet/corefx/commit/75392f1aafd8498bca3dd54c9715a45348c61d84
Instead of enumerating through the IEnumerable<T> directly, make use
of the List<T> constructor that takes an IEnumerable<T>, which has
optimizations for collections that implement ICollection<T>.
Also, cleaned up the ObservableCollection constructor/property tests.
Commit migrated from https://github.com/dotnet/corefx/commit/6992ca092454231f8152d4f771d2d6d7416de44d
A change was made to DNX to no longer restore project.jsons
that are in nested folders. This caused my batch update to miss
a number of tests and reference assembly projects.
This fixes the stale lock files, but restore is still broken.
[tfs-changeset: 1540448]
Commit migrated from https://github.com/dotnet/corefx/commit/3622cccc1b22fa1947a72d5126b59864e9d2fd0d
We need a new DNX to understand the latest packages.
We also need to move all "dotnet" projects to use dotnetX.X (generations)
now that the packages no longer have "dotnet" assets.
The new version of DNX dropped support for the aspnetcore
so I needed to update a few projects/packages that depended
on old package versions that had this moniker.
[tfs-changeset: 1540388]
Commit migrated from https://github.com/dotnet/corefx/commit/38f8d7a3ca1ee819c2b8eabb1c07ee4e99683c97
All projects that previously used dotnet have been updated to specify the appropriate generation of the surface area they depend on or in the case of desktop inbox contracts, the generation that includes the set of platforms they can support.
Now all packages contain all generations of API that they have ever shipped.
In doing this I needed to change how we determine package version. Before we ensured all assemblies would have the same version and used that. Now we choose the max.
Additionally I needed to change how we chose which asset to use for netcore50 when the dotnet asset was obscured by a placeholder for a previous netcore release (eg System.Runtime will have placeholders for Win8 since it was inbox there). To do this I wrote a task that uses nuget to evaluate the package assets with and without the placeholders. In this way it chooses the "best" dotnet implementation and reference assembly to use for netcore50.
This new model made my old MSBuild-based validation impossible to carry forward, so I wrote better validation in a task that actually uses Nuget's asset resolution algorithm. This uncovered many existing issues in packages that I have cleaned up. The validation algorithm could use some polish but its working now. Perf is not great, package build went from 15s to ~2 minutes. I'll work on this some more by making it incremental (input: nuspec, output: marker created on success). Profiling shows that most of the time is spent in calling the nuget APIs. I'll see if I can reduce some of this with caching for things that don't change (eg: RID graph). Ultimately I think its a reasonable tradeoff for the types of bugs I can find this way.
[tfs-changeset: 1539216]
Commit migrated from https://github.com/dotnet/corefx/commit/0931c347eb836c9da94d0d5ff9ad7a14403b9738
Our common tests folder has gotten a bit unwieldy in its organization. This change simply moves files around to better map to how src\Common\src is organized. Files are now stored in a path based on functionality/namespace.
I mostly kept groups of functionality together and did not attempt to reorganize at that level, e.g. I moved the src\Common\tests\System.Xml.XPath\ folder to be src\Common\tests\System\Xml\XPath\ and did not further reorganize all of the folders/files it contains. Such cleanup can be done separately on each individual area.
Some of the files also need to be cleaned up internally, e.g. the namespace (or lack thereof), so I put such things in a path that I thought made sense even if it differs from the current namespace in the file; I wanted this change to be relatively simple and just be about moving files around to clean up the main hierarchy.
Commit migrated from https://github.com/dotnet/corefx/commit/9a5546c439f7700d3462564678aa4206c7fbf4f1
Patterns mostly were of the form:
```
if (someBooleanCondition)
{
Assert.True(false, ....);
// Or sometimes Assert.False(true, ....);
}
```
or
```
try
{
SomeErrorThrowingOperation
Assert.True(false, ....);
// Or sometimes Assert.False(true, ....);
}
catch (ExpectedExceptionType e)
{
}
```
This replaces most instances with calls to the proper Xunit.Assert#### .
Some additional minor work was performed as noted with the affected package.
Add common ShouldNotBeInvokedException
System.Collections
- Partially unwind edges of internal test framework.
System.Collections.Concurrent
- Switch some tests to use InlineData instead of delegated method calls.
System.Collections.Immutable
- Use ShouldNotBeInvokedException to state some lambdas should not be called.
System.Collections.NonGeneric
System.Composition
- Partially unwind internal test famework.
- Switch to using xunit asserts where possible.
System.Diagnostics.Contracts
- Use ShouldNotBeInvokedException to state some lambdas should not be called.
- Update project file to use upper case letter in hash.
System.Diagnostics.FileVersionInfo
- Switch to direct equals comparison.
System.Diagnostics.Process
- Use ShouldNotBeInvokedException to state a task should exit.
System.Diagnostics.Tracing.Telemetry
- Use ShouldNotBeInvokedException to state an overridden method should not be called.
System.Globalization
- Switch to direct equals comparisons in some cases.
System.Globalization.Extensions
- Switch to direct equals comparison in some cases.
System.IO.Compression.ZipFile
System.IO.FileSystem
- Partially unwind internal test framework.
System.IO.Packaging
- Correct test T006 to check that adding absolute Uri part in internal mode is invalid.
System.ObjectModel
- Use ShouldNotBeInvokedException to state some observables should execute.
System.Reflection
- Update readonly-set test to verify that the field is set (previous test implied it was not).
System.Reflection.Extensions
System.Reflection.Metadata
- Partially remove internal test framework.
- Switch to xunit asserts where possible.
System.Reflection.TypeExtensions
System.Runtime
System.Runtime.Extensions
- Switch to xunit bounded equals for doubles.
- Switch to verifying non-varags Path.Combine override.
System.Runtime.Numerics
- Switch to xunit Assert.Throws from internal version.
System.ServiceProcess.ServiceController
System.Text.Encoding
System.Text.Encodings.Web
System.Threading
System.Threading.Tasks.Dataflow
System.Threading.Tasks.Parallel
System.Xml.ReaderWriter
- Switch to form verifying exception is thrown.
System.Xml.XmlDocument
- Use ShouldNotBeInvokedException to state some handlers should not be called.
Commit migrated from https://github.com/dotnet/corefx/commit/ab1743b45213e88295a38e2bf9d80ded09058b18
The corefx build used an older beta5 version of DNX which hardcoded the path to bash in dnu, breaking the build on FreeBSD.
Updating DNX to the latest "stable" beta7 release fixes this.
After updating I noticed a few test projects didn't build anymore as they were missing some dependencies in project.json, added those.
Fixesdotnet/corefx#3173
Commit migrated from https://github.com/dotnet/corefx/commit/6df77fdbb6cf8e0d35a3074bb325f7810085daa3
This change updates the assembly versions of all of the corefx assemblies
as needed after we shipped stable versions. Assemblies with API differences
get a minor version bump. Assemblies with only bugfixes get a build version
bump.
In order to facilitate this I had to update the reference assemblies, so I took
the opportunity to port them all to the open.
[tfs-changeset: 1514419]
Commit migrated from https://github.com/dotnet/corefx/commit/40723b795917f2e98b64d45c17effb2546dd0cae
This change modifies the build to consume the stable version where available.
This disables building the dowlevel packages since we shipped them once as stable and we're done.
From here on out, we'll only build the latest version (except for a servicing event, which would
be handled by syncing to a hash).
I can't rev the package versions in the normal way yet (by modifying the assembly version of the contents)
because that turned out to be too big of a problem to tackle in this change. Instead I added a
parameter to the task that calculates package versions to do the rev for anything that was
stable, but only when building the package itself, not when calculating the dependencies.
This has the downside of not permitting a dependency on a incremented pre-release version if we've
shipped a stable version, but that is a small point in time problem until I can rev the assembly
versions.
[tfs-changeset: 1508664]
Commit migrated from https://github.com/dotnet/corefx/commit/ee1ec2891c7c65b46fa9dfb078636be503bb2a60
This change adds the lock files to repo to ensure we build against a stable set of dependencies. To explicitly update dependencies use build.cmd /T:RestorePackages /P:LockDependencies=true and this will pick up the latest depenedencies.
Existing projects adding new dependencies will automatically update the lock file incrementally.
New projects should make sure to check their lock file in with locked set to true.
[tfs-changeset: 1474296]
Commit migrated from https://github.com/dotnet/corefx/commit/d2fbc005707933db1cebca035d6cd6073af6cae4