There are a variety of situations in which a link-and-delete could fail but a copy-and-delete could succeed. This commit adds some more cases where we fall back. It also improves the exception thrown in a few cases to include more details about the cause.
Commit migrated from https://github.com/dotnet/corefx/commit/0997a29941f2109002181d4d6c22434b2ee31d04
We removed the lifting from the lineup so tests should reference the
latest packages in order to ensure an implementation is available.
The latest pacakges exclude implementation dependencies so I needed to
add these to projects that were depending on them coming in transitively.
Commit migrated from https://github.com/dotnet/corefx/commit/bef9061fd1238adf47b864d8924d121e4134465b
The latest drop of packages no longer includes lifting entries in the
lineup. This causes errors when restoring for a concrete TFM and no
implementation assembly is in the packages.
I addressed this issue two ways:
1. In places where we were targeting a concrete TFM but packaging as
NETStandard, just target NETStandard instead.
2. In places where we were targeting a concrete TFM but that packages
were missing the implementation on that TFM, update the reference to
newer package version where implementation is available.
Commit migrated from https://github.com/dotnet/corefx/commit/dfb30176c6056f5b3427515c4444a9dc31b9ba4f
flock on OSX can fail with ENOTSUP if "the referenced descriptor is not of the correct type", e.g. if it's a FIFO. Since we don't want to entirely prevent usage of FileStream with such file types on OSX, and since locking is already advisory only, this change just ignores rather than throws when flock fails with ENOTSUP.
Commit migrated from https://github.com/dotnet/corefx/commit/38177bc1de3a73ef5e8b5f449478ea588406a4b4
We currently have UnixFileStream create new files with the permissions 700. This doesn't map to what's commonly expected on Unix, where most utilities default instead to 666.
This commit changes the default to be 766, which attempts to map to what's commonly expected on Unix, while also factoring in the default on Windows, where a new file can be executed by default. All of these permissions are of course subject to the system's umask, such that the actual permissions applied will likely be less than what's specified.
The commit also fixes up some code in X509Certificates, which was coded to rely on the more limited permissions being applied.
Commit migrated from https://github.com/dotnet/corefx/commit/96db5d58baaaa5890bdacb3d767434d36a85fbc7
We've visited this topic a few times... hopefully this is the last. We previously misunderstood some of how Windows handles symlinks, leading us to make some invalid choices on Unix. This addresses those issues.
For the most part with this commit, we now match Windows behavior on Unix wherever possible, while also trying to do something sensible on the Unix side. The only notable difference now comes into play for broken symlinks, due to a fundamental difference between symlinks on Windows and Unix: on Windows, a symlink is created as either a file or directory symlink and thus .NET can tell which it is even if it's broken... on Unix, a symlink only stores a path to its target, so when it's broken, there's no information about whether it's intended to be a file or a directory. As a result, we fall back to always treating it as a file.
Commit migrated from https://github.com/dotnet/corefx/commit/59da18fc926397f6674e1de86e296ca6e0dfe067
We decided in the design meeting today that we should only be using ArrayPool in corefx itself in places where we can guarantee the types/methods won't cause corruption, even if due to misuse. Some of the usage we've already put in place doesn't meet this bar and needs to be removed. For example, we use ```ArrayPool<byte>.Shared``` in a special CopyToAsync implementation, but in doing so we hand a buffer from the pool out to the constiuent streams, and a poorly behaving stream could end up holding on to the buffer even after CopyToAsync has returned to the pool, such as if a Stream.WriteAsync implementation had a bug and completed the returned task before it was actually done with the buffer.
This commit removes all such usage (which we only very recently added).
Commit migrated from https://github.com/dotnet/corefx/commit/908c81d7a8c98f3f4dc1f6302ad7690a952c33c4
Correct instances of new "ArgumentException(nameof(..." so names are in the correct parameter. Where possible, I chose the resource string I felt best fit the situation. Otherwise, I created a new entry (I'm assuming there's some extra work that needs to be done there, but don't know what it is offhand).
Commit migrated from https://github.com/dotnet/corefx/commit/368fdfd86ee3a3bf1bca2a6c339ee590f3d6505d
Fixes https://github.com/dotnet/corefx/issues/5707
We are changing the .NET packages to no longer use the ‘dotnet’, ‘dotnet5.x’, and ‘dnxcore50’ monikers. This is thee first stage of the change for dotnet->netstandard.
The replacements are as follows
Old moniker | New moniker
----------------- | ------------------
dotnet5.x | netstandard1.y (where y = x -1)
DNXCore50 | netstandardapp1.5
dotnet | netstandard1.3
To prepare for this change you can do the following to your project.json. This change will require a recent build of NuGet or dotnet.exe and can be done prior to consuming the packages with the breaking change. These packages will not work with DNX.
For a project targeting dotnet5.6
```
"frameworks": {
"netstandard1.5": {
"imports": [ "dotnet5.6" ]
}
},
```
For a project targeting dnxcore50
```
"frameworks": {
"netstandardapp1.5": {
"imports": [ "dnxcore50", "portable-net45+win8" ]
}
},
```
[tfs-changeset: 1578321]
Commit migrated from https://github.com/dotnet/corefx/commit/4435f9f2776ae007e05f4454675e56cf76a51975
* Move all of the project configurations currently living in the
"facade\<lib>.csproj" files into the root library project. This means
there will now be only one project file for the source build of each
library, regardless of how many configurations it has. The .builds file
of each library will only reference that single project file multiple
times.
* Do some minor cleanup of project files along the way. Fix up the VS
default configuration blocks to be a bit more uniform. Remove redundant
defaults (OutputType, PlatformTarget, etc. Fix some condition spacing.
Commit migrated from https://github.com/dotnet/corefx/commit/26edfd6839044ca6368e28502e0893c1b1819b4c
These were missed by my automated scan in replacing parameter names with nameof because they're the wrong name. (There are some others that weren't replaced to, but most of those are because they're in private methods that use a different name for the argument, but the name used to the exception is the name in the publically exposed method... I didn't touch those.)
Commit migrated from https://github.com/dotnet/corefx/commit/95c0419f8cefb8e84eaecb4dacf08052312a5bb8
Put capitalization fixes back in place after some merge conflicts removed them. These fixes work around a xplat nuget restore race condition when there are multiple capitalizations of the same package ID in one restore command.
Commit migrated from https://github.com/dotnet/corefx/commit/b0660c5eee295fc011f9b755b06ec3bfb50f1f12