ID Area Title Description 17 area-System.Xml Some XPath.XDocument tests are failing Some XPath.XDocument queries have different results than other XPath navigators. This might be an old behavior or newly introduced bug. Failing tests: build /p=IncludeTraits=ActiveIssue=17 20 area-System.Xml 2 XPath.XDocument tests fail because of lacking feature "XPath.XDocument navigator doesn't support MoveToId(string). Verify if this was ever supported. If it was, verify if we want to support it in the future. If it wasn't move the tests to a different file and remove them from XPath.XDocument.Tests project. Failing tests: NodeSetFunctionsTest2267 MatchesTest2352 " 22 area-System.Numerics Two Numerics Tests are failing only on our CI server Two of the tests in our System.Numerics.Vectors suite are failing only on our CI build server, and potentially only intermittently: Vector2NormalizeTest1 Vector4NormalizeTest2 Given that these are very similar to other tests which cover a similar edge-case (especially the Vector3 normalization tests, which aren't failing), we will need to investigate why these tests in particular are failing on our build server. This may have been a point-in-time issue as we brought up our build infrastructure, and may not re-surface again. 36 area-System.Numerics SIMD test failures on non-ENU configurations. After pulling both of @adamralph 's pull requests #31 and #32, I'm continuing to see test failures for SIMD on a DEU (German) test environment. Here's a representative error: d:\oss\corefx\src\System.Numerics.Vectors\tests\GenericVectorTests.cs(545): error : System.Numerics.Tests.GenericVe ctorTests.ToStringCurrencySByte: Assert.Equal() Failure\r\nPosition: First difference is at position 8\r\nExpected: <97,00 ?, -108,00 ?, 22,00 ?, 29,00 ?, 49,00 ?, 60,00 ?, 103,00 ?, 58,00 ?, -62,00 ?, -124,00 ?, -117,00 ?, 48,00 ?, 15,00 ?, -35,00 ?, -13,00 ?, -34,00 ?>\r\nActual: <97,00 ?. -108,00 ?. 22,00 ?. 29,00 ?. 49,00 ?. 60,00 ?. 103 ,00 ?. 58,00 ?. -62,00 ?. -124,00 ?. -117,00 ?. 48,00 ?. 15,00 ?. -35,00 ?. -13,00 ?. -34,00 ?> [D:\oss\corefx\bin\ tools\fxbuild.proj] Observe that expected separates elements with a comma, actual separates elements with a dot. 41 area-System.Numerics Quaternion operator overloads should be using the respective methods Quaternion declares a handful of methods to perform addition, subtraction and multiplication, and provides the respective overloads for these operations. However, instead of re-using the `Add`, `Multiply` etc. methods, the code is re-written in the operator overloads. The operators should be using their respective methods rather than re-declaring the same code. This is under the assumption that the JIT inlines the methods when they are used in the operator overloads. 49 area-Infrastructure Add Linux/Mac build script A `build.sh` should be added alongside `build.cmd` to build corefx on Linux/Mac. 50 area-System.Numerics Made Quarternion's operator overloads use their respective methods "Operator overloads of Quaternion now utilize their respective methods, and removed redundant ""this"" qualifiers in Quaternion constructor. " 52 area-Meta ReferenceSource repo license incorrect for individual files some of the files I looked up, it has header comment with Apache 2.0 license. which license should apply for those files? MIT or Apache 2.0 54 area-System.Xml "Remove always true ""if"" and unreachable code in System.Xml.Linq.XObject.SkipNotify method." "This: if (o.Annotations() != null) is always true because the above while can finish only in two conditions: when o != null or when o.annotations == null. The first condition will be catched by "" if (o == null)"" and if the second one is true, ""o.Annotations() != null"" will also always be true i think. " 55 area-System.Xml [Issue 54] Removed always-true if and unreachable code in XObject.cs Removed always-true if and unreachable code in XObject.cs 58 area-System.Xml System.Xml.sln fails to build on Mono, error CS0433 **I know that cross-platform support is coming later, I just thought it might make sense to document this here in case someone else tries the same** Building System.Xml.sln with xbuild on Mono doesn't work (the other solutions build fine), it throws the following errors: ``` Build FAILED. Errors: /home/alexander/dev/corefx/src/System.Xml.sln (default targets) -> (Build target) -> /home/alexander/dev/corefx/src/System.Xml.XPath.XDocument/System.Xml.XPath.XDocument.csproj (default targets) -> /usr/lib/mono/4.5/Microsoft.CSharp.targets (CoreCompile target) -> System/Xml/XPath/XAttributeExtensions.cs(10,56): error CS0433: The imported type `System.Xml.Linq.XAttribute' is defined multiple times System/Xml/XPath/XAttributeExtensions.cs(10,78): error CS0433: The imported type `System.Xml.Linq.XNamespace' is defined multiple times System/Xml/XPath/XDocumentExtensions.cs(22,61): error CS0433: The imported type `System.Xml.Linq.XNode' is defined multiple times System/Xml/XPath/XObjectExtensions.cs(10,23): error CS0433: The imported type `System.Xml.Linq.XContainer' is defined multiple times System/Xml/XPath/XObjectExtensions.cs(10,49): error CS0433: The imported type `System.Xml.Linq.XObject' is defined multiple times System/Xml/XPath/XNodeNavigator.cs(48,9): error CS0433: The imported type `System.Xml.Linq.XElement' is defined multiple times System/Xml/XPath/XNodeNavigator.cs(784,35): error CS0433: The imported type `System.Xml.Linq.XText' is defined multiple times ``` It looks like it runs into a conflict with the System.Xml.Linq library in the Mono GAC. Needs further investigation. 69 area-Infrastructure build.cmd does not build solution on HP laptop (when Platform=MCD is pre-set) "I've got HP laptop with windows 7. When I run build.cmd, I've got the error ""configuration is invalid"" ``` C:\Projects\dotnet\corefx>build.cmd C:\Projects\dotnet\corefx\src\System.Collections.Immutable.sln.metaproj : error MSB4126: указанная конфигурация решения ""Release|MCD"" недопустима. Укажите допустимую конфигурац ию решения с помощью свойств Configuration и Platform (например, MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform=""Any CPU"") или оставьте эти свойства пустыми, чтобы использовать конфигурацию решения по умолчанию. [C:\Projects\dotnet\corefx\src\System.Collections.Immutable.sln] ``` The reason of this error is that environment variable `Platform` is set to `MCD` on the laptop by default. I have to change build command in the build.cmd by adding `/p:Platform=""Any CPU""` to compile the project. Build script should check for allowed platforms and generate user-friendly error message, which says what to do to successfully compile the project when the platform is not supported. " 70 area-Meta Hello, World! sample "Feature request: please add ""Hello, World!"" sample, which shows how to use .NET Core with user applications. " 71 area-System.Numerics Behaviour of `Quaternion.CreateFromAxisAngle` when axis is not a unit vector "The resulting quaternion depends on the length of `axis`. This does not describe a rotation and thus does not match the documentation. There are a few ways to handle this issue: 1. Normalize `axis`, but this incurs a performance hit 2. Add a precondition that `axis.Length()` ≈ 1. But enforcing that pre-condition is about as expensive as 1), so it'd probably need to be a documentation-only precondition. Unfortunately this means that consumers will rely on the current behaviour even if it's undocumented, so I don't think that this is a good solution. 3. Document the current behaviour --- Just for convenience, the relevant source code: ``` /// /// Creates a Quaternion from a vector and an angle to rotate about the vector. /// /// The vector to rotate around. /// The angle, in radians, to rotate around the vector. /// The created Quaternion. public static Quaternion CreateFromAxisAngle(Vector3 axis, float angle) { Quaternion ans; float halfAngle = angle * 0.5f; float s = (float)Math.Sin(halfAngle); float c = (float)Math.Cos(halfAngle); ans.X = axis.X * s; ans.Y = axis.Y * s; ans.Z = axis.Z * s; ans.W = c; return ans; } ``` " 72 area-System.Numerics `Equals` with NaN values (IEEE vs. reflexivity) The built in floating point types compare `NaN` as unequal when using `==` and `!=` (following IEEE semantics) but compare it as equal when using the `Equals` method. Your floating point based types currently use IEEE semantics even for `Equals`. I suggest using the same behaviour as the built in types in your floating point based types like vectors or quaternions. The MSDN documentation of `Equals` contains an exception that allows `A.Equals(A)` to return false on floating point types, so you don't strictly violate its contract. But returning false still breaks hash tables and does not match the behaviour of the built in types, so I consider it a bad idea. This can be avoided by calling `Equals` on the members instead of `==` in the implementation of `Equals` but not in `==` and `!=`. For example with quaternion, replace ``` public bool Equals(Quaternion other) { return (X == other.X && Y == other.Y && Z == other.Z && W == other.W); } ``` with ``` public bool Equals(Quaternion other) { return (X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z) && W.Equals(other.W)); } ``` You might want to add tests that check that `==` and `!=` compare all the above cases as unequal, so that they match the IEEE specification. Replace: ``` // Counterintuitive result - IEEE rules for NaN comparison are weird! Assert.False(a.Equals(a)); Assert.False(b.Equals(b)); Assert.False(c.Equals(c)); Assert.False(d.Equals(d)); ``` with: ``` // Equals does not follow IEEE semantics since many consumers rely on equality being reflexive. // This includes collections like `Dictionary` or `HashSet` Assert.True(a.Equals(a)); Assert.True(b.Equals(b)); Assert.True(c.Equals(c)); Assert.True(d.Equals(d)); // Counterintuitive result - IEEE rules for NaN comparison are weird! Assert.False(a == a); Assert.False(b == b); Assert.False(c == c); Assert.False(d == d); Assert.True(a != a); Assert.True(b != b); Assert.True(c != c); Assert.True(d != d); ``` 77 area-System.Xml Some Xml encoding tests lost their encoding Some of Xml tests were testing problematic characters in different Encoding (like Russian characters). At some point few years back the encoding was lost while moving between different repos. Tests pass because .cs files lost their encoding too. Tests need to be rewritten since there is no trace of original copy 81 area-System.Xml Add test coverage for XPath and XDocument - Adding test coverage for XPath implementations (XPath.XPathDocument, XPath.XmlDocument, XPath.XDocument) - Adding some tests for XDocument (more coming later) 94 area-Meta Necessary bits for Mono.Posix I tried to build [Mono.Posix](https://github.com/mono/mono/tree/master/mcs/class/Mono.Posix) against aspnetcore50 and found a lot of API that mono uses to be missing from .NET Core most prominently in the Interop-domain (like CustomMarshaler). Please add Mono.Posix to your list of scenarios that can benefit from the API surface of .NET Core. 110 area-System.Xml Add async document/element loading for XLinq. Adds XElement.LoadAsync and XDocument.LoadAsync. Code from the sync versions has been largely lifted out so they can share an implementation as much as possible. 116 area-System.Numerics Quaternion and public fields Is there a reason that the Quaternion struct has public exposed fields versus read only properties? Seems to be against the general guidelines for structs and immutability. Why would you want to allow X, Y, Z and W to be set outside of the ctor? 118 area-System.Numerics Matrix4x4 - more useful public properties Forward, Backward, Up, Down, Left, Right public properties for Matrix4x4 119 area-System.Numerics Vector3 - more public static properties Up, Down, Left, Right, Forward, Backward vector public static properties 121 area-System.Numerics Matrix4x4 - more useful public properties Added Forward, Backward, Up, Down, Left, Right vectors public properties for Matrix4x4. Fix #118 129 area-System.Xml Add XmlReader System.Xml.XmlReader is currently missing. 136 area-System.Xml XPath tests with expressions resulting in +/- infinity fail in Windows 10 "The following XPath tests fail for me on Windows 10 Technical Preview, build 9879: StringFunctionsTest2457 StringFunctionsTest2458 The call to Convert.ChangeType in XPathTests.Common.Utils.XPathObject is throwing a FormatException when the value passed is ""Infinity"" or ""-Infinity"". The tests pass for me on Windows 8.1. Each of these tests is part of 3 different test assemblies, resulting in 6 failures total: System.Xml.XPath.Tests.dll System.Xml.XPath.XDocument.Tests.dll System.Xml.XPath.XmlDocument.Tests.dll " 141 area-System.Numerics Added .ToArray() and .FromArray() for Vector types This commit adds Vector2.ToArray(), Vector2.FromArray(float[]), Vector3.ToArray(), Vector3.FromArray(float[]), Vector4.ToArray() and Vector4.FromArray(float[]). The FromArray method copies the array elements to a vector: the element at index 0 becomes X, the element at index 1 becomes Y and so on. The ToArray() method converts the vector to an array: it puts X at index 0, Y at index 1 and so on. These methods looked useful to me if you have an array but want to do vector operations. 142 area-System.Numerics Vector2 and Vector3 Projection The current source includes public static methods for reflection of a vector about a unit vector normal but the underlying vector projection is also useful by itself. Proposing: ``` C# public static Vector2 Project(Vector2 vector, Vector2 component) { ... } //... public static Vector3 Project(Vector3 vector, Vector3 component) { ... } ``` I'll wait for feed back before trying to submit a pull request. 144 area-Infrastructure All the linked files are in the root folder of the XML projects. When you reference files outside the project directory, such as the common directory in the XML code case, these links by default show up in the root of the project in VS which is very annoying and clutters the solution unnecessarily. We should add the appropriate metadata to these Compile items so that VS will group them correctly in the solution explorer. 149 area-System.Xml Wrong named tests in System.Xml.XmlDocument "- The files NodeChangingTests.cs, NodeChangedTests.cs, NodeInsertingTests.cs and NodeInsertedTests.cs contain test cases called ""RemoveEventHandler"". No test uses a ""Remove""-event. Maybe a Copy&Paste mistake from file NodeRemovedTests.cs. - The files NodeChangingTests.cs and NodeChangedTests.cs contain test cases called ""RemoveNode"" but testing a change of a node. " 156 area-System.Numerics Private static read only fields for Vectors Private static read only fields for One, Zero and Unit vectors on Vector2, Vector3 and Vector4. 157 area-System.Numerics Alternative versions of methods for Vectors and Matrices "Would be helpful to have alternative versions of methods with ""out"" parameter as result. Example: this ```C# public static Matrix CreateFromQuaternion(Quaternion quaternion) { ... } ``` and that ```C# public static void CreateFromQuaternion(ref Quaternion quaternion, out Matrix result) { ... } ``` What do you think guys? Do you want to add that? " 176 area-System.Linq System.Linq.Parallel Tests are Failing on AppVeyor Machines The following 5 tests are failing (some intermittently) on our AppVeyor CI builds. I haven't investigated deeply, but I suspect it has to do with the limited hardware that the VM's are equipped with. Some of the test explicitly test whether multiple threads are created, which might not even be the case in an underpowered VM. 181 area-System.Linq Removes unnecessary object allocations because of delegates "I introduced several singletons to store delegate instances to avoid unnecessary object allocation in generic methods. #### For example `ParallelEnumerable.PerformAggregation()` method **Before:** ``` csharp private static T PerformAggregation(this ParallelQuery source, Func reduce, T seed, bool seedIsSpecified, bool throwIfEmpty, QueryAggregationOptions options) { Contract.Assert(source != null); Contract.Assert(reduce != null); Contract.Assert(options.IsValidQueryAggregationOption(), ""enum is out of range""); AssociativeAggregationOperator op = new AssociativeAggregationOperator( source, seed, null, seedIsSpecified, reduce, reduce, delegate (T obj) { return obj; }, throwIfEmpty, options); return op.Aggregate(); } ``` ``` IL_0000: nop IL_0001: ldarg.0 IL_0002: ldarg.2 IL_0003: ldnull IL_0004: ldarg.3 IL_0005: ldarg.1 IL_0006: ldarg.1 IL_0007: ldnull IL_0008: ldftn !!0 System.Linq.ParallelEnumerable::'b__e'(!!0) >>> IL_000e: newobj instance void class [System.Runtime]System.Func`2::.ctor(object, native int) IL_0013: ldarg.s throwIfEmpty IL_0015: ldarg.s options IL_0017: newobj instance void class System.Linq.Parallel.AssociativeAggregationOperator`3::.ctor(class [System.Runtime]System.Collections.Generic.IEnumerable`1, !1, class [System.Runtime]System.Func`1, bool, class [System.Runtime]System.Func`3, class [System.Runtime]System.Func`3, class [System.Runtime]System.Func`2, bool, valuetype System.Linq.Parallel.QueryAggregationOptions) IL_001c: stloc.0 IL_001d: ldloc.0 IL_001e: callvirt instance !2 class System.Linq.Parallel.AssociativeAggregationOperator`3::Aggregate() IL_0023: stloc.1 IL_0024: br.s IL_0026 IL_0026: ldloc.1 IL_0027: ret ``` **After:** ``` csharp private static T PerformAggregation(this ParallelQuery source, Func reduce, T seed, bool seedIsSpecified, bool throwIfEmpty, QueryAggregationOptions options) { Contract.Assert(source != null); Contract.Assert(reduce != null); Contract.Assert(options.IsValidQueryAggregationOption(), ""enum is out of range""); AssociativeAggregationOperator op = new AssociativeAggregationOperator( source, seed, null, seedIsSpecified, reduce, reduce, IdentityFunction.Instance, throwIfEmpty, options); return op.Aggregate(); } ``` ``` IL_0000: nop IL_0001: ldarg.0 IL_0002: ldarg.2 IL_0003: ldnull IL_0004: ldarg.3 IL_0005: ldarg.1 IL_0006: ldarg.1 >>> IL_0007: ldsfld class [System.Runtime]System.Func`2 class System.Linq.IdentityFunction`1::Instance IL_000c: ldarg.s throwIfEmpty IL_000e: ldarg.s options IL_0010: newobj instance void class System.Linq.Parallel.AssociativeAggregationOperator`3::.ctor(class [System.Runtime]System.Collections.Generic.IEnumerable`1, !1, class [System.Runtime]System.Func`1, bool, class [System.Runtime]System.Func`3, class [System.Runtime]System.Func`3, class [System.Runtime]System.Func`2, bool, valuetype System.Linq.Parallel.QueryAggregationOptions) IL_0015: stloc.0 IL_0016: ldloc.0 IL_0017: callvirt instance !2 class System.Linq.Parallel.AssociativeAggregationOperator`3::Aggregate() IL_001c: stloc.1 IL_001d: br.s IL_001f IL_001f: ldloc.1 IL_0020: ret ``` Where `IdentityFunction` looks like ``` csharp internal class IdentityFunction { public static readonly Func Instance = Function; private static T Function(T arg) { return arg; } } ``` " 187 area-System.IO Can the System.IO namespace be modified to manipulate device handles? "This assumes the `System.IO` and 'Microsoft.Win32.SafeHandles' namespace are being open sourced in CoreFX. If not close this ticket. Right now if you do the following: ``` var handle = File.Open(""\\\\.\\Global\\ProcmonDebugLogger"", FileMode.Append); ``` You get an exception **FileStream will not open Win32 devices such as disk partitions and tape drives. Avoid use of ""\.\"" in the path.** If you want raw device access, you need to use P/Invoke. I propose the following: ``` public sealed class Microsoft.Win32.SafeHandles.SafeDeviceHandle: SafeHandleZeroOrMinusOneIsInvalid { . . . } public static Microsoft.Win32.SafeHandles.SafeFileHandle System.IO.File.OpenHandle(string path) { public bool DeviceIoControl( . . .) { . . . } } public static Microsoft.Win32.SafeHandles.SafeDeviceHandle System.IO.File.OpenDeviceHandle(string path) { . . .} ``` My use case for this would be to remove the [PInvoke functons from ProceMonDebugOutput](https://github.com/Wintellect/ProcMonDebugOutput/blob/master/Source/Sysinternals.Debug/NativeMethods.cs) by @JohnWintellect. " 195 area-System.Xml [System.Xml.XPath] Few tests fail sometimes fail because of NRE Few tests are failing in the same place because of NRE. Stack trace (RegressionTestsTest557): E:\oss\corefx\bin\tools\tests.targets(17,5): error : XPathTests.FunctionalTests.MiscellaneousCases.RegressionTestsTests.RegressionTestsTest557: System.NullReferenceException : Object reference not set to an instance of an object. [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Xml.XmlDocumentEx.GetNamespaceXml(XmlDocument xmlDocument)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Xml.DocumentXPathNavigator.MoveToFirstNamespace(XPathNamespaceScope scope)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at MS.Internal.Xml.XPath.NamespaceQuery.Advance()\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at MS.Internal.Xml.XPath.Query.MoveNext()\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at MS.Internal.Xml.XPath.Query.get_Count()\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at MS.Internal.Xml.XPath.XPathSelectionIterator.get_Count()\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at XPathTests.Common.Utils.XPathNodesetTest(String xml, String testExpression, XPathResult expected, XmlNamespaceManager namespaceManager, String startingNodePath)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at XPathTests.FunctionalTests.MiscellaneousCases.RegressionTestsTests.RegressionTestsTest557() [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : XPathTests.FunctionalTests.CoreFunctionLibrary.StringFunctionsTests.StringFunctionsTest2465: System.NullReferenceException : Object reference not set to an instance of an object. [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Xml.XmlDocumentEx.GetNamespaceXml(XmlDocument xmlDocument)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Xml.DocumentXPathNavigator.MoveToNextNamespace(XPathNamespaceScope scope)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at MS.Internal.Xml.XPath.NamespaceQuery.Advance()\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at MS.Internal.Xml.XPath.ForwardPositionQuery.Evaluate(XPathNodeIterator context)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at MS.Internal.Xml.XPath.BaseAxisQuery.Evaluate(XPathNodeIterator nodeIterator)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at MS.Internal.Xml.XPath.MergeFilterQuery.Evaluate(XPathNodeIterator nodeIterator)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Xml.XPath.XPathNavigator.Evaluate(XPathExpression expr, XPathNodeIterator context)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Xml.XPath.XPathNavigator.Evaluate(XPathExpression expr)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Xml.XPath.XPathNavigator.Select(XPathExpression expr)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at XPathTests.Common.Utils.CreateNavigator(String xml, String startingNodePath, XmlNamespaceManager namespaceManager)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at XPathTests.Common.Utils.XPathObject[T](String xml, String testExpression, XmlNamespaceManager namespaceManager, String startingNodePath)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at XPathTests.Common.Utils.XPathStringTest(String xml, String testExpression, Object expected, XmlNamespaceManager namespaceManager, String startingNodePath)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at XPathTests.FunctionalTests.CoreFunctionLibrary.StringFunctionsTests.StringFunctionsTest2465() [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : XPathTests.FunctionalTests.Location.Paths.Axes.ComplexExpressionsTests.ComplexExpressionsTest348: System.NullReferenceException : Object reference not set to an instance of an object. [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Xml.XmlDocumentEx.GetNamespaceXml(XmlDocument xmlDocument)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Xml.DocumentXPathNavigator.MoveToNextNamespace(XPathNamespaceScope scope)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at MS.Internal.Xml.XPath.NamespaceQuery.Advance()\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at MS.Internal.Xml.XPath.Query.MoveNext()\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at MS.Internal.Xml.XPath.Query.get_Count()\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at MS.Internal.Xml.XPath.XPathSelectionIterator.get_Count()\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at XPathTests.Common.Utils.XPathNodesetTest(String xml, String testExpression, XPathResult expected, XmlNamespaceManager namespaceManager, String startingNodePath)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at XPathTests.FunctionalTests.Location.Paths.Axes.ComplexExpressionsTests.ComplexExpressionsTest348() [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : XPathTests.FunctionalTests.Location.Paths.Predicates.UsingPositionFunctionTests.UsingPositionFunctionTest681: System.NullReferenceException : Object reference not set to an instance of an object. [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Xml.XmlDocumentEx.GetNamespaceXml(XmlDocument xmlDocument)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Xml.DocumentXPathNavigator.MoveToNextNamespace(XPathNamespaceScope scope)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at MS.Internal.Xml.XPath.NamespaceQuery.Advance()\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at MS.Internal.Xml.XPath.MergeFilterQuery.Evaluate(XPathNodeIterator nodeIterator)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Xml.XPath.XPathNavigator.Evaluate(XPathExpression expr, XPathNodeIterator context)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Xml.XPath.XPathNavigator.Evaluate(XPathExpression expr)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Xml.XPath.XPathNavigator.Select(XPathExpression expr)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at XPathTests.Common.Utils.XPathNodesetTest(String xml, String testExpression, XPathResult expected, XmlNamespaceManager namespaceManager, String startingNodePath)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at XPathTests.FunctionalTests.Location.Paths.Predicates.UsingPositionFunctionTests.UsingPositionFunctionTest681() [E:\oss\corefx\bin\tools\fxbuild.proj] Stack trace (NodeSetFunctionsTest22100): E:\oss\corefx\bin\tools\tests.targets(17,5): error : XPathTests.FunctionalTests.CoreFunctionLibrary.NodeSetFunctionsTests.NodeSetFunctionsTest22100: System.NullReferenceException : Object reference not set to an instance of an object. [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Xml.XmlDocumentEx.GetNamespaceXml(XmlDocument xmlDocument)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Xml.DocumentXPathNavigator.MoveToNextNamespace(XPathNamespaceScope scope)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at MS.Internal.Xml.XPath.NamespaceQuery.Advance()\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at MS.Internal.Xml.XPath.FilterQuery.Advance()\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at MS.Internal.Xml.XPath.MergeFilterQuery.Evaluate(XPathNodeIterator nodeIterator)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Xml.XPath.XPathNavigator.Evaluate(XPathExpression expr, XPathNodeIterator context)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Xml.XPath.XPathNavigator.Evaluate(XPathExpression expr)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at System.Xml.XPath.XPathNavigator.Select(XPathExpression expr)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at XPathTests.Common.Utils.CreateNavigator(String xml, String startingNodePath, XmlNamespaceManager namespaceManager)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at XPathTests.Common.Utils.XPathObject[T](String xml, String testExpression, XmlNamespaceManager namespaceManager, String startingNodePath)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at XPathTests.Common.Utils.XPathStringTest(String xml, String testExpression, Object expected, XmlNamespaceManager namespaceManager, String startingNodePath)\r [E:\oss\corefx\bin\tools\fxbuild.proj] E:\oss\corefx\bin\tools\tests.targets(17,5): error : at XPathTests.FunctionalTests.CoreFunctionLibrary.NodeSetFunctionsTests.NodeSetFunctionsTest22100() [E:\oss\corefx\bin\tools\fxbuild.proj] 201 area-System.Numerics Vector2/Vector3 could implement operator overloads For the sake of intuitive use, Vector2 and Vector3's `Public operator methods` could be extended with actual operator overloads. This promotes intuitive usage where `var vec = vecA * vecB;` is assumed to be more programmer-friendly than `var vec = Vector3.Multiply(vecA, vecB);`. I'm looking forward to your thoughts. 218 area-System.Console Add tests for System.Console library 219 area-System.Runtime Consider adding API to return common Funcs and Actions without reallocating See pull request #181: In that case, caching was proposed for System.Linq.Parallel. This means that other libraries can't share the same cache (which can grow by the number of generic instantiations). Furthermore, since the actual call sites affected in PLINQ were already allocating considerably, it is doubtful that PLINQ would benefit from the optimization. We should study if we can design public API in the BCL in the same vein as the new `Array.Empty().` _Before_ we do this, we should: 1. Gather data about how many places we have across the stack that would benefit from these shared allocations and find use cases in more compelling places than PLINQ. 2. Design the API. We can use this issue to discuss and evolve it in to a mini-spec. Here's an idea just to get that ball rolling on that. ``` C# namespace System { public static class CommonAction { public static Action Empty { get; } } public static class CommonFunc { public static Func AlwaysTrue(); public static Func Identity(); public static Func IsInstanceOf(); public static Func Cast(); } } ``` 220 area-System.Console Fix /property:OS=Unix build of System.Console Some resource strings got lost in the move to GitHub. There was also an inconsistency with the available NuGet packages and where SafeHandle lives. 221 area-System.Numerics Fix vector tests warnings about obsolete Marshal.SizeOf The System.Numerics.Vectors tests were causing build warnings like the following: ``` C# Vector2Tests.cs(15,29): warning CS0618: 'System.Runtime.InteropServices.Marshal.SizeOf(System.Type)' is obsolete: 'SizeOf(Type) may be unavailable in future releases. Instead, use SizeOf(). ``` This changes does exactly that. 224 area-System.Console Implement simple console foreground/background color scoping via IDisposable "Just a simple API evolution that allows the developer to ""scope"" his color updates. Can be used like that : ``` csharp static void Main(string[] args) { Console.WriteLine(""Default""); using (Console.UseBackgroundColor(ConsoleColor.Red)) { Console.WriteLine(""Background red""); using (Console.UseForegroundColor(ConsoleColor.Green)) { Console.WriteLine(""Foreground green""); using (Console.UseForegroundColor(ConsoleColor.Yellow)) { Console.WriteLine(""Foreground yellow""); } Console.WriteLine(""Foreground green""); using (Console.UseBackgroundColor(ConsoleColor.Blue)) { Console.WriteLine(""Background blue""); } Console.WriteLine(""Background red""); } } Console.WriteLine(""Default""); } ``` And outputs like that : ![image](https://cloud.githubusercontent.com/assets/1341236/5394321/69d6a080-813c-11e4-95e9-98856de8555a.png) " 227 area-System.Text Added System.Text.RegularExpressions source This adds the product source code for the System.Text.RegularExpressions library. The tests will require the CoreCLR test runner to execute, so those will be added once the runner is available. 228 area-System.Xml Some tests are failing because of lacking System.String.Format overload build /p=IncludeTraits=ActiveIssue=228 Example tests Test Name: NameWithWhitespace Test FullName: XmlDocumentTests.XmlDocumentTests.CreateElementTests.NameWithWhitespace Test Source: e:\oss\corefx\src\System.Xml.XmlDocument\tests\XmlDocumentTests\CreateElementTests.cs : line 90 Test Outcome: Failed Test Duration: 0:00:00.091 Result Message: Assert.Throws() Failure Expected: typeof(System.Xml.XmlException) Actual: typeof(System.MissingMethodException): Method not found: 'System.String System.String.Format(System.IFormatProvider, System.String, System.Object)'. Result StackTrace: at System.Xml.XmlExceptionHelper.BuildCharExceptionArgs(Char invChar, Char nextChar) at System.Xml.XmlExceptionHelper.BuildCharExceptionArgs(String data, Int32 invCharIndex) in e:\oss\corefx\src\Common\src\System\Xml\ValidateNames.cs:line 349 at System.Xml.XmlDocument.CheckName(String name) in e:\oss\corefx\src\System.Xml.XmlDocument\src\System\Xml\Dom\XmlDocument.cs:line 110 at System.Xml.XmlElement..ctor(XmlName name, Boolean empty, XmlDocument doc) in e:\oss\corefx\src\System.Xml.XmlDocument\src\System\Xml\Dom\XmlElement.cs:line 22 at System.Xml.XmlDocument.CreateElement(String prefix, String localName, String namespaceURI) in e:\oss\corefx\src\System.Xml.XmlDocument\src\System\Xml\Dom\XmlDocument.cs:line 713 at System.Xml.XmlDocument.CreateElement(String name) in e:\oss\corefx\src\System.Xml.XmlDocument\src\System\Xml\Dom\XmlDocument.cs:line 492 at XmlDocumentTests.XmlDocumentTests.CreateElementTests.<>c__DisplayClass10.b__c() in e:\oss\corefx\src\System.Xml.XmlDocument\tests\XmlDocumentTests\CreateElementTests.cs:line 92 230 area-Meta XML Documentation comments not included "I was looking through the recently added Regex code and noticed that a lot of XML documentation summaries are not there, but they do show up in the .NET Framework documentation. Are the comments stored in an external file? If so, isn't it better to include them in the code or provide the external files? Some people would like to compile the libraries themselves and they would be missing a lot of inline documentation. **Example** _.NET Framework_ ![Documentation](http://i.imgur.com/ySqyI81.png) _.NET Core_ ![No Documentation](http://i.imgur.com/RvBK6fh.png) " 231 area-System.Text Improve performance of Regex ctor and IsMatch "The Regex class maintains a cache of byte codes, which the Regex ctor indexes into using a key. It uses this seemingly innocuous line to create that key: ``` C# String key = ((int)options).ToString(NumberFormatInfo.InvariantInfo) + "":"" + cultureKey + "":"" + pattern; ``` This, however, has the unfortunate effect of allocating a string for the options, a string array for the five strings to be passed to the String.Concat call generated by the compiler, another string array allocation inside of Concat, and then the resulting string for the whole operation. The cost of those allocations is causing a non-trivial slowdown for repeated Regex.IsMatch calls for simple regular expressions, such as for a phone number (e.g. from the MSDN docs ""^\d{3}-\d{3}-\d{4}$""). This commit adds a new struct key type that just stores the constitutent options, cultureKey, and pattern, rather than creating a string to store them. That key is then what's stored in each entry in the cache. For repeated Regex.IsMatch calls for basic regular expressions like the phone number one previously mentioned, on my machine this improves throughput by ~35%, in large part due to an ~80% reduction in number of allocations, and (for this particular test case) an ~70% reduction in number of bytes allocated (it depends primarily on the length of the pattern and the length of the culture name). " 234 area-System.Numerics Some System.Numerics.Vector tests are disabled without comment build /p:IncludeTraits=ActiveIssue=234 235 area-System.Linq Some System.Linq.Parallel tests are disabled without comment build /p:IncludeTraits=ActiveIssue=235 240 area-System.Linq Some System.Linq.Parallel tests are super slow on CI Deadlock or super slow build /p:IncludeTraits=ActiveIssue=240 241 area-System.Linq Fix multiple projects for optimizations, debug/trace, etc. System.Linq.Parallel.csproj wasn't outputting symbols, and it didn't have optimizations enabled in Release. System.Numerics.Vectors.csproj was setting TRACE in Release builds but not in Debug builds. System.Text.RegularExpressions.csproj wasn't setting either DEBUG nor RELEASE constants in either Debug/Release builds, it didn't have optimizations enabled in Release, and it wasn't generating symbols in either. The XML libraries were't setting DEBUG/TRACE in either Debug/Release builds, weren't enabling optimizations in Release builds, and weren't generating symbols in either. DEBUG is important in almost all of these libraries, as they use Debug.\* for asserts and the like. Symbol generation is important for debugging. Optimizations are obviously important (but just to verify I saw significant performance wins in multiple libraries just from turning this on in release). TRACE isn't really important, as none of the libraries do release tracing, but I thought it good hygiene to enable it. 247 area-Meta Add Security transparency Since Code Access Security is a thing of the past with .NET Core, I wouldn't expect permissions or security attributes to be used (or even to exist). I didn't see permissions anywhere in the current code: they seem to have be completely removed from .NET Core as expected. However, [several committed files](https://github.com/dotnet/corefx/search?q=SecurityCritical+OR+SecuritySafeCritical&type=Code) still use `SecurityCriticalAttribute` or `SecuritySafeCriticalAttribute`. Is this a left-over from the .NET framework code? I expect so, since they mean nothing without permission checks. If this is intended, what are the guidelines about using them? 249 area-System.Collections Memory allocation documentation for ImmutableDictionary Keys and Values ## Background As described in #246 (and previously in #147), the `Keys` and `Values` properties of `ImmutableDictionary` cannot be used without incurring memory allocations on the heap. However, a slight modification of user code provides _equivalent_ behavior without these allocations. With allocations: ``` csharp foreach (var key in dictionary.Keys) { ... } ``` Without allocations: ``` csharp foreach (var pair in dictionary) { var key = pair.Key; } ``` ## Suggestion Since updating the `Keys` and `Values` properties to eliminate the allocations would be a breaking change (#246), the only recourse is to update the documentation for these properties to describe steps a user can take to avoid allocations if these properties are used heavily within a particular application. ## Caveat Care must be taken to ensure that the documentation does not read in a way that suggests the `Keys` and `Values` properties should not be used. The properties behave properly and would not be even a measurable source of time spent in the application in nearly all cases. This notice is only meant for users making heavy use of these properties who are also actively working to reduce the memory allocations performed within an especially performance-sensitive section of code. 251 area-System.Text Fix DEBUG constant name It looks like DBG was being used instead of DEBUG at System.Text.RegularExpressions. Was this on purpose? 252 area-System.Text Fix some more XML docs I know that the documentation will be updated eventually, but in the meanwhile we can have a few less compiler warnings if you guys agree. 253 area-System.Text Fix GetGroup never returning EmptyGroup This is a very obvious bug: _captureMap probably used to be a hashtable and the code was not properly refactored. I took the opportunity to redo the method using the Dictionary equivalent logic. Not adding unit tests for this, because the unit test project seems to be missing, and I'm not sure if you guys are going to add it or not, so let me know how to proceed. 254 area-System.Text Improve Dictionary access Just spotted this quick dictionary access optimization. 255 area-System.Text Improve Dictionary access 262 area-System.Reflection System.Reflection.Metadata should provide easier signature reading API **EDIT** 12/3/2015 - Replaced entire description with the detailed proposal matching PR #4809 Today, System.Reflection.Metadata provides low-level access to ECMA-335 CLI metadata, but only provides signatures as blobs that must be parsed with direct knowledge of the format as described in the section II.23.2 of the CLI specification. There is a `BlobReader` for reading various elements out of blobs, but it is up to the caller to read the right things at the right positions. This was by-design as the library is designed to sit at the lowest level behind the scenes of higher level API such as Reflection proper, Roslyn, or CCI. The challenge with signatures is that they are variable-length and encode tree structures, and each higher level model that could sit on top of System.Reflection.Metadata will have different representations for the trees. We do not want to introduce an API to build a fully-formed tree that then has to be traversed and rewritten to match the actual use case. This proposal is therefore a middle ground between: 1. Here are the bytes and some helpers. Read the spec to decode. (Status quo) 2. Yet another high-level metadata API. (Out-of-scope for this layer) It works as follows: 1. The caller chooses an arbitrary representation, `TType`, for type symbols and implements `ISignatureTypeProvider`. (See full API spec below). 2. Signatures are parsed by recursive descent and the provider is called to create new type nodes: - _Give me the `TType` that represents this primitive_ - _Give me the `TType` that represents this TypeDefinition_ - _Give me the `TType` that represents an array of this other TType_ - _etc._ # Sample Usage Given a suitable `TypeSymbol` and `TypeSymbolProvider : ISignatureTypeProvider`, here is code walking all of the `TypeSymbol`'s for every field, parameter, and return type: ``` C# using (var stream = File.OpenRead(pathToDll)) using (var peReader = new PEReader(stream)) { var reader = peReader.GetMetadataReader(); var provider = new TypeSymbolProvider(); foreach (TypeDefinitionHandle typeHandle in reader.TypeDefinitions) { TypeDefinition type = reader.GetTypeDefinition(typeHandle); foreach (FieldDefinitionHandle fieldHandle in type.GetFields()) { FieldDefinition field = reader.GetFieldDefinition(fieldHandle); TypeSymbol fieldType = field.DecodeSignature(provider); // ... } foreach (MethodDefinitionHandle methodHandle in type.GetMethods()) { MethodDefinition method = reader.GetMethodDefinition(methodHandle); MethodSignature methodSig = method.DecodeSignature(provider); TypeSymbol returnType = methodSig.ReturnType; // ... foreach (TypeSymbol parameterType in methodSig.ParameterTypes) { // ... } } } } ``` # Full API ## Additions to existing types These provide convenience entry points. There are other use cases where you want to parse only part of a signature or a signature that you did not obtain from the metadata reader. For that, the `SignatureDecoder` ``` C# namespace System.Reflection.Metadata { public struct FieldDefinition { public TType DecodeSignature( ISignatureTypeProvider provider, SignatureDecoderOptions options=SignatureDecoderOptions.None); } public struct MemberReference { public TType DecodeFieldSignature( ISignatureTypeProvider provider, SignatureDecoderOptions options=SignatureDecoderOptions.None); public MethodSignature DecodeMethodSignature( ISignatureTypeProvider provider, SignatureDecoderOptions options=SignatureDecoderOptions.None); // MemberReferenceKind GetKind(); already exists } public struct MethodDefinition { public MethodSignature DecodeSignature( ISignatureTypeProvider provider, SignatureDecoderOptions options=SignatureDecoderOptions.None); } public struct MethodSpecification { public ImmutableArray DecodeSignature( ISignatureTypeProvider provider, SignatureDecoderOptions options=SignatureDecoderOptions.None); } public struct PropertyDefinition { public MethodSignature DecodeSignature( ISignatureTypeProvider provider, SignatureDecoderOptions options=SignatureDecoderOptions.None); } public struct StandaloneSignature { public ImmutableArray DecodeLocalSignature( ISignatureTypeProvider provider, SignatureDecoderOptions options=SignatureDecoderOptions.None); public MethodSignature DecodeMethodSignature( ISignatureTypeProvider provider, SignatureDecoderOptions options=SignatureDecoderOptions.None); public StandaloneSignatureKind GetKind(); } public enum StandaloneSignatureKind { LocalVariables = 1, Method = 0, } public struct TypeSpecification { public TType DecodeSignature( ISignatureTypeProvider provider, SignatureDecoderOptions options=SignatureDecoderOptions.None); } } ``` ## New types ``` C# namespace System.Reflection.Metadata.Decoding { public struct ArrayShape { public ArrayShape(int rank, ImmutableArray sizes, ImmutableArray lowerBounds); public ImmutableArray LowerBounds { get; } public int Rank { get; } public ImmutableArray Sizes { get; } } public interface IConstructedTypeProvider : ISZArrayTypeProvider { TType GetArrayType(TType elementType, ArrayShape shape); TType GetByReferenceType(TType elementType); TType GetGenericInstance(TType genericType, ImmutableArray typeArguments); TType GetPointerType(TType elementType); } public interface IPrimitiveTypeProvider { TType GetPrimitiveType(PrimitiveTypeCode typeCode); } public interface ITypeProvider { TType GetTypeFromDefinition( MetadataReader reader, TypeDefinitionHandle handle, SignatureTypeHandleCode code); TType GetTypeFromReference( MetadataReader reader, TypeReferenceHandle handle, SignatureTypeHandleCode code); } public interface ISignatureTypeProvider : IConstructedTypeProvider, IPrimitiveTypeProvider, ITypeProvider { TType GetFunctionPointerType(MethodSignature signature); TType GetGenericMethodParameter(int index); TType GetGenericTypeParameter(int index); TType GetModifiedType( MetadataReader reader, bool isRequired, EntityHandle modifierTypeHandle, TType unmodifiedType); TType GetPinnedType(TType elementType); } public interface ISZArrayTypeProvider { TType GetSZArrayType(TType elementType); } public struct MethodSignature { public MethodSignature( SignatureHeader header, TType returnType, int requiredParameterCount, int genericParameterCount, ImmutableArray parameterTypes); public int GenericParameterCount { get; } public SignatureHeader Header { get; } public ImmutableArray ParameterTypes { get; } public int RequiredParameterCount { get; } public TType ReturnType { get; } } public enum PrimitiveTypeCode : byte { Boolean = (byte)2, Byte = (byte)5, Char = (byte)3, Double = (byte)13, Int16 = (byte)6, Int32 = (byte)8, Int64 = (byte)10, IntPtr = (byte)24, Object = (byte)28, SByte = (byte)4, Single = (byte)12, String = (byte)14, TypedReference = (byte)22, UInt16 = (byte)7, UInt32 = (byte)9, UInt64 = (byte)11, UIntPtr = (byte)25, Void = (byte)1, } public struct SignatureDecoder { public SignatureDecoder( ISignatureTypeProvider provider, MetadataReader metadataReader=null, SignatureDecoderOptions options=SignatureDecoderOptions.None); public TType DecodeFieldSignature(ref BlobReader blobReader); public ImmutableArray DecodeLocalSignature(ref BlobReader blobReader); public MethodSignature DecodeMethodSignature(ref BlobReader blobReader); public ImmutableArray DecodeMethodSpecificationSignature(ref BlobReader blobReader); public TType DecodeType(ref BlobReader blobReader); } public enum SignatureDecoderOptions { DifferentiateClassAndValueTypes = 1, None = 0, } public enum SignatureTypeHandleCode : byte { Class = (byte)18, Unresolved = (byte)0, ValueType = (byte)17, } } ``` # Notes - The interface segregation of `ISignatureTypeProvider` is for future `TypeNameParser` and `CustomAttributeDecoder` (still under development in dev/metadata branch), which share some but not all of the same requirements for a type provider as the `SignatureDecoder` 267 area-System.Text Remove superfluous internal access modifier I'm not sure I see the point in having the internal modifier on these fields, but if I'm missing something feel free to close. 271 area-System.Text Regex collections should implement generic collection interfaces "`CaptureCollection`, `GroupCollection`, and `MatchCollection` currently only implement the non-generic `ICollection` interface. These collections should implement the generic collection interfaces to better interoperate with more modern APIs, such as LINQ. Since these collections are already indexable, they should implement `IList` and `IReadOnlyList`, as well as the non-generic `IList` (to be consistent with the generic interfaces). ## Rationale and Usage This is certainly a nice-to-have, but it _is_ a long-standing [request](https://connect.microsoft.com/VisualStudio/feedback/details/469250/capturecollection-groupcollection-and-matchcollection-do-not-implement-icollection-t-and-ienumerable-t) that [developers](http://stackoverflow.com/q/7274422) [still](http://jimlynn.wordpress.com/2009/11/04/why-cant-i-use-linq-on-a-capturecollection/) [ask](http://stackoverflow.com/q/16379433) [about](http://stackoverflow.com/q/4108956). Implementing the generic interfaces will allow these collections to be used more easily with LINQ and interoperate better with more modern framework and library APIs. For example, to use these collections with LINQ right now you have to know about and remember to use `Enumerable.Cast()` to cast the non-generic `IEnumerable` into an `IEnumerable`: ``` c# var captures = from capture in match.Groups.Cast().Last().Captures.Cast() select capture.Value; ``` With these changes you'd no longer have to do that: ``` c# var captures = from capture in match.Groups.Last().Captures select capture.Value; ``` Plus, in the above example, you'd get a performance improvement when using `Enumerable.Last.()` as its implementation has a fast-path for collections that implement `IList`. ## Proposed API ``` c# // DebuggerDisplay and DebuggerTypeProxy added [DebuggerDisplay(""Count = {Count}"")] [DebuggerTypeProxy(typeof(RegexCollectionDebuggerProxy))] // Previously only implemented ICollection public class CaptureCollection : IList, IReadOnlyList, IList { // Existing members public int Count { get; } public Capture this[int i] { get; } public IEnumerator GetEnumerator(); object ICollection.SyncRoot { get; } bool ICollection.IsSynchronized { get; } void ICollection.CopyTo(Array array, int arrayIndex); // Proposed members public void CopyTo(Capture[] array, int arrayIndex); IEnumerator IEnumerable.GetEnumerator(); int IList.IndexOf(Capture item); void IList.Insert(int index, Capture item); void IList.RemoveAt(int index); Capture IList.this[int index] { get; set; } void ICollection.Add(Capture item); void ICollection.Clear(); bool ICollection.Contains(Capture item); bool ICollection.IsReadOnly { get; } bool ICollection.Remove(Capture item); int IList.Add(object value); void IList.Clear(); bool IList.Contains(object value); int IList.IndexOf(object value); IList.Insert(int index, object value); bool IList.IsFixedSize { get; } bool IList.IsReadOnly { get; } void IList.Remove(object value); void IList.RemoveAt(int index); object IList.this[int index] { get; set; } } // DebuggerDisplay and DebuggerTypeProxy added [DebuggerDisplay(""Count = {Count}"")] [DebuggerTypeProxy(typeof(RegexCollectionDebuggerProxy))] // Previously only implemented ICollection public class GroupCollection : IList, IReadOnlyList, IList { // Existing members public int Count { get; } public Group this[int groupnum] { get; } public Group this[String groupname] { get; } public IEnumerator GetEnumerator(); object ICollection.SyncRoot { get; } bool ICollection.IsSynchronized { get; } void ICollection.CopyTo(Array array, int arrayIndex); // Proposed members public void CopyTo(Group[] array, int arrayIndex); IEnumerator IEnumerable.GetEnumerator(); int IList.IndexOf(Group item); void IList.Insert(int index, Group item); void IList.RemoveAt(int index); Group IList.this[int index] { get; set; } void ICollection.Add(Group item); void ICollection.Clear(); bool ICollection.Contains(Group item); bool ICollection.IsReadOnly { get; } bool ICollection.Remove(Group item); int IList.Add(object value); void IList.Clear(); bool IList.Contains(object value); int IList.IndexOf(object value); IList.Insert(int index, object value); bool IList.IsFixedSize { get; } bool IList.IsReadOnly { get; } void IList.Remove(object value); void IList.RemoveAt(int index); object IList.this[int index] { get; set; } } // DebuggerDisplay and DebuggerTypeProxy added [DebuggerDisplay(""Count = {Count}"")] [DebuggerTypeProxy(typeof(RegexCollectionDebuggerProxy))] // Previously only implemented ICollection public class MatchCollection : IList, IReadOnlyList, IList { // Existing members public int Count { get; } public virtual Match this[int i] { get; } public IEnumerator GetEnumerator(); object ICollection.SyncRoot { get; } bool ICollection.IsSynchronized { get; } void ICollection.CopyTo(Array array, int arrayIndex); // Proposed members public void CopyTo(Match[] array, int arrayIndex); IEnumerator IEnumerable.GetEnumerator(); int IList.IndexOf(Match item); void IList.Insert(int index, Match item); void IList.RemoveAt(int index); Match IList.this[int index] { get; set; } void ICollection.Add(Match item); void ICollection.Clear(); bool ICollection.Contains(Match item); bool ICollection.IsReadOnly { get; } bool ICollection.Remove(Match item); int IList.Add(object value); void IList.Clear(); bool IList.Contains(object value); int IList.IndexOf(object value); IList.Insert(int index, object value); bool IList.IsFixedSize { get; } bool IList.IsReadOnly { get; } void IList.Remove(object value); void IList.RemoveAt(int index); object IList.this[int index] { get; set; } } ``` ## Details - There was some discussion as to whether only the read-only interfaces should be implemented, or both the read-only and mutable interfaces. The consensus is to implement both the read-only and mutable interfaces. This is consistent with other collections in the framework. The mutable interfaces are implemented as read-only: mutable members are implemented explicitly and throw `NotSupportedException` (like `ReadOnlyCollection`). - There was an open question as to whether the non-generic `IList` should be implemented as well. These collections are indexable and if `IList` and `IReadOnlyList` are being implemented, `IList` should be implemented as well. This does add several more members, but they are all implemented explicitly so they don't add any new public members to intellisense, and the implementations are very straightforward. - `ICollection.CopyTo` is implemented implicitly (public). - All other new members are implemented explicitly (non-public): - Mutable members are implemented explicitly because these collections are read-only and the mutable members throw `NotSupportedException` (like `ReadOnlyCollection`). - `IList` members are implemented explicitly to hide non-generic members from intellisense. - `IList.IndexOf` and `ICollection.Contains` are implemented explicitly because these methods aren't very useful for these collections and should not be visible in intellisense by default. They're not useful because an implementation using `EqualityComparer.Default` (consistent with other collections) will search the collection using reference equality due to the fact that `Capture`, `Group`, and `Match` do not implement `IEquatable` and do not override `Equals()` and `GetHashCode()`. Further, these types do not have public constructors -- they are created internally by the regex engine, making it very unlikely that you'd want to search for an item in a collection ""A"" that was obtained from collection ""B"". - `IEnumerable.GetEnumerator()` must be implemented explicitly because the non-generic `IEnumerable.GetEnumerator()` is already implemented implicitly and we can't overload on return type. This also precludes returning a `struct` `Enumerator` (for better enumeration performance) because changing the return type of the existing method would be a binary breaking change. As a result, you'll still have to specify the type when using `foreach` (e.g. `foreach (Capture capture in captures)`); you won't be able to use `var` (e.g. `foreach (var capture in captures)`), unfortunately. ## Open Questions - Should `GroupCollection` implement `IDictionary`, `IReadOnlyDictionary`, and `IDictionary`? `GroupCollection` already has a string indexer. Is it worth implementing the dictionary interfaces as part of this? Personally, I'm leaning toward ""no"" because there isn't a compelling scenario for the dictionary interfaces, and they can always be added in the future when needed. ## Pull Request A PR with the proposed changes is available: #1756 ## Updates - Edited this description to make it more of a _speclet_, based on the discussion below and the proposed API Review process. - Some improvements based on feedback from @sharwell. - Fixed existing members. - Added `IList`. These collections are indexable and it would be strange if `IList` and `IReadOnlyList` were implemented alongside `ICollection` but without `IList`. - Added `DebuggerDisplay` and `DebuggerTypeProxy` attributes. - Made `ICollection.CopyTo` implicit (public). " 277 area-System.Text Update regular expressions collections to implement IReadOnlyList Fixes #271 I believe this is the least intrusive path to implementing the requested functionality. I considered the following items but decided to not include them with this pull request. - `GroupEnumerator` is internal, so it might be possible to change the type of `GroupEnumerator.Capture` from `Capture` to `Group`. This would make the explicit cast in the generic `Current` property unnecessary. - I did not update `CaptureCollection` to implement `IReadOnlyDictionary`, primarily because it's a larger change with the addition of the `Keys` and `Values` properties (even if they are explicitly implemented). This should probably be reviewed independently from a straightforward implementation of `IReadOnlyList`. 281 area-System.Diagnostics System.Diagnostics.FileVersionInfo different/incorrect behaviors compared to .NET Framework FileVersionInfo solely depends on System.IO.FileSystem (and all of its dependencies, including System.IO, System.Threading.Tasks, etc) just to do a File.Exists in GetVersionInfo. We should remove this and instead see if we can use the return value of GetFileVersionInfoSizeEx to mimic the same behavior. 283 area-System.Linq System.Linq.Parallel test assembly disabled as it takes too long on AppVeyor The System.Linq.Parallel test assembly is disabled because it takes 50 seconds to run on my development machine and lots and lots of time to run on AppVeyor. 284 area-System.Xml XPath AxesCombination tests are failing on debug builds While running with debug builds the following AxesCombination Tests are failing with the below assert: \src\Common\tests\System.Xml.XPath\FuncLocation\PathAxeCombinationsTests.cs AxesCombinationsTest2142 AxesCombinationsTest2143 AxesCombinationsTest2144 IsSamePosition() on custom navigator returns inconsistent results at XPathNavigator.ComparePosition(XPathNavigator nav) d:\github\corefx\src\System.Xml.XPath\src\System\Xml\XPath\XPathNavigator.cs(711) at Query.CompareNodes(XPathNavigator l, XPathNavigator r) d:\github\corefx\src\System.Xml.XPath\src\System\Xml\XPath\Internal\Query.cs(150) at Query.Insert(List`1 buffer, XPathNavigator nav) d:\github\corefx\src\System.Xml.XPath\src\System\Xml\XPath\Internal\Query.cs(109) at DocumentOrderQuery.Evaluate(XPathNodeIterator context) d:\github\corefx\src\System.Xml.XPath\src\System\Xml\XPath\Internal\DocumentOrderQuery.cs(20) at BaseAxisQuery.Evaluate(XPathNodeIterator nodeIterator) d:\github\corefx\src\System.Xml.XPath\src\System\Xml\XPath\Internal\BaseAxisQuery.cs(108) at XPathNavigator.Evaluate(XPathExpression expr, XPathNodeIterator context) d:\github\corefx\src\System.Xml.XPath\src\System\Xml\XPath\XPathNavigator.cs(802) at XPathNavigator.Evaluate(XPathExpression expr) d:\github\corefx\src\System.Xml.XPath\src\System\Xml\XPath\XPathNavigator.cs(784) at XPathNavigator.Select(XPathExpression expr) d:\github\corefx\src\System.Xml.XPath\src\System\Xml\XPath\XPathNavigator.cs(764) at Utils.XPathNodesetTest(String xml, String testExpression, XPathResult expected, XmlNamespaceManager namespaceManager, String startingNodePath) d:\github\corefx\src\Common\tests\System.Xml.XPath\Common\Utils.cs(128) at AxesCombinationsTests.AxesCombinationsTest2144() d:\github\corefx\src\Common\tests\System.Xml.XPath\FuncLocation\PathAxeCombinationsTests.cs(44979) 292 area-System.Text Add Regex Tests This adds our tests for the System.Text.RegularExpressions library. Currently, these tests (and almost all of the tests that we will be bringing out from our internal sources) are going to print a lot of things to the console, as that is the testing paradigm we follow internally. We will be coming up with a way to either redirect the test output, or make it configurable. 293 area-System.Diagnostics Add FileVersionInfo tests This adds all of our tests for the System.Diagnostics.FileVersionInfo library. Included also are the assemblies and executables that are used as test assets. 294 area-Meta Proposal for the API Review process Now that we’re on GitHub we also get requests for new APIs. The current API review process is designed around the assumption that it is internal-only. We need to rethink this process for an open source world. This issue represents a proposal how this could be handled. It’s not final – any feedback is highly appreciated. ## Process Goals The key goals are: - **Designed for GitHub**. In order to be sustainable and not be a hurdle for contributors the API review process must feel natural to folks familiar with GitHub. - **Efficiency**. Performing API reviews requires looping in a set of experts. We want to conduct API reviews in an agile fashion without randomizing the reviewers or community members. - **Transparency**. We can use the same process for both internal as well as external contributors. This allows contributors to benefit from the results of API reviews even if the implementer isn’t external. ## Overall Process GitHub is generally based around the pull-request model. The idea is that contributors perform their changes in their own fork and submit a pull request against our repository. For trivial code changes, such as typo fixes, we want folks to directly submit a pull request rather than opening an issue. However, for bug fixes or feature work, we want contributors to first start a discussion by creating an issue. For work that involves adding new APIs we'd like the issue to contain what we call a _speclet_. The speclet should provide a rough sketch of how the APIs are intended to be used, with sample code that shows typical scenarios. The goal isn't to be complete but rather to illustrate the direction so that readers can judge whether the proposal is sound. ![Process diagram](https://cloud.githubusercontent.com/assets/5169960/5499091/a6895e2c-86dd-11e4-8b0e-6ba1ae152541.png) ## Steps - **Contributor opens an issue**. The issue description should contain a speclet that represents a sketch of the new APIs, including samples on how the APIs are being used. The goal isn’t to get a complete API list, but a good handle on how the new APIs would roughly look like and in what scenarios they are being used. - **Community discusses the proposal**. If changes are necessary, the contributor is encouraged to edit the issue description. This allows folks joining later to understand the most recent proposal. To avoid confusion, the contributor should maintain a tiny change log, like a bolded “Updates:” followed by a bullet point list of the updates that were being made. - **Issue is tagged as “Accepting PRs”**. Once the contributor and project owner agree on the overall shape and direction, the project owner tags the issue as “Accepting PRs”. The contributor should indicate whether they will be providing the PR or only contributed the idea. - **Coding**. The contributor is implementing the APIs as discussed. Minor deviations are OK, but if during the implementation the design starts to take a major shift, the contributor is encouraged to go back to the issue and raise the concerns with the current proposal. - **Pull request is being created**. Once the contributor believes the implementation is ready for review, she creates a pull request, referencing the issue created in the first step. - **Pull request is being reviewed**. The community reviews the code for the pull request. The review should focus on the code changes and architecture – not the APIs themselves. Once at least two project owners give their OK, the PR is considered good to go. - **Pull is tagged as “Needs API Review”**. The project owner then marks the pull request as “Needs API Review”. - **API review**. Using the information in the pull request we’ll create an APIX file that constitutes the API delta. The API review board meets multiple times a week to review all PRs that are tagged as needing an API review. - **Pull request is updated with the results of the API Review**. Once the API review is complete, the project owner uploads the notes and API HTML diff, including all comments. The project owner also updates the PR accordingly, with either a call to action to address some concerns or a good to go indicator. - **Pull request is merged**. When there are no issues – or the issues were addressed by the contributor, the PR is merged. ## API Design Guidelines The .NET design guidelines are captured in the famous book [Framework Design Guidelines](http://amazon.com/dp/0321545613) by Krzysztof Cwalina and Brad Abrams. A digest with the most important guidelines are available in our [developer wiki](https://github.com/dotnet/corefx/wiki/Framework%20Design%20Guidelines%20Digest). Long term, we'd like to publish the individual guidelines in standalone repo on which we can also accept PRs and -- more importantly for API reviews -- link to. 295 area-System.Diagnostics Fix file name casing in System.Diagnostics.FileVersionInfo.csproj The file on disk is called Interop.manual.cs, not Interop.Manual.cs. This fixes compilation with Mono on Linux (or other case-sensitive FS). 298 area-System.Xml Use String.Equals instead of String.Compare for equality checks Per the [Best Practices for Using Strings in the .NET Framework](http://msdn.microsoft.com/en-us/library/dd465121%28v=vs.110%29.aspx): - Use an overload of the `String.Equals` method to test whether two strings are equal. - Use the `String.Compare` and `String.CompareTo` methods to sort strings, **not to check for equality**. 299 area-Meta Removing `readonly` from a field can be a breaking change Currently the [**Signatures** section of the Breaking Change Rules](https://github.com/dotnet/corefx/wiki/Breaking-Change-Rules#signatures) page includes the following: > ✓ Allowed > - Removing `readonly` from a field As hinted in [a recent tweet](https://twitter.com/samharwell/status/543970816321650688), this should probably be disallowed in a particular case. I would prefer not to give the answer away publicly yet, but feel free to contact me by email. Here is the original tweet: > C# Quiz: Add `readonly` to a field only set in the constructor, which changes the runtime behavior of the type (no use of reflection). 300 area-Meta Refactor System.Servicemodel.ClientBase to have non-generic base "The following is an example of a generic extension method I would like to write, but cannot because `ClientBase` does not inherit from a base class containing the non generic members. It would be very helpful if `ClientBase` was refactored into `ClientBase:ClientBase` ``` C# using DotNetOpenAuth.OAuth2; using System; using System.Net; using System.ServiceModel; using System.ServiceModel.Channels; using System.Threading; using System.Threading.Tasks; namespace OAuthClient { public static class ExtensionMethods { public static async Task CallAsync(this TClient wcfClient, Func predicate, IAuthorizationState authorization, CancellationToken cancellationToken) where TClient : ClientBase where TChannel : class { if (authorization == null) { throw new InvalidOperationException(""No access token!""); } // Refresh the access token if it expires and if its lifetime is too short to be of use. if (authorization.AccessTokenExpirationUtc.HasValue) { await AuthorizationServer.Client.RefreshAuthorizationAsync(authorization, TimeSpan.FromSeconds(30)); } var httpRequest = (HttpWebRequest)WebRequest.Create(wcfClient.Endpoint.Address.Uri); ClientBase.AuthorizeRequest(httpRequest, authorization.AccessToken); var httpDetails = new HttpRequestMessageProperty(); httpDetails.Headers[HttpRequestHeader.Authorization] = httpRequest.Headers[HttpRequestHeader.Authorization]; using (var scope = new OperationContextScope(wcfClient.InnerChannel)) { OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpDetails; bool isError = true; try { T result = predicate(wcfClient); // If there is an error on the channel, the close call will throw an exception. wcfClient.Close(); isError = false; return result; } finally { // If we have an error on the channel, we cannot close the channel so we abort. // Exceptions that occur will still be raised unmodified. if (isError) { wcfClient.Abort(); } } } } } } ``` " 301 area-System.Diagnostics FileVersionInfo Cleanup This addresses code review feedback from #274. /cc @mellinoe and @stephentoub 304 area-System.Text Regex should provide a validation method "`Regex` doesn't provide a way to validate whether a given string is a valid regular expression without getting an exception. It should provide one. ## Background `TryParse` is a common pattern in .NET which is useful when a potentially invalid string has to be converted to a different representation. As invalid user input is not an exceptional situation, it makes sense to avoid exception overhead (which coincidentally also educates new developers to handle those situations correctly). Regular expressions are not as common in external input as `int` or `DateTime`, however there are situations when regex is an appropriate tool for the power users (e.g. advanced text editor search/replace). If you want to validate the regex as it is being typed (with reasonable throttling), it is useful to have as little overhead as possible. Request for Regex.TryParse (not by me) had [5 votes on Microsoft Connect](http://webcache.googleusercontent.com/search?q=cache:KV6wcz2SJ44J:https://connect.microsoft.com/VisualStudio/feedback/details/331753/regex-should-have-a-static-tryparse-method+) and currently exists on [UserVoice with 3 votes](http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2683916-regex-should-have-a-static-tryparse-method). ## Design Options Originally I wanted to propose `Regex.TryCreate` (which is in line with `Uri.TryCreate` since `Regex` does no have a `Parse` method). However even for power users regexes might not be easy to write, and providing more information than just ""you have failed"" is useful. I can't think of any existing pattern in the BCL that fits this well, but basically something like this would be useful: ``` csharp public class Regex { // existing members… public static RegexParseResult Parse(string pattern); public static RegexParseResult Parse(string pattern, RegexOptions options); // or alternatively we could use a default value for options } public class RegexParseResult { public bool IsSuccess { get; } public Regex Regex { get; } // parser doesn't have to provide more than one, however it would allow it to do so in the future public IReadOnlyCollection Errors { get; } } public class RegexParseError { public string Message { get; } public int Start { get; } public int End { get; } } ``` ### API Concerns It would be useful to know if I am missing some existing common pattern here, so that consistency with other BCL APIs can be provided. I don't like using name `Parse` here either as it invites confusion -- however I can't currently think of a better approach. ## Example Usage ``` csharp public class RegexValidationRule : System.Windows.Controls.ValidationRule { public override ValidationResult Validate(object value, CultureInfo cultureInfo) { var valueString = (string)value; var parseResult = Regex.Parse(valueString); if (!parseResult.IsSuccess) { var errorString = string.Join(NewLine, parseResult.Errors.Select(e => $""{e.Message} at {e.Start}"")); return new ValidationResult(false, errorString); } return ValidationResult.ValidResult; } } ``` ## Compatibility I think adding a new static method should be safe enough. " 306 area-System.Diagnostics Make Process.Start have a option to change handle inheritance "Currently if you call Process.Start internally CreateProcess is called with bInheritHandles = true (hard coded). It would be great to make it possible to change this behavior, e.g. by adding a Property to ProcessStartInfo. Currently there is no way I know of to change this other then reimplementing System.Diagnostics.Process. # Example If you run this application twice without exiting the first notepad instance the second instance will not be able to open the tcp port, because notepad is still running. This can be a problem for server applications that are starting child processes themself and crash, or are killed by the user before the socket can be closed. ``` csharp using System.Diagnostics; using System.Net; using System.Net.Sockets; class Program { static void Main() { TcpListener listener = new TcpListener(IPAddress.Any, 4567); listener.Start(); Process.Start(new ProcessStartInfo(""notepad.exe"") { UseShellExecute = false }); //Simulate application crash without freeing resources } } ``` # Design proposal The easiest way to make this possible is to add a new Property to ProcessStartInfo and use this in the Call to CreateProcess ``` csharp public sealed class ProcessStartInfo { // ... public bool InheritHandles { get; set; } // defaults to true // ... } ``` # Questions - Is there a very important reason why this was hardcoded like this in the first place? " 307 area-Meta Is the corefx repo or the dotnet org a good place for key community projects? Forked from #294. from @n8ohu - > I am working on uses a C# wrapper around a cross-platform C library and it would, in my opinion, be beneficial to other developers if it was part of the core; There is really a spectrum of .NET libraries, with one end point being the official corefx distribution and the other a weekend project never to be touched again. What you are proposing is much closer to the former. I think your base question is whether corefx or a peer repo is appropriate for key community-owned projects. Your scenario is C# wrappers over native libraries, but it could also be a pure managed library, too. We are considering a similar plan for our own libraries that don't fit or don't fit yet in corefx. We can and should include community libraries in that thinking. The Mono org seems to embrace community libraries that have broad applicability. We should take some inspiration from that. It's always a fine idea to host a library out of your own GitHub account. At the same time, we are intending the dotnet org to be a center of gravity for .NET library development. That's why we put the corefx repo there (and same will be true for the coreclr one) instead of the Microsoft org. It's likely the case that discoverability will be better in the dotnet org than an arbitrary personal repo. What do you think? 311 area-System.Console Bring back Console.CancelKeyPress "We need this so that we can wait on Ctrl + C events in console applications. See https://github.com/aspnet/Hosting/blob/dev/src/Microsoft.AspNet.Hosting/Program.cs#L69. " 312 area-System.IO FileSystem cross platformness and testability Building cross platform applications that talk to the file system is painful. There are several issues like case sensitivity, slash differences and other bizarre restrictions and differences. On another front, testability of the file system has always been impossible with .NET. Any application/library that uses the FileSystem uses something like https://www.nuget.org/packages/System.IO.Abstractions or a custom abstraction to allow mockability. Are there any plans to improve the System.IO API to solve some of these problems? 313 area-System.Numerics System.Numerics.Vectors Fails to Load W/ .NET 4.6 Preview Installed "``` An unhandled exception of type 'System.IO.FileLoadException' occurred in Unknown Module. Additional information: Could not load file or assembly 'System.Numerics.Vectors, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ``` Steps to Reproduce. - Create a console application. - Add the nuget package for System.Numerics.Vector to the project (I tried 1.1.5-beta and 1.1.6-beta). - Add some dependent code (I used `Console.WriteLine(""Hardware Accelerated Vectors: {0}"", Vector.IsHardwareAccelerated);`) - Run the project. - Get above exception. It looks like somehow VS is getting the version number pinned at 4.0.0 and rejects the load. Specific version is disabled, the DLL is being copied as expected and no relevant entries appear to be in the app.config. " 316 area-System.Text Implement IList, IReadOnlyList, and IList on Regex Collections Fixes #271 This is still a work-in-progress. ### TODO - [x] Implement `IList`, `IReadOnlyList`, and `IList` - [x] Add `RegexCollectionDebuggerProxy` - [x] API review - [x] Changes based on API review and initial code review feedback - [ ] Cleanup - [ ] Add tests - [ ] Final code review ### Questions/Notes - As @sharwell noted in #277: `GroupEnumerator` is internal, so it might be possible to change the type of `GroupEnumerator.Capture` from `Capture` to `Group`. This would make the explicit cast in the generic `Current` property unnecessary. 317 area-System.Text Simplify MatchCollection's ICollection.CopyTo - Uses [`List`'s implementation of `ICollection.CopyTo`](https://github.com/Microsoft/referencesource/blob/9da503f9ef21e8d1f2905c78d4e3e5cbb3d6f85a/mscorlib/system/collections/generic/list.cs#L394-L407) which is behavior compatible with the previous implementation. - Avoids an unnecessary array allocation by no longer using `List.ToArray()`. - `SR.Arg_RankMultiDimNotSupported` and `SR.Arg_InvalidArrayType` are no longer needed. - Avoids accessing a property to trigger a side effect. 321 area-System.Text Regex capture, match and group collections now implement the generic IEnumerable This is my first contribution to the .NET Core. I would like to know whether this change would be acceptable under the guidelines of the .NET framework. I am asking because I am making classes implement an interface (acceptable by your rules), but I am also changing the existing interface implementation to an explicit one, in favor of the implicit implementation being the new interface (which is a really grey area that is not included in the rules). Please guide me as to how this pull request needs to change to become acceptable. 322 area-Meta Branching (or not) While commenting on [an outstanding pull request](https://github.com/dotnet/corefx/pull/110#issuecomment-65910391), David Kean mentioned: > We're trying to figure out our branching structure at the moment. Currently we have only a single branch that represents what we're shipping for the next update of .NET Core. Clearly this isn't scalable for the product, and we're going to creating branches for future work so PR's that have API changes and destablizing changes get a little more bake time. @joshfree is looking into that. I would like to get the conversation about branching structure out into the open. And to do that, I would like to start by asking: _why_ is a single branch not scalable for the product? I have worked in code bases of various sizes, release schedules, and branching schemes, and my experience is that NOT branching is nearly always preferable to branching. In fact, the most common reasons given for wanting to branch (e.g. disruptive or long-running changes) are exactly the times when branching hurts the most, because it encourages divergence between different works-in-progress, pushing difficult integration decisions farther out and requiring more rework later. Rather than a policy that handles change by branching, I would rather see a policy of trunk-based development that encourages all changes - even incomplete changes - to be merged into master on a frequent basis. This shortens and simplifies the merging process and encourages small refactorings and improvements by reducing the amount of work needed to merge them. Obviously allowing unfinished work to be committed to master requires mechanisms in place to ensure that such work does not affect the releasability of the framework. Mechanisms such as feature flags and branch by abstraction are slightly more complicated to implement in a framework (especially one that is highly tuned for performance) than in a typical application, but not excessively so. And the advantage of keeping all of the ongoing work together is well worth the effort. What are the community's thoughts on trunk-based development? 323 area-System.Text Decrease in working set was incorrectly marked as test failure "I am hitting a test failure that does not have a consistent repro. ``` Err_004888anied Total memory increased significantly there may be a memory leak (TaskId:339) Percent Difference=0.338227637196709, Max Acceptable Percent Difference=0.3, Start Working Set=576180, End Working Set=381300 (TaskId:339) ``` We probably should not use `Math.abs()` to calculate the difference at https://github.com/dotnet/corefx/blob/master/src/System.Text.RegularExpressions/tests/RegexLangElementsCoverageTests.cs#L60 ``` csharp percentDifference = ((double)Math.Abs(startWorkingSet - endWorkingSet)) / startWorkingSet; if (maxAcceptablePercentDifference < percentDifference) { Console.WriteLine(""Err_004888anied Total memory increased significantly there may be a memory leak""); Console.WriteLine(""Percent Difference={0}, Max Acceptable Percent Difference={1}, Start Working Set={2}, End Working Set={3}"", percentDifference, maxAcceptablePercentDifference, startWorkingSet, endWorkingSet); iCountErrors++; } ``` " 325 area-System.Numerics StringBuilder append with single length strings changed to chars Some StringBuilder.Append calls made with single length symbol strings. These can be a char so that they get directly assigned to the internal char array buffer. Also more consistent with other areas of the codebase. 326 area-Meta .NET Core and pattern compatability (@terrajobst rightly [pointed out](https://github.com/dotnet/corefx/issues/271#issuecomment-68022859) that the thread on implementing collection interfaces on Regex classes had wandered into abstract discussion not related to the original issue. So I am opening this issue in order to continue the discussion here.) To summarize my point (see the [Regex thread](https://github.com/dotnet/corefx/issues/271) for more details): with the addition of IReadOnlyList in .NET 4.5, I don't believe it is appropriate to continue implementing mutable collection interfaces such as IList on immutable collections. The fact that existing immutable collections (including those in the Immutable Collections library) implement these interfaces is not a good enough reason to continue this flawed pattern. This issue is a particular example of the larger question of how .NET Core will evolve, and how much tolerance it has to evolve _away_ from flawed patterns in the .NET Framework. 329 area-Infrastructure Use `nuget restore` instead of `nuget install` See [this line](https://github.com/dotnet/corefx/pull/324#discussion-diff-22273168R41) and the discussion for details. 338 area-System.Text RegexCharClass Improvements and Cleanup Apologies in advance for the large pull request. Normally, I'd break these changes up into separate smaller pull requests, but in this case the changes were all to the same file and some changes build on top of earlier changes, so it was easier to submit as one larger pull request. Each commit is factored appropriately, so it may be easiest to review each commit separately for more sane diffs. The most significant change was to precompute the constants instead of computing the values at runtime in the static constructor. I have a [one-off test](https://gist.github.com/justinvp/0c1b5faf72349b56a2ed) (not intended to be checked-in) that asserts that the precomputed values from the new implementation are equal to the values that would have been computed at runtime using the previous implementation. 340 area-System.Text Support for RegexOptions.Compiled? `RegexOptions.Compiled` isn't currently supported (the option exists but doesn't do anything). Will this be supported? If so, when? If not, why not? 342 area-System.Text More Regex Cleanup Sorry for another larger pull request -- there are just so many opportunities for cleanup in Regex! Most of the commits are pretty fine-grained (some probably could have been squashed together, sorry). 344 area-System.Security Support for Rfc2898DeriveBytes and other founding cryptographic support Hi, Reading the contribution DOs and DON'TS it says not to file an API addition without discussing first. I have the System.Security.Cryptography.Rfc2898DeriveBytes essentially created in a PCL so works in WinRT etc. I'd like to expand on this as Rfc2898DeriveBytes is HmacSha1 based and people are trying to move onto hmacsha256 and upwards nowadays and I'd like to bring this into .NET Core I'd like to start bringing in System.Security.Cryptography namespace into .NET Core. I'll include tests from the test data listed with the cryptographic standards and whatnot where possible. Can I do this? :) 348 area-Meta Updated README.md with recently added projects 349 area-System.Threading TaskHelpers cleanup TaskHelpers.cs is a temporary stop-gap for assemblies that don't yet depend on the latest System.Threading.Tasks contract. This change removes the dependency on the file for those assemblies that do use the latest, changing them to access the Task.CompletedTask, Task.FromCanceled, and Task.FromException members on Task instead of the corresponding workarounds on TaskHelpers. This file should eventually go away entirely. 350 area-System.Console Use StringBuilderCache in additional assemblies "StringBuilderCache maintains a cache of up to a single StringBuilder per thread, avoiding StringBuilder allocations for the common pattern of: ``` C# StringBuilder sb = new StringBuilder(); // ... do some appends return sb.ToString(); ``` and instead enabling: ``` C# StringBuilder sb = StringBuilderCache.Acquire(); // ... do some appends return StringBuilderCache.GetStringAndRelease(sb); ``` It was added to the repo as part of System.IO.FileSystem. This change deploys usage of it through other assemblies. Not all ""new StringBuilder(...)"" usage has been replaced, just those instances that are expected to be most impactful, e.g. tests were ignored, places where StringBuilders are stored into fields were ignored, debug code was ignored, less common members were ignored, etc. Simple microbenchmarks showed measurable improvements as a result. For example, a test around Regex.Replace showed that ~10% of the allocations incurred were for StringBuilder instances; using StringBuilderCache mostly eliminated these and improved throughput by a corresponding ~10%. This will of course vary based on the test employed, but it's a data point. " 352 area-Meta Design document for performance patterns As noted in #351, some patterns which are commonly used in the .NET Framework for performance reasons are not obvious to users who are new to this project. Due to the number of projects which leverage the .NET library as part of their own applications, performance is a particularly sensitive area, especially in regards to [unnecessary] memory allocations. It would be very helpful to have a document explaining commonly used patterns intended to avoid unnecessary memory allocations, and perhaps other techniques which your prior work has indicated are high-value practices for some reason. 361 area-System.Net Ability to set the HttpWebRequest.DefaultMaximumErrorResponseLength on a per request basis I realize the http code hasn't been imported yet.. But it would be really nice if this could be changed in >=4.6 Currently the only way you can set the DefaultMaximumErrorResponseLength for a request is AppDomain wide. We should also be able to be set on a per request basis (like we can do with ServicePoint). 362 area-System.Console Bring back Console.CancelKeyPress We need this so that we can wait on Ctrl + C events in console applications. issue #311 371 area-System.IO Unix Interop Code is platform specific In commits like this: https://github.com/dotnet/corefx/commit/377dde76c5df105a7bab2c0a3002c0d835ff1b07 An attempt has been made to map both structures and constants to C# managed structures. Unix does not have a binary interface for either the constants or the structures, so the definition is likely already wrong for some platforms and will likely be wrong for ports, even within Linux itself. While the structures are constants do change from Unix to Unix a little known quirk is that both structures and constants also change in size, layout and the values in Linux itself. Early versions of Linux chose to emulate the ABI of the host platform, allowing early Linux to easily execute binaries written for the mainstream operating system of the platform. Linux/Alpha copied OSF/1; Linux/SPARC copied SunOS 4; Linux/MIPS some variation of IRIX and so on. This is why Linux includes many of these definitions in /usr/include/arch/XXX, because they are different in each platform. You should do something similar to what Mono.Posix does, which is to have a managed wrapper that talks to a C library that actually performs the native call and marshals the native version to a well-known structure shared with the managed implementation. 377 area-System.Text Regex tests intermittently fail due to memory usage "In RegexLangElementsCoverageTests.cs, there are several checks related to the total memory usage of the test: ``` CSharp // ** RegexLangElementsCoverageTests.cs ** double maxAcceptablePercentDifference = .3; startWorkingSet = GC.GetTotalMemory(true); ... endWorkingSet = GC.GetTotalMemory(true); percentDifference = ((double)Math.Abs(startWorkingSet - endWorkingSet)) / startWorkingSet; if (maxAcceptablePercentDifference < percentDifference) { Console.WriteLine(""Err_004888anied Total memory increased significantly there may be a memory leak""); Console.WriteLine(""Percent Difference={0}, Max Acceptable Percent Difference={1}, Start Working Set={2}, End Working Set={3}"", percentDifference, maxAcceptablePercentDifference, startWorkingSet, endWorkingSet); iCountErrors++; } ``` I think this check may be causing us more bad than good. I'm not sure what GC.GetTotalMemory takes into consideration, but this logic might also be getting tripped up by the fact that we have multiple tests running in parallel. Also, in general, this seems like a bit of a flaky check in the first place; it fails around 10% of the time for me, I would say. Anyone opposed to removing these checks, or at least making it not an error? " 381 area-Meta Question: Single statement `if` formatting "Looking at `System.Threading.Tasks.Dataflow` (amazing library by the way), I see three different variations of formatting of single-statement `if` statements. In _one_ method. From [`DataflowBlock.OutputAvailableAsync`](https://github.com/dotnet/corefx/blob/2bf5a7185fd81949da4d47a432662d8fe80989f6/src/System.Threading.Tasks.Dataflow/src/Base/DataflowBlock.cs#L1485-L1550) [**One line**](https://github.com/dotnet/corefx/blob/2bf5a7185fd81949da4d47a432662d8fe80989f6/src/System.Threading.Tasks.Dataflow/src/Base/DataflowBlock.cs#L1489): ``` c# if (source == null) throw new ArgumentNullException(""source""); ``` [**Two lines**](https://github.com/dotnet/corefx/blob/2bf5a7185fd81949da4d47a432662d8fe80989f6/src/System.Threading.Tasks.Dataflow/src/Base/DataflowBlock.cs#L1493-L1494): ``` c# if (cancellationToken.IsCancellationRequested) return Common.CreateTaskFromCancellation(cancellationToken); ``` [**With braces**](https://github.com/dotnet/corefx/blob/2bf5a7185fd81949da4d47a432662d8fe80989f6/src/System.Threading.Tasks.Dataflow/src/Base/DataflowBlock.cs#L1513-L1516): ``` c# if (target.Task.IsCompleted) { return target.Task; } ``` Are the guidelines for formatting these more nuanced than I'm able to see, or is this just inconsistent formatting? Is this kind of inconsistent formatting normal and acceptable? Is there a preference for how new code should be formatted? " 384 area-System.Collections Application of ObsoleteAttribute to legacy collection types As mentioned in #370, the lack of `[Obsolete]` on certain legacy types in `System.Collections.Specialized` could be confusing to developers. In general I support the use of ObsoleteAttribute, but for this particular library I would recommend it only be applied to types which have well-known newer (better) alternatives. I'm working on the following table... | Legacy Type | Replacement | | --- | --- | | `BitVector32` | No direct replacement? | | `HybridDictionary` | No direct replacement? | | `IOrderedDictionary` | No direct replacement? | | `ListDictionary` | No direct replacement? | | `NameObjectCollectionBase` | No direct replacement? | | `NameValueCollection` | No direct replacement? | | `OrderedDictionary` | No direct replacement? | | `StringCollection` | `List` | | `StringEnumerator` | Only used with `StringCollection` (not marked obsolete?) | | `StringDictionary` | `Dictionary` | 386 area-Infrastructure Jenkins connection abort issues and associated issues with subsequent runs Seeing intermittent issues with Windows remoting in Jenkins. These are known issues but have gone unfixed for a while. In addition, this causes the next job to run in a potentially un-clean environment 391 area-Meta Language or BCL data types "I'm not sure it's worth to discuss this issue. To ensure consistency within the code base the preferred data types should be noted in the wiki. I know this can be a sensitive and subjective issue... **Only use BCL data types** ``` c# String text; String.IsNullOrEmpty(text); Double number; Double.TryParse(text, out number); ``` **Only use language data types** ``` c# string text; string.IsNullOrEmpty(text); double number; double.TryParse(text, out number); ``` **Use language data types for declarations | BCL data types for calling members** ``` c# string text; String.IsNullOrEmpty(text); double number; Double.TryParse(text, out number); ``` My favorit is the last option because - an Enum can't inherit from UInt32 so you have to use uint - because it's not obvious that data types have members - ~~[MSDN](http://msdn.microsoft.com/en-us/library/ms229045.aspx) says ""**√ DO** use a generic CLR type name, rather than a language-specific name, in the rare cases when an identifier has no semantic meaning beyond its type.""~~ " 392 area-Meta Update Wiki to mention that changes to .NET Core must be binary compatible with the full .NET Framework A question came up in the comments for #271 about the possibility of a binary breaking change in the .NET Core Regex collections from the Regex collections in the full .NET Framework. @davkean responded: > You need to be able to build against this library and run on .NET Framework 4.6. And I asked: > So if you accept this suggestion (adding the generic interfaces to these types), the changes will have to be added to .NET 4.6 as well? How much time is left to make changes to .NET 4.6? And @weshaggard responded: > Yes @justinvp any types that already exist on the full desktop framework will need to be updated there as well if they are updated in .NET Core. We have a high level goal of making code written for .NET work no matter what .NET platform you are targeting. As for how much time is left to add new public APIs to .NET 4.6 at this point we are not accepting any more unless they are critical. > > With that said we fully expect .NET Core to evolve much more quickly then the full .NET framework that ships in Windows. We just have to be aware that any changes need to eventually make it there as well so while thinking about breaking changes you cannot just consider .NET Core you must consider the other platforms as well. If we don't do that then we risk diverging the platforms and making .NET development as a whole more difficult. I think it'd be worth adding this to one of the wiki pages so it is clear to everyone that types in .NET Core that exist in the full .NET Framework must be binary compatible. I don't think this is explicitly stated anywhere currently. 395 area-System.Runtime String comparer for sorting numeric strings logically "## Rationale For sorting purposes it's common to need portions of strings containing numbers to be treated like numbers. Consider the list of strings `""Windows 7"", ""Windows 10""`. Using the `Ordinal` `StringComparer` to sort the list one would get ``` Windows 10 Windows 7 ``` but the desired ascending logical sort would be ``` Windows 7 Windows 10 ``` ## Proposed API ```diff namespace System { public class StringComparer { + public static StringComparer Create(CultureInfo culture, CompareOptions options); } } namespace System.Globalization { public enum CompareOptions { + NumericOrdering = 0x00000020 } } ``` ## Usage ```cs var list = new List { ""Windows 10"", ""Windows 7"" }; list.Sort(StringComparer.Logical); // List is now ""Windows 7"", ""Windows 10"" ``` This would also be good for sorting strings containing IP addresses. ## Details * `Logical` is a convenience property equivalent to the result of `Create(CultureInfo.CurrentCulture, CompareOptions.Logical)` * `LogicalIgnoreCase` is a convenience property equivalent to the result of `Create(CultureInfo.CurrentCulture, CompareOptions.Logical | CompareOptions.IgnoreCase)` * Non-numeric sequences will be evaluated with the culture provided. * Numeric sequences will be determined by the result of `Char.IsDigit`. * All UTF-16 digits will be supported and are manually parsed using `Char.GetNumericValue`. * Only positive integral values without digit separators will be supported directly. * Numbers will be treated as `ulong`s. Logic for overflows will have to be considered. * The string `Windows 8.1` would be considered 4 sequences. The `Windows ` would be a string sequence, the `8` would be a numeric sequence, the `.` would be another string sequence, and the `1` would be another numeric sequence. * This API could later be expanded to include support for allowing signs, decimals, and digit separators through the use of overloads accepting a `NumberStyles` parameter. * When a numeric and string sequence are considered at the same time the numeric sequence always comes before the string sequence so when sorting the following list, `""a"", ""7""` the number `7` will be sorted before the letter `a`. * Existing methods that take a `CompareOptions` parameter as input will need to be updated to support the new `Logical` member. ## Open Questions * Should `CompareOptions.Logical` be implemented as the flag option `SORT_DIGITSASNUMBERS` to the `dwCmpFlags` parameter of [`CompareStringEx`](https://msdn.microsoft.com/en-us/library/windows/desktop/dd317761(v=vs.85).aspx)? Using it's implementation should be more efficient but later expanding support for `NumberStyles` will require a re-implementation with matching behavior. ## Updates * Added `Logical` and `LogicalIgnoreCase` properties. * Added support for all UTF-16 digits. * Added more `CreateLogical` overloads to match the `Create` method. * Added retrieval of the `NumberFormatInfo` from the `StringComparer` parameter when not explicitly provided and is a `CultureAwareComparer`. * Removed `CreateLogical` overloads that matched the `Create` method. * Switched to only supporting positive integral values without digit separators. * Added consideration of comparing a numeric sequence with a string sequence. * Added the flag member `CompareOptions.Logical` and changed `CreateLogical` to be just an overload of `Create`." 396 area-Meta Update README.md description of legacy collections 398 area-System.Diagnostics Refactor System.Diagnostics.FileVersionInfo with PAL Introduce a Windows and Unix build for System.Diagnostics.FileVersionInfo.dll. Windows-specific functionality has been moved to separate files, with Unix-specific (but stubbed out) files added to match. 409 area-System.Xml Reduce XPath unit tests run time "Either reduce unit tests subset (apply [OuterLoop] to long tests) or modify tests to keep run time below 5s on average machine. Currently on some machine they run for ~25s. Reduce it by a factor of 5. " 410 area-Meta Update readme to reflect System.Collections.Concurrent 423 area-Meta CLA Labels I've been following the project for a while now and noticed that recently there is a bot in place that adds `cla-required`, `cla-signed` and `cla-not-required`. I personally think that these labels clutter up a lot. Wouldn't it be easier to only add `cla-required` when they haven't signed it yet and remove it when signed? Leaving out the other two labels. Also, when signing up for the CLA you require to enter the company you work for, not everyone has work and some are still studying. 424 area-System.Security X509Certificate: .pfx format unsupported on CoreCLR "This snippet works on `aspnet50` but an exception is thrown on `aspnetcore50` (tested on Windows 7 and Windows 8.1): ``` csharp public static class Program { public static void Main(string[] args) { var assembly = typeof(Program).GetTypeInfo().Assembly; using (var resource = assembly.GetManifestResourceStream(""Certificate.pfx"")) using (var buffer = new MemoryStream()) { resource.CopyTo(buffer); var certificate = new X509Certificate2(buffer.ToArray(), ""Owin.Security.OpenIdConnect.Server""); Console.ReadLine(); } } } ``` ![image](https://cloud.githubusercontent.com/assets/6998306/5743652/fdeb3562-9c1a-11e4-93db-1fec2523adcd.png) ``` {System.Security.Cryptography.CryptographicException: Impossible de trouver l’objet requis. at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr) at System.Security.Cryptography.X509Certificates.X509Utils._QueryCertBlobType(Byte[] rawData) at System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromBlob(Byte[] rawData, Object password, X509KeyStorageFlags keyStorageFlags) at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(Byte[] rawData, String password) at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(Byte[] rawData, String password) at X509Certificate2.Program.Main(String[] args)} ``` Complete repro: https://github.com/PinpointTownes/X509Certificate-Bug " 432 area-System.Console Fix handling of some terminfo files ConsolePal in Unix parses terminfo files to determine the correct format strings to use for setting foreground and background color. Before indexing into the file's contents to grab those strings, we were missing a check to ensure that the file actually contained enough string entries that it could contain a foreground or background color string. This commit just adds that check. 439 area-Infrastructure Building in Visual Studio stopped working While building on the command line via `build.cmd` works just fine, building with Visual Studio doesn't. It's worth calling out that building on the command line via `devenv` is also broken: ``` $ devenv .\System.Collections.NonGeneric.sln /build Microsoft Visual Studio 2013 Version 12.0.31101.0. Copyright (C) Microsoft Corp. All rights reserved. 1>------ Build started: Project: System.Collections.NonGeneric, Configuration: Debug Any CPU ------ 1>CSC : error CS0518: Predefined type 'System.Object' is not defined or imported 2>------ Build started: Project: System.Collections.NonGeneric.Tests, Configuration: Debug Any CPU ------ 2>CSC : error CS0006: Metadata file 'P:\oss\corefx\bin\Debug\System.Collections.NonGeneric\System.Collections.NonGeneric.dll' could not be found ========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ========== ``` It seems the new build-based package resolution is to blame. For example, here is the output of building **System.Collections.NonGeneric**: | Type | # | Description | Project | | --- | --- | --- | --- | | Error | 1 | Unable to find nupkg for System.Text.Encoding. | System.Collections.NonGeneric.Tests | | Error | 2 | Unable to find nupkg for xunit.console.netcore. | System.Collections.NonGeneric.Tests | | Error | 3 | Unable to find nupkg for xunit.runner.dependencies.netcore. | System.Collections.NonGeneric.Tests | | Error | 4 | Unable to find nupkg for Microsoft.DotNet.TestHost. | System.Collections.NonGeneric.Tests | | Error | 5 | Unable to find nupkg for System.Collections.Concurrent. | System.Collections.NonGeneric.Tests | | Error | 6 | Unable to find nupkg for System.Diagnostics.Tracing. | System.Collections.NonGeneric.Tests | | Error | 7 | Unable to find nupkg for System.IO.FileSystem. | System.Collections.NonGeneric.Tests | | Error | 8 | Unable to find nupkg for System.IO.FileSystem.Primitives. | System.Collections.NonGeneric.Tests | | Error | 9 | Unable to find nupkg for System.Linq. | System.Collections.NonGeneric.Tests | | Error | 10 | Unable to find nupkg for System.Reflection.Extensions. | System.Collections.NonGeneric.Tests | | Error | 11 | Unable to find nupkg for System.Runtime.Handles. | System.Collections.NonGeneric.Tests | | Error | 12 | Unable to find nupkg for System.Runtime.InteropServices. | System.Collections.NonGeneric.Tests | | Error | 13 | Unable to find nupkg for System.Text.Encoding.Extensions. | System.Collections.NonGeneric.Tests | | Error | 14 | Unable to find nupkg for System.Text.RegularExpressions. | System.Collections.NonGeneric.Tests | | Error | 15 | Unable to find nupkg for System.Xml.ReaderWriter. | System.Collections.NonGeneric.Tests | | Error | 16 | Unable to find nupkg for System.Xml.XDocument. | System.Collections.NonGeneric.Tests | 440 area-System.Text Initial commit of System.Text.Encoding.CodePages 442 area-System.Text Pull System.Text.Encoding.CodePages from v1.0 to master 445 area-System.Text Stop compiling Interop.cs into Unix build of code pages The Interop.cs file was being compiled into the unix build of System.Text.Encoding.CodePages. This commit just renames the file to be Windows-specific and includes it only in the Windows builds. It also does some minor cleanup of a couple of files. 447 area-Meta Update README.md to include System.IO.MemoryMappedFiles 449 area-Infrastructure Corefx build fails when Xamarin PCL profiles are installed 1. Install Xamarin tools 2. Build corefx EXPECTED: Build succeeds ACTUAL: Build fails with lots of type resolution errors The ResolveNuGetPackages target is failing to resolve assets out of xunit.core.netcore: ``` C:\git\corefx\src\packages\Microsoft.DotNet.BuildTools.1.0.21-prerelease\lib\packageresolve.targets(25,5): warning : Unable to resolve the assets of xunit.core.netcore: Couldn't find a matching group ``` The Xamarin tools add XML files to the SupportedFrameworks folders of some PCL profiles. This results in the configured frameworks for the project to be: ``` .NETFramework,Version=v4.5;.NETCore,Version=v4.5;WindowsPhoneApp,Version=v8.1;WindowsPhone,Version=v8.0;MonoAndroid,Version=v1.0;MonoTouch,Version=v1.0 ``` From the package, the following frameworks are supported: ``` .NETFramework,Version=v4.5;ASP.NetCore,Version=v5.0;.NETCore,Version=v4.5;WindowsPhoneApp,Version=v8.1;WindowsPhone,Version=v8.0 ``` So since the package doesn't support MonoTouch and MonoAndroid, the build system isn't resolving any of the assemblies inside it. 453 area-System.Xml Make fields readonly in System.Xml 454 area-System.Xml Using IsNullOrEmpty in checks Using IsNullOrEmpty in checks instead of direct checks on null or empty 455 area-Meta Consider merging labels `up-for-grabs` and `accepting prs` labels As discussed [here](https://github.com/dahlbyk/up-for-grabs.net/pull/146) it seems that these labels are semantically so close that it may make sense for us to merge them. - `up-for-grabs`. This is meant for tagging issues to indicate that we'd like the help of the community. - `accepting pr`. We use this label as part of the [API review process](https://github.com/dotnet/corefx/wiki/API-Review-Process). It's tagging proposals for API additions to indicate that we're happy to review & accept pull requests for those. It seems they are conceptually both doing the same thing: they are indicating to our community that we're happy if they jump in and help. Thoughts? 459 area-System.Linq Re-enable PLINQ tests The PLINQ tests are currently disabled. This PR turns them back on, alleviating the deadlocks that had caused them to be disabled initially. I also addressed a few other things, including some waits that weren't working correctly and some tests that should be OuterLoop due to their demands on the thread pool. On my machine, the tests as they are after the PR do take ~15 seconds to run as part of the build. I think that's completely reasonable for a set of tests for such a library, but if we're uncomfortable with that we can aim to bring it down further separately. For now, I just want to make sure there's at least some coverage in builds and CI. 461 area-System.Collections Add a static Shuffle method to Array and an instance method to List Consider adding a static Shuffle method to Array and an instance method to List ## Motivation Shuffling data is often required in various applications. .NET does not contain a method to shuffle an array which results in many people implementing it themselves. Implementing a Shuffle method is not really hard but it does require like 10 lines of code and people often wonder where to put these so they just prefer quick and dirty solutions like abusing sort methods with random sort key or even worse random comparison. These methods are far from ideal both because they depend on implementation details of the sorting methods and because they are less effective than the ideal O(N) implementation. ## Proposed API Methods on Array: ``` C# public static void Shuffle(T[] array) public static void Shuffle(T[] array, int index, int length) public static void Shuffle(T[] array, Random rng) public static void Shuffle(T[] array, int index, int length, Random rng) ``` Methods on List ``` C# public void Shuffle() public void Shuffle(Random rng) ``` ## Details The Shuffle method on Array has an overload that can be used to shuffle just part of the array. This is in line with existing Array methods like Sort and Copy and can be useful when implementing Shuffle on List where only the elements of the List will be shuffled without shuffling the full capacity of the list. I also suggest adding an instance Shuffle method on List since this is the most common usage of such a method. 464 area-System.ComponentModel Fix inverted documentation between two methods I just noticed this documentation mistake, the two method descriptions were swapped. 465 area-System.Linq Re-enable PLINQ tests Re-issuing #459 against v1.0 branch. Already reviewed there, so will merge once successfully passes CI. 466 area-Meta Update README.md for System.ComponentModel 467 area-System.Runtime Add a Clamp method to System.Math I know the `System.Math` library hasn't been pushed to the .Net Core library but since discussing api additions could take some time I thought it was a good idea to propose it now. # Rationale and Usage `Math.Clamp` is an easy to implement method and makes it easier for developers. Currently developers would have to implement their own methods in an extension class or use `Math.Max` and `Math.Min` together. The proposed API will shorten the amount of code needed and increase readability. Two examples on how we currently can clamp in .NET: ``` C# int result = Math.Max(Math.Min(value, 100), 0); ``` ``` C# public static class Ext { // Source: http://stackoverflow.com/a/2683487/1455541 public static T Clamp(T val, T min, T max) where T : IComparable { if (val.CompareTo(min) < 0) return min; else if(val.CompareTo(max) > 0) return max; else return val; } } // Somewhere in the codebase int result = Ext.Clamp(value, 0, 100); ``` The proposed API would turn that into: ``` C# int result = Math.Clamp(value, 0, 100); ``` # Proposed API 1 - Specialized ``` C# public static class Math { public static Byte Clamp(Byte value, Byte min, Byte max); public static Decimal Clamp(Decimal value, Decimal min, Decimal max); public static Double Clamp(Double value, Double min, Double max); public static Int16 Clamp(Int16 value, Int16 min, Int16 max); public static Int32 Clamp(Int32 value, Int32 min, Int32 max); public static Int64 Clamp(Int64 value, Int64 min, Int64 max); public static SByte Clamp(SByte value, SByte min, SByte max); public static Single Clamp(Single value, Single min, Single max); public static UInt16 Clamp(UInt16 value, UInt16 min, UInt16 max); public static UInt32 Clamp(UInt32 value, UInt32 min, UInt32 max); public static UInt64 Clamp(UInt64 value, UInt64 min, UInt64 max); } ``` This proposed version mimics the way current `System.Math` methods do it. # Proposed API 2 - IComparable Because this is a new API addition it can also be possible to have smaller implementation using generics that should cover all the cases. ``` C# public static class Math { public static T Clamp(T value, T min, T max) where T : System.IComparable; } ``` # Open Questions - If the api addition is going to be implemented should it be implemented as Proposed API 1 or 2? 468 area-System.Text Spelling fixes for System.Text.RegularExpressions Just fixing a handful of spelling errors in comments. 470 area-Meta Do not use optional arguments on public APIs As part of the [discussion](https://github.com/dotnet/apireviews/tree/master/2015-01-14-misc#110-add-async-documentelement-loading-for-xlinq) around adding async document/element loading for XLINQ (#110) it was mentioned using optional arguments (commonly called optional parameters). **PLEASE, DON'T USE IT ON PUBLIC APIS!!!** Before there were optional arguments the problem of a large number of possible parameters for an API already existed. And since we are talking about XML, look at how `XmlReader` and `XmlWritter` solved it: - [public static XmlReader Create(TextReader input, XmlReaderSettings settings)](http://referencesource.microsoft.com/#System.Xml/System/Xml/Core/XmlReader.cs,6375d7745e42dee9) - [public static XmlWriter Create(XmlWriter output, XmlWriterSettings settings)](http://referencesource.microsoft.com/System.Xml/a.html#c6b2420e91f21e33) Taking advantage of object initialization, calling it looks like optional arguments: ``` XmlReader.Create(reader, new XmlReaderSettings{ IgnoreWhitespace = true }); ``` (I'm going to propose more type inference for cases like this: [Do not require type specification for constructors when the type is known #35](https://github.com/dotnet/roslyn/issues/35)) It's extensible. Another setting can always be added with proper defaults and without breaking existing code. And those settings also become something that can be passed around. Imagine that the original API used optional arguments and there was only one `Save` method. How would you keep that and now add an `CancellationToken` parameter? 482 area-System.Xml Simple cleanup in XDocument classes 484 area-System.Xml "Explicitly marked XDocument private methods with ""private"" keyword" The `private` keyword was used for fields within the XDocument classes but not the method definitions. Updated for consistency. 489 area-System.Numerics Add primitive structs Rectangle and Point System.Drawing, System.Windows, and XNA all implement nearly-identical structures to represent points and rectangles. Given the verbosity of a correct implementation, many library developers re-use an existing implementation, and tie their public APIs to (non-core-compatible) dependencies. Offering primitives like Point, Rectangle (as well as PointF, RectangleF, and Color) would make it much easier for libraries to be compatible with each other. Or, is there a de-facto standard nuget package for these structs that we can promote? 490 area-System.Runtime Allow the Math methods to return float values I find myself casting returned results from Math methods into floats constantly, even if only floats are supplied as parameters for that method. Many developers don't need the accuracy of a double and floats works fine, many other numeric structs store their values are floats too (such as a Vector2). While explicit casting doesn't hurt anyone there are other classes I have come by that return a float if the supplied parameter(s) is float only. This wouldn't really be considered a new API addition, all it would do is add overloaded methods that accepts floats as parameters and returns a float (could call the Double version of the Method underneath to avoid code duplication and cast back). If any of the parameters become a double then the double version of the Method would be called and a double value would return. I would like feedback on what other people think before implementing it. 492 area-System.Collections statistic distribution generator I am thinking to add some random generators that obeys specific statistic distribution functions (like normal, binomial, geometric and so on) and also makes the random generator usable as IEnumerable to be easier to use in line or sequence expressions. There is a great paper that covers the ability to obtain sampling functions by composing other sampling functions that is quite nice to express via IEnumerable and IEnumerator. Suck functions can be very useful to obtain numbers that follow a specific law, for example to be used in generating correct weights to initialise untrained neural networks or similar scenarios. 494 area-System.Runtime Consider exposing extension methods for System.Array .Net 2 convenience methods With .net 2.0, `System.Array` was given a set of convenient LINQ like methods like those present on `List`. Unlike `List`, they were added as static methods. While, LINQ does offer some of these methods these variants do offer some differences/benefits as they are A: Optimized for arrays. B: Evaluated immediately. C: Always produce an array. These methods are:: ``` csharp AsReadOnly BinarySearch ConvertAll Exists Find FindAll FindIndex FindLast FindLastIndex ForEach IndexOf LastIndexOf Sort TrueForAll ``` Some of these offer no real benefit over LINQ, but others can be very useful especially in array heavy APIs like Reflection. Primarily `ConvertAll` and `FindAll`. These methods would also make it easier to work with arrays. There would be no clash with existing LINQ methods as they have different names. 496 area-System.Xml Reformat Xml code Guidelines were updated few times since the last time it was done. 497 area-Meta Remove non-cancellable overloads from async APIs I'd like to start discussion on removing the convenience overloads that call a cancellable API with `CancellationToken.None`: `Task DoAsync() { return DoAsync(CancellationToken.None); }` I think these overloads bloat the API and if you've got a large number of parameters, can be error-prone to implement. I also believe they encourage poor design: consider that a great majority of async code either already does or should support cancellation. The use of these APIs should be relatively rare in good code. 498 area-System.Collections HashSet constructor performance tuning for ISet "As it is currently, `HashSet` has a constructor that takes `IEnumerable`. `var set1 = new HashSet{2,3,4};` `var set2 = new HashSet(set1); // binds against ctor..(IEnumerable)` This works nicely, but the fact that we are ""copying/cloning"" from `ISet` is not being taken advantange of. If we have `HashSet` with ~10000 elements, **there is no efficient way to create a copy of it**. Instead, current implementation will call internally `AddIfNotPresent` for each element in given `IEnumerable`, eg, do an expensive element lookup for each item that is being added (to check if it doesn't exist in our current `HashSet`). This does not have to be the case. `ISet` already promises us the uniqueness. Let me know if this is something of interest, I would like to work on that. " 503 area-Meta Make use of Code Contracts where ever applicable. I wonder the reason why while the code contracts are part of BCL and it is a research project of Microsoft, only some of the API makes use of it. This this is effectively preventing making use of code contracts for the end consumers as well. I would appreciate at least if you can make use of Code Contracts on the public surface API. 507 area-System.Collections Specification tests for collection interfaces In the last [API review](https://github.com/dotnet/apireviews/tree/master/2015-01-14-misc#follow-ups-for-api-review-board), @KrzysztofCwalina mentioned that it would be nice to have a set of tests that can serve as specifications for the expected behavior of the built-in collection interfaces. These tests could be used by people creating types which implement these interfaces to ensure that their implementations match the specification. I love this idea, and would love to help create the suite. Is this something that the community can engage on? 516 area-Meta Replace hand-rolled tests for exceptions with xunit's Assert.Throws There is a lot of hand-rolled exception checking in various test code. This should be refactored to use xunit's Assert.Throws method as it improves readability and can reduce possible bugs in test code. For an example please see PR https://github.com/dotnet/corefx/pull/512 519 area-System.Runtime Allow BitConverter.ToString to format without dashes "I think BitConverter is not even in CoreFx yet, but for when it is, please allow to convert to an hex string without dashes. This is to avoid this pattern: ``` BitConverter.ToString(data).Replace(""-"", string.Empty); ``` This representation of bytes is common enough that .NET should have a simple method to do this without extra code or an extra memory allocation. " 522 area-System.Threading Thread apartment states in .NET Core Hi all! Just wondering, will you support thread apartment state in .NET Core ? Currently there are no support. Maybe in future? Thanks. 525 area-Meta Consider creating a gitter channel for corefx repo "I was checking out the Aurelia docs (new JS framework), and they casually mention ""If you have questions, we hope that you will join us on our [gitter channel](https://gitter.im/Aurelia/Discuss)."" Gitter is apparently a free group chat for open source projects hosted on github. Here's the best ""About"" page I could find: http://blog.gitter.im/about/. It looks like they have really good github integration (an activity feed that shows PRs; issues; commits; etc). I'd be really interested in trying out a gitter channel for the corefx repo. " 526 area-System.Collections Dictionary class should allow to use a custom load factor Hello guys, I had seen the `Dictionary` class does not allow the use of a custom `load factor`, this may allow many optimizations, as the case we want to create a dictionary of known initial size and it will be completely filled, but we don't want that resizing operations occurs, for example it would be possible setting the `load factor` to `1.0F`. The class constructors below may be added: ``` csharp public Dictionary(int capacity, float loadFactor); public Dictionary(int capacity, float loadFactor, IEqualityComparer comparer) ``` Simirlarly to `Java`'s `HashMap` class constructor: ``` java public HashMap(int initialCapacity, float loadFactor); ``` When the `load factor` is not known, it should take a default value, for example `0.75F`. Thanks a lot :smile: and excuse me for any inconvenience. 529 area-Infrastructure Clean target removes dependencies "The ""Clean"" target of the build script intentionally removes the ""src\packages"" directory, causing the next build to have to restore them again. This is unnecessary, and atypical compared to most build scripts. ""Clean"" typically removes the outputs of the build process, not the inputs. If there is a need for an ability to wipe out the packages directory, I propose putting this functionality under a separate target, ""CleanDependencies"". " 537 area-System.Globalization Refactor globalization extensions with PAL Simple refactoring to introduce a PAL layer into System.Globalization.Extensions. Cleaned up a few things along the way as well, e.g. factoring out some duplicated code into helpers, making a few fields readonly, etc. 538 area-System.Runtime New API proposal: null replacement with Option, Some and None "The .NET framework and C# have implemented a lot of ideas of functional programming. LINQ, lambdas and immutability are only a few examples. In my eyes this makes the real difference between Java and .NET Solving the [null reference problem](http://www.infoq.com/presentations/Null-References-The-Billion-Dollar-Mistake-Tony-Hoare) would be the next great addition to the .NET framework borrowed from functional languages. So in this issue I want to propose the addition of a [Option type](http://en.wikipedia.org/wiki/Option_type) to the .NET Framework. # Background Taken from https://github.com/louthy/language-ext#null-reference-problem: > null must be the biggest mistake in the whole of computer language history. I realise the original designers of C# had to make pragmatic decisions, it's a shame this one slipped through though. So, what to do about the 'null problem'? > > null is often used to indicate 'no value'. i.e. the method called can't produce a value of the type it said it was going to produce, and therefore it gives you 'no value'. The thing is that when 'no value' is passed to the consuming code, it gets assigned to a variable of type T, the same type that the function said it was going to return, except this variable now has a timebomb in it. You must continually check if the value is null, if it's passed around it must be checked too. > > Option works in a very similar way to Nullable except it works with all types rather than just value types. It's a struct and therefore can't be null. An instance can be created by either calling Some(value), which represents a positive 'I have a value' response; Or None, which is the equivalent of returning null. > > So why is it any better than returning T and using null? It seems we can have a non-value response again right? Yes, that's true, however you're forced to acknowledge that fact, and write code to handle both possible outcomes because you can't get to the underlying value without acknowledging the possibility of the two states that the value could be in. This bulletproofs your code. You're also explicitly telling any other programmers that: ""This method might not return a value, make sure you deal with that"". This explicit declaration is very powerful. # Rationale and Usage So basically the `Option` type enforces developers to check if a return value has really a value. An example function returning an option would be something like this: ``` public Option GetCacheValue(string key) { if(cache.Keys.Contains(key)) { return cache[key]; //return new Some(cache[key]) //return new Option(cache[key]); } else { return Option.None; //return new Option(); } } ``` The consumer code would then look like this: ``` string value = GetCacheValue(key).Match( some: v => v, none: () => ""this is the default value"" ) ``` # Proposed API ``` public struct Option { // For creating a None public Option(); public Option(T value) public static readonly Option None = new Option(); public bool IsNone {get; }; public bool IsSome { get; } public static implicit operator Option(T value) public static implicit operator Option(OptionNone none) public TReturn Match(Func some, Func none); public static Option Some(T value); } ``` # Details - This was mainly inspired by https://github.com/louthy/language-ext/blob/master/LanguageExt.Core/Option.cs of @louthy # Open questions - [ ] Should there be a public `Value` property as an alternative to Match? - [ ] In which assembly would this be correct? Namespace? - [ ] Should Option be a struct (security, since it cannot be null) or an interface (usability, since `Option` is then also an `Option`)? Thoughts? " 539 area-Meta Improve flow of readme Changed the ordering of content and a few pieces of wording. Primary goal was to pop contributing opportunities as early as possible in the readme, since the components list is getting quite long. We may want to do something different with the list as it grows even longer, but we'll not worry about that now. 540 area-System.Xml Remove double type checks in System.Xml Replace code like this: ``` if (obj is Foo) ((Foo)obj).DoSomething(); ``` with ``` Foo foo = obj as Foo; if (foo != null) foo.DoSomething(); ``` Most of these changes were verified in #491 and #482, but these PRs were reverted due reasons non-related with these changes. 549 area-System.IO DriveInfo tests fail if current user uses SUBST On my machine I'm using SUBST to map folders as drives. This causes the the drive info tests to fail: ``` System.IO.FileSystem.DriveInfoTests.Get_VolumeLabel.Test01 [FAIL] System.IO.IOException : The directory is not a subdirectory of the root directory. Stack Trace: p:\oss\corefx\src\System.IO.FileSystem.DriveInfo\src\System\IO\DriveInfo.Windows.cs(235,0): at System.IO.DriveInfo.set_VolumeLabel(String value) p:\oss\corefx\src\System.IO.FileSystem.DriveInfo\tests\GetVolumeLabelTests.cs(74,0): at System.IO.FileSystem.DriveInfoTests.Get_VolumeLabel.Test01() System.IO.FileSystem.DriveInfoTests.Set_VolumeLabel.Test01 [FAIL] System.IO.IOException : The directory is not a subdirectory of the root directory. Stack Trace: p:\oss\corefx\src\System.IO.FileSystem.DriveInfo\src\System\IO\DriveInfo.Windows.cs(235,0): at System.IO.DriveInfo.set_VolumeLabel(String value) p:\oss\corefx\src\System.IO.FileSystem.DriveInfo\tests\SetVolumeLabelTests.cs(75,0): at System.IO.FileSystem.DriveInfoTests.Set_VolumeLabel.Test01() ``` I would expect the drive info tests to be resilient to this. 572 area-System.Console Initial commit of System.Console tests 574 area-System.Collections Add PriorityQueue to Collections "See [**LATEST Proposal**](https://github.com/dotnet/corefxlab/blob/master/docs/specs/priority-queue.md) in corefxlab repo. # Second Proposal options Proposal from https://github.com/dotnet/corefx/issues/574#issuecomment-307971397 ### Assumptions Elements in priority queue are unique. If they are not, we would have to introduce 'handles' of items to enable their update/remove. Or the update/remove semantics would have to apply to first/all, which is weird. Modeled after [`Queue`](https://apisof.net/catalog/System.Collections.Generic.Queue%3CT%3E) ([MSDN link](https://msdn.microsoft.com/en-us/library/7977ey2c(v=vs.110).aspx)) ### API ```c# public class PriorityQueue : IEnumerable, IEnumerable<(TElement element, TPriority priority)>, IReadOnlyCollection<(TElement element, TPriority priority)> // ICollection not included on purpose { public PriorityQueue(); public PriorityQueue(IComparer comparer); public IComparer Comparer { get; } public int Count { get; } public bool IsEmpty { get; } public bool Contains(TElement element); // Peek & Dequeue public (TElement element, TPriority priority) Peek(); // Throws if empty public (TElement element, TPriority priority) Dequeue(); // Throws if empty public bool TryPeek(out TElement element, out TPriority priority); // Returns false if empty public bool TryDequeue(out TElement element, out TPriority priority); // Returns false if empty // Enqueue & Update public void Enqueue(TElement element, TPriority priority); // Throws if it is duplicate public void Update(TElement element, TPriority priority); // Throws if element does not exist public void EnqueueOrUpdate(TElement element, TPriority priority); public bool TryEnqueue(TElement element, TPriority priority); // Returns false if it is duplicate (does NOT update it) public bool TryUpdate(TElement element, TPriority priority); // Returns false if element does not exist (does NOT add it) public void Remove(TElement element); // Throws if element does not exist public bool TryRemove(TElement element); // Returns false if element does not exist public void Clear(); public IEnumerator<(TElement element, TPriority priority)> GetEnumerator(); IEnumerator IEnumerable.GetEnumerator(); // // Selector part // public PriorityQueue(Func prioritySelector); public PriorityQueue(Func prioritySelector, IComparer comparer); public Func PrioritySelector { get; } public void Enqueue(TElement element); public void Update(TElement element); } ```` **Open questions:** 1. Class name `PriorityQueue` vs. `Heap` 2. Introduce `IHeap` and constructor overload? (Should we wait for later?) 3. Introduce `IPriorityQueue`? (Should we wait for later - `IDictionary` example) 4. Use selector (of priority stored inside the value) or not (5 APIs difference) 5. Use tuples `(TElement element, TPriority priority)` vs. `KeyValuePair` * Should `Peek` and `Dequeue` rather have `out` argument instead of tuple? 6. Is `Peek` and `Dequeue` throwing useful at all? ----------------------------------------------------------------------------------------------- # Original Proposal Issue https://github.com/dotnet/corefx/issues/163 requested the addition of a priority queue to the core .NET collection data structures. This post, while a duplicate, is intended to act the formal submission to the corefx API Review Process. The issue contents are the _speclet_ for a new System.Collections.Generic.PriorityQueue type. I will be contributing the PR, if approved. ## Rationale and Usage The .NET Base Class Libraries (BCL) currently lacks support for ordered producer-consumer collections. A common requirement of many software applications is the ability generate a list of items over time and process them in an order different from the order they were received in. There are three generic data structures within the System.Collections hierarchy of namespaces that supported a sorted collection of items; System.Collections.Generic.SortedList, System.Collections.Generic.SortedSet, and System.Collections.Generic.SortedDictionary. Of these, SortedSet and SortedDictionary are not appropriate for producer-consumer patterns that generate duplicate values. The complexity of SortedList is Θ(n) worst case for both Add and Remove. A much more memory and time efficient data structure for ordered collections with producer-consumer usage patterns is a priority queue. Other than when capacity resizing is necessary, worse case insertion (enqueue) and remove top (dequeue) performance is Θ(log n) - far better than the existing options that exist in the BCL. Priority queues have a wide degree of applicability across different classes of applications. The Wikipedia page on Priority Queues offers a list of many different well understand use cases. While highly specialized implementations may still require custom priority queue implementations, a standard implementation would cover a broad range of usage scenarios. Priority queues are particularly useful in scheduling the output of multiple producers, which is an important pattern in highly parallelized software. It's worth noting that both the C++ standard library and Java offer priority queue functionality as part of their basic APIs. ## Proposed API ``` C# namespace System.Collections.Generic { /// /// Represents a collection of objects that are removed in a sorted order. /// /// Specifies the type of elements in the queue. [DebuggerDisplay(""Count = {count}"")] [DebuggerTypeProxy(typeof(System_PriorityQueueDebugView<>))] public class PriorityQueue : IEnumerable, ICollection, IEnumerable, IReadOnlyCollection { /// /// Initializes a new instance of the class /// that uses a default comparer. /// public PriorityQueue(); /// /// Initializes a new instance of the class /// that has the specified initial capacity. /// /// The initial number of elements that the can contain. /// is less than zero. public PriorityQueue(int capacity); /// /// Initializes a new instance of the class /// that uses a specified comparer. /// /// The to use when comparing elements. /// is null. public PriorityQueue(IComparer comparer); /// /// Initializes a new instance of the class /// that contains elements copied from the specified collection and uses a default comparer. /// /// The collection whose elements are copied to the new . /// is null. public PriorityQueue(IEnumerable collection); /// /// Initializes a new instance of the class /// that contains elements copied from the specified collection and uses a specified comparer. /// /// The collection whose elements are copied to the new . /// The to use when comparing elements. /// /// is null. -or- /// is null. /// public PriorityQueue(IEnumerable collection, IComparer comparer); /// /// Initializes a new instance of the class that is empty, /// has the specified initial capacity, and uses a specified comparer. /// /// The initial number of elements that the can contain. /// The to use when comparing elements. /// is less than zero. /// is null. public PriorityQueue(int capacity, IComparer comparer); /// /// Gets the for the . /// /// /// The that is used when /// comparing elements in the . /// public IComparer Comparer { get; } /// /// Gets the number of elements contained in the . /// /// The number of elements contained in the . public int Count { get; } /// /// Adds an object to the into the by its priority. /// /// /// The object to add to the . /// The value can be null for reference types. /// public void Enqueue(T item); /// /// Removes and returns the object with the lowest priority in the . /// /// The object with the lowest priority that is removed from the . /// The is empty. public T Dequeue(); /// /// Returns the object with the lowest priority in the . /// /// The is empty. public T Peek(); /// /// Removes all elements from the . /// public void Clear(); /// /// Determines whether an element is in the . /// /// /// The object to add to the end of the . /// The value can be null for reference types. /// /// /// true if item is found in the ; otherwise, false. /// public bool Contains(T item); /// /// Copies the elements of the to an , /// starting at a particular index. /// /// /// The one-dimensional Array that is the /// destination of the elements copied from the . /// The Array must have zero-based indexing. /// /// The zero-based index in at which copying begins. /// is null. /// /// is less than zero. -or- /// is equal to or greater than the length of the /// /// /// The number of elements in the source is /// greater than the available space from to the end of the destination /// . /// public void CopyTo(T[] array, int arrayIndex); /// /// Copies the elements of the to an /// , starting at a particular index. /// /// /// The one-dimensional Array that is the /// destination of the elements copied from the . /// The Array must have zero-based indexing. /// /// The zero-based index in at which copying begins. /// is null. /// is less than zero. /// /// is multidimensional. -or- /// does not have zero-based indexing. -or- /// is equal to or greater than the length of the -or- /// The number of elements in the source is /// greater than the available space from to the end of the destination /// . -or- /// The type of the source cannot be cast automatically /// to the type of the destination . /// void ICollection.CopyTo(Array array, int index); /// /// Copies the elements stored in the to a new array. /// /// /// A new array containing a snapshot of elements copied from the . /// public T[] ToArray(); /// /// Returns an enumerator that iterates through the /// /// An enumerator for the contents of the . public Enumerator GetEnumerator(); /// /// Returns an enumerator that iterates through the /// /// An enumerator for the contents of the . IEnumerator IEnumerable.GetEnumerator(); /// /// Returns an enumerator that iterates through the . /// /// An that can be used to iterate through the collection. IEnumerator IEnumerable.GetEnumerator(); /// /// Sets the capacity to the actual number of elements in the , /// if that number is less than than a threshold value. /// public void TrimExcess(); /// /// Gets a value that indicates whether access to the is /// synchronized with the SyncRoot. /// /// true if access to the is synchronized /// with the SyncRoot; otherwise, false. For , this property always /// returns false. bool ICollection.IsSynchronized { get; } /// /// Gets an object that can be used to synchronize access to the /// . /// /// /// An object that can be used to synchronize access to the /// . /// object ICollection.SyncRoot { get; } public struct Enumerator : IEnumerator { public T Current { get; } object IEnumerator.Current { get; } public bool MoveNext(); public void Reset(); public void Dispose(); } } } ``` ## Details - Implementation data structure will be a binary heap. Items with a greater comparison value will be returned first. (descending order) - Time complexities: | Operation | Complexity | Notes | | --- | --- | --- | | Construct | Θ(1) | | | Construct Using IEnumerable | Θ(n) | | | Enqueue | Θ(log n) | | | Dequeue | Θ(log n) | | | Peek | Θ(1) | | | Count | Θ(1) | | | Clear | Θ(N) | | | Contains | Θ(N) | | | CopyTo | Θ(N) | Uses Array.Copy, actual complexity may be lower | | ToArray | Θ(N) | Uses Array.Copy, actual complexity may be lower | | GetEnumerator | Θ(1) | | | Enumerator.MoveNext | Θ(1) | | - Additional constructor overloads that take the System.Comparison delegate were intentionally omitted in favor of a simplified API surface area. Callers can use Comparer.Create to convert a function or Lambda expression to an IComparer interface if necessary. This does require the caller to incur a one-time heap allocation. - Although System.Collections.Generic is not yet part of corefx, I propose that this class be added to corefxlab in the meantime. It can be moved to the primary corefx repository once System.Collections.Generic are added and there is consensus that its status should be elevated from experimental to an official API. - An IsEmpty property was not included, since there is no additional performance penalty calling Count. The majority of the collection data structures do not include IsEmpty. - The IsSynchronized and SyncRoot properties of ICollection were implemented explicitly as they are effectively obsolete. This also follows the pattern used for the other System.Collection.Generic data structures. - Dequeue and Peek throw an InvalidOperationException when the queue is empty to match the established behavior of System.Collections.Queue. - IProducerConsumerCollection was not implemented as its documentation states that it is only intended for thread-safe collections. ## Open Questions - Is avoiding an additional heap allocation during calls to GetEnumerator when using foreach a strong enough rationale for including the nested public enumerator structure? - Should CopyTo, ToArray, and GetEnumerator return results in prioritized (sorted) order, or the internal order used by the data structure? My assumption is that the internal order should be returned, as it doesn't incur any additional performance penalties. However, this is a potential usability issue if a developer thinks of the class as a ""sorted queue"" rather a priority queue. - Does adding a type named PriorityQueue to System.Collections.Generic cause a potentially breaking change? The namespace is heavily used, and could cause a source compatibility problem for projects that include their own priority queue type. - Should items be dequeued in ascending or descending order, based on the output of IComparer? (my assumption is ascending order, to match the normal sorting convention of IComparer). - Should the collection be 'stable'? In other words, should two items with equal IComparison results be dequeued in the exact same order they are enqueued in? (my assumption is this isn't needed) ## Updates - Fixed complexity of 'Construct Using IEnumerable' to Θ(n). Thanks @svick. - Added another option question regarding whether the priority queue should be ordered in ascending or descending order compared to the IComparer. - Removed NotSupportedException from explicit SyncRoot property to match behavior of other System.Collection.Generic types instead of using the newer pattern. - Made the public GetEnumerator method return a nested Enumerator struct instead of IEnumerable, similar to the existing System.Collections.Generic types. This is an optimization to avoid a heap (GC) allocation when using a foreach loop. - Removed ComVisible attribute. - Changed complexity of Clear to Θ(n). Thanks @mbeidler. " 579 area-System.Globalization System.Globalization.Extensions.Tests fail on Windows 7 "On Win7 (7601) the globalization extensions have several failures: System.Globalization.Extensions.Tests.IdnaConformanceTests.TestAsciiPositive [FAIL] System.ArgumentException : Decoded string is not a valid IDN name. Parameter name: Unicode System.Globalization.Extensions.Tests.IdnaConformanceTests.TestUnicodePositive [FAIL] Expected: <+á.+ɦê>. Actual:. Error on line number 61 System.Globalization.Extensions.Tests.IdnaConformanceTests.TestAsciiNegative [FAIL] Assert.Throws() Failure Expected: typeof(System.ArgumentException) Actual: (No exception was thrown) System.Globalization.Extensions.Tests.NormalizationAll.NormalizeTest [FAIL] Assert.False() Failure (many lines like ""'\x0068' is not matched with the normalized form '\x2095 with Géò normalization"") " 581 area-System.Xml Improve performance and allocations of xpath string functions "Improve Translate perf by ~20% and allocations by around 50% (dependant on string) Improve Normalize perf by ~30% and allocations by around 55% (dependant on string) General: We are always iterating through every char so we can get them all in one go and use that as our temporary buffer instead of the StringBuilder. Because these functions can remove chars there is a read point in the buffer and an update point. The update point is always the same place or less than the read point. Normalize: No need for XmlConvertEx.TrimString as we can start ""firstSpace"" as false to trim the start and all trailing whitespace at the end is combined into one space. We can just check that at the end which avoids a trim string creation. " 584 area-System.Linq ParallelEnumerable.Range(...).AsOrdered().Concat(...) ...out of order I'm getting a pretty distressing error: ``` int leftSize = 4; int rightSize = 4; int[] leftData = new int[leftSize]; for (int i = 0; i < leftSize; i++) leftData[i] = i; int[] rightData = new int[rightSize]; for (int i = 0; i < rightSize; i++) rightData[i] = i; ParallelQuery query = ParallelEnumerable.Range(0, leftSize).AsOrdered().Concat(ParallelEnumerable.Range(0, rightSize)); Assert.True(leftData.Concat(rightData).SequenceEqual(query)); ``` ...fails. The expected sequence is `[0, 1, 2, 3, 0, 1, 2, 3]`, and the actual result of this `Concat(...)` is `[0, 0, 1, 1, 2, 2, 3, 3]`. Adding `AsOrdered()` to the inner range has no effect. There is no history of changes for `Concat(...)`, although the actual problem may be elsewhere. This issue is **NOT** present in the current .NET distribution (ie, creating a brand-new C# project won't reproduce the error, this is something happening in corefx, which is a really good thing)/ Generating the parallel sequence via `Enumerable.Range(...).AsParallel().AsOrdered()` _also_ fails, but seems to be putting the elements in non-deterministic order (the last run was `[0, 1, 1, 2, 2, 3, 0, 3]`). However, generating the sequence via `leftData.AsParallel().AsOrdered().Concat(leftData.AsParallel())` returns the expected sequence (both of them have to be generated via backing arrays, or you get the re-ordered or non-deterministic results). `ParallelEnumerable.Range(...).AsOrdered()` _does_ return an ordered sequence. The following test succeeds: ``` int count = 8; ParallelQuery elements = ParallelEnumerable.Range(0, count).AsOrdered().Select(x => (object)x); int counter = 0; Assert.All(elements.Cast(), x => Assert.Equal(counter++, x)); Assert.Equal(count, counter); ``` 585 area-System.Linq Fix PLINQ concat ordering bug For .NET Core, some (temporary) changes were made to PLINQ to remove some of its usage of generics in order to workaround some (temporary) constraints of the runtime. In doing so, this bug slipped in, with the wrong concat key being created for an element in the sequence, causing erroneous results. This PR fixes the bug and adds a test case that fails before and succeeds after the fix. (Fixes #584) 589 area-System.Linq Address remaining PLINQ test ActiveIssues A bunch of PLINQ tests are disabled as ActiveIssue. This commit fixes all of them (issues #176 and #240), except for #235, which is addressed by a separate PR (#585) for a product bug rather than test issues. I did not do a general pass through the PLINQ tests, even though they could use it. PlinqModesTests - There's an explicit comment at the top of the test that it's not meant for DOP==1 (it verifies that work happens in parallel), and then apparently we were surprised when it was failing on single core machines that result in DOP == 1 ;) UnionIntersectDistinctTests.RunOreredUnionTest1 - There's no reason this test should fail. If it does, there's a bug to be investigated. I'm assuming it was actually stalling because of another test running with it concurrently. WithCancellationTests - A bunch of these tests were scheduling tasks to asynchronously cancel/dispose a query, and the query was written to take a certain amount of time to hopefully allow for cancellation to take place. But it appears as part of the tests being ported, those timeouts were simply commented out, making it extremely likely the tests would fail. I've just rewritten them to do the cancellation as part of the query's execution rather than using a separate asynchronous task. I also deleted some duplicative tests. And I made some tests that still did explicit delays/timeouts to be OuterLoop. 594 area-System.Runtime Parsing string to enum with digit as first char takes a very long time "Note: This has to do with mscorlib. https://github.com/Microsoft/referencesource sent me here, but this doesn't look like the place where this is handled. Am I right? When parsing strings to enums with TryParse, in some cases this takes way longer than in all the other cases. After a bit of research I found that all the strings with a digit as first char are slower. This is due to the attempt to parse the string to the underlying type (https://github.com/Microsoft/referencesource/blob/master/mscorlib/system/enum.cs#L441) with a Convert.ChangeType, which can throw an exception, because further down the line it uses (for example) Int32.Parse instead of TryParse (https://github.com/Microsoft/referencesource/blob/master/mscorlib/system/convert.cs#L1121). The time it takes to create the Exception is significant. In my project I ended up writing a new Enum parser to circumvent this issue. ""Something"": 240.49 ns per parse ""1Somethin"": 37178.57 ns per parse ""123456789"": 485.63 ns per parse As users expect Convert.ToXxx() to throw an exception when it fails, changing this is a bad idea I think. Possible solutions I can think of: - Extend the Convert class with Try-methods that don't throw exceptions, and use those while trying to parse an enum (much work) - Instead of checking whether the first character is a digit (https://github.com/Microsoft/referencesource/blob/master/mscorlib/system/enum.cs#L434), change that line to a TryParse of the whole string (the easier way) " 598 area-Meta Improve flow of readme The readme file contains several pieces of information, of which the list of components is the most substantial. I pulled the engagement-oriented content above the component list, to make it easier to read. I also attempted to better clarify and position CoreFX within .NET Core. At the point that CoreCLR shows up, this will be more important. Supersedes PR #539, which had the wrong baseline and targeted the wrong branch. 617 area-System.Diagnostics Failure in System.Diagnostics.FileVersionInfoTest on Chinese Windows 8.1 "Four out of the six tests in System.Diagnostics.FileVersionInfoTest failed when `build` on Chinese Windows 8.1. They might also fail on other non-ENU OS'es. - FileVersionInfoTest.FileVersionInfo_Normal [FAIL] Error - Property 'Language' incorrect. Expected == ""English (United States)"", Actual == ""\u82f1\u8bed(\u7f8e\u56fd)"", Alternate == <null> - FileVersionInfoTest.FileVersionInfo_Chinese [FAIL] Error - Property 'Language' incorrect. Expected == ""Chinese (Simplified)"", Actual == ""\u4e2d\u6587(\u7b80\u4f53)"", Alternate == ""Chinese (Simplified, PRC)"" - FileVersionInfoTest.FileVersionInfo_DifferentFileVersionAndProductVersion [FAIL] Error - Property 'Language' incorrect. Expected == ""Process Default Language"", Actual == ""\u8fdb\u7a0b\u9ed8\u8ba4\u8bed\u8a00"", Alternate == <null> > - FileVersionInfoTest.FileVersionInfo_CustomManagedAssembly [FAIL] Error - Property 'Language' incorrect. Expected == ""Language Neutral"", Actual == ""\u8bed\u8a00\u4e2d\u6027"", Alternate == <null> " 621 area-Infrastructure Multiple nuget src\ dirs? Why are there multiple nuget src dirs.? There is a .nuget with a single file and a nuget with multiple files. Was this an oversight? Can I fix/combine them? 624 area-System.Diagnostics FileVersionInfo test: Get expected values using VerLanguageName call #617 It seems that VerLanguageName returns value in Windows locale no matter what thread locale is set, so must get expected values using that function. Fixes #617 Also, as really minor addition - change newline from \r\n to Environment.NewLine to match with same change in FileVersionInfo class (since it now uses AppendLine) 625 area-Meta HelloWorld WinRT Dependency? Hello, I'm trying to build the HelloWorld demo based off the Blog post instructions. It looks like the nuget.org packages aren't quite synced up, so that's a shame and I'm using 22416 instead. After I build and attempt to run the program I get an error stating that winrt-string is missing. Should this be working on Windows 7? -Thanks 626 area-System.Runtime Deprecate DateTime.Now (The original issue was at dotnet/coreclr#45), but I've moved it over here as the meat of the issue is about framework design. From @mj1856 I would like to propose that [`DateTime.Now`](https://github.com/dotnet/coreclr/blob/ef1e2ab328087c61a6878c1e84f4fc5d710aebce/src/mscorlib/src/System/DateTime.cs#L904-L920) be deprecated. This is most developer's first introduction to working with time, and is also a root cause of bugs related to daylight saving time and time zones. Developers should get in the habit of thinking globally, rather than locally - especially when designing for the web. Even on desktop and mobile applications that only run in a single time zone, this can create the kind of bugs that pull developers out of bed at 2AM on the morning of a daylight saving time transition. More supporting arguments: - [The Case Against DateTime.Now](http://www.codeofmatt.com/2013/04/25/the-case-against-datetime-now/) - Matt Johnson (me) - [What's Wrong with DateTime Anyway](http://blog.nodatime.org/2011/08/what-wrong-with-datetime-anyway.html) - Jon Skeet Given the widespread nature of this API, I suggest _not_ removing it from coreclr - but rather marking it with an `[Obsolete]` attribute. I can send a PR if the suggestion is approved. 636 area-System.Diagnostics Possible typo in FileVersionInfoTest "This is low priority, but logging here so it doesn't get lost. In [FileVersionInfoTest.cs line 239](https://github.com/dotnet/corefx/blob/0252409de5d77d4a104903a68d9ee34d54992e54/src/System.Diagnostics.FileVersionInfo/tests/FileVersionInfoTest.cs#L239): ``` s_fviSecondNativeLibrary.ProductName = ""Unkown_Product_Name""; ``` ""Unkown"" should be ""Unknown"", but correcting it fails the test. It should probably be first corrected wherever it originates from. Thanks. " 641 area-System.Xml Some System.Xml.Linq.XDocument tests are failing Some of the tests used to print error messages but did not fail. I added Asserts assuming that they fail and created this issue. I did not check if this is a test bug, product bug or not a bug at all (we need to check what happens on desktop and if this is something we should fix). 642 area-System.Xml Clean up System.Xml.Linq.XDocument tests "- [x] Remove spam messages (there are few left) - [x] Some of the tests might be failing but not throwing (look at the messages - https://github.com/dotnet/corefx/issues/641) - [x] Convert tests to use Xunit (right now they are only partially) - [x] Replace if (expr) throw new TestException, etc with proper use of Xunit asserts " 644 area-System.Reflection Proposal: Additional methods to aid in reflection of generic types "I don't know if this is the appropriate place to make such a suggestion. ## Problem I've always found it a bit annoying that the reflection APIs in .NET haven't been improved much since the advent of generics and when working with generic types or methods that considerable additional boilerplate needs to be written in order to correctly work with these types. ## Solution In the past I've implemented helper extension methods which significantly simplify reflection over generic types and methods. These extension methods largely work on top of the public surface of the `System.Type` class, although a few dealing with generic methods did resort to reflection in order to call internal methods to better detect and deal with ambiguities. I think that it would be very convenient to have these methods (or something like them) considered for addition into the core framework. I am willing and able to share my extension methods and could start a branch if there is traction to this idea. ### FindGenericInterfaces Identical to `Type.FindInterfaces` except that it will match on open generic interface types. ``` cs public delegate bool GenericTypeFilter(Type type, Type[] genericArguments, object filterCriteria); public static Type[] FindGenericInterfaces(this Type type, Type genericInterfaceType); public static Type[] FindGenericInterfaces(this Type type, Type genericInterfaceType, GenericTypeFilter filter, object filterCriteria); Type[] interfaces = typeof(int[]).FindGenericInterfaces(typeof(IEnumerable<>), (type, types, criteria) => types[0] == typeof(int), null); ``` ### ImplementsInterface Returns `true` if the type implements the specified interface. The interface can either be an open generic type or a closed constructed type. If the case of the former the overloads can be used to return the generic type arguments. For those overloads that accept a specific count of `out` parameters the generic type arguments must match the count of the `out Type` arguments. For the overload that accepts a `Type[]` the number of generic type arguments must match the length of the array. The overload that accepts an `out Type[]` will match any number of generic type arguments. _I also have `IsSubclassOf` and `Is` extension methods that function in almost the same manner except that the first matches if the type is a subclass of the specified type and the second matches if the type is a subclass of, implements or is of the specified type._ ``` cs public static bool ImplementsInterface(this Type type, Type interfaceType); public static bool ImplementsInterface(this Type type, Type interfaceType, out Type genericArgument); public static bool ImplementsInterface(this Type type, Type interfaceType, out Type genericArgument1, out Type genericArgument2); public static bool ImplementsInterface(this Type type, Type interfaceType, out Type genericArgument1, out Type genericArgument2, out Type genericArgument3); public static bool ImplementsInterface(this Type type, Type interfaceType, Type[] genericArguments); public static bool ImplementsInterface(this Type type, Type interfaceType, out Type[] genericArguments); Type elementType, keyType; if (typeof(int[]).ImplementsInterface(typeof(IEnumerable)) { ... } if (typeof(int[]).ImplementsInterface(typeof(IEnumerable<>), out elementType)) { ... } if (typeof(Dictionary).ImplementsInterface(typeof(IDictionary<>), out keyType, out elementType)) { ... } Type[] arguments = new Type[2]; if (typeof(Dictionary).ImplementsInterface(typeof(IDictionary<>), arguments)) { ... } arguments = null; if (typeof(Dictionary).ImplementsInterface(typeof(IDictionary<>), out arguments)) { ... } ``` ### GetGenericMethod _Separated into proposal [Add GetGenericMethod method to simplify finding generic methods via reflection](https://github.com/dotnet/corefx/issues/16567)._ Returns the generic method with the same number of specified generic arguments. The generic arguments are checked for compatibility with the generic type constraints. If a parameter type list is also specified then the parameter types must be acceptable for the given generic type arguments. _In order to properly handle matches and ambiguity resolution I did have to break out reflection in order to invoke the internal members `RuntimeType.FilterApplyMethodBase`, `DefaultBinder.FindMostDerivedNewSlotMeth` and `DefaultBinder.CompareMethodSigAndName`. A built-in implementation would not require to rely on any reflection._ ``` cs public static MethodInfo GetGenericMethod(this Type type, string name, Type[] genericArgs); public static MethodInfo GetGenericMethod(this Type type, string name, Type[] genericArgs, BindingFlags bindingAttrs); public static MethodInfo GetGenericMethod(this Type type, string name, Type[] genericArgs, Type[] types); public static MethodInfo GetGenericMethod(this Type type, string name, Type[] genericArgs, Type[] types, ParameterModifier[] modifiers); public static MethodInfo GetGenericMethod(this Type type, string name, Type[] genericArgs, BindingFlags bindingAttrs, Binder binder, Type[] types, ParameterModifier[] modifiers); public static MethodInfo GetGenericMethod(this Type type, string name, Type[] genericArgs, BindingFlags bindingAttrs, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers); public class Foo { public void Bar(object value) { ... } public void Bar(T value) { ... } } MethodInfo genericBar = typeof(Foo).GetGenericMethod(""Bar"", new Type[] { typeof(string) }, new Type[] { typeof(string) }); ``` " 645 area-System.IO Support long file names on Windows Now would seem to be the time to finally tackle the MAX_PATH nightmare. With the Win32FileSystem and other abstractions we can convert incoming paths to their long path equivalent if needed before handing off to the actual Win32 APIs. It appears that all of the APIs currently in use support the extended syntax (\?), with the exception of Get/SetDirectory. 649 area-System.Runtime String.Equals isn't intuitive and forces us to do the OrdinalIgnoreCase thing "We're doing a sample and we are FOREVER doing this ``` if (sort.Equals(""Title"", StringComparison.OrdinalIgnoreCase)) ``` I think it's time for an overload or an extension that ""does the right thing."" This is a 10 year old pattern and if the default is wrong (as we tell people to do this) then let's make a better method. Everyone has a version and extension that does this. " 652 area-Meta Remove dead code Many libraries and tests has some dead code. Please remove it per library. At minimum we should run FxCop (list might not be complete, following is just a list of folders under src/) - [ ] Microsoft.Win32.Primitives - [ ] Microsoft.Win32.Registry - [ ] System.Collections.Concurrent - [ ] System.Collections.Immutable - [ ] System.Collections.NonGeneric - [ ] System.Collections.Specialized - [ ] System.ComponentModel.Annotations - [ ] System.ComponentModel.Primitives - [ ] System.ComponentModel - [ ] System.Console - [ ] System.Diagnostics.FileVersionInfo - [ ] System.Diagnostics.Process - [ ] System.Globalization.Extensions - [ ] System.IO.FileSystem.DriveInfo - [ ] System.IO.FileSystem.Primitives - [ ] System.IO.FileSystem - [ ] System.IO.MemoryMappedFiles - [ ] System.IO.Pipes - [x] System.IO.UnmanagedMemoryStream (https://github.com/dotnet/corefx/pull/1080) - [ ] System.Linq.Parallel - [ ] System.Numerics.Vectors - [ ] System.Reflection.Metadata - [x] System.Resources.ResourceWriter - [ ] System.Runtime - [ ] System.Text.Encoding.CodePages - [ ] System.Text.RegularExpressions - [x] System.Threading.Tasks.Dataflow - [ ] System.Xml.XDocument - [ ] System.Xml.XPath.XDocument - [ ] System.Xml.XPath.XmlDocument - [ ] System.Xml.XPath - [ ] System.Xml.XmlDocument 657 area-System.Runtime System.Runtime tests fail on Win10, non en-US culture The code for the Single and Double.TryParse and ToString tests seem to assume OS < Win10 and CultureInfo = en-US. Here's a failure running on Win10 due to the same infinity issue as #136 ``` DoubleTests.TestToString [FAIL] Assert.Equal() Failure Γåô (pos 0) Expected: Infinity Actual: Γê₧ Γåæ (pos 0) Stack Trace: D:\Src\corefx\src\System.Runtime\tests\System\Double.cs(181,0): at DoubleTests.TestToString() DoubleTests.TestTryParse [FAIL] Assert.True() Failure Finished: System.Runtime.Tests Stack Trace: D:\Src\corefx\src\System.Runtime\tests\System\Double.cs(294,0): at DoubleTests.TestTryParse() SingleTests.TestToString [FAIL] Assert.Equal() Failure Γåô (pos 0) Expected: Infinity Actual: Γê₧ Γåæ (pos 0) Stack Trace: D:\Src\corefx\src\System.Runtime\tests\System\Single.cs(181,0): at SingleTests.TestToString() SingleTests.TestTryParse [FAIL] Assert.True() Failure Stack Trace: D:\Src\corefx\src\System.Runtime\tests\System\Single.cs(294,0): at SingleTests.TestTryParse() ``` I did not repro similar issues with non en-US culture, but I think from code inspection it won't work there either (even on Win7 or Win8)... 659 area-System.Runtime GCTest TotalMemory tests failing. ``` GCTests.TotalMemory [FAIL] Assert.True() Failure Stack Trace: d:\j\workspace\dotnet_corefx_prtest\Config\Release\OS\Windows_NT\Tests\false\label\windows\src\System.Runtime\tests\System\GC.cs(68,0): at GCTests.TotalMemory() ``` See: http://dotnet-ci.cloudapp.net/job/dotnet_corefx_prtest/Config=Release,OS=Windows_NT,Tests=false,label=windows/91/console 668 area-System.Runtime Implement a generic Enum.Parse method Although the Enum.TryParse method (https://msdn.microsoft.com/en-us/library/system.enum.tryparse(v=vs.110).aspx) has two generic overloads, the Enum.Parse overloads (https://msdn.microsoft.com/en-us/library/System.Enum.Parse(v=vs.110).aspx) were added to the .NET Framework in version 1.0, before the introduction of generics. They create the need for rather redundant code, such as ``` Colors colorValue = (Colors) Enum.Parse(typeof(Colors), colorString); ``` which entails the need to add an additional cast, as well as instantiate a Type object that represents the enumeration type. It would be nice to add generic Parse overloads that correspond to the generic TryParse overloads: ``` public static TEnum Enum.Parse(String value); public static TEnum Enum.Parse(String value, Boolean ignoreCase); ``` Note that there's also another open issue on improving the performance of Enum.TryParse at https://github.com/dotnet/corefx/issues/594. 674 area-System.Diagnostics FileVersionInfo tests' native assemblies and exes do not have sources We should at least provide the sources for these native binaries so that we can tell what's going on if we hit issues. The next time we need to make a change to these tests, it would also be worth getting the native binaries to build as vcxprojs, relying on the VS2013 prerequisite for now (see [System.ServiceProcess.ServiceController.Tests](https://github.com/dotnet/corefx/tree/v1.0/src/System.ServiceProcess.ServiceController/tests/System.ServiceProcess.ServiceController.Tests) for an example). When we start to light up tests cross-platform, we will be forced to clean this up and use CMake or some other solution for native binaries. cc @weshaggard 679 area-Infrastructure Refactor build to run tests based on targets and dependencies rather than properties "The build system currently runs tests by setting the RunTestsForProject to execute after PrepareForRun. Because we don't want to run the tests after a Visual Studio build (because VS has its own mechanisms for running tests), since #508 the BuildingInsideVisualStudio property is used to disable the RunTestsForProject target. Making the build system aware of the context in which its running in order to skip a target feels odd in a build system with a robust target and dependency mechanism. It seems to me that it would be more idiomatic for the build to expose its targets in such a way so that each context can use the target system to control what targets are run. In other words, do not include the RunTestsForProject in the dependency tree of the default target for the sub-project files (which is what Visual Studio will execute), but do include it in the dependency tree of the default target for the top-level build file. In practice, I believe this would just mean changing the default target for each sub-project to be Compile instead of Build. This would also have the positive effect of making the build IDE-agnostic, which is important as .NET Core becomes truly cross-platform. What would the value of the ""BuildingInsideVisualStudio"" property be from within Xamarin Studio, or SharpDevelop, or Sublime using [OmniSharp](http://www.omnisharp.net/)? Xamarin Studio actually sets BuildingInVisualStudio to true in order to try and increase compatibility, which is obviously not a desirable state of affairs. Let's try to reduce the need for such hacks by keeping the dependencies between the build and the IDE clean (i.e. one-way). " 682 area-Meta Contract.Assert vs Debug.Assert Some of the CoreFX libraries use Contract.Assert. Others use Debug.Assert. We should be consistent, and if possible sweep the source to unify this. 683 area-System.Console Why having System.Console.dll? Why having a new DLL called `System.Console.dll`? `System.Console` class is already in `mscorlib.dll` since .NET Framework 1.0 684 area-System.Runtime Add non-throwing methods to Convert class "Convert class is the only method to convert boxed values to needed integer type. However, it throws exceptions, so it is too hard to implement behavior that matches simple explicit cast between integer types. As a solution - add TryXXX methods to Convert class. Additionally, it would be nice to have option to make Convert behave like explicit cast. For example, this is valid: ``` C# int a = -1; int b = (int)(uint)a; ``` But this is not: ``` C# int a = -1; int b = Convert.ToInt32(Convert.ToUInt32(a)); ``` This can be really useful when you process some data as ""just some bytes"" and you may get either signed or unsigned boxed value at input. As a possible solution - add overload that accepts second boolean argument and acts like an explicit integer cast. Example of this problems and required workaround can be seen in Enum class, in particular here: https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/Enum.cs#L207 " 686 area-Meta (Proposal) Coding Guidelines. "The coding guidelines should be alter to permit the following styles. which aids the readability of the code. - Align on the `:` of named parameters rather than lefthand edge of parmeter name ``` c# public static ImmutableArray GetAllMethodBodyDiagnostics(CSharpCompilation compilation, CancellationToken cancellationToken) { DiagnosticBag diagnostics = DiagnosticBag.GetInstance(); CompileMethodBodies( compilation: compilation, moduleBeingBuilt: null, generateDebugInfo: false, hasDeclarationErrors: false, filter: null, filterTree: null, filterSpanWithinTree: null, diagnostics: diagnostics, cancellationToken: cancellationToken ); DocumentationCommentCompiler.WriteDocumentationCommentXml(compilation, null, null, diagnostics, cancellationToken); compilation.ReportUnusedImports(diagnostics, cancellationToken); return diagnostics.ToReadOnlyAndFree(); } ``` vs ``` c# public static ImmutableArray GetAllMethodBodyDiagnostics(CSharpCompilation compilation, CancellationToken cancellationToken) { DiagnosticBag diagnostics = DiagnosticBag.GetInstance(); CompileMethodBodies( compilation: compilation, moduleBeingBuilt: null, generateDebugInfo: false, hasDeclarationErrors: false, filter: null, filterTree: null, filterSpanWithinTree: null, diagnostics: diagnostics, cancellationToken: cancellationToken); DocumentationCommentCompiler.WriteDocumentationCommentXml(compilation, null, null, diagnostics, cancellationToken); compilation.ReportUnusedImports(diagnostics, cancellationToken); * return diagnostics.ToReadOnlyAndFree(); } ``` - Simple IF If the If statement is small and has no else, and the code block is small enough. The combined width is less than the 80 character width limit. ``` c# if( arg0 == null ) throw new ArgumentException( nameof( arg0 ) ); if( arg0 == null ) { throw new ArgumentException( nameof( arg0 ) ); }; ``` vs ``` c# if( arg0 == null ) { throw new ArgumentException( nameof( arg0 ) ); } ``` Consider multiple guards statements you are approaching halve of the length of the screen, ever before you've reached the core of the method. - Simple case clause ``` c# select ( value ) { case 0: return ""Zero""; case 1: return ""One""; case 2: return ""Two""; // ... case 9: return ""Nine""; default: return ""Foo""; } ``` vs ``` c# select ( value ) { case 0: return ""Zero""; case 1: return ""One""; case 2: return ""Two""; // ... case 9: return ""Nine""; default: return ""Foo""; } ``` 15 LoC rather than 25 or 35 if you need to include the `break` ``` case 0: output = ""Zero""; break; ``` - 2 space indentation Consider the case of pattern-matching, each scope gets indented, 5 levels of indentation and you're already used a quarter of the permitted code width. - Method Parameter align vertically If the method signature is getting ""too"" wide, then consider vertical alignment. ``` c# internal static MethodSymbol DefineScriptEntryPoint ( CSharpCompilation compilation, PEModuleBuilder moduleBeingBuilt, TypeSymbol returnType, bool hasDeclarationErrors, DiagnosticBag diagnostics ) { ``` ``` c# internal static MethodSymbol DefineScriptEntryPoint(CSharpCompilation compilation, PEModuleBuilder moduleBeingBuilt, TypeSymbol returnType, bool hasDeclarationErrors, DiagnosticBag diagnostics) { ``` **NOTE** I not say that the existing code should be altered (it would still be valid according to the guidelines) but allow pull-requests to use some permitted alternatives forms. Yes someone could submit a pull-request that changes the exist to use the alternatives. Whether that pull-request would be accepted is a different question. " 692 area-System.Runtime Add a non-generic version of Enum.TryParse These are the methods in Enum class related to string parsing. ``` c# public static object Parse(Type enumType, string value); public static object Parse(Type enumType, string value, bool ignoreCase); public static bool TryParse(string value, out TEnum result) where TEnum : struct; public static bool TryParse(string value, bool ignoreCase, out TEnum result) where TEnum : struct; ``` Apparently Parse is exposed only in non-generic form, while TryParse is only exposed in generic form. This is somewhat inconsistent. It is simple enough to call a non-generic method in a generic method, but not the other way around. So Parse can be made generic using the following helper. But it is a lot harder to wrap TryParse into TryParse(Type enumType) without reflection calls. ``` c# public static TEnum Parse(string value, bool ignoreCase) { return Enum.Parse(typeof(TEnum), value, ignoreCase); } ``` The suggestion is to add a non-generic Enum.TryParse method, the API signature would look like ``` c# public static bool TryParse(Type enumType, string value, out object result) public static bool TryParse(Type enumType, string value, bool ignoreCase, out object result) ``` 693 area-System.Runtime Add Enum.SetFlag and Enum.RemoveFlag to make bitwise flagging easier To maintain multiple bool states in a class, instead of declaring many bool fields, an enum flag can be used to compact these states in to a single member to optimize for memory usage. ``` c# [Flags] enum DirtyFlags { X = 1, Y = 1 << 1, Z = 1 << 2 }; DirtyFlags dirtyFlags = DirtyFlags.X | DirtyFlags.Y | DirtyFlags.Z; ``` It is simple to test if a flag is set using `Enum.HasFlag(DirtyFlags.X)`, but the scenario is not complete. Without the ability to set and remove a flag, the following code needs to be maintained manually: ``` c# // Setting a flag dirtyFlags |= DirtyFlags.X; // Removing a flag, this is harder to remember :( dirtyFlags &= ^DirtyFlags.X; ``` The suggestion is to add 2 methods to Enum to help set and clear a flag. ``` c# public bool HasFlag(Enum flag); // This method already exists public bool SetFlag(Enum flag); public bool RemoveFlag(Enum flag); ``` These methods should be aggressively inlined since bitwise manipulations is very likely to be used in a performance sensitive scenario. 694 area-Meta State policy on mscorlib "I see a lot of confusion around mscorlib, since it's part of coreclr project, but it feels more like part of corefx. Some issues are open here (and sent to coreclr, like #594), some are open there and sent to here (like #684). Plus, there is some classes that exist in both repos with some differences like ConcurrentDictionary (for example of pull request open to one repo and sent to another see dotnet/coreclr#63). And even tests for runtime classes are in corefx (but runtime classes itself are in coreclr). There should be something like ""rule of a thumb"" to rule this out. " 699 area-System.Collections Implement ForEachAsync in System.Collections.Concurrent @stephentoub has some great blog posts about higher level operations that can be implemented all using public API that exists today. Some of these would be great to see in the library itself: http://blogs.msdn.com/b/pfxteam/archive/2012/03/05/10278165.aspx In particular ``` C# public static Task ForEachAsync(this IEnumerable source, Func body) { return Task.WhenAll( from item in source select Task.Run(() => body(item))); } ``` And ``` C# public static Task ForEachAsync(this IEnumerable source, int dop, Func body) { return Task.WhenAll( from partition in Partitioner.Create(source).GetPartitions(dop) select Task.Run(async delegate { using (partition) while (partition.MoveNext()) await body(partition.Current); })); } ``` 700 area-System.Runtime Proposal: System.Date type "Currently, trying to use System.DateTime to represent just calendar dates is overkill and is an easy way to introduce bugs. SQL Server supports a native date-only type, and having a date-only type in .NET to match would be very handy. But not only from SQL: accepting an MVC action method parameter from an HTML5 input type=""date"" field would be simplified with a native Date type. Examples: ``` C# Date d = new Date(2015, 2, 9); Date d2 = Date.UtcToday; Date d3 = Date.LocalToday; // helper methods for adding/subtracting days, months, years, or TimeSpan Date d4 = d.AddDays(7); Date d5 = d.Subtract(TimeSpan.FromYears(2)); string s = d.ToString(); //--> ""2015-02-09"" // properties: int y = d.Year; int m = d.Month; int day = d.Day; DayOfWeek weekday = d.DayOfWeek; int doy = d.DayOfYear; // convert from DateTime: Date d6 = DateTime.UtcNow.ToDate(); Date d7 = (Date)DateTime.UtcNow; // convert to DateTime: DateTime dt = d.ToDateTime(); DateTime dt2 = (DateTime)d; // equivalent to new DateTime(d.Year, d.Month, d.Day) ``` " 701 area-Infrastructure Add Contract Reference Asssemblies to the repo We need to enabling building our contract reference assemblies in the CoreFX repo. They are be needed for a number of reasons: 1) We need to build them to put them in our nuget packages. 2) We need them to produce our facades for our nuget packages. 3) People would like to see a reference for what is supported (see #147 as example) and for what we will be bringing online overtime. We will need to figure out the structure we want to provide them in and provide the tooling for editing them. A strawman for the structure would be something like: src\System.Runtime\src\Contract\4.0.0.0\System.Runtime.cs|csproj src\System.Runtime\src\Contract\4.0.10.0\System.Runtime.cs|csproj src\System.Runtime\src\Contract\4.0.20.0\System.Runtime.cs|csproj 703 area-System.Globalization Open-source System.Globalization unit tests Note: The implementation of this contract lives in mscorlib in the [coreclr](https://github.com/dotnet/coreclr) repository, but we are planning to put tests in this repo and test against the NuGet package produced by the coreclr repo. 704 area-System.IO Open-source System.IO unit tests Note: The implementation of this contract lives in mscorlib in the [coreclr](https://github.com/dotnet/coreclr) repository, but we are planning to put tests in this repo and test against the NuGet package produced by the coreclr repo. 705 area-System.Reflection Open-source System.Reflection unit tests Note: The implementation of this contract lives in mscorlib in the [coreclr](https://github.com/dotnet/coreclr) repository, but we are planning to put tests in this repo and test against the NuGet package produced by the coreclr repo. 707 area-System.Threading Open-source System.Threading unit tests Note: The implementation of this contract lives in mscorlib in the [coreclr](https://github.com/dotnet/coreclr) repository, but we are planning to put tests in this repo and test against the NuGet package produced by the coreclr repo. 708 area-System.Text Open-source System.Text.Encoding unit tests Note: The implementation of this contract lives in mscorlib in the [coreclr](https://github.com/dotnet/coreclr) repository, but we are planning to put tests in this repo and test against the NuGet package produced by the coreclr repo. 709 area-System.Diagnostics Write a test for PROCESS_QUERY_LIMITED functionality "Per #303 we have some debt here we need to get tested. It's not clear the best strategy here. Should this be an inner loop test? Does the test need to run elevated somehow or can we run at regular permissions and create a low integrity process? " 721 area-System.Net Registered I/O Extensions Expose Winsock's RIO Extensions to .NET. [Registered I/O is available](https://msdn.microsoft.com/en-gb/library/windows/desktop/ms740642%28v=vs.85%29.aspx) for desktop from Windows 8, Windows Server 2012, Windows Store apps from Server 2012 R2 and 8.1, and phone from Windows Phone 8 User code would want to pre-register a buffer, which would need to be pinned and go via [RIORegisterBuffer](https://msdn.microsoft.com/en-us/library/windows/desktop/hh437199%28v=vs.85%29.aspx) probably by passing through an internal buffer as per the [Websocket](http://referencesource.microsoft.com/#System/net/System/Net/WebSockets/WebSocket.cs,7dd0b6c7a0033d04)s to reduce data copies. Async sends and receives driven via ArraySegment over provided internal buffer. (Related [SO question](http://stackoverflow.com/questions/18419117/rio-registered-i-o-sockets-in-net)) 725 area-System.Console Augment terminfo search with first-letter-as-hex terminfo files are organized into subdirectories based on the first letter of the terminal name. On Linux, the letter itself is used as the directory name. On OS X, the hex value for the letter is used as the directory name. This commit updates the logic that searches for the terminfo database file to try both locations. Fixes #723 (the search portion of it, not the runtime asserts once the correct search path is used) 728 area-System.Text Open-source EncodingData tool This tool is used to generate [System.Text.Encoding.CodePages\src\System\Text\EncodingTable.Data.cs](https://github.com/dotnet/corefx/blob/master/src/System.Text.Encoding.CodePages/src/System/Text/EncodingTable.Data.cs). 735 area-Infrastructure NativeServiceTest fails to build with /p:OS=Unix "When running the following command from the root of my corefx repo: ``` build /t:rebuild /p:SkipTests=true /p:OS=Unix ``` I consistently get the following error towards the end of the build: ``` C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build tools for v120 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, please install v120 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting ""Retarget solution"". [\src\System.ServiceProcess.ServiceController\tests\NativeTestService\NativeTestService.vcxproj] ``` I have VS2015 CTP 5 installed. I don't have VS2013 installed. (We don't actually need this Windows-only test project to build when building with OS=Unix, if that's the source of the problem.) " 736 area-System.IO Use lseek instead of lseek64 in Unix I/O As part of this, changed interop definitions of off_t to be Int64 rather than IntPtr. For now we're assuming that we'll run either on 64-bit systems and/or where _FILE_OFFSET_BITS == 64. We can revisit this if that assumption fails. Fixes #733 738 area-System.Runtime Add more tests around Enum.TryParse 743 area-Infrastructure Feature: Need to create a solution for building localized binaries We need to come up with a solution to enable building localized binaries as well as taking contributions to localized content. 744 area-Infrastructure Top level bin\ output folder has become cluttered with overly generic names "Many of the files below are specific to a given library's tests, but there is no convention to identify them as such. e.g. 'Assembly1' is specific to FileVersionInfo tests and 'ModuleCore' is for Xml. We should either: 1. Rename all test assemblies to include a prefix matching their parent. 2. Create a hierarchical structure in bin\ I think 1 would be better as it would also make the build log easier to understand. I also question whether we even need so many test assemblies, especially in the XML case. `` D:\Src\corefx\bin\Debug>dir /b \* | findstr /v ""System"" | findstr /v ""Microsoft"" Assembly1 Axes.Tests BaseLibManaged Events.Tests MemoryMappedFile.Tests MemoryMappedViewAccessor.Tests MemoryMappedViewStream.Tests Misc.Tests ModuleCore NativeTestService ProcessTest_ConsoleApp Properties.Tests SDMSample.Tests Streaming.Tests TreeManipulation.Tests XDocument.Common XDocument.Test.ModuleCore XmlCoreTest XmlDiff xNodeBuilder.Tests xNodeReader.Tests XunitTraitsDiscoverers ``` ``` " 745 area-Infrastructure Many solutions fail to build in VS without a full build.cmd first The culprit in most cases is a missing project reference to XunitTraitsDiscoverers. VS needs the targets of project references to be in the scope of the current solution. While we could go and add this project everywhere, I think it will clutter the solutions. A better approach might be to use shared source files that we pull in the test targets/props. 746 area-Infrastructure The top-level src/ folder is cluttered with all of those .slns "IMHO, each library should have its sln file within its own folder. Instead of ``` src\ System.Xyz\ System.Xyz.sln ``` We should have ``` src\ System.Xyz\ System.Xyz.sln ``` I believe the reasons why we had the former originally are obsolete now. 1) We liked the idea of grouping related libraries together in a solution. Today, only System.Xml.\* does this. However, it will not really work long-term because we shouldn't have library-to-library project-to-project references as it messes with our package versioning story post-V1. 2) We had problems with redundant packages/ folders. I believe this was solved by the NuGet.config change that moved packages to a folder at the root outside of src " 754 area-System.Collections Simplify and modernize System.Collections tests The System.Collections tests were mechanically ported from existing test assets using a different test framework. Some of the tests also include misleading comments, and complication and obfuscation relating to constraints at the time they were written. 758 area-Infrastructure BuildPackages target fails because GetPackageVersion needs a version number "BuildPackages target is broken currently because GetPackageVersion requires more than we are currently setting in corefx repo right now. Luckily (:)) we had another bug that prevented this target from running on clean builds so not many people have hit it yet including our CI system. I'm fixing the other bug however I'm going to disable BuildPackages for now until we get this fixed. Task ""GetPackageVersion"" (TaskId:2) Task Parameter:NuSpecFile=D:\git\corefx\src\nuget\Microsoft.Bcl.Immutable.nuspec (TaskId:2) D:\git\corefx\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-4\lib\packages.targets(62,5): error MSB4044: The ""GetPackageVersion"" task was not given a value for the required parameter ""DailyBuildNumber"". " 759 area-Infrastructure Incremental build tweaks Update Clean target to no longer delete PackagesDir, to address #529. Fixed an issue with the _RestoreBuildTools target where we sometimes get into a never ending running of that target in cases where your dir.props or pacakges.config is newer than the tools. This showed its head while I had edits to that file and was no longer cleaning my Packages directory. To address I always ensure the outputs are newer by touching them at the end of the target whenever it is ran. Also realized that our BuildPackages target was not being run any longer on clean builds and only on incremental builds. This showed that it is recently broken by the latest build tools update and I filed #758 for that but for now I'm disabling the building of the packaging. I also started importing dir.targets in build.proj so the tools were restored in time for them to be used in src\dir.proj even on clean builds. 765 area-Infrastructure Add daily build number to NuGet packages and fix package versioning. This is to address issue #758. This change adds BuildNumber.props containing the daily build number property that's consumed by the package build infrastructure. Updated package versions for Immutable and Metadata based on the values of the daily building packages. The values have a build number one greater than the last build. Deleted all nuspec files for non-shipping packages. 770 area-Infrastructure Make XunitTraitDiscoverers as a part of the custom Xunit. Inorder to skip tests and other xunit functionality, the projects require an extra project reference to XunitTraitDiscoverers. Making this a part of the netcore xunit will be good. It's basically an extension on Xunit functionalities, and we should merge these two projects. 774 area-Infrastructure Add System.Threading to packages.config in test projects "This would otherwise make the Mono mcs compiler fail with: ""error CS0518: The predefined type `System.Threading.Interlocked' is defined in an assembly that is not referenced."" It's the same change as in https://github.com/dotnet/corefx/pull/328 " 775 area-Infrastructure Use xunit netcore package in XunitTraitsDiscoverers XunitTraitsDiscoverers used the original xunit.abstractions and xunit.core packages instead of the netcore version. This causes a problem like https://github.com/dotnet/buildtools/pull/38 when compiling on Mono due to the unwanted xunit.runner.tdnet.dll 776 area-Infrastructure Fix condition in dir.targets The value passed to Exists() should be enclosed in single quotes according to https://msdn.microsoft.com/en-us/library/7szfhaft.aspx 777 area-Infrastructure Move solution files to the appropriate projects folders fixes #746 780 area-System.Collections Immutable collections test failure in CI An immutable collections test failed in a CI run: ``` System.Collections.Immutable -> d:\j\workspace\dotnet_corefx_windows_debug_prtest\bin\Windows_NT\Debug\System.Collections.Immutable\System.Collections.Immutable.dll System.Collections.Immutable.Tests -> d:\j\workspace\dotnet_corefx_windows_debug_prtest\bin\Windows_NT\Debug\System.Collections.Immutable.Tests\System.Collections.Immutable.Tests.dll xUnit.net console test runner (32-bit .NET Core) Copyright (C) 2014 Outercurve Foundation. Discovering: System.Collections.Immutable.Tests Discovered: System.Collections.Immutable.Tests Starting: System.Collections.Immutable.Tests System.Collections.Immutable.Test.ImmutableSortedSetTest.EmptyTest [FAIL] Assert.Same() Failure Expected: ImmutableSortedSet [] Actual: ImmutableSortedSet [] Stack Trace: d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Collections.Immutable\tests\ImmutableSortedSetTest.cs(354,0): at System.Collections.Immutable.Test.ImmutableSortedSetTest.EmptyTestHelper[T](IImmutableSet`1 emptySet, T value, IComparer`1 comparer) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Collections.Immutable\tests\ImmutableSortedSetTest.cs(82,0): at System.Collections.Immutable.Test.ImmutableSortedSetTest.EmptyTest() Finished: System.Collections.Immutable.Tests === TEST EXECUTION SUMMARY === System.Collections.Immutable.Tests Total: 591, Errors: 0, Failed: 1, Skipped: 0, Time: 1.839s ``` 783 area-Infrastructure Switch to running tests with new BuildAndTest target. An attempt to address #679 This change adds a BuildAndTest and Test target to our default dir.targets file and hooks RunTestsForProject off the Test target so that by default if you build an individual project from the command line or in an IDE like VS it will just do the build and not run the tests. If people want to run the tests then they need to execute the BuildAndTest target (or just the Test target). This prevents the need for us to use special conditions like BuildingInsideVisualStudio in our targets. I've also changed the DefaultTargets for our build.proj and dirs.proj files to be BuildAndTest so if you run the build for them it will stil do the build and test run. cc @eatdrinksleepcode @nguerrera 800 area-Infrastructure Enable code coverage on VS2015 and include more libraries Two issues: 1) Code coverage doesn't work with VS2015. 2) Several of our libraries are disabled from code coverage. For the first, the issue turned out to be a failure of the OpenCover code coverage tool to read the PDBs produced by Roslyn. The library on which the tool depends for PDB reading has been updated to support Roslyn, and a more recent version of OpenCover than the one we're currently using pulls in that updated version of the PDB reader. As such, the fix is just to upgrade which version of OpenCover we use. For the second, whatever reason caused us to disable code coverage on several projects appear to have since been addressed, either by us or in the OpenCover update. The fix then is to just re-enable code coverage on these libraries. The only library that remains disabled for code coverage is System.Diagnostics.Process.dll. It's either hanging or just taking a really, really long time (PLINQ takes about 10 minutes, but at least it completes). Needs more investigation. 810 area-System.Globalization Implement System.Globalization.Extensions on Unix The library has been refactored to have the Unix implementation stubbed out. It needs to be properly implemented. 811 area-System.Diagnostics Implement System.Diagnostics.FileVersionInfo on Unix The library has been refactored to have the Unix implementation stubbed out. It should be implemented to the extent that makes sense on Unix. 817 area-System.IO Implement System.IO.FileSystem.Watcher for Mac The Linux implementation uses inotify, which is Linux-specific. We'll need a different implementation for Mac, such as one based on FAM, kqueue, or FSEvents. 818 area-Infrastructure Update solutions/projects with OS-specific configs For projects that have OS-specific implementations, this change modifies their solution and project files to create OS-specific configurations. Rather than just having a Debug or Release option, in Visual Studio a developer can now select OS_Debug or OS_Release, e.g. for a project that has a Windows implementation and a Unix implementation, Windows_Debug, Windows_Release, Unix_Debug, and Unix_Release will all be available options. Changing the configuration will update the properties used to configure conditional includes, build outputs, etc. cc: @mmitche, @AArnott. Andrew, please let me know if there's a better way to achieve this. 820 area-Infrastructure Run compliance tool against Project K " " 821 area-Infrastructure Collect telemetry from test runs 822 area-Infrastructure Auto upload packages to nuget/myget 823 area-Infrastructure Strategy for test hooks/mocks that works everywhere 824 area-Infrastructure Contract Generation 825 area-Infrastructure Runtime Facade Generation 826 area-System.IO Open Source ClrCompression.dll 838 area-Infrastructure Dashboard: Caclulate product confidence from test and code coverage data. " " 839 area-Infrastructure enable perf and stress infrastructure 840 area-Infrastructure Align ToF and xunit reporting " " 841 area-Infrastructure Run OuterLoop tests on officially built binaries " " 846 area-System.Globalization Cross Platform System.Globalization "This a meta-workitem tracking a bunch of smaller stuff, now that we have multiple folks working on this stuff concurrently. - [x] TimeZone - [x] Encodings (#2774) - [x] Collation (#2769) - [x] Casing (#2772) - [x] Locales (#2770) - [x] Calendars (#2773) " 864 area-System.Reflection Open Source System.Reflection.Primitives Tests 875 area-Infrastructure OS-independent libraries should be built to an OS-independent folder Once #818 gets merged, we should refactor how our binaries are built to output paths. Libraries that have no direct OS-dependencies and do not have an OS-specific build should go into a neutral folder, and libraries that have OS-specific builds should go into an OS-specific folder. 880 area-Microsoft.CSharp Open Source Microsoft.CSharp.dll 882 area-System.Net Open Source Networking.dll 891 area-System.Net Open Source System.Net.Http.dll 892 area-System.Net Open Source System.Net.Http.WinHttpHandler.dll 893 area-System.Net Open Source System.Net.NameResolution.dll 894 area-System.Net Open Source System.Net.NetworkInformation.dll 895 area-System.Net Open Source System.Net.Primitives.dll 896 area-System.Net Open Source System.Net.Sockets.dll 897 area-System.Net Open Source System.Net.Utilities.dll 912 area-Infrastructure Update properties in dir.props to make them more consistent Used some msbuild string functions to help eliminate some of the duplications around OS/OSGroup/ConfigurationGroup. Explicitly started defining all the needed properties by build tools in a consistent way so the build upon each other. Restructured the output paths a little to eliminate many nested directories. Binaries: $(OS).$(Platform).$(Configuration)\$(MSBuildProjectName)\ Intermediates: obj\$(OS).$(Platform).$(Configuration)\$(MSBuildProjectName)\ Tests: tests\$(OS).$(Platform).$(Configuration)\$(MSBuildProjectName)\ 914 area-System.Text Write a test for GetGroup never returning Empty Group We merged #253 without a corresponding test. We need to write one. 915 area-Meta Remove uses of Console.WriteLine in the Unit Tests? A bunch of our unit tests do `Console.WriteLine` either on regular paths or on error cases. By my count there's bout 1600 hits for `Console.Write*` in our tests. This is a bit of an over-count because some of these are the Console tests themselves. I don't really like this very much. It feels like something we inherited when porting our legacy test assets. Is it worthwhile to go clean this up? I don't mind doing the work, just don't want to put in a bunch of effort if it doesn't stand a chance of getting merged. I'm sure @nguerrera will be interested in this and my understanding was @davkean had some guidance on how to author and port tests and I'd be interested in understanding how this aligns with his thinking. 921 area-System.ComponentModel Improve code coverage for System.ComponentModel.Annotations According to the current code coverage report, this library is only at 75%. Our general goal is closer to 90%, though this will depend on the library. We should investigate to see whether the current coverage level is appropriate, and if not, improve our test suites to provide better coverage. 930 area-System.Numerics Improve code coverage for System.Numerics.Vectors According to the current code coverage report, this library is only at 72%. Our general goal is closer to 90%, though this will depend on the library. We should investigate to see whether the current coverage level is appropriate, and if not, improve our test suites to provide better coverage. 931 area-System.Reflection Improve code coverage for System.Reflection.Metadata According to the current code coverage report, this library is only at 51%. Our general goal is closer to 90%, though this will depend on the library. We should investigate to see whether the current coverage level is appropriate, and if not, improve our test suites to provide better coverage. 933 area-System.Text Improve code coverage for System.Text.Encoding.CodePages (66%) "According to the current code coverage report, this library is only at 66%. Our general goal is closer to 90%, though this will depend on the library. We should investigate to see whether the current coverage level is appropriate, and if not, improve our test suites to provide better coverage. " 934 area-System.Xml Improve code coverage for System.Xml.XPath According to the current code coverage report, this library is only at 51%. Our general goal is closer to 90%, though this will depend on the library. We should investigate to see whether the current coverage level is appropriate, and if not, improve our test suites to provide better coverage. 935 area-System.Xml Improve code coverage for System.Xml.XPath.XDocument According to the current code coverage report, this library is only at 54.5%. Our general goal is closer to 90%, though this will depend on the library. We should investigate to see whether the current coverage level is appropriate, and if not, improve our test suites to provide better coverage. 936 area-System.Xml Improve code coverage for System.Xml.XPath.XmlDocument According to the current code coverage report, this library is only at 15%! Our general goal is closer to 90%, though this will depend on the library. We should investigate to see whether the current coverage level is appropriate, and if not, improve our test suites to provide better coverage. 937 area-System.Xml Improve code coverage for System.Xml.XmlDocument According to the current code coverage report, this library is only at 47%. Our general goal is closer to 90%, though this will depend on the library. We should investigate to see whether the current coverage level is appropriate, and if not, improve our test suites to provide better coverage. 942 area-Infrastructure Failed CI build reported it completed successfully "PR #917 had a bad P/Invoke declaration that caused a TypeLoadException and a huge number of tests to fail. But even though the build lists a large number of test failures: http://dotnet-ci.cloudapp.net/job/dotnet_corefx_prtest/138/#showFailuresLink the build still shows as green / successful, and GitHub reports ""all is well"". " 956 area-Meta VS automatically changing solution and csproj What are your thoughts about VS automatically changing stuff? I.e: https://github.com/dotnet/corefx/pull/954 VS updated version info. Also it removed new line character in the end of csproj (I removed this this change). Should we keep that kind of changes or revert them? I don't have strong opinion on that although I generally think that easier solution is always better: we should not manually change csproj & sln files so if VS wants to change it I would let it. 957 area-Infrastructure Dashboard: Hook up official build results. " " 961 area-Infrastructure Add IsInnerLoopTestProject and IsOuterLoopTestProject property support during the build "Add properties to disable selected projects from Inner- or Outer- loop run. By default all projects are Inner-loop. You can disable it from particular run by explicitly setting TestCategories property " 962 area-System.Xml Remove dependency on System.Xml.XPath.XmlDocument from System.Xml.XPath.XDocument tests "Currently the test is comparing two different implementations of XPath - one of them is assumed ""good"" as there are currently no known bugs to it. I will remove the dependency once it is no longer needed although it is helpful right now since XPath.XDocument has few bugs for investigation and it has proven to be helpful for me (there are few behavioral differences between implementations which we cannot remove now because of compat and that other implementation is helping figure out if this is known compat issue or a code/test defect). Please remove this dependency once the bugs are fixed. Related issues: https://github.com/dotnet/corefx/issues/641 https://github.com/dotnet/corefx/issues/284 https://github.com/dotnet/corefx/issues/17 " 963 area-Infrastructure Support Proxy servers for our nuget download task See PR #788 where we reverted the fix for #38 because there were some unhanded cases which caused a null reference if the DefaultWebProxy is null. We should add support again with proper checks in place. 970 area-System.Collections ReadOnlyObservableCollection.CollectionChanged should be made public "The `ReadOnlyObservableCollection.CollectionChanged` event is protected, which is flawed, it prevents you from being able to observe changes to it without casting to `INotifyCollectionChanged`. I suspect the original thinking was because the collection is ""read-only"" it never changes - this is not correct. _Read-only_ in .NET means that the consumer has a read-only view over a collection (which is why we project `IReadOnlyList` to `IVectorView`), not that the contents are immutable and never change. While we've made `protected` members `public` in the past (such as `Exception.HResult`), this event was marked `virtual`, which while binary compatible, would be a source-breaking change for those that overrode it. I suspect very little have overridden it, but we may want to consider adding a new event with a different name such as `Changed`. " 972 area-System.IO Fix for Issue #587 - Untangle FileStream's async implementation Fix for Issue #587 - Untangle FileStream's async implementation This removes the need for the old Begin\End methods in Win32FileStream by modifying the wrapper around the Overlapped (Win32FileStream.FileStreamAsyncResult) to use a TaskCompletionSource, thus allowing the core Read\Write methods to return Tasks directly. It also fixes a potential race condition where Begin\* may be registering the cancellation at the same time that End\* is trying to dispose it (if the user called the End\* method from the callback that they provided to the Begin\* method). 973 area-Meta .NET Core + Existing Platforms - What Can We Expect? I found myself watching a discussion between @davkean and @onovotny go down [[start here](https://twitter.com/davkean/status/568636866053812224)] to better understand where .NET Core sits relative to existing platforms. Because 140 characters is a terrible medium, let's keep this going here. I'm still looking at supporting Windows 7 users for a while at least, so I'm curious what options are available around continuing to build Portable Class Libraries (the plans here seem to be that referencing other NuGet packages is how you can access additional BCL functionality in the future - correct me if I'm wrong) over targeting .NET Core directly. What do we gain? What do we lose? And what expectations should we have in the short-term? 975 area-System.Runtime Fill System.Runtime.Extensions test gaps The initial merge of System.Runtime.Extensions tests (#802) included tests which we were running internally that were marked as covering the System.Runtime.Extensions contract. That set of tests does not cover all the types in the contract. We should add tests to cover the rest of this contract. 978 area-Infrastructure Dashboard: Enable User specific layouts and configs. "https://github.com/benjamine/jsondiffpatch can be used to greate user specific patch data to modify the global freeboard state. " 980 area-Infrastructure System.ObjectModel code coverage is failing === TEST EXECUTION SUMMARY === System.ObjectModel.Tests Total: 53, Errors: 0, Failed: 0, Skipped: 0, Time: 0.340s Committing... No results, this could be for a number of reasons. The most common reasons are: 1) missing PDBs for the assemblies that match the filter please review the output file and refer to the Usage guide (Usage.rtf) about filters. 2) the profiler may not be registered correctly, please refer to the Usage guide and the -register switch. 984 area-System.IO SerialPort Support on Windows Just wondering if SerialPort namespace will be included at some point? -------------------------------------------------------------------- ### Execution plan - [x] 1. @JeremyKuhne to seed the sources in CoreFX (from full .NET Framework) - add source code (sanitized, with licenses), the source won't build - [x] 2. Make the code build * CC: @JeremyKuhne @karelz on PRs * Note: We will not take any functional changes to the implementation, architecture, or API surface at this point unless they are absolutely necessary to make the code compile on .NET Core. Please give heads up on this issue as soon as you discover cases like that. - [x] 3. Add tests - tracking progress in #15752 - [x] @JeremyKuhne to find out if we can leverage full .NET Framework tests * We need to design the test environment - we need ability to test the code in CI (ideally without heavy modification of CI machines) * We need to set goal for code coverage If anyone is working on any step, please mention it & coordinate here to avoid duplicated effort. @karelz will co-assign the issue to you as well. 987 area-System.Reflection MetadataReader ReadFile fast path does not work with async file streams When a FileStream is opened with isAsync: true (.NET Core default!), the ReadFile P/Invoke code that we have in the metadata reader to read small files straight to native memory. ReadFile fails with invalid param error code because our handle was opened for overlapped IO. For now, I'm changing the code to be more defensive and always fall back to the slow file -> managed heap -> native heap code path. (It currently throws.) @ericstj: Can you help me figure out how to tweak FileStreamReadLightUp.cs to handle this? Also, @tmat has already mentioned to me that this code path will slow us down on Linux and Mac. Perhaps, this is the right opportunity to define a portable FileStream.Read overload that reads to unmanaged memory? 991 area-Infrastructure Enable code coverage report generation for individual projects If we run a subset of the projects for code coverage, we should still generate a report. 992 area-System.Numerics Consider saturated arithmetic functionality for Vector In the past, we've seen some requests for Vector to provide some means to do saturated arithmetic operations. Such operations could be useful for a variety of applications, like signal processing, image processing, etc. It makes sense to at least investigate what such functionality would look like, how it could be exposed, etc. Given that there are also SSE2+ instructions that expose some level of saturated arithmetic, I'm hopeful that we could also get some baseline hardware-instruction support for this. Work to do: - Define API surface exposed (which operations are supported) - Define which types support these operations (which integral types? all?) - Determine which operations could benefit from SIMD instructions - Create a simple working prototype (without hardware instructions) - Create formal API design speclet 993 area-System.Numerics Consider generic support for Shuffle and Shift operations on Vector Two useful operations that we have long-considered adding to Vector are shuffle and shift. These are pretty fundamental operations that low-level algorithms could very often take advantage of. One of the challenges was developing a generic but straightforward interface for utilizing such operations across all of the (integral) numeric types that Vector supports. Work to be done: - Define which operations are supported (shuffle at a minimum) - Determine which operations could benefit from SIMD instructions - These should be able to benefit greatly - Create a simple working prototype (without hardware instructions) - Create formal API design speclet and follow regular procedure 996 area-Infrastructure Dashboard: Add page to show test failures for specific area. " " 998 area-Infrastructure Dashboard: Make Bug Id link open in new window. " " 999 area-System.Runtime Add back Environment.Is64BitXXX Hi all. There are some methods that aren't yet implemented in Environment class. - Is64BitProcess - Is64BitOperatingSystem - OSVersion Will they be implemented? 1000 area-System.Diagnostics Several Dataflow ETW events aren't firing due to MethodAccessExceptions Several System.Threading.Tasks.Dataflow ETW events aren't firing on .NET Core, due to what looks like private reflection issues: MethodAccessExceptions are getting thrown and swallowed when firing these events. 1006 area-System.Net Add SmtpClient support Is there any plans to add `System.Net.Mail` into aspnetcore50? 1008 area-System.Numerics Faster and/or vectorized sin/cos In certain types of applications, the extra precision and correctness afforded by Math.Sin() and Math.Cos() are not worth the performance penalty they impose. These applications are often already using primarily single precision floats for computations, and thus have to round trip through double to make use of these methods. I propose adding a FastMath or Mathf or similar set of methods for lower precision high performance implementations of these methods. If it were not for the existence of System.Numerics.Vectors, I would advocate that these simply be an external library separate from the core framework, but since the vector math library ships Quaternion and Matrix support, I would vastly prefer that these types make use of the faster math operations for things like calculating rotations. My reasoning is that these types exist in the first place for people concerned with performance, and as it stands they're simply too slow compared to the alternatives for them to see much use. For a practical anecdote, I recently wrote an OpenGL draw call stress test to determine CPU overhead and how many draw calls I can push from my .NET app. By far the biggest consumer of frame time was Sin and Cos inside the quaternion rotation method used to rotate the cubes I was rendering. Using a fully managed implementation of SinCos based on the venerable CEPHES library cut that time roughly in half. This could be further extended by vectorizing with SIMD, provided that the Vector types support a few more intrinsics such as shuffle. I wouldn't mind doing this work if people think it would be useful. My main concern is that shipping System.Numerics.Vectors (quaternions and matrices) without these faster math routines will forever doom them to obscurity, since switching to reduced precision operations in the future would be a breaking change. 1009 area-Infrastructure Error message in System.ServiceProcess.ServiceController when building from VS2015 DevCmd When building using Developer Command from VS 2015 I get following error message: (build doesn't fail though - jut red message) ``` NativeTestService.cpp cl : Command line error D8027: cannot execute 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\c1xx.dll' [E:\oss\corefx\src\System.ServiceProcess.ServiceController\tests\NativeTestService\NativeTestService.vcxproj] ``` It doesn't repro on VS 2013 DevCmd. 1010 area-System.Numerics Add support for extracting a bit mask from a Vector SSE2/AVX supports extracting the MSB from each 8 byte,4 byte,2 byte or 1 byte segment (the `movemask_*` family). This can be extremely useful while performing algorithms that are data sensitive and use SSE registers like big buffers. A user could implement algorithms that work entirely in safe code that could benefit from avoiding the allocation and rigmarole of copying data out of a register to an array when you just want to test if a field is not empty. Admittedly, it is a downer as ARM does not have an intrinsic for this operation but there is workarounds that should perform better than copying everything in and out memory to test the bytes. http://stackoverflow.com/questions/11870910/sse-mm-movemask-epi8-equivalent-method-for-arm-neon 1016 area-System.Xml Update the XElement implementation in System.Xml.XDocument to include XmlSchemaProvider attribute once the packages are refreshed. 1019 area-Meta Consider adding Disposables [Reactive Extensions](https://github.com/Reactive-Extensions/Rx.NET/tree/master/Rx.NET/Source/System.Reactive.Core/Reactive/Disposables) and [System.Threading.Tasks.Dataflow](https://github.com/dotnet/corefx/blob/master/src/System.Threading.Tasks.Dataflow/src/Internal/ActionOnDispose.cs) are using their own internal Disposables. I don't know how many people have written similar APIs too. We also use our own disposables to run actions. This is very helpful for types implementing IObservable and types used within a `using`-statement. I think CoreFX is the right place to offer a small common API for disposables. What are your thoughts? 1021 area-Infrastructure Improving test coverage and relevance: investigate tools for code dependencies. Investigate tools that will show the dependencies between code and tests. This will allow us to only run the relevant set of tests related to new changes. 1022 area-Infrastructure MSBuild consistency in casing boolean properties "MSBuild properties are case sensitive. The ""false""/""true"" vs ""False""/""True"" What do we prefer? It looks like we don't have any standards with this and I saw various places in the targets which mix two different casings even for the same properties. I believe we should unify this Examples: src\System.Collections.Immutable\src\System.Collections.Immutable.csproj (lowercase): ``` true full false DEBUG;TRACE prompt 4 false System.Collections.Immutable.ruleset ``` and the same project in the bottom: ``` True True Strings.resx ``` src\dirs.targets: (Look at the IsTestProject property and CLSCompliant condition): https://github.com/dotnet/corefx/blob/master/src/dir.targets#L94 ``` True True False false ``` " 1033 area-System.Reflection Delimiter list in the type name grammer was incorrect "Duplicated ""*"" in the delimiter list, it should be ""\"". See Tokenizer.HandleEscapeSequence for more information. " 1034 area-Meta Update Developer Wiki with new section on Code Coverage The developer guide wiki (https://github.com/dotnet/corefx/wiki/Developer-Guide) should have a section on the code coverage system - including how to manually run the coverage build and generate a new report. 1037 area-System.Diagnostics Investigate why Assert went out of it's way to call MessageBox on a different thread There's some internal history on why this decision was made that @stephentoub and I both don't fully grok. I need to take the time and understand if this is still something we need to be doing and why it only mattered for CoreCLR and not desktop at the time. Once that's done, something like #1012 might be in order. 1039 area-Meta Why is DataTable/View/Set absent? I looked here: https://github.com/dotnet/corefx-progress and saw DataTable/View/Set isn't ported to .NET Core. IMHO this is a mistake, as DataTable and friends are a convenient way to handle untyped data at runtime, and is e.g. often used when fetching data through stored procedures as it's easy to e.g. fetch a dataset with the result of a proc which returns 3 cursors on e.g. Oracle. I fail to see why this cornerstone of many people's data-access code is absent in a framework that targets servers. 1044 area-Infrastructure Microsoft.DotNet.TestHost.1.0.3-prerelease only targets 32-bit "Running tests on Window 7 64-bit fails due to `CoreRun.exe` being 64-bit and the TestHost dlls being 32-bit. When setting the 32-bit flag on `xunit.console.netcore.exe` with `corflags.exe` and invoking it directly (iow without `corerun.exe`), the tests work again. ``` > dumpbin /headers CoreRun.exe | find ""machine"" 8664 machine (x64) > dumpbin /headers api-ms-win-core-console-l1-1-0.dll | find ""machine"" 14C machine (x86) ``` " 1045 area-System.Xml XmlReader.ReadAsync goes into infinite recursion "**Before fixing the bug please make sure the tests for Xml.ReaderWriter were already added or you can add your own tests - make sure you test old and new behavior. Any breaking changes need to be additionally reviewed.** _This is a modified copy of internal bug, may contain fragments of discussions I not necessarily written myself_ Repro: ``` csharp XmlReader xmlReader = XmlReader.Create(""http://www.example.com/example.xml"", new XmlReaderSettings{Async = true}); await xmlReader.ReadAsync(); ``` > I investigated this issue and believe the root cause is that the support for this scenario (UriString) is not yet implemented, that causes the termination statement ""laterInitParam = null"" inside FinishInitUriStringAsync() never gets a chance to execute and thus the infinite recursion. Open issues: 1) XmlReader.Create, XElement.Load, XDocument.Load overloads with ""string uri"" are not supported 2) Characters that are not supported in the current encoding are not automatically encoded as entities Code change which caused break: ``` csharp private Task FinishInitAsync() { switch (laterInitParam.initType) { // code below was removed when removing Uri support //case InitInputType.UriString: // return FinishInitUriStringAsync(); //<= This is never executed and thus leads to the infinite recursion. case InitInputType.Stream: return FinishInitStreamAsync(); case InitInputType.TextReader: return FinishInitTextReaderAsync(); default: //should never hit here Debug.Assert(false, ""Invalid InitInputType""); return AsyncHelper.DoneTask; } } ``` Tasks: - [ ] Determine if we want to support Uri or not - [ ] Fix the issue " 1050 area-System.Reflection Metadata reader CanReadFromSameMemoryMappedPEReaderInParallel test failed in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx_prtest/257/ ``` System.Reflection.Metadata.Tests.MetadataReaderTests.CanReadFromSameMemoryMappedPEReaderInParallel [FAIL] System.AggregateException : One or more errors occurred. ---- System.BadImageFormatException : Invalid COR20 header signature. ---- System.BadImageFormatException : Invalid COR20 header signature. Stack Trace: Discovered: System.ComponentModel.Primitives.Tests at System.Threading.Tasks.TaskReplicator.Run[TState](ReplicatableUserAction`1 action, ParallelOptions options, Boolean stopOnFirstFailure) at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) --- End of stack trace from previous location where exception was thrown --- at System.Threading.Tasks.Parallel.ThrowSingleCancellationExceptionOrOtherException(ICollection exceptions, CancellationToken cancelToken, Exception otherException) at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Reflection.Metadata\tests\Metadata\MetadataReaderTests.cs(2457,0): at System.Reflection.Metadata.Tests.MetadataReaderTests.CanReadFromSameMemoryMappedPEReaderInParallel() ----- Inner Stack Trace #1 (System.BadImageFormatException) ----- d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Reflection.Metadata\src\System\Reflection\Metadata\MetadataReader.cs(173,0): at System.Reflection.Metadata.MetadataReader.ReadMetadataHeader(BlobReader& memReader) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Reflection.Metadata\src\System\Reflection\Metadata\MetadataReader.cs(97,0): at System.Reflection.Metadata.MetadataReader..ctor(Byte* metadata, Int32 length, MetadataReaderOptions options, MetadataStringDecoder utf8Decoder) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Reflection.Metadata\src\System\Reflection\Metadata\PEReaderExtensions.cs(71,0): at System.Reflection.Metadata.PEReaderExtensions.GetMetadataReader(PEReader peReader, MetadataReaderOptions options, MetadataStringDecoder utf8Decoder) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Reflection.Metadata\src\System\Reflection\Metadata\PEReaderExtensions.cs(47,0): at System.Reflection.Metadata.PEReaderExtensions.GetMetadataReader(PEReader peReader) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Reflection.Metadata\tests\Metadata\MetadataReaderTests.cs(2457,0): at System.Reflection.Metadata.Tests.MetadataReaderTests.<>c__DisplayClass2c.b__2a(Int32 _) at System.Threading.Tasks.Parallel.<>c__DisplayClass9`1.b__12(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Threading.Tasks.Parallel.<>c__DisplayClass9`1.b__12(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica.Execute() ----- Inner Stack Trace #2 (System.BadImageFormatException) ----- d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Reflection.Metadata\src\System\Reflection\Metadata\MetadataReader.cs(173,0): at System.Reflection.Metadata.MetadataReader.ReadMetadataHeader(BlobReader& memReader) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Reflection.Metadata\src\System\Reflection\Metadata\MetadataReader.cs(97,0): at System.Reflection.Metadata.MetadataReader..ctor(Byte* metadata, Int32 length, MetadataReaderOptions options, MetadataStringDecoder utf8Decoder) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Reflection.Metadata\src\System\Reflection\Metadata\PEReaderExtensions.cs(71,0): at System.Reflection.Metadata.PEReaderExtensions.GetMetadataReader(PEReader peReader, MetadataReaderOptions options, MetadataStringDecoder utf8Decoder) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Reflection.Metadata\src\System\Reflection\Metadata\PEReaderExtensions.cs(47,0): at System.Reflection.Metadata.PEReaderExtensions.GetMetadataReader(PEReader peReader) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Reflection.Metadata\tests\Metadata\MetadataReaderTests.cs(2457,0): at System.Reflection.Metadata.Tests.MetadataReaderTests.<>c__DisplayClass2c.b__2a(Int32 _) at System.Threading.Tasks.Parallel.<>c__DisplayClass9`1.b__12(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Threading.Tasks.Parallel.<>c__DisplayClass9`1.b__12(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica.Execute() ``` 1051 area-System.Text RegexGroup should provide a Name #### Background Regex group can have names assigned to them (e.g. `(?.+)`). Those names can be used in an indexer of `RegexGroupCollection`, however the `RegexGroup` objects themselves do not provide a `Name` property. The names can be retrieved using `regex.GetGroupNames`, but it is not immediately obvious -- and I'm not sure it is even possible if static `Regex` method was used for matching. To prove it is not obvious, see this [Regex: get the name of captured groups in C#](http://stackoverflow.com/questions/1381097/regex-get-the-name-of-captured-groups-in-c-sharp) which at the moment had 48 votes on question, and 66 on answer. There are a few similar questions as well. #### API Design ``` csharp public class RegexGroup : ... { // ... public string Name { get; } } ``` Note that for numbered groups this should return group index as string, for consistency with `Regex.GetGroupNames`. #### Compatibility At the moment I do not see any potential compatibility issues with adding a property. 1052 area-System.IO Initial commit of System.IO.FileSystem tests (File, Directory, FI, DI) Initial commit of ported tests for the System.IO.FileSystem contract. Includes tests for File, Directory, FileInfo, and DirectoryInfo. A few tests have been rewritten in the xunit style, but the majority of these tests have been ported from ToF, which were ported from old tree. When porting, I modified or disabled tests to make sure every test only writes in its working directory. I verified this with PerfView. I also replaced hard-coded paths with calls to Path.GetRandomFileName() to prevent multiple runs from interfering with each other, and multiple tests running in parallel from interfering with each other. Any test that used a delay to wait for the state of the file system to stabilize was marked with OuterLoopAttribute. On my machine, all of the tests including OuterLoop take between 10s and 15s to run. Just inner loop tests take between 1s and 2s to run. Lots of these tests are candidates for rewriting, and Eric introduced a useful base class for tests when he rewrote the FileStream tests. Checking in these ported assets will give us a good idea of what the coverage is, and act as a baseline to compare the rewritten tests against. 1053 area-System.ComponentModel Make DisplayNameAttribute available in .NET Core This was originally going to be a request to move `DisplayNameAttribute` into Core, but the problem seems a little bigger than that. Currently, `System.dll` houses approximately a couple hundred types spread across four dozen different namespaces, but not everything in it is listed on the [Open Source Progress table](https://github.com/dotnet/corefx-progress/blob/master/src-diff/README.md) (although a select few namespaces like `System.Security.Cryptography.X509Certificates` _are_ there). This still makes some namespaces (for example `System.ComponentModel`) feel incomplete because of how they're spread across different assemblies. The previously mentioned `X509Certificates` namespace is already being tracked with all its types from `System.dll`, so other namespaces should follow suit, right? I was porting a project of mine over to see the ASP.NET vNext templates in action, but the lack of `DisplayNameAttribute` is literally the only thing preventing me from building it (even if I tell it to not target .NET Core) without commenting those attributes out. And if .NET Core's philosophy is to only use what you need, why should I be forced to import some monolithic DLL with hundreds of types that I don't need just for the one that I _do_ need, because that type is not in the DLL named after its containing namespace? ¯\(°_o)/¯ 1054 area-Infrastructure Add NuGet.org and MyGet.org latest build feeds to readme.md The CoreFX NuGet.org and MyGet.org latest build / package feeds should be added to our README.md. See https://github.com/xunit/xunit as an example. 1058 area-Infrastructure Add Windows 7 coverage to Jenkins / Outerloop runs Currently build.cmd no longer passes on Windows 7 machines (see https://github.com/dotnet/corefx/issues/1044). We should look into adding Win7 coverage to Jenkins to ensure we don't regress building or running tests on this platform. 1063 area-Meta Append guidelines with how PR feedback should be addressed "Pull request guidelines should contain something like ""rule of a thumb"" which rule how PR feedback should be addressed or how merge conflicts should be resolved. As example consider #972. Commits like `Merge branch 'master' into Issue587` (aaa5434) clutter history and should be avoided. `git rebase` should be used for updating branch with fix. Other commits in this PR could be squashed. As another example consider PR #1003. It's initial commit of the library so it's OK to address feedback in a separate commit. However in this PR feedback addressed twice and the second could be amended to the first. Conclusion: 1. Merge conflicts should be resolved through rebasing. 2. PR feedback should be in a separate commit if it contains important changes. Changes like formatting or renaming variable introduced in PR are not important and could be addressed through amending/rebasing. " 1068 area-System.Reflection Allow ISignatureTypeProvider to be a struct The `SignatureDecoder` takes the provider as a naked interface. This makes it inefficient to bake it by a struct because it will cause it being boxed each time it's passed. However, it's very desirable to make the provider a struct because it allows the caller to provide call site specific information. For example, in order for implementers to reference the generic type parameters of the method or type, the `ISignatureTypeProvider` needs to have access to the containing type / containing method. To avoid the boxing operation, the methods simply needs an additional contraint like so: ``` csharp public static TType DecodeType(Handle handle, TProvider provider) where TProvider : ISignatureTypeProvider ``` Unfortunately, this causes some noise as C# is no longer able to infer the type arguments, so each call site must now qualify the type arguments. 1071 area-System.Reflection Merge master to dev/metadata In particular, the changes from PR #1026 are needed to address the CI failure in #1068. There is no code review required as these commits have already been reviewed and there are no merge conflicts. 1072 area-System.Collections Remove source control bindings VS will keep prompting developers what to do with those. Eventually, they will show up as a diff, so it's best to commit those as a one-off. 1073 area-Infrastructure Rename all test assemblies to include a library prefix Fixes #744 Open question: what to do with - BaseLibManaged - ModuleCore - XDocument.Common - XDocument.Test.ModuleCore - XmlCoreTest - XmlDiff 1079 area-System.Security Add leaveOpen constructor overload for CryptoStream "A CryptoStream always closes the wrapped stream when it is disposed. This not ideal when using a MemoryStream or when another action needs to be taken on the result. The workarounds are manually calling `FlushFinalBlock()` and then getting the MemoryStream bytes before disposing the CryptoStream, or using a custom stream that ignores the dispose call from CryptoStream. Neither are ideal and can be avoided with a ""leaveOpen"" option. Implementation would be the same as DeflateStream, on `Dispose()` check if leaveOpen is true and don't close the internal stream. ``` public CryptoStream(Stream stream, ICryptoTransform transform, CryptoStreamMode mode, bool leaveOpen) ``` I'm happy to do the change when System.Security.Cryptography.Encryption arrives. " 1081 area-System.Diagnostics Proposal: Add new property for getting process path "## Rationale and Usage In order to get process path you need to use `someProcess.MainModule.FileName` property. However it suffers from a couple of issue: - Accessing MainModule of 64 bit process from a 32 bit one throws an exception - You can't access MainModule of elevated process from a non elevated one As you can see many developers [encounter](http://stackoverflow.com/q/8431298/239438) [these](http://stackoverflow.com/q/9501771/239438) issues. I suggest adding a new property which returns the path to executable of the Process. To overcome the issues that I described we can use `QueryFullProcessImageName` together with `PROCESS_QUERY_LIMITED_INFORMATION` access right. ## Api Proposal ```csharp namespace System.Diagnostics { public class Process : Component { public string MainModuleFilePath { get; } } } ``` ## Open Questions Should the new property be called `MainModuleFilePath` or something else? From my own experience most of people use `Path` when asking question on stackoverflow but @Priya91 suggested calling it `MainModuleFilePath` as it is returning Path of the `MainModule` property. ## Cross Platform Support To implement this property on other platforms on Linux we can use `readlink` to read the value of `""/proc/%d/exe""` symlink and on OS X we can use `proc_pidpath` which returns process path given process pid." 1085 area-System.Reflection MetadataReader: (THandle)(Handle)default(THandle) should round-trip for all handles For most handles default(THandle) is the canonical nil value that can convert to the weakly-typed Handle and back, but for some such as StringHandle and NamespaceHandle default(THandle) is an invalid value that becomes a nil module handle on conversion to Handle and cannot be round-tripped back to THandle. A fix is proposed in #1075. Filing a bug to track it so that I can close a duplicate internal bug against it. 1086 area-System.IO Add API to get actual file casing in path "Per @jasonwilliams200OK in dotnet/coreclr#390 Based on this answer: http://stackoverflow.com/a/81493/1712065 (further redirected from: http://stackoverflow.com/a/326153). Please add the ability to retrieve path with actual case via `FileInfo` and `DirectoryInfo` classes. The candidate member being `FullPath` and `Name`. Perhaps there is some sophisticated way of getting it from win32 file system API, but [that](http://stackoverflow.com/a/81493/1712065) seems to be a working solution. Expected: ``` c# using System.IO.FileInfo; // .. // actual path was: // C:\\SharePoint\\scripts\\MasterDeployment.ps1 FileInfo info = new FileInfo(""c:\\sharepoint\\scriPts\\maSTerdeploymnet.PS1""); Console.WriteLine(info.FullPath); // C:\\SharePoint\\scripts\\MasterDeployment.ps1 Console.WriteLine(info.Name); // MasterDeployment.ps1 ``` Actual result: ``` c# using System.IO.FileInfo; // .. // actual path was: // C:\\SharePoint\\scripts\\MasterDeployment.ps1 FileInfo info = new FileInfo(""c:\\sharepoint\\scriPts\\maSTerdeploymnet.PS1""); Console.WriteLine(info.FullPath); // c:\\sharepoint\\scriPts\\maSTerdeploymnet.PS1 Console.WriteLine(info.Name); // maSTerdeploymnet.PS1 ``` " 1088 area-System.Xml Remove link to a document that no longer exists There is a link to an internal SharePoint site that no longer exits, so it's unclear what the content was but the gist seems to be contained in the code comment. 1091 area-Infrastructure Projects fail to load in VS without having built on command line first "Since the new resources targets were added, projects cannot be opened in VS from a clean enlistment with no packages having been restored yet. **Repro steps** 1. Delete corefx/packages/ folder 2. Open a solution in VS ``` C:\src\corefx\src\System.Reflection.Metadata\src\System.Reflection.Metadata.csproj : error : The imported project ""C:\src\corefx\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00015 \lib\resources.targets"" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. C:\src\corefx\src\dir.targets ``` " 1093 area-Infrastructure Create an optimization story for open-source compiled assemblies We need to design and develop the optimization story for our open-source corefx libraries. 1099 area-Infrastructure Build the exclusion list of CT errors against Project K " " 1100 area-System.Diagnostics StartInfo may return incorrect information for *running* processes. ProcessStartInfo.EnvironmentVariables gives an incorrect value for a _running_ process. We fetch environment variables via the GetEnviornmentVariables which gives the information of the current process and not of the _running_ process. Desktop also has the same behavior. 1101 area-System.Reflection Fix CustomAttributeNamedArgument to return the correct value There is a bug where `CustomAttributeNamedArgument` returns the type instead of the value. Strong typing can't help with `object`, can it? @nguerrera 1102 area-System.Numerics Further BigInteger test refactoring - Completes the removal of Console.WriteLine() from BigInteger tests and general refactoring to better use XUnit Asserts. (Progress against https://github.com/dotnet/corefx/issues/915.) - Generalizes the switch statement in Driver.cs's Worker class. - Removes duplicate code in StackCalculator.cs by referencing the identical implementations in MyBigInt.cs. - Removes duplicate implementations of Print(), GetRandomByteArray(), and IsZero() by moving them to MyBigInt.cs. - Enables a set of existing but unused tests: - RunDivRemTests - RunIsEvenTests - RunIsOneTests - ModPowValidSmallNumbers - RunMultiplyTests (If there is history for why theses tests were disabled/never enabled, please let me know, but it looks like a set of refactoring mistakes.) The first five commits are basically VS regex find-replace with the exception of the [changes to Driver.cs](https://github.com/dotnet/corefx/commit/2b7616cc33009422a662f34891406c755eecb4a6) mentioned above. The last four are more general refactoring to reduce copy/past function implementations. Please let me know how (or if) you want these commits squashed before merging. 1103 area-Infrastructure Coverage runs failing since ProcessTests changes @pallavit, since the recent ProcessTests cleanup changes got committed, all of our code coverage runs have hung. They've all hit an AV exception, followed by what appears to be OpenCover hanging during its subsequent processing: ``` xUnit.net console test runner (32-bit .NET Core) Copyright (C) 2014 Outercurve Foundation. Discovering: System.Diagnostics.Process.Tests Discovered: System.Diagnostics.Process.Tests Starting: System.Diagnostics.Process.Tests Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at System.AppDomain.SetupDomain(Boolean allowRedirects, String path, String configFile, String[] propertyNames, String[] propertyValues) System.Diagnostics.ProcessTests.ProcessTest.Process_HasExited [FAIL] Process_HasExited001 failed Stack Trace: d:\j\workspace\dotnet_corefx_coverage_windows\src\System.Diagnostics.Process\tests\System.Diagnostics.Process.Tests\ProcessTest.cs(178,0): at System.Diagnostics.ProcessTests.ProcessTest.Process_HasExited() Finished: System.Diagnostics.Process.Tests === TEST EXECUTION SUMMARY === System.Diagnostics.Process.Tests Total: 34, Errors: 0, Failed: 1, Skipped: 0, Time: 120.241s Committing... Visited Classes 23 of 35 (65.71) Visited Methods 186 of 357 (52.1) Visited Points 1570 of 2998 (52.37) Visited Branches 515 of 1161 (44.36) ==== Alternative Results (includes all methods including those without corresponding source) ==== Alternative Visited Classes 27 of 40 (67.5) Alternative Visited Methods 193 of 415 (46.51) ``` @sawilde, FYI. 1105 area-Infrastructure CI code coverage runs failing due to invalid UploadCoverallsData "Our CI code coverage runs get all the way to the end and then fail with this error: ``` d:\j\workspace\dotnet_corefx_coverage_windows\build.proj(36,7): error MSB4113: Specified condition ""'$(UploadCoverallsData)'"" evaluates to """" instead of a boolean. ``` " 1107 area-Infrastructure Official builds should place tags on what was built "We're eventually going to want to be able to answer the question of ""what code was in build [whatever]?"". It seems the answer to this in git is tags. As an example, https://github.com/torvalds/linux, click on the branches dropdown and change to the tabs tab. Supporting documentation: http://git-scm.com/book/tr/v2/Git-Basics-Tagging " 1110 area-Infrastructure corefx helloworld Hi, I want to use corefx components and coreclr in my command line program. I started with corefxlab helloworld and I tried to add corefx from nuget manager. I was able to find corefx components but when I tried to install, I get the following error message. How do I overcome this? ``` Could not install package 'System.Globalization 4.0.10-beta-22231'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. ``` Also, how do I install my private coreCLR and corefx components to my commandline program? I am using VS 2015 CTP6. Thanks 1118 area-Meta Use TimeSpan everywhere we use an int for seconds, milliseconds, and timeouts "In a large software project, it's easy to mess up units for time. IE, is that Int32 seconds or milliseconds? Or maybe minutes? I've been fixing my team's source code to use the unit-agnostic TimeSpan class wherever possible. However the .NET Framework is not complete in its adoption of TimeSpan. Specifically, we don't have a Process.WaitForExit overload that takes a TimeSpan, only an Int32 for the timeout. I suggest someone look through all .NET Framework API's for Int32 parameters containing ""second"", ""millisecond"", ""ms"", ""timeout"" (and perhaps ""time"") and see if there is a parallel TimeSpan-based overload. If not, please fix that. " 1121 area-System.Linq Allow customization of LINQ to XML string content. This issues comes about as a result of the following question on Stack Overflow: http://stackoverflow.com/questions/28947090/culture-and-linq-to-xml There appears to be no way to customize how a custom object is serialized to XML. The main problem this causes in my code is related to culture, but this could apply to other areas too. Looking at the code, it seems that there is no customization point for an object passed as content to LINQ to XML. Is this correct? Would it be a good idea to provide one? 1128 area-Microsoft.CSharp Add Microsoft.CSharp source 1129 area-System.Numerics More support for Math functions in System.Numerics.Vectors In particular I need Math.Exp support, similar to how there is support for Math.Sqrt via the Vector.SquareRoot function. It should be trivial to add support for Math.Exp and in fact I've done this with my local copy of System.Numerics.Vectors using SquareRoot as a guiding example. My application now uses the new Vector.Exp function instead of me having to use the CopyTo function to unpack my Vector to a double[] array, perform Math.Exp on each element of the array and then pack up into a new Vector. May I check the changes in? 1131 area-System.Linq Add System.Linq Source and Tests 1132 area-System.Security Need EncryptedXml and supporting types in Core framework This will likely depend on a large pile of other work, but I'd like to raise the issue. In porting applications to use CoreCLR, I have run into the need for the [EncryptedXml class](https://msdn.microsoft.com/en-us/library/system.security.cryptography.xml.encryptedxml%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396) more than once. From looking around, there are various 3rd party encryption libraries that exist but this adds a cost to porting from 1st-party .NET types. Enabling EncryptedXml in the Core framework will also enable encrypted configuration files in ASP.NET 5 Core profile as well... currently the user must create their own implementation of an encrypted configuration on this platform. 1133 area-System.Linq Add System.Linq.Queryable Source and Tests 1136 area-System.Collections Failure in System.Collections.Specialized.Tests.GetItemObjTests in CI MESSAGE: Error, returned wrong item for lowercase key +++++++++++++++++++ STACK TRACE: at System.Collections.Specialized.Tests.GetItemObjTests.Test01() in d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Collections.Specialized\tests\HybridDictionary\GetItemObjTests.cs:line 362 1149 area-System.Linq Refactor System.Linq Following @stephentoub comment here: https://github.com/dotnet/corefx/issues/1143#issuecomment-81683842 I am filing this issue to track doing some refactoring in System.Linq. Currently, everything is in one file which has about 3.2k lines and around 20 classes and interfaces. It is good if this can be refactored to make the code easier to follow. 1151 area-System.Numerics New API for single-precision math ### Rationale The .NET framework does not currently provide scalar single-precision floating-point support for many of the trigonometric, logarithmic, and other common mathematical functions. Single-precision floating-point support should be provided for these mathematical functions in order to better interop with high-performance, scientific, and multimedia-based applications where single-precision floating-points are the only implementation required and/or used. Since adding these methods to the existing `System.Math` class would break backwards compatibility, they should be provided through a separate class that provides the same and/or similar functionality. Providing these new APIs would: - improve code readability (especially in the non-hardware backed implementations of methods in the `System.Numerics.Vector` structs) - improve code performance in areas where the single-precision implementation is all that is required - provide better interoperability with high-performance, scientific, and multimedia-based applications where data structures and existing code may be dependent on single-precision implementations of such methods. - provide a more advanced infrastructure for mathematics in the CoreCLR ### Proposed API The proposed API here provides feature-parity with the existing double-precision math functions provided by the framework. #### System.BitConverter ``` C# public static class BitConverter { public static float Int32BitsToSingle(int); public static int SingleToInt32Bits(float); } ``` #### System.Single ``` C# public static partial class MathF { public const float E = 2.71828183f; public const float PI = 3.14159265f; // Trigonometric Functions public static float Acos(float); public static float Asin(float); public static float Atan(float); public static float Atan2(float, float); public static float Cos(float); public static float Sin(float); public static float Tan(float); // Hyperbolic Functions public static float Cosh(float); public static float Sinh(float); public static float Tanh(float); // Exponential Functions public static float Exp(float); // Logarithmic Functions public static float Log(float); public static float Log(float, float); public static float Log10(float); // Power Functions public static float Pow(float, float); public static float Sqrt(float); // Rounding Functions public static float Ceiling(float); public static float Floor(float); public static float Round(float); public static float Round(float, int); public static float Round(float, int, MidpointRounding); public static float Round(float, MidpointRounding); public static float Truncate(float); // Manipulation Functions public static int Sign(float); // Minimum, Maximum, and Difference Functions public static float Max(float, float); public static float Min(float, float); // Other Functions public static float Abs(float); public static float IEEERemainder(float, float); } ``` ### Example Usage Currently to calculate the Tangent for each member of the `System.Numerics.Vector4` struct, you currently have to call the double-precision version of the method and cast to the result to a single-precision value: ``` C# public static Vector4 Acos(Vector4 value) { return new Vector4((float)(Math.Acos(value.X)), (float)(Math.Acos(value.Y)), (float)(Math.Acos(value.Z)), (float)(Math.Acos(value.W))); } ``` With the proposed changes, this would now be simplified to the following: ``` C# public static Vector4 Acos(Vector4 value) { return new Vector4(Mathf.Acos(value.X), Mathf.Acos(value.Y), Mathf.Acos(value.Z), Mathf.Acos(value.W)); } ``` The `System.Numerics` library itself is filled with similar examples as are various bits of code in the CoreFX and CoreCLR repositories. ### Perf Numbers All performance tests are implemented as follows: - 100,000 iterations are executed - The time of all iterations are aggregated to compute the `Total Time` - The time of all iterations are averaged to compute the `Average Time` - A single iteration executes some simple operation, using the function under test, 5000 times The execution time below is the `Total Time` for all 100,000 iterations, measured in seconds. **Hardware: Desktop w/ 3.7GHz Quad-Core A10-7850K (AMD) and 16GB RAM** | Function | Improvment | Execution Time - Double | Execution Time - Single | | :-: | :-: | :-: | :-: | | Abs | 0.199243555% | 0.63752649s | 0.63625626s | | Acos | 12.30220910% | 11.5265412s | 10.1085220s | | Asin | 18.66801808% | 11.9472425s | 9.71692911s | | Atan | 21.10350002% | 10.9964683s | 8.67582861s | | Atan2 | 20.51327307% | 24.3328097s | 19.3413540s | | Ceiling | 12.91487191% | 1.87116459s | 1.62950608s | | Cos | 5.026665542% | 7.19916547s | 6.83728750s | | Cosh | 16.46166555% | 13.5416170s | 11.3124413s | | Exp | 33.67586387% | 6.65578424s | 4.41439140s | | Floor | 10.39208688% | 1.74655247s | 1.56504922s | | Log | 19.81117664% | 6.42244806s | 5.15008553s | | Log10 | 18.40605725% | 6.75118866s | 5.50856101s | | Pow | 47.85595440% | 31.8820155s | 16.6245727s | | Round | 0.976398142% | 4.22620632s | 4.18494172s | | Sin | 15.49539339% | 5.98022268s | 5.05356365s | | Sinh | 17.96609899% | 14.6242270s | 11.9968239s | | Sqrt | 4.676516651% | 2.51281945s | 2.39530703s | | Tan | 30.33470555% | 9.07290178s | 6.32066374s | | Tanh | 0.108182099% | 8.12724112s | 8.11844890s | I believe some extra perf will be squeezed out when the intrinsics (such as `CORINFO_INTRINSIC_Sqrt`) are properly implemented in the VM layer for single-precision values. Without such functionality, it falls back to the double-precision functionality (extra precision, reduced performance) for certain calls. ### Pull Request There is a sample pull request covering these changes available: dotnet/coreclr#5492 ### Additional Details This will require several changes in the CoreCLR as well to support the new APIs via FCALLs and Intrinsics. 1153 area-System.Console Bring back Console.ReadKey() For reference, see issue #311 and the related aspnet/Hosting#140. Console.ReadKey() can solve both issues (thought explicit support for CancelKeyPress is nice as that can handle different keyboard configurations etc). ReadKey() is a helpful API for many console app scenarios and is quite difficult for users to implement in a non-Windows-specific way if they want to get the same functionality. Please consider bringing it back. 1155 area-System.Linq Ordering of ParallelEnumerable.GroupJoin and Join "This feels strange or bug-ish to me, but I'm not seeing anything either way in documentation. The following: ```c# ParallelQuery left = Enumerable.Range(1, 4).AsParallel().AsOrdered(); ParallelQuery right = Enumerable.Range(8, 32).AsParallel().AsOrdered(); foreach (Tuple> p in left.GroupJoin(right, x => x, y => y / 8, (k, g) => Tuple.Create(k, g))) { Console.Write(p.Item1.ToString() + "":""); foreach (int i in p.Item2) { Console.Write(i.ToString() + "",""); } Console.WriteLine(); } Console.Read(); ``` ... has output like this: ![groupjoin](https://cloud.githubusercontent.com/assets/5569508/6683955/d5efffe4-cccf-11e4-8958-4dfde0993f1d.jpg) The first grouping is out of order, whereas I'm expecting even the grouped elements to be returned in order (which is what the non-parallel version does). Strangely, of the multiple times I've run it, only the first run has ever been out of order. Using `OrderBy` on the right query tends to result in other runs being disordered.... `Join` has similar problems to `GroupJoin`: ```c# ParallelQuery left = Enumerable.Range(1, 4).AsParallel().AsOrdered(); ParallelQuery right = Enumerable.Range(8, 32).AsParallel().AsOrdered(); int prev = 0; foreach (Tuple p in left.Join(right, x => x, y => y / 8, (k, g) => Tuple.Create(k, g))) { if (prev != p.Item1) { Console.WriteLine(); Console.Write(p.Item1.ToString() + "":""); prev = p.Item1; } Console.Write(p.Item2.ToString() + "",""); } Console.Read(); ``` ... is producing output that looks like this: ![join](https://cloud.githubusercontent.com/assets/5569508/6684267/ee062632-ccd2-11e4-8363-679f7ed8dd0b.png) ...where every run is disordered. This is the behavior of the current consumer release as well. So is this ""intended"" behavior, and the documentation should be updated to warn people about the change from the sequential version (which explicitly states the ordering of the child elements is preserved), or is this an actual bug? @stephentoub , @svick , any thoughts? " 1165 area-System.IO FileSystemWatcher_InternalBufferSize_File test failed in CI FileSystemWatcher_4000_Tests.FileSystemWatcher_InternalBufferSize_File [FAIL] Should not observe a error event Stack Trace: d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.IO.FileSystem.Watcher\tests\Utility\Utility.cs(100,0): at Utility.ExpectNoEvent(WaitHandle eventOccured, String eventName, Int32 timeout) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.IO.FileSystem.Watcher\tests\FileSystemWatcher.InternalBufferSize.cs(53,0): at FileSystemWatcher_4000_Tests.FileSystemWatcher_InternalBufferSize_File() Finished: System.IO.FileSystem.Watcher.Tests 1168 area-System.Numerics Vector Shuffling Operations "As mentioned in #993, a lot of useful SIMD code relies on shuffling data around within registers. There are a whole bunch of instructions available to do this, so we'd like to expose a coherent subset of these via Vector. ## Rationale and Usage Simple stream processing, such as the operations already supported on Vector, are entirely parallel and thus don't benefit from shuffling operations. However, lots of common uses of SIMD do require it, such as doing geometric vector operations like matrix multiplies and vector cross products. These are key scenarios for certain users, such as game developers. If rearranging elements is required for an algorithm and fast hardware support is not provided, the cost of loading and storing to and from SIMD registers might exceed any benefits gained from using SIMD in the first place. When looking at existing libraries that wrap SIMD functionality at a low level, it's apparent that there are a few main use cases of shuffle: - Permuting the elements of two different vectors into a result - ""Swizzling"" the elements within a single vector - ""Splatting"" or ""broadcasting"" one element to all others within a single vector Rather than expose one single shuffle method directly, I think it makes sense to go with this slightly higher level functionality such that the API doesn't become too tied to a particular architecture's instruction set. ## Proposed API New methods on the Vector struct: ``` csharp // pick elements from a and b to place into result internal static unsafe Vector Permute2 (Vector a, Vector b, int s0, int s1); internal static unsafe Vector Permute4 (Vector a, Vector b, int s0, int s1, int s2, int s3); // rearrange elements within a internal static unsafe Vector Swizzle2 (Vector a, int s0, int s1); internal static unsafe Vector Swizzle4 (Vector a, int s0, int s1, int s2, int s3); // rearrange bytes in a internal static unsafe Vector ShuffleBytes (Vector a, Vector mask); // broadcast specified element to all other elements in a internal static unsafe Vector Splat (Vector a, int element); ``` New methods on Vector class that are simple wrappers around the Vector methods. ``` csharp public static Vector Permute (Vector a, Vector b, int s0, int s1); public static Vector Permute (Vector a, Vector b, int s0, int s1); public static Vector Permute (Vector a, Vector b, int s0, int s1); public static Vector Permute (Vector a, Vector b, int s0, int s1, int s2, int s3); public static Vector Permute (Vector a, Vector b, int s0, int s1, int s2, int s3); public static Vector Permute (Vector a, Vector b, int s0, int s1, int s2, int s3); public static Vector Swizzle (Vector a, int s0, int s1); public static Vector Swizzle (Vector a, int s0, int s1); public static Vector Swizzle (Vector a, int s0, int s1); public static Vector Swizzle (Vector a, int s0, int s1, int s2, int s3); public static Vector Swizzle (Vector a, int s0, int s1, int s2, int s3); public static Vector Swizzle (Vector a, int s0, int s1, int s2, int s3); public static Vector ShuffleBytes (Vector a, Vector mask); public static Vector Splat (Vector a, int element); ``` ## Details and Questions - There are a lot of tradeoffs when picking method signatures for shuffle. For example, instead of taking many selector parameters, we could instead have one combined integer mask. However, pretty much every single caller will then implement their own helper method to do the bitwise combination of the mask, so all callsites get more complicated. Additionally, we want the JIT to discover and optimize the cases where the parameters are JIT-time constants. - I chose for the selector parameters to be ints instead of, say, bytes. I'm not sure if there's a compelling reason to choose one over the other. In either case, we'd have to define what happens when the parameters are out of range. Since the intrinsics are going to bitwise combine them, in the interests of speed it'd be good if they could say that are not range checked. - We could also have a Permute8 and Swizzle8 and extend the methods to shorts and ushorts. The parameter lists get kind of unwieldy... - ShuffleBytes is an interesting case. pshufb is a very useful instruction to expose, but it's an SSSE3 instruction. It may be worth being more explicit about which features are supported by the hardware via some set of caps flags instead of the single boolean IsHardwareAccelerated we have now. - Shuffle intrinsically breaks the abstraction of Vector of not needing to know the underlying register size. Honestly, I think that's an unworkable abstraction in the long term; it's too difficult to write usage code that can work with arbitrarily sized vectors, so it might be worth exploring having specifically sized Vector128, Vector256, etc. This is clearly a discussion to be had in a separate issue though. " 1170 area-System.Collections IEnumerator.Current does not throw after hitting the end of the collection. This issue is in the `List.Enumerator` class. When the collection is enumerated to then end and then modified, accessing `IEnumerator.Current` returns `default(T)` rather than throwing. According to the [documentation](https://msdn.microsoft.com/en-us/library/vstudio/system.collections.ienumerator.current%28v=vs.100%29.aspx) it should throw. Simple Test case: ``` CSharp var list = new List{0,1}; var enumerator = ((IEnumerable)list).GetEnumerator(); while (enumerator.MoveNext()){} list.Add(2); Assert.Throws(() => enumerator.Current); ``` This test fails currently with `enumerator.Current` returning 0. 1171 area-System.Collections Add tests for KeyedCollection. Issue #867 "This change adds tests for `KeyedCollection` ported from internal test assets, bringing test coverage from 0 to 96% This also includes tests for `IList`, `ICollection`, and `IEnumerable` that can be used across all tests involving collections. I will be bringing over tests for `IList`, `ICollection`, and `IEnumerable` in a future PR. " 1178 area-System.Linq Add System.Linq.Expressions source and tests. 1182 area-System.Linq System.Linq performance improvement suggestions "With Linq-to-Objects it is quite common practice to perform a series of transformations, and then materialize sequence to a concrete collection type by calling _ToArray(), ToList(), ToDictionary()_. These operations would work much faster if they knew the number of elements in the sequence. Currently System.Linq.Enumerable has special treatment for _ICollection_ interface only. I suppose that additional support for _IReadOnlyCollection_ can improve performance in some cases, because through it we can figure out the total number of elements. Another problem with System.Linq is that in many cases the information about the number of elements is lost. One of the most common example: ``` C# List source = ...; List transformed = source.Select(o => o + 1).ToList(); ``` Obviously _Select_ does not change the number of elements in the sequence, but _ToList_ method cannot take advantage of that. Information is lost. In this particular scenario, it would be great for _Select_ to return some _SelectIterator_ instance, which implements _IReadOnlyCollection_, and thereby passes the number of elements to the subsequent methods. **Steps to measure performance gain**: 1. Find in _System.Linq.Tests\Performance_ the test for the method you've changed; 2. Uncomment `[Fact]` attribute above that method; 3. Build test project by Visual Studio in Release mode; 4. Go to the folder with tests binaries: `bin\tests\Windows_NT.AnyCPU.Release\System.Linq.Tests\aspnetcore50\`; 5. Open command prompt (cmd.exe or PowerShell); 6. Run command: `CoreRun.exe xunit.console.netcore.exe System.Linq.Tests.dll -parallel none -trait ""Perf=true""`; 7. Wait for results that will be printed right in the command window; 8. Don't forget to run tests with different collection sizes. This can be done by varying _elementCount_ argument of _Measure_ method. **Casting to `IReadOnlyCollection`** is a slow operation so it is not a good idea to check if this interface implemented. The performance drop will be most noticeable on the small collections. **Tasks**: - [ ] `Select`: add iterators for `List`, `Array[T]`, `ICollection`; - [ ] `ToArray`, `ToDictionary`: add special support for `ICollection` (and, very carefully, for `IReadOnlyCollection`) to get the initial capacity; - [ ] `ToList` (???): add special support for `IReadOnlyCollection` to get the initial capacity (separated as it will affect _System.Collections.Generic_); - [ ] `OrderBy(Descending)/ThanBy(Descending)`: implement special iterator for `ICollection` to propagate `Count`; - [ ] `Cast`, `Reverse`: add iterators for `ICollection` to propagate `Count`; - [ ] `Range`, `Repeat`: add an iterator that implements `ICollection`; - [ ] `Skip`, `Take`: add an iterator that handle `ICollection`; - [x] Add performance tests for _System.Linq_ " 1187 area-System.Collections Improve the exception message of ToDictionary when keys are duplicated "`Enumerable.ToDictionary` makes it easy to turn an array into a dictionary. But when the keys are duplicated in the source array, it just throws an `ArgumentException` that says **An entry with the same key already exists**. It is hard to know what keys are duplicated. To improve the exception message without adding extra overhead, the exception message can be modified to **$""An entry with the key { key } already exists""**. `ToDictionary` internally calls `Dictionary.Add()`, so the improvement made to Dictionary.Add benefits all code that calls the method. " 1198 area-System.Linq Improve code coverage for System.Linq.Expressions According to the current code coverage report, this library is only at ~40%. Our general goal is closer to 90%, though this will depend on the library. We should investigate to see whether the current coverage level is appropriate, and if not, improve our test suites to provide better coverage. 1199 area-Serialization Improve code coverage for System.Xml.XmlSerializer According to the current code coverage report, this library is only at ~42%. Our general goal is closer to 90%, though this will depend on the library. We should investigate to see whether the current coverage level is appropriate, and if not, improve our test suites to provide better coverage. 1218 area-System.Collections Provide ConcurrentDictionary the ability to set initial capacity with DefaultConcurrencyLevel "It's absurdly difficult to create a ConcurrentDictionary with an initial capacity. This forces you to set the arcane DefaultConcurrencyLevel integer. I absolutely want to defer that to the platform. This leads to using this horrific code: ``` c# (int)typeof(ConcurrentDictionary<,>).MakeGenericType(typeof(int), typeof(int)) .GetProperty(""DefaultConcurrencyLevel"", BindingFlags.Static | BindingFlags.NonPublic) .GetValue(new ConcurrentDictionary()); ``` So either add a constructor that allows this. Add magic number support that providing < 1 results in this, or just make DefaultConcurrencyLevel be a public property. " 1220 area-Infrastructure Need a mechanism to be able to run dangerous Outerloop tests (that require machines to be recycled) Of the System.IO.FileSystem tests ported over, there were a couple that modified the current directory. Some set the current directory directly, some used the CurrentDirectoryContext helper class. Most of these instances were testing the behavior of APIs that acted on relative paths. For example, CreateDirectory_DotDotAsPath_WhenCurrentDirectoryIsRoot_DoesNotThrow() in CreateDirectory.cs does what its title says. This is a specific instance of the general problem of testing global process state. 1221 area-System.IO System.IO.FileSystem tests need a mechanism to test mounting drives System.IO.FileSystem tests need a way to test machine-wide state, specifically mounting network drives. 1227 area-System.Linq Performance tests for System.Linq (issue #1182) This PR introduces the performance tests for System.Linq as a part of work on the issue #1182. 1235 area-Serialization Add some tests for serialization Add/update serialization tests: DCS_BaseClassAndDerivedClassWithSameProperty Xml_StringAsRoot 1241 area-System.Linq Adding more tests to System.Linq. This time I copied some files from System.Linq.Parallel, because, looking at them, they seem to fit very well with System.Linq after removing the AsParallel() keyword. If I get a positive feedback about this from the community, then I will go ahead with copying the rest of files from System.Linq (of course on the condition that they fit) and hopefully this will improve the code coverage of System.Linq considerably. #1143 1243 area-Infrastructure Build should disallow OS versions (and other parameters) that aren't supported We should have an allowable OS list and disallow parameters not matching the list. This avoids issues where someone sets OS=Mac vs OS=OSX. 1244 area-System.Runtime Add overloads to string trimming "The proposal is to add new extension methods / overloads for string trimming, As you know, right now, it's only possible to trim individual characters from a string, but I would like to trim suffixes & prefixes. An example usage: `""MyTest"".TrimEnd(""Test"") == ""My"" == true` I feel like they should've be there. It seems kind of weird to me, as I've implemented these by myself in the past few times, and am sure there are quite few people who miss this & would find it useful: http://stackoverflow.com/questions/7170909/trim-string-from-end-of-string-in-net-why-is-this-missing http://stackoverflow.com/questions/4101539/c-sharp-removing-strings-from-end-of-string http://stackoverflow.com/questions/5284591/how-to-remove-a-suffix-from-end-of-string http://stackoverflow.com/questions/4335878/c-sharp-trimstart-with-string-parameter Now the following statement is not true, but if it would be, it would describe how I am feeling: ""ooh hey, we offer you string replace method which can replace individual chars, but not the whole strings. It's not too hard to craft your own one, give it a try!"" The following applies to `TrimEnd` / `TrimStart`, but the overloads would be 1:1, so I will discuss only `TrimEnd`. **First overload:** `public string TrimEnd(string suffix)` Behaviour: trim the suffix, case-sensitive, and only once. The comparision is done the same way, as it would be for `string.Replace`. `""MyTestTest"".TrimEnd(""Test"") == ""MyTest"" == true` **Second overload:** `public string TrimEnd(string suffix, StringComparison comparison)` Works as the first one, but allows you to explictly tell how to compare. `""MyTESTtest"".TrimEnd(""test"", StringComparison.InvariantCultureIgnoreCase) == ""MyTEST"" == true` **Third overload(s):** I am not sure if these are needed, but I wanted to throw this out here anyway: ``` public string TrimEnd(string suffix, bool trimRepeatedly) public string TrimEnd(string suffix, bool trimRepeatedly StringComparison comparison) ""MyTestTEST"".TrimEnd(""test"", true, StringComparison.InvariantCultureIgnoreCase) == ""My"" == true ``` This proposal has nothing to do with string.Trim(), as it would be ambigious. `""tetet"".Trim(""tet"") == ???` Namespace: _System_ Type: _System.String_ Assembly: _System.Runtime.dll_ I'd be willing to work on this :3 " 1247 area-Serialization Serialization tests fail ``` DataContractSerializerTests.DCS_ContainsLinkedList [FAIL] System.Exception : Test failed for input : SerializationTypes.ContainsLinkedList Stack Trace: d:\Workspace\corefx\src\System.Runtime.Serialization.Xml\tests\DataContractSerializer.cs(1717,0): at DataContractSerializerTests.SerializeAndDeserialize[T](T value, String baseline, DataContractSerializerSettings settings, Func`1 serializerFactory) d:\Workspace\corefx\src\System.Runtime.Serialization.Xml\tests\DataContractSerializer.cs(1113,0): at DataContractSerializerTests.DCS_ContainsLinkedList() Starting: System.Xml.XPath.XmlDocument.Tests Finished: System.Runtime.Serialization.Xml.Tests === TEST EXECUTION SUMMARY === System.Runtime.Serialization.Xml.Tests Total: 97, Errors: 0, Failed: 1, Skipped: 0, Time: 1,906s ``` # ``` DataContractJsonSerializerTests.DCJS_ContainsLinkedList [FAIL] System.FormatException : Input string was not in a correct format. Stack Trace: at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args) at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args) at System.String.Format(IFormatProvider provider, String format, Object[] args) at System.Diagnostics.Debug.WriteLine(String format, Object[] args) d:\Workspace\corefx\src\Common\tests\System\Console.cs(12,0): at System.Console.WriteLine(String message, Object[] args) d:\Workspace\corefx\src\System.Runtime.Serialization.Json\tests\DataContractJsonSerializer.cs(1291,0): at DataContractJsonSerializerTests.SerializeAndDeserialize[T](T value, String baseline, DataContractJsonSerializerSettings settings, Func`1 serializerFactory, Boolean skipStringCompare) d:\Workspace\corefx\src\System.Runtime.Serialization.Json\tests\DataContractJsonSerializer.cs(1047,0): at DataContractJsonSerializerTests.DCJS_ContainsLinkedList() xUnit.net console test runner (32-bit .NET Core) Copyright (C) 2014 Outercurve Foundation. Discovering: System.Xml.XPath.Tests Finished: System.Runtime.Serialization.Json.Tests === TEST EXECUTION SUMMARY === System.Runtime.Serialization.Json.Tests Total: 74, Errors: 0, Failed: 1, Skipped: 0, Time: 1,477s ``` /cc @khdang 1254 area-System.Linq Enumerable.Single and Enumerable.SingleOrDefault overloaded implementations are inconsistent There is an inconsistency between the implementations of [Enumerable.Single()](https://github.com/dotnet/corefx/blob/master/src/System.Linq/src/System/Linq/Enumerable.cs#L1260) and [Enumerable.Single(predicate)](https://github.com/dotnet/corefx/blob/master/src/System.Linq/src/System/Linq/Enumerable.cs#L1284). Similarly there is another similar inconsistency between the implementations of [Enumerable.SingleOrDefault()](https://github.com/dotnet/corefx/blob/master/src/System.Linq/src/System/Linq/Enumerable.cs#L1306) and [Enumerable.SingleOrDefault(predicate)](https://github.com/dotnet/corefx/blob/master/src/System.Linq/src/System/Linq/Enumerable.cs#L1330) The overloads which accept a predicate enumerate the whole sequence before eventually throwing, even if more than one matching elements were already found: For consistency and performance reasons, it may be a good idea to make [Enumerable.Single(predicate)](https://github.com/dotnet/corefx/blob/master/src/System.Linq/src/System/Linq/Enumerable.cs#L1284) and [Enumerable.SingleOrDefault(predicate)](https://github.com/dotnet/corefx/blob/master/src/System.Linq/src/System/Linq/Enumerable.cs#L1330) methods able to fail fast and to throw an `InvalidOperationException` as soon as a second matching element is found. If that seems like a reasonable change, I would gladly submit a pull request. 1255 area-Infrastructure Create Win7 CI build We currently have a number of folks that are still working on Win7 which we support and we keep breaking things from time to time. We need to get a CI build/test for Win7. 1256 area-Serialization Fix issue with serialization of XmlElement "From #1199 The following code runs on .net 4.5 but does not run on corefx. There is an exception {""To be XML serializable, types which inherit from IEnumerable must have an implementation of Add(System.Object) at all levels of their inheritance hierarchy. System.Xml.XmlElement does not implement Add(System.Object).""} System.Exception {System.InvalidOperationException} ``` csharp public class Program { public void Main(string[] args) { XmlSerializer serializer = new XmlSerializer(typeof(Product)); string text = @"" Iphone smartphone ""; StringReader reader = new StringReader(text); Product product = (Product)serializer.Deserialize(reader); Console.ReadLine(); } } public class Product { [XmlAnyElement] public XmlElement[] AllElements; } ``` " 1271 area-System.Runtime Add overload for case insensitive string Replace "# Introduction `String` does not provide `Replace` method for case-insensitive replacements, but only for case-sensitive replacements. # Rationale and usage The idea here is to make programmers life easier & move closer to API consistency. It is fairly common scenario where you have user inserted data that has some kind of place-holders (tokens), that later have to be replaced by some templating system. Current solutions in the internet involve using regex class for this trivial task. ```c# var userTemplateData = ""Hello there. Time now is %currenttime%""; var evaluatedData = Regex.Replace( userTemplateData, ""%CurrentTime%"", DateTime.Now.ToString(), RegexOptions.IgnoreCase); // evaluatedData = ""Hello there. Time now is 01/04/2015 14:37""; ``` This approach is horrible: 1) not readable 2) often times not correct, as pattern has to be run through `Regex.Escape` before. 3) most likely slow(er) After the necessary change is added, we can do: ```c# var evaluatedData = userTemplateData.Replace( ""%CurrentTime%"", DateTime.Now.ToString(), StringComparison.InvariantCultureIgnoreCase); ``` How common would the usage of this be? I would **speculate** that every programmer in their career will hit the lack of case-insensitive replacement in framework at least once. I can't say much more, expect provide some StackOverflow links below in Details section. I did quick search through the code-base I am new to, and found around ~30 case-insensitive `Regex.Replace` usages. # Proposed API ```c# public sealed class String : ... { .... // these two methods are provided for framework consistency // trying to follow the StartsWith/EndsWith public string Replace(string oldValue, string newValue, StringComparison comparison); public string Replace(string oldValue, string newValue, bool ignoreCase, CultureInfo culture); public string Replace(char oldValue, char newValue, CompareOptions options); .... } ``` # Details Namespace: **System** Type: **System.String** Assembly: **System.Runtime.dll** I'd love to see the current `string.Replace` [CoreClr implementation](https://github.com/dotnet/coreclr/blob/cbf46fb0b6a0b209ed1caf4a680910b383e68cba/src/classlibnative/bcltype/stringnative.cpp#L835) pulled out from CoreClr, and implemented 100% in the `String.cs`: This would help to: - avoid code-duplication - make it more transparent (programmers can take look at the implementation) - unit-test a little less, as they share both common functionality for `Replace(..., StringComparison.Ordinal);` Alternatively, we could also modify the existing `CoreClr` implementation to deal with `StringComparison`. Or, just rewrite everything from zero. # Links to explore http://stackoverflow.com/questions/244531/is-there-an-alternative-to-string-replace-that-is-case-insensitive http://stackoverflow.com/questions/6275980/string-replace-by-ignoring-case http://weblogs.asp.net/jongalloway/71188 # Updates - Edited this description to make it more of a **speclet**, based on the discussion below and the proposed API Review process. - Feedback to @tarekgh. Added my opinion about how often this functionality would be used I'd be willing to work on this :3 " 1272 area-System.Collections Make System.Collections.Immutable [Serializable] Please make collections from namespace System.Collections.Immutable serializable if it is possible - mark them with `[Serializable]` attribute and do other related changes. There can be many cases when this would be useful. Thanks. 1285 area-System.Reflection Misc additions supporting Portable PDB reader 1297 area-System.Linq Unit Tests for Enumerable.Select Set of basic tests for: ``` IEnumerable Enumerable.Select( this IEnumerable source, Func selector) ``` 1. Verify `ArgumentNullException`is thrown when either `source` or `selector` is null. 2. Verify that deferred execution works (for `T[]`, `List` and `IEnumerable`) 3. Verify that returned collection contains expected items (for `T[]`, `List` and `IEnumerable`) 4. Verify that `GetEnumerator` called twice returns two different instances of enumerator. Tests are intended to improve code coverage around `Select` method before applying performance improvements to it (https://github.com/dotnet/corefx/pull/1282). It's also connected to https://github.com/dotnet/corefx/pull/1241 and https://github.com/dotnet/corefx/issues/1143. 1298 area-System.IO System.IO.Compression test asset and native dependency proposal "System.IO.Compression provides an API to compress and decompress files. It supports the ZIP and gzip archive formats and the Deflate compression algorithm. **_Testing**_ System.IO.Compression has existing test assets that fit three categories: 1. Round trip data through compression and verify it remains intact 2. Extract and verify data compressed through other compatible compression libraries 3. Verify behavior when attempting to decompress invalid or edge case archives The existing assets include archives, as well as decompressed binary files both for use as source material, and an oracle to verify decompression. Altogether, the binary assets weigh in at about 40MB. **Problem:** these test assets need to exist at test run time. Placing them in our corefx git repository is problematic because binary assets do not compress well and will bloat the size of our repository. **Proposal:** Binary test assets are packaged in to a nuget package per test assembly to be deployed at test run time. The binary assets to generate these nuget package are persisted in a single separate Git repository. Git repository structure: corefx-testdata\ corefx-testdata\System.IO.Compression.TestData.nuspec corefx-testdata\System.IO.Compression.TestData\ Nupkg structure: content\ Test asset nuget packages are depended on by the test assembly’s packages.config Currently, nuget is designed to deploy at package reference time (ie. when a package is referenced in Visual Studio) rather than runtime. In Dev14 this is changing. Until then, we’ll include a target in the test assembly’s csproj to copy the assets from the downloaded nuget package to the test’s working directory. In addition to System.IO.Compression, metadata reader uses binary test assets, but as they are only 100KB combined and are not a practical problem. System.IO.Packaging has 60GB of test assets. **Proposal:** System.IO.Packaging split their test assets in to tiers, with a single nuget package per tier. The inner loop tests should be no more than some number of megabytes. **_Native Dependencies**_ In the desktop .NET Framework, although we have a purely managed implementation of the deflate algorithm, customers have reported that the popular cross-platform open-source zlib library is faster and performs high quality compression. In response we include zlib, which we wrap and delegate to. We build it from source using the unmodified 1.2.3 version of the sources in the FX partition, and name the resulting output “clrcompression.dll.” On Windows, to fit with .NET Core’s app-local, side-by-side model, if we include zlib, we should deploy a copy of the native assembly alongside the managed System.IO.Compression.dll assembly included with an application. zlib distributes both sources and official binaries. While we could redistribute the official zlib binary, unfortunately they only release a 32-bit version and we are currently distributing a 64-bit version of coreclr. While zlib has a permissive license, it is not the MIT license, and including it in the corefx repository would mean the corefx repository no longer only contained code under a single license. **Proposal:** Continue building clrcompression.dll from the FX repository. Publish the 64-bit version of clrcompression.dll in a nuget package System.IO.Compression.clrcompression-x64.nupkg. Make System.IO.Compression.clrcompression-x64 a dependency of the System.IO.Compression package. **X-Plat todo:** Linux has a strong history of deploying applications and their dependencies through package managers. Packagers bundle the application binaries and metadata describing dependencies in to packages, and publish those on package manager repositories. We are planning to declare other framework and runtime dependencies through package managers where appropriate, and System.IO.Compression’s zlib dependency should be consistent. " 1305 area-System.Xml Inconsistent behavior of XmlAttributeCollection.InsertBefore and InsertAfter "I've noticed an inconsistent behavior of `XmlAttributeCollection.InsertAfter(XmlAttribute newNode, XmlAttribute refNode)` comparing to `InsertBefore` when the reference node is the last in the collection (the first for `InsertBefore`) and it's a duplicate of the new node. The duplicate node (attribute) needs to be removed before inserting. `InsertAfter` is unable to handle the case and throws `System.ArgumentOutOfRangeException` further in `List.Insert()` due to an incorrectly calculated insert position, while `InsertBefore` does the job. I'm not sure if this case has any practical use, but might be worth fixing. The following unit test reproduces the problem: ``` [Fact] // [ActiveIssue(""Throws argument out of range exception"")] public void InsertAfterRemovesDupRefAttr() { const string attributeName = ""existingAttr""; const string attributeUri = ""some:existingUri""; XmlDocument doc = CreateDocumentWithElement(); XmlElement element = doc.DocumentElement; element.Attributes.Append(doc.CreateAttribute(""attr1"", ""some:uri1"")); element.Attributes.Append(doc.CreateAttribute(""attr2"", ""some:uri2"")); XmlAttribute refAttr = element.Attributes.Append(doc.CreateAttribute(attributeName, attributeUri)); //dup XmlAttribute newAttr = doc.CreateAttribute(attributeName, attributeUri); XmlAttributeCollection target = element.Attributes; target.InsertAfter(newAttr, refAttr); // throws // Assert... } ``` A similar case (the reference attribute is the first in the collection) works for `InsertBefore`: ``` [Fact] public void InsertBeforeRemovesDupRefAttr() { const string attributeName = ""existingAttr""; const string attributeUri = ""some:existingUri""; XmlDocument doc = CreateDocumentWithElement(); XmlElement element = doc.DocumentElement; XmlAttribute refAttr = element.Attributes.Append(doc.CreateAttribute(attributeName, attributeUri)); //dup element.Attributes.Append(doc.CreateAttribute(""attr1"", ""some:uri1"")); element.Attributes.Append(doc.CreateAttribute(""attr2"", ""some:uri2"")); XmlAttribute newAttr = doc.CreateAttribute(attributeName, attributeUri); XmlAttributeCollection target = element.Attributes; target.InsertBefore(newAttr, refAttr); // Assert... } ``` " 1313 area-System.IO FileInfo: get_LastWritTime test fail ``` EXEC : warning : (runTest, d:\corefx\src\System.IO.FileSystem\tests\FileInfo\get_LastWriteTime.cs, 100) Eror_f984f! LastWriteTime is way off [D:\corefx\src\System.IO.FileSystem\tests\System.IO.FileSystem.Tests.csproj] FAiL! get_LastWriteTime.cs ,iCountErrors==1 FileInfo_get_LastWriteTime.runTest [FAIL] Assert.Equal() Failure Expected: 0 Actual: 1 Stack Trace: d:\corefx\src\System.IO.FileSystem\tests\FileInfo\get_LastWriteTime.cs(126,0): at FileInfo_get_LastWriteTime.runTest() ``` 1314 area-System.Collections Regression: Comparer_DefaultInvariant.ExecuteComparer_DefaultInvariant http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_release/lastFailedBuild/testReport/junit/(root)/Comparer_DefaultInvariant/ExecuteComparer_DefaultInvariant/ MESSAGE: Assert.True() Failure +++++++++++++++++++ STACK TRACE: at Comparer_DefaultInvariant.ExecuteComparer_DefaultInvariant() in d:\j\workspace\dotnet_corefx_windows_release\src\System.Collections.NonGeneric\tests\Comparer\Comparer_DefaultInvariant.cs:line 114 1316 area-Infrastructure Use roslyn compiler to build corefx We should be using the Roslyn compiler to build 1317 area-Serialization Remove LegacyNetCF serializer from XmlSerializer 1318 area-Infrastructure Single tests should be able to be run through the IDE Currently there seems to be some miscommunication between the corefx repo/project setup and the IDE, and the test discovery inside the IDE for xunit is broken. This makes it difficult to run single tests 1326 area-System.IO System.IO.Compression tests need to remove a workaround for not understood DST issue The System.IO.Comprssion tests verify the last modified metadata of zip file entries. There is currently a workaround where the check will succeed if the entry is 1 hour earlier than expected. This is to work around a not understood DST issue either in the test, or in the library. I need to understand if the issue is a test or product issue, and fix. 1330 area-System.Linq Parallel.Linq.Distinct not returning first element equal element in ordered queries. "Parallel.Linq.Distinct doen't return the first ""equal"" element in ordered queries. Take, for example, the following set: `{0, 1, 2, 3, 4, 5, 6, 7}` - and use a comparator that says everything `mod 4` is identical (so, `0` is the same as `4`, `1` and `5`, etc). I'm somewhat expecting to get `{0, 1, 2, 3}`, but I don't - any of the 'later' identical values can be returned. For those of you contending that ""They're identical, it doesn't matter"", which I somewhat thought too, I'm basing this on comments internal to the [Distinct operator](https://github.com/dotnet/corefx/blob/master/src/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/DistinctQueryOperator.cs#L238-L251): ``` 238 // For each element, we track the smallest order key for that element that we saw so far 239 TKey oldEntry; 240 241 Wrapper wrappedElem = new Wrapper((TInputOutput)elem.First); 242 243 // If this is the first occurrence of this element, or the order key is lower than all keys we saw previously, 244 // update the order key for this element. 245 if (!_hashLookup.TryGetValue(wrappedElem, out oldEntry) || _keyComparer.Compare(orderKey, oldEntry) < 0) 246 { 247 // For each ""elem"" value, we store the smallest key, and the element value that had that key. 248 // Note that even though two element values are ""equal"" according to the EqualityComparer, 249 // we still cannot choose arbitrarily which of the two to yield. 250 _hashLookup[wrappedElem] = orderKey; 251 } ``` The [ordering page](https://msdn.microsoft.com/en-us/library/vstudio/dd460677%28v=vs.110%29.aspx) just says these operators return ""ordered"" results given an ordered source, which is technically still happening - so long as there was an element in that original position, that or an equal one is returned in that position. Vanilla LINQ actually says `Distinct` returns _unordered_ results, but I'm guessing they really meant ""we didn't use `OrderBy` to make things easier for us"", especially as all the examples (and the way the operator is implemented) show that it retains the ordering of the original source (and how the other set operators behave - `Except` doesn't mention ordering, `Intersect` explicitly mentions the original order is retained, and `Union` mostly implies the original order is retained). So... which is correct? Should the actual-first equal element be returned (as I'm expecting), or that's a stronger guarantee than we need (and any equal item can be returned in its place)? Example reproduction code (may fail to fail): ``` using System; using System.Collections.Generic; using System.Linq; using Xunit; namespace Test { public class Example { [Fact] public static void DistinctExample() { ParallelQuery original = ParallelEnumerable.Range(0, 24).AsOrdered(); int seen = 0; Assert.All(original.Distinct(new ModularCongruenceComparer(4)), i => Assert.Equal(seen++, i)); Assert.Equal(4, seen); } private class ModularCongruenceComparer : IEqualityComparer { private int _mod; public ModularCongruenceComparer(int mod) { _mod = Math.Max(1, mod); } private int leastPositiveResidue(int x) { return ((x % _mod) + _mod) % _mod; } public bool Equals(int x, int y) { return leastPositiveResidue(x) == leastPositiveResidue(y); } public int GetHashCode(int x) { return leastPositiveResidue(x).GetHashCode(); } public int GetHashCode(object obj) { return GetHashCode((int)obj); } } } } ``` " 1332 area-System.Linq Parallel.Linq.Concat not consistent with ordered input "`Parallel.Linq.Concat` isn't behaving consistently when given ordered input sources. As `Concat` is a binary operator, two sources may be supplied. The inconsistency surfaces depending on which, and how, operand is ordered. If both **or** either (only the left or the right) is ordered via `AsOrdered()`, the entire output is ordered. If the left operator is ordered via any of the `OrderBy(...)` operators (`OrderBy`, `OrderByDescending`, `ThenBy`, `ThenByDescending`), the entire output is ordered. If the _right_ operator is ordered via any of the `OrderBy(...)` operators, only the _left_ output is ordered (as by `AsOrdered()`), and the right is returned in a non-deterministic order. It only seems to do this with right sources constructed via `Enumerable.Range(...).AsParallel()` and `Partitioner.Create(...).AsParallel()`. Using a `List` is safe (eg, `Enumerable.Range(...).ToList().AsParallel()`), however the output of LINQ is not: `list.Select(x => x).AsParallel()` can return unordered output. How the left operand is constructed appears to have no effect. This is also the behavior of the current consumer release. Example program: ``` static void Main(string[] args) { int leftSize = 8; int rightSize = 8; ParallelQuery query = ParallelEnumerable.Range(0, leftSize) .Concat(Enumerable.Range(0, rightSize).AsParallel().OrderBy(x => x)); foreach (int i in query) { Console.Write(i + ""|""); } Console.ReadLine(); } ``` (This is a bit of a Heisenbug - expect it to generate completely ordered output on occasion. It's possible that it does this for all input types, and I just haven't seen it yet, although I consider this unlikely) The [ordering page](https://msdn.microsoft.com/en-us/library/vstudio/dd460677%28v=vs.110%29.aspx) states that ordered input to `Concat` results in ordered output, and unordered input results in unordered output, but it isn't clear what happens when you have one of each. At minimum, the output actually observed is disturbing on first encounter. `Zip` appears to operate similar to how I anticipate `Concat` operating - if either input is ordered, the entire output is ordered, regardless of source. " 1334 area-System.IO Investigate async usage for System.IO.Compression "@stephentoub pointed out two suspect uses of Async in System.IO.Compression in https://github.com/dotnet/corefx/pull/1309 - In System\IO\Compression\DeflateStream.cs: ``` 347 + // If there is no data on the output buffer and we are not at 348 + // the end of the stream, we need to get more data from the base stream 349 + readTask = _stream.ReadAsync(buffer, 0, buffer.Length, cancellationToken); 350 + if (readTask == null) 351 + { 352 + throw new InvalidOperationException(SR.NotReadableStream); 353 + } 354 + 355 + var tcs = new TaskCompletionSource(); 356 + 357 + // ContinueWith will never throw here otherwise we'll be in inconsistent state 358 + readTask.ContinueWith( ``` ""It's not clear to me why ContinueWith is being used in this fashion rather than using async/await. We should open a work item to revisit this async implementation."" In System\IO\Compression\DeflateStream.cs: ``` 625 + Interlocked.Increment(ref asyncOperations); 626 + 627 + try 628 + { 629 + return base.WriteAsync(array, offset, count, cancellationToken).ContinueWith( 630 + (t) => Interlocked.Decrement(ref asyncOperations), ``` ""This looks like a real bug. Any exceptions or cancellation information from the Task returned from the base WriteAsync is getting eaten."" " 1336 area-System.Linq Collections should have extensions to compute order statistic `System.Linq` has extensions implemented for computing the minimum and maximum. Example: ``` C# var a = new int[] {100, 300, 200, 400}; WriteLine(a.Max()); // prints 400 WriteLine(a.Min()); // prints 100 ``` While these are useful values when dealing with collections, they are merely special cases of nth order statistics. More often than not, people are also interested in a specific cases. For example, when querying the collection in the sample code above, the question may be posed, what is the 3rd smallest item in the array? The naive implementation would be to sort the array and print the 3rd item in it. However, there are selection algorithms that can do this more efficiently, without the need to actually invoke a sort method on the array. A method should be implemented in line with the `Min` and `Max` extension methods to accomplish this. The API should be a simple as: ``` C# WriteLine(a.NthSmallestElement(3)) // should print 300 WriteLine(a.NthSmallestElement(1)) // should print 100 WriteLine(a.NthSmallestElement(a.Length)) // should print 400 ``` The method name may differ based on further discussion. I chose the name based on C++ references that I had seen earlier. 1343 area-Serialization Add serialization support for XmlDocument and XmlElement in XmlSerializer Add back the code that was removed when moving serialization to .NET Core. Issue #1256. 1346 area-System.Runtime Support for ICustomMarshaler Split from #1333 Recorded uses in (3rd party) libraries: - [LibGit2Sharp](https://github.com/libgit2/libgit2sharp/search?utf8=%E2%9C%93&q=ICustomMarshaler&type=Code) - Mono.Posix see #94 1347 area-Serialization Support for binary serialization Split from #1333 Turns out binary serialization is not really needed in my case as it's used only on exceptions, but it would still be nice to know whether it's coming back or whether it is depreciated. 1349 area-System.Reflection Dev/metadata Merge changes from master. 1351 area-Serialization Add serialization support for XmlDocument and XmlElement in XmlSerializer Add back the code that was removed when moving serialization to .NET Core. Issue #1256. 1355 area-System.IO Failure in System.IO.FileSystem.DriveInfo ``` Discovering: System.IO.FileSystem.DriveInfo.Tests Discovered: System.IO.FileSystem.DriveInfo.Tests Starting: System.IO.FileSystem.DriveInfo.Tests System.IO.FileSystem.DriveInfoTests.DriveInfoWindowsTests.TestVolumeLabel [FAIL] Assert.Throws() Failure Expected: typeof(System.UnauthorizedAccessException) Actual: typeof(System.IO.IOException): The request is not supported Stack Trace: e:\oss\corefx\src\System.IO.FileSystem.DriveInfo\src\System\IO\DriveInfo.Windows.cs(235,0): at System.IO.DriveInfo.set_VolumeLabel(String value) e:\oss\corefx\src\System.IO.FileSystem.DriveInfo\tests\DriveInfo.Windows.Tests.cs(180,0): at System.IO.FileSystem.DriveInfoTests.DriveInfoWindowsTests.<>c__DisplayClass20.b__18() Finished: System.IO.FileSystem.DriveInfo.Tests ``` I think this is consistent failure on my box (at least repeated few times) This happens for my DVD drive when there is no drive inside. @Priya91 seemed to also have checked it on her computer but she was unable to repro. When I use DriveInfo class on my DVD drive it is able to get the DriveType but trying to access VolumeLabel or DriveFormat (also for read) causes the same failure. 1360 area-System.Collections System.Collections.Specialized.Tests.GetItemObjTests.Test01 [FAIL] ``` System.Collections.Specialized.Tests.GetItemObjTests.Test01 [FAIL] Error, returned wrong item for uppercase key Stack Trace: d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Collections.Specialized\tests\HybridDictionary\GetItemObjTests.cs(328,0): at System.Collections.Specialized.Tests.GetItemObjTests.Test01() ``` I coudln't repro locally, probably some threading issue 1370 area-System.Diagnostics Provide an API for traversing/reasoning about async call stacks Any tool that shows exceptions today also shows the callstack. With the introduction of the async keyword (yield was the same I guess), it's becoming increasingly harder to show reasonable call stacks because of the async state machine. It would be nice if there was an API somewhere that could be used to clean up the async state machine and pretty print a call stack with readable method names (tools like reflector do this). Here's an example of a typical error page in an MVC 6 application: ![image](https://cloud.githubusercontent.com/assets/95136/7085404/4e19da18-df2b-11e4-8fa7-28a0799854f0.png) 1373 area-System.Linq enumerable.AsParallel().LongCount() can only count int.MaxValue elements "... as well as `enumerable.AsParallel().LongCount(x => true)` (I thought this override had a successful run, but it isn't now) The overflow is encountered at [PartitionedDataSource.cs, line 967](https://github.com/dotnet/corefx/blob/master/src/System.Linq.Parallel/src/System/Linq/Parallel/Partitioning/PartitionedDataSource.cs#L697). The problem is that these partitioned data sources all presume to only operate over `int.MaxValue` elements, and the rest of the file (and related infrastructure) depend on that. Some sort of re-architecting (rather than simply switching the key from `int` to `long`) is probably required. Repro test: ``` [Fact] // Extremely long-running public static void LongCount_LargeCount() { Assert.Equal(int.MaxValue + 1L, new OverlyLargeEnumerable().AsParallel().LongCount()); } private class OverlyLargeEnumerable : IEnumerable { public IEnumerator GetEnumerator() { return new OverlyLargeEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } private class OverlyLargeEnumerator : IEnumerator { private long _current = -1; public long Current { get { return _current; } } object IEnumerator.Current { get { return Current; } } public void Dispose() { _current = int.MaxValue; } public bool MoveNext() { // Adds one _after_ compare, so final value is int.MaxValue + 1 return _current++ < int.MaxValue; } public void Reset() { _current = -1; } } } ``` Vanilla LINQ is fine. This behavior is present on the current consumer release. (""You had one job! ONE! JOB!"") (side note - I'm a little surprised by how much slower this runs in parallel compared to doing it sequentially - by about 6 times, or ~120 seconds vs 20 seconds) " 1378 area-System.Collections Add IEnumerable> variants to Dictionary's .ctors We should consider adding constructors to `Dictionary` which allow building a Dictionary from an IEnumerable of KeyValueParis. ## Rationale and Usage Given an `IEnumerable>` there's no simple way to construct a dictionary, around it. Instead you have to do something like: ``` csharp var dict = new Dictionary(); foreach (KeyValuePair kvp in enum) { dict.Add(kvp.Key, kvp.Value); } ``` or ``` csharp var dict = enumerable.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); ``` `ConcurrentDictionary` already provides such .ctors. This is especially useful in the case where you want to make a copy of an `IReadOnlyDictionary` ## Proposed API ``` csharp public class Dictionary : ICollection, ICollection>, IDictionary, IDictionary, IEnumerable, IEnumerable>, IReadOnlyCollection>, IReadOnlyDictionary { // New .ctors public Dictionary(IEnumerable> enumerable); public Dictionary(IEnumerable> enumerable, IEqualityComparer comparer); // Existing .ctors public Dictionary(); public Dictionary(IDictionary dictionary); public Dictionary(IDictionary dictionary, IEqualityComparer comparer); public Dictionary(IEqualityComparer comparer); public Dictionary(int capacity); public Dictionary(int capacity, IEqualityComparer comparer); // Remaining members removed for brevity. } ``` See some additional discussion on this issue is at dotnet/coreclr#680 1389 area-System.Reflection Fixes a couple of bugs in debug handle enumerators 1414 area-System.Collections ImmutableList (and Builder) IList.Contains, IndexOf, Remove methods throw instead of return -1 given unexpected argument types A bit longer story http://blog.rthand.com/post/2015/04/10/A-hidden-bug-in-Windows-Stores-ComboBox.aspx Basically a Windows Store (8.1 and 10 at least) ComboBox first tries ComboBoxItem against its ItemsSource IList.IndexOf and if that gracefully fails (returns -1) then it tries with the actual type. This works with normal List because this guy returns -1 when an incompatible type is used, where ImmutableList throws an exception (doesn't do any check actually) and ComboBox doesn't understand that very well. To make it worse ComboBox doesn't perform this stunt immediately but only after a while (when one scrolles some of its items). Now, I'd say that this is ComboBox' fault but who knows. 1415 area-System.Linq Propose: new method Enumerable.IndexOf Hi, I would like to propose a new member for Enumerable class: ``` int IndexOf(IEnumerable source, T item, IEqualityComperer comparer) ``` It's useful to find the index of an item inside the source. Only `IList` has a similar method but it forces me to completely materialize all the source. The implementation can enumerate list or, if the original source type is `IList`, call the `IList.IndexOf` method. If the source type is an `Array` we can call `Array.IndexOf`. What do you think? 1440 area-Serialization Improve code coverage for data contract serializers Improve code coverage for DataContractSerializer and DataContractJsonSerializer 1441 area-Serialization Expose more details in serialization test failures Include expected and actual output when serialization tests fail and clean up tests to get rid of Console.WriteLine. 1443 area-System.Reflection Merge master 1450 area-System.Runtime Make TimeZoneInfo.AdjustmentRule.BaseUtcOffsetDelta public I would like to propose that `TimeZoneInfo.AdjustmentRule.BaseUtcOffsetDelta` be marked `public` instead of `internal`. This can be seen [here](https://github.com/dotnet/coreclr/blob/d46b09d4dfc8e25d7e61a9994f89720cf01b5086/src/mscorlib/src/System/TimeZoneInfo.cs#L3754). There are several reasons: - The `AdjustmentRule` class is loaded from registry information, loosely matching the `_REG_TZI_FORMAT` structure. (See [this article](http://blogs.msdn.com/b/bclteam/archive/2007/06/07/exploring-windows-time-zones-with-system-timezoneinfo-josh-free.aspx)). - The whole reason this property was added ([KB3012229](https://support.microsoft.com/en-us/kb/3012229)) is such that the data from the registry can be better reflected in this class. Specifically, the `_REG_TZI_FORMAT.Bias` value can change from year to year, so `AdjustmentRule.BasUtcOffsetDelta` was created to track the delta between the year-to-year bias and the default bias for the time zone. - There's no good reason (IMHO) to keep this internal. Doing so means that the full functionality of the `AdjustmentRule` class can really only be used when populated by the framework itself. It also makes understanding the way that the framework populates the class difficult, as all fields are exposed through public properties _except_ this one. - It creates problems for those trying to use it in other scenarios. See Example 2 in Jon Skeet's post [Backward Compatibility Pain](http://codeblog.jonskeet.uk/2015/03/02/backward-compatibility-pain/). Additionally, there needs to be some public way to create an `AdjustmentRule` that has a value for this property. Either the existing `CreateAdjustmentRule` factory method should be made public, or a parameter could be added to the existing constructor, or another constructor could be added. Thanks for your consideration. 1455 area-System.Reflection Merge branch 'master' of https://github.com/dotnet/corefx into dev/metadata 1464 area-System.Reflection Set genericParameterCount in MethodSignature This addresses issue #1463 1472 area-System.Reflection Merge branch 'master' of https://github.com/dotnet/corefx into dev/metadata 1474 area-Meta CoreFX Primer "I'm writing a [.NET Primer](https://github.com/dotnet/coreclr/pull/725) in the CoreCLR repo that has a strong bias to the runtime features. I'd like to start one that has a strong bias to the framework libraries. It makes sense for it to live in this repo. Naturally, there would be cross-linking between the two. - Good idea? - What should this primer be called? I don't want to call one "".NET Core Runtime Primer"" and then other "".NET Core Framework Primer"". The primer I'm working on right now is the primer for the fundamentals of .NET generally, in an ECMA 335 sense. It's intended to be equally meaningful for Mono. The CoreFX Primer, on the other hand, would be specific to this implementation, so we could reasonable call it the "".NET Core Framework Primer"". /cc @Petermarcu FYI: This topic would move the corefx primer: https://github.com/dotnet/coreclr/blob/dotnet-primer/Documentation/framework-libraries.md. " 1476 area-System.Text Regex constructor throws NullReferenceException and OutOfMemoryException "Following line of code throws NullReferenceException: Regex regex = new Regex(""(?(?i))""); And following line of code throws OutOfMemoryException: Regex regex = new Regex("" (?(?i))""); Both patterns are if constructs where expression ""?i"" contains quantifier following nothing. There seems to a problem with ""i"" letter or any other letter that is an inline character for a particular option (i, m, n, s, x). If you change ""i"" with ""a"" (not an inline character), ArgumentException is thrown as expected. Both patterns are invalid so according to the .NET documentation, both lines should throw ArgumentException. This behaviour is especially unpleasant in case of ""regex tester"" application (such as http://regexator.net) which tries to continually evaluate user input as regex pattern. This behaviour has been tested in .NET 4.0, 4.5 and 4.6, all with the same results. " 1477 area-Infrastructure Test infrastructure requirements and scenarios "Current updated proposal from @Chrisboh : **Requirements we need to satisfy** • Run a set of tests that all developers should run before checking in • Specify a set of tests to run from the command line • Be able to debug all test cases • Run with code coverage turned on • Only build what is required ## Proposal The key to this proposal starts at build time. We need to only build what we are going to run. This is important both for overall runtime as well running tests using .net native. In order to satisfy this we need to move our ability to filter up higher in the process. ## Building only What is Required The following include is where we find all of our test projects and add them to the list of items we would like to build. **File:** CoreFX\src\dirs.proj (line 8) `` We need to add a condition to this to only include items that match a supplied filter. This filter would contain the following items. **Filter List:** • InnerLoop • Functional • Partner • Customer #### InnerLoop This will contain everything we consider an Unit test today and until we complete the work to run our tests based on selectivity should be the minimum required set of tests that get run before accepting any PR. #### Functional (OuterLoop Ring 1) This category is made up of test cases that will test larger sections of the code and / or take longer to run. The tests in this category should also give us a quick high level check that there are no major issues with regards to basic performance, stress, or security. #### Partner (OuterLoop Ring 2) The goal of this category is to determine if we are ready for team Dogfooding. All performance and stress tests should be in this category as well as any compliance / security tests. #### Customer (OuterLoop Ring 3) The goal of this category is to determine if we are ready to release this for Partner Dogfooding. This will contain all scenario test cases and will have a manual component added as well. ## Defining Test Project In order for our filtering to work correctly we need to ensure that test project is setup correctly. The simple way to do this is to create a test project for each category in the Filter list. This would give us at most 4 test projects but it will be more typical to have around 2 projects as I could see unifying scenario, compliance, and security tests in a single location. In order to do this we will need to filter by test project name. We will follow the following naming conventions. `*..tests.dll` Example: `System.ObjectModel.InnerLoop.tests.dll` ## Xunit Attributes Now it is time to address what we are going to be doing about the Xunit attributes. First we will remove all attributes that can be replaced with the project filters. This will include things like InnerLoop, OuterLoop, Performance, and Stress. These attributes will not be used when deciding what binaries we should build and run. What this doesn't mean is that we will be removing all attributes entirely. We still need to keep and leverage certain attributes in order to give us the flexibility we need to further fine tune our runs. Here are some of the key attributes we will need to leave in place. #### Active Issue Attribute This attribute will be used to filter out failing test cases when running locally. When running our daily builds we should include these test cases and label them as failing with a known bug. #### Platform Specific Attribute This attribute will be used to filter out test cases that do not apply to the platform you are currently running on. There was some debate on whether we should promote this to the filter list or not. At this time we don’t feel there are enough test cases to warrant promoting this to the filter list. In the future if this becomes an issue we can revisit this. ## Command Line We will need to execute everything from the command line as well as be able to select everything we need. Doing so will be done via two properties. The first will be defining the test categories that you would like to include. This will be done with the following property. `/p:TestTypes=""InnerLoop;Functional""` The second property will be used to supply extra command line parameters to Xunit. This will simply be a pass-through from the msbuild command line onto Xunit and we will use the following property for that. `/p:AdditionalXunitArgs=""-notrait ActiveIssue""` Additionally if you do not specify the TestTypes property it should run all Developer test cases automatically. Also not specifying the AdditionalXunitArgs property should be default exclude any test with an Active Issue and regardless if the property is specified we should include the correct OS parameter. ## Debugging This will be the same as what we have today. In the future we should invest me making the Xunit.runner.VisualStudio work and this would simplify everything. " 1490 area-System.Linq Parallel.Linq.GroupBy not using first 'equal' key. Similar to `Distinct` ( #1330 ), `GroupBy` isn't choosing the 'first' or earliest identical element for a key. That is, given an ordered range `{0, ... 23}`and running `GroupBy(x => x, compareMod(4))`, I'm expecting the first (lowest, here) element that occurs in the source to be chosen as the key - `{0, 1, 2, 3}`. Instead, any element may be chosen as the key (although it looks like `0` is consistently being chosen for the first key... hmmm...) Reproduction code (may not always fail): ``` using System; using System.Collections.Generic; using System.Linq; using Xunit; namespace Test { public class Example { [Fact] public static void GroupByExample() { ParallelQuery original = ParallelEnumerable.Range(0, 24).AsOrdered(); int seen = 0; Assert.All(original.GroupBy(x => x, new ModularCongruenceComparer(4)), i => Assert.Equal(seen++, i.Key)); Assert.Equal(4, seen); } private class ModularCongruenceComparer : IEqualityComparer { private int _mod; public ModularCongruenceComparer(int mod) { _mod = Math.Max(1, mod); } private int leastPositiveResidue(int x) { return ((x % _mod) + _mod) % _mod; } public bool Equals(int x, int y) { return leastPositiveResidue(x) == leastPositiveResidue(y); } public int GetHashCode(int x) { return leastPositiveResidue(x).GetHashCode(); } public int GetHashCode(object obj) { return GetHashCode((int)obj); } } } } ``` 1491 area-System.Xml Some tests are failing when decimal separator is not a dot Some XML tests are failing if decimal separator is not a dot. Example repro: - Start->Run (WinKey + R) -> `intl.cpl` - Change format (no need to change locale) to `Ukrainian (Ukraine)` - `build /p:WithCategories=OuterLoop` Example error: ``` TestCase:WriteFullEndElement - ERROR: RECA Expected: -4582,24 Actual : -4582.24 elem.WriteValue(floatToUri) ``` 1498 area-System.Linq Unit tests for Enumerable.Where Following MarcinJuraszek's examples for Enumerable.Select, I added basically identical tests for Enumerable.Where. 1502 area-System.Collections [Proposal] Use B+-trees instead of AVL trees for Immutable Collections Currently the `Node` class used for `ImmutableList` includes 40 bytes of overhead per list element on X64, and 24 bytes of overhead on X86. This means the memory cost of using this data structure for an `ImmutableList` is 1000% on X64, and 600% on X86 (these figures represent the amount of memory used for storing non-data elements associated with the structure). I propose migrating to a B+-tree instead, using a fixed value for _b_ and declaring data values in the index and data pages directly (to avoid unnecessary memory overhead for arrays). The choice of _b_ primarily affects the following things: 1. The height of the tree. Shorter tree heights improve performance for random access lookups by improving memory locality for a majority of traversal operations. 2. The size of the pages. Mutations of immutable data structures require reconstructing pages leading back to the root. If the pages are large, mutations could become expensive. In addition to the above, B+-trees provide a substantial memory savings by removing the child pointers (the Left and Right pointers for AVL nodes) from the leaves. My initial calculations (which could be completely wrong) indicate that the average memory allocation required for a single mutation operation on a list of 100000 elements using the AVL structure is 775 bytes for X64 and 493 bytes for X86. The optimal value of _b_ for X64 in terms of mutation allocation overhead is _b_=8, which costs 476 bytes per operation on a list of the same size (39% reduction). For X86 this same value of _b_ costs 388 bytes per mutation (21% reduction, and _b_=6 would be optimal with 382 bytes). The overall storage overhead for _b_=8 drops a staggering amount down to 169% for X64 and 119% for X86 (counting the average page at 75% capacity, based on a merge at 50% and split at 100%). 1504 area-System.Collections Some Collections.NonGeneric tests have race conditions and ocassionally failing ( http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug_prtest/963/console ) ``` Xunit.Sdk.EqualException: Assert.Equal() Failure Γåô (pos 0) Expected: en-US Actual: cs-CZ Γåæ (pos 0) at Xunit.Assert.Equal(String expected, String actual, Boolean ignoreCase, Boolean ignoreLineEndingDifferences, Boolean ignoreWhiteSpaceDifferences) at Xunit.Assert.Equal(String expected, String actual) at Comparer_DefaultInvariant.runTest() in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Collections.NonGeneric\tests\Comparer\Comparer_DefaultInvariant.cs:line 52 Fail! iCountErrors==1 Comparer_DefaultInvariant.ExecuteComparer_DefaultInvariant [FAIL] Assert.True() Failure ``` The tests are setting: ``` csharp CultureInfo.DefaultThreadCurrentCulture = culture; CultureInfo.DefaultThreadCurrentUICulture = culture; ``` Which may fail when run on different threads. 1509 area-System.Numerics Poor hash function in .Net source The `CombineHashCodes` in `System.Numerics.HashCodeHelper` has a very high collision rate for uniformly distributed data! The method probably first appeared in `System.Web.Util.HashCodeCombiner` class and then used in `System.Array`, `System.Tuple` and dotnet/corefx. Here's an example: Assuming the `CombineHashCodes` method's implementation is: ``` C# internal static int CombineHashCodes(int h1, int h2) { return (((h1 << 5) + h1) ^ h2); } ``` 100K raw data results in more than 6K duplicate hash values, that is 6% of a uniformly distributed set: ``` C# var data = Enumerable.Range(0, 100000) .Select(t => new { Val1 = t, Val2 = 100000 + t }) .GroupBy(t => CombineHashCodes(t.Val1.GetHashCode(), t.Val2.GetHashCode())) .Where(t => t.Count() > 1) .Select(t => new { Hash = t.Key, Items = t.ToList() }) .ToList(); ``` I believe there are much better hash functions to use like the one Josh Bloch suggests in Effective Java, which results in no hash collision even for 1M records of data in example above: ``` C# internal static int CombineHashCodes(int h1, int h2) { return (17 * 31 + h1) * 31 + h2; } ``` 1511 area-Infrastructure Remove properties not relevant to code formatting from corefx.vssettings "Looks like we have a few properties that are unrelated to formatting in corefx.vssettings such as: ``` 0 2 ``` We should remove them so that only C# formatting settings are in that file. " 1512 area-System.Collections System.Collections.Immutable and APTCA/SecurityTransparentAttribute If possible please add one of attributes forcing assembly to be Security Transparent (AllowPartiallyTrustedCallersAttribute or SecurityTransparentAttribute). This will help using this library in some quite uncommon partial trust scenarios. 1513 area-System.Runtime Add String.Split overloads that take a single char and string separator It's extremely common to split a string based on a single `char` or `string` separator, yet `String.Split` only offers overloads that accept an array of separators. The `params char[] separator` overload is particularly insidious as the `params` usage often results in a large number of unnecessary `char[]` heap allocations, unbeknownst to the developer. ## Rationale and Usage [Stack Exchange ran into this](http://blog.marcgravell.com/2013/11/allocaction-allocation-allocation.html) (significant number of separator arrays in memory) and submitted a [pull request](https://aspnetwebstack.codeplex.com/SourceControl/network/forks/marcgravell/outputcachecleanup/contribution/7201) to ASP.NET MVC to cache `String.Split` separator arrays inside the ASP.NET MVC codebase. They ended up with the following: ``` c# namespace System.Web.Mvc { internal static class StringSplits { // note array contents not technically read-only; just... don't edit them! internal static readonly char[] Period = new[] { '.' }, Comma = new[] { ',' }; } } ``` With uses of `string.Split('.')` and `string.Split(',')` replaced with `string.Split(StringSplits.Period)` and `string.Split(StringSplits.Comma)` to avoid the `char[]` allocations. It'd be awesome if `String.Split` offered overloads that accepted a single separator to avoid this. ## Proposed API ``` c# public partial class String { // Proposed methods public string[] Split(char separator, StringSplitOptions options = StringSplitOptions.None); public string[] Split(char separator, int count, StringSplitOptions options = StringSplitOptions.None); public string[] Split(string separator, StringSplitOptions options = StringSplitOptions.None); public string[] Split(string separator, int count, StringSplitOptions options = StringSplitOptions.None); // Existing methods public string[] Split(params char[] separator); public string[] Split(char[] separator, int count); public string[] Split(char[] separator, StringSplitOptions options); public string[] Split(char[] separator, int count, StringSplitOptions options); public string[] Split(string[] separator, StringSplitOptions options); public string[] Split(string[] separator, int count, StringSplitOptions options); } ``` ## Notes We had wanted to add `public string[] Split(string separator)`, but this breaks source compatibility with uses of `Split(null)`, which is documented to split based on white space, because it makes the call ambiguous between `Split(char[])` and `Split(string)`. I won't go into it here as it's really a separate feature request, but it would also be worth considering new `Split` methods that return a `struct` collection of `StringSpan`/`StringSegment` structs (in lieu of internal runtime span/substring magic) to avoid the resulting `string[]` allocation (and substring allocations, unless needed). I'd be happy to contribute an implementation and tests. 1514 area-System.Runtime Add String.Format overloads to avoid unnecessary allocations "It's pretty common to pass value types to `String.Format`, unfortunately this results in unnecessary boxing allocations. ## Rationale Consider the following: ``` c# long id = ...; int index = ...; int length = ...; // Traditional call to String.Format string foo = string.Format(""{0}: Index = {1}, Length = {2}"", id, index, length); // Use of the string interpolation language feature string bar = $""{id}: Index = {index}, Length = {length}""; ``` Both the traditional call to `String.Format` and the use of the string interpolation language feature (which is just syntactic sugar for `String.Format`) requires 3 boxing allocations. ## Proposed API ``` c# namespace System { public sealed class String : ... { // Proposed methods public static string Format(string format, T0 arg0); public static string Format(string format, T0 arg0, T1 arg1); public static string Format(string format, T0 arg0, T1 arg1, T2 arg2); public static string Format(IFormatProvider provider, string format, T0 arg0); public static string Format(IFormatProvider provider, string format, T0 arg0, T1 arg1); public static string Format(IFormatProvider provider, string format, T0 arg0, T1 arg1, T2 arg2); // Existing methods public static string Format(string format, object arg0); public static string Format(string format, object arg0, object arg1); public static string Format(string format, object arg0, object arg1, object arg2); public static string Format(string format, params object[] args); public static string Format(IFormatProvider provider, string format, object arg0); public static string Format(IFormatProvider provider, string format, object arg0, object arg1); public static string Format(IFormatProvider provider, string format, object arg0, object arg1, object arg2); public static string Format(IFormatProvider provider, string format, params object[] args); ... } } namespace System.Text { public sealed class StringBuilder { // Proposed methods public StringBuilder AppendFormat(string format, T0 arg0); public StringBuilder AppendFormat(string format, T0 arg0, T1 arg1); public StringBuilder AppendFormat(string format, T0 arg0, T1 arg1, T2 arg2); public StringBuilder AppendFormat(IFormatProvider provider, string format, T0 arg0); public StringBuilder AppendFormat(IFormatProvider provider, string format, T0 arg0, T1 arg1); public StringBuilder AppendFormat(IFormatProvider provider, string format, T0 arg0, T1 arg1, T2 arg2); // Existing methods public StringBuilder AppendFormat(string format, object arg0); public StringBuilder AppendFormat(string format, object arg0, object arg1); public StringBuilder AppendFormat(string format, object arg0, object arg1, object arg2); public StringBuilder AppendFormat(string format, params object[] args); public StringBuilder AppendFormat(IFormatProvider provider, string format, object arg0); public StringBuilder AppendFormat(IFormatProvider provider, string format, object arg0, object arg1); public StringBuilder AppendFormat(IFormatProvider provider, string format, object arg0, object arg1, object arg2); public StringBuilder AppendFormat(IFormatProvider provider, string format, params object[] args); ... } } namespace System.Runtime.CompilerServices { public static class FormattableStringFactory { // Proposed methods public static FormattableString Create(string format, T0 argument0); public static FormattableString Create(string format, T0 argument0, T1 argument1); public static FormattableString Create(string format, T0 argument0, T1 argument1, T2 argument2); // Existing method public static FormattableString Create(string format, params object[] arguments); } } ``` I'd be happy to contribute an implementation and tests. " 1533 area-System.IO FileStream constructor should allow bufferSize = 0 to indicate non-buffered stream FileStream.Init will throw ArgumentOutOfRangeException if (bufferSize <-0), IMHO it should allow bufferSize = 0 value, indicating this FileStream object nerver uses buffer on this level, provides more flexibility and control for app developer, current workaround is set bufferSize to 1, which is ugly. 1534 area-System.Collections Should FEATURE_RANDOMIZED_STRING_HASHING be set in corefx For collection types in coreclr, we use randomized string hashing above a threshold. This is guarded with the feature define FEATURE_RANDOMIZED_STRING_HASHING. If we use the same behavior in corefx for types including HashSet and HashTable, we need to port its supporting code. 1538 area-System.Diagnostics Fix the System.Diagnostics.Process tests on OS X Some System.Diagnostics.Process tests are failing on OS X; root cause the failures and fix whatever is breaking 1543 area-System.Reflection Fix decoding of multi-mod types in signatures Address issue #1535 by updating the metadata reader's signature decoder to correctly decode types with multiple modifiers. 1546 area-Serialization Fix security exception with private serialization event methods in DCJS "Fix security exception in the deserialization scenario of type with serialization event method marked as private, such as: ``` csharp [DataContract] public class Data { [OnDeserialized] private void OnDeserialized(StreamingContext context) { } [DataMember] public int Property1 { get; set; } } … string json = ""{\""Property1\"":1}""; DataContractJsonSerializer s = new DataContractJsonSerializer(typeof(Data)); Data obj = s.ReadObject(new MemoryStream(Encoding.UTF8.GetBytes(json))) as Data; //Crashes ``` Actual behavior: SecurityException: The data contract type 'DataContractInternalRepro.Data' cannot be deserialized because the OnDeserialized method 'OnDeserialized' is not public. Making the method public will fix this error. Expected behavior: no exception This scenario is working in DCS. It looks like the exception in DCJS is thrown at the wrong place. " 1552 area-System.Reflection Merge 1561 area-System.Linq LINQ's Buffer ctor requires Count/CopyTo results be consistent "LINQ's internal Buffer, which is used in operations like ToArray, OrderBy, Reverse, etc., assumes that if the input `IEnumerable` implements `ICollection`, then CopyTo will be guaranteed to copy the number of items returned previously by Count: https://github.com/dotnet/corefx/blob/master/src/System.Linq/src/System/Linq/Enumerable.cs#L3087-L3093 ``` C# int count = 0; ICollection collection = source as ICollection; if (collection != null) { count = collection.Count; if (count > 0) { items = new TElement[count]; collection.CopyTo(items, 0); } } else { foreach (TElement item in source) { if (items == null) { items = new TElement[4]; } else if (items.Length == count) { TElement[] newItems = ArrayT.Resize(items, checked(count * 2), count); items = newItems; } items[count] = item; count++; } } ``` This is problematic for any collection that fails this guarantee, e.g. by design the concurrent collections (`ConcurrentQueue`, `ConcurrentDictionary`, etc.) may have their number of elements change between the call to Count and CopyTo if elements were added or removed concurrently. We could address this in the implementation of Buffer by avoiding the use of CopyTo, e.g. ``` C# int count = 4; ICollection collection = source as ICollection; if (collection != null) { int tmpCount = collection.Count; if (tmpCount > 0) count = tmpCount; } foreach (TElement item in source) { if (items == null) { items = new TElement[count]; } else if (items.Length == count) { TElement[] newItems = ArrayT.Resize(items, checked(count * 2), count); items = newItems; } items[count] = item; count++; } ``` This turns Count into an estimate rather than a guarantee, avoiding the problem. However, it has the downside of having a (potentially) less efficient copy mechanism for other `ICollection` implementations, including an `IEnumerator` allocation used in the foreach. That said, it's not clear to me how often we hit the ""fast"" CopyTo path anyway; many collection types have their own ToArray method, so if the LINQ method is being used, it's likely because there are other LINQ operators in the middle, e.g. `collection.Where(...).Select(...).ToArray()`, in which case the optimization will not apply. A few possible options: 1. We say that concurrent collections may not be used concurrently with LINQ operations. Developers may of course already be doing this, and since you can pass concurrent collections around as `IEnumerable`, the developer may not even know they're using concurrent collections but may silently either get corrupted data (e.g. the count drops after allocating the array, leaving default elements at the end of the array) or exceptions (e.g. CopyTo tries to copy more elements than the array can hold). 2. We make the above change, such that we no longer require the Count == CopyTo size guarantee, potentially special casing some known types like `List`, `Collection`, etc. and some known other situations, e.g. IsReadOnly returning true. 3. We special-case the known-problematic cases in the framework, namely the Concurrent\* collections, and do the second option above just for those. We could add a marker interface or something to more easily identify them, which would also allow other collections to opt-out of such things as well. 4. ""something really cool that I don't even know about"" Thoughts? " 1563 area-System.Drawing .NET core should have primitive drawing types Issue: #1363 Based on the analysis done by Experience and Insights, primitive drawing types are commonly used even outside Image processing scenarios. The following types are to be considered: - Point - Rectangle - Size From the discussion, it is clear we need int and float based versions of the primitives, we decided to expose the already existing System.Drawing primitives as is, that is, Point, PointF, Size, SizeF, Rectangle and RectangleF to .NET Core. We are not exposing Color at the moment because we feel the existing Color type in System.Drawing is insufficient as specified in the below conversations. Once the existing types are exposed, we will start a separate discussion on crafting Color primitive for .NET Core. **Contract** System.Drawing.Primitives **API Proposal** ``` csharp namespace System.Drawing { public struct Point { public static readonly Point Empty; public Point(Size sz); public Point(int dw); public Point(int x, int y); public bool IsEmpty { get; } public int X { get; set; } public int Y { get; set; } public static Point Add(Point pt, Size sz); public static Point Ceiling(PointF value); public override bool Equals(object obj); public override int GetHashCode(); public void Offset(Point p); public void Offset(int dx, int dy); public static Point operator +(Point pt, Size sz); public static bool operator ==(Point left, Point right); public static explicit operator Size (Point p); public static implicit operator PointF (Point p); public static bool operator !=(Point left, Point right); public static Point operator -(Point pt, Size sz); public static Point Round(PointF value); public static Point Subtract(Point pt, Size sz); public override string ToString(); public static Point Truncate(PointF value); } public struct PointF { public static readonly PointF Empty; public PointF(float x, float y); public bool IsEmpty { get; } public float X { get; set; } public float Y { get; set; } public static PointF Add(PointF pt, Size sz); public static PointF Add(PointF pt, SizeF sz); public override bool Equals(object obj); public override int GetHashCode(); public static PointF operator +(PointF pt, Size sz); public static PointF operator +(PointF pt, SizeF sz); public static bool operator ==(PointF left, PointF right); public static bool operator !=(PointF left, PointF right); public static PointF operator -(PointF pt, Size sz); public static PointF operator -(PointF pt, SizeF sz); public static PointF Subtract(PointF pt, Size sz); public static PointF Subtract(PointF pt, SizeF sz); public override string ToString(); } public struct Rectangle { public static readonly Rectangle Empty; public Rectangle(Point location, Size size); public Rectangle(int x, int y, int width, int height); public int Bottom { get; } public int Height { get; set; } public bool IsEmpty { get; } public int Left { get; } public Point Location { get; set; } public int Right { get; } public Size Size { get; set; } public int Top { get; } public int Width { get; set; } public int X { get; set; } public int Y { get; set; } public static Rectangle Ceiling(RectangleF value); public bool Contains(Point pt); public bool Contains(Rectangle rect); public bool Contains(int x, int y); public override bool Equals(object obj); public static Rectangle FromLTRB(int left, int top, int right, int bottom); public override int GetHashCode(); public static Rectangle Inflate(Rectangle rect, int x, int y); public void Inflate(Size size); public void Inflate(int width, int height); public void Intersect(Rectangle rect); public static Rectangle Intersect(Rectangle a, Rectangle b); public bool IntersectsWith(Rectangle rect); public void Offset(Point pos); public void Offset(int x, int y); public static bool operator ==(Rectangle left, Rectangle right); public static bool operator !=(Rectangle left, Rectangle right); public static Rectangle Round(RectangleF value); public override string ToString(); public static Rectangle Truncate(RectangleF value); public static Rectangle Union(Rectangle a, Rectangle b); } public struct RectangleF { public static readonly RectangleF Empty; public RectangleF(PointF location, SizeF size); public RectangleF(float x, float y, float width, float height); public float Bottom { get; } public float Height { get; set; } public bool IsEmpty { get; } public float Left { get; } public PointF Location { get; set; } public float Right { get; } public SizeF Size { get; set; } public float Top { get; } public float Width { get; set; } public float X { get; set; } public float Y { get; set; } public bool Contains(PointF pt); public bool Contains(RectangleF rect); public bool Contains(float x, float y); public override bool Equals(object obj); public static RectangleF FromLTRB(float left, float top, float right, float bottom); public override int GetHashCode(); public static RectangleF Inflate(RectangleF rect, float x, float y); public void Inflate(SizeF size); public void Inflate(float x, float y); public void Intersect(RectangleF rect); public static RectangleF Intersect(RectangleF a, RectangleF b); public bool IntersectsWith(RectangleF rect); public void Offset(PointF pos); public void Offset(float x, float y); public static bool operator ==(RectangleF left, RectangleF right); public static implicit operator RectangleF (Rectangle r); public static bool operator !=(RectangleF left, RectangleF right); public override string ToString(); public static RectangleF Union(RectangleF a, RectangleF b); } public struct Size { public static readonly Size Empty; public Size(Point pt); public Size(int width, int height); public int Height { get; set; } public bool IsEmpty { get; } public int Width { get; set; } public static Size Add(Size sz1, Size sz2); public static Size Ceiling(SizeF value); public override bool Equals(object obj); public override int GetHashCode(); public static Size operator +(Size sz1, Size sz2); public static bool operator ==(Size sz1, Size sz2); public static explicit operator Point (Size size); public static implicit operator SizeF (Size p); public static bool operator !=(Size sz1, Size sz2); public static Size operator -(Size sz1, Size sz2); public static Size Round(SizeF value); public static Size Subtract(Size sz1, Size sz2); public override string ToString(); public static Size Truncate(SizeF value); } public struct SizeF { public static readonly SizeF Empty; public SizeF(PointF pt); public SizeF(SizeF size); public SizeF(float width, float height); public float Height { get; set; } public bool IsEmpty { get; } public float Width { get; set; } public static SizeF Add(SizeF sz1, SizeF sz2); public override bool Equals(object obj); public override int GetHashCode(); public static SizeF operator +(SizeF sz1, SizeF sz2); public static bool operator ==(SizeF sz1, SizeF sz2); public static explicit operator PointF (SizeF size); public static bool operator !=(SizeF sz1, SizeF sz2); public static SizeF operator -(SizeF sz1, SizeF sz2); public static SizeF Subtract(SizeF sz1, SizeF sz2); public PointF ToPointF(); public Size ToSize(); public override string ToString(); } } ``` 1565 area-System.Runtime System.String should be consistent with taking StringComparison arguments Every method on `System.String` that compares strings should take a `StringComparison` argument. An example where that's not the case is, `String.Contains`. We should to a holistic pass to make sure we don't miss others. 1571 area-System.IO Add TextWriter.Write(string value, int index, int count) overload TextWriter has an overload for writing a segment of a char array with this Write overload: void Write(char[] buffer, int index, int count) But TextWriter doesn't have an overload for writing a segment of a string, e.g.: void Write(string value, int index, int count) This means that in cases where you have a segment of a string that you want to write you either need to either substring and pass that value to Write(string) or copy the string to a char array and then use the char array segement overload. It would be a new virtual method but the default implementation could simply call the current Write(char[] buffer, int index, int count) overload. The main problem I see with adding Write(string, int, int) is there is a Write(string, object, object) overload that does string formatting that would be hidden. Avoid with different name? Example of having to having to use the Write(char[] buffer, int index, int count) overload where a string overload would simplify code and improve performance: https://github.com/JamesNK/Newtonsoft.Json/blob/6a22345e28006d74c25e353b6235bc5222bab821/Src/Newtonsoft.Json/Utilities/JavaScriptUtils.cs#L220-L228 1577 area-System.Net HttpPrefixes So http prefixes ... Its an IIS specific API that makes zero sense when IIS is no longer present. I know this code hasn't come over yet code wise but I figured I would create an issue for it for discussion about what may happen. As an example I want to: Bind to 192.168.1.101 : 1111 Allow an elastic ip with a round robin dns to be used. In mono as example this will cause it to bind *:1111 and allow which is totally not what I wanted, there is no good way in the current api of actually specifying. I can specify 192.168.1.101:1111/ just fine. What happens when I as well specify myroundrobindns:1111/? Do I mean that I want to allow this host header or to bind to this interface? This is where the problem starts.... What if I only specified the myroundrobindns:1111? Then it would make sense to bind all or give me an error (without IIS). But this behaviour makes it impossible to do the above (common use case). There are literally dozens of derpy little gotchas like this (and no good way of working around them) due to how the api is laid out and not wanting to break compatibility with msclr. Whats the plan for CoreFX? Thoughts? Greg 1582 area-Infrastructure XML test libs included in coverage report I looked at the coverage report and noticed that a bunch of XML test libs are included: ![image](https://cloud.githubusercontent.com/assets/1376924/7392228/d392bf42-ee86-11e4-8254-db6d5ee5e20f.png) Those are dragging the overall coverage down and should be excluded from coverage. /cc @krwq 1583 area-System.Runtime Add generic overloads to Math.Min and Math.Max There are overloads of `Math.Min` and `Math.Max` for all the numeric types, but there aren't any for general comparable types (including framework types like `DateTime` and `TimeSpan`). It would be nice to have them. ## Rationale For integral types, `Math.Min` and `Math.Max` are not necessary, e.g. instead of `Math.Min(a, b)`, you can write `a <= b ? a : b`. But they are nice, because they make the meaning clear and decrease the likelihood of error. The same argument applies to general comparable types, so they should work with `Math.Min` and `Math.Max` too. ## Proposed API ``` c# public static class Math { public static T Min(T val1, T val2) where T : IComparable; public static T Min(T val1, T val2, IComparer comparer); public static T Max(T val1, T val2) where T : IComparable; public static T Max(T val1, T val2, IComparer comparer); } ``` ## Open questions - Should the constraint `where T : IComparable` be there? Other framework methods that require comparison, like `Enumerable.OrderBy`, don't have it and instead use `Comparer.Default`. - Should nullable value types be supported? The proposed version doesn't, because `T?` does not implement `IComparable`, even when `T` does implement `IComparable`. 1586 area-System.Net Initial open sourcing of System.Net.Http code. 1591 area-System.Reflection System.Reflection.Metadata.MetadataReader.MetadataReader consistently throws InvalidOperationException in store app I'm able to use System.Reflection.Metadata without any problems in my .NET 4.5.1 desktop app, but I'm unable to successfully use it in a Windows Store app--I consistently see this exception getting thrown: ``` System.InvalidOperationException occurred Message: Exception thrown: 'System.InvalidOperationException' in mscorlib.ni.dll Additional information: The API 'System.Text.Encoding.GetString(Byte*, Int32)' cannot be used on the current platform. See http://go.microsoft.com/fwlink/?LinkId=248273 for more information. ``` ...with this call stack: ``` mscorlib.ni.dll!System.Delegate.CreateDelegateInternal(System.RuntimeType rtType, System.Reflection.RuntimeMethodInfo rtMethod, object firstArgument, System.DelegateBindingFlags flags, ref System.Threading.StackCrawlMark stackMark) Unknown mscorlib.ni.dll!System.Reflection.RuntimeMethodInfo.CreateDelegateInternal(System.Type delegateType, object firstArgument, System.DelegateBindingFlags bindingFlags, ref System.Threading.StackCrawlMark stackMark) Unknown mscorlib.ni.dll!System.Reflection.RuntimeMethodInfo.CreateDelegate(System.Type delegateType, object target) Unknown > System.Reflection.Metadata.dll!System.Reflection.Internal.EncodingHelper.LoadGetStringPlatform() Unknown System.Reflection.Metadata.dll!System.Reflection.Internal.EncodingHelper.EncodingHelper() Unknown [Native to Managed Transition] [Managed to Native Transition] System.Reflection.Metadata.dll!System.Reflection.Internal.EncodingHelper.GetString(System.Text.Encoding encoding, byte* bytes, int byteCount) Unknown System.Reflection.Metadata.dll!System.Reflection.Metadata.MetadataStringDecoder.GetString(byte* bytes, int byteCount) Unknown System.Reflection.Metadata.dll!System.Reflection.Metadata.MetadataReader.ReadMetadataHeader(ref System.Reflection.Metadata.BlobReader memReader) Unknown System.Reflection.Metadata.dll!System.Reflection.Metadata.MetadataReader.MetadataReader(byte* metadata, int length, System.Reflection.Metadata.MetadataReaderOptions options, System.Reflection.Metadata.MetadataStringDecoder utf8Decoder) Unknown System.Reflection.Metadata.dll!System.Reflection.Metadata.PEReaderExtensions.GetMetadataReader(System.Reflection.PortableExecutable.PEReader peReader, System.Reflection.Metadata.MetadataReaderOptions options, System.Reflection.Metadata.MetadataStringDecoder utf8Decoder) Unknown ``` I see that the current implementation of `LoadGetStringPlatform` looks for `MemberAccessException`s as indication that some sort of platform-specific fallback is required; could it be that it needs to catch other exception types as well (i.e. `InvalidOperationException`)? 1593 area-System.Xml XPathNodeIterator should implement IEnumerable Currently XPathNodeIterator implements only IEnumerable interface. XPathNodeIterator always iterates over objects of type XPathNavigator and thus every usage ends up with casting back and forth XPathNavigator --> object --> XPathNavigator in a loop. Implementing IEnumerable on this type would allow to avoid this indirection and in cases where iterating is useful improve perf. cc: @tmat EDIT 2017/12/28: In PR: https://github.com/dotnet/corefx/pull/26083 Requested API changes: ```diff namespace System.Xml.XPath { ... - public abstract class XPathNodeIterator : ICloneable, IEnumerable + public abstract class XPathNodeIterator : ICloneable, IEnumerable ... ``` 1595 area-System.Xml Add XmlReader.ResetState to enable pooling (modified copy of internal bug / cc: @tmat) The XmlReader allocates char[] and byte[] buffers in its ParseState. XmlReader created via XmlReader.Create doesn't expose ResetState method that would allow pooling. XmlTextReader does, however the class is legacy and not available on new platforms (in portable profile). Or in simple words: put multiple xml files in one stream and try to parse it without creating multiple XmlReader instances which do a lot of allocations. Simple scenario is reading xml doc comments by Roslyn 1596 area-System.Globalization Randomized Hashing APIs Proposal is to add APIs which expose old hashing methods and the new one (old ones are non randomized). Background: On some platforms default is to use randomized hashing and on some it is non randomized. Exposing APIs allows devs to make it explicit so in case we want to always use randomized hashing for security reasons we can do it or if we want the hashing to be faster we can use non randomized. (Some work might need to be done in dotnet/coreclr) This was already reviewed internally once although here is another iteration. Proposal is to add following APIs ``` csharp //assembly System.Globalization { namespace System.Globalization { public class CompareInfo { public virtual int GetHashCode(string source, CompareOptions options, HashingOption hashingOption); } // enum numbers should be explicit in the final version public enum HashingOption { //Default, ??? NonRandomized, Randomized, } } //} //assembly System.Globalization.Extensions { namespace System.Globalization { public static class GlobalizationExtensions { public static StringComparer GetStringComparer(this CompareInfo compareInfo, CompareOptions options, HashingOption hashingOption); } } //} //assembly System.Runtime.Extensions { namespace System { public abstract class StringComparer : IComparer, IComparer, IEqualityComparer, IEqualityComparer { public static StringComparer OrdinalNonRandomized { get; } public static StringComparer OrdinalIgnoreCaseNonRandomized { get; } public static StringComparer OrdinalRandomized { get; } public static StringComparer OrdinalIgnoreCaseRandomized { get; } } } //} ``` 1597 area-Infrastructure Running CoreFx tests from VS is broken I’m using TestDriven.NET. 1) Right-click on a test method and selecting “Run Test” works well for System.Reflection.Metadata tests. Good. 2) Right-click on a test class or a test file reports an error in output: The target type doesn't contain tests from a known test framework or a 'Main' method. 3) Right-click on a test method and selecting “Test with … Debugger” freezes VS. Test Explorer doesn’t show any tests even after full solution build. Trying to set the test project as a startup project and F5 it. Error: “The working directory does not exist: 'C:\FX0\bin\tests\Windows_NT.AnyCPU.Debug\System.Reflection.Metadata.Tests\dnxcore50'.” Seems like building the entire CoreFx repo fixes this issue (although I’m not quite sure). In any case I don’t want to build the entire repo to run a single test. Couldn’t get F5 work from Dev12 VS, yet the project is Dev12 VS. With Dev14 I was able to debug the test. 1598 area-Meta Improve layout of bin\tests directory Building and running all CoreFx tests creates bin\tests directory with an insane amount of files (14493 files of total size 1.4GB). The problem is that every CoreFx library deploys its own copy of DNX and XUnit (175 files) to its test directory. Instead all tests should be deployed into a single directory with a single copy of DNX. 1603 area-Meta Add inner and outer loop testing explanation to Developer Guide 1605 area-System.Numerics Add Conversions methods to Vector It would be useful to support conversions between different types of Vector. The API and usage model is pretty straightforward for same-size types, e.g. Double and Int64, so I would suggest that we start by exposing that, and consider mixed-size converts as usage demands (we have had customer requests for at least the same-size convert). A possible instance method on Vector might look like this: public Vector ToVectorDouble(); and it would throw arg exception for non-64-bit vectors (or, alternatively, it could be defined as an extension method on the static Vector class for only those instantiations that are supported). I propose the following: - `Vector <=> Vector` - `Vector <=> Vector` - `Vector <=> Vector` - `Vector <=> Vector` 1608 area-System.Numerics Add Gather methods for Vector Vector Gathers are a commonly used paradigm in vector computation - where a gather involves constructing a vector from non-contiguous elements of a source array. Gather is supported on AVX2, but even on targets that do not directly support it, such a method would be useful, in order to avoid the overhead of having to use an array to hold the elements prior to contructing the Vector. VectorGather should perhaps be declared on the static Vector class, something like: `public static Vector VectorGather(T[] source, Vector indexVector) where T,U : struct` Initially, I think it would be reasonable to support only same/size convert and gather – but eventually we may want to consider mixed size (e.g. a gather to a Vector using the lower values of a Vector. AVX2 has a pretty rich mixture of these. @mellinoe what do you think? 1609 area-System.Diagnostics System.Diagnostics.Debug.Tests does not build on Linux System.Diagnostics.Debug.Tests currently fails trying to resolve types against System.Runtime. It is disabled in dir.props. 1611 area-System.Net HttpResponseHeader should have a Cookies property Hello, The HttpResponseHeader class (found at https://github.com/dotnet/corefx/blob/master/src/System.Net.Http/src/System/Net/Headers/HttpResponseHeaders.cs ) doesn't seem to include a standard and pretty trivial header, the Cookies header. Furthermore, as suggested by http://www.asp.net/web-api/overview/advanced/http-cookies, we should use the HttpResponseHeadersExtensions, found at https://aspnetwebstack.codeplex.com/SourceControl/latest#src/System.Net.Http.Formatting/HttpResponseHeadersExtensions.cs , however, as you can see in the code (and in the CookieHeaderValue class) - there's no way to configure default values, e.g. HttpOnly or Secured. In a regular ASP.NET website we can set the default values in web.config, but since ASP.NET WebAPI doesn't rely on that, there's no way, even in the WebAPI configuration registering method to set such values. Part from creating my own extension to add cookies with default values, I would suggest adding support for cookies in the HttpResponseHeaders class and having the option to set default values in registration time. Thank you very much. 1612 area-System.Data System.Data.SqlClient.SqlParameter Precision and Scale do not work via the abstract API "Package from dnxcore50 via ``` ""System.Data.SqlClient"": ""4.0.0-beta-*"", ``` This works: ``` SqlParameter p = ... p.Precision = 10; p.Scale = 5; ``` However, if instead we use the abstract base class (like most tools will be): ``` SqlParameter p = ... DbParameter d = p; d.Precision = 10; d.Scale = 5; ``` then all of `p.Precision`, `p.Scale`, `d.Precision`, `d.Scale` **remain at 0**, and consequently do not work correctly. The abstract API's `Scale` and `Precision` (and any other associated members) should mirror the concrete type's equivalent. This code is not in corefx yet, so I cannot fix it :( " 1613 area-System.Data System.Data.SqlClient does not allow enum parameters values (it does in .NET) "Is this an expected break? For example: ``` using (var cmd = connection.CreateCommand()) { cmd.CommandText = ""select @foo""; cmd.Parameters.AddWithValue(""@foo"", AnEnum.B); object value = cmd.ExecuteScalar(); AnEnum val = (AnEnum)value; // cheeky unbox behavior val.IsEqualTo(AnEnum.B); } enum AnEnum { A = 2, B = 1 } ``` In .NET this works fine; in CoreCLR this breaks on the `ExecuteScalar()` call, reporting an `ArgumentException` with text: > No mapping exists from object type AnEnum to a known managed provider native type. " 1616 area-System.Numerics bug: Vector extracting components with a literal leads to incorrect code gen. It appears that if you try to retrieve components of a `Vector` with a constant something wrong is occurring and an incorrect code is generated. This does not happen when extracting to an array, or when you use a variable (like say through a for-loop). This only happens when you extract literal components. Here is a simple reproduction. This happened in VS2015 RC ``` csharp static bool TestLiterals(Vector vl) { var v = vl[0]; var v1 = vl[1]; var v2 = vl[2]; var v3 = vl[3]; return v != 0 || v1 != 0 || v2 != 0 || v3 != 0; } static bool TestLoop(Vector vl) { for(int i=0; i < Vector.Count; i++) { var v = vl[i]; if (v != 0) return true; } return false; } static void Main(string[] args) { var array = new long[4] { 0, 0, 0, 1 }; var vector = new Vector(array); Console.WriteLine(Vector.Count); Console.WriteLine(TestLiterals(vector)); Console.WriteLine(TestLoop(vector)); } ``` On my i5 broadwell chip it printed: ``` 4 False True ``` This is very much the wrong result. The correct answer should be: ``` 4 True True ``` It's pretty easy to see that both methods should yield the same result. Here is the assembly of the `testliteral` And the error becomes obvious. ``` **00007FFB1E086E20 vmovupd ymm0,ymmword ptr [rcx] 00007FFB1E086E25 vmovd rax,xmm0 ** **00007FFB1E086E2A vmovupd ymm0,ymmword ptr [rcx] 00007FFB1E086E2F vmovaps ymm1,ymm0 00007FFB1E086E34 vpsrldq ymm1,ymm1,8 00007FFB1E086E3A vmovd rdx,xmm1 ** 00007FFB1E086E3F vmovupd ymm0,ymmword ptr [rcx] 00007FFB1E086E44 vmovaps ymm1,ymm0 00007FFB1E086E49 vpsrldq ymm1,ymm1,10h 00007FFB1E086E4F vmovd r8,xmm1 00007FFB1E086E54 vmovupd ymm0,ymmword ptr [rcx] 00007FFB1E086E59 vmovaps ymm1,ymm0 00007FFB1E086E5E vpsrldq ymm1,ymm1,18h 00007FFB1E086E64 vmovd rcx,xmm1 00007FFB1E086E69 or rax,rdx 00007FFB1E086E6C or rax,r8 00007FFB1E086E6F test rax,rax 00007FFB1E086E72 jne 00007FFB1E086E7E ``` The input vector is in `ymm0` and it is using `ymm1` as its scratch buffer, first copying and then shifting the register by the offset but is trying to pull the component out of `xmm1`! It appears that the compiler while having some concept of AVX registers, is still confused. 1617 area-System.Numerics Vector should allow variable length based size of available registers. Currently, it seems that `Vector` will always be the size of the largest available register, and has no support for using a smaller register. E.g. if you have AVX2, you currently can only build `Vector` of 256bit. For some algorithms it can be very useful to be able to use either a vector of size 16 or a vector of size 32. 1622 area-Infrastructure Consider open sourcing ApiCompat. Internally we have some tooling to ensure that implementation assemblies are compatible with contracts. It would be a good idea to open source that and use it as part of the build or CI system or something. I'm not sure if this will happen naturally when we actually start generating contracts in the open or if we'll need to take extra steps. 1624 area-System.Net An simple way to mock an httpClient.GetAsync(..) method for unit tests? `System.Net.Http` has now been uploaded to the repo :smile: :tada: :balloon: Whenever I've used this in some service, it works great but makes it hard to unit test => my unit tests don't want to actually ever hit that real end point. Ages ago, I asked @davidfowl what should we do? I hoping I paraphrase and don't misquote him - but he suggested that I need to fake up a message handler (ie. `HttpClientHandler`), wire that up, etc. As such, I ended up making a helper library called [HttpClient.Helpers](https://github.com/PureKrome/HttpClient.Helpers) to help me run my unit tests. So this works ... but it feels _very_ messy and .. complicated. I'm sure I'm not the first person that needs to make sure my unit tests don't do a real call to an external service. Is there an easier way? Like .. can't we just have an `IHttpClient` interface and we can inject that into our service? 1625 area-System.Runtime "[public api] System.Runtime.Environment - OSName(""FreeBSD"") or OSName(""BSD"")" "This issue is to discuss what the final identifier will be within the entire public API surface and what will be the build target identifier that msbuild will use. https://github.com/dotnet/corefx/issues/1576 started the discussion of wether to use `OSName(""FreeBSD"")` vs `OSName(""BSD"")` in the unit tests and is recommended reading before progressing with reading this issue. `FreeBSD` won but it can be easily refactored due to being a non-public contract. The BSD's (FreeBSD/NetBSD/OpenBSD/DragonFlyBSD) unlike Linux all have different kernels so potentially it might be required to split them out as separate platforms. This might be completely unnecessary whereby the additional BSD's may just work as a direct result of the port team's efforts. There are enough differences between the different BSDs that it could be needed to differentiate between them however. We have some time before a decision needs to be cemented in as there is a more pressing issue as mentioned by @stephentoub and registered as issue #1626 > There's what's likely a more pressing issue, which is actually building for FreeBSD. Today, when we need to specialize an assembly for a particular platform, we effectively have three builds, producing three different managed assemblies: Windows, Linux, OSX. Sounds like at least for now we'll need a fourth, FreeBSD. I suggest you start by modifying the build to support an IsFreeBSD property (or just IsBSD of you think there's a high chance that the implementations across BSDs will be the same even with varied kernels) along with the appropriate OSGroup targets. That can then be used in the csproj files as needed to specialize an assembly with FreeBSD-specific code. I feel uneasy about using either `OSName(""FreeBSD"")` (platform fragmentation) or `OSName(""BSD"")` (too generic) with the amount of information available at this point in time but obviously a direction needs to be chosen. @janhenke @josteink (core members of the portteam) have put forward on multiple times that they would prefer `FreeBSD` and I have no strong preferences in any which direction as long as the _future_ implications are considered carefully because this decision affects the public API surface. Ultimately advice, direction and a decision will be needed by MSFT on this matter. note: issue was edited/refactored based on feedback from josenink since original post. " 1626 area-Meta Support for FreeBSD ## Updated proposal from 2017/9 Proposal (by @karelz - https://github.com/dotnet/corefx/issues/1626#issuecomment-329840518) will be updated in top-post based on further discussion and proposal changes. We discussed community-driven port for FreeBSD with @RussellHaley (from FreeBSD community) and @wfurt (from .NET Core team) who both expressed interest in the work. Here's a plan proposal we put together (feedback / suggestions are welcome): 1. Produce binaries in CoreCLR & CoreFX repo targeting FreeBSD - using hacks is fine * Hard to parallelize, @wfurt will work on that * The build can be mix of builds from other platforms (Mac, Linux) targeting FreeBSD * We will need documented steps (on FreeBSD wiki) to reproduce the build with FreeBSD-specific bug fixes 2. Run & stabilize CoreCLR tests (using corerun) * Tests may be built on another platform * Goal: Provides basic quality of runtime 3. Run & stabilize CoreFX tests (using corerun) * Tests may be built on another platform * Note this requires xunit. We believe, based on our past porting experience, once [2] is done, xunit will just work. * This can be in theory parallelized with [2] - it may require shortcutting xunit (e.g. generate static execution recipe on another platform) * We can expose new OSPlatform API for FreeBSD when the pass rate is reasonable: see #23989 4. Full stack build on FreeBSD (using corerun as bootstrapper from [1]-[3]) * We will need all tools (nuget, msbuild, roslyn) to work on boostrapping .NET Core 5. Installers (FreeBSD ports) * First-stage: Using product binaries from nuget feeds * Second-stage: Build product from source (blocked on build from source effort) * Requires FreeBSD community expertise and guidance on design * Note: We can link FreeBSD packages also from official .NET Core download pages as community-support packages 6. Regular build and test runs on FreeBSD * Goal: Make sure changes in .NET Core repos breaking FreeBSD are known early * Design needed * Requires FreeBSD community expertise and guidance on design Operation principles: * Changes in [2]-[4] should be done primarily in CoreCLR/CoreFX repos (due to CLA signing requirements, code reviews from .NET Core team experts/members. etc.) * We will track high-level work on this issue. Specific bugs will be filed as separate issues. If anyone is interested in helping, please let us know here. We can easily distribute work items from [2] & [3] above once we are far enough with [1]. --------------------------------------------- ## Original proposal from @ghuntley from 2015/5 This issue is to discuss unit(s) of work to actually produce FreeBSD assemblies for corefx. > @stephentoub - There's what's likely a more pressing issue, which is actually building for FreeBSD. Today, when we need to specialize an assembly for a particular platform, we effectively have three builds, producing three different managed assemblies: Windows, Linux, OSX. Sounds like at least for now we'll need a fourth, FreeBSD. I suggest you start by modifying the build to support an IsFreeBSD property (or just IsBSD of you think there's a high chance that the implementations across BSDs will be the same even with varied kernels) along with the appropriate OSGroup targets. That can then be used in the csproj files as needed to specialize an assembly with FreeBSD-specific code. Related issue(s) - #1625 (OSGroup identifier in the public API) - #1576 (OSGroup identifier in the private API) /cc: @janhenke @josteink 1633 area-System.Reflection More offsets in MetadataReader I believe MetadataReader should have more APIs which tell me about offsets. I. e.: Let's say I'm writing strong name signer, there are few steps required (assuming that assembly is already delayed signed): - calculate hash, - sign hash, - inject signature to calculate hash you need to skip some parts of the PE file like: - strong name signature blob (including the 8 bytes in the header) - certificates blob (including 8 bytes header) - checksum so I need to have offsets and sizes for each of those. For blobs there are already APIs: i.e.: ``` peReader.PEHeaders.CorHeader.StrongNameSignatureDirectory.Size peReader.PEHeaders.CorHeader.StrongNameSignatureDirectory.RelativeVirtualAddress peReader.PEHeaders.PEHeader.CertificateTableDirectory.Size peReader.PEHeaders.PEHeader.CertificateTableDirectory.RelativeVirtualAddress ``` what is missing is: - checksum offset (and optionally a size) - blob headers for blob headers we can do simple change in System.Reflection.PortableExecutable.DirectoryEntry which is: ``` diff public struct DirectoryEntry { //... + public readonly int HeaderOffset; //... internal DirectoryEntry(ref PEBinaryReader reader) { + HeaderOffset = reader.CurrentOffset; RelativeVirtualAddress = reader.ReadInt32(); Size = reader.ReadInt32(); } //... } ``` For stuff like CheckSum offset we need something like this: ``` diff public sealed class PEHeader { //... + public int BaseOffset; // this might be always 0 so const would be fine too //... + public const int CheckSumOffset; + public const int CheckSumSize; + //etc. for other fields } ``` cc: @nguerrera @tmat What are your thoughts? With good modifications we could probably reuse some of those types when writing MetadataWriter (assuming we are planning to do that) 1635 area-System.Security System.Security.Cryptography.Hashing.Algorithms cannot resolve System.Text.Encoding and System.Threading.Tasks ? "Using beta5 TFMs : dnx451 and dnxcore50 and this is my project.json dependencies: ``` ""dependencies"": { ""BioBook.Data"": ""1.0.0-*"", ""HtmlMinifier.MiddleWare"": ""1.0.0-beta5-1000"", ""Microsoft.AspNet.Authentication"": ""1.0.0-beta5-*"", ""Microsoft.AspNet.Authentication.Cookies"": ""1.0.0-beta5-*"", ""Microsoft.AspNet.Diagnostics"": ""1.0.0-beta5-*"", ""Microsoft.AspNet.Diagnostics.Entity"": ""7.0.0-beta5-*"", ""Microsoft.AspNet.Hosting"": ""1.0.0-beta5-*"", ""Microsoft.AspNet.Identity.EntityFramework"": ""3.0.0-beta5-*"", ""Microsoft.AspNet.Mvc"": ""6.0.0-beta5-*"", ""Microsoft.AspNet.Mvc.TagHelpers"": ""6.0.0-beta5-*"", ""Microsoft.AspNet.Server.IIS"": ""1.0.0-beta5-*"", ""Microsoft.AspNet.Server.WebListener"": ""1.0.0-beta5-*"", ""Microsoft.AspNet.StaticFiles"": ""1.0.0-beta5-*"", ""Microsoft.AspNet.Tooling.Razor"": ""1.0.0-beta5-*"", ""Microsoft.DataAnnotations"": ""1.0.0-beta1-*"", ""Microsoft.Framework.CodeGenerators.Mvc"": ""1.0.0-beta5-*"", ""Microsoft.Framework.ConfigurationModel.Json"": ""1.0.0-beta5-*"", ""Microsoft.Framework.DependencyInjection"": ""1.0.0-beta5-*"" }, ""frameworks"": { ""dnx451"": { ""frameworkAssemblies"": { } }, ""dnxcore50"": { ""dependencies"": { } } }, ``` When building it returns 2 errors ``` Error Dependency System.Text.Encoding >= 4.0.0-beta-22830 could not be resolved Error Dependency System.Threading.Tasks >= 4.0.0-beta-22830 could not be resolved ``` If I remove Microsoft.AspNet.Mvc.TagHelpers, the error goes away. Looking at dnu list --details I found that tag helpers doesn't have a dependency for those packages but System.Security.Cryptography.Hashing.Algorithms looks like it has. (it think that package is not open source yet, because a) can't find it. b) https://github.com/dotnet/corefx/issues/836 ) Also, removing Microsoft.AspNet.Mvc.TagHelpers but adding System.Security.Cryptography.Hashing.Algorithms triggers the same errors. If I explicit add those packages as dependencies the errors goes away like this: ``` ""dependencies"": { ""System.Text.Encoding"": ""4.0.10-beta-22830"", ""System.Threading.Tasks"": ""4.0.10-beta-22830"", ... }, ``` **Note:** I was asked on jabbr.net if I had a Compiler/Preprocess folder with uncommented directives. I do have that folder with one file `RazorPreCompilation.cs` but the code inside that file is commented. Also removing the folder does not fixes the build errors. Not sure what else I can do/look at but if you need anything else just let me know. " 1641 area-Infrastructure corefx fails on Arch Linux: Not registered task DownloadFile "I'm not sure whether corefx is supposed to work on Linux at this point, and I have no clue how to build this anyway. Still running `xbuild` in the top directory produces this. ``` [hritcu@detained corefx]$ xbuild XBuild Engine Version 12.0 Mono, Version 3.12.1.0 Copyright (C) 2005-2013 Various Mono authors Build started 5/6/2015 2:42:54 PM. __________________________________________________ Project ""/home/hritcu/Temp/corefx/build.proj"" (default target(s)): Target _RestoreBuildTools: Restoring build tools... : error : Error initializing task DownloadFile: Not registered task DownloadFile. Build FAILED. Errors: /home/hritcu/Temp/corefx/build.proj (default targets) -> /home/hritcu/Temp/corefx/dir.targets (_RestoreBuildTools target) -> : error : Error initializing task DownloadFile: Not registered task DownloadFile. 0 Warning(s) 1 Error(s) Time Elapsed 00:00:00.0923120 ``` " 1642 area-System.Numerics [BigInteger] Parse test with trailing spaces fails on some cultures ``` System.Numerics.Tests.parseTest.RunParseToStringTests [FAIL] Assert.Throws() Failure Expected: typeof(System.FormatException) Actual: (No exception was thrown) Stack Trace: m:\Workspace\github\corefx\src\System.Runtime.Numerics\tests\BigInteger\parse.cs(408,0): at System.Numerics.Tests.parseTest.VerifyParseToString(String num1, NumberStyles ns, Boolean failureNotExpected, String expected) m:\Workspace\github\corefx\src\System.Runtime.Numerics\tests\BigInteger\parse.cs(380,0): at System.Numerics.Tests.parseTest.VerifyParseToString(String num1, NumberStyles ns, Boolean failureNotExpected) m:\Workspace\github\corefx\src\System.Runtime.Numerics\tests\BigInteger\parse.cs(247,0): at System.Numerics.Tests.parseTest.VerifyNumberStyles(NumberStyles ns, Random random) m:\Workspace\github\corefx\src\System.Runtime.Numerics\tests\BigInteger\parse.cs(33,0): at System.Numerics.Tests.parseTest.RunParseToStringTests() Finished: System.Runtime.Numerics.Tests === TEST EXECUTION SUMMARY === System.Runtime.Numerics.Tests Total: 2, Errors: 0, Failed: 1, Skipped: 0, Time: 20,751s ``` Repro steps: 1. Start->Run (WinKey + R) -> intl.cpl 2. Change format (no need to change locale) to Ukrainian (Ukraine) 3. `build /p:WithCategories=OuterLoop` **Possible solution:** https://github.com/dotnet/corefx/pull/1592#issuecomment-99520215 1645 area-System.IO Add option on StreamWriter not to emit Byte Order Mark (BOM) Someone posted on CoreClr: https://github.com/dotnet/coreclr/issues/933 a requirement to have StreamWriter to optionally not emit BOM to the stream. A possible solution is to either add a defaulted bool parameter to each/some of the constructors (bool emitBOM = True), or add a new enum e.g. StreamWriterOptions with EmitBOM as one of the enums and again having that enum as a defaulted parameter on each/some of the constructors. There maybe an issue with binary compatibility so it might be better to add a new constructor with the bool/enum.' Comments? 1647 area-System.Text Expose Hex/Char utilities from System.Text.Encoders.Web as public APIs (on some type) See: src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/HexUtil.cs 1650 area-System.Security Investigate handle usage in src/common/src/Interop/Windows/secur32/Interop.LSAStructs.cs This issue came up but was not addressed in the initial commit of System.Security.Principal and System.Security.Principal.WIndows. See the constructor in UNICODE_INTPTR_STRING. The comment was regarding whether we need to add DangerousAddRef / DangerousReleasing around DangerousGetHandle. 1652 area-System.Security Address possible race conditions in System.Security.Principal.Windows tests "See src/system.security.principal.Windows/tests/WindowsIdentityTests.cs Initial commit feedback was: ""Could this not be problematic / prone to race conditions if the safe handle gets finalized concurrent with usage of logonToken (no AddRef/Releasing is being done to prevent that)?"" " 1653 area-System.IO Named pipes and array segment Hello. was thinking why the named pipe api doesn't provide the possibility to use array segments as the socket api to be able to use buffer pooling to reduce the impact of pinning for arrays that are not big enough to make it to LOH. is a common technique with socket to avoid possible out of memory exception due to fragmentation. I am having nightmares because a new app we are building is doing a lot of io via named pipes and now OOM exceptions are all over the place. Any plan about this kind of features? 1657 area-System.IO FileSystemWatcher_4000_Tests.FileSystemWatcher_IncludeSubDirectories test failing in CI This test has failed multiple times in the last few days: ``` MESSAGE: Didn't observe a created event within 500ms +++++++++++++++++++ STACK TRACE: at Utility.ExpectEvent(WaitHandle eventOccured, String eventName, Int32 timeout) in d:\j\workspace\dotnet_corefx_windows_release\src\System.IO.FileSystem.Watcher\tests\Utility\Utility.cs:line 94 at FileSystemWatcher_4000_Tests.FileSystemWatcher_IncludeSubDirectories_Directory() in d:\j\workspace\dotnet_corefx_windows_release\src\System.IO.FileSystem.Watcher\tests\FileSystemWatcher.IncludeSubDirectories.cs:line 67 ``` 1664 area-System.Reflection System.Reflection.Metadata fails to read offset of DataDirectories spanning across multiple sections "If an assembly contains any DataDirectory which is in more than one section we throw ""System.BadImageFormatException : Section too small."". While I agree we should not have any assemblies like that we unfortunately already shipped one which has this issue. I believe we can still calculate the offset without checking ranges (or we can check the global range only) Example can be found here: https://github.com/krwq/corefx/tree/pereaderdatadir This is basically: ``` csharp using (FileStream fs = new FileStream(@""C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.JScript.dll"", FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete)) { using (PEReader reader = new PEReader(fs, PEStreamOptions.LeaveOpen | PEStreamOptions.PrefetchEntireImage | PEStreamOptions.PrefetchMetadata)) { int offset; if (reader.PEHeaders.TryGetDirectoryOffset(reader.PEHeaders.PEHeader.CertificateTableDirectory, out offset)) { } } } ``` " 1665 area-System.Reflection Vague/invalid Strong Name Signing description in ECMA-335 ECMA-335 description of strong name signing (II.6.2.1.3): - To calculate the hash, the signature is zeroed, the hash calculated, and then the result is stored into the signature. - The Strong Name (SN) signing process uses standard hash and cipher algorithms for Strong name signing. An SHA-1 hash over most of the PE file is generated. That hash value is RSA-signed with the SN private key. For verification purposes the public key is stored into the PE file as well as the signed hash value. - Except for the following, all portions of the PE File are hashed: - The Authenticode Signature entry: PE files can be authenticode signed. The authenticode signature is contained in the 8-byte entry at offset 128 of the PE Header Data Directory (“Certificate Table” in §II.25.2.3.3) and the contents of the PE File in the range specified by this directory entry. [Note: In a PE File conforming to this specification, this entry shall be zero. end note] - The Strong Name Blob: The 8-byte entry at offset 32 of the CLI Header (“StrongNameSignature” in §II.25.3.3) and the contents of the hash data contained at this RVA in the PE File. If the 8-byte entry is 0, there is no associated strong name signature. - The PE Header Checksum: The 4-byte entry at offset 64 of the PE Header Windows NT-Specific Fields (“File Checksum” in §II.25.2.3.2). [Note: In a PE File conforming to this specification, this entry shall be zero. end note] What we actually do is (hashing): - In CorHeader/CLI Header set StrongNameSigned flag (value: 8). (I believe this is starting on 12th byte of CLI Header and is UInt32 - do not remove the old flag value just do bitwise OR with value 8) - Set Checksum (4 bytes) to zeros (this is in optional PE header in NT specific fields) - Set Certificate Directory entry (only 8 byte header) to zeros - Calculate hash of PE header from the start until sections headers are finished. Notes: - Continue hashing each section in the order of occurrence in the headers (this will start immediately after section headers and will intentionally skip padding after section headers). Note: - Strong Name Directory - entirely skip from hashing (but do hash its data directory 8 byte header as is) After we get a hash we sign it and store in Strong Name Directory 1683 area-Infrastructure System.Collections.Tests runs against Nuget package not compiled output "Unit tests in System.Collections.Tests.csproj appear to execute against the System.Collections package, and not the compiled output in the bin folder. Any local changes made to System.Collections are not picked up by System.Collections.Tests during compilation at command line (build.bat, msbuild System.Collections.sln) or in Visual Studio. For example, new types are not found by the test project. Compiling in verbose mode shows that the reference to System.Collections.dll is being pulled from the packages folder (packages/System.Collections/4.0.10-beta/...) and not the compiled output of the local build. Chicken and the egg scenario, where compiling the solution for System.Collections depends on it having been successfully compiled (in the MS build lab)! In addition, some of the behavior appears to be intentional. In System.Collections.Tests.csproj, a custom comment was added above the : ""Compile tests against the contract, but copy our local-built implementation for testing"". The behavior makes it impossible to write unit tests for new logic (e.g. in forks) for System.Collection.dll. " 1690 area-Meta Publish document about reference assemblies, contracts, and facades. We are beginning to open source our facades and soon our contracts and so we need to add some documentation for people to better understand how these all work. 1691 area-System.Linq [Compiler Bug] PropertyInfo retrieved from LambdaExpression reports wrong ReflectedType when property is derived from another class This is an old bug: https://connect.microsoft.com/VisualStudio/feedback/details/554853 https://connect.microsoft.com/VisualStudio/feedback/details/607165/propertyinfo-retrieved-from-lambdaexpression-reports-wrong-reflectedtype-when-property-is-derived-from-another-class 1712 area-System.Console Investigate if we still need all the thread jumping machinery in Console's ControlCHandler Console's ControlCHandler tries to queue work the threadpool to actually call the user code which handles the control c event. This was added as part of runtime hardening during the 2.0 days. The original fix for the issue (which introduced this jumping into another thread goo) had this comment: > On 64-bit platforms the ControlC handler is executed on a thread created > outside the runtime with very small stack. Our SO checking now > conservatively checks for space, which leaves insufficient space to > allow an exception to be thrown and caught. > > The change is to launch the user event on a ThreadPool thread instead of > in the ControlC handler thread. Care is taken to ensure that the thread > does not deadlock, even if we fail to successfully begin execution of > the Threadpool thread. @jkotas wonders if this is needed anymore: > Looking at the history, this code was added in Whidbey days where we were trying to harden the runtime against stack overflows by adding probes for large amounts of stack everywhere. We have given up on it since then. Internally we have moved the code to use Tasks instead of the ThreadPool directly (as part of some general work around some internal testing scenarios for .NET Native), but we might just be able to get out of the game completely. 1718 area-System.Reflection Merges changes from master to dev/metadata 1728 area-System.IO Determine whether to change Unix behavior when getting time from a non-existent file On Windows, for back-compat reasons, getting CreationTime (and maybe last access/write time, too) from a non-existent file via FileInfo returns the equivalent of DateTime.FromFileTime(0), rather than throwing an exception. On Unix, we do what's arguably the more expected behavior and throw. We should determine whether we want to change the Unix implementation to match what's there on Windows. 1732 area-System.Reflection Update package revision number to 00003 1739 area-System.Security Interop\Windows\BCrypt\Cng.cs does not follow the Interop guidelines Cng.cs was ported as-was from closed source into open. It should be broken up into multiple Interop.Method.cs and/or Interop.MethodCollection.cs files, and the SafeHandle types extracted into files of their own right. 1742 area-Infrastructure Coverage report should consider OuterLoop tests I have a reason to believe that coverage report doesn't count OuterLoop tests. When looking at: http://dotnet-ci.cloudapp.net/job/dotnet_corefx_coverage_windows/lastStableBuild/Code_Coverage_Report/ I can see test project (I know it shouldn't be on report): System.Xml.RW.XmlReaderLib has 0% coverage which is impossible as I'm 100% sure some outer-loop only tests projects are including it and run tests from there (and thus test the test project). Also ridiculously low Xml.ReaderWriter coverage seems to be confirming it (I know coverage isn't perfect but I'm pretty sure it is much more than 17%). 1745 area-System.Net URI class throws with Unix file paths "The following is thrown from System.Uri.CreateThis(...) when you are using Unix file paths to construct a URI object. ""System.UriFormatException: Invalid URI: The format of the URI could not be determined."" I know for windows there is special logic to add file:// to the front of the path, and Mono handles the paths correctly, but using CoreCLR non-windows it throws. " 1751 area-System.Net "Overzealous ""URI not absolute"" InvalidOperationExceptions from Uri instance members" "Many of Uri's instance properties throw an InvalidOperationException complaining that the operation is not supported for a relative URI. In some cases, this doesn't really make sense. The best example I can think of is the Uri.HostNameType property. Consider the scenario where one constructs an instance of the Uri class with the path ""www.domain.com"". As expected, this evaluates to a relative path, because the protocol has not been specified. However, absolute or not, one would expect the value of its Uri.HostNameType to be UriHostNameType.Dns. Instead, checking the HostNameType throws an exception. This particular scenario also exhibits an inconsistency with other members of the Uri class. Uri.CheckHostName(string name) is a static method which returns a UriHostNameType value, just the same as the Uri.HostNameType instance property. One could reasonably expect the following two calls to return the same value: var hostType = new Uri(""www.domain.com"", UriKind.RelativeOrAbsolute).HostNameType; var hostType = Uri.CheckHostName(""www.domain.com""); Unfortunately, the first call throws an exception. The second call using CheckHostName, however, returns the expected value: UriHostNameType.Dns. " 1756 area-System.Text Implement generic interfaces on Regex collections Implement `IList`, `IReadOnlyList`, and `IList` on the Regex collections. Fixes #271 1761 area-Serialization Remove dependency from System.Xml.XmlSerializer on System.Runtime.WindowsRuntime 4.0.10 "I had to workaround an issue in System.Xml.XmlSerializer with the current packages: System.Runtime.WindowsRuntime 4.0.0 has a depedendency on ""windows"" package which doesn't exist. This was caused by our auto-generation task not filtering the winrt reference in the reference assembly's surface area. I've fixed this in a separate change and we can remove the workaround once we have a new set of packages next week. " 1768 area-Serialization XmlSerializer Tests Failing after latest merge from TFS 1774 area-System.Security System.Security.Cryptography.Hashing.Algorithms: HMAC::get_Key behavior differs from desktop on large keys. "Desktop: ``` HMAC hmac = new HMACSHA1(); hmac.Key = new byte[65]; int length = hmac.Key.Length; // 20 ``` CoreFX: ``` HMAC hmac = new HMACSHA1(); hmac.Key = new byte[65]; int length = hmac.Key.Length; // 65 ``` [RFC 2104, section 2](https://tools.ietf.org/html/rfc2104#section-2) says ""Applications that use keys longer than B bytes will first hash the key using H and then use the resultant L byte string as the actual key to HMAC."". In this case, SHA-1's block size (B) is 64, so the key is replaced with H(K). And then hmac.Key should return the H(K) answer, instead of the value which was set. Once this bug is fixed, there should be a test that verifies it. " 1776 area-Infrastructure Test runs are disabled when building on Linux See the skip of RunTestsForProject in https://github.com/dotnet/corefx/blob/master/mono.targets. 1784 area-System.Reflection Assembly.GetExecutingAssembly, AppDomain.CurrentDomain and similar Are there any plans to include the following classes and methods in near future? I am porting my framework (http://github.com/riganti/redwood) to .NET Core and I miss these methods. - Assembly.GetReferencedAssemblies - Assembly.GetExecutingAssembly - Assembly.GetEntryAssembly - Assembly.GetCallingAssembly - Assembly.CreateInstance - Assembly.Load which takes byte array or a stream - AppDomain.CurrentDomain.GetAssemblies - AppDomain.CurrentDomain.AssemblyResolve Or is there another way in the new .NET Core how to list all loaded assemblies, get the assembly of method that is being executed or a calling method etc.? 1786 area-System.Reflection Merge branch 'master' of https://github.com/dotnet/corefx into dev/metadata 1787 area-Infrastructure System.IO.Compression.ZipFile.Tests failing in microbuild of dev/metadata branch Disabling these tests in dev/metadata branch until these issues are resolved. ``` System.IO.Compression.Test.ZipTest.CreateFromDirectoryNormal System.IO.Compression.Test.ZipTest.CreateEntryFromFileTest System.IO.Compression.Test.ZipTest.UpdateReadTwice System.IO.Compression.Test.ZipTest.UpdateAddFile ``` Stack trace is the same for all failures: ``` System.IO.Compression.ZLibException : The underlying compression routine could not be loaded correctly. ---- System.DllNotFoundException : Unable to load DLL 'clrcompression.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) Stack Trace: at System.IO.Compression.DeflaterZLib.DeflateInit(CompressionLevel compressionLevel, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy) at System.IO.Compression.DeflaterZLib..ctor(CompressionLevel compressionLevel) at System.IO.Compression.DeflateStream.CreateDeflater(Nullable`1 compressionLevel) at System.IO.Compression.DeflateStream..ctor(Stream stream, CompressionMode mode, Boolean leaveOpen) at System.IO.Compression.ZipArchiveEntry.GetDataCompressor(Stream backingStream, Boolean leaveBackingStreamOpen, EventHandler onClose) at System.IO.Compression.ZipArchiveEntry.OpenInWriteMode() at System.IO.Compression.ZipArchiveEntry.Open() ``` 1788 area-System.Reflection Disable System.IO.Compression.ZipFile.Tests failing in microbuild of dev/metadata branch 1790 area-Meta .NET Core API inclusion principles doc So, I was responding in #1420 and tried to hunt down some docs here that had a set of principles for what was/should be included in .Net Core. I couldn't find anything in my quick search. Maybe I missed it? Maybe we need to get something better together? /cc @nexussays @nguerrera @blackdwarf 1791 area-Infrastructure GIT fails to sync frequently in internal corefx-dev-metadata-realsigned queue. "``` EXEC: src refspec dev/metadata does not match any. EXEC: failed to push some refs to 'https://github.com/dotnet/corefx.git' corefx-dev-metadata-realsigned\src\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00048\lib\UpdateBuildValues.targets (39): The command ""git push origin dev/metadata"" exited with code 1. ``` " 1793 area-System.IO Please add support for BufferedStream type in .NET Core We have a scenario where we implement our own stream and use the BufferedStream class to add a buffering layer on top of it. 1794 area-System.Net Why does HttpClient dispose HttpContent? Hi. I'm trying to write some tests on our custom protocol over http. So, I passed a fake message handler to client, like this (we don't use C#6 yet, so): ```c# public class CachingRequestsHandler : DelegatingHandler { public CachingRequestsHandler() { this.Requests = new List(); } public List Requests { get; private set; } protected override Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) { this.Requests.Add(request); return Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK)); } } ``` When in test I'm trying to inspect request's `Content`, I'm getting an `ObjectDisposedException`. As I found `HttpClient` [unconditionally disposes](https://github.com/dotnet/corefx/blob/master/src/System.Net.Http/src/System/Net/HttpClient.cs#L360) `Content`. I have two questions: - will this behavior change in future to give user some control over Content? - how should I work around this issue, because I want to assert and test all parts of request: headers and content? Is there a fast and easy way to clone `HttpRequestMessage`? 1797 area-System.Diagnostics Implement System.Diagnostics.StackTrace/StackFrame Per discussion in #1420, this issue is to design & implement equivalents for [StackFrame](http://referencesource.microsoft.com/#mscorlib/system/diagnostics/stackframe.cs) and [StackTrace.](http://referencesource.microsoft.com/#mscorlib/system/diagnostics/stacktrace.cs) taking into account any possible API changes that might be necessary to better fit the goals of .NET Core. Implementation discussion may want to reference #1790 1805 area-System.Reflection Section name in PEReader contains null padding String in section name (i.e. peReader.PEHeaders.SectionHeaders[0].Name) contains null characters. I believe we should remove it, unless it is by design. ECMA description of field: ``` An 8-byte, null-padded ASCII string. There is no terminating null if the string is exactly eight characters long. ``` Here is how we get the value: ``` csharp // reader is PEBinaryReader // _name is string // PEFileConstants.SizeofSectionName = 8 _name = reader.ReadUTF8(PEFileConstants.SizeofSectionName); // impl of ReadUTF8: public string ReadUTF8(int byteCount) { byte[] bytes = ReadBytes(byteCount); return Encoding.UTF8.GetString(bytes, 0, byteCount); } ``` In theory it can also be encoding bug. 1813 area-System.Security Oid.FriendlyName gives different answers on Unix and Windows "``` new Oid(""1.2.840.113549.1.1.1"").FriendlyName ``` Windows: `""RSA""` Unix: `""rsaEncryption""` The tests for `FriendlyName` may encounter some errors when they get ported and CI tries to evaluate them. Or maybe there will be a sufficient core of sameness to allow the tests to keep running. " 1815 area-System.Reflection PEReader throws on an empty PE image 1820 area-System.Security Interop\Windows\Crypt32\OidInfo.cs does not follow the Interop guidelines OidInfo.cs was ported as-was from closed source into open. It should be broken up into multiple Interop.Method.cs and/or Interop.MethodCollection.cs files. If it is already a reasonable MethodCollection set, it still needs the type/namespace names adjusted, and the file to be renamed. 1821 area-System.Reflection Merge branch 'master' 1825 area-System.Net HttpClient ReadAsync waits for whole buffer to fill up even if HttpCompletionOption.ResponseHeadersRead is set Hi, I've prepared a simple project to demonstrate my issue: https://github.com/ppekrol/ReadAsyncIssue Steps to reproduce: 1. Run web (ReadAsyncIssue), can be under DNX451 or DNXCORE50, no difference 2. Run console app: a) when DNX451 is used, ReadAsync returns immediately (read length = 100) b) when DNXCORE50 is used, ReadAsync waits for buffer to fill (8192) I think this is a bug. 1831 area-Serialization Two XML Tests failing due to new PlatformNotSupportedException fc5506a2 introduced a platform not supported exception in a few APIs so the behavior could align with .NET Native. This is causing a few failing tests. 1832 area-System.Reflection Use immutable collections 1.1.36 in metadata 1836 area-System.Linq System.Linq.Parallel Exceptions not consistent The exceptions thrown (or wrapped) by PLINQ aren't consistent. Enumerables throwing an exception during `GetEnumerator()` will expose the original exception, and won't wrap it in `AggregateException` (which at least a naïve reading of the documentation suggests it should), for everything but the following 'output' methods: - `Average` - `Count` - `LongCount` - `Max` - `Min` - `Sum` ... and `SequenceEqual`, but only when some other method is called first (eg, `new FailingEnumerable.AsParallel().Select(x => x).SequenceEquals(b)`). If the enumerator itself throws an exception (from `MoveNext()` or `Current`), and additional PLINQ method is called first: 1. `SequenceEqual` throws nested `AggregateException`s 2. The following 'output' methods throw the original exception, and will not wrap it in an `AggregateException`: - `Aggregate(seed, accumulator)` - `Aggregate(seed, accumulator, resultSelector)` - `foreach(...)` - `ToArray` - `ToDictionary` - `ToList` This is, at minimum, a 'gotcha' waiting to trip somebody up. How should we handle it? Interestingly, `SequenceEqual` has: > // If first.GetEnumerator throws an exception, we don't want to wrap it with an AggregateException. > // If second.GetEnumerator throws an exception, we don't want to wrap it with an AggregateException. ... which I have a feeling was to deal with the case where an inner operator threw something already wrapped (to not nest it), but ended up missing the other cases.
I've got a [Gist](https://gist.github.com/Clockwork-Muse/c10553dbce3de937aecd) of the tests I'm using to find this info, although I wasn't planning on adding them to the PLINQ tests in this form. Especially because some stuff has been ad-hoc tweaked to be able to find the info better 1838 area-System.Diagnostics Provide way to send Control+C to proccess Currently .NET doesn't have way to exit nicely from created console process. It would be nice if we had a such a method. ``` csharp namespace System.Diagnostics { public class Process { public void SendCtrlCSignal() { ... } } } ``` It can be implemented following way on Windows: http://stackoverflow.com/a/15281070/61505 , for unix we can call `kill (pid, SIGINT);` http://stackoverflow.com/a/1761182/61505 It provide a lot of problems for other users too http://stanislavs.org/stopping-command-line-applications-programatically-with-ctrl-c-events-from-net/ 1839 area-System.Reflection Merge master and use immutable collections 1.1.36 in metadata 1840 area-System.IO System.IO.Pipes.Tests fail with EntryPointNotFoundException on Win10 I have disabled the following tests in dev/metadata branch until they are fixed. ``` AnonymousPipesSimpleTest.ClientPInvokeChecks [FAIL] System.EntryPointNotFoundException : Unable to find an entry point named 'GetNamedPipeHandleStateW' in DLL 'api-ms-win-core-namedpipe-l1-2-1.dll'. Stack Trace: at Interop.mincore.GetNamedPipeHandleState(SafePipeHandle hNamedPipe, Int32& lpState, IntPtr lpCurInstances, IntPtr lpMaxCollectionCount, IntPtr lpCollectDataTimeout, IntPtr lpUserName, Int32 nMaxUserNameSize) C:\FX0\src\System.IO.Pipes\src\System\IO\Pipes\PipeStream.Windows.cs(983,0): at System.IO.Pipes.PipeStream.UpdateReadMode() C:\FX0\src\System.IO.Pipes\src\System\IO\Pipes\PipeStream.Windows.cs(236,0): at System.IO.Pipes.PipeStream.get_ReadMode() C:\FX0\src\System.IO.Pipes\tests\AnonymousPipesSimpleTest.cs(221,0): at AnonymousPipesSimpleTest.ClientPInvokeChecks() NamedPipesSimpleTest.ClientServerMessages [FAIL] System.EntryPointNotFoundException : Unable to find an entry point named 'GetNamedPipeHandleStateW' in DLL 'api-ms-win-core-namedpipe-l1-2-1.dll'. Stack Trace: at Interop.mincore.GetNamedPipeHandleState(SafePipeHandle hNamedPipe, IntPtr lpState, IntPtr lpCurInstances, IntPtr lpMaxCollectionCount, IntPtr lpCollectDataTimeout, StringBuilder lpUserName, Int32 nMaxUserNameSize) C:\FX0\src\System.IO.Pipes\src\System\IO\Pipes\NamedPipeServerStream.Windows.cs(149,0): at System.IO.Pipes.NamedPipeServerStream.GetImpersonationUserName() C:\FX0\src\System.IO.Pipes\tests\NamedPipesSimpleTest.cs(389,0): at NamedPipesSimpleTest.ClientServerMessages() Finished: System.IO.Pipes.Tests ``` 1843 area-Serialization Workaround for perf issue with the new jit pointer dereference in serialization With the new jit, the *chars deference is done twice which is more costly compared to legacy jit 1844 area-System.Net Support System.Net.Security.NegotiateStream Add support for NegotiateStream that exists in the full .NET Framework. This involves either creating a new library or a newer version of an existing one. As a minimum it should support the same client API surface as the full .NET Framework. This is required for WCF to complete its NetTcpBinding implementation. 1849 area-System.IO Unix: Why not use Unix Domain Sockets for Named Pipes? System.IO.Pipes map to native windows implementations of anonymous and named pipes. Windows anonymous are close in implementation to Unix pipes in that they are one way and byte oriented (not datagram or message oriented). On the other hand, Named pipes can be either full (supporting I/O in both directions) or half (I/O in one direction) and messages can either be byte oriented or message/datagram oriented. Pipe connections can also be made across systems through the network (I believe using SMB) Unix has named pipes called FiFo's but they are one way only and not message oriented. The current Pipes port for corefx under unix uses FIfo's and therefore is a subset implementation. Instead of using Fifo's why don't we use Unix Domain Sockets? They support most of the functionality of windows named pipes including full/half duplex, byte or message oriented. They however don't support cross system connections. see overview of Unix Domain Sockets here: http://www.thomasstover.com/uds.html Ultimately, what is the goal of the corefx library on a different platform? To bind to existing similar functionality? or to provide strict portability of the api's across platforms (what I'm calling emulation)? If we strictly bind, then there will always be limitations and differences on functionality provided thus decreasing portability. However by binding, we are hooking into existing OS capabilities and can in theory hook up to other non-net apps on the host platform. If we strictly emulate (e.g. say grab a chunk of shared memory and then using semaphores to strictly emulate named pipes functionality under Unix), then we can be extremely portable however we can't communicate with anything else. A possible solution is to extend what can be used as a 'pipe name' in the system.io.pipes implementation where the syntax can be extended to give hints as to what to bind to in the underlying implementation but with the default (without any extended syntax) defaulting to an emulated functional solution. Comments? 1854 area-System.Net "SslStream.AuthenticateAsClientAsync() fails with ""The buffers supplied to a function was too small""" From time to time I receive this error message. ``` System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> System.ComponentModel.Win32Exception: The buffers supplied to a function was too small --- End of inner exception stack trace --- at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) at MailKit.Net.Imap.ImapClient.Connect(String host, Int32 port, SecureSocketOptions options, CancellationToken cancellationToken) at MailKit.MailService.<>c__DisplayClass3.b__2() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at DownloadAndUpdatePrices.Email.EmailService.d__0.MoveNext() in d:\ProjectIS-3\WebProjectAutosouz\DownloadAndUpdatePrices\DownloadAndUpdatePrices\Email\EmailService.cs:line 35 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at DownloadAndUpdatePrices.BLL.DownloadService.d__0.MoveNext() in d:\ProjectIS-3\WebProjectAutosouz\DownloadAndUpdatePrices\DownloadAndUpdatePrices\BLL\DownloadService.cs:line 22 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at DownloadAndUpdatePrices.Program.d__d.MoveNext() in d:\ProjectIS-3\WebProjectAutosouz\DownloadAndUpdatePrices\DownloadAndUpdatePrices\Program.cs:line 48 ``` https://github.com/jstedfast/MailKit/issues/197 1855 area-System.Reflection dotNET 1861 area-Infrastructure Linux tests fail in CI due to mscorlib.ni.dll existing. Linux test runs in CI have been failing (silently) for a while with execute assembly errors. This started around here: http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst/264/ Which had these changes: Update to latest CoreFx packages (commit: 08c0d8628ef621fbd44d7aaa85b3239616a6b108) Move DNU/Roslyn forward (commit: 804b4330a6ae767694cf89ebd173533b539f16f5) The problem looks to be due to the fact that we are now copying mscorlib.ni.dll into the test folder. This is not a Linux native image so things blow up when we try to load and run it. To unblock things, I am adding some logic to run-tests.sh to just delete the native images, but that's not the right long term thing (especially with crossgen support coming real soon now). We need to stop this incorrect native image from being deployed, and eventually deploy the right one. This issue tracks doing the right thing. Once fixed, we should remove the code in run-test.sh that's tagged with this issue number. 1863 area-System.Security Some OID tests failing Cross Platform These tests are failing in CI (which we previously were not catching because no tests were running) System.Security.Cryptography.Encoding.Tests.OidTests.TestFromFriendlyName [FAIL] System.Security.Cryptography.Encoding.Tests.OidTests.TestFromOidValue [FAIL] System.Security.Cryptography.Encoding.Tests.OidTests.TestKnownValues [FAIL] 1866 area-System.Net DNS protocol support enhancement: MX and SRV records Hi, Is there any plan to support MX or SRV DNS field in corefx ? Thank you. Bhaal22 1874 area-System.Diagnostics System.Diagnostics.ProcessTests.ProcessTest.Process_AsyncHalfCharacterAtATime test sometimes fails ``` System.Diagnostics.ProcessTests.ProcessTest.Process_AsyncHalfCharacterAtATime [FAIL] Assert.True() Failure Expected: True Actual: False Stack Trace: E:\oss\corefx\src\System.Diagnostics.Process\tests\System.Diagnostics.Process.Tests\Process_StreamTests.cs(131,0): at System.Diagnostics.ProcessTests.ProcessTest.Process_AsyncHalfCharacterAtATime() ``` 1877 area-System.Linq [System.Linq.Expressions] Allow Switch with empty cases list Now we can not create an expression, that represents this code: ``` cs switch(x) { default: return 0; } ``` But c# allows this and this is can be very helpful - users do not needs a checks and brunches in own code. Problem with a next line: https://github.com/dotnet/corefx/blob/master/src/System.Linq.Expressions/src/System/Linq/Expressions/SwitchExpression.cs#L205 I have asked this question on StackOverflow a few months ago: http://stackoverflow.com/questions/28360782/switch-without-cases-but-with-default-in-system-linq-expressions Why this is not allowed? Can we change it? 1880 area-System.IO Add event buffering to Windows FileSystemWatcher to avoid InternalBufferOverflowExceptions "Consumers should not have to worry about internals like the Windows FileSystemWatcher (FSW) trying to minimize usage of precious non-paged memory resulting in InternalBufferOverflowExceptions. By default the FSW should buffer events in ""normal"" memory. This could easily be implemented using a BlockingCollection. FSW could be configurable to use the old behaviour only. For details and and a implementation sample see my post: https://petermeinl.wordpress.com/2015/05/18/tamed-filesystemwatcher/ Average programmers (for which we should make life as easy as reasonable) often are often not even aware of having to implement an OnError event handler resulting in InternalBufferOverflowExceptions going unnoticed and FSW being perceived as unreliable. " 1883 area-System.Numerics Buffer too small in BigIntegerCalculator.Divide We are seeing some memory corruption after a recent change to biginteger.divide. This is what I got from an engineer investigating the issue: I was able to repro this bug and find its cause. The bug is in System.Runtime.Numerics.dll, introduced by change #1476305 on 5/23. There is an array overflow in unsafe C# code that does division of BigInteger, in System.Numerics.BigIntegerCalculator.Divide(UInt32_, Int32, UInt32_, Int32, UInt32_, Int32, UInt32_, Int32) in FxCore/Open/src/System.Runtime.Numerics/src/System/Numerics/BigIntegerCalculator.DivRem.cs. This method allocates a few arrays: ``` fixed (uint* dividend = new uint[dividendLength], divisor = new uint[divisorLength], guess = new uint[divisorLength]) ``` The guess array is used as the destination of a multiplication: MultiplyDivisor(divisor, divisorLength, digit, guess); This multiplies an array of length divisorLength with an uint. The result length is divisorLength+1, longer than the memory allocated for guess. This overwrites the sync block of the next item in memory, causing asserts later on. Increasing the allocation of guess by 1 should fix this bug. 1891 area-Meta What are the rules on adding new APIs to CoreFX? I saw this: https://github.com/dotnet/corefx/issues/1017#issuecomment-107752252. > To expose the RuntimeEnvironment class, it requires updation to the desktop api, which will not come to effect until next desktop release. Hence, the portable version cannot be released, before the desktop 4.6.1 is released, to ensure this contract works on all platforms, which is the same problem we had with PlatformID, we want to decouple ourselves from desktop dependencies and be more quick with releases. What are the rules that are proposed for updating .NET Core? There are at least a few scenarios: - Adding new members on a type that exists in the .NET Framework. - Adding new types that represent a similar concept that exists in the .NET Framework - Adding new types (new concepts) that do not exist in the .NET Framework. Ideally, we could update .NET Core at the pace we want. Is the issue that we might add one new member to a type that is represented in contract foo and doing so would make contract foo incompatible with .NET Framework vLatest? /cc @Priya91, @terrajobst, @davidfowl 1894 area-System.Net The message or signature supplied for verification has been altered "Hello. I'm using [MailKit](https://github.com/jstedfast/MailKit) And have simple code: ``` c# public static async Task DownloadFileAsync(EmailModel emailModel, bool notSetFlagSeen) { var result = new DownloadResult(); if (emailModel != null) { using (var client = new ImapClient()) { await client.ConnectAsync(emailModel.Host, emailModel.Port, emailModel.Secure); // Note: since we don't have an OAuth2 token, disable // the XOAUTH2 authentication mechanism. client.AuthenticationMechanisms.Remove(""XOAUTH""); await client.AuthenticateAsync(emailModel.UserName, emailModel.Password); ................................... ``` From time to time I receive this error message. Stack trace: ``` System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> System.ComponentModel.Win32Exception: The message or signature supplied for verification has been altered --- End of inner exception stack trace --- at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) at MailKit.Net.Imap.ImapClient.Connect(String host, Int32 port, SecureSocketOptions options, CancellationToken cancellationToken) at MailKit.MailService.<>c__DisplayClass3.b__2() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at DownloadAndUpdatePrices.Email.EmailService.d__0.MoveNext() in d:\ProjectIS-3\WebProjectAutosouz\DownloadAndUpdatePrices\DownloadAndUpdatePrices\Email\EmailService.cs:line 35 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at DownloadAndUpdatePrices.BLL.DownloadService.d__0.MoveNext() in d:\ProjectIS-3\WebProjectAutosouz\DownloadAndUpdatePrices\DownloadAndUpdatePrices\BLL\DownloadService.cs:line 22 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at DownloadAndUpdatePrices.Program.d__f.MoveNext() in d:\ProjectIS-3\WebProjectAutosouz\DownloadAndUpdatePrices\DownloadAndUpdatePrices\Program.cs:line 49 ``` " 1896 area-System.Diagnostics Process_MainModule failed in CI (returned different module than expected) http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_release_prtest/1532/console ``` System.Diagnostics.ProcessTests.ProcessTest.Process_MainModule [FAIL] Assert.Equal() Failure  (pos 0) Expected: corerun Actual: ntdll  (pos 0) Stack Trace: d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Diagnostics.Process\tests\System.Diagnostics.Process.Tests\ProcessTest.cs(239,0): at System.Diagnostics.ProcessTests.ProcessTest.Process_MainModule() ``` 1899 area-System.Xml xmldocument load error "I am using nuget pacakge System.Xml.XmlDocument 4.0.0-beta-22819 and when I tried to load xml, I am getting the error `System.Xml.XmlException: Root element is missing.` for every valid xml file. Code ``` TextReader textReader = File.OpenText(@""xml\document.xml""); XmlReaderSettings settings = new XmlReaderSettings(); settings.IgnoreWhitespace = true; settings.DtdProcessing = DtdProcessing.Ignore; XmlDocument doc = new XmlDocument(); // doc.LoadXml(textReader.ReadToEnd()); using (StringReader sr = new StringReader(textReader.ReadToEnd())) using (XmlReader reader = XmlReader.Create(sr, settings)) { doc.Load(reader); } ``` XML files ``` University of XML Department of XML parsing George Washington Abraham Lincoln Bill J. Clinton George W. Bush Barack H. Obama Song Li ``` and another xml file ``` test test2 test3 ``` " 1900 area-System.Text Make sure object initialization in System.Text.Encodings.Web is synchronized See comments in https://github.com/dotnet/corefx/pull/1889 1903 area-System.Runtime "[Suggestion] Add ""Time-based"" Class to enhance the ""WeakReference""" "Hello all: In asp.net we have Cache, this can be automatically set ""timeout"" and release its memory by setting dependency such as ""Timespan"", ""file""..... However in other situations we don't have such functions yet. It would be better if we have such a ""Time-based"" class, and it will automatically release many ""short-period-timed"" variable, something like WeakReferece (However, WeakReference doesn't have a time-based foundation yet, and we cannot control how long it will be released). In my mind, this can be designed something like this following: ``` public sealed class TimeBasedValue :IDisposable where T:class { //An absolute time that bombs up the value public TimeBasedValue (T value, DateTime span){……} // Absolute/Relative time for bombing up the value public TimeBasedValue (T value, int timePeriod, Mode mode, Unit unit) {……} //When time is overdue, this value must be null public T Value{get;} //""Mode"" is an enum that shows how the time period is calculated: Absolute, Relative to the last access.... public Mode TimeMode{get;} // Hour, Minute, Second or Millsecond? public Unit Unit{get;} //This will be called once the time is overdue, and it will first check whether the Value has implemented ""IDisposable"" or not, if yes, call it first. However no matter what happens, the Value should be set to null public void Dispose() { var value = Value; IDisposable idisp = value as IDisposable ; try { if(idisp!=null) { idisp.Dispose(); } } finally { idisp = null; } } } ``` " 1904 area-System.IO zip_InvalidParametersAndStrangeFiles.StrangeFiles4 disabled on Unix "I'm disabling the System.IO.Compression.Tests.zip_InvalidParametersAndStrangeFiles.StrangeFiles4 test on Unix as it fails once we fix the Path.AltDirectorySeparatorChar to be '/' instead of '\' ('\' isn't a valid directory separator char on Unix). The problem stems from an assert in ZipTestHelpers: ``` C# Assert.Equal(file.Name, entry.Name); ``` This particular ""strange"" zip file (dataDescriptor.zip) contains an entry named ""notempty\second.txt"", and the assert is expecting the entry.Name to be ""second.txt"", but when '\' isn't a separator character, the entry.Name (which just returns Path.GetFileName(...)) is coming back as ""notempty\second.txt"". This is after all a ""strange"" zip file, so I don't know whether this is a product issue or a test issue. " 1914 area-System.Reflection Build more specific test verification methods for System.Reflection.Emit.ILGeneration constructor verification tests In CustomAttributeBuilderCtor1.PosTest1() ``` csharp CustomAttributeBuilder cab = new CustomAttributeBuilder( typeof(ObsoleteAttribute).GetConstructor(ctorParams), paramValues); Assert.NotNull(cab); ``` Instead of simpe Assert.NotNull, check for configuration of cab from the ctor. 1917 area-Serialization Fix XmlSerializer issue when deserializing type with protected parameterless constructor When deserialize types with non-public default constructor, generated code from XmlSerializer throws missing method exception because no constructor is available for Activator.CreateInstance. This is affecting debugging scenario for some apps. This is to port the change we did in NetNative. 1930 area-System.Net Regression in redirection functionality of System.Net.Http.HttpClient "@davidsh , I found this regression when trying to integrating `HttpClient` into `dnu restore` Here is a simple repro: ``` public class Program { public void Main(string[] args) { Task.Run(async () => { var client = new HttpClient(); //var request = new HttpRequestMessage(HttpMethod.Get, ""http://www.bing.com""); // Works var request = new HttpRequestMessage(HttpMethod.Get, ""http://bing.com""); // Throws exception using (var response = await client.SendAsync(request)) { Console.WriteLine(await response.Content.ReadAsStringAsync()); } }).Wait(); } } ``` The exception thrown: ``` System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.WinHttpException: The requested header was not found at System.Net.Http.WinHttpHandler.WinHttpStatusCallback(IntPtr handle, IntPtr context, UInt32 internetStatus, IntPtr statusInformation, UInt32 stat usInformationLength) --- End of inner exception stack trace --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at ConsoleApp8.Program.<>c.<
b__0_0>d.MoveNext() in C:\AspNet\VS2015Projects\ConsoleApp8\src\ConsoleApp8\Program.cs:line 19 System.Net.Http.WinHttpException: The requested header was not found at System.Net.Http.WinHttpHandler.WinHttpStatusCallback(IntPtr handle, IntPtr context, UInt32 internetStatus, IntPtr statusInformation, UInt32 stat usInformationLength) ``` " 1931 area-Serialization Add support for data contract surrogate type aliasing 1936 area-System.Net System.System.Net.Http.FormUrlEncodedContent(...) can't handle very long parameters/values "FormUrlEncodedContent(IEnumerable>) [uses](https://github.com/dotnet/corefx/blob/5f3cf426df9d41e629a02ee6d8fb32089e35227b/src/System.Net.Http/src/System/Net/FormUrlEncodedContent.cs#L40) Uri.EscapeDataString which internally uses [UriHelper.EscapeString](https://github.com/dotnet/corefx/blob/f969471a5719e901e9147928c9a71ea17d6d7862/src/System.Private.Uri/src/System/UriHelper.cs#L128) which [can't handle](https://github.com/dotnet/corefx/blob/f969471a5719e901e9147928c9a71ea17d6d7862/src/System.Private.Uri/src/System/UriHelper.cs#L131) strings longer than 65520 characters. ``` C# var uc1 = new FormUrlEncodedContent( new Dictionary { {""test"", new string('F', 65520)} } );//works fine var uc = new FormUrlEncodedContent( new Dictionary { {""test"", new string('F', 65521)} } ); //exception ``` " 1942 area-System.Collections Proposal: Dictionary.TryAdd(TKey, TValue) It's very common to see code that does this: ``` C# Dictionary data = ...; ... if (!data.ContainsKey(key)) data.Add(key, value); ``` This forces the dictionary to lookup the key twice when the key isn't yet in the dictionary. It'd be great if we had an additional method on the type: ``` C# public bool TryAdd(TKey key, TValue value); ``` Functionally it would behave exactly as if it were implemented like: ``` C# public bool TryAdd(TKey key, TValue value) { if (ContainsKey(key)) return false; Add(key, value); return true; } ``` but the implementation internally would be done more efficiently, essentially implemented by calling a variant of Insert but that returns false instead of throwing when a duplicate key is found. 1961 area-System.Text Review all remaining samness tests in System.Text.Encodings.Web.Tests There are some tests in the suite that Assert.Same. These need to be reviewed and either removed or we need to ensure the code is synchronizing properly and the tests will not fail. 1963 area-System.Security Add EVP_CIPHER_CTX_new to System.Security.Cryptography.Native Interop.EVP.Cipher.cs: ``` // This was computed by sizeof(EVP_CIPHER_CTX) on a 64-bit Ubuntu // machine running OpenSSL 1.0.1f. If we end up making a native // interop boundary library for OpenSSL then a very good candidate // method would be EVP_CIPHER_CTX_new, so the size can be computed // to match the platform. internal const int EVP_CIPHER_CTX_SIZE = 168; ``` Currently the native library is in dotnet/coreclr; so some mild gymnastics might be required. EVP_CIPHER_CTX_new should allocate the memory and call (OpenSSL) EVP_CIPHER_CTX_init, and have a well-defined free. If gymnastics are required for checking this in, a followup issue to use the new method should be filed. If the native library has moved to dotnet/corefx by the time this is done, then the managed code to consume it should potentially be part of the same change. 1965 area-System.Security AES DecryptorReusabilty.TestDecryptorReusability test is failing on Unix ``` 14:20:43 Finished: System.Security.Cryptography.Encoding.Tests 14:20:43 System.Security.Cryptography.Encryption.Aes.Tests.DecryptorReusabilty.TestDecryptorReusability [FAIL] 14:20:43 Assert.Equal() Failure 14:20:43 Expected: Byte[] [20, 48, 113, 173, 237, ...] 14:20:43 Actual: Byte[] [20, 48, 113, 173, 237, ...] ``` 1967 area-System.Collections [Proposal] IImmutableSet.Union should handle duplicates like ISet.UnionWith The [`ISet.UnionWith`](https://msdn.microsoft.com/en-us/library/dd411713.aspx) method is documented to handle duplicates as follows: > ``` cs > void UnionWith(IEnumerable other) > ``` > > Any duplicate elements in _other_ are ignored. The [`Enumerable.Union`](https://msdn.microsoft.com/en-us/library/vstudio/bb341731.aspx) extension method documents an even stronger condition: > ``` cs > public static IEnumerable Union(this IEnumerable first, IEnumerable second) > ``` > > When the object returned by this method is enumerated, `Union` enumerates _first_ and _second_ in that order and yields each element that has not already been yielded. The `IImmutableSet.Union` method appears to provide the same functionality as the above method, but does not specify the behavior of the result with respect to duplicate elements. In the current implementation of `ImmutableSortedSet`, the `Union` operation behavior varies depending on the relative size of the `this` and `other` sequences. This could be confusing for users expecting the elements of the `this` sequence to take precedence. I propose defining the behavior with respect to duplicates partially (to match `ISet.UnionWith`) or fully (to match `Enumerable.Union`), and updating the implementation of `ImmutableSortedSet` to follow the new behavior. 1973 area-System.Collections Please add interface IReadOnlySet and make HashSet, SortedSet implement it "Since `IReadOnlyList` was added the parity between sets and lists has declined. It would be great to re-establish it. Using it would be an implementation-agnostic way of saying: ""here is this read-only collection where items are unique"". Clearly it's needed by many people: SQL Server: https://msdn.microsoft.com/en-us/library/gg503096.aspx Roslyn: https://github.com/dotnet/roslyn/blob/master/src/Compilers/Core/Portable/InternalUtilities/IReadOnlySet.cs Some Guy In Comments: http://blogs.msdn.com/b/bclteam/archive/2013/03/06/update-to-immutable-collections.aspx " 1975 area-System.Net Fixes issues with the System.Net.Http tests - Tests were not running because the directories were not named properly. - Rename test project to match the correct name. - Fix typo in resource strings. 1985 area-System.Security X509DistinguishedName::Format returns different answers on Windows and Unix The most concrete example is that OID(2.5.4.8) displays in Windows as 'S', but on Unix (OpenSSL) as 'ST'. This is related to https://www.github.com/dotnet/corefx/issues/1813, but a targeted fix for that issue would not fix this, and vice versa. 1991 area-System.IO Improve memory allocations of DeflateStream We use GZipStream to handle the data sent on the wire to a WebAPI with both big and small requests. The allocation stress is more evident with small packages though. On a sample of 60 seconds in an stress test we measured that System.IO.Compression.OutputWindow.ctor() and System.IO.Compression.DefrateStream.ctor() would be consistently in the top 5 allocators. Between the two 1.8Gb in allocations in 60 seconds. The root is that DefrateStream will create on every construction (1 per request) an Infrater (https://github.com/dotnet/corefx/blob/master/src/System.IO.Compression/src/System/IO/Compression/DeflateStream.cs#L62) and the Infrater will also build an OutputWindow (https://github.com/dotnet/corefx/blob/master/src/System.IO.Compression/src/System/IO/Compression/OutputWindow.cs). Which in turn will allocate 32Kb to use as a buffer for each request. Reusing those buffers and/or OutputWindow would aleviate a lot the allocation stress GZipStream causes when used in small streams contexts like Web APIs. 1993 area-System.Security [Feature] Finish X509Certificate support for Unix The current Unix X509 code was to the level that it needed to be to allow presenting an SSL wire cert for verification. This needs to be completed. The functions which currently throw a `NotImplementedException` are ``` Internal.Cryptography.Pal.CertificatePal::CertificatePal.FromFile(string, string, X509KeyStorageFlags) Internal.Cryptography.Pal.CertificatePal::CertificatePal.FromHandle(IntPtr) Internal.Cryptography.Pal.OpenSslX509CertificateReader::OpenSslX509CertificateReader.Archived.set(bool) Internal.Cryptography.Pal.OpenSslX509CertificateReader::OpenSslX509CertificateReader.FriendlyName.set(string) Internal.Cryptography.Pal.OpenSslX509CertificateReader::OpenSslX509CertificateReader.SetPrivateKey(AsymmetricAlgorithm, AsymmetricAlgorithm) Internal.Cryptography.Pal.OpenSslX509ChainProcessor::OpenSslX509ChainProcessor.ChainElements.get() Internal.Cryptography.Pal.OpenSslX509ChainProcessor::OpenSslX509ChainProcessor.ChainStatus.get() Internal.Cryptography.Pal.OpenSslX509ChainProcessor::OpenSslX509ChainProcessor.Verify(X509VerificationFlags, Exception) Internal.Cryptography.Pal.OpenSslX509Encoder::OpenSslX509Encoder.ComputeCapiSha1OfPublicKey(PublicKey) Internal.Cryptography.Pal.OpenSslX509Encoder::OpenSslX509Encoder.DecodePublicKey(Oid, byte[], byte[]) Internal.Cryptography.Pal.OpenSslX509Encoder::OpenSslX509Encoder.DecodeX509BasicConstraintsExtension(byte[], bool, bool, int) Internal.Cryptography.Pal.OpenSslX509Encoder::OpenSslX509Encoder.EncodeX509BasicConstraints2Extension(bool, bool, int) Internal.Cryptography.Pal.OpenSslX509Encoder::OpenSslX509Encoder.EncodeX509EnhancedKeyUsageExtension(OidCollection) Internal.Cryptography.Pal.OpenSslX509Encoder::OpenSslX509Encoder.EncodeX509KeyUsageExtension(X509KeyUsageFlags) Internal.Cryptography.Pal.OpenSslX509Encoder::OpenSslX509Encoder.EncodeX509SubjectKeyIdentifierExtension(byte[]) Internal.Cryptography.Pal.OpenSslX509Encoder::OpenSslX509Encoder.GetCertContentType(byte[]) Internal.Cryptography.Pal.OpenSslX509Encoder::OpenSslX509Encoder.GetCertContentType(string) Internal.Cryptography.Pal.OpenSslX509Encoder::OpenSslX509Encoder.X500DistinguishedNameEncode(string, X500DistinguishedNameFlags) Internal.Cryptography.Pal.OpenSslX509Encoder::OpenSslX509Encoder.X500DistinguishedNameFormat(byte[], bool) Internal.Cryptography.Pal.OpenSslX509StoreProvider::OpenSslX509StoreProvider.Add(ICertificatePal) Internal.Cryptography.Pal.OpenSslX509StoreProvider::OpenSslX509StoreProvider.Export(X509ContentType, string) Internal.Cryptography.Pal.OpenSslX509StoreProvider::OpenSslX509StoreProvider.Remove(ICertificatePal) Internal.Cryptography.Pal.StorePal::StorePal.FromBlob(byte[], string, X509KeyStorageFlags) Internal.Cryptography.Pal.StorePal::StorePal.FromCertificate(ICertificatePal) Internal.Cryptography.Pal.StorePal::StorePal.FromFile(string, string, X509KeyStorageFlags) Internal.Cryptography.Pal.StorePal::StorePal.FromSystemStore(string, StoreLocation, OpenFlags) Internal.Cryptography.Pal.StorePal::StorePal.LinkFromCertificateCollection(X509Certificate2Collection) ``` 1994 area-System.Net System.Net.Http package doesn't target 4.5.x TFMs in latest build "I'm using System.Net.Http-4.0.0-beta-23008 (afaik, the latest) and the TFMs in the package are ""DNXCore50"", ""netcore50"", and ""net46"". `lib/net46` directory in the latest package contains nothing but a `_._` empty file. Should there be a TFM for `dnx451` or similar? " 2003 area-Infrastructure Add option for building corefx in deterministic mode Roslyn will support compiling in [deterministic mode](https://github.com/dotnet/roslyn/issues/372) where same inputs generate same outputs. There should be an option of building corefx in this mode. Note: this depends on the deterministic build feature being implemented in Roslyn, there's nothing actionable for corefx for now, but I wanted to have something to track :) 2008 area-System.Security X509's Helpers::HexToByte needs to signal invalid input "Because HexToByte doesn't signal on invalid input DecodeHexString returns a byte[] for non-hex inputs. So when the FindByInvalidThumbprint test runs (and searches for ""Nothing"") that is the same as searching for `new byte[] { 0xFF, 0xFF, 0xFF, 0xFF }`. A more marginal case would be that ""00FZ00"" becomes `{ 0x00, 0xFF, 0x00 }`, which could cause some interesting wrong matches for things like FindBySerialNumber. As the Find API returns no matches (vs throwing exception) on invalid input, the Decode probably should be redone to TryDecode, giving the helper routines the knowledge that they should just return no match. " 2009 area-System.Security SyncRoot and IsSynchronized on X509 collections should be explicitly implemented (private) I noticed that [`X509ChainElementCollection`](https://github.com/dotnet/corefx/blob/master/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509ChainElementCollection.cs#L24-L32) and [`X509ExtensionCollection`](https://github.com/dotnet/corefx/blob/master/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509ExtensionCollection.cs#L28-L36) implement `ICollection`'s `SyncRoot` and `IsSynchronized` properties implicitly (public). These should be explicit (private). I believe this is a compatible change from a subsetting perspective (between desktop and corefx) as this was done on the Regex collections, for example. Other collections in this assembly, like [`X509CertificateCollection`](https://github.com/dotnet/corefx/blob/master/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509CertificateCollection.cs#L43-L54) already implement these properties explicitly (private). I'd be happy to submit a PR. cc @bartonjs 2011 area-System.IO Several FileSystemWatcher tests are failing on OSX Expected events are not being raised for at least: - FileSystemWatcher_Changed_LastWrite_File - FileSystemWatcher_Changed_LastWrite_Directory - FileSystemWatcher_Created_MoveDirectory A Debug.Assert in FindRenameChangePairedChange is also firing for the MoveDirectory test: 2022 area-System.IO What about adding interfaces to FileInfo and DirectoryInfo? When testing it would be nice to be able to mock the filesystem. Would a PR introducing interfaces be accepted? 2028 area-System.Collections Inconsistent, unexpected bounds check in RemoveRange - `ImmutableArray.RemoveRange` requires 0<=index.RemoveRange` requires 0<=index.Builder.ToImmutable Currently the documentation for `ImmutableList.Builder.ToImmutable()` includes the following remark: > This method is an O(n) operation, and approaches O(1) time as the number of actual mutations to the set since the last call to this method approaches 0. The problem with this statement is the complexity of this operation is only O(1) when the number of mutations is _exactly_ equal to 0. As the number of mutations _approaches_ 0, the complexity is actually approaching O(log n). 2036 area-System.Collections Exposed Immutable Collections APIs should allow `null` comparers Several immutable collections APIs throw an `ArgumentNullException` if a null `IComparer` or `IEqualityComparer` is provided. This is not intuitive, and deviates from a very common pattern established by the .NET framework. All publicly-exposed API methods in this assembly should be updated to ensure the following: 1. If a null value is provided for `IComparer`, `Comparer.Default` should be used instead. 2. If a null value is provided for `IEqualityComparer`, `EqualityComparer.Default` should be used instead. 2046 area-System.IO How to implement System.IO.FileSystem.Watcher on FreeBSD This issue is to discuss how we can implement `System.IO.FileSystem.Watcher` on FreeBSD which does not have inotify: - [ ] Determine/discuss if this be a source of trouble? - [ ] We could stub it out at the moment and throw a PlatformNotsupportedException as suggested in by Stephen - https://github.com/dotnet/corefx/pull/2021#issuecomment-111602342 - [ ] Implement proper solution using kqueue/libev? Any recommendations here are very much welcome. # Reference Material - https://www.freebsd.org/cgi/man.cgi?query=kqueue - http://software.schmorp.de/pkg/libev.html - http://libevent.org/ # Related Issues - https://github.com/dotnet/corefx/issues/1626#issuecomment-111975933 - https://github.com/dotnet/corefx/issues/1626#issuecomment-111975140 2051 area-System.Reflection [PortablePdb] Local signature in method body, entry point, #Pdb stream Adds local signature token to method body, so that PDB readers have access to them without loading IL stream. Adds a new #Pdb stream to standalone debug metadata that includes sizes of type-system tables referenced by the debug metadata tables. Replaces entry point CDI with an entry in #Pdb stream. 2053 area-Serialization Fix exception message differences when deserializing empty string There is differences in the exception message when deserializing empty string using DataContractSerializer in NetCore/NetNative compared to Desktop. This is due to XmlDictionaryReader uses different kind of XmlReader in one of the CreateTextReader overloads. This PR updates the overload to initialize to the same XmlUtf8TextReader. 2058 area-System.Reflection Merge branch 'master' of https://github.com/dotnet/corefx into dev/metadata 2061 area-System.Reflection [MetadataReader] document format and constrains of -Ptr tables InitializeTableReaders method contains the following code: ``` C# // Compute ref sizes for tables that can have pointer tables int fieldRefSizeSorted = GetReferenceSize(rowCounts, TableIndex.FieldPtr) > SmallIndexSize ? LargeIndexSize : GetReferenceSize(rowCounts, TableIndex.Field); int methodRefSizeSorted = GetReferenceSize(rowCounts, TableIndex.MethodPtr) > SmallIndexSize ? LargeIndexSize : GetReferenceSize(rowCounts, TableIndex.MethodDef); int paramRefSizeSorted = GetReferenceSize(rowCounts, TableIndex.ParamPtr) > SmallIndexSize ? LargeIndexSize : GetReferenceSize(rowCounts, TableIndex.Param); int eventRefSizeSorted = GetReferenceSize(rowCounts, TableIndex.EventPtr) > SmallIndexSize ? LargeIndexSize : GetReferenceSize(rowCounts, TableIndex.Event); int propertyRefSizeSorted = GetReferenceSize(rowCounts, TableIndex.PropertyPtr) > SmallIndexSize ? LargeIndexSize : GetReferenceSize(rowCounts, TableIndex.Property); ``` It's not clear if any of these conditions are ever true. I'd think that the size of XxxPtr table is always the same as the corresponding Xxx table, since the Ptr table is used as an index. It might make sense that XxxPtr table is smaller than the Xxx table. But I don't see how it can have more rows. Do we have tests that cover these? 2064 area-System.Runtime INumber or INumeric interface for base number types I often run into the problem that I want to handle numeric base types in a common way. Unfortunately, they are missing a common interface to express their similarities. Therefore I propose to create an `INumber` or `INumeric` interface on the following numeric base types: - `System.Decimal` - `System.Double` - `System.Single` - `System.Int32` - `System.UInt32` - `System.Int64` - `System.UInt64` This interface should define common functionality, like `+`, `-`, `*`, `/`, etc. 2065 area-System.Data Are DataColumn, DataTable and DescriptionAttribute supported with ASP .Net Core ? I am trying to compile my existing app with ASP .Net Core 5.0. During compilation several error we are getting error like : error CS0246: The type or namespace name 'DescriptionAttribute' could not be found (are you missing a using directive or an assembly reference?) etc. Aren't these supported ? 2069 area-System.Reflection Disable tests failing in internal build Tracked by #1787 2070 area-System.Diagnostics How to implement System.Diagnostics.Process on FreeBSD? This issue is to discuss how we can implement `System.Diagnostics.Process` on FreeBSD which does not have procfs by enabled by default as [it should be considered deprecated.](http://lists.freebsd.org/pipermail/freebsd-fs/2011-February/010760.html) # Reference Material - [Implement basic System.Diagnostics.Process.Modules support on Linux #2188](https://github.com/dotnet/corefx/pull/2188#issuecomment-116671221) - The System.Diagnostics.Process [specification on MSDN.](https://msdn.microsoft.com/en-us/library/system.diagnostics.process%28v=vs.110%29.aspx) - The [FreeBSD process information implementation within Mono](https://github.com/mono/mono/blob/master/mono/io-layer/processes.c#L1888-L1910) (LGPL) - The [FreeBSD process information implementation within IO.JS](https://github.com/nodejs/io.js/blob/master/deps/uv/src/unix/freebsd.c) (MIT) - https://www.freebsd.org/cgi/man.cgi?procstat and https://www.freebsd.org/cgi/man.cgi?sysctl(3) ``` KERN_PROC Return selected information about specific running processes. For the following names, an array of struct kinfo_proc structures is returned, whose size depends on the current number of such objects in the system. Third level name Fourth level is: KERN_PROC_ALL None KERN_PROC_PID A process ID KERN_PROC_PGRP A process group KERN_PROC_TTY A tty device KERN_PROC_UID A user ID KERN_PROC_RUID A real user ID If the third level name is KERN_PROC_ARGS then the command line argument array is returned in a flattened form, i.e., zero-termi- nated arguments follow each other. The total size of array is returned. It is also possible for a process to set its own process title this way. If the third level name is KERN_PROC_PATHNAME, the path of the process' text file is stored. For KERN_PROC_PATHNAME, a process ID of -1 implies the current process. Third level name Fourth level is: KERN_PROC_ARGS A process ID KERN_PROC_PATHNAME A process ID ``` /cc: @janhenke @saper @jasonwilliams200OK @josteink 2075 area-System.Linq Append/Prepend "## Summary Two of the IEnumerable extension methods that I carry in my collection (we all have a personal collection of IEnumerable extension methods, am I right?) are Append and Prepend, for adding a single element to the end or beginning of a sequence respectively. Though not quite as common as concatenating sequences, I have been surprised at how often this need arises. Doing this inside of an expression today is not straightforward; the best equivalent that I have found is far from ideal: ``` sequence.Concat(Enumerable.Repeat(singleValue, 1)) ``` I propose adding Prepend and Append extension methods to Enumerable to fill this need. ## API ``` public static class Enumerable { public static IEnumerable Append(this IEnumerable source, T value); public static IEnumerable Prepend(this IEnumerable source, T value) } ``` ## Usage ``` optionalValues.Prepend("""") ``` " 2076 area-System.Linq Sorting sequences ## Summary There are two scenarios where the existing Enumerable OrderBy methods are not ideal: - When sorting a sequence of comparable values (e.g. ints). In this case an identify function must be provided as the key selector: `ints.Sort(x => x)` - When sorting on something other than a single key, an identity function must be provided to select the element as the key, AND an instance of IComparer must be provided, which is at odds with the majority of LINQ methods which take functions (and are therefore easier to use with lambda expressions): ``` using NodaTime; using NodaTime.TimeZones; ... IEnumerable tzs = ...; var tzEqComparer = new ZoneEqualityComparer(); tzs = tzs.OrderBy(x => x, Comparer.Create((tz1, tz2) => tzEqComparer.Equals(tz1, tz2) ? 0 : tz1.Id.CompareTo(tz2.Id)); ``` I propose adding various overloads of Sort to address these situations. The name Sort is chosen specifically to distinguish these methods, which do not take a key selector, from the OrderBy methods, which do. If this is not considered an important distinction, the names could be changed to OrderBy without colliding with the existing methods. ## API ``` public static class Enumerable { public static IOrderedEnumerable Sort(this IEnumerable source) where T : IComparable public static IOrderedEnumerable Sort(this IEnumerable source, IComparer comparer) public static IOrderedEnumerable Sort(this IEnumerable source, Comparison comparison) public static IOrderedEnumerable SortDescending(this IEnumerable source) where T : IComparable public static IOrderedEnumerable SortDescending(this IEnumerable source, IComparer comparer) public static IOrderedEnumerable SortDescending(this IEnumerable source, Comparison comparison) public static IOrderedEnumerable ThenSort(this IOrderedEnumerable source) where T : IComparable public static IOrderedEnumerable ThenSort(this IOrderedEnumerable source, IComparer comparer) public static IOrderedEnumerable ThenSort(this IOrderedEnumerable source, Comparison comparison) public static IOrderedEnumerable ThenSortDescending(this IOrderedEnumerable source) where T : IComparable public static IOrderedEnumerable ThenSortDescending(this IOrderedEnumerable source, IComparer comparer) public static IOrderedEnumerable ThenSortDescending(this IOrderedEnumerable source, Comparison comparison) } ``` ## Usage ``` ints.Sort() ``` ``` using NodaTime; using NodaTime.TimeZones; ... IEnumerable tzs = ...; var tzEqComparer = new ZoneEqualityComparer(); tzs = tzs.Sort((tz1, tz2) => tzEqComparer.Equals(tz1, tz2) ? 0 : tz1.Id.CompareTo(tz2.Id)); ``` ## Questions 1. The generic restriction to IComparable is not necessary if the implementation will delegate to OrderBy with an identity function (although there are other potential implementations). However, even if not strictly necessary, it clearly expresses the intent of the method. Is there a downside to keeping it? 2. Overloads that take an IComparer are included for parity with OrderBy. Between the two, I prefer the overload that takes the Comparison, since converting an IComparer into a Comparison is more straightforward than going the other way. However, I am not aware of the rationale behind using IComparer instead of Comparison in the OrderBy methods. We should consider whether the same rationale applies to Sort, or whether it might make sense to remove the IComparer overloads to reduce the API surface. 3. Should the OrderBy methods have overloads added that take Comparison for parity? Or is there something about the usage pattern of selecting a key that makes it less likely that a comparison function will be provided inline? (This is the inverse of question 2). 4. What about Queryable? 2077 area-Serialization Support JSON-LD in DataContractJsonSerializer There is an issue raised by dotnet/wcf#28 requesting support for JSON-LD. If more info is needed, @akuckartz would be a good person to start with, as the original issue-raiser. It would be great to hear from the community if JSON-LD is useful so this work can be prioritized appropriately. Thanks! 2081 area-Serialization Update NetCore DCJS to use the same code with NetNative DCJS DCJS implementation in NetCore at the moment is based on the JavascriptSerializer/Deserializer which is rather different from the ones used in NetNative and on Desktop. This introduces unneccessary effort in making improvement and providing consistent behaviors. This change switches DCJS in NetCore to the same code that is used in NetNative with MERGE_DCJS directive. If there is no issues I will follow to clean up this directive and unused code. @SGuyGe @zhenlan @roncain @shmao 2085 area-Serialization Fix serialization of generic queue to align with NetNative Generic queue is serialized differently in NetCore compared to NetNative since it skips the queue's _syncRoot property of type object. This change is to fix the behavior when serializing property of type object in general. As Serialization of generic queue on desktop is controlled with Serializable, NonSerialized attributes, which are not available in NetCore, this results in a different load compared to desktop. I have verified that cross platform serialization/deserialization works fine. cc: @SGuyGe @zhenlan @shmao 2093 area-System.ComponentModel Can `sealed` modifier be removed from `DisplayAttribute`? I'm redirected here from MVC6 repo (https://github.com/aspnet/Mvc/issues/2706). In MVC6 we are meant to use `DisplayAttribute` to define human readable texts for model's properties. In earlier versions, MVC was using `DisplayNameAttribute` and it could be inherited, so developers were overriding it and customizing texts, messages, labels on the air (like translating or formatting them etc.). Now MVC6 uses .NET's `DisplayAttribute` for this use and it's sealed and unfortunately we are restricted here now. Is it possible to remove the `sealed` modifier from this attribute? So I think the frameworks using this attribute will be more customizable. 2101 area-System.Reflection Add TypeInfo.IsEquivalent(TypeInfo) to CoreFx It is currently not possible to write a library that compares types correctly (considering NoPIA interface unification) and that works on both Desktop CLR and CoreCLR without calling Type.IsEquivalentTo via Reflection on Desktop. 2102 area-System.Text Consider adding StringBuilder.AppendEncoded(Encoding encoding, byte* bytes, int byteCount) In general Encoding APIs don't compose well with other fundamental APIs without allocating temporary blobs/strings in between. 2103 area-System.Globalization How should we handle default data for Globalization tests? "In .NET Core, a large portion of the implementation of our globalization code is built on-top of OS primitives. which we don't control. Globalization data changes frequently and updates to the data can break unit tests. Some examples of changes we've had problems with in the past: 1. Collation data changing across releases and platforms, causing sorting tests to break. 2. Locale data changing (e.g a locale adopts a new currency symbol) causing test breaks. 3. Casing data changes, breaking ToUpper/ToLower tests. 4. Different platforms supporting different version of IDNA. In our internal tests, we've taken a few approaches to solving these problems: 1. Implementing another set of (hopefully lightweight) P/Invokes on-top of OS Functions and using them to generate the expected data at runtime. 2. Disabling specific tests (by hand) on specific platforms or changing the expected data for a specific platform via a runtime test. 3. Encoding metadata about the version of Unicode a platform supports and the version a test requires and skipping tests if they don't match. As I start to open source more of our collation tests, I'm running into problems where we depend on support libraries that implement the OS behavior from (1). It's not clear to me that adopting this is the right long term approach. There's a bunch of platform specific code in these support libraries which will also have to be brought cross platform. The library also contains a fair amount of logic itself. My general preference would be to do something like the following: 1. Use XUnit data driven tests (i.e. `[Theory]`) to write tests that decouple the implementation of the test from the input data. 2. Using `[MemberData]` control the set of inputs that flow to each test based on runtime platform detection. For example, consider something like the following: ``` csharp [Theory] [MemberData(""CompareToData"")] public static void CompareTo(string localeName, string left, string right, int expected, CompareOptions options) { CompareInfo ci = CompareInfo.GetCompareInfo(localeName); int result = ci.Compare(left, right, options); Assert.Equal(expected, Math.Sign(result)); } public static IEnumerable CompareToData { get { yield return new object[] { """", ""Works Everywhere"", ""WORKS EVERYWHERE"", 0, CompareOptions.IgnoreCase }; if (PlatformDetection.IsWindows) { yield return /* ... some set of data that only works on Windows ... */; } } } ``` Will will also need the ability to run certain cases on a specific version of Windows (since behavior changes between versions) or a specific version of ICU. However, I would expect the general shape of the tests would remain the same (`[Theory]`'s + `[MemberData]`'s) and the only thing that would differ would be the filtering we use when deciding if we include a test case in the MemberData. I think there are two downsides with this approach: 1. Bringing a new version of an existing platform online is more expensive. Since we no longer call to the OS to get our oracle data, we will need to investigate test failures to understand if there are product bugs or simply changes in OS algorithms. 2. `[Theory]` is slower than simply having a ton of a `Assert`'s for different cases (or doing a loop) in one `[Fact]`. The major slowdown was in test discovery. As an experiment (and to ease some debugging for some work I was doing), I ported the [NormalizationAll](https://github.com/dotnet/corefx/blob/master/src/System.Globalization.Extensions/tests/Normalization/NormalizationAll.cs) test to use `[Theory]` and the test which used complete very quickly now take about a minute to run (There are 72K test cases, XUnit reports that it took 10.6 seconds to execute the tests (compared to 1.5 when using a loop), but that didn't count the ~50 seconds to discover the tests). It also appears that much of this time is spent even if the tests would not be run (e.g due to `[ActiveIssue]` or `[OuterLoop]`). Ideally this could be fixed, but I am not sure, naively it feels weird that you pay an order of magnitude penalty in test execution because of Theory, but I have not dug into the internals of xUnit. The mitigation here is to not use [Theory] when doing so would generate tons of cases, I guess, and just do a loop ourselves (ideally still over something like a member data API). I'm not sure if these are dealbreakers or not. (2) seems bad, but is a general problem for us adopting Theory for large data-sets, which seems to be a a problem for more than just globalization. I also really hope that we can adopt something like this, since it makes reporting for data driven tests so much nicer. I'm interested in what @stephentoub and @tarekgh think here. Does the pain of OS Data updates make the OS Wrapper library the right approach, even if it brings in a lot of extra code and causes a another large amount of work when we bring up a new platform? Is the fixed data + filtering approach a better long term direction? Do we need both for some reason? " 2106 area-System.Security Proposal: Add Ed25519 and Curve25519 Algorithms to System.Security.Cryptography The System.Security.Cryptography namespace contains several commonly used cryptographic algorithms. I propose the addition of two commonly used algorithms which are currently missing: - **Ed25519** is an implementation of an _Edwards-curve Digital Signature Algorithm_. - **Curve25519** is an algorithm designed to be used with _elliptic curve Diffie-Hellman (ECDH) key exchange algorithm_. Both are based on the same elliptic curve. Many open source projects (e.g. OpenSSH, OpenBSD) seem to prefer this elliptic curve for use in elliptic curve cryptography (ECC). It is therefore beneficial to have these algorithms implemented in CoreFX. The two algorithms should be included in the existing classes in the `System.Security.Cryptography` namespace, but it must be possible to explicitly ask for the usage of these algorithms. 2108 area-Meta Where should ref docs and associated samples be stored? Ideally, they would live in the code repo. Thoughts? For clarity, ref docs augment the metadata and /// comments already available in the repo/builds. Many topics won't have ref topics. @blackdwarf, @danroth27 In reference to #2107 2109 area-System.Reflection Add System.Reflection.Metadata.Test.Desktop, which targets FX 4.6 and Xunit 1.9.2 This makes it possible to run and debug tests in VS. Caveats: can't use Theory attribute since it's not available in Xunit 1.9.2 2110 area-System.Reflection TD.NET doesn't work well with shared projects, replacing with manual sharing 2114 area-System.Linq Enumerable.SequenceEqual takes IEqualityComparer rather than a predicate Why does [Enumerable.SequenceEqual](http://msdn.microsoft.com/en-us/library/vstudio/bb342073.aspx) take its comparer as an [IEqualityComparer](http://msdn.microsoft.com/en-us/library/vstudio/ms132151.aspx)? The algorithm seems to make no use of [GetHashCode](http://msdn.microsoft.com/en-us/library/vstudio/ms132155.aspx). Why does it not instead take a `Func` predicate, similar to how [First](http://msdn.microsoft.com/en-us/library/vstudio/bb535050.aspx) takes a `Func`? 2119 area-System.Runtime Make all structs that claim to be thread-safe dereference `this` at most once per entrypoint `ImmutableArray` goes to great lengths to be thread-safe by [never dereferencing `this` more than once per public entrypoint](https://github.com/dotnet/corefx/blob/1dc118cc46f88e4889a23190b450d89e565967fd/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray%601.cs#L18-L33) (to fix bug #191). Other structs in the Framework do _not_ take this care (such as `DateTime`, `Nullable`, or `System.Int32`), despite [claiming to be thread-safe in MSDN documentation](https://msdn.microsoft.com/en-us/library/System.DateTime%28v=vs.110%29.aspx). Should we take the same care for the other structs? The community [has been fascinated](http://stackoverflow.com/questions/30957211/what-advantage-is-there-to-storing-this-in-a-local-variable-in-a-struct-method/30957262) by the pattern in `ImmutableArray` and brought up that it might make sense to spread it around more. 2121 area-System.Reflection Implements fast document name comparison, parsing, and general case-insensitive string comparison 2124 area-Infrastructure We need a way to run tests on different runtime We need a way to choose between different platforms when running tests. Example proposition: ``` build /p:TestProduct=Desktop ``` 2127 area-System.Collections Consider adding KeyValuePair type with a factory method For better or worse KeyValuePair is frequently used structure to represent a pair (mostly due to the lack of struct tuples). It is currently inconvenient to create these pairs as one needs to specify type arguments to the constructor. A simple factory method would make it more succinct since the C# and VB compilers can usually infer the generic arguments: ``` C# public static class KeyValuePair { public static KeyValuePair Create(K key, V value) { return new KeyValuePair(key, value); } } ``` this pattern is already used by ImmutableArray. 2129 area-Serialization Fix Jit assert failure in struct serialization tests due to missing cast This change fixes 3 struct serialization test Jit assert failures due to missing cast in IL generated code. cc: @zhenlan @SGuyGe @shmao 2135 area-Infrastructure Reenable build multithreading once dnx issues are fixed Once dnx concurrency issues are fixed, reenable project multithreading. Currently disabled in CI using /p:SerializeProjects=false. 2139 area-System.Net Merge changes from TFS 2146 area-System.Linq Add commonly required Enumerable methods (DistinctBy, ExceptBy, AsChunked, ...) We have Distinct, Except, Intersect, Union, etc. Often it is required, though, to base the set operation on some key. OrderBy can do that for example. I request that the following methods be added: - DistinctBy (pick the first element deterministically for each key) - ExceptBy (return all items of the first sequence that do not have a matching key in the second) - IntersectBy (return the first item in a.Concat(b) for each unique key where the key appears in both collections) - UnionBy (return the first item in a.Concat(b) for each unique key) - MaxBy/MinBy The set operations need to deal with duplicate keys in a sensible way. I have added to that list my idea for how to do that in sane and well-defined way.
Another commonly required helper method is one that splits a sequence into chunks of a fixed size: ``` static IEnumerable> AsChunked(this IEnumerable sequence, int chunkSize) ``` This is useful for many things, for example: - Split a list into pages - Make AsParallel operate on coarser items by feeding it chunks - If you want to save a huge stream of items to files you can use this to split the sequence into one chunk per file - Request rows from the database in chunks of 1000 IDs This requirement comes up on Stack Overflow a lot and there is no built-in way to do it. The chunks should be drawn lazily. In fact the items of each chunk should be lazy as well. This allows for very big chunks such as 1 billion items per chunk. Maybe we need two variants: 1. `IEnumerable> AsChunkedLazy` 2. `IEnumerable AsChunkedEager` The second one would be easier to handle for consumers. The first one requires more disciplined use because each chunk must be enumerated at most once and the chunks must be enumerated in order. This is required for an efficient streaming operation. 2149 area-System.Net Initial open source WinHttpHandler This is the initial open sourcing of the System.Net.Http.WinHttpHandler package. This commit also includes a fully buildable System.Net.Http.dll binary as well as System.Net.Http.WinHttpHandler.dll binary. Unit tests are included as well. There is a skeleton file for beginning cross-platform work on System.Net.Http. 2150 area-Infrastructure Unit tests on Windows run on 32-bit CoreCLR We are using a 32bit coreclr to run all of our tests when running on windows. This is different from what we do for OSX and Linux (where we use the 64 bit version of the runtime built from [dotnet/coreclr](https://github.com/dotnet/coreclr)). I believe because of this we also don't get coverage on any of the RyuJIT specific optimizations around Vectors as part of our unit tests. I think it would be ideal if we also ran tests on a 64 bit runtime and it corresponded to some LKG build from [dotnet/coreclr](https://github.com/dotnet/coreclr). /cc @stephentoub 2151 area-System.Reflection Fix incorrect MethodSpec signature header check There was some confusion in untested code around ELEMENTTYPE_GENERICINST vs. CALLCONV_GENERICINST cc @tmat 2152 area-System.Xml [Perf] Fix XmlDocument/XPath to properly compare strings by ref "XmlDocument/XPath when comparing namespaces it uses fixed string object (from private class defined in XmlConst.cs). During the split of System.Xml.dll to smaller libraries (XmlDocument, ReaderWriter, XPath, XPath.XmlDocument) we introduced shared XmlConst.cs file for those constants and thus different references for those strings. To optimize implementation is comparing built-in namespaces by reference and thus in some cases it doesn't work properly and causes some undefined behavior. The cases which were breaking tests were already fixed although there are some other broken scenarios which got introduced when running product on Desktop (runtime). Steps: - [x] Workaround to not compare by ref (one line change in Ref.cs) to unblock Desktop ASAP (we are gonna lose some perf but correctness is more important than perf) - https://github.com/dotnet/corefx/pull/2154 - [ ] Make sure there is only one copy of string constants in one of the libraries (ReaderWriter or XmlDocument) and other libraries should get the valid and needed references to string some other way (i.e. through XmlDoc's NameTable or exposing something new in the contract if NameTable is too slow or not possible) - [ ] Re-enable comparison by ref and validate it is passing when running on Desktop runtime (on Win 10) and coreclr **Except for the first checkbox it is up for grabs** Please revert Ref.cs to its original form with the last checkbox: ``` csharp public static bool Equal(string strA, string strB) { #if DEBUG if (((object)strA != (object)strB) && string.Equals(strA, strB)) System.Diagnostics.Debug.Fail(""Ref.Equal: Object comparison used for non-atomized string '"" + strA + ""'""); #endif return (object)strA == (object)strB; } ``` " 2153 area-System.Net Eliminate closure allocations in System.Net.Http 2155 area-System.Net System.Net.Http.dll should throw NotImplementedException instead of DllNotFoundException When sending HTTP request with HttpClient on CoreCLR + *nix, the following exception is thrown: ``` Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'winhttp.dll': Error 126 (Exception from HRESULT: 0x8007007E) at System.Net.Http.Interop.WinHttpSetStatusCallback(SafeInternetHandle handle, WINHTTP_STATUS_CALLBACK callback, UInt32 notificationFlags, IntPtr reserved) at System.Net.Http.WinHttpHandler.SetStatusCallback(SafeInternetHandle requestHandle, WINHTTP_STATUS_CALLBACK callback) at System.Net.Http.WinHttpHandler.d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.AsyncMethodBuilderCore.b__4(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() libc++abi.dylib: terminating with uncaught exception of type PAL_SEHException Abort trap: 6 ``` It is better to use a more friendly exception. 2159 area-System.Linq Overridden ToString not being called (IOrderedQueryable) I have a class which implements `IOrderedQueryable`. With DNX 4, I can print out my LINQ queries as described in [this LINQ provider tutorial](http://blogs.msdn.com/b/mattwar/archive/2007/07/31/linq-building-an-iqueryable-provider-part-ii.aspx) (i.e. `Console.WriteLine(ExampleQueryable.Where(x => ...))` should call the overridden `ToString()` on my class implementing `IOrderedQueryable`). It works fine in DNX 4, but with DNX Core, it skips my overridden `ToString()` completely (I tested this by placing a breakpoint), and instead seems to be calling `ToString()` on `System.Object`. 2165 area-System.Net Follow-up feedback/action items for WinHttpHandler This issue is capturing feedback from the PR which copied the sources of WinHttpHandler into GitHub. https://github.com/dotnet/corefx/pull/2149 While most of the original feedback was addressed in the PR, some feedback action items are deferred and are being tracked in this issue. - [x] Review use of SafeWinHttpHandle. Check for leaks etc. - Tracking with #2501 - [x] Review TODO's in code. - Done. All TODO's have separate issues. - [x] Consolidate use of Safe*Handle code especially SafeHandleZeroOrMinusOneIsInvalid classes - Tracking with #2501 - [x] Optimize error handling around chain.Build(). - Done #4910 - [x] Optimize closures in Task related lambdas - Done #3867 - [x] Optimize use of TaskCompletionSource regarding `RequestState` - Done #3867 - [x] Propagate `CancellationToken` in calls to `TrySetCanceled` Fixed w/ #2608 - [x] Pass `CancellationToken` to `CopyToAsync` - Considered but `HttpContent.CopyToAsync` does not have an overload that takes a `CancellationToken`. - [x] Consider moving `HRESULT_FROM_WIN32` method to Common/Interop folder. - Done #2511 - [x] Consider change DLL import signature of `GetModuleHandle` to return `SafeHandle` or use `GetModuleEx` with `GET_MODULE_HANDLE_EX_FLAG_PIN` or `GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT` - Considered but there are no race conditions since the 'winhttp.dll' is always loaded during the use of the WinHttpHandler class. - [x] Add UnitTests to test fix with proxy authentication and redirection for PR #2463 - [x] Move duplicate code in WinHttpCertificateHelper.cs and merge with similar code used in System.Net.Security - Tracked in #14542. - [x] Optimize auth scheme lookups in WinHttpAuthHelper.cs - WON'T FIX. - [x] Register callback on cancellation token to cancel WinHTTP operation for WinHttpRequestStream, WinHttpResponseStream - Issue #8627 for WinHttpResponseStream - [x] Add logging for failures in classes such as WinHttpResponseParser, WinHttpResponseStream - Tracked in #7856. - [x] Consider refactoring cache logic from WinHttpAuthHelper into separate class and avoid out parameters - WON'T FIX. - [x] Optimize algorithm used in scanning client certificate list in WinHttpCertificateHelper - WON'T FIX. - [x] Refactor cookie handling from WinHttpHandler into separate class. - Done #5001 2167 area-System.Collections Add ImmutableArray.Builder.Sort(Comparison comparison) List has an overload of Sort that takes a delegate. It's useful when writing an inline comparer using a lambda: ``` C# list.Sort((x, y) => ); ``` 2168 area-System.Net Sporadic wrong response from HttpClient.SendAsync() when using an authenticated proxy "@davidsh Repro steps: 1. Fiddler Web Debugger -> Rules -> Require Proxy Authentication 2. Run the following program and at some point you will see: ![capture](https://cloud.githubusercontent.com/assets/1383883/8366945/bdfdbc32-1b4e-11e5-9a4a-3c336f95fe52.PNG) Looks like you get `407 (Proxy Auth Required)` sporadically even you always provide correct credentials for the proxy. Can only repro with CoreCLR. ``` c# using System; using System.Net; using System.Net.Http; using System.Threading.Tasks; using System.Collections.Generic; namespace ConsoleApp3 { public class Program { public void Main(string[] args) { var webProxy = new WebProxy(""http://localhost:8888""); webProxy.Credentials = new NetworkCredential(""1"", ""1""); var handler = new HttpClientHandler { Proxy = webProxy, UseProxy = true }; var client = new HttpClient(handler); var tasks = new List(); foreach (var uri in URIs.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries)) { tasks.Add(SendRequest(client, uri)); } Task.WhenAll(tasks).Wait(); Console.WriteLine(""Done""); } private async Task SendRequest(HttpClient client, string uri) { Console.WriteLine($""GET {uri}""); var request = new HttpRequestMessage(HttpMethod.Get, uri); using (var response = await client.SendAsync(request)) { Console.WriteLine($""{response.StatusCode} response from {uri}""); response.EnsureSuccessStatusCode(); } } private class WebProxy : IWebProxy { private readonly Uri _uri; public WebProxy(string uri) { _uri = new Uri(uri); } public ICredentials Credentials { get; set; } public Uri GetProxy(Uri destination) { return _uri; } public bool IsBypassed(Uri host) { return host.IsLoopback; } } private const string URIs = @"" https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='EntityFramework.SqlServer' https://www.nuget.org/api/v2/FindPackagesById()?id='EntityFramework.SqlServer' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='EntityFramework.SqlServer' https://nuget.org/api/v2/FindPackagesById()?id='EntityFramework.SqlServer' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='EntityFramework.SqlServer' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='EntityFramework.InMemory' https://www.nuget.org/api/v2/FindPackagesById()?id='EntityFramework.InMemory' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='EntityFramework.InMemory' https://nuget.org/api/v2/FindPackagesById()?id='EntityFramework.InMemory' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='EntityFramework.InMemory' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Kestrel' https://www.nuget.org/api/v2/FindPackagesById()?id='Kestrel' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Kestrel' https://nuget.org/api/v2/FindPackagesById()?id='Kestrel' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Kestrel' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.Cookies' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.Cookies' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.Cookies' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.Cookies' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Authentication.Cookies' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.Facebook' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.Facebook' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.Facebook' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.Facebook' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Authentication.Facebook' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.Google' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.Google' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.Google' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.Google' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Authentication.Google' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.MicrosoftAccount' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.MicrosoftAccount' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.MicrosoftAccount' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.MicrosoftAccount' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Authentication.MicrosoftAccount' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.OpenIdConnect' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.OpenIdConnect' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.OpenIdConnect' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.OpenIdConnect' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Authentication.OpenIdConnect' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.Twitter' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.Twitter' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.Twitter' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.Twitter' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Authentication.Twitter' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Diagnostics' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Diagnostics' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Diagnostics' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Diagnostics' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Diagnostics' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Diagnostics.Entity' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Diagnostics.Entity' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Diagnostics.Entity' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Diagnostics.Entity' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Diagnostics.Entity' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Identity.EntityFramework' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Identity.EntityFramework' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Identity.EntityFramework' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Identity.EntityFramework' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Identity.EntityFramework' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Mvc' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc.TagHelpers' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc.TagHelpers' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc.TagHelpers' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc.TagHelpers' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Mvc.TagHelpers' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Server.IIS' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Server.IIS' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Server.IIS' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Server.IIS' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Server.IIS' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Server.WebListener' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Server.WebListener' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Server.WebListener' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Server.WebListener' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Server.WebListener' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Session' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Session' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Session' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Session' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Session' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.SignalR.Server' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.SignalR.Server' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.SignalR.Server' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.SignalR.Server' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.SignalR.Server' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.StaticFiles' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.StaticFiles' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.StaticFiles' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.StaticFiles' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.StaticFiles' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Tooling.Razor' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Tooling.Razor' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Tooling.Razor' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Tooling.Razor' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Tooling.Razor' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.CodeGenerators.Mvc' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.CodeGenerators.Mvc' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.CodeGenerators.Mvc' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.CodeGenerators.Mvc' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Framework.CodeGenerators.Mvc' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.CommandLine' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.CommandLine' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.CommandLine' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.CommandLine' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Framework.Configuration.CommandLine' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.EnvironmentVariables' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.EnvironmentVariables' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.EnvironmentVariables' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.EnvironmentVariables' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Framework.Configuration.EnvironmentVariables' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.Json' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.Json' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.Json' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.Json' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Framework.Configuration.Json' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Logging.Console' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Logging.Console' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Logging.Console' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Logging.Console' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Framework.Logging.Console' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Server.IIS' https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.Authentication.Facebook/1.0.0-beta6-12600 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.Authentication.Google/1.0.0-beta6-12600 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.Authentication.OpenIdConnect/1.0.0-beta6-12600 https://www.myget.org/F/aspnetvnext/api/v2/package/Kestrel/1.0.0-beta6-11901 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.Authentication.Twitter/1.0.0-beta6-12600 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.Authentication.MicrosoftAccount/1.0.0-beta6-12600 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.Diagnostics.Entity/7.0.0-beta6-13321 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.Identity.EntityFramework/3.0.0-beta6-12644 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.Mvc/6.0.0-beta6-14192 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.Mvc.TagHelpers/6.0.0-beta6-14192 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.Server.WebListener/1.0.0-beta6-12361 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.Framework.Configuration.CommandLine/1.0.0-beta6-11520 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.Framework.Configuration.EnvironmentVariables/1.0.0-beta6-11520 https://www.myget.org/F/aspnetvnext/api/v2/package/EntityFramework.SqlServer/7.0.0-beta6-13586 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.Framework.Configuration.Json/1.0.0-beta6-11520 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.Authentication.Cookies/1.0.0-beta6-12600 https://www.myget.org/F/aspnetvnext/api/v2/package/EntityFramework.InMemory/7.0.0-beta6-13586 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.Diagnostics/1.0.0-beta6-13321 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.Framework.Logging.Console/1.0.0-beta6-11516 https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Hosting' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Hosting' https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.Framework.CodeGenerators.Mvc/1.0.0-beta6-12480 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.Session/1.0.0-beta6-10599 https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Hosting' https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.SignalR.Server/3.0.0-beta6-12626 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.Tooling.Razor/1.0.0-beta6-13550 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.StaticFiles/1.0.0-beta6-12110 https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Hosting' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Hosting' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.OAuth' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.OAuth' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.OAuth' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.OAuth' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Authentication.OAuth' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='EntityFramework.Relational' https://www.nuget.org/api/v2/FindPackagesById()?id='EntityFramework.Relational' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='EntityFramework.Relational' https://nuget.org/api/v2/FindPackagesById()?id='EntityFramework.Relational' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='EntityFramework.Relational' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Server.Kestrel' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Server.Kestrel' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Server.Kestrel' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Server.Kestrel' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Server.Kestrel' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Newtonsoft.Json' https://www.nuget.org/api/v2/FindPackagesById()?id='Newtonsoft.Json' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Newtonsoft.Json' https://nuget.org/api/v2/FindPackagesById()?id='Newtonsoft.Json' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Newtonsoft.Json' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Threading' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Threading' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Threading' https://nuget.org/api/v2/FindPackagesById()?id='System.Threading' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Threading' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authorization' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authorization' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authorization' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authorization' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Authorization' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Framework.Configuration' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Dynamic.Runtime' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Dynamic.Runtime' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Dynamic.Runtime' https://nuget.org/api/v2/FindPackagesById()?id='System.Dynamic.Runtime' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Dynamic.Runtime' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Authentication' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Identity' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Identity' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Identity' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Identity' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Identity' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.ObjectModel' https://www.nuget.org/api/v2/FindPackagesById()?id='System.ObjectModel' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.ObjectModel' https://nuget.org/api/v2/FindPackagesById()?id='System.ObjectModel' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.ObjectModel' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Cors.Core' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Cors.Core' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Cors.Core' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Cors.Core' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Cors.Core' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Security.Cryptography.Hashing.Algorithms' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Security.Cryptography.Hashing.Algorithms' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Security.Cryptography.Hashing.Algorithms' https://nuget.org/api/v2/FindPackagesById()?id='System.Security.Cryptography.Hashing.Algorithms' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Security.Cryptography.Hashing.Algorithms' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.IdentityModel.Protocol.Extensions' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.IdentityModel.Protocol.Extensions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.IdentityModel.Protocol.Extensions' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.IdentityModel.Protocol.Extensions' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.IdentityModel.Protocol.Extensions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Runtime' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Runtime' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Runtime' https://nuget.org/api/v2/FindPackagesById()?id='System.Runtime' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Runtime' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Net.Http.Headers' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Net.Http.Headers' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Net.Http.Headers' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Net.Http.Headers' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Net.Http.Headers' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc.ApiExplorer' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc.ApiExplorer' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc.ApiExplorer' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc.ApiExplorer' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Mvc.ApiExplorer' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Net.Http.Server' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Net.Http.Server' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Net.Http.Server' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Net.Http.Server' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Net.Http.Server' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc.Extensions' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc.Extensions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc.Extensions' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc.Extensions' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Mvc.Extensions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc.Razor' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc.Razor' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc.Razor' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc.Razor' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Mvc.Razor' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Caching.Memory' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Caching.Memory' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Caching.Memory' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Caching.Memory' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Framework.Caching.Memory' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Net.Http.WinHttpHandler' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Net.Http.WinHttpHandler' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Net.Http.WinHttpHandler' https://nuget.org/api/v2/FindPackagesById()?id='System.Net.Http.WinHttpHandler' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Net.Http.WinHttpHandler' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.DependencyInjection' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.DependencyInjection' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.DependencyInjection' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.DependencyInjection' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Framework.DependencyInjection' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Collections' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Collections' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Collections' https://nuget.org/api/v2/FindPackagesById()?id='System.Collections' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Collections' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Collections.Specialized' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Collections.Specialized' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Collections.Specialized' https://nuget.org/api/v2/FindPackagesById()?id='System.Collections.Specialized' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Collections.Specialized' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.ComponentModel' https://www.nuget.org/api/v2/FindPackagesById()?id='System.ComponentModel' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.ComponentModel' https://nuget.org/api/v2/FindPackagesById()?id='System.ComponentModel' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.ComponentModel' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Security.Claims' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Security.Claims' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Security.Claims' https://nuget.org/api/v2/FindPackagesById()?id='System.Security.Claims' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Security.Claims' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.ComponentModel.TypeConverter' https://www.nuget.org/api/v2/FindPackagesById()?id='System.ComponentModel.TypeConverter' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.ComponentModel.TypeConverter' https://nuget.org/api/v2/FindPackagesById()?id='System.ComponentModel.TypeConverter' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.ComponentModel.TypeConverter' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Diagnostics.Debug' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Diagnostics.Debug' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Diagnostics.Debug' https://nuget.org/api/v2/FindPackagesById()?id='System.Diagnostics.Debug' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Diagnostics.Debug' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Diagnostics.Tools' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Diagnostics.Tools' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Diagnostics.Tools' https://nuget.org/api/v2/FindPackagesById()?id='System.Diagnostics.Tools' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Diagnostics.Tools' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Globalization' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Globalization' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Globalization' https://nuget.org/api/v2/FindPackagesById()?id='System.Globalization' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Globalization' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Linq' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Linq' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Linq' https://nuget.org/api/v2/FindPackagesById()?id='System.Linq' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Linq' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Linq.Expressions' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Linq.Expressions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Linq.Expressions' https://nuget.org/api/v2/FindPackagesById()?id='System.Linq.Expressions' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Linq.Expressions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Linq.Queryable' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Linq.Queryable' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Linq.Queryable' https://nuget.org/api/v2/FindPackagesById()?id='System.Linq.Queryable' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Linq.Queryable' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Reflection' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Reflection' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Reflection' https://nuget.org/api/v2/FindPackagesById()?id='System.Reflection' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Reflection' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.FileSystemGlobbing' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.FileSystemGlobbing' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.FileSystemGlobbing' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.FileSystemGlobbing' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Framework.FileSystemGlobbing' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Resources.ResourceManager' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Resources.ResourceManager' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Resources.ResourceManager' https://nuget.org/api/v2/FindPackagesById()?id='System.Resources.ResourceManager' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Resources.ResourceManager' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Runtime.Extensions' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Runtime.Extensions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Runtime.Extensions' https://nuget.org/api/v2/FindPackagesById()?id='System.Runtime.Extensions' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Runtime.Extensions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Security.Principal' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Security.Principal' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Security.Principal' https://nuget.org/api/v2/FindPackagesById()?id='System.Security.Principal' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Security.Principal' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Http.Abstractions' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Http.Abstractions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Http.Abstractions' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Http.Abstractions' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Http.Abstractions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Caching.Abstractions' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Caching.Abstractions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Caching.Abstractions' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Caching.Abstractions' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Framework.Caching.Abstractions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Text.Encoding' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Text.Encoding' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Text.Encoding' https://nuget.org/api/v2/FindPackagesById()?id='System.Text.Encoding' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Text.Encoding' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Logging.Abstractions' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Logging.Abstractions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Logging.Abstractions' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Logging.Abstractions' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Framework.Logging.Abstractions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.OptionsModel' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.OptionsModel' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.OptionsModel' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.OptionsModel' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Framework.OptionsModel' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Threading.Tasks' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Threading.Tasks' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Threading.Tasks' https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.Server.IIS/1.0.0-beta6-11976 https://nuget.org/api/v2/FindPackagesById()?id='System.Threading.Tasks' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Threading.Tasks' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Http.Extensions' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Http.Extensions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Http.Extensions' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Http.Extensions' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Http.Extensions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Data.SqlClient' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Data.SqlClient' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Data.SqlClient' https://nuget.org/api/v2/FindPackagesById()?id='System.Data.SqlClient' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Data.SqlClient' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Text.Encoding.CodePages' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Text.Encoding.CodePages' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Text.Encoding.CodePages' https://nuget.org/api/v2/FindPackagesById()?id='System.Text.Encoding.CodePages' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Text.Encoding.CodePages' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='EntityFramework.Core' https://www.nuget.org/api/v2/FindPackagesById()?id='EntityFramework.Core' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='EntityFramework.Core' https://nuget.org/api/v2/FindPackagesById()?id='EntityFramework.Core' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='EntityFramework.Core' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.FileProviders.Abstractions' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.FileProviders.Abstractions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.FileProviders.Abstractions' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.FileProviders.Abstractions' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.FileProviders.Abstractions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Razor.Runtime' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Razor.Runtime' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Razor.Runtime' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Razor.Runtime' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Razor.Runtime' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Diagnostics.Abstractions' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Diagnostics.Abstractions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Diagnostics.Abstractions' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Diagnostics.Abstractions' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Diagnostics.Abstractions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Hosting.Abstractions' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Hosting.Abstractions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Hosting.Abstractions' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Hosting.Abstractions' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Hosting.Abstractions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Threading.Thread' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Threading.Thread' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Threading.Thread' https://nuget.org/api/v2/FindPackagesById()?id='System.Threading.Thread' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Threading.Thread' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Security.Cryptography.RandomNumberGenerator' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Security.Cryptography.RandomNumberGenerator' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Security.Cryptography.RandomNumberGenerator' https://nuget.org/api/v2/FindPackagesById()?id='System.Security.Cryptography.RandomNumberGenerator' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Security.Cryptography.RandomNumberGenerator' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.WebEncoders' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.WebEncoders' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.WebEncoders' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.WebEncoders' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Framework.WebEncoders' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.SignalR.Messaging' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.SignalR.Messaging' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.SignalR.Messaging' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.SignalR.Messaging' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.SignalR.Messaging' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.DataProtection' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.DataProtection' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.DataProtection' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.DataProtection' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.DataProtection' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Console' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Console' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Console' https://nuget.org/api/v2/FindPackagesById()?id='System.Console' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Console' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.IO' https://www.nuget.org/api/v2/FindPackagesById()?id='System.IO' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.IO' https://nuget.org/api/v2/FindPackagesById()?id='System.IO' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.IO' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.WebUtilities' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.WebUtilities' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.WebUtilities' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.WebUtilities' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.WebUtilities' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Logging' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Logging' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Logging' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Logging' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Framework.Logging' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.WebEncoders.Core' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.WebEncoders.Core' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.WebEncoders.Core' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.WebEncoders.Core' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Framework.WebEncoders.Core' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Runtime.Abstractions' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Runtime.Abstractions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Runtime.Abstractions' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Runtime.Abstractions' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Framework.Runtime.Abstractions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.CSharp' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.CSharp' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.CSharp' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.CSharp' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.CSharp' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Collections.Concurrent' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Collections.Concurrent' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Collections.Concurrent' https://nuget.org/api/v2/FindPackagesById()?id='System.Collections.Concurrent' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Collections.Concurrent' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Reflection.Extensions' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Reflection.Extensions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Reflection.Extensions' https://nuget.org/api/v2/FindPackagesById()?id='System.Reflection.Extensions' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Reflection.Extensions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Reflection.Emit' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Reflection.Emit' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Reflection.Emit' https://nuget.org/api/v2/FindPackagesById()?id='System.Reflection.Emit' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Reflection.Emit' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Reflection.Emit.ILGeneration' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Reflection.Emit.ILGeneration' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Reflection.Emit.ILGeneration' https://nuget.org/api/v2/FindPackagesById()?id='System.Reflection.Emit.ILGeneration' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Reflection.Emit.ILGeneration' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Reflection.Primitives' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Reflection.Primitives' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Reflection.Primitives' https://nuget.org/api/v2/FindPackagesById()?id='System.Reflection.Primitives' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Reflection.Primitives' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Threading.ThreadPool' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Threading.ThreadPool' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Threading.ThreadPool' https://nuget.org/api/v2/FindPackagesById()?id='System.Threading.ThreadPool' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Threading.ThreadPool' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Threading.Timer' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Threading.Timer' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Threading.Timer' https://nuget.org/api/v2/FindPackagesById()?id='System.Threading.Timer' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Threading.Timer' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Loader.IIS.Interop' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Loader.IIS.Interop' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Loader.IIS.Interop' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Loader.IIS.Interop' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Loader.IIS.Interop' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Loader.IIS' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Loader.IIS' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Loader.IIS' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Loader.IIS' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Loader.IIS' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.CodeGeneration' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.CodeGeneration' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.CodeGeneration' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.CodeGeneration' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Framework.CodeGeneration' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.CodeGeneration.EntityFramework' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.CodeGeneration.EntityFramework' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.CodeGeneration.EntityFramework' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.CodeGeneration.EntityFramework' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Framework.CodeGeneration.EntityFramework' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.CodeGeneration.Templating' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.CodeGeneration.Templating' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.CodeGeneration.Templating' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.CodeGeneration.Templating' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Framework.CodeGeneration.Templating' https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.Framework.FileSystemGlobbing/1.0.0-beta6-11549 https://www.myget.org/F/aspnetvnext/api/v2/package/System.Net.Http.WinHttpHandler/4.0.0-beta-23021 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.Authentication.OAuth/1.0.0-beta6-12600 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.Framework.Configuration/1.0.0-beta6-11520 https://www.myget.org/F/aspnetvnext/api/v2/package/System.Collections.Specialized/4.0.0-beta-23021 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.SignalR.Messaging/3.0.0-beta6-12626 https://www.myget.org/F/aspnetvnext/api/v2/package/System.Security.Claims/4.0.0-beta-23021 https://www.myget.org/F/aspnetvnext/api/v2/package/System.Threading.Tasks/4.0.10-beta-23021 https://www.myget.org/F/aspnetvnext/api/v2/package/System.Security.Cryptography.Hashing.Algorithms/4.0.0-beta-23021 https://www.myget.org/F/aspnetvnext/api/v2/package/System.ObjectModel/4.0.10-beta-23021 https://www.myget.org/F/aspnetvnext/api/v2/package/System.Threading/4.0.10-beta-23021 http://www.myget.org/F/azureadwebstacknightly/api/v2/package/Newtonsoft.Json/6.0.6 https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Runtime.Handles' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Runtime.Handles' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Runtime.Handles' https://nuget.org/api/v2/FindPackagesById()?id='System.Runtime.Handles' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Runtime.Handles' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.Abstractions' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.Abstractions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.Abstractions' https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.Abstractions' https://www.myget.org/F/aspnetvnext/api/v2/package/System.Threading.Thread/4.0.0-beta-23021 http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Framework.Configuration.Abstractions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Security.Cryptography.X509Certificates' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Security.Cryptography.X509Certificates' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Security.Cryptography.X509Certificates' https://nuget.org/api/v2/FindPackagesById()?id='System.Security.Cryptography.X509Certificates' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Security.Cryptography.X509Certificates' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Win32.Primitives' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Win32.Primitives' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Win32.Primitives' https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.Loader.IIS/1.0.0-beta6-11976 https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.Win32.Primitives' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.Win32.Primitives' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.IO.FileSystem' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById?id='Microsoft.Framework.DependencyInjection'&$skiptoken='Microsoft.Framework.DependencyInjection','1.0.0-beta6-11513' https://www.nuget.org/api/v2/FindPackagesById()?id='System.IO.FileSystem' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.IO.FileSystem' https://nuget.org/api/v2/FindPackagesById()?id='System.IO.FileSystem' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.IO.FileSystem' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Net.Http' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Net.Http' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Net.Http' https://nuget.org/api/v2/FindPackagesById()?id='System.Net.Http' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Net.Http' https://www.myget.org/F/aspnetvnext/api/v2/package/System.Threading.Tasks/4.0.0-beta-23021 https://www.myget.org/F/aspnetvnext/api/v2/package/System.Threading/4.0.0-beta-23021 https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.IO.Compression' https://www.nuget.org/api/v2/FindPackagesById()?id='System.IO.Compression' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.IO.Compression' https://nuget.org/api/v2/FindPackagesById()?id='System.IO.Compression' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.IO.Compression' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Runtime.InteropServices' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Runtime.InteropServices' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Runtime.InteropServices' https://nuget.org/api/v2/FindPackagesById()?id='System.Runtime.InteropServices' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Runtime.InteropServices' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Net.Primitives' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Net.Primitives' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Net.Primitives' https://nuget.org/api/v2/FindPackagesById()?id='System.Net.Primitives' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Net.Primitives' https://www.myget.org/F/aspnetvnext/api/v2/package/System.Reflection.Extensions/4.0.0-beta-23021 http://www.myget.org/F/azureadwebstacknightly/api/v2/package/Newtonsoft.Json/6.0.6 https://www.myget.org/F/aspnetvnext/api/v2/package/System.Security.Cryptography.RandomNumberGenerator/4.0.0-beta-23021 https://www.myget.org/F/aspnetvnext/api/v2/package/EntityFramework.Core/7.0.0-beta6-13586 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.AspNet.Razor.Runtime/4.0.0-beta6-11615 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.Framework.CodeGeneration.Templating/1.0.0-beta6-12480 https://www.myget.org/F/aspnetvnext/api/v2/package/System.Threading.Timer/4.0.0-beta-23021 https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Security.Cryptography.Encryption' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Security.Cryptography.Encryption' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Security.Cryptography.Encryption' https://nuget.org/api/v2/FindPackagesById()?id='System.Security.Cryptography.Encryption' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Security.Cryptography.Encryption' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Security.Cryptography.Hashing' https://www.nuget.org/api/v2/FindPackagesById()?id='System.Security.Cryptography.Hashing' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Security.Cryptography.Hashing' https://nuget.org/api/v2/FindPackagesById()?id='System.Security.Cryptography.Hashing' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Security.Cryptography.Hashing' https://www.myget.org/F/aspnetvnext/api/v2/package/System.IO/4.0.10-beta-23021 https://www.myget.org/F/aspnetvnext/api/v2/package/System.IO/4.0.0-beta-23021 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.Framework.WebEncoders/1.0.0-beta6-11657 http://www.myget.org/F/azureadwebstacknightly/api/v2/package/Newtonsoft.Json/6.0.6 https://www.myget.org/F/aspnetvnext/api/v2/package/System.Runtime/4.0.20-beta-23021 https://www.myget.org/F/aspnetvnext/api/v2/package/System.Runtime/4.0.0-beta-23021 https://www.myget.org/F/aspnetvnext/api/v2/package/Microsoft.Framework.DependencyInjection/1.0.0-beta6-11523 https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Text.Encoding.Extensions' https://www.myget.org/F/aspnetvnext/api/v2/package/System.Console/4.0.0-beta-23021 https://www.nuget.org/api/v2/FindPackagesById()?id='System.Text.Encoding.Extensions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='System.Text.Encoding.Extensions' https://nuget.org/api/v2/FindPackagesById()?id='System.Text.Encoding.Extensions' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='System.Text.Encoding.Extensions' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Razor' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Razor' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.AspNet.Razor' https://www.myget.org/F/aspnetvnext/api/v2/package/System.Text.Encoding.CodePages/4.0.0-beta-23021 https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Razor' http://www.myget.org/F/azureadwebstacknightly/FindPackagesById()?id='Microsoft.AspNet.Razor' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Runtime.Roslyn' https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Runtime.Roslyn' https://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Runtime.Roslyn' ""; } } ``` " 2169 area-Serialization Fix serialization for type which has DataMember with special Name values This issue happens only for DCJS and affecting both NetCore and NetNative, due to missing method from recent merging of DCJS. cc: @SGuyGe @shmao @zhenlan 2171 area-Infrastructure When compiling in TFS, using the ECMA key requires setting before dir.props import Because the TFS build targets sets true, sign.targets won't respect the UseECMAKey property. Additionally, because dir.props sets based on the AssemblyKeyType conditional, AssemblyKeyType needs to be set in the project before importing dir.props. 2174 area-Serialization Deserializing xml on linux coreclr x64 throws System.NotSupportedException "When executing the following code on ubuntu 14.04 using coreclr x64 version 1.0.0-beta6-12120 a System.NotSupportedException is thrown. This works fine on windows with same coreclr version ``` c# public class Program { public class Test3 { public string Title {get;set;} } public void Main(string[] args) { string xml = ""Test 12345""; XmlSerializer serializer = new XmlSerializer(typeof(Test3)); StringReader reader = new StringReader(xml); var value = (Test3)serializer.Deserialize(reader); var title = value.Title; } } ``` the stacktrace: ``` System.InvalidOperationException: There is an error in XML document (0, 0). ---> System.NotSupportedException: Specified method is not supported. at System.Xml.Serialization.XmlSerializerImplementation.get_ReadMethods() at System.Xml.Serialization.TempAssembly.InvokeReader(XmlMapping mapping, XmlReader xmlReader, Object events, String encodingStyle) at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, Object events) --- End of inner exception stack trace --- at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, Object events) at System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader) at SampleApp.Program.Main(String[] args) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider) at Microsoft.Framework.ApplicationHost.Program.ExecuteMain(DefaultHost host, String applicationName, String[] args) at Microsoft.Framework.ApplicationHost.Program.Main(String[] args) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider) at dnx.host.Bootstrapper.RunAsync(List`1 args, IRuntimeEnvironment env) at dnx.host.RuntimeBootstrapper.ExecuteAsync(String[] args) at dnx.host.RuntimeBootstrapper.Execute(String[] args) System.NotSupportedException: Specified method is not supported. at System.Xml.Serialization.XmlSerializerImplementation.get_ReadMethods() at System.Xml.Serialization.TempAssembly.InvokeReader(XmlMapping mapping, XmlReader xmlReader, Object events, String encodingStyle) at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, Object events) ``` " 2177 area-Serialization Silent Failure: XmlSerializer.Deserialize Method (XmlReader) "I attempted to file this on Connect, but it appears that even though Connect states that it is still accepting issues, it is closed. There is a bug in the current release version (4.5.2) that fails w/o any errors, on the deserialization of a property of a class that is defined as a List. I haven't tried lists of other types, but they are probably affected as well, and this only affects Deserialize, not Serialize. There are 2 classes below, and both serialize properly, in the exact same way. However, the Works class will deserialize properly, while the DoesNotWork class will not. The DoesNotWork class will end up with an Items property that contains a list with zero items, when 1 or more items exist. We discovered this in a property that has code in both the get and set accessors, while all properties that don't have any get or set code work perfectly. ``` C# [Serialize] [XmlRoot(""root"")] public class Works { [XmlElement(""items"")] public List Items { get; set; } } [Serialize] [XmlRoot(""root"")] public class DoesNotWork { private List _items; [XmlElement(""items"")] public List Items { get { return _items; } set { _items = value; } } } ``` " 2189 area-System.Xml Bring XSL-T to CoreFX The [xUnit.net](https://github.com/xunit) unit test framework uses XSL-T to transform its native XML reporting format into other XML (NUnit, xUnit.net v1) formats as well as to generate HTML reports. This strategy works well for desktop runners, but is currently not supported in our [DNX runner](https://github.com/xunit/dnx.xunit) because of the lack of XSL-T support on the platform. This is a [feature request for our DNX runner](https://github.com/xunit/dnx.xunit/issues/42) which we cannot satisfy without some form of XSL-T support. In particular, the code we use today exercises `XslCompiledTransform`: https://github.com/xunit/xunit/tree/05826dcfd3cee97d93ff63201db0296933dd3511/src/xunit.runner.reporters.desktop 2191 area-System.Data Add Sql Impersonation Support SqlClient team needs to add Impersonation support for Project K, but underlying code support does not currently exist. 2192 area-System.Net Update README.md for System.Net.Http.WinHttpHandler Update the README.md for the System.Net.Http.WinHttpHandler library. 2199 area-Meta Review converged configuration APIs ASP.NET has created configuration APIs (TBD: Link). @divega was driving a working group to push these APIs down so that they can become general purpose BCL-ish APIs. We should review the proposal for a converged API set. 2203 area-System.Security Add support for X509 revocation checks on Unix Due to a lack of a stable networking stack, the X509Chain for Unix does not support CRL downloading or OCSP. There are a couple of different parts to be done: - OCSP (Online checks) - CRL fetching (Online checks) - CRL caching (Online/Offline checks) - CRL cache refresh - Using the CRL during chain building 2204 area-System.Security Figure out a strategy for X509VerificationFlags on Unix Because OpenSSL reports back only the first error it finds, the Ignore\* flags can't be used to disregard error codes coming back. Whatever flags cannot be supported should be changed to a PlatformNotSupportedException. 2207 area-System.Security Add support for additional LocalMachine X509Stores on Unix, or throw PlatformNotSupportedException LM\Root, and to a lesser degree LM\CA, are populated from a system directory. The other stores could be put into another path area, if we wanted to support having writable system stores. If writable system stores makes no sense, then other LM* stores should throw a descriptive PlatformNotSupportedException, not a blank NotImplementedException. 2209 area-System.Numerics Support for SSE4 intrinsics by RyuJIT Support for many of the interesting instructions like popcnt (technically SSE4a) could be an interesting addition and prove to be useful to avoid using unmanaged code in certain performance sensitive applications. Many (technically all) of the operations can be emulated in CPU when not available with specific optimizations for the target platform or even have the ability with specially crafted if-then-else optimizations. That would allow to even switch to an entirely different algorithm without any runtime impact (if properly done at the jitting phase). 2210 area-System.Security Consider multi-threading implications on the OpenSSL ERR_get_error queue. OpenSSL compiled with OPENSSL_FIPS seems to have a single static ERR_STATE object for the process. The default appears to be set up for providing the capabilities for stack-per-thread, but OPENSSL_thread_id() appears to return the process ID, not the thread ID. The mainline seems to be served by `OPENSSL_set_id_callback` to something returning a thread ID; and lightup for FIPS could try invoking `int_ERR_lib_init`, which resets the library to the non-FIPS way of error management (though that theoretically has FIPS implications...). 2217 area-System.Text UTF8Encoding should support encoding/decoding of unpaired surrogates "According to RFC 3629 encoding/decoding unmatched surrogates should be disallowed: ""The definition of UTF-8 prohibits encoding character numbers between U+D800 and U+DFFF, which are reserved for use with the UTF-16 encoding form (as surrogate pairs) and do not directly represent characters."" However, this hasn't been followed by real world encoders/decoders. For example, the ECMA-335 standard encodes string arguments of custom attributes using UTF8 and the compilers allowed unpaired surrogates in the attribute argument. Another example is PDB - the file paths in PDB are stored as UTF8 encoded strings and unpaired surrogates are also allowed. The same for values of local string constants (e.g. `const string surrogate = ""\ud800""`). To avoid breaking changes Roslyn needs to allow unpaired surrogates in the above cases and the MetadataReader should also use a variant of UTF8 encoding that is able to decode them. Currently Roslyn has a custom implementation of UTF8 encoder originating from CCI. In general, it seems that pragmatically a UTF16-UTF8 round-tripping is desirable in certain scenarios and UTF8Encoding should support it. I propose to add a constructor to UTF8 Encoding that takes a bool allowUnpairedSurrogates (false by default) that can be used by both Roslyn and MetadataReader. " 2220 area-System.Net [WIP] Refactor HttpClient and MultipartContent with async/await 2221 area-System.Runtime Replacement for unavailable Assembly methods Hi, How is the supported way to deal with the Assembly class? For instance, I have some method calls like Assembly.Location or Assembly.GetCallingAssembly() which I couldn't find a way to bring those calls to CoreFX. Thanks. 2227 area-System.IO FileSystem intermittent test failures Tests for the FileSystem class intermittently fail. The offenders are: | Test Failure | Notes | | --- | --- | | File_WriteAll_all.runTest | | | File_ReadAll_all.runTest | | | File_WriteAllBytes_StrBtA.runTest | | | File_AppendAll_all.runTest | | | File_Copy_str_str_b.runTest | also leaves leftover test directories (only on failure) | | FileInfo_Refresh.runTest | also leaves leftover test directories (only on failure) | | FileInfo_getLastWriteTime | according to #1313 - I detected no failures on my runs | | FileInfo_Create_str | | | DirectoryInfo_Refresh.runTest | also leaves leftover test directories (only on failure) | | DirectoryInfo_Move_str.runTest | also leaves leftover test directories (only on failure) | The source of the failures is the repeated use of the same test file names causing file already in use exceptions. 2241 area-System.Linq Enumerable.ToArray() fails on the results of some uses of Enumerable.Cast() Generally any implementation of `IEnumerable` should be able to produce a `T[]` with a call to `ToArray()`. However, in some cases the `IEnumerable` produced by a call to `Cast()` will in fact be an array of another type that can be converted on the fly by the implementation of `GetEnumerator()`. This works well in many cases and is a valuable optimisation (rather than going through `CastIterator`) but if `ToArray()` is called on it, the result is an `ArrayTypeMismatchException` that would not be expected by the user, especially since code might call `ToArray()` without knowing that `Cast()` had been used, or pass the result of `Cast()` to a method, not knowing that `ToArray()` would be used. In particular this happens if you `Cast()` an array of one `enum` type to another `enum` type. 2246 area-System.Net HttpClient not thread Safe Hi, Recently I noticed HttpClient, FtpClient (maybe SMTPClient I have to check) are not thread safe when Scheme is set https. Since all those classes relies on static member SecurityProtocol in ServicePointManager. We cant have multiple tasks or threads targeting different SSL or TLS version at the same time. I didn't see ServicePointManager in corefx repository located in System.Net namespace. Are there plans to open this piece of code ? 2249 area-System.Data DbDataReader.Close() doesn't unify with System.Data.Common If I write a provider against System.Data.Common on .NET Standard 1.2 and implement `Dispose` appropriately, then I try to use that provider on .NET Framework 4.6 or .NET Core 2.0, the following code won't work. ``` C# reader.Close(); // No-op Assert.True(reader.IsClosed); // Fails since Dispose is never called ``` It fails because on .NET Framework and .NET Core 2.0, `Dispose` calls `Close` (not the other way around) and since there is no virtual `Close` method on .NET Standard 1.2, I cannot override it without cross-targeting the frameworks that do have it. 2252 area-System.Collections Provide a sorting algorithm with good behavior on nearly-sorted inputs. The existing 4.5 Array.sort is implemented with intro sort. While this has reasonable behavior, it effectively has the same number of comparisons regardless of input size. This number of comparisons is (as expected) around `n * log_n`. While this is acceptable for random inputs, it is unfortunately much slower for nearly-sorted inputs. More recent algorithms (like TimSort) can provide massive improvements here, sorting nearly-sorted lists with a nearly linear number of comparisons. For code-paths where sorting is expensive, and where comparisons are not cheap, a better sort algorithm built into the Fx would be appreciated. Whether or not this becomes the default is up to you. But providing it as an option would still be a huge boon. Note: this hits Roslyn+TypeScript. We often produce trees (i.e. for tagging) from nearly sorted data. There may be hundreds of thousands of elements in this data. Being able to sort in near-linear time means we can then build our trees in linear time. With data sets this large, the difference between `n` and `n log n` is actually quite significant. 2254 area-System.Runtime Provide ways to parse sections of a string, not an entire string. Right now .Net provides lots of ways to convert strings to other values. For example `Int32.TryParse`. This is fine if you are starting with a string, but it's very suboptimal if you have a larger string, and are trying to parse out a piece of it. You are forced to first create a substring, and then parse that. This adds GC pressure to the system and can be a large perf impact. It would be very beneficial to have overloads of these functions that took a start+length. Alternatively, if there were some sort of struct representing a piece of a string, that could also work as well. Right now this impacts TypeScript greatly. We have to marshal data from JavaScript to .Net. This comes in as a string to us, which we then need to parse out into actual values (like ints). We are forced to either send tons of strings over (not ideal), or send one big string over that we then are forced to break into tons of small strings. Right now we've worked around this by hand-writing our own Int32.Parse that can work on subsections of a string. But this is non-ideal and would really be served inside the runtime so everyone could benefit. This is a place where really ony the runtime could implement this thing. There is so much complexity around string parsing (even just for ints), with things like FormatSpecifiers and whatnot, that trying to duplicate it in another library would be unfeasible. 2255 area-System.Linq IntersectIterator not optimized to exit early In System/Linq/Enumerable.cs, the `IntersectIterator` method will iterate over all of the items of `first`, even if the `set` created by `second` is empty. A simple performance optimization would be to `yield break` when `set` is empty. 2260 area-System.Net Merge changes from TFS 2273 area-System.Security Enable AuthorityInformationAccess downloads for X509Chain on Unix. Windows will follow the AuthorityInformationAccess record and attempt to download any intermediate certificates as part of building the X509Chain, we should enable this for the Unix platforms as well, to maintain feature parity. **Important**: Downloaded self-signed certificates are NOT considered trustworthy, and they need to make the chain report as not valid (unless root trust was bypassed). Also important: Any testing for this should be [OuterLoop], because it would depend on the network. 2278 area-System.Collections Rename Validation to Microsoft.Internal.Validation "The C# (and possibly VB compiler) will match the top-level namespace `Validation` in `System.Collections.Immutable` even though it only contains internal types. This prevents customers from using a type named `Validation` in their code. Specifically, assume a customer has defined the type like this: ``` C# namespace Support { public static class Validation { public static bool IsValid(string x) { return true; } } } ``` Consuming this type stops working when `System.Collections.Immutable` is referenced: ``` C# using System; using System.Collections.Generic; using System.Linq; using System.Text; using Support; namespace ImmutableTest { public class Experiment { // With out Immutable included, the below works just fine. // Once I include immutable, Validation, which was really // Support.Validation, but was found because of the using // statement above, it starts to fail showing that it can't // find IsValid in the namespace Validation. public void Test1() { Validation.IsValid(""AS""); } public void Test2() { Support.Validation.IsValid(""AS""); } } } ``` According to @jaredpar this behavior is by-design: > This behavior is by design for C# at least. A simple name lookup will prefer matching namespaces over types (section 7.5.2). I didn’t check the VB spec but it almost assuredly has the same design here. In order to avoid that conflict, we should rename the `Validation` namespace to something like `System.Validation`. " 2279 area-System.IO File System Watching for the Root Watch Folder doesn't match on all platforms The FSW on Unix and OS X can receive notifications about the root folder being watcher but the Windows implementation cannot. There are also differences (lock being taken) on Desktop CLR that might not be the case on CoreCLR 2287 area-Serialization DataContractJsonSerializerTests.DCJS_EnumerableCollection test fails in UTC+03.00 (Minsk) timezone "DataContractJsonSerializerTests.DCJS_EnumerableCollection fails in my timezone (UTC+03.00, Minsk). Current code: ``` C# var offsetMinutes = (int)TimeZoneInfo.Local.BaseUtcOffset.TotalMinutes; var timeZoneString = string.Format(""{0:+;-}{1}"", offsetMinutes, new TimeSpan(0, offsetMinutes, 0).ToString(@""hhmm"")); var original = new EnumerableCollection(); original.Add(new DateTime(2000, 1, 1).AddMinutes(offsetMinutes)); ``` Fix: ``` C# var date = new DateTime(2000, 1, 1); var offsetMinutes = (int)TimeZoneInfo.Local.GetUtcOffset(date).TotalMinutes; var timeZoneString = string.Format(""{0:+;-}{1}"", offsetMinutes, new TimeSpan(0, offsetMinutes, 0).ToString(@""hhmm"")); var original = new EnumerableCollection(); original.Add(date.AddMinutes(offsetMinutes)); ``` " 2292 area-Serialization Improve test coverage for XmlSerializer 2295 area-System.Xml System.Xml.XPath to support XPath 2, XPath 3 and their XSLT variants #### Motivation `System.Xml.XPath` currently conforms with XPath 1.0 [[W3C-xpath-1]](http://www.w3.org/TR/xpath/) and XSLT 1.0 [[W3C-xslt-1]](http://www.w3.org/TR/xslt/) standards, but not XPath 2.0 [[W3C-xpath-2]](http://www.w3.org/TR/xpath20/), XPath 3.0 [[W3C-xpath-3]](http://www.w3.org/TR/xpath-30/), XPath 3.1 [[W3C-xpath-3.1]](http://www.w3.org/TR/xpath-31/), XSLT 2.0 [[W3C-xslt-2]](http://www.w3.org/TR/xslt20/) and XSLT 3.0 [[W3C-xslt-3]](http://www.w3.org/TR/xslt-30/). The missing standard implementations in BCL are required by many consumer scenarios, for which .NET applications rely on [third party libraries](http://stackoverflow.com/a/1533114/863980). One of the chief scenario is Content Query Web Part (CQWP) in SharePoint, where the users' XSLT code can be drastically minimized if v2 is supported by `System.Xml.XPath`. As for most parts, there are backward compatibility fallbacks available, that is; the code written in XSLT 2 precisely, can be expressed verbosely in XSLT 1 and since so forth. ### Pitfalls Unfortunately, (besides the existing third-party libraries' APIs) I do not have an off-hand -- concrete -- method list to propose, as it requires further brain-storming on whether to auto-select processor based on the input or to explicitly separate the namespaces (`System.Xml.XPath2` and `System.Xml.XPath3`). The point to ponder being; since the sub-languages XPath 2 and XPath 3 intrinsically facilitates backward compatibility modes, see [XPath 2: J.1.3 Backwards Compatibility Behavior](http://www.w3.org/TR/xslt20/#backwards-compatibility-behavior) and [XPath 3: 3.10 Backwards Compatible Processing](http://www.w3.org/TR/xslt-30/#backwards), should the API be any different than the existing one and let consumers select the standard mode? 2315 area-System.Drawing Primitive Color Type for .NET Core ## Primitive Color Type for .NET Core The previous discussion of primitives showed that color discussion should expand into a separate issue. The primitive discussion was started because many customers wanted to move to the .NET Core, but were blocked by the lack of System.Drawing primitives there. There was much discussion and internal debate over defining Point, Rect, and Size and much of that was fueled by scenarios that you guys cited in the previous primitives issue. (Thank you!) Here we are looking for additional scenarios to discuss the advantages of creating a new Color type for the cross-platform .NET Core Graphics API. Feel free to repost your two cents from the previous primitives issue. Thanks for your input! Topics of Interest: (This is where providing scenarios would be awesome) 1. Naming (ColorRgba, sRGB) 2. Different Color Formats (int8 bits, float 16 bits, float 32 bits, alpha or not) Color4F, Color3F, Color4F 3. Color Spaces (conversion issues) 4. Gamma vs Linear 5. Extension Methods (vector operations: lerp, scaling, conversions: from RGB to HSB and reverse, from vectors) 6. Semantic parity with CSS 7. WinRT Compatibility Limit Scope: KnownColors will not be brought over as they don’t always translate well into the cross-platform world depending on the hardware so let’s focus our discussion on defining the Color object for now. 2316 area-System.Linq LINQ/PLINQ `Sum(int)` does not loft to long for intermediate calculation. Currently, even if the total value of elements in a collection falls within the range of the type, LINQ/PLINQ will throw errors if the _running_ total would overflow. That is: ``` new[] { int.MaxValue, int.MaxValue, int.MinValue }.Sum() ``` ... currently throws an overflow exception because of the first two items, even though the total is within range (`int.MaxValue - 1`). It may be beneficial to loft to long for the intermediate cancellation, similar to how float lofts to double (although that particular one is more about an accurate result, not exactly overflow). 2317 area-System.Linq Make IOrderedEnumerable covariant Today, I was trying to convert an `IOrderedEnumerable` to an `IOrderedEnumerable`, but the compiler responded with an error. Looking into the interface, there doesn't seem to be any reason why it can't be [covariant](https://msdn.microsoft.com/en-us/library/dd799517%28v=vs.110%29.aspx), and in fact when I copied and pasted the interface and changed the class signature to `IOrderedEnumerable` everything compiled fine. Can we change this in the BCL, as well? There doesn't seem to be a reason not to. Sidenote: This **may** cause some [breaking changes](http://stackoverflow.com/a/2843563/4077294), but as the post points out this has already been done with `IEnumerable` on a greater scale. ### Proposed API ```C# // Updates existing interface in being covariant. public interface IOrderedEnumerable : IEnumerable { // Existing member IOrderedEnumerable CreateOrderedEnumerable(Func keySelector, IComparer comparer, bool descending); } ``` *(edited by @terrajobst to include the API write-up from @JonHanna)* 2320 area-System.Reflection (api review) IL Object Model "@terrajobst From the recent [API Review 2015-07-08](https://github.com/dotnet/apireviews/tree/master/2015-07-08-ildasm-and-drawing) **IL Object Model** **Observations** - Implement a custom object model. - use [Mono's Cecil](https://github.com/jbevain/cecil) implementation. **Parsing** - From the byte stream - From the text representation. **Output** - Byte stream - Text Representation The issue here I see is that some instructions have ""pointers"" to data embedded into the assembly bytes. A very common one is `Strings`. So you're going to need an object to represent that so that construction of the output bytes is correct. **IL Labels** These point to data objects that encoded into the assembly. - Strings being a common one. - `switch` uses them as jump targets. A benefit of an IL object model, is that you could get an IL representation of a method, without doing a full compilation. **Targeting** For example Roslyn should ""compile"" to an IL Object model, first. which then permit for further diagnostic analysers (or an optional layer). On the produced IL For example:- A analyser to help minimise Boxing operations. you'll should be able to trickle that information back to source-code level. **Compilation** The last stage would ""Compilation Targets"" for various architectures eg. x86, x64,ARM and maybe even Typescript. This could be supplied as NuGet package. --- Side Note I implemented a partial implementation of an object model for IL [here](https://github.com/AdamSpeight2008/IL.Sarc) " 2321 area-System.Runtime ReadOnlyCollection interfaces. From MSDN: ``` public class ReadOnlyCollection : IList, ICollection, IEnumerable, IEnumerable, IList, ICollection, IReadOnlyList, IReadOnlyCollection ``` Suggested fix: ``` public class ReadOnlyCollection : IEnumerable, IEnumerable, IReadOnlyList, IReadOnlyCollection, ICollection ``` 2323 area-System.Linq Add Enumerable.ToHashSet We have `Enumerable.To*` methods for many common collections. `HashSet` is sorely missing. This feature should be cheap to implement and not be problematic in any way that I can see. Evidence that this feature is sorely missing: https://www.google.com/webhp?complete=1&hl=en&gws_rd=cr,ssl&ei=#complete=1&hl=en&q=.net+tohashset People are writing this method over and over again. 2324 area-System.Runtime Add common helper methods to the String class "The `String` class is missing some helper methods for string manipulation that are commonly needed. Of course it is possible for developers to add extension methods but that should not be required. here, I'll propose a list of methods that I think can be easily understood and are commonly required. The ordering of this list starts with the least controversial in my mind. 1. `bool Contains(this string str, string value, StringComparison comparisonType)`. We have no Contains version that takes a StringComparison. The workaround with `IndexOf` is awkward and feels like magic. 2. `Replace(..., StringComparison)`. Right now, `Replace` always uses `Ordinal`. 3. `string Left(this string str, int count)` as well as `Right`. `Left` is equivalent to `str.Substring(0, count)` but right is `str.Substring(str.Length - count, count)`. 4. `Truncate(int maxLength)`. This is not equivalent to Substring(maxLength) because Substring throws if the string is short. 5. `bool IsValidIndex(this string str, int index)` tests whether the argument can be used to obtain a character from the indexer. That sometimes comes in handy. Also `bool IsValidRange(this string str, int index, int count)`. Both can be useful for `Debug.Assert` assertions. 6. `string TrimPrefix(this string str, string prefix)` as well as `TrimPostfix`. It turns out that when working with externally generated strings (ETL processes) it is very common to need to remove a prefix. For example to get a JIRA issue number as an int you do `int.Parse(""PROJ-2317"".TrimPrefix(""PROJ-""))`. `Replace(..., ""PROJ-"", """")` is not equivalent and semantically wrong. The `TrimStart` method cannot be used here. Further helper methods would be `EnsurePrefix/Postfix`. 7. Some helpers to work on strings that might be null or empty. This comes up _all the time_. ``` public static string EmptyToNull(this string str) { return string.IsNullOrEmpty(str) ? null : str; } public static string NullToEmpty(this string str) { return str ?? string.Empty; } public static bool IsNullOrEmpty(this string str) { return string.IsNullOrEmpty(str); } public static bool IsNullOrWhitespace(this string str) { return string.IsNullOrWhiteSpace(str); } ``` 1. `SplitLines()`. Returns the string split into lines. Need to define how to deal with OS-specific line endings. Probably, this should just be `str.Replace(""\r"", """").Split('\n')` which seems to work for everything. I can see some issues with some of these proposals. They are not perfect but I want to get the discussion going. I feel the BCL has a blind spot here. The list certainly starts out with a few no-brainers. " 2327 area-System.Linq Make Enumerable.Any use the same optimizations that Count has (ICollection checks) `Enumerable.Count` uses `ICollection` and `ICollection` to perform a fast and allocation-free computation. `Enumerable.Any` should do that as well. The fact that `Any` does not check `ICollection` is pretty much the only downside to using `Any` vs. `Count() != 0`. This downside should be eliminated. This missing optimization causes confusion: - http://stackoverflow.com/questions/2989300/interview-question-any-vs-if-length-0-for-testing-if-a-collection-has-e - http://dpatrickcaldwell.blogspot.de/2011/08/enumerableany-vs-enumerablecount.html 2329 area-System.Threading Use a more dependable policy for thread pool thread injection As of .NET 4.5 the thread pool injects one thread per 0.5sec if it thinks more threads are required. This is a problem if the number of required threads suddenly increases. Example: A corporate ASP.NET website is idle at night. In the morning at 8AM 1000 people log on and start working. If the app is using let's say 100 threads starting from 8AM it will take like 50sec to create all of them. Until then there will be serious delays and timeouts. It is possible to construe arbitrarily bad scenarios. **Problem statement:** If thread pool load suddenly increases in IO bound workloads the pool is too slow to respond. This causes throughput and availability disruption. IO bound workloads relying on synchronous IO are common. Sudden workload changes are also common. Sometimes the workload can change due to a problem outside of the developer's control: A web service timing out or a database become slow. Let me stress that this causes service interruption. You can easily repro this yourself. Run a load test on an ASP.NET site with `Thread.Sleep(10000);`. The thread count goes up by 2 each second. Starting and shutting down a thread was benchmarked by me to be around 1ms in total. Threads are not really an expensive resource. The thread pool should be a lot more eager to create and destroy threads. 500ms delay to potentially save 1ms is not a good trade-off. **Easy fix:** I propose lowering the injection delay to 100ms. This reduces the problem given above by 5x. Ideally, the rate would be configurable. The shutdown delay could be lowered from 30s as well. Keeping an idle thread for 30000ms to save 1ms seems excessive. In this ticket I'm not that concerned with retiring threads, though. **Smarter, riskier fix:** The delay could depend on the number of threads in existence, the core count and the perceived pressure on the thread-pool. The injection rate could be: - 0ms delay for up to (ProcessorCount \* 1) threads - 50ms delay for up to (ProcessorCount \* 4) threads - Starting from that a delay of (100ms \* (ThreadCount / ProcessorCount \* someFloatFactor)). Reasoning: The more the CPU is oversubscribed the slower we want to inject. Maybe we need to have a maximum delay of 1sec. Or, the delay must rise sub-linearly (e.g. sqrt). Note, that the Windows Kernel has some thread pool injection heuristics that apply back pressure the more threads are in existence. This seems to work. Source: https://channel9.msdn.com/Shows/Going+Deep/Inside-Windows-8-Pedro-Teixeira-Thread-pool 2332 area-System.Net Improve ServicePointManager.DefaultConnectionLimit "`ServicePointManager.DefaultConnectionLimit` appears to be `2` on .NET 4.5 in non-ASP.NET apps. This is too low for almost any production load. I don't know what this low limit is supposed to accomplish. I understand the presence of _some_ limit as a safety measure but `2` is really never useful. Many developers have trouble with that: https://www.google.com/webhp?complete=1&hl=en&gws_rd=cr,ssl&ei=#complete=1&hl=en&q=site:stackoverflow.com+%22ServicePointManager.DefaultConnectionLimit%22 When somebody asks ""My HTTP requests are unexpectedly slow"" the default answer is ""DefaultConnectionLimit = int.MaxValue"" and this solves the problem in about 80% of the cases. This is strong evidence that the default should be changed. This is an ongoing cause for trouble and surprise. There are three choices that I can think of: 1. Unlimited. ASP.NET has chosen this (`SetAutoConfigLimits`) presumably for good reasons. I think this is the least surprising choice. When a developer says `new WebClient().Download(...)` he expects the request to be sent right away. The dev is responsible for ensuring a sane degree of concurrency. he can use `SemaphoreSlim` or the service point infrastructure for that. 2. A constant factor on the CPU count of the machine (e.g. 10). Pro: This scales up with the size of the machine. Con: It might be a low-CPU (e.g. 2) machine that does little processing but relays it's request to some backend REST service that does the heavy lifting. 100 outstanding requests per CPU would not surprise me at all in such a situation. The benefits of async IO would be throttled. 3. `1`. At least this would make developers very quickly aware that the limit exists and that they need to change it. Maybe the value of `2` follows from that reasoning. I consider this to be a weak choice that is going to be perceived as stupid (as is `2`). Another reason for ""Unlimited"" is that there should not be global limits but per-service limits. A .NET process often hosts many components each of which potentially take from the global limit. They could interact in surprising (and spooky) ways. I think the .NET Framework should pick the default value that has the least surprise and set this to `int.MaxValue`. Also, consider revising the default value of `Expect100Continue`. I believe there is not a single developer in the world who expects each `POST` request to be performed twice by default. I do not know a single case where this was ever deemed useful. Disabling this behavior would entail, I believe, low compatibility risk. (See http://stackoverflow.com/search?q=Expect100Continue) " 2335 area-System.Collections Improve ConcurrentBag GetEnumerator performance Currently `ConcurrentBag` `GetEnumerator()` causes list copying everytime enumerator is accessed eg. through `foreach`. This causes strain on the GC and list copying is also heavy operation on large bags. There should be alternative methods to enumarate the bag contents or implement `GetEnumerator()` so that it does not cause list copying. I have presented here 3 possbile solutions to this problem. **Solution 1)** Add `ForEach` method to `ConcurrentBag`: ``` CSharp public void ForEach(Func action) { // Short path if the bag is empty if (_headList == null) return; bool lockTaken = false; try { FreezeBag(ref lockTaken); ThreadLocalList currentList = _headList; while (currentList != null) // Go through thread lists { Node currentNode = currentList._head; while (currentNode != null) // Go through thead specific linked list { if (!action(currentNode._value)) return; // User wanted to break the operation currentNode = currentNode._next; } currentList = currentList._nextList; } } finally { UnfreezeBag(lockTaken); } } ``` `ForEach` function takes user specified `Func` delegate. This delegate takes the bag item as an argument and returns true/false depending on whether the user wants to continue or stop the enumeration operation. Here `ForEach` operation would lock the bag so that other threads would need to wait for the operation to finish. Therefore results of this operation would represent the bag as a moment-in-time snapshot. **Solution 2)** Add `GetEnumerableSlim` function: ``` CSharp public IEnumerable GetEnumerableSlim() { ThreadLocalList currentList = _headList; while (currentList != null) { Node currentNode = currentList._head; while (currentNode != null) { yield return currentNode._value; currentNode = currentNode._next; } currentList = currentList._nextList; } } ``` This would require an additional change to the internal class `Node`: ``` CSharp internal class Node { public Node(T value) { _value = value; } public readonly T _value; public volatile Node _next; // This needs to be marked as volatile public Node _prev; } ``` `GetEnumerableSlim` would enumerate the bag contents concurrently without locking the bag. The proposed implementation is thread safe from memory model point of view. The fields `ConcurrentBag._headList`, `ThreadLocalList._head` and `Node._next` are all volatile variables. Therefore all the threads always have the newest value available. In addition the `Node._value` reference/value is immutable. `GetEnumerableSlim` is safe to use concurrently. Of course here the enumerator would miss some of the concurrent additions/removals from the bag. Also enumerator could contain modification after the `GetEnumerator` was called. Similiar behaviour is also used in `ConcurrentDictionary`, `GetEnumerator` which may also miss some of the concurrent changes or contain new changes after the `GetEnumerator` was called. Therefore the `GetEnumerableSlim` is consistent with other concurrent collections and their enumerator implementations. (It would be intresting to know why `ConcurrentBag` `GetEnumerator` was originally implementeted so that it copies the bag contents to a list where as the other concurrent collections enumerate the contents concurrently eg. `ConcurrentQueue`.) **Solution 3)** Replace `GetEnumerator` with `GetEnumeratorSlim` implementation. This solution would totally eliminate the risk of performance degradation due to list allocations. But this might not be possible if the existing code relies on the fact that `GetEnumerator` returns moment-in-time representation of the bag. 2336 area-System.Globalization Rename tests in System.Globalization About 40-50% of the tests in System.Globalization do not have self descriptive names. They are currently named PosTest, NegTest etc. 2337 area-System.Globalization Add Unicode Tests to System.Globalization Write Unicode Tests that are generic and not coupled with a particular version of Unicode. Specifically CharUnicodeInfo.GetNumericValue() and CharUnicodeInfo.GetUnicodeCategory() 2338 area-System.Collections Add ConcurrentBag and ConcurrentQueue Clear method Currently `ConcurrentBag` does not support clearing of the bag. Currently only way to clear the bag is to call `TryTake` in a loop which is suboptimal in high concurrency applications: ``` CSharp T dummy; while(bag.TryTake(out dummy)) {} ``` Instead `Clear` method could be implemented so that the bag is emptied at once. Here is the proposed implementation: ``` CSharp public void Clear() { // Short path if the bag is empty if (_headList == null) return; bool lockTaken = false; try { FreezeBag(ref lockTaken); ThreadLocalList currentList = _headList; while (currentList != null) { currentList.Reset(); currentList = currentList._nextList; } } finally { UnfreezeBag(lockTaken); } } ``` Internal class `ThreadLocalList` needs new `Reset/Invalidate` method which sets the thread specific linked list _head and _tail to null as well as resets the counters. GC would then collect the non referenced linked list nodes. ``` CSharp internal void Reset() { _head = null; _tail = null; _count = 0; _stealCount = 0; } ``` `Clear` would lock the bag for the duration of the operation since it could cause undefined behaviour if other threads would access the bag while linked lists are being reseted. (Similarly ConcurrentDictionary also locks the dictionary when `Clear` is called.) 2339 area-System.IO Finish rewriting System.IO.FileSystem tests Finish rewriting the tests for System.IO.FileSystem and replacing the giant runTest() methods with individual [Fact]s and [Theory]s, replacing every instance of Console.WriteLine along the way. 2342 area-System.Xml XmlSchema in CoreFX Hi, Are there any plans to include XmlSchema in CoreFX? If not, is there any recommended way to manipulate schemas? Thank you. 2352 area-System.Runtime API Addition: Add generic Array.Reverse Add generic `Array.Reverse`. ## Rationale [`Array.Reverse`](https://github.com/dotnet/coreclr/blob/ef1e2ab328087c61a6878c1e84f4fc5d710aebce/src/mscorlib/src/System/Array.cs#L1570-L1606) is non-generic. It includes a fast path for a known set of primitive types via a call into the runtime (see [`TrySZReverse`](https://github.com/dotnet/coreclr/blob/4cf8a6b082d9bb1789facd996d8265d3908757b2/src/classlibnative/bcltype/arrayhelpers.cpp#L390-L424)), otherwise it falls back to slower code paths that involve boxing for value types. This is a significant performance cost for non-primitive value types, ~22x slower. Callers of `Array.Reverse` (like `List.Reverse` and `ImmutableArray.Builder.Reverse`) are affected by this performance issue. As a workaround, [`List.Reverse`](https://github.com/dotnet/coreclr/pull/1231) and [`ImmutableArray.Builder.Reverse`](https://github.com/dotnet/corefx/pull/2354) are being updated to not use the non-generic `Array.Reverse` method until the generic `Array.Reverse` method becomes available. Other non-generic methods on `Array` have generic counterparts like `Array.Sort` and `Array.Sort`, so this would just be making `Reverse` consistent with those. ## Proposed API ``` c# public abstract class Array : ... { // Proposed public static void Reverse(T[] array); public static void Reverse(T[] array, int index, int length); // Existing public static void Reverse(Array array); public static void Reverse(Array array, int index, int length); } ``` 2358 area-System.Net Initial commit of System.Net.WebHeaderCollection Just what it says on the tin. 2368 area-System.Net Address PR feedback for System.Net.WebHeaderCollection - Replace `HeaderParser` with `Func` - Make static fields `readonly` - Optimize `HeaderInfoTable` for allocation volume and remove the static constructor - Replace non-generic collections with generic collections 2369 area-System.IO Directory AccessTime, WriteTime, and CreationTime for nonexistent directories inconsistent "Labeld in code as ""//See VSWhidbey # 92050"" On Windows, Directory.GetAccessTime, Directory.GetWriteTime, and Directory.GetCreationTime (as well as their DirectoryInfo clones) will return default values when queried with a path to a nonexistent directory. On Unix, running those same methods for AccessTime and WriteTime throws a ""FileNotFoundException"". Is this behavioral difference desired? Example: ``` Assert.Equal(DateTime.FromFileTime(0).Ticks, Directory.GetLastAccessTime(""doesntexist"").Ticks); //true on Windows, throws on Ubuntu Assert.Equal(DateTime.FromFileTime(0).Ticks, Directory.GetLastWriteTime(""doesntexist"").Ticks); //same as above ``` " 2370 area-System.Net Move some System.Net.WebHeaderCollection tests from [Fact]s to [Theory]s The current version of xUnit used by CoreFX has problems writing text containing certain code points to the test log. There are tests in S.N.WHC that use these code points. These tests are currently [Fact]s, but should be combined with the appropriate [Theory] once CoreFX has taken an updated version of xUnit that fixes the issue. 2372 area-System.Net Add System.Net.WebHeaderCollection to README.md Add System.Net.WebHeaderCollection to README.md 2375 area-System.Reflection Add metadata tokens/module versions back to reflection libraries in CORE CLR. Recent versions of the CORE clr have removed metadata from the reflection libraries. We are writing .NET diagnostics tools, and these APIs are important for supporting our diagnostics scenarios. We would like the APIs to be added back. 2376 area-System.Numerics BigRational The BCL project included a BigRational type: http://bcl.codeplex.com/releases/view/42782 The code seems to be released under the [Microsoft Public License](http://bcl.codeplex.com/license). Would there be any license related issue around including BigRational in corefx? It looks like it's also available on [NuGet](https://www.nuget.org/packages/BigRationalLibrary/). There's also a Rational type in [Solver Foundation](https://msdn.microsoft.com/en-us/library/microsoft.solverfoundation.common.rational%28v=vs.93%29.aspx), but the code doesn't appear to be freely available. 2380 area-System.Net Address PR feedback for System.Net.WebHeaderCollection Fixes #2368 2382 area-System.Net Initial commit of System.Net.WebSockets 2383 area-Infrastructure Figure out how to provide parameters to unit tests at build/run-time. The System.Net tests are likely to need this in order to provide some configurability for the servers used during testing. 2384 area-System.Net WebException: update WebException.GetStatusFromException after System.Net.Http API changes For now, we use the .HResult of the exception to help us map to a suitable WebExceptionStatus enum value. The .HResult is set into this exception by the underlying .NET Core and .NET Native versions of the System.Net.Http stack. In the future, the HttpRequestException will have its own .Status property that is an enum type that is more compatible directly with the WebExceptionStatus enum. 2385 area-System.Net System.Net.Requests.Tests: HttpWebResponse tests need a server that does not provide a Content-Type header Just what it says on the tin. The httpbin servers we're currently using for testing do not have this characteristic. 2386 area-System.Net Initial commit of System.Net.Requests This change also contains some minor refactorings in System.Net.{Http,WebHeaderCollection} in order to share some code between the various System.Net assemblies. 2387 area-System.Net Refactor Http tests for multiple test projects "This change sets up the layout for having multiple test projects for Http. It follows the current guidlines as well as working within the BUILDTOOLS requirements of having "".Tests.csproj"" for the names of the projects. After this PR is done, we will be migrating a large set of http functional tests to GitHub " 2390 area-System.IO FileSystem test update - Updated Directory tests. Note that there are still some unresolved issues pending a solution to #1221 - Consolidated AccessTime, WriteTime, and CreationTime tests for FileInfo, File, DirectoryInfo, and Directory into one file per folder - GetSetTimes.cs - Removed failing tests for the above properties - Added some Unix tests - Resolves #2359 2392 area-System.Collections Add ImmutableArray.Builder.AddRange, MoveToArray methods The builder currently has APIs: ``` C# public void AddRange(T[] items, int length); public ImmutableArray MoveToImmutable(); ``` but is missing the following: ``` C# public void AddRange(T[] items, int start, int length); public T[] MoveToArray(); ``` 2394 area-Meta Port Workflow Foundation to .NET Core Hello, I don't see in the plans neither here and coreCLR for porting Workflow Foundation for CoreCLR... We want know how can we start porting it and add PRs for it here. Thanks 2399 area-System.Net Address CR feedback for System.Net.WebSockets. - Document the ASCII validation in `WebSocketValidate.ValidateSubProtocol` - Clean up `using` statements in `WebSocketValidate` - Decide which exception type to derive from in `WebSocketException` 2400 area-System.Linq Take advantage of algorihmic differences between first-from-ordered and ordered. The fact of something being ordered can have implications for subsequent operations. The ordering Linq methods (`OrderBy`, `ThenBy`, etc.) operate first in O(1) time and space to make a promise of a subsequent O(n log n) sort in O(n) space. In many case though the following operation does not need all of the promised operation. `.OrderBy(λ).First()`, `.OrderBy(λ).First(λ)`, and so on request that a sequence be sorted (O(n log n) time/O(n) space) and then the first element taken (O(1) time and space) which is in total an O(n log n) time/O(n) space operation. However, it is reducible to the O(n) time/O(1) space operation of identifying just the item in question which can be done in O(n) time and O(1) space. As `First`, `Last` and their variants are particularly common with ordered sequences (in some cases not having any meaning without an order), I think this would be a worth-while optimisation. There are other optimisations available, such as all aggregate operations (`Sum` etc.) could be moved from O(n log n) time to O(n) time simply by extracting the source and ignoring the ordering, this may not be as common a case as to make it worthwhile. One could argue that the user should have not put the ordering in there in the first place, and while the cost of checking for an ordered source is slightly, it's not worth paying it on all aggregate operations to benefit a flawed case. `Reverse` is somewhere in the middle. It's reasonable to expect someone might construct an ordered sequence and then `Reverse` in some cases. It's got subtleties (one cannot simply reverse all `OrderBy` to `OrderByDescending` and vice-versa because `OrderBy` is documented as performing stable ordering in linq-2-objects and therefore reversed must have reverse source ordering on equivalent items) but wouldn't be hard, but it's less clear whether the pay off would be worth it. In the more useful cases of `First` etc. there is a fly in the ointment in that this would affect the number of times both key selectors for ordering and predicates for `First` etc. were called. As per #2349 this means side effects on `Func`s would be affected, though perhaps in a way that was less predictable to the user than with that issue anyway. As such, changing the behaviour of `First` in this case would require either a decision in favour of the change that issue would allow for, or a decision that this case was less harmed by such changing side-effects. In summary. I propose that `OrderBy(…).First(…)` and its cousins be optimised, and the trade-offs of optimising `OrderBy(…).Reverse()` be considered. 2402 area-System.IO DirectoryInfo.CreateSubdirectory(path) trims whitespace and returns parent directory "Calling directory.CreateSubdirectory(""whitespaces"") will return ""directory"" and create no subdirectory. ``` DirectoryInfo parentDir = new DirectoryInfo(TestDirectory); DirectoryInfo childDir = parentDir.CreateSubdirectory("" ""); Assert.Equal(parentDir.FullName + Path.DirectorySeparatorChar, childDir.FullName); ``` If newlines or tabs are used, then it throws as expected: ``` DirectoryInfo parentDir = new DirectoryInfo(TestDirectory); Assert.Throws(() => parentDir.CreateSubdirectory(""\n"")); Assert.Throws(() => parentDir.CreateSubdirectory(""\t"")); ``` The reason for this is that dir.CreateSubdirectory(path) essentially wraps around Directory.CreateDirectory(Path.Combine(dir.FullName, path)) which trims trailing whitespace (in this case ""path""). Is this functionality desired? It makes sense to keep curtailing trailing whitespace in Directory.CreateDirectory for back compat reasons, but having CreateSubdirectory on whitespace return the parent directory is unintuitive. " 2403 area-System.IO DirectoryInfo.CreateSubdirectory(path) throws ArgumentException for newline and tab nonsignificant trailing characters "There's a discrepancy in the way DirectoryInfo.CreateSubdirectory and Directory.CreateDirectory handle trailing tab and newline characters on Windows. The below code exhibits the difference: ``` { // Directory.CreateDirectory curtails trailing tab and newline characters string filePath = IOServices.RemoveTrailingSlash(GetTestFilePath()); DirectoryInfo result = Directory.CreateDirectory(filePath + ""\n""); Assert.Equal(filePath, IOServices.RemoveTrailingSlash(result.FullName)); } { // DirectoryInfo.CreateSubdirectory throws an ArgumentException when there are newline or tab characters anywhere in a file name, even as trailing chars string fileName = IOServices.RemoveTrailingSlash(GetTestFileName()); DirectoryInfo parentDir = new DirectoryInfo(TestDirectory); Assert.Throws(() => parentDir.CreateSubdirectory(fileName + ""\n"")); //illegal characters in path } ``` This is somewhat related to #2402 in that DirectoryInfo.CreateDirectory handles whitespace very differently than Directory.CreateDirectory or even DirectoryInfo.Create. " 2405 area-System.Net Refactor WinHttpHandler tests for multiple test projects "This change sets up the layout for having multiple test projects for WinHttpHandler. It follows the current guidlines as well as working within the BUILDTOOLS requirements of having "".Tests.csproj"" for the names of the projects. Also, fixed up some cross-platform definitions in the solutions files for Http and WinHttpHandler. After this PR is done, we will be migrating a large set of http functional tests to GitHub " 2408 area-System.Net Fix WebHeaderCollection.GetEnumerator(). Change WebHeaderCollection.GetEnumerator() from an explicit implementation to a public override to avoid delegating to the base collection. This change also adds a test for this behavior. 2409 area-System.Net Address PR feedback for System.Net.Requests - Audit WebException.cs for inefficient usage of string.Format - Audit the code for string.Compare vs. string.Equals 2416 area-System.Net Abort_BeginGetRequestStreamThenAbort_RequestStreamCallbackCalledBeforeAbortReturns failed in CI "http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug/813/consoleFull ``` System.Net.Requests.Test.HttpWebRequestTest.Abort_BeginGetRequestStreamThenAbort_RequestStreamCallbackCalledBeforeAbortReturns(remoteServer: Uri { AbsolutePath = ""/post"", AbsoluteUri = ""http://httpbin.org/post"", Authority = ""httpbin.org"", DnsSafeHost = ""httpbin.org"", Fragment = """", ... }) [FAIL] 19:58:58 Assert.Equal() Failure 19:58:58 Expected: 1 19:58:58 Actual: 0 19:58:58 Stack Trace: d:\j\workspace\dotnet_corefx_windows_debug\src\System.Net.Requests\tests\HttpWebRequestTest.cs(548,0): at System.Net.Requests.Test.HttpWebRequestTest.Abort_BeginGetRequestStreamThenAbort_RequestStreamCallbackCalledBeforeAbortReturns(Uri remoteServer) ``` " 2424 area-System.Net Remove unstable System.Net.Requests tests As per issue #2416 remove unstable System.Net.Requests tests that were inadvertently ported to GitHub. 2427 area-Infrastructure Update CoreFx build to shipping nuget Need to do the following to bring ourselves current with the shipping nuget scenarios. - [x] switch from DNX to nuget.exe - [x] move projects from `dnxcore50` to `netstandard1.x` - [ ] use PCL meta-package in all test projects - [x] eliminate `test-runtime\project.json` hack - [ ] ensure we use inbox nuget task/targets when present and only use BuildTools version when inbox is missing - [x] switch to stable version consumption of packages 2433 area-System.IO Update to FileSystem Tests - Consolidated AccessTime, WriteTime, and CreationTime tests for FileInfo, File, DirectoryInfo, and Directory into one file per folder - GetSetTimes.cs - Added some Unix tests - Overhauled the Write/Read/Append tests for the File class and removed many duplicate tests - Continuation of #2390 2435 area-Serialization DataContractSerializer constructor causes NullRefException when serializing object When using [this](https://github.com/dotnet/corefx/blob/6e5d09b0334ca8735962f29f38a390c1298639c0/src/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSerializer.cs#L51) constructor for the DataContractSerializer: ``` csharp public DataContractSerializer(Type type, string rootName, string rootNamespace, IEnumerable knownTypes) ``` The resulting serializer can throw a `NullReferenceException`. This is caused by the creation of `XmlDictionaryString` objects which have a `null` `XmlDictionary`. There's also a bug/change in behavior in `XmlDictionaryString` compared with Desktop. On Desktop, if you specify a `null` value for the dictionary when constructing a new instance, an `ArgumentNullException` will be thrown. In corefx, it will attempt to create an empty instance of `IXmlDictionary` and assign that. It then straight away assigns the passed in `null` value to the dictionary effectively throwing away the empty dictionary that was created. Some of the Xml writers require the dictionary for an `XmlDicationary` string to be non-null. This is causing a `NullRefException` to be thrown. Here is a partial call stack from WCF: ``` csharp at System.Xml.XmlBinaryWriterSession.PriorityDictionary`2.TryGetValue(K key, V& value) at System.Xml.XmlBinaryWriterSession.TryLookup(XmlDictionaryString s, Int32& key) at System.Xml.XmlBinaryNodeWriter.TryGetKey(XmlDictionaryString s, Int32& key) at System.Xml.XmlBinaryNodeWriter.WriteXmlnsAttribute(String prefix, XmlDictionaryString ns) at System.Xml.XmlBaseWriter.NamespaceManager.DeclareNamespaces(XmlNodeWriter writer) at System.Xml.XmlBaseWriter.EndStartElement() at System.Xml.XmlBaseWriter.AutoComplete(WriteState writeState) at System.Xml.XmlBaseWriter.StartElement(String& prefix, String localName, String ns, XmlDictionaryString xNs) at System.Xml.XmlBaseWriter.WriteStartElement(String prefix, XmlDictionaryString localName, XmlDictionaryString namespaceUri) at System.Runtime.Serialization.XmlWriterDelegator.WriteStartElementPrimitive(XmlDictionaryString localName, XmlDictionaryString namespaceUri) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteString(XmlWriterDelegator xmlWriter, String value, XmlDictionaryString name, XmlDictionaryString ns) at WriteFaultDetailToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , ClassDataContract ) at System.Runtime.Serialization.ClassDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle) at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph) at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(XmlDictionaryWriter writer, Object graph) ``` 2444 area-System.Data Open items for System.Data.Common The following needs to be incorporated based on the comments in the pull request https://github.com/dotnet/corefx/pull/2197 Please note that the code is being submitted via another pull request https://github.com/dotnet/corefx/pull/2443 1. Investigate the CancellationToken for the Tasks 2. There are more comments made by Stephen Toub, which need to be taken care of. Refer to https://github.com/dotnet/corefx/pull/2197 2454 area-System.Threading Remove reentrancy by default from the TPL The TPL has a few performance features that cause reentrancy. Here are the ones I know of: 1. `TaskCompletionSource.SetXxx` can cause continuations to be executed synchronously. AFAIK this can happen both with or without `ExecuteSynchronously`. Starting with .NET 4.6 there is `RunContinuationsAsynchronously` to disable this behavior. 2. `Task.Wait()` and `Task.Result` can execute an unstarted CPU-based task inline. I do not know of any good workaround from the perspective of the caller of `Wait`/`Result`. Probably, `static Task.Wait(Task)` and related methods have the same problem. 3. `CancellationTokenSource.Cancel()` can execute registered notifications inline. 4. `TaskAwaiter` uses `TaskContinuationOptions.ExecuteSynchronously` if there is no synchronization context set. This forces reentrancy for whatever code completes the task being awaited. In all of these situations arbitrary code can run as part of invoking the respective TPL method. You might not control that code. There might be no way for you to know what code that is because you are writing a library. In big apps it might be architecturally impossible/unwanted to know what code might run. This is **arbitrary, non-deterministic reentrancy in multi-threaded code**. This is very dangerous behavior. Concrete problems (examples): 1. You might call `TaskCompletionSource.SetResult()` under a lock. Now, arbitrary code might run under your lock as well. This can **deadlock**. 2. That arbitrary code might perform blocking operations (e.g. IO). This will now run under your lock and **extend the lock hold time**. 3. The **invariants** of your data might be **temporarily broken**. Due to reentrancy other code can now observe invalid data. 4. **Monitor might fail to provide mutual exclusion** because `lock (x) { lock (x) { } }` does not block/deadlock. Inlining code onto the current thread opens the gates for any locks held by this thread. 5. You might run on a thread with **thread-dependent state** (STA thread, changed priority, deviating culture, `HttpContext.Current` null or not null, ...). This state is now exposed to arbitrary code. It is made available for mutation as well. **This is very unsafe behavior by default.** The number of questions that come up about it on Stack Overflow is noticeable. The bugs are insidious (racy). Please disable _all_ of these behaviors by default. Make unsafe performance features opt in. I doubt there will be compatibility impact from doing this because all of the behaviors above are, to my knowledge, non-deterministic. Completion callbacks should always be queued to the thread pool (or to any scheduler if specified) by default. The TPL should be safe by default. Reentrancy behavior should be: 1. Off by default. 2. Opt-in possible. 3. Overriding forced opt out by any side taking part (completing thread and registering thread). A library should be able to force-disable any of this, no matter whether it registers continuations or whether it completes tasks. This is a problem both for monolithic apps as well as for library authors. See this high-profile case that lead to the inclusion of `RunContinuationsAsynchronously` in .NET 4.6: http://stackoverflow.com/questions/22579206/how-can-i-prevent-synchronous-continuations-on-a-task 2458 area-System.IO FileInfo.Open() with FileMode.Append throws unexpected exception The following code is an example of the situation: ``` string fileName = GetTestFilePath(); using (FileStream fs = new FileInfo(fileName).Open(FileMode.Create)) { fs.WriteByte(0); } using (FileStream fs = new FileInfo(fileName).Open(FileMode.Append)) // Throws ArgumentException: append access can be requested only in write-only mode { } ``` The issue is a result of the default FileAccess value used in the FileInfo.Open(FileMode) method: ``` public FileStream Open(FileMode mode) { return Open(mode, FileAccess.ReadWrite, FileShare.None); } ``` when it should be the same as what File.Open(FileMode) does like so: ``` public FileStream Open(FileMode mode) { return Open(mode, (mode == FileMode.Append ? FileAccess.Write : FileAccess.ReadWrite), FileShare.None); } ``` 2459 area-System.IO DriveLetter_Unix currently failing System.IO.FileSystem.Tests.Directory_CreateDirectory.DriveLetter_Unix [FAIL] 09:58:09 System.IO.DirectoryNotFoundException : Could not find a part of the path '/mnt/j/workspace/dotnet_corefx_linux_debug_tst_prtest/bin/tests/Windows_NT.AnyCPU.Debug/System.IO.FileSystem.Tests/dnxcore50/C:'. 09:58:09 Stack Trace: 09:58:10 at System.IO.UnixFileSystem.RemoveDirectoryInternal(String fullPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound) 09:58:10 at System.IO.UnixFileSystem.RemoveDirectory(String fullPath, Boolean recursive) 09:58:10 at System.IO.Directory.Delete(String path) 09:58:10 at System.IO.FileSystem.Tests.Directory_CreateDirectory.DriveLetter_Unix() 09:58:10 Finished: System.IO.FileSystem.Tests 2460 area-System.IO File.Move relies on the UnixFileSystem CopyFile method that overwrites only when it shouldn't The File.Move(source, dest) and FileInfo.MoveTo(dest) functions do not currently function as they should with regards to overwrites. The following test passes on Windows, but fails on Linux: ``` FileInfo testFileSource = new FileInfo(GetTestFilePath()); testFileSource.Create().Dispose(); FileInfo testFileDest = new FileInfo(GetTestFilePath()); testFileDest.Create().Dispose(); Assert.Throws(() => File.Move(testFileSource.FullName, testFileDest.FullName)); // doesn't throw on Ubuntu ``` 2461 area-System.Data [RC1 blocker] Windows interop getting called on OS X Using SqlClient on CoreCLR (Darwin) calls interop methods that require Windows APIs. This is a regression. This behavior just showed after upgrading DNX. Currently using `dnx-coreclr-darwin-x64.1.0.0-beta7-12264`. Here is the stack trace: > ``` > System.DllNotFoundException : Unable to load DLL 'api-ms-win-core-processthreads-l1-1-0.dll': The specified module could not be found. > (Exception from HRESULT: 0x8007007E) > Stack Trace: > at Interop.mincore.GetCurrentThread() > at Interop.mincore.OpenThreadToken(TokenAccessLevels desiredAccess, WinSecurityContext openAs, SafeAccessTokenHandle& tokenHandle) > at System.Security.Principal.WindowsIdentity.GetCurrentToken(TokenAccessLevels desiredAccess, Boolean threadOnly, Boolean& isImpersonating, Int32& hr) > at System.Security.Principal.WindowsIdentity.GetCurrentInternal(TokenAccessLevels desiredAccess, Boolean threadOnly) > at System.Data.ProviderBase.DbConnectionPoolIdentity.GetCurrent() > at System.Data.ProviderBase.DbConnectionPoolGroup.GetConnectionPool(DbConnectionFactory connectionFactory) > at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPool(DbConnection owningObject, DbConnectionPoolGroup connectionPoolGroup) > at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) > at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) > at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) > at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) > at System.Data.SqlClient.SqlConnection.Open() > at Microsoft.Data.Entity.SqlServer.FunctionalTests.SqlServerTestStore.DeleteDatabase(String name) > at Microsoft.Data.Entity.SqlServer.FunctionalTests.SqlServerTestStore.CreateTransient(Boolean createDatabase) > at Microsoft.Data.Entity.SqlServer.FunctionalTests.SqlServerTestStore.CreateScratch(Boolean createDatabase) > at Microsoft.Data.Entity.FunctionalTests.SharedCrossStoreFixture.CreateTestStore(Type testStoreType) > at Microsoft.Data.Entity.FunctionalTests.SqlServerCrossStoreFixture.CreateTestStore(Type testStoreType) > at Microsoft.Data.Entity.FunctionalTests.EndToEndTest`2..ctor(TFixture fixture) > at Microsoft.Data.Entity.FunctionalTests.SqlServerEndToEndTest..ctor(SqlServerCrossStoreFixture fixture) > ``` 2463 area-System.Net Fix proxy authentication handling during redirects /cc @CIPop @pgavlin @SidharthNabar @ChengTian Reference issue #2168 2467 area-System.Net Avoid internal enumerator allocations in HttpClient There are many places where `ObjectCollection` instances are enumerated internally. Each time one of these collections is enumerated, an enumerator is allocated on the heap. This change avoids the enumerator allocation by using a struct enumerator (internal-only). 2470 area-System.Net Avoid a closure/delegate allocation in WinHttpHandler One-line change to avoid a closure and delegate allocation on each call. 2473 area-System.Net Initial xplat work for HttpClient Created a CurlHandler class to wrap calls to libcurl. Very limited support currently which will be extended in future checkins. Start of #2480 2480 area-System.Net Implement System.Net.Http on Unix 2481 area-System.Net Implement System.Net.Primitives on Unix 2482 area-System.Net Implement System.Net.Sockets on Unix 2483 area-System.Net Implement System.Net.Security on Unix 2484 area-System.Net Implement System.Net.NameResolution on Unix 2485 area-System.Net Implement System.Net.NetworkInformation on Unix 2486 area-System.Net Implement System.Net.WebSockets.Client on Unix 2487 area-System.Net Implement System.Net.Utilities on Unix 2488 area-System.Net GetResponseAsync_ServerNameNotInDns_ThrowsWebException failing locally "I just upgraded to Windows 10 RTM and VS2015 RTM. Not sure if it's related, but this test is now failing for me locally. ``` Discovering: System.Net.Requests.Tests Discovered: System.Net.Requests.Tests Starting: System.Net.Requests.Tests System.Net.Requests.Test.HttpWebRequestTest.GetResponseAsync_ServerNameNotInDns_ThrowsWebException(remoteServer: Uri { AbsolutePath = ""/get"", AbsoluteUri = ""http://httpbin.org/get"", Authority = ""httpbin.org"", DnsSafeHost = ""httpbin.org"", Fragment = """", ... }) [FAIL] Assert.True() Failure Stack Trace: \corefx\src\System.Net.Requests\tests\HttpWebRequestTest.cs(398,0): at System.Net.Requests.Test.HttpWebRequestTest.GetRes ponseAsync_ServerNameNotInDns_ThrowsWebException(Uri remoteServer) System.Net.Requests.Test.HttpWebRequestTest.GetResponseAsync_ServerNameNotInDns_ThrowsWebException(remoteServer: Uri { AbsolutePath = ""/get"", AbsoluteUri = ""https://httpbin.org/get"", Authority = ""httpbin.org"", DnsSafeHost = ""httpbin.org"", Fragment = """", ... }) [FAIL] Assert.True() Failure Stack Trace: \corefx\src\System.Net.Requests\tests\HttpWebRequestTest.cs(398,0): at System.Net.Requests.Test.HttpWebRequestTest.GetRes ponseAsync_ServerNameNotInDns_ThrowsWebException(Uri remoteServer) Finished: System.Net.Requests.Tests ``` " 2490 area-System.Net Open Source System.Net.Websockets.Client 2492 area-System.Net Open source System.Net.Security 2493 area-System.Net Avoid unnecessary byte[] allocations in HttpContent `HttpContent.ReadAsStringAsync()` has a bunch of calls to `Encoding.GetPreamble()` as part of its encoding detection. `GetPreamble()` creates a new `byte[]` each time it is called. These `byte[]` allocations can be avoided. 2496 area-Serialization Fix serialization test failure in Minsk timezone Fix #2287 2499 area-System.Net Replace ad-hoc definitions of SafeHandleZeroOrMinusOneIsInvalid with a single definition. Just as it says. There are at least two or three distinct definitions of this type, all with identical semantics. 2500 area-System.Net Event logging for System.Net.* Event logging for these assemblies is currently unimplemented: we need to design and implement a solution. 2501 area-System.Net Remove dead code - SafeWinHttpHandleWithCallback SafeWinHttpHandleWithCallback is a better pattern; SafeWinHttpHandle is probably a better name. The implementation for the former should probably be folded into the latter. 2502 area-Serialization XmlUTF8TextWriter has not implement WriteStartElementAsync or WriteEndElementAsync WCF's async operations need to call these methods. See https://github.com/dotnet/wcf/issues/221. 2503 area-System.Net Move System.Net.* strings to resources as appropriate.` Just what it says on the tin. 2504 area-Serialization Add FlushAsync and WriteBase64Async in XmlDictionaryWriter WCF needs to use FlushAsync and WriteBase64Async. See https://github.com/dotnet/wcf/issues/222. 2505 area-System.Net Replace single-item pinned buffers in System.Net.WebSockets.Client with PinnableBufferCache. 2506 area-System.Net Optimize locking patterns in System.Net.WebSockets.Client. For example, release the lock between operations and check, under the lock, that the state is still valid before continuing. 2507 area-System.Net Optimize factoring over operations between WinHttpWebSocket and WinHttpWebSocketCallback. It may be profitable to move some code from WinHttpWebSocket to WinHttpWebSocketCallback. 2508 area-System.Net Release pinned buffers at correct time in WinHttpResponseStream, WinHttpWebSocket This is a potential bug: pinned buffers must not be released until it is guaranteed that no further operations will be made that use those buffers. 2509 area-System.Net Handle SSL-related failures in WinHttpWebSocketCallback. This code needs to be shared with WinHttpHandler. 2511 area-System.Net Initial commit of System.Net.WebSockets.Client. 2512 area-System.IO Final major update to the tests for System.IO.FileSystem "- Resolves #2458. FileInfo.Open(FileMode.Append) didn't allow appending per so I modified FileInfo to allow it - Resolves #2460. File.Move and FileInfo.MoveTo no longer always overwrite the destination file. - Resolves #2459. Reenabled Directory_CreateDirectory.DriveLetter_Unix as it's previous failures were not the fault of the method but of the system. - Added Interop.Link to the Interop files for the implementation of File.Move - Consolidated all of the related files that did nothing but inherit from other classes (e.g. File_GetFiles_str and File_GetFiles_str_str were consolidated into File_GetFiles) - Renamed all files to only include parameters in the filename if there are multiple files for a test. - Removed the ""partial"" keyword from some test classes - Finished overhauling all test cases that don't directly require solutions to Build System issues before being re-added (e.g. those that require networked drives or altering the current directory) - Added some tests to increase code coverage slightly in some cases. - All classes and files have been renamed to match the standard set by FileStream: only include parameters in the test/class name if there are overloads - Modified the Unix behavior for distinguishing between a FileNotFoundException and a DirectoryNotFoundException to match that of Windows. " 2522 area-System.Security RSAOpenSsl should support PSS signing RSAOpenSsl::SignHash throws when the signing mode is other than Pkcs1. OpenSSL's RSA_sign function only does PKCS1, and that's how signing currently works. PSS is theoretically available, but needs to be done using lower level API. Remember to keep it bound to OpenSsl 1.0.1 (if possible... if not, it might have to just throw on OSX). 2523 area-System.Security RSAOpenSsl should support OAEP padding using a SHA-2 algorithm Currently it only supports Pkcs1 and OaepSha1. Other hashing algorithms would work, but it requires doing the OAEP manually, since OpenSSL doesn't expose a convenient wrapper function for this. 2524 area-System.Net Reduce HttpWebResponse header allocations Removed unnecessary ToUpperInvariant allocation in WinHttpHandler. HttpWebResponse created a StringBuilder for every header in the response to handle possible multi-values. Common case is a single value so lazy create the buffer when there is more than 1. 2525 area-System.Net System.Uri.GetComponents behavior and MSDN documentation "`System.Uri.GetComponents` method behaves different from the MSDN documentation. https://msdn.microsoft.com/en-us/library/system.uri.getcomponents%28v=vs.110%29.aspx The documentation says: > When `Query` or `Fragment` is specified alone, the return value includes the delimiter. But actually, this method returns value without delimiter. ``` csharp var uri = new Uri(""http://www.example.com/path/to/sample.html?key=value#fragment""); // Expected: ""path/to/sample.html"" (without delimiter; not ""/path/to/sample.html"") Debug.Assert(uri.GetComponents(UriComponents.Path, UriFormat.SafeUnescaped).Equals(""path/to/sample.html"")); // Expected: ""/path/to/sample.html"" (with delimiter) Debug.Assert(uri.GetComponents(UriComponents.Path | UriComponents.KeepDelimiter, UriFormat.SafeUnescaped).Equals(""/path/to/sample.html"")); // FAIL (Expected: ""?key=value"", Actual: ""key=value"") Debug.Assert(uri.GetComponents(UriComponents.Query, UriFormat.SafeUnescaped).Equals(""?key=value"")); // Expected: ""?key=value"" (with delimter) Debug.Assert(uri.GetComponents(UriComponents.Query | UriComponents.KeepDelimiter, UriFormat.SafeUnescaped).Equals(""?key=value"")); // FAIL (Expected: ""#fragment"", Actual: ""fragment"") Debug.Assert(uri.GetComponents(UriComponents.Fragment, UriFormat.SafeUnescaped).Equals(""#fragment"")); // Expected: ""#fragment"" (with delimiter) Debug.Assert(uri.GetComponents(UriComponents.Fragment | UriComponents.KeepDelimiter, UriFormat.SafeUnescaped).Equals(""#fragment"")); ``` I needed `UriComponents.KeepDelimiter` flag just like `UriComponents.Path` to get result with delimiter. I'm not sure that this is a bug (maybe this is a documentation issue; even Mono behaves like this), but I want this ""issue"" to be reviewed anyway. " 2531 area-System.Net Remove StreamToStreamCopy in HttpClient This change removes the internal `StreamToStreamCopy` class, which is only used by `StreamContent.SerializeToStreamAsync`, thus avoiding the instance allocation of the class. `Stream` already has a built-in `CopyToAsync` helper that can be used, that `MemoryStream` [overrides](https://github.com/dotnet/coreclr/blob/ef1e2ab328087c61a6878c1e84f4fc5d710aebce/src/mscorlib/src/System/IO/MemoryStream.cs#L455-L457) to provide a more efficient implementation when the destination is another MemoryStream. Also some minor cleanup: I made some fields `readonly` that could be, and removed an unused using. Question about the existing behavior: If an exception is thrown during the copy operation, the source stream won't be disposed (if it can be disposed). Is this is by design? I was going to wrap the `await _content.CopyToAsync(...)` in a try/finally with the dispose in the finally, but I didn't want to change the existing behavior if it is by design. 2532 area-System.Net Cleanup ByteArrayContent - Use `Task.FromResult` instead of `TaskCompletionSource` (avoids the allocation) - Make readonly fields `readonly` - Remove unused `using` 2534 area-System.Net Make StreamToStreamCopy static Avoids the unnecessary instance allocation in `StreamContent.SerializeToStreamAsync()`. 2535 area-System.Text System.Text.Encoding HeaderName missing Was this property removed on purpose? Or is it just not yet implemented? If it _has_ been purposely removed, what should I be using instead if I want the name to use in email headers? 2537 area-System.IO Win32FileSystem File.Move is inconsistent with its Exception throws "There is an inconsistent behavior in File.Move with regards to non existent directories in paths that is present in both the desktop and core frameworks. If the parent directory of the source file is nonexistent, a FileNotFoundException is thrown. If the parent directory of the dest file is nonexistent, a DirectoryNotFoundException is thrown. Example: ``` File.Create(""test1"").Dispose(); File.Move(Path.Combine(Directory.GetCurrentDirectory(), ""test2"", ""test3""), ""test4""); // throws a FileNotFoundException File.Move(""test1"", Path.Combine(Directory.GetCurrentDirectory(), ""test2"", ""test3"")); // throws a DirectoryNotFoundException ``` The reason for this is that File.Move makes a call to ""InternalExists"" to check that the sourceFile exists in full and if it doesn't then a FileNotFoundException is thrown regardless of which part of the path caused the failure. Removing this check is simple and will leave path checking to the FileSystem implementation (which would be preferable), but it will need to be mirrored in the desktop as well or ignored/worked around on both. " 2538 area-System.Globalization TimeZoneInfo should have consistent Ids across Windows and Linux "Currently Windows has TimeZoneInfo.Id values like ""Pacific Standard Time"" and ""Eastern Standard Time"". But on Linux they are ""America/Los_Angeles"" and ""America/New_York"". We should make these Ids consistent across platforms so the same code can run on both Windows and Linux. Currently if you call TimeZoneInfo.FindSystemTimeZoneById you need to pass in different strings between Windows and Linux. " 2542 area-System.Net Unify System.Net.WebSockets.Client's WinHttpException with System.Net.Http's WinHttpException. 2546 area-System.Security Many deprecation warnings in System.Security.Cryptography.Native on Mac OS X I'm about to unblock the mac build by disabling the warnings, but building System.Security.Crytpography.Native on Mac OS X produces many deprecation warnings. 2551 area-System.Reflection BugFix: Signature Decoder not providing ValueType or Class flag This change would fix #2314. I just added to flags into the provider interface so that the api consumers can retrieve the information in case they need it. In order to do these they need to set the flag `bool NeedProjectedFlags` to `true` . In this case they could know if it is a valuetype or class through the `SignatureTypeCode TypeCode` property added in `ISignatureTypeProvider` as well. Adding @AlexGhiondea 2553 area-System.Net Fix regression in HttpMethod.GetHashCode() A PR from last month changed how GetHashCode() works. This ended up breaking tests against the .NET Native build of System.Net.Http which shares the same source code as CoreFx. So, reverting the change in GetHashCode() and porting additional ToF tests to GitHub. 2554 area-System.Net Update README.md for System.Net.WebSockets.Client System.Net.WebSockets.Client source code was recently ported to GitHub. Updating the README.md for that. cc: @CIPop @SidharthNabar @pgavlin @stephentoub @ericstj 2555 area-System.Net Address feedback on xplat implementation of HttpClient 2556 area-System.Net Consider changing HttpMethod to do equality comparisons case-sensitive Reference PR #2553. Consider changing the `System.Net.Http.HttpMethod` class so that equality comparison between two `HttpMethod` objects is done in a case-sensitive manner (aligning with the latest HTTP RFC) instead of the current case-insensitive manner. 2557 area-System.Net HttpClient via libcurl : proxy support This commit introduces integrates CURL handler with the proxy functionality offered by libcurl 2558 area-System.IO Modified calls to GetTestFilePath within loops to not use the same filename - Added an overload to GetTestFilePath that takes an integer index parameter to add to the generated filename so that calls to the function within loops will be able to differentiate themselves - Resolves #1434 2559 area-System.Net Initial commit of System.Net.Primitives. 2561 area-System.Net Optimize HttpMethod.GetHashCode() Avoid unnecessary allocations associated with the use of `ToUpperInvariant()`, and test improvements. Also, some minor cleanup (made `_method` `readonly`, removed unused usings, and removed trailing whitespace). 2575 area-System.Data SQL server alias recognized with CLR runtime but not CoreCLR "I wrote a test console application and set up a SQL configuration alias in SQL server configuration manager. When running my application with the dnx 4.51 runtime, the database connection is established with no problem and the application functions normally If I switch the runtime to dnx core 5.0, any attempts to connect to the database from the application fail with the SqlException 'The network path was not found.' Replacing the alias in the connection string with the actual server name resolves the issue. The connection string I'm using is included below: ``` ""connectionString"": ""Server=aliasName;Database=dbName;Trusted_Connection=True;MultipleActiveResultSets=true"" ``` Perhaps the System.Data.SqlClient coreCLR library does not support SQL aliases and this is not a bug. I just think the different behavior between runtimes is a bit odd and the error it produces is not helpful in deciphering the problem. " 2576 area-System.Threading System.Threading.Thread should support all runtimes The current System.Threading.Thread (and System.Threading.ThreadPool) packages only support desktop and CoreCLR. The problem is that with a name like System.Threading.\* and with threads being a core part of many apps, people won't know (or care!) that UWP apps will lose out on that library because only Task is supported. The best solution is to implement Thread/ThreadPool for UWP so that people can use the threading model they're most comfortable with and what's most appropriate for the job. Forcing Task for UWP is counterproductive if it'll mean that UWP will lose out on many libraries that choose to use Thread anyway. When it comes to creation/consumption of .NET Core packages, right now ASPNet is the biggest driver. As much as we want people to use UWP, it's just smaller for now. That puts even greater pressure on UWP as library authors will either not know that Thread isn't available on UWP or care even if they do. .NET Core is supposed to be unifying the BCL and shielding libraries from platform/runtime differences. Please don't fragment it with something as central as Thread. 2582 area-Infrastructure Build warnings from outer-loop only test projects We have a bunch of these on every build: ``` EXEC : warning : System.Xml.RW.FactoryReader.Tests has no tests to run ``` My understanding is that these libraries contain only outer loop tests by design. in that case, we should adjust things to not warn in that case. I also wonder if we really need so many different XML test assemblies... 2583 area-System.Security PfxTests.TestPrivateKey intermittent failure I can't repro it, but I got the following once: ``` System.Security.Cryptography.X509Certificates.Tests.PfxTests.TestPrivateKey [FAIL] System.Security.Cryptography.CryptographicException : OpenCSP failed with error code 2148073494. Stack Trace: D:\Src\corefx\src\System.Security.Cryptography.Csp\src\System\Security\Cryptography\CapiHelper.cs(306,0): at Internal.NativeCrypto.CapiHelper.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer) D:\Src\corefx\src\System.Security.Cryptography.Csp\src\System\Security\Cryptography\CapiHelper.cs(698,0): at Internal.NativeCrypto.CapiHelper.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 keySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle) D:\Src\corefx\src\System.Security.Cryptography.Csp\src\System\Security\Cryptography\RSACryptoServiceProvider.cs(89,0): at System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair() D:\Src\corefx\src\System.Security.Cryptography.Csp\src\System\Security\Cryptography\RSACryptoServiceProvider.cs(69,0): at System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 keySize, CspParameters parameters, Boolean useDefaultKeySize) D:\Src\corefx\src\System.Security.Cryptography.Csp\src\System\Security\Cryptography\RSACryptoServiceProvider.cs(50,0): at System.Security.Cryptography.RSACryptoServiceProvider..ctor(CspParameters parameters) D:\Src\corefx\src\System.Security.Cryptography.X509Certificates\src\Internal\Cryptography\Pal.Windows\CertificatePal.PrivateKey.cs(49,0): at Internal.Cryptography.Pal.CertificatePal.get_PrivateKey() D:\Src\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\RSACertificateExtensions.cs(55,0): at System.Security.Cryptography.X509Certificates.RSACertificateExtensions.GetRSAPrivateKey(X509Certificate2 certificate) D:\Src\corefx\src\System.Security.Cryptography.X509Certificates\tests\PfxTests.cs(70,0): at System.Security.Cryptography.X509Certificates.Tests.PfxTests.TestPrivateKey() Finished: System.Security.Cryptography.X509Certificates.Tests === TEST EXECUTION SUMMARY === System.Security.Cryptography.X509Certificates.Tests Total: 157, Errors: 0, Failed: 1, Skipped: 0, Time: 0.854s ``` 2585 area-System.Reflection Merge master to dev/metadata 2586 area-System.Reflection SignatureDecoder isValueType not set correctly for some projected types and should be optional Follow-up to PR #2551 a. isValueType is not set correctly when a type is projected from value type to class or vice versa. b. There should be an opt-in option to pas non-null isValueType. By default, it should always be null and when option is on, it should compute isValueType (including possible projection case) cc @nguerrera 2588 area-System.IO Modified the Unix implementation of FileMove and fixed the corresponding broken FileSystemWatcher tests - Resolves #2460 - Changed the way the UnixFileSystem does File moving; it was previously implemented using the rename syscall but now uses a combination of link and unlink. The side effect of this change is that the FileSystemWatcher will now treat File.Move as a deletion. - Removed all tests from FileSystemWatcher that made calls to File.Move and consolidated them into a new file: FileSystemWatcher.MoveFile.cs. This new file separates tests into Windows and Unix categories and uses Theories to supply the input WatcherChangeType and whether a move should trigger an event for the given type. If we later decide to change the Unix behavior of MoveFile, changing the FileSystemWatcher tests will be a simple matter of flipping the boolean values for the affected tests. 2589 area-System.Net Update README.md for System.Net.Primitives System.Net.Primitives source code is now on GitHub. Updating the README.md. 2591 area-System.Net Cleanup CookieCollection - Public surface area now matches the [reference assembly contract](https://github.com/dotnet/corefx/blob/b84605422a74d69e7aa61a25d8760bfe2fa32296/src/System.Net.Primitives/ref/System.Net.Primitives.cs#L47-L55) and dead code removed - Removed the `CookieCollectionEnumerator` (`_list.GetEnumerator()` used instead). This removes the need for the `_version` field as `List` already tracks this - Avoid the enumerator allocation in `Add(CookieCollection)` by enumerating `_list` - Removed unused internal constructor and associated field - Made the `_list` field readonly - Removed unused usings - Removed trailing whitespace Fixes #2593 2593 area-System.Net Remove dead code related to CookieCollection.IsReadOnly from System.Net.Primitives **Edit:** `IsReadOnly` is dead code that should be removed from CoreCLR. --- Original issue description (kept here so the comments below make sense): > The [default constructor](https://github.com/dotnet/corefx/blob/63ff03fce5ab7c7ac6920d99af148a447d04c822/src/System.Net.Primitives/src/System/Net/CookieCollection.cs#L33) sets this to `true`, but `CookieCollection` is always mutable (same as on the desktop framework) -- there's nothing in its implementation that enforces it being read-only. > > Is it too late to remove this public property from the System.Net.Primitives contract? (I'm assuming it can't be removed, but figured I'd ask anyway). > > If it can't be removed, should the default value be changed to `false` to reflect the actual behavior? However, this would go against the [MSDN documentation](https://msdn.microsoft.com/en-us/library/w6x28886%28v=vs.110%29.aspx) for the desktop framework, which states the default value is `true`. 2595 area-System.Net Implement System.Net.Primitives for *nix. Platform abstractions have been added for IP address parsing and host information. The closest APIs that most POSIX systems have to the NTDLL IP address parsing APIs are getaddrinfo/getnameinfo. In the case of IPv6 in particular, inet_ntop/inet_pton are not sufficient, as these APIs do not support scope IDs. 2597 area-System.Net HttpClient xplat: Basic request and response processing - Also addressed some of the comments in https://github.com/dotnet/corefx/issues/2555 2598 area-System.Net Fix HTTPS checks in xplat HttpClient cc: @davidsh @stephentoub @CIPop @SidharthNabar @pgavlin 2604 area-Infrastructure run-test.sh deploys WP8 dataflow if present, fails ETW test On my machine (might have different behavior based on file system order), running with System.Threading.Tasks.Dataflow and System.Threading.Tasks.Dataflow.WP8 dlls in the corefx bin path, the test overlay gets the WP8 build, which doesn't have FEATURE_TRACING and the ETW test fails 2608 area-System.Net From Feedback in issue 2149, Propagate CancellationToken in calls to TrySetCanceled: As a minor improvement, using the new TrySetCanceled overload, you could make this state.Tcs.TrySetCanceled(state.CancellationToken) ... that just helps to ensure that the token is propagated to anyone getting an OperationCanceledException later on. 2610 area-System.IO FileSystem GetLastWriteTime and GetLastAccessTime don't properly convert values to Local DateTimeKind "The following test has different results for each platform: ``` FileInfo testFile = new FileInfo(""test.txt""); testFile.Create().Dispose(); DateTime dt = new DateTime(2014, 12, 1, 12, 0, 0, DateTimeKind.Local); Console.WriteLine(""regular: "" + dt.ToString()); Console.WriteLine(""local: "" + dt.ToLocalTime().ToString()); Console.WriteLine(""utc: "" + dt.ToUniversalTime().ToString()); File.SetLastWriteTime(testFile.FullName, dt); var res = File.GetLastWriteTime(testFile.FullName); Console.WriteLine(""result: "" + res.ToString()); Console.WriteLine(""result.toLocal(): "" + res.ToLocalTime().ToString()); Console.WriteLine(""result.ToUTC(): "" + res.ToUniversalTime().ToString()); Console.WriteLine(); ``` On Desktop Framework: ``` regular: 12/1/2014 12:00:00 PM local: 12/1/2014 12:00:00 PM utc: 12/1/2014 8:00:00 PM result: 12/1/2014 12:00:00 PM result.toLocal(): 12/1/2014 12:00:00 PM result.ToUTC(): 12/1/2014 8:00:00 PM ``` On Win32 Core: ``` regular: 12/1/2014 12:00:00 PM local: 12/1/2014 12:00:00 PM utc: 12/1/2014 8:00:00 PM result: 12/1/2014 12:00:00 PM result.toLocal(): 12/1/2014 4:00:00 AM result.ToUTC(): 12/1/2014 8:00:00 PM ``` On Linux Core: ``` regular: 12/01/2014 12:00:00 local: 12/01/2014 12:00:00 utc: 12/01/2014 4:00:00 result: 12/01/2014 04:00:00 result.toLocal(): 12/01/2014 12:00:00 result.ToUTC(): 12/01/2014 20:00:00 ``` The issue lies in the conversions from DateTimeOffsets to DateTimes: nowhere is DateTimeKind (i.e. local or UTC) considered when reading the attributes of a file. To make the behavior in line with the Desktop, we should convert all filesystem times (CreationTime, WriteTime, AccessTime) to DateTimeKind.Local when converting them from a DateTimeOffset to a DateTime. Thanks to @eerhardt for help finding the lack of conversion. " 2611 area-System.IO Fixed AccessTime, WriteTime, and CreationTime to return a DateTime object with properly set DateTimeKind - The implementations of GetLastAccessTime, GetCreationTime, and GetLastWriteTime were not properly converting the read values to LocalTime for either Windows or Unix. - Resolves #2603, #2610 2613 area-System.Diagnostics ProcessThreadTests.TestStartTimeProperty failed on Linux in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst_prtest/1488/console ``` 20:32:15 System.Diagnostics.ProcessTests.ProcessThreadTests.TestStartTimeProperty [FAIL] 20:32:15 Assert+WrapperXunitException : File path: d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Diagnostics.Process\tests\System.Diagnostics.Process.Tests\ProcessThreadTests.cs. Line: 85 20:32:15 ---- Assert.InRange() Failure 20:32:15 Range: (635742559171500970 - 635742559171722530) 20:32:15 Actual: 635742559171972800 20:32:15 Stack Trace: 20:32:16 at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber) 20:32:16 at Assert.InRange[T](T actual, T low, T high, String path, Int32 line) 20:32:16 at System.Diagnostics.ProcessTests.ProcessThreadTests.TestStartTimeProperty() 20:32:16 ----- Inner Stack Trace ----- 20:32:16 at Assert.InRange[T](T actual, T low, T high, String path, Int32 line) 20:32:20 Finished: System.Diagnostics.Process.Tests 20:32:20 20:32:20 === TEST EXECUTION SUMMARY === 20:32:20 System.Diagnostics.Process.Tests Total: 55, Errors: 0, Failed: 1, Skipped: 0, Time: 6.307s ``` 2618 area-System.Runtime TimeZoneInfo.TransitionTime cannot support Israel, et al. time zones on Linux "It currently isn't possible to support Israel, Asia/Amman, Asia/Gaza, Asia/Hebron, Pacific/Fiji and America/Godthab daylight savings rules in the POSIX string that is used on Linux to describe the daylight savings transitions for years after the last transition stored in the file. Here is Israel's POSIX string: IST-2IDT,M3.4.4/**26**,M10.5.0 This is saying that daylight savings starts 26 hours after midnight of the 4th Thursday of March. ""On July 8, 2013, the Israeli Knesset approved the bill to extend IDT even further. According to the bill, IDT will begin on the Friday before the last Sunday of March, and end on the last Sunday of October."" From https://en.wikipedia.org/wiki/Israel_Summer_Time So this might not be the last Friday of the month. Some years it is the last Friday of the month, some years it is the 2nd to last. This rule isn't possible to describe in the current [TimeZoneInfo.TransitionTime structure](https://msdn.microsoft.com/en-us/library/vstudio/system.timezoneinfo.transitiontime%28v=vs.110%29.aspx). It can only specify the 4th Friday, or the last Friday, there is no way to say ""the Friday before the last Sunday"". To fix this, we should add a ""TimeSpan Offset"" to TransitionTime that we can use to convert the string ""M3.4.4/26"" into a TransitionTime structure. Here the TimeSpan Offset = 26 hours, and month = 3, week = 4, day = 4. The ""TimeOfDay"" property would be ignored in this case. Note that America/Godthab uses a negative time offset: WGT3WGST,M3.5.0/-2,M10.5.0/-1. " 2619 area-System.Reflection Three TypeExtensions tests failing on Linux with xUnit 2.1.0 A few of the reflection tests seem to be failing on Linux when run with xUnit 2.1.0. These tests are doing fairly simple stuff, just subscribing some events and then triggering them, and checking the state afterwards. ``` System.Reflection.Compatibility.UnitTests.EventInfoAddEventHandler.PosTest2 System.Reflection.Compatibility.UnitTests.EventInfoAddEventHandler.PosTest3 System.Reflection.Compatibility.UnitTests.EventInfoAddEventHandler.PosTest1 ``` 2621 area-System.Net Fix casing to unblock Linux native builds I had hoped that this was going to be fixed by PR #2591, but that PR appears to be on hold for the moment. This change fixes the casing in the proj file so that native Linux builds will pass. 2624 area-System.Reflection Bump file version of S.R.Metadata to match assembly version 2632 area-System.IO DirectoryInfo.ToString inconsistent with Desktop On Desktop creating a DirectoryInfo with a full path returns a full path. Creating a DirectoryInfo with a short path, or creating it from a parent (eg: CreateSubdirectory, EnumerateDirectories,etc) returns just the directory name. On CoreCLR we are always trimming to just the directory name. I traced this behavior back to an IFDEF in the original code https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/IO/DirectoryInfo.cs#L639-L643. It seems that the original CoreCLR implementation (Silverlight/phone) hardcoded the short name. We should prefer the desktop behavior instead of the current. The current behavior is due to the legacy behavior of SL trying to sandbox the app. This is not a goal for CoreCLR and we don't have a back-compat burden for the current implementation. We also need to examine similar cases in other FileSystem types. 2635 area-System.Security Ensure that X509Certificates file tests run the gamut of supported formats. Updating the testdata package isn't the most friendly of things to do right now, so tracking this in an issue for later. - [X] X509-DER - [ ] X509-PEM - [X] PKCS12 - [ ] PKCS7 - [ ] PKCS7-PEM 2640 area-System.IO [IO.Pipes] Outer cancellation of WaitForConnectionAsync/ReadAsync/WriteAsync "Consider the following code ``` c# [DllImport(""api-ms-win-core-io-l1-1-0.dll"", SetLastError = true)] internal static unsafe extern bool CancelIoEx(SafeHandle handle, NativeOverlapped* lpOverlapped); public static async Task CanBeCanceled_False() { using (NamedPipeServerStream server = new NamedPipeServerStream(""unique3"", PipeDirection.InOut, 1, PipeTransmissionMode.Byte, PipeOptions.Asynchronous, 0, 0)) { Task waitForConnectionTask = server.WaitForConnectionAsync(CancellationToken.None); // cannot be canceled unsafe { CancelIoEx(server.SafePipeHandle, null); } await waitForConnectionTask; // throws OperationCanceledException } } public static async Task CanBeCanceled_True() { using (NamedPipeServerStream server = new NamedPipeServerStream(""unique3"", PipeDirection.InOut, 1, PipeTransmissionMode.Byte, PipeOptions.Asynchronous, 0, 0)) { var ctx = new CancellationTokenSource(); Task waitForConnectionTask = server.WaitForConnectionAsync(ctx.Token); // could be canceled unsafe { CancelIoEx(server.SafePipeHandle, null); } await waitForConnectionTask; // throws IOException: IO operation was aborted unexpectedly. } } ``` Is it intentional behavior or it's a bug that we receive `OperationCanceledException` even if we couldn't cancel in a normal way (without interop) ? " 2648 area-System.ComponentModel RangeAttribute with string constructor fails on various locales "`RangeAttribute(Type, string, string)` can be used to validate various types implementing `IComparable`. However, it does the conversion from the string parameters using the current culture, which is wrong. Simple repro: ``` Thread.CurrentThread.CurrentCulture = new CultureInfo(""fr""); new RangeAttribute(typeof(decimal), ""0.1"", ""0.9"").IsValid(123m) ``` fails with a `FormatException`: _0.1 is not a valid value for Decimal._ While in this sample the strings could be adjusted at runtime to represent numbers using the current culture, the typical usage of an attribute is ``` [Range(typeof(decimal), ""0.1"", ""0.9"")] public decimal Value { get; set; } ``` where the values **must** be constants, and can't change depending on the culture. Culprit line: https://github.com/dotnet/corefx/blob/master/src/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/RangeAttribute.cs#L203 The fix can't be to simply change `CurrentCulture` to `InvariantCulture` here, since this will alter the runtime validation behavior: `InvariantCulture` should be used to convert the `min` and `max` parameters (maybe falling back to `CurrentCulture` for back-compat, if the constructor was used directly), but `CurrentCulture` should be kept to validate the user-entered value. If accepted, I can add some unit tests and a fix for this issue. " 2651 area-System.Net Automatic Content Decompression Modified CurlHandler to set the curl options for automatic response content decompression. 2658 area-Serialization Fix one of DCS constructors that cause NRE in wcf Verified that this fixes #2435 by aligning with the behavior on Desktop cc: @mconnew 2666 area-System.Reflection Bug fix: When decoding a modified type it was throwing a BadImageForm… …atException, the previous change to get the valuetype and class prefix flag broke that because didn't update DecodeModifiedType to read a compressed integer instead of reading a SignatureTypeCode. 2667 area-System.Security TestLoadSignedFile failure in CI See: http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug_prtest/2796/testReport/junit/System.Security.Cryptography.X509Certificates.Tests/LoadFromFileTests/TestLoadSignedFile/ ``` MESSAGE: System.Security.Cryptography.CryptographicException : Error occurred during a cryptographic operation. +++++++++++++++++++ STACK TRACE: at Internal.Cryptography.Pal.CertificatePal.GetSignerInPKCS7Store(SafeCertStoreHandle hCertStore, SafeCryptMsgHandle hCryptMsg) in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Security.Cryptography.X509Certificates\src\Internal\Cryptography\Pal.Windows\CertificatePal.Import.cs:line 142 at Internal.Cryptography.Pal.CertificatePal.FromBlobOrFile(Byte[] rawData, String fileName, String password, X509KeyStorageFlags keyStorageFlags) in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Security.Cryptography.X509Certificates\src\Internal\Cryptography\Pal.Windows\CertificatePal.Import.cs:line 84 at Internal.Cryptography.Pal.CertificatePal.FromFile(String fileName, String password, X509KeyStorageFlags keyStorageFlags) in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Security.Cryptography.X509Certificates\src\Internal\Cryptography\Pal.Windows\CertificatePal.Import.cs:line 29 at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(String fileName, String password, X509KeyStorageFlags keyStorageFlags) in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509Certificate.cs:line 72 at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(String fileName) in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509Certificate.cs:line 55 at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName) in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509Certificate2.cs:line 48 at System.Security.Cryptography.X509Certificates.Tests.LoadFromFileTests.TestLoadSignedFile() in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Security.Cryptography.X509Certificates\tests\LoadFromFileTests.cs:line 127 ``` 2676 area-System.Net Merge changes from TFS 2684 area-System.IO FSW tests don't verify path information The tests are only checking that events are occurring, but not that they're for the right/expected paths. 2688 area-System.Reflection System.Reflection.Metadata needs a MarshalDecoder for marshalling descriptor types. It needs a marshal decoder such as CustomAttributes decoder and SignatureDecoder to decode marshalling descriptor since it specifications on ECMA spec 355 are diferent. cc @nguerrera @AlexGhiondea 2699 area-System.IO Code cleanup for System.IO.Packaging "- [x] ContentType.cs - line 234 - use String.Equals instead of String.Compare - [x] ContentType.cs - 83 - if (contentType.Length == 0) - [x] PackagePart.cs - 849 - return !s.CanRead && !s.CanSeek && !s.CanWrite; - [ ] Package.cs - 976 - What's the purpose of the try block with an empty finally? - [x] PackageUriHelper.cs - 1297 - at least one other place where the same thing was declared. Should they be consolidated? - [x] PackageUriHelper.cs - 1025 - Rather than using comments, these could use named arguments. - [x] PackageUriHelper.cs - 991 - There are various places thus far in the implementation that use '/' hardcoded... should they instead be using ForwardSlashChar? - [ ] PackageUriHelper.cs - 926 - Why not just: return the_condition; - [x] PackUriHelper.cs - 695 - the chars array could be stackalloc'd instead of heap allocated. - [x] PackUriHelper.cs - 451 - Any reason not to combine these Path.Combine calls? - [x] InternalRelationshipCollection.cs - 592 - Debug.Fail? - [ ] InternalRelationshipCollection.cs - 325 - Formatting off - [ ] IgnoreFlushAndCloseStream.cs - 18 - This comment appears out-of-date: there is no IgnoreFlushAndClose property, and Flush/Dispose never delegate to the wrapped stream's corresponding members. - [ ] IgnoreFlushAndCloseStream.cs - 48 - get { return !_disposed && _stream.CanRead; } - [ ] FileFormatException.cs - 139 - readonly? - [x] ContentType.cs - 666 - This loop could be replaced by a call to Array.IndexOf. - [x] ContentType.cs - 620 - return IsAsciiLetter(character) || (character >= '0' && character <= '9'); - [x] ContentType.cs - 561 - It seems a bit odd to be explicit about the kind of comparison we want for the characters and to be doing a Compare rather than Equal when what we're checking for is just an empty string. - [x] ContentType.cs - 527 - if (string.IsNullOrEmpty(token)) - [x] ContentType.cs - 531 - The body of this loop could be simplified to just: if (!IsAsciiLetterOrDigit(token[i]) && !IsAllowedCharacter(token[i])) throw new ArgumentException(SR.InvalidToken); - [ ] ContentType.cs - 398 - There's a lot of string manipulation / allocation / etc. happening in these various helper functions. Doesn't need to be fixed now, as it's not clear that it's a problem. But it'd be interesting to do some perf testing / profiling and see what pops as hot spots that we'll potentially want to fix. - [x] ContentType.cs - 390 - ""ans"" => ""and"" - [ ] ContentType.cs - 225 - Do we know that MoveNext is always going to return true here such that Current will be valid? - [ ] ContentType.cs - 89 - It doesn't appear that we know at this point that contentType isn't empty. Couldn't this result in indexing out of bounds into contentType? - [x] ContentType.cs - 262 - ""paramterKey"" => ""parameterKey"" - [ ] PackUriHelper.cs - 791 - Could this just do a ordinal-ignorecase comparison rather than allocating new strings with ToUpperInvariant? - [x] ContentType.cs - 323 - Is this type used anywhere? It appears to be dead code. - [x] ContentType.cs - 294 - Is this type used anywhere? It appears to be dead code. - [x] PackUriHelper.cs - 737 - I don't know if allocations matter here, but you could trivially avoid this allocation by using IndexOf instead of Contains. - [x] ContentType.cs - 604 - Couldn't it use Array.IndexOf? " 2703 area-System.Threading Add a way to wait for a task without throwing `Task.Wait` throws an exception if the task is faulted or cancelled. Sometimes it is necessary to wait for completion but not be interrupted by an exception. Catching and swallowing the exception is a really bad workaround. Using exceptions for control flow is not a good thing. Also, exceptions are extremely slow. 1. The `Wait` method should have an overload that allows the caller to specify that he does not want an exception. 2. There should be a method `Task WhenCompleted(this Task task)` that returns a new task that becomes completed when the base task becomes completed. Cancellation and exceptions should not be propagated. That way we can write `await myTask.WhenCompleted()` to avoid exceptions. 3. In the same spirit as (2) there probably should be `WhenCompletedSuccessfully`, `WhenCancelled` and `WhenFaulted`. These tasks complete when the underlying task transitions to the respective state. They do not ever complete if the underlying task transitions to a different final state. They should _not_ become cancelled in that case because the idea of these methods is that you can avoid exceptions for control flow in a convenient manner. 2705 area-System.Net Fixing multi response header issue along with putting checks in http message parser. …message parser ``` modified: System/Net/Http/Unix/CurlCallbacks.cs ``` 2711 area-System.Reflection Merge master into dev/metadata @tmat @stephentoub @nguerrera 2715 area-System.Security System.Security.Cryptography.Hashing.Algorithms contract reference is forwarding Hi, It seems that in System.Security.Cryptography.Hashing.Algorithms v4.0.0-beta-23127 all types are being forwarded, even though they are implemented in corefx. Is there any reason for this change or is it a mistake? Thanks. 2717 area-System.Threading Four failures in new System.Threading.Timer tests in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_release/946/console ``` TimerFiringTests.Timer_CanDisposeSelfInCallback [FAIL] Assert.True() Failure Expected: True Actual: False Stack Trace: d:\j\workspace\dotnet_corefx_windows_release\src\System.Threading.Timer\tests\TimerFiringTests.cs(126,0): at TimerFiringTests.Timer_CanDisposeSelfInCallback() TimerFiringTests.NonRepeatingTimer_ThatHasAlreadyFired_CanChangeAndFireAgain [FAIL] Should have received a second timer event after changing it Expected: True Actual: False Stack Trace: d:\j\workspace\dotnet_corefx_windows_release\src\System.Threading.Timer\tests\TimerFiringTests.cs(150,0): at TimerFiringTests.NonRepeatingTimer_ThatHasAlreadyFired_CanChangeAndFireAgain() TimerFiringTests.Running_Timer_CanBeFinalizedAndStopsFiring [FAIL] Failed to get first timer fire Expected: True Actual: False Stack Trace: d:\j\workspace\dotnet_corefx_windows_release\src\System.Threading.Timer\tests\TimerFiringTests.cs(160,0): at TimerFiringTests.Running_Timer_CanBeFinalizedAndStopsFiring() TimerFiringTests.MultpleTimers_PeriodicTimerIsntBlockedByABlockedTimer [FAIL] Blocking callback prevented a second timer from firing Expected: True Actual: False Stack Trace: d:\j\workspace\dotnet_corefx_windows_release\src\System.Threading.Timer\tests\TimerFiringTests.cs(184,0): at TimerFiringTests.MultpleTimers_PeriodicTimerIsntBlockedByABlockedTimer() Unhandled Exception: Xunit.Sdk.TrueException: Should have received a second callback while blocked Expected: True Actual: False at Xunit.Assert.True(Nullable`1 condition, String userMessage) at TimerFiringTests.<>c__DisplayClass22.b__20(Object o) at System.Threading.TimerQueueTimer.CallCallbackInContext(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.TimerQueueTimer.CallCallback() at System.Threading.TimerQueueTimer.Fire() at System.Threading.TimerQueue.FireNextTimers() at System.Threading.TimerQueue.AppDomainTimerCallback() Finished: System.Threading.Timer.Tests ``` 2720 area-System.Net HttpClient xplat: Optimize number of socket callbacks In earlier version, a curl_multi_socket_action was performed everytime the callback was invoked irrespective of whether there was activity on the socket. This in turn causes more callbacks when libcurl tries to read the socket but finds no data. This can be made more efficient by waiting for activity on the socket and informing libcurl accordingly - Also fixed a bug in the timer callback for <=0 timeout values - Fixed a bug in CheckForCompletedTransfers where a mismatch could occur between the easy handle specified in the DONE msg - Fixing a SEGV that can happen due to stack overflow caused by callback getting invoked recursively because curl_multi_socket_action was being called in the callback code cc: @stephentoub @davidsh @CIPop @SidharthNabar @pgavlin 2722 area-System.IO Remove USE_OVERLAPPED from FileSystem We now have a overlapped implementation that works on UWP so we should remove the USE_OVERLAPPED ifdefs. 2727 area-System.Collections IsPrime function unnecessary, GetPrime function inefficient. In System.Collections.HashHelpers and System.Collections.NonGeneric\src\System\Collections\Hashtable and System.Private.DataContractSerialization\src\System\Runtime\Serialization\ObjectToIdCache.cs there are copies of the same function: private static bool IsPrime(int candidate) It is used by: private static int GetPrime(int min) Which is called by: Initialize, ExpandPrime, and TrimExcess They all use a table in GetPrime: E.g. int[] primes = {3, 7, 17, 37, 89, 197, 431, 919, 1931,...7199369}. Notice that each successive prime is larger than twice the preceding one. This appears to be because hashtables are doubled in size when they need to be expanded. But they are only allowed to expand up to 2G. The GetPrime function calls IsPrime to find a prime when the search goes above the limit of the primes table. The ExpandPrime function is the most interesting as it more than doubles the size each time: public static int ExpandPrime(int oldSize) { int newSize = 2 \* oldSize; .... return GetPrime(newSize); Therefore it appears that we don't need the IsPrime function at all. Instead we simply need to expand the primes table up to 2146435069 (largest prime below 2G). {..., 7199369, 21598111, 64794337, 194383039, 583149179, 1749447569, 953375459, 2146435069}; Recommendation: 1) Use a common GetPrime(int min) function instead of having three copies 2) Expand the primes table as described above. 3) Remove the IsPrime function, modify GetPrime to only use the table. 2729 area-System.Numerics Fix very sporadically failing Complex test "I'd previously ""fixed"" this same test by incorporating infinity support, but I needed to do the comparisons based on IsNegative/PositiveInfinity rather than by comparing the values directly. cc: @mellinoe " 2730 area-System.IO Reworked the tests for System.IO.Pipes I made a number of changes to our current Pipes tests and added several hundred new tests for edge cases that were previously ignored, particularly with Named Pipes defined with an InOut PipeDirection - Refactored the great Throws tests currently in place to allow testing pipes with all in/out direction combinations for both Named pipes as well as Anonymous pipes - Replaced all relevant hardcoded pipe names with unique values - Reorganized the tests to use more inheritance and share more code for easy extensibility - All test classes are now in the same namespace: System.IO.Pipes.Tests - Expanded tests for InOut NamedPipes and made all existing In/Out tests also test all valid InOut combinations. - Split the Named and Anonymous tests into two separate folders: NamedPipeTest and AnonymousPipeTest - Increased code coverage across all test classes 2732 area-System.Numerics what set's Vector.IsHardwareAccelerated to true in System.Numerics.Vectors? I am writing a test app, 64 bit using System.Numerics.Vectors 4.1.0. I am trying to understand how `Vector.IsHardwareAccelerated` gets set to true. I’ve tried running this on three Haswell based systems. I get `Vector.IsHardwareAccelerated` as false during debugging. But when I run it from command prompt, I get true in one system and false in other two system. 2733 area-System.IO Cleaned up tests for closed issues Design review feedback brought about the closed issues #2537, #2403, #2402, #2369, #1728. This Commit cleaned up the tests around those decisions 2737 area-System.IO Removed USE_OVERLAPPED from FileSystem All ifdefs around USE_OVERLAPPED have been removed such that the new behavior mimics the old behavior when USE_OVERLAPPED = true. Resolves #2722 2738 area-System.Reflection BlobReader.ReadBoolean: Interpret any non-zero byte as True @nguerrera @davkean 2743 area-System.Security PlatformNotSupportedException on Unix when exporting multiple private keys in a single PFX The beta7 PFX/PKCS12 export code will use OpenSSL's PKCS12_create function, which only supports one private key. OpenSSL doesn't have an inherent limitation against PKCS12 files containing multiple private keys, but the helper function can't handle it; and we're running out of time in beta7 to write it out longhand. 2745 area-System.Security Not all private keys are available when importing a PFX with multiple private keys on Unix The OpenSSL helper function `PKCS12_parse` only emits a single private key (and its associated certificate), the rest of the certificates appear, but as public-key only. Similar to #2743, the fix would be to not use the helper function, but to get into the nitty-gritty with PKCS12 primitives. 2746 area-System.Security CryptographicException on Unix when exporting an empty collection as a PFX This has the same underlying function as a cause as #2743, `PKCS12_create`. Since it never added anything to an authsafe it never created the authsafe stack, and then reports a data validation error because it didn't expect a `NULL` to make it through. When/if we switch to creating PFX files without the helper function's limitations this should go away (but it's a separate problem, and could accidentally not be fixed, so a separate issue). 2751 area-System.Diagnostics Trace.IndentLevel does not behave consistently when used from multiple threads "According to [the documentation](https://msdn.microsoft.com/en-us/library/system.diagnostics.trace.indentlevel), `Trace.IndentLevel` should be stored on a per-thread basis. And [it is](https://github.com/dotnet/corefx/blob/41e203011152581a6c65bb81ac44ec037140c1bb/src/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceInternal.cs#L16), but [a cached version is also kept in each `TraceListener`](https://github.com/dotnet/corefx/blob/41e203011152581a6c65bb81ac44ec037140c1bb/src/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceListener.cs#L18). And since listeners are shared among all threads and the listener-cached version of `IndentLevel` is updated only when `Trace.IndentLevel` changes on some thread, this means that the actual indent level that is printed is the indent level of the last thread that changed it, it doesn't matter what the indent level of the current thread is. Sample application to replicate the issue: ``` c# using System; using System.Diagnostics; using System.Threading; using System.Threading.Tasks; namespace TraceIndentLevel { static class Program { static void Main() { Trace.Listeners.Add(new ConsoleTraceListener()); Task.WaitAll(Task.Run((Action) T1), Task.Run((Action) T2)); } static readonly Barrier barrier = new Barrier(2); static void T1() { Trace.Indent(); Trace.Indent(); Trace.TraceInformation(""Thread 1, IndentLevel should be {0}."", Trace.IndentLevel); barrier.SignalAndWait(); barrier.SignalAndWait(); Trace.TraceInformation(""Thread 1, IndentLevel should be {0}."", Trace.IndentLevel); // this should be a noop, but isn't Trace.IndentLevel = Trace.IndentLevel; Trace.TraceInformation(""Thread 1, IndentLevel should be {0}."", Trace.IndentLevel); } static void T2() { barrier.SignalAndWait(); Trace.TraceInformation(""Thread 2, IndentLevel should be {0}."", Trace.IndentLevel); Trace.Indent(); Trace.TraceInformation(""Thread 2, IndentLevel should be {0}."", Trace.IndentLevel); barrier.SignalAndWait(); } } } ``` On my computer (using desktop .Net, but I believe core will behave the same), this prints: ``` TraceIndentLevel.exe Information: 0 : Thread 1, IndentLevel should be 2. TraceIndentLevel.exe Information: 0 : Thread 2, IndentLevel should be 0. TraceIndentLevel.exe Information: 0 : Thread 2, IndentLevel should be 1. TraceIndentLevel.exe Information: 0 : Thread 1, IndentLevel should be 2. TraceIndentLevel.exe Information: 0 : Thread 1, IndentLevel should be 2. ``` What I would expect is that the value returned by `Trace.IndentLevel` and the actual indent level matched: ``` TraceIndentLevel.exe Information: 0 : Thread 1, IndentLevel should be 2. TraceIndentLevel.exe Information: 0 : Thread 2, IndentLevel should be 0. TraceIndentLevel.exe Information: 0 : Thread 2, IndentLevel should be 1. TraceIndentLevel.exe Information: 0 : Thread 1, IndentLevel should be 2. TraceIndentLevel.exe Information: 0 : Thread 1, IndentLevel should be 2. ``` " 2755 area-System.Reflection Downgrade Reflection.Metadata to Immutable Collections 1.1.36 Can't use the latest version w/o updating VS. 2756 area-Microsoft.CSharp Need to find a way to run tests involving expression trees in interpreter mode "This involves: Linq.Expressions System.Dynamic.Runtime Microsoft.CSharp What complicates matters is that Linq.Expressions must be rebuilt with ""isInterpreting=true"" to switch from compiling to interpreting. " 2757 area-System.IO DirectoryInfo.GetFiles killed by privileged folders The seemingly useful DirectoryInfo.GetFiles method (with the SearchOption.AllDirectories parameter) is unreliable because any access control check failure causes it to bomb out with an exception rather than returning files that _are_ accessible to the user. For instance, call this on any drive root from a non-elevated process and you'll get: `Access to the path 'D:\$RECYCLE.BIN\S-1-5-18' is denied. Type: System.UnauthorizedAccessException Source: mscorlib at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileSystemEnumerableIterator``1.AddSearchableDirsToStack(SearchData localSearchData) at System.IO.FileSystemEnumerableIterator``1.MoveNext() at System.Collections.Generic.List``1..ctor(IEnumerable``1 collection) at System.IO.DirectoryInfo.InternalGetFiles(String searchPattern, SearchOption searchOption)` The API should be smart enough to skip enumerating folders to which it doesn't have permission, or it should offer some sort of callback or parameter to permit doing so. 2758 area-System.Net Enabling cookie container in HTTP xplat ``` modified: ../../Common/src/Interop/Unix/libcurl/Interop.libcurl_types.cs modified: System/Net/Http/Unix/CurlHandler.cs modified: System/Net/Http/Unix/HttpClientHandler.Unix.cs ``` Enabled cookie container & manual cookie support in HTTP. 2760 area-System.Net HttpClient response stream.Read/ReadAsync sporadically returns 0 for a non empty response We see it both in WCF streaming scenarios (receiving a stream from WCF service) and in simple repros like: ``` var c = (await client.PostAsync(url, new StreamContent(new MyStream()))).Content; var stream = await c.ReadAsStreamAsync(); byte[] buff = new byte[4096]; var bytesread = await stream.ReadAsync(buff, 0, 4096); // bytesread is sporadically 0 even though the response does contain data ``` About a half of WCF streaming scenarios fail because of this bug 2761 area-System.Net Unhandled System.Net.Http.WinHttpException in WCF streaming scenarios This blocks WCF streaming on Project K as it happens within first several seconds of single-threaded(!) stress run: ``` 0:020> !pe Exception object: 180d3de4 Exception type: System.Net.Http.WinHttpException Message: Unknown error (0x2ef2) InnerException: StackTrace (generated): SP IP Function 0EACED5C 0890E8FF System_Net_Http!System.Net.Http.WinHttpHandler.SetStatusCallback(SafeWinHttpHandle, WINHTTP_STATUS_CALLBACK)+0x57 0EACED70 0890D4C9 System_Net_Http!System.Net.Http.WinHttpHandler+d__1.MoveNext()+0x779 0EACEFE4 0781C695 mscorlib_ni!System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c__DisplayClass2.b__5(System.Object)+0x35 0EACEFEC 0781F4DB mscorlib_ni!System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)+0x43 0EACEFF4 077C4FAD mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)+0x9d 0EACF02C 0781F48B mscorlib_ni!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()+0x43 0EACF03C 0781FA25 mscorlib_ni!System.Threading.ThreadPoolWorkQueue.Dispatch()+0x1e9 0EACF08C 078DB3CA mscorlib_ni!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()+0xa ``` The exception results in the following second-chance exception in the process: ``` 0:020> kL # ChildEBP RetAddr 00 0eacee0c 0fb2c37f KERNELBASE!RaiseException+0x48 01 0eaceea8 0fbb6bb3 coreclr!RaiseTheExceptionInternalOnly+0x1d9 02 0eacef28 077c4fad coreclr!IL_Rethrow+0x6a 03 0eacf020 0781f48b mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)+0x9d 04 0eacf034 0781fa25 mscorlib_ni!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()+0x43 05 0eacf084 078db3ca mscorlib_ni!System.Threading.ThreadPoolWorkQueue.Dispatch()+0x1e9 06 0eacf094 0fda302f mscorlib_ni!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()+0xa 07 0eacf094 0fb77a92 coreclr!CallDescrWorkerInternal+0x34 08 0eacf0c8 0fb77d01 coreclr!CallDescrWorkerWithHandler+0x60 09 0eacf134 0fc65182 coreclr!MethodDescCallSite::CallTargetWorker+0x158 0a (Inline) -------- coreclr!MethodDescCallSite::Call_RetBool+0xb 0b 0eacf1b4 0fb27f3e coreclr!QueueUserWorkItemManagedCallback+0x23 0c 0eacf1c8 0fb27f91 coreclr!ManagedThreadBase_DispatchInner+0x5c 0d 0eacf25c 0fb2828e coreclr!ManagedThreadBase_DispatchMiddle+0x4e 0e 0eacf2c0 0fb28340 coreclr!ManagedThreadBase_DispatchOuter+0x66 0f 0eacf2e4 0fc18912 coreclr!ManagedThreadBase_FullTransitionWithAD+0x2f 10 (Inline) -------- coreclr!ManagedThreadBase::ThreadPool+0x10 11 0eacf388 0fbfbaf7 coreclr!ManagedPerAppDomainTPCount::DispatchWorkItem+0x99 12 0eacf39c 0fbfc312 coreclr!ThreadpoolMgr::ExecuteWorkRequest+0x31 13 0eacf404 0fb23702 coreclr!ThreadpoolMgr::WorkerThreadStart+0x391 14 0eacf7a8 76f97c04 coreclr!Thread::intermediateThreadProc+0x4d 15 0eacf7bc 773ead1f KERNEL32!BaseThreadInitThunk+0x24 16 0eacf804 773eacea ntdll!__RtlUserThreadStart+0x2f 17 0eacf814 00000000 ntdll!_RtlUserThreadStart+0x1b ``` 2762 area-System.Net Fast native memory leak in WinHttpHandler on corefx The leak is super-fast - 1GB+/minute and completely blocks WCF streaming scenarios. Here are the top offending call stacks: ``` ntdll!RtlAllocateHeap+14D (d:\blue\minkernel\ntos\rtl\heap.c, 1872) msvcrt!malloc+90 (d:\9147\minkernel\crts\crtw32\heap\malloc.c, 285) webio!zcalloc+20 (d:\9147\inetcore\lib\zlib12\zutil.c, 314) webio!updatewindow+39 (d:\9147\inetcore\lib\zlib12\inflate.c, 337) webio!inflate+12D7 (d:\9147\inetcore\lib\zlib12\inflate.c, 1137) webio!Decompress+56 (d:\9147\inetcore\lib\zlib12\iel1_zlib12_wrapper\zlib_wrapper.c, 218) webio!WapDecompProcessCompressedData+33 (d:\9147\net\webio\util\decompression.c, 510) webio!WaDecompDataNeeded+1C (d:\9147\net\webio\util\decompression.c, 580) webio!WapHandleParsedHttpResponse+1D74A (d:\9147\net\webio\http\recvresp.c, 1656) webio!WapHttpConnectionReceiveCompletion+258 (d:\9147\net\webio\http\httpconn.c, 2974) webio!WapTcpReceiveCompletionRoutine+89 (d:\9147\net\webio\conn\tcpconn.c, 3538) webio!WapTcpThreadPoolCompletionRoutine+3F (d:\9147\net\webio\conn\tcpconn.c, 822) webio!WapTpIoCompletionRoutine+B2 (d:\9147\net\webio\util\thrdpool.c, 370) KERNELBASE!BasepTpIoCallback+3A (d:\9147\minkernel\threadpool\kernel32\threadpool.c, 213) ntdll!TppIopExecuteCallback+D6 (d:\blue\minkernel\threadpool\ntdll\io.c, 371) ntdll!TppWorkerThread+52A (d:\blue\minkernel\threadpool\ntdll\worker.c, 1023) KERNEL32!BaseThreadInitThunk+24 (d:\9147\base\win32\client\thread.c, 78) ntdll!__RtlUserThreadStart+2F (d:\blue\minkernel\ntdll\rtlstrt.c, 1029) ntdll!_RtlUserThreadStart+1B (d:\blue\minkernel\ntdll\rtlstrt.c, 944) --- ntdll!RtlAllocateHeap+14D (d:\blue\minkernel\ntos\rtl\heap.c, 1872) webio!WaDecompCreateContext+AB (d:\9147\net\webio\util\decompression.c, 219) webio!WapHandleParsedHttpResponse+1D61A (d:\9147\net\webio\http\recvresp.c, 1496) webio!WapHttpConnectionReceiveCompletion+258 (d:\9147\net\webio\http\httpconn.c, 2974) webio!WapTcpReceiveCompletionRoutine+89 (d:\9147\net\webio\conn\tcpconn.c, 3538) webio!WapTcpThreadPoolCompletionRoutine+3F (d:\9147\net\webio\conn\tcpconn.c, 822) webio!WapTpIoCompletionRoutine+B2 (d:\9147\net\webio\util\thrdpool.c, 370) KERNELBASE!BasepTpIoCallback+3A (d:\9147\minkernel\threadpool\kernel32\threadpool.c, 213) ntdll!TppIopExecuteCallback+D6 (d:\blue\minkernel\threadpool\ntdll\io.c, 371) ntdll!TppWorkerThread+52A (d:\blue\minkernel\threadpool\ntdll\worker.c, 1023) KERNEL32!BaseThreadInitThunk+24 (d:\9147\base\win32\client\thread.c, 78) ntdll!__RtlUserThreadStart+2F (d:\blue\minkernel\ntdll\rtlstrt.c, 1029) ntdll!_RtlUserThreadStart+1B (d:\blue\minkernel\ntdll\rtlstrt.c, 944) ----- ntdll!RtlAllocateHeap+14D (d:\blue\minkernel\ntos\rtl\heap.c, 1872) msvcrt!malloc+90 (d:\9147\minkernel\crts\crtw32\heap\malloc.c, 285) webio!zcalloc+20 (d:\9147\inetcore\lib\zlib12\zutil.c, 314) webio!inflateInit2_+4F (d:\9147\inetcore\lib\zlib12\inflate.c, 164) webio!CreateDecompression+61 (d:\9147\inetcore\lib\zlib12\iel1_zlib12_wrapper\zlib_wrapper.c, 175) webio!WapHandleParsedHttpResponse+1D61A (d:\9147\net\webio\http\recvresp.c, 1496) webio!WapHttpConnectionReceiveCompletion+258 (d:\9147\net\webio\http\httpconn.c, 2974) webio!WapTcpReceiveCompletionRoutine+89 (d:\9147\net\webio\conn\tcpconn.c, 3538) webio!WapTcpThreadPoolCompletionRoutine+3F (d:\9147\net\webio\conn\tcpconn.c, 822) webio!WapTpIoCompletionRoutine+B2 (d:\9147\net\webio\util\thrdpool.c, 370) KERNELBASE!BasepTpIoCallback+3A (d:\9147\minkernel\threadpool\kernel32\threadpool.c, 213) ---- ntdll!RtlAllocateHeap+14D (d:\blue\minkernel\ntos\rtl\heap.c, 1872) winhttp!WinHttpOpenRequestInternal+7C1 (d:\9147\net\winhttp\http\open.cxx, 717) winhttp!WinHttpOpenRequest+1F9 (d:\9147\net\winhttp\http\open.cxx, 881) ---- ntdll!RtlAllocateHeap+14D (d:\blue\minkernel\ntos\rtl\heap.c, 1872) webio!WapCreateHttpRequest+C1 (d:\9147\net\webio\http\httpreq.c, 1139) webio!WebCreateHttpRequest+183 (d:\9147\net\webio\http\httpreq.c, 3192) winhttp!HTTP_USER_REQUEST::_SysSendRequest+D32 (d:\9147\net\winhttp\httpcore\usrreq.cpp, 2347) winhttp!HTTP_USER_REQUEST::_SendRequestWithDrainComplete+1A0 (d:\9147\net\winhttp\httpcore\usrreq.cpp, 1199) winhttp!HTTP_USER_REQUEST::SendRequest+3F3 (d:\9147\net\winhttp\httpcore\usrreq.cpp, 1529) winhttp!WinHttpSendRequest+4B9 (d:\9147\net\winhttp\api\sendapi.cxx, 265) ``` 2763 area-System.Net The result of the arithmetic + operation in Write method could end up… … being less than zero if the sum of the operands combined is greater than int.MaxValue. As a consequence of this integer overflow the intended check might be bypassed leading to unexpected consequences. This change adds and aditional cast to long to avoid this overflow. 2764 area-System.IO NamedPipeServerStream constructor allows MaxNumberOfServerInstances > 1 The constructor for NamedPipeServerStream allows MaxNumberOfServerInstances > 1 and we even do the same validity checks (between 1-255) as we do on Windows. However, Unix Named pipes don't support more than one connection and an exception is thrown when more are attempted. 2765 area-System.Collections ExpandPrime will throw when near MaxPrimeArrayLength Call ExpandPrime in HashHelpers.cs and HashTable.cs with MaxPrimeArrayLength + 1. The function looks like this: public static int ExpandPrime(int oldSize) { int newSize = 2 \* oldSize; ``` if ((uint)newSize > MaxPrimeArrayLength && MaxPrimeArrayLength > oldSize) { return MaxPrimeArrayLength; } return GetPrime(newSize); ``` } MaxPrimeArrayLength + 1 become -2097156 which, when cast to uint becomes 4292870140 which passes the 'if' condition and GetPrime is then called with a negative value. This caused GetPrime to: throw new ArgumentException(SR.Arg_HTCapacityOverflow); proposed solution: public static int ExpandPrime(int oldSize) { int newSize = 2 \* oldSize; ``` // newSize will be negative if it overflows so we return the largest possible instead if (newSize < 0 || oldSize > MaxPrimeArrayLength) { return MaxPrimeArrayLength; } return GetPrime(newSize); ``` } 2768 area-System.Reflection CoreCLR: TryGetRawMetadata "# Scenario Roslyn Scripting API provides applications with the capability to evaluate C# and VB code snippets. For example, ``` C# using Microsoft.CodeAnalysis.Scripting.CSharp; public class Globals { public int x; public int y; } class Program { public static void Main() { var globals = new Globals() { x = 1, y = 2 }; var options = ScriptOptions.Default.WithReferences(typeof(MyMath).Assembly); var script = CSharpScript.Create(""MyMath.CalculateStuff(x, y)"", options); Console.WriteLine(script.RunAsync(globals).Result); } } ``` In the example above `MyMath` is a type defined in an assembly referenced by and deployed with the program. The script is compiled with the following metadata references: mscorlib, the assembly containing the `Globals` type and an assembly containing `MyMath` class. All these assemblies are implementation (runtime) assemblies, not contracts. Since we are compiling scripts at runtime contracts are not relevant. The application might also run on a machine that doesn’t have any SDK. It is natural for scripting to be able to execute virtually any (public) runtime method available in any loaded assembly. Just like Reflection invocation. On Desktop CLR we use Assembly.Location to find the metadata image for given assembly. On Core CLR this property is not available and there is no other way to get the metadata of a given runtime assembly. # Proposed API We propose that the metadata of a runtime assembly are exposed thru new APIs in a form that is efficiently readable using MetadataReader of System.Reflection.Metadata library. Since metadata might not be available for all assemblies (such as AssemblyBuilder, .NET Native images, etc.) the API is allowed to return false for such assemblies. Roslyn scripting API would then report an error that the script can’t reference specified assembly. ``` C# namespace System.Reflection.Metadata { public static class AssemblyExtensions { public unsafe static bool TryGetRawMetadata(this Assembly assembly, out byte* blob, out int length); } } ``` **Lifetime considerations** The pointer would stay valid as long as the `AssemblyLoadContext` with which is the assembly associated is alive. It is the responsibility of the caller to keep the Assembly object alive while accessing the metadata blob. # Considered alternatives It was suggested that Roslyn uses Reflection API to read the metadata. There are multiple issues with such approach. 1) Expected bad performance (both working set and time) Reflection is built on top of IMetadataImport. It was measured that using IMetadataImport to reader metadata from managed code is an order of magnitude slower than using S.R.M. MetadataReader, which was not an acceptable perf hit for the compilers. Reflection API implementation adds additional memory and time overhead. Although the number of referenced assemblies is relatively low in most scripting scenarios reducing the compile time of scripts to minimum is crucial for good user experience. 2) Using Reflection APIs to read namespaces and types To get a list of namespaces in given assembly one needs to load all types in the assembly. Loading a type may trigger additional assembly loads as well (those of the base types, interfaces). If a type can’t be loaded (perhaps a dependency is missing) we get a loader exception. We can extract the loaded types from the exception, but what if the app makes the dependency available just before it is about to actually start using the type? Our model is immutable, we can’t add a type/namespace into an existing assembly symbol. 3) Missing APIs Brief analysis identified missing APIs that the compiler depends on and that are not present in DNX contracts: for example, type forwarders, GetOptionalCustomModifiers, GetRequiredCustomModifiers, class layout. Besides missing APIs Reflection performs post-processing on the data it receives from IMetadataImport that might render the values useless to the compiler. 4) Roslyn-Reflection interop We have prototyped an abstraction of Reflection symbol model to incorporate interop with Reflection runtime types. The abstraction introduces quite a lot of complexity and indirections in already complex code, which significantly increases maintenance cost of that particular area of the compiler. Testing cost would also need to be considered. We would need to effectively run most of our compiler tests twice. # Updates 1) Decided to move this to `System.Reflection.Metadata` namespace. " 2769 area-System.Globalization System.Globalization: Collation Implement the [CompareInfo PAL](https://github.com/dotnet/coreclr/blob/master/src/mscorlib/corefx/System/Globalization/CompareInfo.Unix.cs) on top of ICU. This should give us real collation support instead of our ASCII only collation. 2770 area-System.Globalization System.Globalization: Locale Data Implement the PAL's from [CultureData](https://github.com/dotnet/coreclr/blob/master/src/mscorlib/corefx/System/Globalization/CultureData.Unix.cs) and [CultureInfo](https://github.com/dotnet/coreclr/blob/master/src/mscorlib/corefx/System/Globalization/CultureInfo.Unix.cs). 2772 area-System.Globalization System.Globalization: Casing Implement the [TextInfo](https://github.com/dotnet/coreclr/blob/master/src/mscorlib/corefx/System/Globalization/TextInfo.Unix.cs) PAL. 2773 area-System.Globalization System.Globalization: Calendars Fill out the PAL implementation of [CalendarData.cs](https://github.com/dotnet/coreclr/blob/master/src/mscorlib/corefx/System/Globalization/CalendarData.Unix.cs), [HijriCalendar.cs](https://github.com/dotnet/coreclr/blob/master/src/mscorlib/corefx/System/Globalization/HijriCalendar.Unix.cs) and [JapaneseCalendar.cs](https://github.com/dotnet/coreclr/blob/master/src/mscorlib/corefx/System/Globalization/JapaneseCalendar.Unix.cs) 2774 area-System.Globalization System.Globalization: Encodings We have stubbed out [EncodingTable.cs](https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/Globalization/EncodingTable.Unix.cs) and [EncodingDataItem.cs](https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/Globalization/EncodingDataItem.Unix.cs) for cross platform, but it is not clear the implementation is correct or if we need to do more. I think the big issue here will be understanding if System.Text.Encoding.Codepages and the EncodingProvider model here reduces the scope of work that we need to. 2777 area-System.Globalization System.Globalization.Extensions: Normalization We need to implement [StringNormalizationExtensions.cs](https://github.com/dotnet/corefx/blob/master/src/Common/src/System/StringNormalizationExtensions.Unix.cs) for Linux. The major difference between ICU and Win32 is that Win32 throws an exception when the input is not a valid UTF-16 encoded string (e.g. mismatched surrogates) whereas ICU does not. 2778 area-System.Security Add ECDsa to System.Security.Cryptography suite - `ECDsa` in System.Security.Cryptography.Algorithms - `ECDsaCng : ECDsa` in System.Security.Cryptography.Cng - `ECDsaOpenSsl : ECDsa` in System.Security.Cryptography.OpenSsl - Some tests (Common\test\Cryptography\AlgorithmImplementations\ECDsa) - Other artifacts required to pull this off. - Like the contract assembly changes 2779 area-System.Globalization System.Globalization.Extensions: IDNA We need to support [IdnMapping.cs](https://github.com/dotnet/corefx/blob/master/src/Common/src/System/Globalization/IdnMapping.Unix.cs) for IDNA2008 on Unix. This is straightforward on-top of ICU, but many of our existing ICU tests assume either ICU2003 or ICU2008 as implemented by Win32. There are some differences between 2008 and 2003 in ICU for compatibility, especially around how windows works when UseStd3Rules is false. In speaking with NLS, they think it may make sense for us to just follow the 2008 standard. 2782 area-System.Diagnostics Add a way to create a suspended Process It seems that there is no way to create a suspended `Process` and resume it later. Ability to create a suspended process is useful when you want to run the process and its children in a job object. If the process isn't created as suspended it may create child processes before it is assigned to the job object which means that these child processes won't be assigned to the job object. 2784 area-System.Net Enabled max redirection in HTTP xplat ``` modified: ../../Common/src/Interop/Unix/libcurl/Interop.libcurl_types.cs modified: System/Net/Http/Unix/CurlHandler.cs modified: System/Net/Http/Unix/HttpClientHandler.Unix.cs ``` Enabled max redirection support in HTTP xplat 2785 area-System.Net Server Credential Support for CurlHandler This check-in integrates curlHandler with the credential support of libcurl. 2787 area-System.Net Use common class to set property default in winHttp & xplatHttp > stephentoub :: There are a bunch of these default values that are being copied from the WinHttp handler implementation. It's great that we're using the same defaults, but it's error prone that we're doing so via copy-and-paste. I see a whole bunch of constants/defaults in WinHttp at https://github.com/dotnet/corefx/blob/master/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs#L93-L146 .could we somehow factor out these constants/default values into a shared source file that's included in both the Windows and Unix implementation, such that this then becomes: > > ``` C# > private int _maxAutomaticRedirections = HttpHandlerDefaults.MaxAutomaticRedirections; > ``` > > instead of: > > ``` C# > private int _maxAutomaticRedirections = 50; > ``` > > davidsh :: Yes, one could create a shared source file in src\Common\src\System\Net\Http... that defined an internal static class (HttpHandlerDefaults) with those constants defined as public fields. Then that file would be used in the multiple .CSPROJ files to bring in the values. 2791 area-System.Net Unsupported address family assert in System.Net.SocketAddressPal.SetPort on Linux in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst_prtest/1767/console ``` 11:17:17 Discovering: System.Net.Primitives.Linux.Unit.Tests 11:17:17 Discovering: System.Net.Primitives.Functional.Tests 11:17:17 Discovering: System.Net.Primitives.Linux.Pal.Tests 11:17:18 Discovered: System.Net.Primitives.Functional.Tests 11:17:18 Discovered: System.Net.Primitives.Linux.Unit.Tests 11:17:18 Discovered: System.Net.Primitives.Linux.Pal.Tests 11:17:18 Starting: System.Net.Primitives.Functional.Tests 11:17:18 Starting: System.Net.Primitives.Linux.Unit.Tests 11:17:18 Starting: System.Net.Primitives.Linux.Pal.Tests 11:17:18 ---- DEBUG ASSERTION FAILED ---- 11:17:18 ---- Assert Short Message ---- 11:17:18 Unsupported address family 11:17:18 ---- Assert Long Message ---- 11:17:18 11:17:18 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 11:17:18 at System.Environment.get_StackTrace() 11:17:18 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 11:17:18 at System.Diagnostics.Debug.Fail(String message) 11:17:18 at System.Net.SocketAddressPal.SetPort(Byte[] buffer, UInt16 port) 11:17:18 at System.Net.Primitives.PalTests.SocketAddressPalTests.<>c__DisplayClass6.b__4() 11:17:18 at Xunit.Assert.RecordException(Action testCode) 11:17:18 at Xunit.Assert.ThrowsAny[T](Action testCode) 11:17:18 at System.Net.Primitives.PalTests.SocketAddressPalTests.Port_Get_Set_Throws() 11:17:18 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 11:17:18 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 11:17:18 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 11:17:18 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass45_1.<b__1>d.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass45_1.b__1() 11:17:18 at Xunit.Sdk.ExecutionTimer.d__4.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) 11:17:18 at Xunit.Sdk.ExceptionAggregator.d__9.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) 11:17:18 at Xunit.Sdk.TestInvoker`1.d__45.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance) 11:17:18 at Xunit.Sdk.TestInvoker`1.<b__44_0>d.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestInvoker`1.b__44_0() 11:17:18 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 11:17:18 at Xunit.Sdk.XunitTestRunner.d__4.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator) 11:17:18 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 11:17:18 at Xunit.Sdk.TestRunner`1.d__43.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestRunner`1.RunAsync() 11:17:18 at Xunit.Sdk.TestCaseRunner`1.d__19.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestCaseRunner`1.RunAsync() 11:17:18 at Xunit.Sdk.TestMethodRunner`1.d__32.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() 11:17:18 at Xunit.Sdk.TestMethodRunner`1.d__31.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestMethodRunner`1.RunAsync() 11:17:18 at Xunit.Sdk.TestClassRunner`1.d__38.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() 11:17:18 at Xunit.Sdk.TestClassRunner`1.d__37.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestClassRunner`1.RunAsync() 11:17:18 at Xunit.Sdk.TestCollectionRunner`1.d__28.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() 11:17:18 at Xunit.Sdk.TestCollectionRunner`1.d__27.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestCollectionRunner`1.RunAsync() 11:17:18 at System.Threading.Tasks.Task`1.InnerInvoke() 11:17:18 at System.Threading.Tasks.Task.Execute() 11:17:18 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 11:17:18 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 11:17:18 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 11:17:18 at Xunit.Sdk.MaxConcurrencySyncContext.<>c__DisplayClass9_0.b__0(Object _) 11:17:18 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 11:17:18 at Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc() 11:17:18 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 11:17:18 ---- DEBUG ASSERTION FAILED ---- 11:17:18 ---- Assert Short Message ---- 11:17:18 Unsupported address family 11:17:18 ---- Assert Long Message ---- 11:17:18 11:17:18 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 11:17:18 at System.Environment.get_StackTrace() 11:17:18 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 11:17:18 at System.Diagnostics.Debug.Fail(String message) 11:17:18 at System.Net.SocketAddressPal.GetPort(Byte[] buffer) 11:17:18 at System.Net.Primitives.PalTests.SocketAddressPalTests.<>c__DisplayClass6.b__5() 11:17:18 at Xunit.Assert.RecordException(Func`1 testCode) 11:17:18 at Xunit.Assert.ThrowsAny[T](Func`1 testCode) 11:17:18 at System.Net.Primitives.PalTests.SocketAddressPalTests.Port_Get_Set_Throws() 11:17:18 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 11:17:18 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 11:17:18 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 11:17:18 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass45_1.<b__1>d.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass45_1.b__1() 11:17:18 at Xunit.Sdk.ExecutionTimer.d__4.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) 11:17:18 at Xunit.Sdk.ExceptionAggregator.d__9.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) 11:17:18 at Xunit.Sdk.TestInvoker`1.d__45.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance) 11:17:18 at Xunit.Sdk.TestInvoker`1.<b__44_0>d.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestInvoker`1.b__44_0() 11:17:18 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 11:17:18 at Xunit.Sdk.XunitTestRunner.d__4.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator) 11:17:18 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 11:17:18 at Xunit.Sdk.TestRunner`1.d__43.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestRunner`1.RunAsync() 11:17:18 at Xunit.Sdk.TestCaseRunner`1.d__19.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestCaseRunner`1.RunAsync() 11:17:18 at Xunit.Sdk.TestMethodRunner`1.d__32.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() 11:17:18 at Xunit.Sdk.TestMethodRunner`1.d__31.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestMethodRunner`1.RunAsync() 11:17:18 at Xunit.Sdk.TestClassRunner`1.d__38.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() 11:17:18 at Xunit.Sdk.TestClassRunner`1.d__37.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestClassRunner`1.RunAsync() 11:17:18 at Xunit.Sdk.TestCollectionRunner`1.d__28.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() 11:17:18 at Xunit.Sdk.TestCollectionRunner`1.d__27.MoveNext() 11:17:18 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 11:17:18 at Xunit.Sdk.TestCollectionRunner`1.RunAsync() 11:17:18 at System.Threading.Tasks.Task`1.InnerInvoke() 11:17:18 at System.Threading.Tasks.Task.Execute() 11:17:18 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 11:17:18 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 11:17:18 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 11:17:18 at Xunit.Sdk.MaxConcurrencySyncContext.<>c__DisplayClass9_0.b__0(Object _) 11:17:18 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 11:17:18 at Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc() 11:17:18 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) ``` 2793 area-System.Net Massive and fast handle leak in WCF stress scenarios 0:102> !handle 0 0 Type Count Event 26762 Key 20745 Here are the characteristic call stacks: ``` Handle = 0x000000000002ea84 - OPEN Thread ID = 0x0000000000002d74, Process ID = 0x0000000000004528 0x00007ff8c74c225a: ntdll!ZwOpenKeyEx+0x000000000000000a 0x00007ff8c47c3799: KERNELBASE!LocalBaseRegOpenKey+0x00000000000001fa 0x00007ff8c47cf532: KERNELBASE!RegOpenKeyExInternalA+0x0000000000000132 0x00007ff8c47cf5e9: KERNELBASE!RegOpenKeyExA+0x0000000000000019 0x00007ff8c0b82b1c: winhttp!OpenIeKey+0x000000000000005c 0x00007ff8c0b82c08: winhttp!OpenProxySettingsKeysForRead+0x0000000000000080 0x00007ff8c0b998bb: winhttp!INTERNET_SESSION_HANDLE_OBJECT::LoadAutomaticProxyResolvers+0x000000000000019b 0x00007ff8c0b730e5: winhttp!INTERNET_SESSION_HANDLE_OBJECT::SetProxySettings+0x0000000000044ed5 0x00007ff8c0b2d95a: winhttp!WinHttpSetOptionInternal+0x0000000000000397 0x00007ff8c0b2e9e6: winhttp!WinHttpOpen+0x000000000000027a 0x00007ff841eeccbd: System_Net_Http!DomainBoundILStubClass.IL_STUB_PInvoke(IntPtr, UInt32, System.String, System.String, Int32)+0x000000000000010d 0x00007ff841eec8b3: System_Net_Http!System.Net.Http.WinHttpHandler.EnsureSessionHandleExists(RequestState)+0x00000000000000e3 0x00007ff841eebba1: System_Net_Http!System.Net.Http.WinHttpHandler+d__1.MoveNext()+0x00000000000001f1 -------------------------------------- Handle = 0x000000000002dd10 - OPEN Thread ID = 0x00000000000027b4, Process ID = 0x0000000000004528 0x00007ff8c74c165a: ntdll!ZwCreateEvent+0x000000000000000a 0x00007ff8c47c2ce8: KERNELBASE!CreateEventW+0x0000000000000084 0x00007ff8c0b2ed38: winhttp!INTERNET_SESSION_HANDLE_OBJECT::INTERNET_SESSION_HANDLE_OBJECT+0x00000000000002be 0x00007ff8c0b2e963: winhttp!WinHttpOpen+0x00000000000001f3 0x00007ff8c0bb9afb: winhttp!CreateWinHttpSession+0x0000000000000053 0x00007ff8c0bb2fd9: winhttp!WinHttpClientSession::AcquireSession+0x0000000000000049 0x00007ff8c0bb3e34: winhttp!WinHttpClientResolver::GetProxyForUrlImpl+0x00000000000001a8 0x00007ff8c0bb3a48: winhttp!WinHttpClientResolver::GetProxyForUrlEx+0x0000000000000054 0x00007ff8c0bb50d9: winhttp!WinHttpClientCompletion::StartProxyResolve+0x0000000000000049 0x00007ff8c0b6102d: winhttp!WxProxyManager::OnProcessGetProxyForUrl+0x000000000002668d 0x00007ff8c0bb665b: winhttp!WxProxyManager::GetProxyForUrlImpl+0x00000000000000ef 0x00007ff8c0bb6518: winhttp!WxProxyManager::GetProxyForUrlEx+0x0000000000000054 0x00007ff8c0bb7683: winhttp!WxGetProxyContext::StartProxyResolve+0x0000000000000043 0x00007ff8c0b711ed: winhttp!HTTP_USER_REQUEST::_CallGetProxyForUrl+0x000000000003478d -------------------------------------- -------------------------------------- Handle = 0x000000000000cfa0 - OPEN Thread ID = 0x0000000000002d74, Process ID = 0x0000000000004528 0x00007ff8c74c165a: ntdll!ZwCreateEvent+0x000000000000000a 0x00007ff8c47c2ce8: KERNELBASE!CreateEventW+0x0000000000000084 0x00007ff8c0b2ed38: winhttp!INTERNET_SESSION_HANDLE_OBJECT::INTERNET_SESSION_HANDLE_OBJECT+0x00000000000002be 0x00007ff8c0b2e963: winhttp!WinHttpOpen+0x00000000000001f3 0x00007ff8c0bb9afb: winhttp!CreateWinHttpSession+0x0000000000000053 0x00007ff8c0bb2fd9: winhttp!WinHttpClientSession::AcquireSession+0x0000000000000049 0x00007ff8c0bb3e34: winhttp!WinHttpClientResolver::GetProxyForUrlImpl+0x00000000000001a8 0x00007ff8c0bb3a48: winhttp!WinHttpClientResolver::GetProxyForUrlEx+0x0000000000000054 0x00007ff8c0bb50d9: winhttp!WinHttpClientCompletion::StartProxyResolve+0x0000000000000049 0x00007ff8c0b6102d: winhttp!WxProxyManager::OnProcessGetProxyForUrl+0x000000000002668d 0x00007ff8c0bb665b: winhttp!WxProxyManager::GetProxyForUrlImpl+0x00000000000000ef 0x00007ff8c0bb6518: winhttp!WxProxyManager::GetProxyForUrlEx+0x0000000000000054 0x00007ff8c0bb7683: winhttp!WxGetProxyContext::StartProxyResolve+0x0000000000000043 0x00007ff8c0b711ed: winhttp!HTTP_USER_REQUEST::_CallGetProxyForUrl+0x000000000003478d -------------------------------------- ``` 2794 area-System.IO Fixed test that was leaving temp directories in root folder One of the Extended Path FileSystem tests was leaving temporary test directories in the root folder of the running directory. This small change modified the tests to instead treat the user's temp directory as the root. 2799 area-System.Net SendAsync_SlowGetRequestWithTimedCancellation test failed in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug/999/console 20:01:52 Discovering: System.Net.Http.Unit.Tests 20:01:53 System.Net.Http.WinHttpHandlerUnitTests.WinHttpHandlerTests.SendAsync_SlowGetRequestWithTimedCancellation_ExpectTaskCanceledException [FAIL] 20:01:53 Assert.Throws() Failure 20:01:53 Expected: typeof(System.Threading.Tasks.TaskCanceledException) 20:01:53 Actual: typeof(System.NullReferenceException): Object reference not set to an instance of an object. 20:01:53 Stack Trace: 20:01:53 d:\j\workspace\dotnet_corefx_windows_debug\src\System.Net.Http.WinHttpHandler\tests\UnitTests\FakeInterop.cs(238,0): at Interop.WinHttp.WinHttpQueryHeaders(SafeWinHttpHandle requestHandle, UInt32 infoLevel, String name, StringBuilder buffer, UInt32& bufferLength, IntPtr index) 20:01:53 d:\j\workspace\dotnet_corefx_windows_debug\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs(1970,0): at System.Net.Http.WinHttpHandler.GetResponseHeaderStringInfo(SafeWinHttpHandle requestHandle, UInt32 infoLevel) 20:01:53 d:\j\workspace\dotnet_corefx_windows_debug\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs(2014,0): at System.Net.Http.WinHttpHandler.ParseResponseHeaders(SafeWinHttpHandle requestHandle, HttpResponseMessage response, Boolean stripEncodingHeaders) 20:01:53 d:\j\workspace\dotnet_corefx_windows_debug\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs(1911,0): at System.Net.Http.WinHttpHandler.CreateResponseMessage(SafeWinHttpHandle connectHandle, SafeWinHttpHandle requestHandle, HttpRequestMessage request) 20:01:53 d:\j\workspace\dotnet_corefx_windows_debug\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs(1239,0): at System.Net.Http.WinHttpHandler.d__5.MoveNext() 20:01:53 --- End of stack trace from previous location where exception was thrown --- 20:01:53 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 20:01:53 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 20:01:53 at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() 20:01:53 d:\j\workspace\dotnet_corefx_windows_debug\src\System.Net.Http.WinHttpHandler\tests\UnitTests\WinHttpHandlerTest.cs(833,0): at System.Net.Http.WinHttpHandlerUnitTests.WinHttpHandlerTests.<>c__DisplayClassd7.<b__d6>d__d9.MoveNext() 20:01:53 --- End of stack trace from previous location where exception was thrown --- 20:01:53 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 20:01:53 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 20:01:53 Finished: System.Net.Http.WinHttpHandler.Unit.Tests 20:01:53 20:01:53 === TEST EXECUTION SUMMARY === 20:01:53 System.Net.Http.WinHttpHandler.Unit.Tests Total: 115, Errors: 0, Failed: 1, Skipped: 0, Time: 2.519s 2800 area-System.Reflection Assembly.ReflectionOnlyLoad replacement - TypeInfo and family implementation over System.Reflection.Metadata Sometimes you want to use the same reflection model without loading actual types (attributes of course are interesting), but this would be a better version of reflection only load. Roslyn does something similar and can go from PEReader -> ISymbol. /cc @pranavkm @nguerrera @tmat 2801 area-Infrastructure Nice to have: Bin and Packages folders should be placed outside of the git repo The huge `Bin` and `Packages` folders are placed in the root of the git repository at the moment. This makes tools like VSCode impossible to use due to the large quantity of files they need to index. A workaround to use VSCode is to load only the \src folder but that is breaking the Git extension which requires the root of the repo to be loaded. Another reason is using a different partition for binaries that can be quickly formatted when the binaries and packages are not wanted anymore or placing it on a faster disk. 2804 area-System.Globalization System.Globalization: Abbreviated genitive month names won't work on custom DateTimeFormat strings "As found out by @jskeet , abbreviated genitive month names don't seem to work when using the ""MMM"" token on custom datetime format strings The test, written by @jskeet (I'm just copying here from https://github.com/nodatime/nodatime/issues/377): ``` using System; using System.Globalization; using System.Linq; class Test { static void Main() { var culture = (CultureInfo) CultureInfo.InvariantCulture.Clone(); culture.DateTimeFormat.AbbreviatedMonthGenitiveNames = culture.DateTimeFormat.AbbreviatedMonthNames .Select(x => ""Gen"" + x) .ToArray(); culture.DateTimeFormat.MonthGenitiveNames = culture.DateTimeFormat.MonthNames .Select(x => ""Gen"" + x) .ToArray(); Console.WriteLine(new DateTime(1976, 6, 19).ToString(""d MMMM yy"", culture)); Console.WriteLine(new DateTime(1976, 6, 19).ToString(""MMMM yy"", culture)); Console.WriteLine(new DateTime(1976, 6, 19).ToString(""d MMM yy"", culture)); Console.WriteLine(new DateTime(1976, 6, 19).ToString(""MMM yy"", culture)); } } ``` Should output: ``` 19 GenJune 76 June 76 19 GenJun 76 Jun 76 ``` But outputs: ``` 19 GenJune 76 June 76 19 Jun 76 Jun 76 ``` Disregarding the abbreviated genitives (and resorting to regular ones when abbreviated). I haven't found the DateTimeFormat files on GitHub yet (just the tests, which don't cover this), so I can't issue a request or test it, but on the reference source: http://referencesource.microsoft.com/#mscorlib/system/globalization/datetimeformat.cs,578 We got this: ``` if ((dtfi.FormatFlags & DateTimeFormatFlags.UseGenitiveMonth) != 0 && tokenLen >= 4) { result.Append( dtfi.internalGetMonthName( month, IsUseGenitiveForm(format, i, tokenLen, 'd')? MonthNameStyles.Genitive : MonthNameStyles.Regular, false)); ``` Which doesn't take MMM into account (because of the `tokenLen >= 4` conditional). If I'm not mistaken, it should look like this: ``` if ((dtfi.FormatFlags & DateTimeFormatFlags.UseGenitiveMonth) != 0 && tokenLen >= 3 /* Work for MMM and MMMM */ ) { result.Append( dtfi.internalGetMonthName( month, IsUseGenitiveForm(format, i, tokenLen, 'd')? MonthNameStyles.Genitive : MonthNameStyles.Regular, tokenLen == 3 /* Abbreviated if MMM */)); ``` " 2805 area-System.Net Introducing checks for libcurl features Runtime and load-time checks to ensure that the features user is relying on are available in the libcurl library loaded 2810 area-System.Net Moving shared default between winHttp & Unix Handler to a seperate common file ``` new file: ../../Common/src/System/Net/Http/HttpHandlerDefaults.cs modified: ../../System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs modified: System.Net.Http.csproj modified: System/Net/Http/Unix/CurlHandler.cs ``` Moved shared default to common file. Addressing issue #2787 . 2813 area-Infrastructure Investigate a better way to handle * dependencies "We're inconsistent across the repo and buildtools. Some places we use -\* others we use -beta-_. It seems that both have the draw back of not permitting an upgrade to latest stable version, or moving past any changes in the major.minor.build version. In most places the semantics we want is either 4.0._: latest of a given API version or 4.*: latest API of a major release. In conjunction with this we need to experiment with how to use policy to impact the behavior of restore. In some cases we want ""minimum that satisfies the constraint"" in others we want ""latest that satisfies the constraint"". /cc @weshaggard " 2817 area-Infrastructure Investigate: Partial facades should build against stable packages Today partial facades are building against live dependencies via P2P reference for other contracts. This means that they always need to reference the latest version of their contract dependencies. We should see if we can break this to allow the partial facades to version more independently. 2833 area-System.Net Credential Support in Unix HTTP Handler This checkin integrates CurlHandler to the credential support available in libcurl 2836 area-System.IO Add method for calculating relative paths It would be great if this super common functionality could be added to the path class. Using URI feels hacky to do this anyways. Related https://github.com/dotnet/corefx/issues/1745 2837 area-System.Threading SemaphoreSlim Dispose thread safety The documentation of SemaphoreSlim says 'Dispose should only be used when all other operations have completed'. In practice, for me, I don't bother to Dispose the SemaphoreSlim because I would need to add synchronization to Dispose of this synchronization class. See also, this [question on stackoverflow](http://stackoverflow.com/questions/32035891/dispose-a-semaphoreslim-while-waitasync). Can SemaphoreSlim be extended so pending operations on other threads throw ObjectDisposedException? Related to this, I noticed some of the other synchronization classes in System.Threading do not properly document the thread safety behavior of their Dispose method. Furthermore, the reference source of ReaderWriterLockSlim shows a check in the Dispose method which throws a SynchronizationLockException when the Dispose conditions are not met. SemaphoreSlim and other classes could do the same. 2840 area-System.Net Enabling POST method options 2844 area-System.Linq Implement IList in Linq responses when possible There is code throughout .NET that accepts arguments of `IEnumerable` and has an optimised path for `IList` and/or `ICollection`. Some methods of `System.Linq.Enumerable` would be examples, but also elsewhere such as some collections' constructors. The effect upon `.ToList()`, `.ToArray()` and any operation in `Enumerable` that requires buffering are perhaps particularly of note here. Some methods of `Enumerable` have results which are conceptually lists. E.g. `Repeat` returns a sequence of a specified size where all items are the same, which can be modelled as a read-only list. Some methods of `Enumerable` have results which can be conceptually lists in certain conditions. E.g. If `Select` is called on a source that is itself a list, then the result would be a read-only list of the same size as the source list, and a different type. Returning such list types when possible would increase the times that the existing fast-paths for list types are made use of. At the same time, some such changes would add further such cases, potentially allowing chains of operations that cannot currently hit such fast-paths to do so. 2849 area-System.Security Add support for importing PKCS7 files on Unix 2851 area-Meta Port legacy LINQ tests to Git/XUnit "Current active test coverage for LINQ is not very great. While sources were ported and published, many old legacy tests has been left behind. It is not an easy task to port them to Git/XUnit, but mostly just because of the test volume and because they are not XUnit tests. It would be nice to port them over. Also it would be preferable to port these tests over writing new ones, because the old tests are by definition ""correct"". I.E. any deviation from the behavior guarded by those tests could be a compatibility issue. I have collected and pushed a lot of old legacy tests for LINQ to https://github.com/VSadov/corefx/tree/UnportedLegacyTests branch. Actual tests are at: https://github.com/VSadov/corefx/tree/UnportedLegacyTests/src/System.Linq/LegacyTestsToPort/LINQ " 2857 area-System.Net HttpClient Timeout Confusion The HttpClient from the System.Net.Http package has Timeout property that defaults to a 100 seconds which as I read through the code just means how long till the task is cancelled. The underlying windows handler WinHttpHandler has the timeout properties ConnectionTimeout, SendTimeout, ReceiveHeadersTimeout and ReceiveDataTimeout which default to 30 seconds except for ConnectionTimeout which defaults to 60 seconds. If you have an operations that takes say 40 seconds before it return back any data it will always timeout after 30 seconds. Only way to get around this is to code against the platform specific WinHttpHandler and set the timeout properties. Am I missing something about how to set timeout in a platform agnositic approach? Here is the code I wrote that directly uses the WinHttpHandler but I want to code just against the HttpClientHandler. ``` private HttpClient CreateHttpClient() { var httpMessageHandler = new System.Net.Http.WinHttpHandler(); httpMessageHandler.SendTimeout = TimeSpan.FromSeconds(200); httpMessageHandler.ReceiveDataTimeout = TimeSpan.FromSeconds(200); httpMessageHandler.ReceiveHeadersTimeout = TimeSpan.FromSeconds(200); var httpClient = new HttpClient(httpMessageHandler); httpClient.Timeout = TimeSpan.FromSeconds(200); return httpClient; } ``` 2862 area-System.Collections Add HashSet ctors with capacity Replaces PR #2122. I squashed and fixed up @MarkusSintonen's commits from that PR. Fixes #382. New tests are not included due to System.Collections.dll being a partial facade, and the repo not currently having the infrastructure to enable adding tests for new surface area in partial facades. cc: @terrajobst, @KrzysztofCwalina 2865 area-System.Threading Leaky abstraction in ThreadPool.[Unsafe]RegisterWaitForSingleObject I just went into the pitfall of using a waithandle in two different registrations. The documentation states the following: > The wait thread uses the Win32 WaitForMultipleObjects function to monitor registered wait operations. Therefore, if you must use the same native operating system handle in multiple calls to RegisterWaitForSingleObject, you must duplicate the handle using the Win32 DuplicateHandle function. It seems quite bad when the documentation is encouraging you to write non-portable code, and P/Invoking to DuplicateHandle requires full trust. Would it be a big problem to detect that the same handle is there twice with two different registrations and correctly wait for it and queue both action on the thread pool when the waithandle becomes ready? 2869 area-Meta Merge future branch back into master This issue is just for tracking the changes we have merged into future so when we merge it back to master we know which API changes we need to modify contracts and ensure are supported on our other platforms like the desktop framework. At this point it isn't clear when this will happen but we want to keep track of this item. --- Merged PRs into future --- - [x] #1384 Regex group should provide a Name property. - [x] #1783 Add ConcurrentDictionary GetOrAdd/AddOrUpdate overloads with generic arg - [x] #1756 Implement generic interfaces on Regex collections - [x] #2436 Add async XLinq document/element loading and saving - [x] #2862 Add HashSet ctors with capacity 2873 area-System.IO Unix NamedServerPipeStream disposal no longer deletes the FIFO Per the discussion in #2764, the clean up of a Unix FIFO named pipe upon disposal of the NamedPipeServerStream that created it has been removed. - Resolves #2764 cc: @stephentoub 2875 area-System.IO Removed the Unix restriction on MaxNumberOfServerInstances There were previously checks to ensure that MaxNumberOfServerInstances was within the same boundaries as it was on Windows despite never actually being used in the Unix implementation. This commit removes those checks and adds platform specific tests for the new behavior. - Resolves #2764 2877 area-System.Collections Propose Adding a GetOrAdd(TKey key, Func valueFactory) to Dictionary "On `ConcurrentDictionary` there is the very useful function `TValue GetOrAdd(TKey key, Func valueFactory)`. The pattern that the method represents is one that issued commonly on the ""normal"" `Dictionary` as well. I propose adding such a method for this common use case. Besides simplifying it will also make switching between the two dictionaries simpler. " 2882 area-System.Security Same naming classes appear in multiple nuget packages. I know you guys are busy building the .net core packages. At the moment, I face a challenge about the following errors when target dnxcore50 Error CS0433 The type 'HashAlgorithm' exists in both 'System.Security.Cryptography.Hashing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System.Security.Cryptography.Primitives, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' Error CS0433 The type 'HMACSHA1' exists in both 'System.Security.Cryptography.Algorithms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System.Security.Cryptography.Hashing.Algorithms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' Error CS0433 The type 'RandomNumberGenerator' exists in both 'System.Security.Cryptography.Algorithms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System.Security.Cryptography.RandomNumberGenerator, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' Previously, we solve this kind of issues by add alias in project. Since we have new project file which is project.json. I have run out of idea how to add alias. Can one of masters give me some hints on this? 2883 area-System.Net Removed DumpHeaders dependency & coded to avoid unnecessary splitting ``` modified: ../../System.Net.Http/src/System/Net/Http/Unix/CurlHandler.cs ``` This fixed the useragent bug. The issue was DumpHeaders adding the same header twice in case of muti values header. 2885 area-System.Security X509 ExportMultiplePrivateKeys test failed in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug_prtest/3248/console ``` Discovering: System.Security.Cryptography.X509Certificates.Tests Discovered: System.Security.Cryptography.X509Certificates.Tests Starting: System.Security.Cryptography.X509Certificates.Tests System.Security.Cryptography.X509Certificates.Tests.CollectionTests.ExportMultiplePrivateKeys [FAIL] System.Security.Cryptography.CryptographicException : Error occurred during a cryptographic operation. Stack Trace: d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Security.Cryptography.X509Certificates\src\Internal\Cryptography\Pal.Windows\StorePal.Export.cs(82,0): at Internal.Cryptography.Pal.StorePal.Export(X509ContentType contentType, String password) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509Certificate2Collection.cs(123,0): at System.Security.Cryptography.X509Certificates.X509Certificate2Collection.Export(X509ContentType contentType, String password) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509Certificate2Collection.cs(116,0): at System.Security.Cryptography.X509Certificates.X509Certificate2Collection.Export(X509ContentType contentType) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Security.Cryptography.X509Certificates\tests\CollectionTests.cs(482,0): at System.Security.Cryptography.X509Certificates.Tests.CollectionTests.ExportMultiplePrivateKeys() Finished: System.Security.Cryptography.X509Certificates.Tests ``` 2886 area-System.Reflection Reflection types should be made extensible "I'm creating a subclass of FieldInfo and there's an error in the constructor saying ""'ConstructorInfo' does not contain a constructor that takes 0 arguments"". The reason for this is that my constructor is calling the default constructor of FieldInfo, which seems to be unavailable. That's because FieldInfo's constructor was changed to internal. As there is no other constructor defined in FieldInfo it's now impossible to extend it. It's the same for ConstructorInfo, EventInfo, MethodInfo, PropertyInfo, TypeInfo and Type. Is this intended? " 2890 area-System.Net Porting System.Net.NameResolution. "Porting System.Net.NameResolution and tests. Adding a PAL layer for this contract together with x-plat implementations. Pending work is marked either as ""Shims"" or with TODO comments. Feature #893 " 2891 area-System.Net Tracking items for System.Net.NameResolution This issue is tracking TODOs and Shims removal for PR #2890 : 1. Contract changes to System.Net.Primitives: 1. [ ] Add public ctor for `SocketException(SocketError errorCode, int platformError)` 2. [ ] `IPAddress` - allow access to internal buffer via internal contract or new public API on `System.Net.Primitives`. 3. [ ] `SocketAddress[int]` - allow direct access to internal buffer via internal contract or new public API in `System.Net.Primitives`. 2. Add UnitTests required by changes made during refactoring: 1. [ ] `NameResolutionPal.GetHostByAddr(IPAddress)` : test with BIGENDIAN 2894 area-System.Net Tracking x-plat issues for System.Net.NameResolution Feature #2484 : X-Plat comments from PR #2890 related to System.Net.NameResolution: 1. Update errno helpers. 2. Add Unit/Pal test to validate potential indexing issues found in NameResolutionPal.Unix.cs CreateHostEntry(Interop.libc.hostent\* hostent); Given the design error, I suggest similar tests for the entire file. 3. `TryGetNameInfo`'s allocation of `hostname`: consider using stackalloc / StringBuilderCache. 4. Intermittent PAL test failure: `System.Net.NameResolution.PalTests.NameResolutionPalTests.GetHostByName_HostName_GetHostByAddr` MESSAGE: Assert.Equal() Failure Expected: 1XY.XYZ.XYZ Actual: 255.2.0.0 +++++++++++++++++++ STACK TRACE: at System.Net.NameResolution.PalTests.NameResolutionPalTests.GetHostByName_HostName_GetHostByAddr() 1. Intermittent PAL test failure: `System.Net.NameResolution.PalTests.NameResolutionPalTests.TryGetAddrInfo_HostName_TryGetNameInfo` MESSAGE: Assert.Equal() Failure Expected: Success Actual: HostNotFound +++++++++++++++++++ STACK TRACE: at System.Net.NameResolution.PalTests.NameResolutionPalTests.TryGetAddrInfo_HostName_TryGetNameInfo() 2895 area-System.IO 5 FileSystem tests are failing on OS X 5 test in System.IO.FileSystem are failing on OS X System.IO.FileSystem.Tests.FileInfo_GetSetTimes.SettingUpdatesProperties [FAIL] Assert.All() Failure: 2 out of 6 items in the collection did not pass. [1]: Xunit.Sdk.EqualException: Assert.Equal() Failure Expected: 2014-12-01T12:00:00.0000000Z Actual: 2015-08-19T23:25:34.0000000Z at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) at System.IO.FileSystem.Tests.FileInfo_GetSetTimes.<>c__DisplayClass3_0.b__0(Tuple`3 tuple) at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [0]: Xunit.Sdk.EqualException: Assert.Equal() Failure Expected: 2014-12-01T12:00:00.0000000-08:00 Actual: 2015-08-19T16:25:34.0000000-07:00 at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) at System.IO.FileSystem.Tests.FileInfo_GetSetTimes.<>c__DisplayClass3_0.b__0(Tuple`3 tuple) at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) Stack Trace: at System.IO.FileSystem.Tests.FileInfo_GetSetTimes.SettingUpdatesProperties() System.IO.FileSystem.Tests.DirectoryInfo_GetSetTimes.SettingUpdatesProperties [FAIL] Assert.All() Failure: 2 out of 6 items in the collection did not pass. [1]: Xunit.Sdk.EqualException: Assert.Equal() Failure Expected: 2014-12-01T12:00:00.0000000Z Actual: 2015-08-19T23:25:34.0000000Z at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) at System.IO.FileSystem.Tests.DirectoryInfo_GetSetTimes.<>c__DisplayClass3_0.b__0(Tuple`3 tuple) at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [0]: Xunit.Sdk.EqualException: Assert.Equal() Failure Expected: 2014-12-01T12:00:00.0000000-08:00 Actual: 2015-08-19T16:25:34.0000000-07:00 at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) at System.IO.FileSystem.Tests.DirectoryInfo_GetSetTimes.<>c__DisplayClass3_0.b__0(Tuple`3 tuple) at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) Stack Trace: at System.IO.FileSystem.Tests.DirectoryInfo_GetSetTimes.SettingUpdatesProperties() System.IO.FileSystem.Tests.DirectoryInfo_ToString.ParentDirectory [FAIL] Assert.Equal() Failure ↓ (pos 0) Expected: Actual: / ↑ (pos 0) Stack Trace: at System.IO.FileSystem.Tests.DirectoryInfo_ToString.ParentDirectory() System.IO.FileSystem.Tests.Directory_GetSetTimes.SettingUpdatesProperties [FAIL] Assert.All() Failure: 2 out of 6 items in the collection did not pass. [1]: Xunit.Sdk.EqualException: Assert.Equal() Failure Expected: 2014-12-01T12:00:00.0000000Z Actual: 2015-08-19T23:25:39.0000000Z at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) at System.IO.FileSystem.Tests.Directory_GetSetTimes.<>c__DisplayClass5_0.b__0(Tuple`3 tuple) at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [0]: Xunit.Sdk.EqualException: Assert.Equal() Failure Expected: 2014-12-01T12:00:00.0000000-08:00 Actual: 2015-08-19T16:25:39.0000000-07:00 at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) at System.IO.FileSystem.Tests.Directory_GetSetTimes.<>c__DisplayClass5_0.b__0(Tuple`3 tuple) at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) Stack Trace: at System.IO.FileSystem.Tests.Directory_GetSetTimes.SettingUpdatesProperties() System.IO.FileSystem.Tests.File_GetSetTimes.SettingUpdatesProperties [FAIL] Assert.All() Failure: 2 out of 6 items in the collection did not pass. [1]: Xunit.Sdk.EqualException: Assert.Equal() Failure Expected: 2014-12-01T12:00:00.0000000Z Actual: 2015-08-19T23:25:40.0000000Z at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) at System.IO.FileSystem.Tests.File_GetSetTimes.<>c__DisplayClass5_0.b__0(Tuple`3 tuple) at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [0]: Xunit.Sdk.EqualException: Assert.Equal() Failure Expected: 2014-12-01T12:00:00.0000000-08:00 Actual: 2015-08-19T16:25:40.0000000-07:00 at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) at System.IO.FileSystem.Tests.File_GetSetTimes.<>c__DisplayClass5_0.b__0(Tuple`3 tuple) at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) Stack Trace: at System.IO.FileSystem.Tests.File_GetSetTimes.SettingUpdatesProperties() 2897 area-System.Net "WinHttpRequestStream.Flush Appends ""0\r\n\r\n"" in Chunked Mode" "WinHttpRequestStream.Flush writes ""0\r\n\r\n"" to the stream every time the method is called in when _chunkedMode is true. This behavior seems wrong. The _endChunk should only be added to the end. " 2898 area-Meta Change tests to use consistent namespaces "Namespace used in test projects are all over the place: - default (previous version of System.Text.Encoding.CodePages tests) - Test (PLINQ) - $packageNamespace.Tests - $packageNamespace.UnitTests .... and potentially more. Is there any guidance for what we should be using? The only potentially applicable guideline would be ""Follow the style of the current project"", which doesn't help much in the case of new work (or say what any canonicalization tool would change things to). " 2903 area-System.Net Removed DumpHeaders dependency & coded to avoid unnecessary splitting ``` modified: System/Net/Http/Unix/CurlHandler.cs ``` I messed up while updating the changes in remote branch. Tried to fix that but could not. Will figure out what caused the issue. Sending new PR with updated changes. Copying the comments here. Sorry for any inconvenience. 2904 area-System.IO Shims should use intptr_t for file descriptors Once we get all of the IO stuff shimmed, it would be better to use intptr_t instead of int32_t for file descriptors as then we can marshal SafeHandles to descriptors without the current workarounds. 2905 area-System.Net Merge changes from TFS 2906 area-System.IO Added ZLib decompression support to DeflateStream The DeflateStream class currently uses ZLib for compression (if available) but doesn't use ZLib for decompression. This commit adds support to use either ZLib or the Managed implementation for decompression (inflation). - Resolves #2024; Added ZLib support in InflaterZLib.cs - Inflater.cs the old managed implementation is renamed to InflaterManaged.cs - Extracted interface of necessary Inflater methods into the IInflater interface from which InflaterManaged and InflaterZLib inherit. - Roughly a 3X speedup for decompression when using the ZLib library instead of the Managed implementation! 2907 area-System.Net Merge changes from TFS 2910 area-System.Security new X509Certificate2(byte[]) should return the signing cert for PKCS#7 on Unix The Windows code supports reading a PKCS#7 signed or PKCS#7 signed-and-enveloped structure; but in single certificate mode it doesn't return certs[0], it returns the certificate which signed the structure. My test files (produced by Windows (certmgr.msc and X509Certificate2Collection::Export)) aren't signed, so Windows emits an exception (`new CryptographicException(ErrorCode.CRYPT_E_SIGNER_NOT_FOUND)`). Without a sample to see what's going on here, it's hard to make compatible behavior. So, for now, the Unix implementation will just throw, even if it could have worked. 2913 area-System.Security Add support for exporting PKCS7 files on Unix 2914 area-System.Threading System.Threading.Tasks.Tests.CancelWait.TaskCancelWaitTestCases.TaskCancelWait1 failed in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst_prtest/1989/testReport/junit/System.Threading.Tasks.Tests.CancelWait/TaskCancelWaitTestCases/TaskCancelWait1/ MESSAGE: Expected Result to lie between 1.63 and 1.65 for completed task. Actual Result -42. Using n=Light IsCanceled=False Expected: True Actual: False +++++++++++++++++++ STACK TRACE: at System.Threading.Tasks.Tests.CancelWait.TaskCancelWaitTest.VerifyResult(TaskInfo current) at System.Threading.Tasks.Tests.CancelWait.TaskCancelWaitTest.b__3(TaskInfo current) at System.Threading.Tasks.Tests.CancelWait.TaskInfo.Traversal(Action`1 predicate) at System.Threading.Tasks.Tests.CancelWait.TaskCancelWaitTest.Verify() at System.Threading.Tasks.Tests.CancelWait.TaskCancelWaitTest.RealRun() at System.Threading.Tasks.Tests.CancelWait.TaskCancelWaitTestCases.TaskCancelWait1() 2915 area-System.Net HttpClient xplat: Fix bugs in polling and callback logic - On OSX, the read end of the pipe sometimes wakes up the poll with a POLLOUT. Since we are interested in only reading on it, scoping down to POLLIN prevents this from happening. Else we attempt a read on it which fails - CheckForCompletedTransfers was being unnecessarily called from the socket callback. We are only interested in MSG_DONE after the socket callback indicates removal. This will anyway wake up PollFunction which calls CheckForCompletedTransfers. This race is also causing a seg fault sometimes because curl_multi_socket_action has been called on an fd that was getting cleaned up via curl_easy_cleanup (call sequence is CurlSocketCallback --> CheckForCompletedTransfers --> EndRequest) - Also removed some unnecessary CharSet attributes cc: @stephentoub @davidsh @CIPop @SidharthNabar @pgavlin 2916 area-System.Net Introducing a bunch of tests for http client handler This checkin tests the client handler in following scenarios: - Http and Https calls - Authentication - Redirection - Redirection + Authentication - custom headers - cookies 2928 area-System.Net Add ALPN support to System.Net.Security.SslStream Porting to newest bug tracker. https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/6264363-add-support-for-alpn-to-system-net-security-sslstr https://connect.microsoft.com/VisualStudio/feedback/details/812003/system-net-security-sslstream-needs-support-for-alpn-to-negotiate-spdy-http2-connections Microsoft drove the HTTP/2 working group to adopt the ALPN TLS Extension for use in negotiating HTTP/2 connections. It succeeded. SChannel got ALPN support in the Windows 8 timeframe. .NET's SslStream class does not have ALPN support, preventing low-level socket clients (like Fiddler) from sending ALPN tokens to servers during TLS handshaking, in turn blocking support of the HTTP/2 protocol. The code change to SslStream is probably a dozen lines at worst. The current workaround for those blocked by this shortcoming is to take on a **massive** security risk and ship either BouncyCastle or OpenSSL (or re-wrap SChannel, I guess). 2930 area-System.Security Change Windows GetRSAPrivateKey to prefer CNG When GetRSAPrivateKey was added into the repository the CNG types weren't yet online. Now that they are, we should have GetRSAPrivateKey and GetRSAPublicKey use CNG when able, and fallback to CAPI for legacy support. 2934 area-System.Net Allow setting IP protection level on Socket - P2P is not possible without it It is not possible for peers to establish a connection with eachother behind NAT(s) using Windows sockets without setting the IP socket option IP_PROTECTION_LEVEL. Currently there is no way to do this on a `DatagramSocket` or .NET Core `System.Net.Socket.Socket`, thus there is _no way make Peer 2 Peer Windows Store Apps_. The issue on [Microsoft Connect](https://connect.microsoft.com/VisualStudio/feedback/details/1431526/nat-traversal-udp-hole-punching-not-possible-in-windows-store-apps-even-with-internet-client-server-capability). In .NET Framework one used [`System.Net.Sockets.IPProtectionLevel`](http://referencesource.microsoft.com/#System/net/System/Net/Sockets/Socket.cs,5eb8a772f197999a). We need to add this facility `Windows.Networking.Sockets.DatagramSocket` and/or `System.Net.Sockets.Socket` 2936 area-System.Net .NET Core's System.Net.Sockets.Socket Send and Receive methods use old async technique There is no documentation on the `System.Net.Sockets.Socket` provided in .NET Core (beyond the XML code documentation) but it seems to provide a subset of .NET Framework desktop [`Socket`s](https://msdn.microsoft.com/en-us/library/system.net.sockets.socket.sendasync%28v=vs.110%29.aspx) members. The only methods to send and receive are [`SendAsync`](https://msdn.microsoft.com/en-us/library/system.net.sockets.socket.sendasync%28v=vs.110%29.aspx) and [`RecieveAsync`](https://msdn.microsoft.com/en-us/library/system.net.sockets.socket.receiveasync%28v=vs.110%29.aspx). Despite the names they are not `async` methods but an old school variant to which one supplies the `SocketAsyncEvenArgs` parameter _shudder_. We need to bring .NET Core's `Socket` up-to-date and provide `async` variants. Also consider synchronous methods since `Socket`s are often used in in background processes with dedicated threads where that is wanted (applications tend to use higher application level type such as `HttpClient`). 2938 area-System.Runtime GC tests GetTotalMemoryTest_ForceCollection, GetGenerationTest test failed in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_release/1057/console ``` GCTests.GetTotalMemoryTest_ForceCollection [FAIL] Assert.True() Failure Expected: True Actual: False Stack Trace: d:\j\workspace\dotnet_corefx_windows_release\src\System.Runtime\tests\System\GC.cs(295,0): at GCTests.GetTotalMemoryTest_ForceCollection() ``` We should probably just delete these tests. 2942 area-System.Threading Request to Add Timer.Dispose(WaitHandle) API in CoreCLR. We are working on porting our .Net 4.5 application to the .Net Core CLR platform. We have multiple services implemented in our application which need to do some work every so often. Currently this is implemented using System.Threading.Timer with a callback method that is responsible for scheduling the next callback. During cleanup, we want to wait until we are sure that the callback is no longer running and will not run in future. Currently we do this using Threading.Timer.Dispose(WaitHandle) with additional synchronization mechanism to avoid the ObjectDisposedException. Since CoreCLR doesn't have Timer.Dispose(WaitHandle) implemented, every application/service now has to implement Timer.Dispose(WaitHandle) logic using some synchronization mechanism in their code. This adds complexity at each place where this API is used currently. We would like to carry forward the same behavior and so would request to add this API [Timer.Dispose(WaitHandle)] back in CoreCLR. Thanks, Mehul. 2944 area-System.Net Fix an assert in CurlHandler multi handle release path - If a timeout happens, the socket fd is not removed from _fdSet. When SafeCurlMultiHandle is finalized, it checks if _fdSet is empty and this assertion was failing. So ensuring that all codepaths of EndRequest result in cleanup from _fdSet cc: @stephentoub @davidsh @CIPop @SidharthNabar @pgavlin 2953 area-System.Security Add RSA.Create() to utilize the correct platform-dependent RSA implementation 2958 area-System.IO Add coverage to DriveInfo tests FileSystem.DriveInfo.dll coverage raised to at or near testable maximum. Added several scenarios that weren't present before and also split up Volume Label setting/getting to several tests so that errors can be better diagnosed. 2961 area-System.IO Avoid unnecessary allocations when using FileStream "This was originally a PR (https://github.com/dotnet/coreclr/pull/1429), turned into an issue as a result of the comments there. The idea is to avoid 4KB allocation for buffer whenever we need to work with large number of files. Consider the following code: ``` foreach (var file in System.IO.Directory.GetFiles(dirToCheck, ""*.dat"")) { using (var fs = new FileStream(file, FileMode.Open)) { // do something to read from the stream } } ``` The problem is that each instance of FileStream will allocate an independent buffer. If we are reading 10,000 files, that will result in 40MB(!) being allocated, even if we are very careful about allocations in general. See also: https://github.com/dotnet/corefx/pull/2929 The major problem is that FileStream will allocate its own buffer(s) and provide no way to really manage that. Creating large number of FileStream, or doing a big writes using WriteAsync will allocate a lot of temporary buffers, and generate a _lot_ of GC pressure. As I see it, there are a few options here: - Add a constructor that will take an external buffer to use. This will be the sole buffer that will be used, and if a bigger buffer is required, it will throw, instead of allocating a new buffer. - Add a pool of buffers that will be used. Something like the following code: [ThreadStatic] private static Stack[] _buffersBySize; private static GetBuffer(int requestedSize) { if(_buffersBySize == null) _buffersBySize = new Stack[32]; ``` var actualSize = PowerOfTwo(requestedSize); var pos = MostSignificantBit(actualSize); if(_buffersBySize[pos] == null) _buffersBySize[pos] = new Stack(); if(_buffersBySize[pos].Count == 0) return new byte[actualSize]; return _buffersBySize[pos].Pop(); ``` } private static void ReturnBuffer(byte[] buffer) { var actualSize = PowerOfTwo(buffer.Length); if(actualSize != buffer.Length) return; // can't put a buffer of strange size here (prbably an error) ``` if(_buffersBySize == null) _buffersBySize = new Stack[32]; var pos = MostSignificantBit(actualSize); if(_buffersBySize[pos] == null) _buffersBySize[pos] = new Stack(); _buffersBySize[pos].Push(buffer); ``` } The idea here is that each thread has its own set of buffers, and we'll take the buffers from there. The Dispose method will return them to the thread buffer. Note that there is no requirement to use the same thread for creation / disposal. (Although to be fair, we'll probably need to handle a case where a disposal thread is used and all streams are disposed on it). The benefit here is that this isn't going to impact the external API, while adding the external buffer will result in external API being visible. " 2963 area-System.Net Handle leak with WinHttpHandler "The following test demonstrates an unbounded leak of both memory and handles: ``` C# [Fact] public void TestLeak() { while (true) { HttpClient client = new HttpClient(); client.GetStringAsync(""http://www.httpbin.org"").Wait(); // client.Dispose(); } } ``` At least one problem appears to be that without explicitly Dispose'ing of the HttpClient instance, the underlying session SafeHandle is never cleaned up. When the session handle is created, it's DangerousAddRef'd (https://github.com/dotnet/corefx/blob/master/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs#L992), and then DangerousRelease is only called if explicitly Dispose'ing (https://github.com/dotnet/corefx/blob/master/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs#L555). " 2965 area-System.Net Dns.GetHostAddressesAsync and HttpClient can't run on Linux System.AggregateException: One or more errors occurred. ---> System.ArgumentException: The AddressFamily Unspecified is not valid for the System.Net.IPEndPoint end point, use InterNetwork instead. Parameter name: socketAddress at System.Net.Dns.HostResolutionEndHelper(IAsyncResult asyncResult) at System.Net.Dns.EndGetHostAddresses(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at ConsoleApp1.Program.d__2.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at ConsoleApp1.Program.Main(String[] args) 2967 area-System.Net Add System.Net.NameResolution to README.md Add System.Net.NameResolution to README.md. 2972 area-System.Net Add more tests for WebHeaderCollection Excluded from #2380 2973 area-System.Net Fix HttpClientHandler timeouts Since HttpClientHandler doesn't expose all the timeout used by the underlying WinHttpHandler, we need to disable those timeouts in favor of the HttpClient.Timeout property. Addresses issue #2857. 2982 area-System.Net WebSocket extensions From using the WebSocket class, I think these extensions make sense: ``` C# Task ReceiveTextAsync(CancellationToken cancellationToken = default(CancellationToken)); Task> ReceiveBinaryAsync(CancellationToken cancellationToken = default(CancellationToken)); Task SendAsync(string message, CancellationToken cancellationToken = default(CancellationToken)) Task SendAsync(ArraySegment message, CancellationToken cancellationToken = default(CancellationToken)) ``` - All methods have a defaulted CancellationToken. - The Receive method implementations read until EndOfMessage. - The Receive methods send back a Close message when receiving one. The message sent back echos the status code which was received. - The Receive methods throw when the MessageType is different than that of the method signature. (For most protocols, the user will know what MessageType he expects to come next.) - The string overloads handle the encoding/decoding. 2984 area-System.Collections Installing System.Collections.Immutable on .NET 4.5 brings unnecessary packages "When System.Collections.Immutable nuget package is installed to project targeting .NET 4.5, some unnecessary dependencies are brought in: ``` ``` NuGet is apparently smart enough to not add those packages as references as they are only meant for .NET Core, but I still feel they should not even be added to packages.config and downloaded. [System.Collections.Immutable nuget package](https://www.nuget.org/packages/System.Collections.Immutable/) only specifies dependencies for .NET Core (DotNET 5.0). I believe that adding empty dependencies group for .NET 4.5 as can be seen in [AutoMapper nuget package](https://www.nuget.org/packages/AutoMapper/) (for example) would fix the issue and those dependencies would not be downloaded. Have not adding other dependency groups been done on purpose or is it an oversight? Thanks! " 2988 area-System.Net How to implement System.Net.NameResolution on FreeBSD? The assembly `System.Net.NameResolution` does not compile on FreeBSD. Looking at the sources it seems to have corresponding source files implementing it on Linux and OS X. Looks like a good candidate for a shim, to unify the implementation. Especially given that the sockets API is pretty consistent across POSIX systems. @nguerrera do you plan a `System.Net.Native` shim to cover this? \cc @josteink 2992 area-System.Net Merge changes from TFS 2996 area-System.Globalization System.Globalization: Expose DateTimeFormat GetShortestDayName to .NET Core contract I found what looks like a mistake in the .NET Core contracts for DateTimeFormat. This class exposes two sets of APIs: some methods, and their corresponding properties. For example, DateTimeFormat has a GetMonthName(int) method, that returns the name of the specified month. And then it has a corresponding property MonthNames, that is a string array of all the month names. This is true for Month Names, Abbreviated Month Names, Day Names, and Abbreviated Day Names. And in the full framework, this holds true for Shortest Day Names: string GetShortestDayName(DayOfWeek) & string[] ShortestDayNames. However, in the .NET Core contracts, the string[] property ShortestDayNames is public, but the method GetShortestDayName(DayOfWeek) is not exposed. I see this [is true for Silverlight](https://msdn.microsoft.com/en-us/library/system.globalization.datetimeformatinfo%28v=vs.95%29.aspx) as well. We should expose this method in the .NET Core. 3000 area-System.Net Switch to using async WinHTTP APIs in WinHttpHandler The current version of WinHttpHandler calls into WinHTTP using a synchronous pattern. We need to switch to using the async pattern instead, in order to provide the required performance and scalability for server scenarios of ASP.NET 5. 3002 area-System.Net Add System.Net.Http.Native shim and seed it with curl initialization cc @sokket @bartonjs @stephentoub 3007 area-System.Linq Calls with out enum arguments fail when expression tree is interpreted. "``` C# public enum MyEnum { Value } public class Foo { public static void Bar(out MyEnum o) { o = MyEnum.Value; } public void Test() { var x = Expression.Variable(typeof (MyEnum), ""x""); var expression = Expression.Lambda( Expression.Block( new [] { x }, Expression.Call(null, typeof(Foo).GetMethod(""Bar""), x))); expression.Compile()(); } } ``` Interpreter throws - $exception {""Object of type 'System.Int32' cannot be converted to type 'App1.MyEnum&'.""} System.ArgumentException " 3008 area-System.Xml Short-circuit key comparison on equal indexes in EnumerableSorter in System.Xml.XDocument System.Xml.XDocument has its own copy of EnumerableSorter and possibly can benefit from the same fix as in https://github.com/dotnet/corefx/pull/2977 3009 area-System.IO PathHelper stackalloc version can't grow Will always fail with MAX_PATH if it goes beyond when resolving paths (relative, short names, etc.). Need to change to allow switching between stack and heap when needed. 3014 area-System.Reflection MSDN doc wrong about virtual CustomAttributeData.AttributeType property in .NET 4.5 According to MSDN, [System.Reflection.CustomAttributeData.AttributeType](https://msdn.microsoft.com/en-us/library/system.reflection.customattributedata.attributetype%28v=vs.110%29.aspx) is virtual on .NET4.5/4.6. It isn't however in reality. I suppose it's confused because in CoreFx the property _is_ indeed [virtual](https://github.com/dotnet/corefx-progress/blob/67c6fd93d8b24f5f82490e295950214a45769f4d/src-full/System.Reflection.cs#L54). Can we get this fixed? 3015 area-System.Net HttpClientHandler on unix (CurlHandler) hangs forever in case of negative scenarios "When curl handler encounters exception in its execution, it hangs forever. ``` using (var handler = new HttpClientHandler()) { handler.MaxAutomaticRedirections = 5; var client = new HttpClient(handler); await client.GetAsync(""http://httpbin.org/redirect/6""); } ``` " 3016 area-System.Net HttpClientHandler on unix (CurlHandler) Cookie Behavior different between Unix and Windows There are subtle differences in the way HttpClientHandler behaves w.r.t cookies. On windows if we set httpHandler.UseCookies = true but if the user does not provide a valid cookieContainer, we get InvalidOperationException. In case of CurlHandler, we are ignoring it. 3028 area-System.Security Add X509Chain tests for expiration boundary conditions The X509Chain object supports an explicit time for the override. Using a statically built chain, no revocation mode, and an explicit time, it should be possible to get a very deterministic test for the chain assessment. 3033 area-System.Net Fix error handling in WinHttpHandler StartRequest Addresses dnu restore exception 2547 https://github.com/aspnet/dnx/issues/2547/ - Fix a code path where `requestHandle` could be `null`. - Add unit test to simulate this error code path. 3034 area-System.Security Add support for OCSP on Unix OCSP = Online Certifciate Status Protocol 3035 area-Microsoft.CSharp System.Dynamic.Runtime tests should probably move to under Microsoft.CSharp What we have currently under System.Dynamic.Runtime\tests are mostly tests for C# dynamic. While they do provide coverage for System.Dynamic, they target various language features and only indirectly target DLR machinery. This is confusing. (see, for example, discussion in https://github.com/dotnet/corefx/pull/2941) Tests that target and require C# dynamic should go to under Microsoft.CSharp. If there are any tests that directly targets DLR and do not require C# dynamic, they can remain under System.Dynamic.Runtime. 3037 area-System.Diagnostics TestProcessStartTime test is failing on OS X The TestProcessStartTime test in System.Diagnostic.Process.ProcessTests class is failing with the following error: System.Diagnostics.ProcessTests.ProcessTests.TestProcessStartTime [FAIL] Assert+WrapperXunitException : File path: Y:\Repositories\personal\dotnet\corefx\src\System.Diagnostics.Process\tests\ProcessTests.cs. Line: 387 ---- Assert.InRange() Failure Range: (635766571991261530 - 635766571991772530) Actual: 635766571650984930 Stack Trace: at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber) at Assert.InRange[T](T actual, T low, T high, String path, Int32 line) at System.Diagnostics.ProcessTests.ProcessTests.TestProcessStartTime() ----- Inner Stack Trace ----- at Assert.InRange[T](T actual, T low, T high, String path, Int32 line) 3043 area-System.Linq Allow empty BlockExpression expressions Issue #1877 discusses having `SwitchExpression` objects with no cases. One might similarly have a case where `BlockExpression` elements were being created dynamically and one hit the case of their being no expressions within the block. Such a block would be essentially the same as `Expression.Empty`, but arrived at through happening to hit zero item in a dynamic construction. It would seem that the arguments [here](https://github.com/dotnet/corefx/pull/2803#issuecomment-136514021) about zero-case switches apply equally to zero-item blocks. 3045 area-System.Net WebException.Status on Unix returning wrong result for DNS failures ``` Discovering: System.Net.Requests.Tests Discovered: System.Net.Requests.Tests Starting: System.Net.Requests.Tests System.Net.Requests.Test.HttpWebRequestTest.GetResponseAsync_ServerNameNotInDns_ThrowsWebException [FAIL] Assert.Equal() Failure Expected: NameResolutionFailure Actual: UnknownError Stack Trace: at System.Net.Requests.Test.HttpWebRequestTest.GetResponseAsync_ServerNameNotInDns_ThrowsWebException() Finished: System.Net.Requests.Tests ``` 3046 area-System.Linq Use BlockExpression subclasses more widely. BlockExpression has several subclasses that cover various numbers of sub- expressions when the type is the same as the last expression, and there are no variables. These are only used in one or two of the possible paths under which they make sense. Use them more widely. 3048 area-System.Reflection Merge branch 'master' of https://github.com/dotnet/corefx into dev/metadata 3050 area-System.Net Refactor CurlHandler for threading and resource cleanup "@davidsh, @CIPop, @pgavlin: The first commit in this PR enables the System.Net.Requests tests to run on Unix in CI. Just a few minor tweaks. @kapilash: The second commit is your commit with new tests from #2916, which this PR replaces. @kapilash, @vijaykota: The third commit is the majority of the changes for this PR... CurlHandler is now split into three types: - CurlHandler, which represents the shell of the handler, contains some helper functions, and contains a ""MultiAgent"". It submits ""EasyRequest""s to the ""MultiAgent"". - CurlHandler.EasyRequest, which represents all of the state associated with a SendAsync request on the HttpClient. - CurlHandler.MultiAgent, which represents the owner of a libcurl multi handle and all of the processing associated with it. The MultiAgent is responsible for actually processing EasyRequests, which CurlHandler queues to it. MultiAgent is designed to not require any cleanup. When the first EasyRequest arrives, it spins up a worker that creates a multi handle to process the request. Any additional requests to arrive while that worker is active will be processed by that worker and multi handle. When no work remains, the multi handle and the worker goes away. If/when another request arrives, a new multi handle / worker are spun up. Etc. Almost all of the locking previously there was removed, as the worker thread is now solely responsible for doing all work on the multi handle; any requests for processing come in through the requests queue processed by that thread. This design avoids threading issues we faced with regards to accessing state managed by the multi handle without holding the lock (e.g. polling file descriptors) and avoids having multiple threads blocked waiting on the lock to do processing associated with the multi handle. It also makes resource cleanup much easier and more deterministic: all state associated with the easy handle is cleaned up when that thread is done processing the easy handle, and all state associated with the multi handle is cleaned up when the worker thread shuts down. The change also ensures that we always complete the response message, and that any exceptions that occur are propagated as needed to Read on the response stream (fixes #3015). Further, the design will make it trivial in the future to change the relationship between a CurlHandler and a MultiAgent: - If we want one MultiAgent shared across all CurlHandlers, we just change the _agent field to be static instead of instance. - If we want a pool of MultiAgents, we can simply create a collection of them and round-robin between them from one or more CurlHandlers. - Etc. All of the configuration code remains, e.g. what options are set on the easy and multi handles, but the code has been refactored. I also include CURLOPT_NOSIGNAL to avoid multithreading problems per the docs. Along the way, I cleaned up some stale interop that's gotten left behind through various iterations, and I fixed a few small issues related to behavioral differences from Windows, e.g. CookieContainer never returning null, UseCookies defaulting to true, etc. (Fixes #3016) " 3051 area-Meta Create a C++ coding standard for the PAL layer Create a C++ code style document describing coding standards and naming standards to use the PAL layer. Also, fix up the current PAL code to adhere to the coding standard 3054 area-System.Runtime Add AssemblyLoadContext.LoadUnmanagedDllFromPath helper API "## Scenario Overrides of `System.Runtime.Loader.AssemblyLoadContext.LoadUnmanagedDll` that just wish to provide alternative paths are forced to write platform-specific code to call `LoadLibrary` or `dlopen` to load the library and return the library handle. For example: ``` c# internal class CustomAssemblyLoadContext : AssemblyLoadContext { [DllImport(""kernel32"")] private static extern IntPtr LoadLibrary(string path); [DllImport(""libdl"")] private static extern IntPtr dlopen(string path, int flags); protected override IntPtr LoadUnmanagedDll(String unmanagedDllName) { if (!ShouldLoadFromCurrentDirectory(unmanagedDllName)) { return IntPtr.Zero; // use the default loader } var libraryPath = Path.Combine(Environment.CurrentDirectory, unmanagedDllName); IntPtr libraryHandle = EnvironmentHelper.IsWindows ? LoadLibrary(libraryPath) : dlopen(libraryPath, 0); if (libraryHandle == IntPtr.Zero) { // ... (more error handling) throw new DllNotFoundException(unmanagedDllName); } return libraryHandle; } } ``` The proposal is to add an API to `AssemblyLoadContext` to provide a platform-independent way of loading an unmanaged library: ``` c# internal class CustomAssemblyLoadContext : AssemblyLoadContext { protected override IntPtr LoadUnmanagedDll(String unmanagedDllName) { if (!ShouldLoadFromCurrentDirectory(unmanagedDllName)) { return IntPtr.Zero; // use the default loader } var libraryPath = Path.Combine(Environment.CurrentDirectory, unmanagedDllName); return LoadUnmanagedDllFromPath(libraryPath); } } ``` ## Proposed API ``` c# namespace System.Runtime.Loader { public abstract class AssemblyLoadContext { // Relevant existing members protected abstract Assembly Load(AssemblyName assemblyName); protected Assembly LoadFromAssemblyPath(string assemblyPath); protected virtual IntPtr LoadUnmanagedDll(String unmanagedDllName); // Proposed members protected IntPtr LoadUnmanagedDllFromPath(String unmanagedDllPath); } } ``` ## Details ### Usage and behavior - `unmanagedDllPath` must be an absolute path to the library to load - No changes are made to the specified search path or library name in `unmanagedDllPath` before attempting the load. For example, no prepending ""lib"" and no appending "".so"". However, the system may make changes, for instance, LoadLibrary on Windows appends a "".dll"" if an extension is not specified. - `LoadUnmanagedDllFromPath` would try to load the library using default load flags, and upon success, would return the library handle (value returned by LoadLibrary/dlopen) - `LoadUnmanagedDllFromPath` would throw an exception upon failure to load the library - Upon a successful load, callers from LoadUnmanagedDll overrides are expected to return the library handle from LoadUnmanagedDll, since there is no equivalent of FreeLibrary/dlclose - Upon returning a nonzero value from LoadUnmanagedDll, the loader would attempt to load the entry point from the library ### Exceptions - `ArgumentNullException` - Self-explanatory - `ArgumentException` - `unmanagedDllPath` is an empty string or a relative path - The following exceptions are inherited by the default loader implementation: - `BadImageFormatException` - Windows only - Failed to load the library - `DllNotFoundException` - Did not find the library or failed to load the library - Note that the default loader may also throw `EntryPointNotFoundException`. Since the entry point is loaded upon returning from `LoadUnmanagedDll`, a successful return from `LoadUnmanagedDll` may still be followed by this exception. " 3055 area-System.Net System.Uri fails on long non ascii domains "This domain in russian: ``` csharp Console.WriteLine(new Uri(@""http://высококачественные-пиломатериалы.рф"", UriKind.Absolute)); output: http:/// ``` I start truncate domain from end: ``` csharp Console.WriteLine(new Uri(@""http://высококачественные-пиломатериал.рф"", UriKind.Absolute)); // still bad output: http:/// Console.WriteLine(new Uri(@""http://высококачественные-пиломатериа.рф"", UriKind.Absolute)); // remove one more char, ok output: http://высококачественные-пиломатериа.рф/ ``` `Uri.TryCreate` with schema `//` fails with `Index was outside the bounds of the array.`: ``` csharp Uri uri; Uri.TryCreate(@""//высококачественные-пиломатериалы.рф"", UriKind.Absolute, out uri); exception: Index was outside the bounds of the array. ``` " 3056 area-System.Security MD5.Create() fails on Linux/Mac (was: Windows interop getting called on Unix systems) When calling `Internal.NativeCrypto.Cng.Interop.BCryptOpenAlgorithmProvider` (e.g. when using `MD5.Create()`) on Unix systems the Windows Interop seems to be called. On both Ubuntu 14.04 and OSX I get `System.DllNotFoundException: Unable to load DLL 'BCrypt.dll'`. 3061 area-Serialization Clean up unused directives in serialization code 3062 area-System.Security CryptographicException(int hr) should assign Message based on the code Using Interop.mincore.GetMessage (or whatever the correct API is) on Windows, and the OpenSSL ERR_ APIs on Unix. 3063 area-System.Security Calls to X509_STORE_add_crl should check for unexpected errors `0x0B07D065` (X509_R_CERT_ALREADY_IN_HASH_TABLE) is expected, anything else should throw. Blocked on #3062, because currently we can either get the numeric code in the exception, or the string, but not both. 3065 area-Infrastructure Add coreclr<-> corefx repo integration build We should have an outerloop coreclr<->corefx integration build. 3066 area-System.Numerics Some Vector tests overflow their test values on AVX2 Some of the tests for Vector inadvertently overflow some of the array data they generate, because they do some arithmetic on the index of each element. For example: ``` CSharp T[] values2 = new T[Vector.Count]; for (int g = 0; g < Vector.Count; g++) { values2[g] = (T)(dynamic)(g * 5); } Vector vec2 = new Vector(values2); ``` On AVX2, there are 32 bytes in a Vector. 32 \* 5 = 160, which has far overflowed a signed byte. Anything over 25 elements here will overflow, which is breaking the tests, as they are doing GreaterThan/LessThan/etc. comparisons between the three arrays generated. Actually, the (unsigned) Byte versions of these tests will also break once they run on AVX512, since 64-byte vectors will easily overflow an unsigned byte with this calculation, as well. These should be rewritten to be more robust to this sort of issue. Note: this issue doesn't show up on the builds here; we don't run the tests in a configuration that would hit this (AVX2, x64, Release) 3067 area-System.Net Implement ReadAsync on CurlHandler's response stream 3068 area-System.Net Implement ReadAsync on CurlHandler response stream Today, CurlHandler provides a response content stream that doesn't override ReadAsync. As such, any consumers reading data using ReadAsync will actually end up blocking a thread pool thread doing a synchronous Read. This commit fixes that by implementing ReadAsync to be truly asynchronous with no additional threads blocked. If data is already available, a task is returned immediately. Otherwise, the reader asynchronously waits for the writer to publish data and then consumes that data. The overall design of the response stream remains the same as it was. However, there are some notable changes: - A SemaphoreSlim is now used instead of a ManualResetEventSlim for the _writerPublishedDataEvent. This was done because SemaphoreSlim supports both synchronous and asynchronous waiting. - The _readerRequestingDataEvent was removed, as it was no longer necessary. - We no longer allocate an UnmanagedMemoryStream per write operation, instead simply storing the IntPtr buffer and long length on the response stream. - Additional reorganization was done, primarily to share logic between Read and ReadAsync. - A bunch of comments and debug asserts were added. A second commit enables the asynchronous wait to be canceled by either the internal shutdown CancellationToken or by the CancellationToken provided by the caller to ReadAsync. Fixes #3067 cc: @vijaykota, @kapilash, @davidsh, @pgavlin, @CIPop 3069 area-System.Net Delete stale HttpClientHandler.Unix.cs file from repo There are currently two HttpClientHandler.Unix.cs files checked in: - One in System.Net.Http\src\System\Net\Http - One in System.Net.Http\src\System\Net\Http\Unix The former is the original stubbed out version, throws from every property, and isn't referenced by the .csproj, whereas the latter is where all of the recent development related to CurlHandler has happened. This PR simply deletes the former to avoid confusion, and then moves the latter up one level so that it continues to be next to its .Windows.cs counterpart. (The GitHub diff makes it looks like I actually changed .cs file content, which I didn't; I left it as two commits to make it more evident that I simply deleted a file, moved another, and then made a two-line change to the .csproj.) cc: @davidsh, @vijaykota, @kapilash 3071 area-System.Net Fix for #3045. Fixing WebException.Status on Unix This commit fixes #3045. WebExecption class currently looks at the value of underlying HResult to set the value of the Status. We need to set the value of HttpRequestMessage.HResult to appropriate CURLcode in case of errors. WebException maps this to the relevant WebExceptionStatus 3072 area-System.Security System.Security.Cryptography.Csp should support all runtimes "I want to use RSACryptoServiceProvider, but System.Cryptography.Csp seams to be not available when targeting ""dotnet"". I looked around and it doesn't look like it's moved to another assembly. Are there any plans about this? " 3077 area-System.Security WindowsPrincipalTests.WindowsPrincipalIsInRoleNeg test fails locally I get this failure when trying to run the System.Security.Principal.Windows tests locally: ``` Discovering: System.Security.Principal.Windows.Tests Discovered: System.Security.Principal.Windows.Tests Starting: System.Security.Principal.Windows.Tests WindowsPrincipalTests.WindowsPrincipalIsInRoleNeg [FAIL] System.Exception : The trust relationship between this workstation and the primary domain failed Stack Trace: \corefx\src\System.Security.Principal.Windows\src\System\Security\Principal\NTAccount.cs(343,0): at System.Security.Princ ipal.NTAccount.TranslateToSids(IdentityReferenceCollection sourceAccounts, Boolean& someFailed) \corefx\src\System.Security.Principal.Windows\src\System\Security\Principal\NTAccount.cs(204,0): at System.Security.Princ ipal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean& someFailed) \corefx\src\System.Security.Principal.Windows\src\System\Security\Principal\NTAccount.cs(174,0): at System.Security.Princ ipal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean forceSuccess) \corefx\src\System.Security.Principal.Windows\src\System\Security\Principal\WindowsPrincipal.cs(69,0): at System.Security .Principal.WindowsPrincipal.IsInRole(String role) \corefx\src\System.Security.Principal.Windows\tests\WindowsPrincipalTests.cs(14,0): at WindowsPrincipalTests.WindowsPrinc ipalIsInRoleNeg() Finished: System.Security.Principal.Windows.Tests ``` cc: @pallavit 3085 area-System.Net Improve SafeWinHttpHandle reference counting logic to prevent leaks "This PR mainly addresses ""handle leaks"" #2963, #2762, #2793. In investigating the leaks, I discovered that our use of the SafeHandle pattern was not quite right. In addition, SafeHandle has some rather quirky lifetime management aspects with respect to the Dispose() and DangerousRelease() methods. After reviewing the source code for SafeHandle itself, I discovered a better pattern to using. Native Windows WinHTTP handles wrapped by SafeHandle need additional lifetime management protection. I also needed to add finalizers to the WinHttpHandler, WinHttpRequestStream and WinHttpResponseStream classes. Finally, I added unit tests to validate our behavior assumptions and to track leaks in the WinHttpHandler logic. This change does not affect the SafeWinHttpHandleWithCallback class that is used by System.Net.WebSocket.Client. But that class is incorrectly using the SafeHandle pattern w.r.t. Dispose() and I will be fixing that in a later PR. " 3089 area-System.Net CurlHandler blocking write callback can lead to deadlock With the current implementation of CurlHandler in HttpClient on Unix, when downloaded data is available, libcurl invokes a callback to provide that data to the application. Until a reader is available to consume all of that data, the callback blocks. I'd previously noted this as a performance problem to be fixed, but it's actually a much worse problem in that it can easily lead to deadlock. Here's a new test to demonstrate: ``` C# [Fact] public async Task GetAsync_ResponseHeadersRead_ReadFromEachIterativelyDoesntDeadlock() { using (var client = new HttpClient()) { const int NumGets = 5; Task[] responseTasks = Enumerable.Range(0, NumGets) .Select(_ => client.GetAsync(HttpTestServers.RemoteGetServer, HttpCompletionOption.ResponseHeadersRead)) .ToArray(); for (int i = responseTasks.Length - 1; i >= 0; i--) { using (HttpResponseMessage response = await responseTasks[i]) { await AssertSuccessfulGetResponse(response, HttpTestServers.RemoteGetServer, _output); } } } } ``` Here we kick off N downloads and then iteratively process each to completion before moving on to process the next. This means that we only try to read from a single download at a time, and if this doesn't happen to be the same download that has data available next, our reader will block waiting for data, which will never come because the libcurl callback is blocked waiting for a reader for a different download. We should fix this by employing libcurl's ability to pause connections. When the write callback is invoked, if there isn't currently a read pending on that download, the write callback should return to libcurl to inform it that the connection needs to be paused. When the reader later comes along, it needs to unpause that connection. Obviously there will be some synchronization required here, but it shouldn't be too bad. cc: @vijaykota, @kapilash 3091 area-System.Net Enabling Testcases for POST/PUT methods 3093 area-System.Linq Add static method to create an IEnumerable with one element I find that I need the following static method quite often: ``` csharp public static class MoreEnumerableMethods { // ... public static IEnumerable Singleton(TResult element) { return Repeat(element, 1); } } ``` This seems like a really good fit for `Enumerable` itself, where it would live alongside `Repeat`, `Empty`, and `Range`. I want to be able to say `Enumerable.Singleton(x)`, not `MoreEnumerableMethods.Singleton(x)`. Even Eric Lippert has [complained](http://ericlippert.com/2013/03/18/monads-part-eight/) about the lack of this method: > I wish there was a static method on Enumerable specifically for making a one-element sequence. I have the code (and tests) ready on [a branch in my fork](https://github.com/dotnet/corefx/compare/master...benjamin-hodgson:singleton#diff-95a14d3b4ae14339b623dd95c7537fd0R1497). I can open a pull request right away, subject to any required API reviews. I'm happy to discuss things like the method name (perhaps `One` or `Singular` would be a better choice?). 3096 area-System.Net Improve WinHttpHandler and SafeWinHttpHandle reference counting logic "This PR mainly addresses ""handle leaks"" #2963, #2762, #2793. In investigating the leaks, I discovered that our use of the SafeHandle pattern was not quite right. Native Windows WinHTTP handles wrapped by SafeHandle need additional lifetime management protection to preserve parent-child relationships. Closing the parent handle too early will invalidate the child handle. So, added a SetParentHandle() method to SafeWinHttpHandle to protect against this. This also simplified the passing of handles to the WinHttpResponseStream class. I added finalizers to the WinHttpHandler and WinHttpResponseStream classes. Note that the WinHttpRequestStream class doesn't need a finalizer because its lifetime is short within the processing of the SendAsync() method. Finally, I added unit tests to validate the behavior assumptions and to track leaks in the WinHttpHandler logic. This change does not affect the SafeWinHttpHandleWithCallback class that is used by System.Net.WebSocket.Client. But that class is incorrectly using the SafeHandle pattern w.r.t. Dispose() and I will be fixing that in a later PR. " 3098 area-System.Reflection Fix System.Reflection.Metadata.nuspec dependency 3103 area-System.Numerics System.Numerics.Vectors NuGet package does not work with F# "The [System.Numerics.Vectors](https://www.nuget.org/packages/System.Numerics.Vectors/) package (v4.1.0) doesn't seem to work correctly with F#: Whenever I try to use it, it installs correctly, but the compiler always refers to the corresponding .NET 4.6 reference assembly (""C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6\System.Numerics.Vectors.dll"", in my case) instead of the downloaded assembly in the packages directory. When installing the NuGet package into a C# project, it found that a `` item was added to the csproj file, redirecting the reference to the proper assembly (e.g. `..\packages\System.Numerics.Vectors.4.1.0\lib\net46\System.Numerics.Vectors.dll`). For F# projects however this `` is _not_ added to the fsproj file. Adding it manually fixes the problem. " 3105 area-System.Net Avoid blocking CurlHandler write callback When receiving the body of an HTTP response, libcurl provides the data received via a callback that's invoked synchronously from the thread pumping libcurl's processing. This callback can't return until it's handed off all of the available data, and thus the current implementation of CurlHandler blocks that thread until a reader has consumed the data. This is both expensive and dangerous. It's expensive because we end up blocking a thread until some reader comes along, and it's dangerous because this can easily lead to deadlock. A libcurl multi handle may be used by only one thread at a time, which means that if the handle is being used by a thread while blocked on the write callback, no other thread can access the multi handle, which means no other callbacks for other concurrent requests can be invoked. If multiple operations were queued, and then the data for them arrived in an order that didn't exactly match the order of readers consuming the data, deadlock would ensue. This change makes it so that we no longer block the callback, taking advantage of a pausing mechanism libcurl provides that allows one to pause a connection until it's needed. I rewrote the CurlResponseStream to manage this. Now when the callback has data to write, it attempts to transfer it to the stream. If there's a reader already waiting for the data (represented by a task stored on the stream), the callback simply transfers its data to the reader. If the callback has too much data than would fit in the reader, the remaining data is buffered on the stream. If instead the callback finds that either there isn't a waiting task or that there's already some remaining data buffered from a previous callback, it instead pauses the connection, such that no more callbacks will be invoked until we unpause. From the reader side, a reader who tries to read data from the stream can pull data from the remaining buffer if there is any, or can register a task with the stream that will be filled with data at some point when callback has data available. As part of debugging some issues with this change, I added a verbose tracing mechanism that's enabled by compiling the library with the CURLHANDLER_VERBOSE constant (the same that we use for enabling libcurl's verbose diagnostic output). I left the tracing in as I found it valuable in diagnosing issues with the library, but we can remove it later if desired. I also added a test that deadlocks before the change and that completes successfully after. cc: @vijaykota, @kapilash Fixes #3089 3106 area-System.Linq Intersect not optimized for HashSet Hello, I found some old blog about an optimization of Intersect when the underlying collection is a HashSet. I have been caught of this issue in a contest and using the custom implementation made a huge performance difference. Here the blog by Patrick Smacchia with a full description of the issue : http://www.codebetter.com/patricksmacchia/2011/06/16/linq-intersect-2-7x-faster-with-hashset/ Patrice 3107 area-Meta [Feature] General purpose data binding support? "Please forgive me if this is the wrong place to post this; but it certainly seems like a good place :) I think that it would be extremely useful if there were a general-purpose data binding mechanism providing a consistent way to synchronize the properties of objects making it for developers to have consistent support for patterns that benefit from data binding such as the popular MVVM and MVPVM design patterns. Also including the `IValueConverter` interface and related functionality that is included in the `System.Windows.Data` namespace of the fully featured .NET framework but perhaps in a less platform-specific namespace like `System.Data`? Whilst not applicable in the following example; perhaps a general purpose XAML implementation would also be of benefit perhaps allowing a XAML representation of a custom selection of UI controls outside the scope of Windows or Xamarin forms? I see this being of particular use in .NET Core based game engines. # Example Use Case (User Code) For example, if the Unity game engine was using .NET Core with such a feature it would then be quite straightforward to add binding support to the Unity UI controls simply by having them implement `INotifyPropertyChanged`. ## Programmatic Bindings Continuing with the Unity example; some `MonoView`-derived component could be added to the root of each composition of UI controls allowing for manual binding similar to this: ``` // ExampleView.cs public class ExampleView : MonoView { [SerializeField] private InputField _firstNameInputField; ... protected override void OnBind() { Bindings.Add(new Binding(_firstNameInputField, ""text"", ViewModel, ""FirstName"", BindingMode.TwoWay)); } } ``` Where the base classes look like this: ``` // MonoView.cs public abstract class MonoView : MonoBehaviour { public MonoView() { Bindings = new BindingCollection(); } protected BindingCollection Bindings { get; private set; } ... protected virtual void OnBind() { } protected virtual void OnUnbind() { // Properly disposes all bindings (unsubscribes from source/target objects). foreach (var binding in Bindings) { binding.Dispose(); } Bindings.Clear(); } } // MonoView{T}.cs public abstract class MonoView : MonoView where TViewModel : class { ... } ``` ## Designer Specified Bindings In addition to programmatic binding (like above) it would also be fairly straightforward to create a custom ""PropertyBinder"" `MonoBehaviour` component which could be added to UI controls to allow designers to make similar associations using just the Unity ""Inspector"" window. ``` +---------------------------------------------------------------------------+ | Property Bindings Component: | | +-------------------------------------------------[ Remove Binding ]--+ | | | ___________________________________________ | | | | Control Property: | text | \/ | | | | | ------------------------------------------- | | | | ___________________________________________ | | | | Data Context Property: | FirstName | \/ | | | | | ------------------------------------------- | | | +---------------------------------------------------------------------+ | | _________________________ | | | Add Another Binding | | | ------------------------- | +---------------------------------------------------------------------------+ ``` ## Bindings properly disposed when removed/cleared from the `Bindings` collection When the view is unbound from the data context all `Bindings` would be properly disposed allowing the view to be reused and bound to another view model. # Closing Words I'm sure that you folks have probably already got something like this planned; but I wanted to post this feature request just in case it isn't on the roadmap :) " 3113 area-System.Net Porting System.Net.Security Missing issues for TODO comments. Will create the tracking issue and update the code, author (dotnetbot) and reference the tracking issue. @davidsh @bartonjs @pgavlin @stephentoub @SidharthNabar PTAL. 3114 area-System.Net Tracking items for System.Net.Security This issue is tracking TODOs and Shims removal for PR #3113: - [ ] Replace Interop.Secur32 names with OS names from the SDK (sspi.h and schannel.h) - [X] Replace the X509Certificate ctor shim as soon as it is available. - [X] Move _SSPIWrapper.cs OS specific classes to Interop.SSPI - [ ] Remove StreamAsyncHelper references and implement FixedSizeReader and SslState using TPL instead of APM. - [ ] _SslState.cs:1299: Within FinishWrite() the callback is called under `lock (this)`. We need to investigate if there is any chance of a deadlock. - [X] Remove SSLv2 support from SslStream. - [ ] Add new Cypher and Hashing algorithms to enums within the contract. - [ ] Split _SecuritySafeHandles.Windows.cs - [ ] In NativeSSPI: Unit/Functional test required to understand the intent and pin behavior between Desktop and CoreFX. > Decrypt checked qop != SECQOP_WRAP_NO_ENCRYPT. Sign used it. Verify just ignores it? - [ ] Replace all usage of ArrayList, Hashtable with appropriate modern collections. - [ ] Behavior impacting: check client certs for the client EKU within `private bool AcquireClientCredentials(ref byte[] thumbPrint)` - [ ] Replace the implementation of SpnDictionary with `Dictionary<>` or `ConcurrentDictionary<>`. - [X] Provide TPL Stream overrides for SslStream. (By #5541.) - [ ] Investigate ways to bring back the NetworkStream specific optimizations (`BeginMultipleWrite`, etc) - [ ] Move public parameter checks within their respective public methods. (See comments in #5541) - [ ] In `CompleteAuthToken` and `ApplyControlToken`: remove the extra allocation of a `CredHandle`; refactor the code to avoid duplication; remove the `AddRef` if the `refContext` was previously `null`. (See #11489) 3124 area-System.Net Content-Type getting set incorrectly in CurlHandler "This test passes on Windows but fails on Unix: ``` C# [Theory, MemberData(""PostServers"")] public async Task PostAsync_CallMethod_StreamContent(Uri remoteServer) { using (var handler = new HttpClientHandler()) using (var client = new HttpClient(handler)) { byte[] data = new byte[1234]; new Random(42).NextBytes(data); HttpContent content = new StreamContent(new MemoryStream(data)); HttpResponseMessage response = await client.PostAsync(remoteServer, content); Assert.Equal(HttpStatusCode.OK, response.StatusCode); string responseContent = await response.Content.ReadAsStringAsync(); Assert.Contains(Convert.ToBase64String(data), responseContent); } } ``` It looks like the Content-Type header is being set inappropriately. " 3126 area-System.Collections Circular buffer data structure As far as I know, there is no circular buffer implementation in .NET (https://en.wikipedia.org/wiki/Circular_buffer). Some simple implementations over an array or a Queue are discussed here, for instance: https://social.msdn.microsoft.com/forums/vstudio/en-US/416a2175-b05d-43b1-b99a-a01c56550dbe/circular-buffer-in-net 3128 area-Infrastructure Microsoft.CSharp fails to build when running MSBuild on Mono When using build.sh on Linux Microsoft.CSharp runs into some build issues. I am going to disable it for now and follow up with this issue. 3131 area-System.Net Fix for #3124. CurlHandler sets invalid content-type for POST requests libcurl defaults to a Content-Type:application/x-www-form-urlencoded for Post operations. This default behavior is inconsistent with dotnet API. Current PR fixes this issue by overriding the default value. 3133 area-System.Xml Investigate/Remove custom internal test frameworks There are a number of projects with their own internal test frameworks, that need to be investigated, and potentially removed in favor of xunit. To be clear, I'm not talking about projects with helper objects and methods (although some should be re-evaluated now that we're using xunit), I'm thinking of stuff like System.Xml.ReaderWriter.Tests (and its multiple constituent projects): ![image](https://cloud.githubusercontent.com/assets/5569508/9761804/e5ab2cb6-5739-11e5-8e2b-510d780c0e29.png) ...and if you'll notice, xunit isn't reporting the skipped tests, because it doesn't see them. Are those important? I really doubt reporting is turning those up. And hopefully fails percolate.... Some of these frameworks are pretty heavily entrenched in their host projects, and dismantling them would be a large-scale effort. The ones I'm aware of (can recall) at the moment are: - System.Collections - System.Threading.Tasks - System.Xml.ReaderWriter ...although there are undoubtedly more. 3134 area-Infrastructure System.ServiceProcess.ServiceController.Tests needs admin privleges... ...but the tests don't check for permission ahead of time/don't report that as a possible error. 3135 area-System.Diagnostics Support an optional exception handler in TelemetryListener/TelemetrySource "I've been playing around with the new `TelemetryListener`/`TelemetrySource` classes and have found them to be a great fit for a simple eventing pattern. However an unexpected impact on firing `WriteTelemetry` was that if a subscriber fails, no subsequent subscribers will have their `OnNext` method called. From reading the various comments - particularly @vancem's https://github.com/dotnet/corefx/pull/2932#issuecomment-134328582 - on the PR I understand that this stems from how RX approaches exceptions, yet in the case of telemetry and multi-cast events it seems like there will be many cases where one broken subscriber shouldn't bring the system down. Would it be possible to consider an overload to `WriteTelemetry` which looks like this: ``` c# public override void WriteTelemetry(string telemetryName, object arguments, Func exHandler) { for (TelemetrySubscription curSubscription = _subscriptions; curSubscription != null; curSubscription = curSubscription.Next) { try { curSubscription.Observer.OnNext(new KeyValuePair(telemetryName, arguments)); } catch (Exception ex) { if (!exHandler(ex)) { break; } } } } ``` This would then support calls that would allow the sender to pass a function that can evaluate for each exception if the calls should continue: ``` c# source.WriteTelemetry(""Send"", o, ex => !(ex is CatastrophicException) ); ``` Alternatively an approach could be considered that uses `AggregateException` that simply collects all exceptions and throws them collectively at the end. " 3136 area-System.Net TransferEncodingChunked not being set by CurlHandler for streams of unknown length "Exact same test as in #3124, but with a non-seekable stream instead of a seekable one, such that HttpClient can't access the stream's length: ``` C# [Theory, MemberData(""PostServers"")] public async Task PostAsync_CallMethod_UnknownLengthStreamContent(Uri remoteServer) { var handler = new HttpClientHandler(); using (var client = new HttpClient(handler)) { byte[] data = new byte[1234]; new Random(42).NextBytes(data); HttpContent content = new StreamContent(new NonSeekableMemoryStream(data)); HttpResponseMessage response = await client.PostAsync(remoteServer, content); Assert.Equal(HttpStatusCode.OK, response.StatusCode); string responseContent = await response.Content.ReadAsStringAsync(); Assert.Contains(Convert.ToBase64String(data), responseContent); } } private sealed class NonSeekableMemoryStream : MemoryStream { public NonSeekableMemoryStream(byte[] data) : base(data) { } public override bool CanSeek { get { return false; } } } ``` TransferEncodingChunked should be set to true in this case, but CurlHandler isn't doing so, such that the test passes on Windows but fails on Unix. " 3137 area-System.Net CurlHandler synchronously reads from request stream, blocking libcurl processing If the request message has a request content stream to send, libcurl retrieves that data via read callbacks done during its processing. These read callbacks are currently Read'ing from the content stream, which blocks the processing while the read is being completed. If the content stream is a memory stream, this is fine, as such reads will complete immediately. And even for some other stream types, like FileStream, the reads should complete quickly enough that there's no problem. But for streams that take a longer time, this can cause significant delays in CurlHandler's ability to process other pending HttpClient requests. It can also lead to deadlock if the request stream for one request is being fed by the response stream of another request being processed by the same handler. 3138 area-System.Net Avoid blocking CurlHandler read callback PR #3105 addressed the issue we were facing with libcurl and the write callback used when libcurl has response body data available. We were blocking libcurl's callback until a reader was available to consume the data, resulting in both significant scalability issues as well as the potential for easy deadlock. This was fixed by making the whole operation async via libcurl's ability to pause connections. The same issue exists for libcurl's read callback, used by libcurl to read data from the request stream to send as part of the request. The issue here isn't as impactful as on the write side, because a) a common case has no request stream or has a MemoryStream that serves up its data immediately, and b) other streams (e.g. FileStream) typically serve their data quickly even if blocking is involved and don't interact with the HttpClient in a way that could lead to deadlock. However, it's still an issue, and it's still possible to construct cases where deadlock is possible, e.g. if the output stream of one request is used as the input stream of another request associated with the same libcurl multi handle. This commit addresses the read callback case by relying on the same pause mechanism used for the write callback. When libcurl requests data, if the source is a memory stream, we just do the read and hand back the data. Otherwise, we issue a ReadAsync on the stream. If the operation completes immediately, we synchronously hand the data back to libcurl, storing any extra beyond what libcurl asked for. If the operation didn't complete immediately, we store it for later, and pause the connection, requesting an unpause when the read operation completes. Subsequent read requests from libcurl first try to be satisfied from any previous ReadAsync with data remaining. As part of this, I also removed the pause state tracking I'd previously added. In my previous PR as part of adding support for pausing, I added a field to EasyRequest to attempt to mirror the current paused state as known by libcurl. This was done to try to avoid requesting unpausing in cases where we'd like to be unpaused but have already requested it. However, this appears to have been premature optimization, as the case is relatively rare, the overheads relatively low for processing the extra request, and it causes additional headaches once we're able to pause sending/receiving individually. I added several tests for different kinds of streams. This required fixing #3136, which was preventing any data from being sent from non-seekable request streams. Fixes #3136 Fixes #3137 cc: @vijaykota, @kapilash, @davidsh, @pgavlin, @CIPop 3140 area-Meta Turn on CheckForOverflowUnderflow on all projects in Debug Right now, only System.Reflection.Metadata has CheckForOverflowUnderflow on in Debug. I think there's value in doing this across the board. Expressions that are allowed to overflow by design should be explicitly marked `unchecked`. cc @weshaggard @stephentoub 3141 area-System.Linq Expression interpreter - AddOvf does not throw OverflowException In AddInstruction.cs, the following code `(Int16)checked((Int16)l + (Int16)r)` seems to be wrong and should be `checked((Int16)((Int16)l + (Int16)r))` instead. Repro: `Expression.Lambda( Expression.AddChecked( Expression.Constant(Int16.MinValue), Expression.Constant(Int16.MinValue) ) ).Compile().DynamicInvoke()` throws TargetInvocationException with an OverflowException when using the compiler. When using the interpreter, it succeeds. 3144 area-System.Net Remove references to TaskAPMExtensions in System.Net tests Remove Common\tests\System.Net\TaskAPMExtensions.cs and rewrite tests using TPL instead. 3147 area-System.Linq Expression interpreter - NewArrayBounds does not throw OverflowException Consider the following fragment: `Expression.Lambda(Expression.NewArrayBounds(typeof(int), Expression.Constant(0), Expression.Constant(-1))).Compile().DynamicInvoke()` With the expression compiler, this throws OverflowException. With the expression interpreter, the call to Array.CreateInstance results in an ArgumentOutOfRangeException. 3149 area-System.Linq Expression compiler - Inconsistency with language specification Section 7.9 of the C# language specification describes the number of bits to shift. It looks like this rule is not honored by the expression compiler which omits the `and` instruction to perform the mask, prior to performing the `shl` or `shr` instruction. The following repros the discrepancy: Expression<Func<long?, int?, long?>> e = (x, y) => x << y; Func<long?, int?, long?> f = (x, y) => x << y; Func<long?, int?, long?> g = e.Compile(); var c = f(-9223372036854775808, -2147483648); var d = g(-9223372036854775808, -2147483648); Console.WriteLine(c); Console.WriteLine(d); Note that the implementation of the expression interpreter relies on C# compiled code fragments for << and >>, so this will cause a different result for .Compile() between frameworks that use the expression compiler versus those that use the interpreter. 3150 area-Infrastructure Cannot build System.Collections.Concurrent.Tests in Visual Studio 2015 I get the following error: ``` xunit.abstractions 2.0.0 is not compatible with DNXCore,Version=v5.0. ``` Any suggestions or work-around? 3151 area-System.Net CurlHandler supports only ClientCertificateOption.Manual Today CurlHandler supports only clientCertificateOption.Manual. Now with the availability of cross platform X509Store, CurlHandler must support ClientCertificateOption.Automatic as well. 3153 area-System.Net Could CurlHandler support UNIX sockets? There is support in `libcurl` for using UNIX sockets instead of TCP (http://curl.haxx.se/libcurl/c/CURLOPT_UNIX_SOCKET_PATH.html). In a microservice world, this capability is very useful for communication between discrete services on a single server, reducing the overhead of TCP sockets and improving performance. As a precedent, the Kestrel HTTP server now supports UNIX sockets, which Nginx can consume when reverse-proxying (see https://github.com/aspnet/KestrelHttpServer/pull/157). I took a quick look to see if I could implement this, but there doesn't seem to be a point where a socket file path could be added in, so I opted for starting a discussion instead. :open_mouth: 3156 area-System.IO Can we determine if a FileSystem is case sensitive or not through an API? I'm exploring the possibility of making our cross-platform file globbing to determine if it acts as case sensitive or not based on current file system. It can't be determined just by the current operating system since case insensitive file system can still be mounted on Linux/Unix/Darwin. Is there an API can help to determine if a file system at given path is case sensitive. 3163 area-System.Net Replace TRAVE to TRACE_VERBOSE throughout the code. **Workitem:** 1. Ensure that all instances of `TRAVE` are replaced by `TRACE_VERBOSE` throughout the code base. 2. Ensure that no other name is used to enable verbose tracing. (If others exist, they should be replaced by `TRACE_VERBOSE`.) --- **Initial Design Discussion**: In System.Net code we have debug-only verbose tracing guarded by a variable named `TRAVE` (TRAce VErbose). The following have been brought up during PRs for this code: 1. Standardize a single such name across corefx 2. Change the name (seems like a typo) Please add your suggestions and then convert this to a code issue to track changes across the entire repo. 3172 area-Meta Standardize flags declarations in native shims We have a mix of raw integers and casting scoped enums right now. See https://github.com/dotnet/corefx/pull/3142#issuecomment-139330591: A general comment on raw integers vs. enum's on C++ side for flags. I've been doing the latter based on my recollection that storing a value that is not any one of the enum members is unspecified or undefined in standard C++. However, I'm no longer sure after looking at recent edits on cppreference.com: http://en.cppreference.com/mwiki/index.php?title=cpp/language/static_cast&diff=78871&oldid=74481 My understanding was on the LHS of that diff. I don't know yet if the edits reflect errata on the site matching my own misunderstanding or just updates tracking the next version of the standard. Even if it is well defined, it requires a lot of ugly casting, which kind of eliminates the benefit of strong typing. It's not apparent in this change because your flags come in from C# with the right values, but once you have to twiddle the bits, e.g. ConvertOpenFlags, it gets messy. Assuming it is in fact well defined, we could have a macro to define bitwise operators on what we deem Flags enums. This would serve double-duty as documentation to C# caller to add [Flags]. I'm fine leaving this for a later change, but this is something we should standardize one way or the other. 3178 area-System.Net Redirect handling for cookies and creds This fix realigns CurlHandler with WinHttpHandler w.r.t Redirect handling. When redirect is detected, we clear the credentials if the credentials were originally provided as NetworkCredentials Otherwise we use the forwarding URI to get the new set of credentials. Like wise, in case of redirects, we get the cookies again from the cookieContainer In addition, this commit also collects the cookies from the response header 3179 area-System.Runtime Enhance Guid type with implicit type conversions to useful primitive types "Currently, Guid feels a little bit left out. While other built-in types have implicit type convertions, or support from Convert, Guid have it's own ""bastion"" of methods and converters, and is a source of confusion for new developers. Is there any particual reasons (except historical) that Guid should not be part of built-in types and have a implicit convertion (from bytes or string)? " 3180 area-Serialization XmlSerializationWriter not visible "I get the following error: DNXCore,Version=v5.0 error CS0234: The type or namespace name 'XmlSerializationWriter' does not exist in the namespace 'System.Xml.Serialization' (are you missing an assembly reference?) Program.cs: ``` using System; namespace XmlSerializationWriterTest { public class Program { public void Main(string[] args) { System.Xml.Serialization.XmlSerializationWriter writer = (System.Xml.Serialization.XmlSerializationWriter)(new Object()); } } } ``` project.json: ``` { ""dependencies"": { }, ""frameworks"": { ""dnxcore50"": { ""dependencies"": { ""System.Xml.XmlSerializer"": ""4.0.10"" } } } } ``` The code of XmlSerializationWriter is here: https://github.com/dotnet/corefx/blob/41e203011152581a6c65bb81ac44ec037140c1bb/src/System.Xml.XmlSerializer/src/System/Xml/Serialization/XmlSerializationWriter.cs " 3183 area-System.Data Use modern data structures and array APIs for SqlClient SqlClient in its current state has code that has been around since a long time. The usage of data structures like HashTable should be migrated to Dictionary There are some array operations which are being done manually and can be migrated to Array APIs 3184 area-System.Data Update Interop Code in SqlClient to follow guidelines Based on PR https://github.com/dotnet/corefx/pull/2986 address the interop related comments. 3185 area-System.Net Add System.Net.Http.CurlHandler HttpClient is implemented as a sort-of plug-in model, where you provide to it a “handler” that actually does the heavy lifting. There’s a default HttpClientHandler type, which on Windows is implemented around winhttp and on Unix is implemented around libcurl. HttpClientHandler only exposes core knobs that are expected to be common across all possible implementations, but the underlying implementations often provide more functionality. So on Windows, we also have System.Net.Http.WinHttpHandler (a class in its own separate assembly), which is the same handler used by default on Windows under HttpClientHandler, but which as a public type exposes additional knobs for developers to configure, e.g. timeouts on individual portions of a request/response rather than for the all-up operation. There are such knobs we’d like to be able to configure with libcurl, e.g. targeting a UNIX domain socket as a proxy, but for which we’d need to expose CurlHandler publically in order to provide the right additional surface area. 3186 area-System.IO Add System.IO.FileSystem.Unix There are a bunch of common Unix file system constructs that we have no public surface area in .NET to control or interact with. For example, Unix permissions are a very common need for users/devs to interact with, but we don’t provide any surface area for getting (stat) or setting (chmod) these. We don’t provide surface area for changing ownership (chown), for creating symlinks (symlink) or hard links (link), etc. Devs can P/Invoke to these, but it’d be nice to have surface area for it to avoid devs needing to do that, especially given that some of these are impractical to P/Invoke to in any common way across Unix systems, e.g. the struct used by stat changes in both layout and size based on which distro/version you’re targeting, which is one of the many reasons we’ve moved away from direct P/Invokes to libc and instead have a think native shim. As a comparison, Mono has a library called Mono.Posix that provides essentially 1:1 wrappers between directly callable C# functions and the underlying POSIX functions they wrap. 3187 area-System.Security Add System.Security.Principal.Unix We provide the Windows-only System.Security.Principal.Windows.dll on Windows, which brings with it WindowsIdentity and WindowsPrincipal. We don’t currently have corresponding types for UnixIdentity and UnixPrincipal. This would support getting the current user/group, setting the effective user/group (kind of like Windows impersonation), looking up information about the user, etc. 3188 area-System.IO Add System.IO.Signals.Unix Signals are a ubiquitous mechanism across Unix systems for interactions between processes and the kernel. The only API we currently have for sending any signal is Process.Kill(), which sends a SIGKILL signal, but to write robust Unix applications (and services) you likely want to be able to both send signals and handle specific signals. The former can be done by a dev using a P/Invoke, but the latter would really require libcoreclr support to do correctly, especially since the runtime itself already hooks certain signals (e.g. a SIGINT signal sent by ctrl-C, which we then subscribe to the runtime for in Console.CancelEventHandler). 3189 area-Meta Add System.Configuration.Unix There’s a lot of Unix configuration information that apps could benefit from being able to read (e.g. sysconf, pathconf, ulimit, etc.) and potentially modify. Potentially support for parsing/outputting Unix configuration files as well. 3190 area-System.Net RemoteCertificateValidationCallback for HttpWebRequest The current implementation of HttpWebRequest in .Net 4.6 lacks RemoteCertificateValidationCallback similar to that of SslStream class. This makes mutual authentication impossible, especially when client becomes aware of mutual authentication enforced by server only after SSL handshake has been initiated. Currently all certificate callbacks for HttpWebRequest is managed by ServicePointManager class, I request to include this feature in corefx releases. Please see [this question](http://stackoverflow.com/questions/9294433/how-to-detect-client-certificate-authentication-request-in-httpwebrequest) in SO. 3199 area-System.Net Reduce allocations when parsing response headers in WinHttpHandler "There are currently many unnecessary allocations when creating the response message in `WinHttpHandler`. The native `WinHttpQueryHeaders` function is called a few times to retrieve response information, such as the version string, reason phrase, and raw headers. Each call to `WinHttpQueryHeaders` currently results in 3 allocations (9 total for the 3 calls): 1. The `StringBuilder` buffer passed to the native function to be filled in. 2. The `char[]` inside the `StringBuilder`. 3. The `string` allocated when `StringBuilder.ToString()` is called. On platforms that need to do manual decompression (lower than Win 8.1), there's another 2-3 allocations to get the Content-Encoding header value. We can reduce the allocations by 1) modifying the p/invoke signature for `WinHttpQueryHeaders` to take a `char[]` instead of `StringBuilder` and 2) allocate a single `char[]` large enough to be reused across multiple calls to `WinHttpQueryHeaders`. With those changes, 9 allocations are down to 2: an allocation for the raw headers `char[]` and another for the reason phrase `string`. There are many common reason phrases, such as ""OK"" for a 200 status code, or ""Not Found"" for a 404 status code. There's already internal code in `HttpStatusDescription` for looking up a known reason phrase string based on the status code, and we can make use of this existing code to avoid the reason phrase string allocation if the reason phrase `char[]` array segment is equal to a known reason phrase. 9 allocations down to 1, for common reason phrases. When parsing the raw headers, the current code is using `string.Split` to split the raw headers by lines separated by `""\r\n""`. There are a bunch of unnecessary allocations associated with the use of `string.split`: internally `string.Split` allocates two arrays to keep track of the indexes and separator sizes, there's the overall array returned from `Split`, plus each string in the array representing each line. Each line then needs to be split further to get the header name and value for each line. The header value was also being trimmed with `string.Trim`, another potential allocation. Also, the first line of the raw headers is the status line, which is being allocated as a `string` even though this line is currently being skipped. All of these intermediate allocations can be avoided by parsing the `char[]` directly, and only allocating `string`s for the individual header names and values. And we can avoid `string` allocations for known header names and values, similar to the known reason phrase optimization. Notes: - `HttpKnownHeaderNames.TryGetHeaderName` is looking up all known header name constants, which include both request and response headers, while we only really care about response headers. My opinion is that this is OK. I think it's easier to maintain the lookup of known headers if it is just looking up all known headers, instead of trying to segregate which ones are only response headers. - `HttpKnownHeaderNames.TryGetHeaderName` is currently doing an ordinal lookup. Header names are case insensitive, so I'd be open to changing this to do an case insensitive lookup. I kept it ordinal so the string remains the exact same as the response string from WinHTTP. However, it looks like WinHTTP normalizes the casing of headers it knows about (e.g. WinHTTP returns `""Content-Length""` when the actual server response is `""content-length""`), so maybe switching to case insensitive lookup isn't a big deal. - The PR is broken up into multiple commits to make it easier to review. The earlier commits are mostly just adding helpers and tests, and moving some of the internal files to `Common` (e.g. `HttpStatusDescription`). I can squash some of the commits together, if desired. - There are still a bunch of allocations associated with how headers are enumerated and stored internally on each request/response in `HttpClient` that I'm looking into improving in a separate PR. " 3205 area-System.Net Corefx HttpClientHandler CookieContainer property deviates from Desktop During the PR for #3178 , it was discovered that the `HttpClientHandler` of corefx deviates from desktop .Net version w.r.t the setter for `CookieContainer` property. Setting a `null` value results in an exception in the desktop version. In case of corefx, it results in an error during `SendAsync`. 3206 area-Infrastructure How to run Unit tests on Windows run on 32-bit CoreCLR? Is it possible to run corefx tests on 32 bit CoreCLR? After building corefx, I opened a corefx solution and changed `platform target``to``x86`` but it doesn't work. 3207 area-System.Security PFX certificates are not well-ordered across implementations Similar to issues #2743 and #2745, the fix would be to not use the `PKCS12_parse` and `PKCS12_create` helper functions, but to get into the nitty-gritty with PKCS12 primitives. This manifests as both writing order and reading order, to be consistent across Windows, Linux, and OSX. 3213 area-System.Net IPAddressParsing.ParseIPv6_ScopeId_Success failing on OS X ``` Assert.Equal() Failure ↓ (pos 7) Expected: fe08::1%13542 Actual: fe08::1 ↑ (pos 7) +++++++++++++++++++ STACK TRACE: at System.Net.Primitives.Functional.Tests.IPAddressParsing.ParseIPv6_ScopeId_Success() ``` 3215 area-System.IO Two FileSystemWatcher tests failing on OS X ``` 09:22:39 CreatedTests.FileSystemWatcher_Created_WatcherDoesntFollowSymLinkToFile [FAIL] 09:22:39 Didn't observe a symlink created event within 30000ms 09:22:39 Expected: True 09:22:39 Actual: False 09:22:39 Stack Trace: 09:22:39 at Utility.ExpectEvent(WaitHandle eventOccured, String eventName, Int32 timeout) 09:22:39 at CreatedTests.FileSystemWatcher_Created_WatcherDoesntFollowSymLinkToFile() 09:22:44 MoveFileTests.Unix_File_Move_In_Nested_Directory_Triggers_Event(eventType: Changed, moveRaisesEvent: False) [FAIL] 09:22:44 Should not observe a Changed event within 500ms 09:22:44 Expected: False 09:22:44 Actual: True 09:22:44 Stack Trace: 09:22:44 at Utility.ExpectNoEvent(WaitHandle eventOccured, String eventName, Int32 timeout) 09:22:44 at MoveFileTests.<>c__DisplayClass1.b__0(AutoResetEvent eventOccured, TemporaryTestDirectory ttd) 09:22:44 at Utility.TestNestedDirectoriesHelper(WatcherChangeTypes change, Action`2 action, NotifyFilters changeFilers) 09:22:44 at MoveFileTests.MoveAndCheck_NestedDirectory(WatcherChangeTypes eventType, Boolean moveRaisesEvent) 09:22:44 at MoveFileTests.Unix_File_Move_In_Nested_Directory_Triggers_Event(WatcherChangeTypes eventType, Boolean moveRaisesEvent) ``` cc: @sokket 3218 area-System.Net NameResolutionPalTests.GetHostByName_HostName test failing on OS X in CI The failure didn't repro for me locally, but it's happening consistently in the CI build: http://dotnet-ci.cloudapp.net/job/dotnet_corefx_mac_debug_tst/25/console ``` System.Net.NameResolution.PalTests.NameResolutionPalTests.GetHostByName_HostName [FAIL] 22:46:36 System.ArgumentOutOfRangeException : Specified argument was out of the range of valid values. 22:46:36 Parameter name: newAddress 22:46:36 Stack Trace: 22:46:36 at System.Net.IPAddress..ctor(Int64 newAddress) 22:46:36 at System.Net.NameResolutionPal.CreateHostEntry(hostent* hostent) 22:46:36 at System.Net.NameResolutionPal.GetHostByName(String hostName) 22:46:36 at System.Net.NameResolution.PalTests.NameResolutionPalTests.GetHostByName_HostName() ``` 3219 area-System.Net Disable GetHostByName_HostName test failing on OSX #3218 3224 area-System.Linq Expression compiler - Y combinator issue "The following fails to compile correctly: Expression f = Expression.Lambda(Expression.Empty(), Expression.Parameter(typeof(X))); var a = Expression.Lambda(Expression.Invoke(f, f)); var m = typ.DefineMethod(""A"", MethodAttributes.Public | MethodAttributes.Static); a.CompileToMethod(m); where X is defined as: public delegate void X(X a); The object identity of 'f' used in the invocation expression seems the culprit due to some caching in the lambda compiler. " 3225 area-System.Security Investigate if Unix X509Chain.Build has the same truth table as Windows On Unix it seems to be returning false for any validation errors, and on Windows it might be more nuanced. 3226 area-System.Security Investigate if Unix and Windows X509Chains treat root certs in ExtraStore the same "Right now I think Unix says ""you told me about it, clearly it's trusted"" and Windows says ""it wasn't in one of the trust stores, it isn't trusted"". So the Unix version needs to be less trusting. But this behavior is currently unconfirmed. " 3232 area-System.Security Unix OpenSsl-based CryptographicExceptions should set both Message and HResult Currently only Message is set, making it hard to reason about the error (in cases where it makes sense to do so). This is the Unix half of #3062. 3233 area-System.Security Windows CNG/CAPI-based CryptographicExceptions should set both Message and HResult "In CoreFx the library that CryptographicException is in is platform agnostic, so it doesn't load a code for the int-only constructor. In debug builds the message should be of the form (`""(0x{0:X8}) {1}"", hr, Interop.mincore.GetMessage(hr))`; later that might change to all builds if we really like it. This is the Windows half of #3062. " 3239 area-System.IO Fixed OSX file creation time format FileInfo.CreationTime on OSX was returning a correctly timed but incorrectly formatted DateTime. This commit fixes this issue and adds coverage to a existing test to fill the test gap that let the issue through. 3243 area-System.Globalization Some tests failing due to changes in Globalization data We need to pay down some test debt here. There are a lot of places where we hard code expected values for tests which can change depending on the underlying OS which provides the data. We should figure out the right way to detect what OS we are on so we can provide the correct expected data. 3244 area-System.Linq Consider having expression interpreter available in all build flavors For some of our Bing service, we often run into the case where expression compilation is too expense, either because it's on a request/response path, or because it's statically known that the expression is small and will be evaluated only once. I can provide more details on such scenarios if needed. Unfortunately, expression interpretation is a property of the .NET build flavor, e.g. for .NET Native the Compile method uses the interpreter. It'd be nice to have an Interpret method alongside Compile to enable those scenarios. It'd also help a lot in writing parity tests for the expression compiler and interpreter because their outcomes can be cross-checked. 3245 area-System.Linq Add N-ary internal specializations for InvocationExpression "In Bing, we use an expression normal form whereby method call expressions etc. get erased for invocation expressions of an unbound parameter, e.g.: Expression.Call(where, xs, filter) becomes Expression.Invoke(Expression.Parameter(typeof(...), ""where""), xs, filter) This is done to decouple client libraries and service libraries through erasure of MemberInfo objects. The service uses a binder to bind the unbound parameter expression to a service-side definition and beta-reduces the invocation of the (lambda-based) definition. A lot of those invocation expressions have 0, 1, 2, 3 arguments. However, unlike MethodCallExpression, InvocationExpression has no N-ary specializations that help to reduce memory. The proposal is to add such specializations to conserve memory. " 3248 area-System.Net Setting HttpWebRequest.AutomaticDecompression When I look at the source of HttpWebRequest I see that the AutomaticDecompression property of the HttpClientHandler is forced to `DecompressionMethods.None` ([line 373](https://github.com/dotnet/corefx/blob/07f8c0fe64ac44bedced873181d6832bc2afcc50/src/System.Net.Requests/src/System/Net/HttpWebRequest.cs)). How do I set it properly? In the past we could simply do this: `request.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;` 3249 area-System.Runtime Add a monotonic clock to the framework "**Problem:** Many BCL components use `DateTime.UtcNow` to compute timeouts and time deltas. When you run a ""Find Usages"" on `DateTime.UtcNow` in .NET Framework assemblies a lot of usage sites come to light. For example, in ADO.NET, transactions, caches, WebRequest, remoting, WCF, SignalR, security. **All of these usages are bugs** because the current system time can change significantly forwards and backwards at any time. This means that in case the system clock is changed many .NET components will spuriously fail. Common symptoms would be timeouts firing to early or too late (possibly never). Perf counters also might show too high or negative values. Sample scenario: 1. The system clock spuriously jumps forward due to misconfiguration by years. 2. A cache item is added. 3. The clock is fixed. Then, the cache item will essentially stay around forever if eviction is based on `DateTime.UtcNow`. I believe this bug exists in the BCL. User code also has the same problems. **Solution:** Add some kind of monotonic clock to the BCL. The main property of such a clock would be that its time advances linearly. It should never jump when the system clock changes. It should not exhibit split second jumps. It should behave reasonably in case the system sleeps or hibernates or in case the VM is paused. This monotonic clock class should be fast and convenient to use so that it is a no-brainer to switch all `DateTime.UtcNow` usages over to the new model. Maybe we can add `Environment.TickCount64` as well. `Environment.TickCount64` alone would not be good enough because it is awkward to use. I'm not sure if `Stopwatch` would cover all these requirements. It is a reference type which might be too heavy for hot code path in the BCL. Maybe we can add a new value type that is made exactly for this purpose. A sketch: ``` struct MonotonicTime { long Ticks; MonotonicTime operator + (MonotonicTime, TimeSpan); TimeSpan operator - (MonotonicTime, MonotonicTime); bool IsNegative; static MonotonicTime Current; ... } ``` To summarize, I request: 1. The framework timeouts should be fixed. (The TPL bugs apparently are already fixed. I reported these a while ago.) 2. Add `Environment.TickCount64`. 3. Provide a convenient, high-performance monotonic clock. " 3253 area-System.IO Support for tar archives Right now corefx supports zip files as well as gz files. Would it be hard to get it to support tar files as well for compatibility with the other OS's who package files as tgz very often? A C# implementation already exists at https://code.google.com/p/tar-cs/ and could be used either as a guideline or directly imported. If this is something that is desired I could work on designing an API, but it shouldn't be hard to visualize how it might look like. 3256 area-System.Net WinHttpWebSocketState is leaking a GCHandle System.Net.WebSockets.Client.WinHttpWebSocketState allocates a GCHandle in the constructor with this code: ``` c# private GCHandle _operationHandle = new GCHandle(); public WinHttpWebSocketState() { _operationHandle = GCHandle.Alloc(this); } ``` But if never calls Free() on the GCHandle. Normally, you need code like this to free the handle: ``` c# if (_operationHandle.IsAllocated) { _operationHandle.Free(); } ``` 3260 area-System.Console System.Console.Is[Input|Output]Redirected is not available in CoreFX IsInputRedirected and IsOutputRedirected properties are not available in System.Console 3262 area-System.Numerics Vector tests failing on one of my machines "On my local machine I doing a default build.cmd which builds x64 debug I keep getting the below failures. If it helps these pass on my other machine and the machine they fail on has the following processor: ""Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz, 3601 Mhz, 4 Core(s), 8 Logical Processor(s)"" cc @mellinoe @CarolEidt System.Numerics.Tests.Vector3Tests.Vector3CopyToTest [FAIL](TaskId:163) Assert.Throws() Failure (TaskId:163) Expected: typeof(System.ArgumentOutOfRangeException) (TaskId:163) Actual: typeof(System.NullReferenceException): Object reference not set to an instance of an object. (TaskId:163) Stack Trace: (TaskId:163) D:\git\corefx\src\System.Numerics.Vectors\tests\Vector3Tests.cs(28,0): at System.Numerics.Tests.Vector3Tests.<>c__DisplayClass1_0.b__1() (TaskId:163) System.Numerics.Tests.Vector4Tests.Vector4CopyToTest [FAIL](TaskId:163) Assert.Throws() Failure (TaskId:163) Expected: typeof(System.ArgumentOutOfRangeException) (TaskId:163) Actual: typeof(System.NullReferenceException): Object reference not set to an instance of an object. (TaskId:163) Stack Trace: (TaskId:163) D:\git\corefx\src\System.Numerics.Vectors\tests\Vector4Tests.cs(28,0): at System.Numerics.Tests.Vector4Tests.<>c__DisplayClass1_0.b__1() (TaskId:163) System.Numerics.Tests.Vector2Tests.Vector2CopyToTest [FAIL](TaskId:163) Assert.Throws() Failure (TaskId:163) Expected: typeof(System.ArgumentOutOfRangeException) (TaskId:163) Actual: typeof(System.NullReferenceException): Object reference not set to an instance of an object. (TaskId:163) Stack Trace: (TaskId:163) D:\git\corefx\src\System.Numerics.Vectors\tests\Vector2Tests.cs(28,0): at System.Numerics.Tests.Vector2Tests.<>c__DisplayClass1_0.b__1() (TaskId:163) System.Numerics.Tests.GenericVectorTests.GreaterThanOrEqualAnySByte [FAIL](TaskId:163) Assert.False() Failure (TaskId:163) Expected: False (TaskId:163) Actual: True (TaskId:163) Stack Trace: (TaskId:163) D:\git\corefx\src\System.Numerics.Vectors\tests\GenericVectorTests.cs(1248,0): at System.Numerics.Tests.GenericVectorTests.TestVectorGreaterThanOrEqualAny[T]() (TaskId:163) D:\git\corefx\src\System.Numerics.Vectors\tests\GenericVectorTests.cs(1204,0): at System.Numerics.Tests.GenericVectorTests.GreaterThanOrEqualAnySByte() (TaskId:163) System.Numerics.Tests.GenericVectorTests.GreaterThanOrEqualAllSByte [FAIL](TaskId:163) Assert.True() Failure (TaskId:163) Expected: True (TaskId:163) Actual: False (TaskId:163) Stack Trace: (TaskId:163) D:\git\corefx\src\System.Numerics.Vectors\tests\GenericVectorTests.cs(1300,0): at System.Numerics.Tests.GenericVectorTests.TestVectorGreaterThanOrEqualAll[T]() (TaskId:163) D:\git\corefx\src\System.Numerics.Vectors\tests\GenericVectorTests.cs(1259,0): at System.Numerics.Tests.GenericVectorTests.GreaterThanOrEqualAllSByte() (TaskId:163) System.Numerics.Tests.GenericVectorTests.CopyToByte [FAIL](TaskId:163) Assert.Throws() Failure (TaskId:163) Expected: typeof(System.ArgumentOutOfRangeException) (TaskId:163) Actual: typeof(System.NullReferenceException): Object reference not set to an instance of an object. (TaskId:163) Stack Trace: (TaskId:163) D:\git\corefx\src\System.Numerics.Vectors\tests\GenericVectorTests.cs(311,0): at System.Numerics.Tests.GenericVectorTests.<>c__DisplayClass100_0`1.b__1() (TaskId:163) System.Numerics.Tests.GenericVectorTests.CopyToSByte [FAIL] (TaskId:163) Assert.Throws() Failure (TaskId:163) Expected: typeof(System.ArgumentOutOfRangeException) (TaskId:163) Actual: typeof(System.NullReferenceException): Object reference not set to an instance of an object. (TaskId:163) Stack Trace: (TaskId:163) D:\git\corefx\src\System.Numerics.Vectors\tests\GenericVectorTests.cs(311,0): at System.Numerics.Tests.GenericVectorTests.<>c__DisplayClass100_0`1.b__1() (TaskId:163) System.Numerics.Tests.GenericVectorTests.CopyToUInt16 [FAIL](TaskId:163) Assert.Throws() Failure (TaskId:163) Expected: typeof(System.ArgumentOutOfRangeException) (TaskId:163) Actual: typeof(System.NullReferenceException): Object reference not set to an instance of an object. (TaskId:163) Stack Trace: (TaskId:163) D:\git\corefx\src\System.Numerics.Vectors\tests\GenericVectorTests.cs(311,0): at System.Numerics.Tests.GenericVectorTests.<>c__DisplayClass100_0`1.b__1() (TaskId:163) System.Numerics.Tests.GenericVectorTests.CopyToInt16 [FAIL](TaskId:163) Assert.Throws() Failure (TaskId:163) Expected: typeof(System.ArgumentOutOfRangeException) (TaskId:163) " 3266 area-System.Linq Use optimized N-ary MethodCallExpression nodes from all Call factories "Unlike Expression.Block, the overloads of Expression.Call that take in an Expression[] or IEnumerable do not attempt to check the number of supplied arguments in order to instantiate more compact expression representations than the standard [Instance]MethodCallExpressionN nodes. The language binds to the Expression[] overload. Various tools on our end, such as expression deserializers, also dispatch through the IEnumerable overload. It'd be good for those factories to analyze the number of supplied arguments and use compact representations if available. Also, [Instance]MethodCallExpression0 nodes are missing, even though it's quite common to have such expressions (e.g. ToString). Those could be added as part of this. Note that - in addition to this - it may be possible for the language compilers to check for the N-ary factory method overloads and bind to more specialized overloads when it finds them in the corefx libraries it's compiling against (much like other places where the compiler uses ""feature detection""). This would avoid the Expression[] allocation when it's not needed, therefore reducing some allocation costs. " 3268 area-System.Net CurlHandler : Ensure SendAsync cannot be called twice for the same request Originally discovered during the PR, ensure that CurlHandler's SendAsync cannot be called on the same HttpRequestMessage more than once. HttpClient's `SendAsync` already ensures that. We may need similar guarantee in `CurlHandler` as well. 3269 area-System.Net CurlHandler statusCode parsing - Error cases CurlHandler does StatusCode parsing in the http response message. Verify that CurlHandler behavior is identical to WinHttpHandler in case of negative scenarios. CurlHandler throws parse exception if status code in the Http response is not a valid status code. 3275 area-System.Collections Add a way to start enumeration of SortedSet and SortedDictionary in the middle I'd like an efficient way to start enumeration of a sorted collection (in particular `SortedSet` and `SortedDictionary`) at a specified value. This should work even if the value is not part of the collection. **Why is it useful?** Such a feature would be useful for many things. For example: - Finding all elements in an interval. - Finding the closest element to an item in the set - With a properly chosen comparer prefixes sort immediately before their extensions. So this could be used to find the longest prefix that's in the collection. - Could be used to map from a continuous variable (e.g. time) to a value. For example if a system can either be `on` or `off` at a particular time, one could put the switching evens in a `SortedDictionary` and then query it to figure out if the system was `on` at a particular time. - You could save the current element, mutate the collection (invalidating existing enumerators) and then create a new iterator starting at that element. **Different approaches** One way to implement this feature is having a pair of functions that return an enumerable starting at a particular point in the collection. I'm not sure what the name should be, possible choices include `UpwardsFrom`/`DownwardsFrom`, `From`/`ReverseFrom`, `ForwardsFrom`/`BackwardsFrom`. An alternative approach would be extending `SortedSet.Enumerator` adding a public constructor that takes a start element and a flag for backward iteration, but I don't like that overly low level approach. **A concrete API suggestion** on `SortedSet` ``` public IEnumerable UpwardsFrom(T start); public IEnumerable DownwardsFrom(T start); ``` on `SortedDictionary` ``` public IEnumerable> UpwardsFrom(TKey start); public IEnumerable> DownwardsFrom(TKey start); ``` and optionally on `SortedDictionary.KeyCollection` ``` public IEnumerable UpwardsFrom(TKey start); public IEnumerable DownwardsFrom(TKey start); ``` **Test cases** ``` var sortedSet = new SortedSet{1, 3, 5}; sortedSet.UpwardsFrom(2) // [3, 5] sortedSet.UpwardsFrom(3) // [3, 5] sortedSet.UpwardsFrom(6) // [] sortedSet.DownwardsFrom(4) // [3, 1] sortedSet.DownwardsFrom(3) // [3, 1] sortedSet.DownwardsFrom(0) // [] ``` **Demo implementation** Their behaviour would match the following extension methods, but would avoid the linear scan for the first match: ``` public static IEnumerable UpwardsFrom(this SortedSet sortedSet, T start) { var comparer = sortedSet.Comparer; return sortedSet.SkipWhile(item => comparer.Compare(item, start) < 0); } public static IEnumerable DownwardsFrom(this SortedSet sortedSet, T start) { var comparer = sortedSet.Comparer; return sortedSet.Reverse().SkipWhile(item => comparer.Compare(item, start) > 0); } ``` 3278 area-System.IO Fixed test bug with FileInfo_GetSetTimes resolves #3272 3281 area-System.Diagnostics ProcessTests.TestWorkingSet64 failed on OS X in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx_mac_debug_tst/31/console ``` 21:51:43 System.Diagnostics.ProcessTests.ProcessTests.TestWorkingSet64 [FAIL] 21:51:43 Assert+WrapperXunitException : File path: d:\j\workspace\dotnet_corefx_windows_debug\src\System.Diagnostics.Process\tests\ProcessTests.cs. Line: 339 21:51:43 ---- Assert.True() Failure 21:51:43 Expected: True 21:51:43 Actual: False 21:51:43 Stack Trace: 21:51:43 at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber) 21:51:43 at Assert.True(Boolean condition, String userMessage, String path, Int32 line) 21:51:43 at System.Diagnostics.ProcessTests.ProcessTests.TestWorkingSet64() 21:51:43 ----- Inner Stack Trace ----- 21:51:43 at Assert.True(Boolean condition, String userMessage, String path, Int32 line) ``` 3282 area-System.Security CtorTests.InvalidCertificateBlob failed on OS X in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx_mac_debug_tst/31/console ``` 21:55:11 System.Security.Cryptography.X509Certificates.Tests.CtorTests.InvalidCertificateBlob [FAIL] 21:55:11 Assert.Equal() Failure 21:55:11 Expected: 218595386 21:55:11 Actual: -2146233088 21:55:11 Stack Trace: 21:55:11 at System.Security.Cryptography.X509Certificates.Tests.CtorTests.InvalidCertificateBlob() ``` 3290 area-System.Xml XmlWriterTestModule.TCCloseOutput failing in outer loop http://dotnet-ci.cloudapp.net/job/dotnet_corefx_outerloop_windows_release/703/console http://dotnet-ci.cloudapp.net/job/dotnet_corefx_outerloop_windows_debug/705/console ``` TestCase:XmlWriterSettings: CloseOutput - File Not Found: writer.out Check that underlying stream is NOT CLOSED when CloseOutput = FALSE and Create(TextWriter) unexpected exception happend:Object reference not set to an instance of an object. at XmlCoreTest.Common.FilePathUtil.getStream(String filename) in d:\j\workspace\dotnet_corefx_outerloop_windows_debug\src\Common\tests\SystemXml\XmlCoreTest\FilePathUtil.cs:line 173 at XmlWriterAPI.Test.TCCloseOutput.CloseOutput_1() in d:\j\workspace\dotnet_corefx_outerloop_windows_debug\src\System.Xml.ReaderWriter\tests\Writers\XmlWriterApi\XmlFactoryWriterTests.cs:line 2258 at OLEDB.Test.ModuleCore.CVariation.Execute() in d:\j\workspace\dotnet_corefx_outerloop_windows_debug\src\Common\tests\SystemXml\ModuleCore\cvariation.cs:line 74 at OLEDB.Test.ModuleCore.CTestCase.Execute() in d:\j\workspace\dotnet_corefx_outerloop_windows_debug\src\Common\tests\SystemXml\ModuleCore\ctestcase.cs:line 69 FAILED File Not Found: writer.out Check that underlying stream is NOT CLOSED when CloseOutput = FALSE and Create(Stream) unexpected exception happend:Object reference not set to an instance of an object. at XmlCoreTest.Common.FilePathUtil.getStream(String filename) in d:\j\workspace\dotnet_corefx_outerloop_windows_debug\src\Common\tests\SystemXml\XmlCoreTest\FilePathUtil.cs:line 173 at XmlWriterAPI.Test.TCCloseOutput.CloseOutput_1() in d:\j\workspace\dotnet_corefx_outerloop_windows_debug\src\System.Xml.ReaderWriter\tests\Writers\XmlWriterApi\XmlFactoryWriterTests.cs:line 2258 at OLEDB.Test.ModuleCore.CVariation.Execute() in d:\j\workspace\dotnet_corefx_outerloop_windows_debug\src\Common\tests\SystemXml\ModuleCore\cvariation.cs:line 74 at OLEDB.Test.ModuleCore.CTestCase.Execute() in d:\j\workspace\dotnet_corefx_outerloop_windows_debug\src\Common\tests\SystemXml\ModuleCore\ctestcase.cs:line 69 FAILED ``` 3292 area-System.Net POST'ing empty content throws an error in System.Net.Http If I make a web request and get an HTTP 204 in return, `WinHttpRequestStream` throws an `IOException` with a success message as the inner exception. It looks like a bug in `WinHttpRequestStream.WriteData`. `Interop.WinHttp.WinHttpWriteData` returns false if the response is a 204 (I guess because there is no content). `Marshal.GetLastError` returns `0` though indicating that there was no error. Should it check if `GetLastError() == 0` rather than checking the result of `Interop.WinHttp.WinHttpWriteData`? I don't know if this is an issue with WinHttp or System.Net.Http, but I don't get this behavior on the version of the dll in Nuget. 3293 area-System.Collections System.Collections.Immutable assembly considered Security Critical I'm writing a program where some untrusted code is running in a separate app domain. I want this untrusted code to use various Immutables, but I get the following error: `Attempt by security transparent method 'MyMethod' to access security critical method 'System.Collections.Immutable.ImmutableList.CreateBuilder()' failed.` `Assembly 'MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=**** is partially trusted, which causes the CLR to make it entirely security transparent regardless of any transparency annotations in the assembly itself. In order to access security critical code, this assembly must be fully trusted.` Why is the Immutable assembly considered security critical? I would imaging this is an oversight and it should be Security Transparent. 3294 area-System.Console Enabling System.Console.WindowWidth and System.Console.CursorVisible properties in CoreFx We are building a cross-platform command line tool which has support for displaying tables (using ascii chars) and showing progress. To render the table correctly we use WindowWidth and want to hide the cursor when we show progress. 3297 area-System.Linq Improve optimization strategy for BlockExpression The check for optimization to N-ary specialized nodes in the Block factories only happens for the Expression[] overload. With the addition of IReadOnlyList<T> to the framework, we can also optimize the IEnumerable<Expression> overloads, similar to the changes proposed in #3288. 3301 area-Serialization Reconcile XmlSerializerImplementation in XmlSerializer with desktop In NetCore: public abstract class XmlSerializerImplementation { public virtual XmlSerializationReader Reader { get { throw new NotSupportedException(); } } public virtual XmlSerializationWriter Writer { get { throw new NotSupportedException(); } } public virtual IDictionary ReadMethods { get { throw new NotSupportedException(); } } public virtual IDictionary WriteMethods { get { throw new NotSupportedException(); } } public virtual IDictionary TypedSerializers { get { throw new NotSupportedException(); } } public virtual bool CanSerialize(Type type) { throw new NotSupportedException(); } public virtual XmlSerializer GetSerializer(Type type) { throw new NotSupportedException(); } } Desktop: public abstract class XmlSerializerImplementation { public virtual XmlSerializationReader Reader { get { throw new NotSupportedException(); } } public virtual XmlSerializationWriter Writer { get { throw new NotSupportedException(); } } public virtual Hashtable ReadMethods { get { throw new NotSupportedException(); } } public virtual Hashtable WriteMethods { get { throw new NotSupportedException(); } } public virtual Hashtable TypedSerializers { get { throw new NotSupportedException(); } } public virtual bool CanSerialize(Type type) { throw new NotSupportedException(); } public virtual XmlSerializer GetSerializer(Type type) { throw new NotSupportedException(); } } 3302 area-Serialization Perf tests that deserialize large object graphs 3307 area-System.Net Allow UseDefaultCredentials property for HttpClientHandler on unix 3311 area-Infrastructure Need a standard convention to refer to bugs from corresponding regression tests. Roslyn uses WorkItemAttribute as a standardized way for regression tests to refer to bugs. It has been found very useful in the past, since bug descriptions and discussions can contain a lot of relevant information, that would be hard to make a part of a test. Being an attribute makes it easy to find in an automated way if so needed (bugs migrated to alternative store or something) Turns out Linq.Expression does not have any convention for regression tests. I suggested commented out attribute as a temporary measure to not lose the information about corresponding bug, but there seem to be a need for a better, more standard convention for this. 3312 area-System.Net WinHttpHandlerTest.SendAsync_SlowPostRequestWithTimedCancellation_ExpectTaskCanceledException failed in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_release/1240/console http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_release/1245/console ``` System.Net.Http.WinHttpHandlerUnitTests.WinHttpHandlerTest.SendAsync_SlowPostRequestWithTimedCancellation_ExpectTaskCanceledException [FAIL] Assert.Equal() Failure Expected: 0 Actual: 3 Stack Trace: d:\j\workspace\dotnet_corefx_windows_release\src\System.Net.Http.WinHttpHandler\tests\UnitTests\WinHttpHandlerTest.cs(37,0): at System.Net.Http.WinHttpHandlerUnitTests.WinHttpHandlerTest.Dispose() at ReflectionAbstractionExtensions.DisposeTestClass(ITest test, Object testClass, IMessageBus messageBus, ExecutionTimer timer, CancellationTokenSource cancellationTokenSource) ``` 3315 area-Serialization Fix performance issue when deserializing base64 content with linebreaks Porting Desktop fix to NetCore for performance issue when deserializing base64 content with linebreak characters. This changes improves the throughput to 50x for 1KB input and more than 130x for 10KB to 1MB inputs. Fix #3316 3316 area-Serialization Fix performance issue when deserializing base64 content with linebreaks chars in DCS 3317 area-System.Reflection Merge master to dev/metadata Conflicts: src/System.Reflection.Metadata/src/System/Reflection/Metadata/MetadataReader.cs src/System.Reflection.Metadata/src/project.lock.json 3318 area-System.Runtime Proposal: Base64/128 Variable Length Quantity (VLQ) in System.Convert "### Concept: `System.Convert` currently resides in CoreCLR repo: [https://github.com/dotnet/coreclr/../System/Convert.cs](https://github.com/dotnet/coreclr/blob/f665f226/src/mscorlib/src/System/Convert.cs). The class has number of methods `ToBase64*` and `FromBase64*` with various signatures. The base64 encoding has 8-bit fixed length. The are many applications of variable length base64 encoding; Variable Length Quantity (VLQ). IMO, one of the most popular application of B64 VLQ is in [V3 source maps](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#!); which is used by browsers, editors, trans-compilers etc. to obtain source-to-source mappings in trans-compilation scenarios. For instance; CoffeeScript, Less, Sass, Stylus, SweetJS and TypeScript are languages, that compile into CSS or JavaScript. Today, the developer tools in all major browsers are capable of mapping generated source to original by the virtue of source-maps. Additionally, Base128 VLQ has applications in media formats, such as MIDI, XMF etc. [[1](https://en.wikipedia.org/wiki/Variable-length_quantity)] ### Proposed API: ``` c# namespace System { public static class Convert { [...] public static byte[] FromBaseNVLQString( EncodingRadix radix; string s, BaseNVLQSetting setting); public static byte[] FromBaseNVLQCharArray( EncodingRadix radix; char[] inArray, Int32 offset, Int32 length, BaseNVLQSetting setting); public static string ToBaseNVLQString( EncodingRadix radix; byte[] inArray, BaseNVLQSetting setting); public static string ToBaseNVLQString( EncodingRadix radix; byte[] inArray, int offset, int length, BaseNVLQSetting setting); public static unsafe string ToBaseNVLQString( EncodingRadix radix; byte[] inArray, int offset, int length, BaseNVLQSetting setting); public static int ToBaseNVLQCharArray( EncodingRadix radix; byte[] inArray, int offsetIn, int length, char[] outArray, int offsetOut, BaseNVLQSetting setting); public static unsafe int ToBaseNVLQCharArray( EncodingRadix radix; byte[] inArray, int offsetIn, int length, char[] outArray, int offsetOut, BaseNVLQSetting setting); public static unsafe int ToBaseNVLQCharArray( EncodingRadix radix; byte[] inArray, int offsetIn, int length, char[] outArray, int offsetOut, BaseNVLQSetting setting); } public enum EncodingRadix { Base64 = 64; Baase128 = 128; } public struct BaseNVLQSetting { private int _base, _baseShift, _baseMask. _continuationBit; private char[] separators; public BaseNVLQSetting( int base, int baseShift, int baseMask, int continuationBit, char[] separators); public enum Template { V3SourceMap, MIDI, XMF } public static BaseNVLQSetting FromTemplate(BaseNVLQSetting.Template template) { switch(template) { case Template.V3SourceMap: return new BaseNVLQSetting(1 << 5, 5, 4, 1 << 5, new char[] {',', ';'}); break; [...] default: throw new Exception(""Unknown template.""); } } } } ``` ### Working Example: We implemented sourcemap encoding and decoding in WE2013: [https://github.com/madskristensen/WebEssentials2013/../Base64VLQ.cs](https://github.com/madskristensen/WebEssentials2013/blob/96d37799/EditorExtensions/Shared/Helpers/Base64VLQ.cs), inspired by Mozilla's JavaScript implementation: https://github.com/mozilla/source-map. " 3319 area-System.Net CurlHandler asserting in WCF tests ``` ---- DEBUG ASSERTION FAILED ---- ---- Assert Short Message ---- If disposed, the stream must also be completed. ---- Assert Long Message ---- at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) at System.Diagnostics.Debug.Assert(Boolean condition, String message) at System.Net.Http.CurlHandler.CurlResponseStream.VerifyInvariants() at System.Net.Http.CurlHandler.CurlResponseStream.SignalComplete(Exception error) at System.Net.Http.CurlHandler.EasyRequest.Cleanup() at System.Net.Http.CurlHandler.MultiAgent.FinishRequest(EasyRequest completedOperation, Int32 messageResult) at System.Net.Http.CurlHandler.MultiAgent.WorkerLoop() at System.Net.Http.CurlHandler.MultiAgent.<>c.b__13_0(Object s) at System.Threading.Tasks.Task.Execute() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) ``` 3320 area-System.Net "CurlHandler throwing ""HTTP stack not implemented"" exception from SupportsRedirectConfiguration" https://github.com/dotnet/corefx/blob/master/src/System.Net.Http/src/System/Net/Http/HttpClientHandler.Unix.cs#L25 3321 area-System.Net "CurlHandler throwing ""HTTP stack not implemented"" from MaxRequestContentBufferSize" https://github.com/dotnet/corefx/blob/master/src/System.Net.Http/src/System/Net/Http/HttpClientHandler.Unix.cs#L129-L133 3322 area-System.Net CurlHandler throwing NotImplementedException for non-http/https schemes https://github.com/dotnet/corefx/blob/master/src/System.Net.Http/src/System/Net/Http/Unix/CurlHandler.cs#L276-L279 Even if we're supposed to throw here, it shouldn't be NotImplemented.ByDesignWithMessage, more likely PlatformNotSupportedException. That said, this might be dead code: it looks like checks for the sheme happen before we even get to this point: ``` Unhandled Exception: System.ArgumentException: Only 'http' and 'https' schemes are allowed. Parameter name: requestUri at System.Net.Http.HttpRequestMessage.InitializeValues(HttpMethod method, Uri requestUri) at System.Net.Http.HttpRequestMessage..ctor(HttpMethod method, Uri requestUri) at System.Net.Http.HttpClient.GetAsync(Uri requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken) at System.Net.Http.HttpClient.GetContentAsync[T](Uri requestUri, HttpCompletionOption completionOption, T defaultValue, Func`2 readAs) at System.Net.Http.HttpClient.GetStringAsync(Uri requestUri) at System.Net.Http.HttpClient.GetStringAsync(String requestUri) ``` So potentially this might just need to be changed to an assert. 3323 area-System.Net Disable SafeHandle leak checking in WinHttpHandler Unit Tests Addresses issue #3312 I've discovered that the FakeSafeWinHttpHandle leak detection isn't stable. SafeHandles finalize via the CriticalFinalizer thread. This thread doesn't seem to run deterministically, so using code like this to wait for SafeHandles to be finalized (and then testing for leaks) doesn't work reliably. ``` c# public static void ForceGarbageCollection() { // Make several passes through the FReachable list. for (int i = 0; i < 10; i++) { GC.Collect(); GC.WaitForPendingFinalizers(); } } ``` For now, logging will be used to verify no leaks. 3324 area-Meta Hardware Details API - Hardware Fingerprint It would be great to add an api that we could use to get hardware specific information. Some of these may include 1. Mac Addresses 2. Processor Information 3. Graphic card Information 4. Base Board Information 5. Unique fingerprint based on hardware I think many applications out there implement features depending on what hardware is available. Furthermore like us, licensing applications in certain scenarios is a must, and I am sure that many applications out there currently, make use of hardware information to create a unique fingerprint which is calculated from hardware information. 3326 area-System.Net Remove delegate allocation from WinHttpHandler.SendAsync Each SendAsync call was allocating a new delegate for StartRequest. cc: @davidsh, @CIPop 3327 area-System.Net Implement HttpClientHandler.MaxRequestContentBufferSize on Unix Changed to match behavior on Windows (get returns 0, set throws PlatformNotSupportedException). Fixes #3321 cc: @kapilash, @davidsh, @CIPop 3328 area-System.Net Implement CurlHandler.SupportsRedirectConfiguration It does. Return true. Fixes #3320 cc: @kapilash 3329 area-System.Net Client Certificate Options for Client Handler When HttpClientHandler.ClientCertificateOption is set to ClientCertificateOptions.Automatic, curl handler passes on the X509 certificates from X509 store to libcurl Fixes #3151. 3333 area-System.Net Remove faulty assert from CurlHandler.CurlResponseStream CurlResponseStream.VerifyInvariants has an assert that assumes that if the stream has been disposed, it must have also completed. But since this stream is exposed publically, it's possible for consuming code to Dispose of the stream before the request has finished, violating the assert. In such a situation, a subsequent attempt to transfer data to the response stream will fail and cause the request to be aborted as desired, cleaning up resources (there are probably some opportunities here for some optimizations to handle this case, but that can be explored later.) This commit just removes the bad assert. Fixes #3319 cc: @kapilash, @roncain 3334 area-System.Security Linux & Mac Support for System.Security.Cryptography.Pkcs Is there any plan to support classes in System.Security.Cryptography.Pkcs namespace? Its essential to create p7s files and sign data. Thanks 3340 area-System.Net Port additional System.Net.Http tests to CoreFx Added more http tests to open source from the original internal ToF tests. Some of the tests should be refactored in the future to avoid Assert'ing multiple logical things. Fixed up test namespaces for System.Net.Http and System.Net.Http.WinHttpHandler. 3343 area-System.Net HttpContentTest.ReadAsStringAsync_SetInvalidCharset_ThrowsInvalidOperationException fails on Linux Part of PR #3340, this test fails on Linux. Disabling for now. System.Net.Http.Functional.Tests.HttpContentTest.ReadAsStringAsync_SetInvalidCharset_ThrowsInvalidOperationException Stacktrace MESSAGE: Assert.Throws() Failure Expected: typeof(System.InvalidOperationException) Actual: (No exception was thrown) +++++++++++++++++++ STACK TRACE: --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at System.Net.Http.Functional.Tests.HttpContentTest.d__bd.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 3345 area-System.Net Net Secure Xplat Implementation 1. Abstracted the code as per design shared earlier. 2. Made SecureChannel & SSPIWrapper agnostic of os. 3. Created 1 class 1 file for each new classes & move them to windows specific folder. 4. Added new interfaces & modules related to Cert. 5. SSPINegoInterface & SSPIAuthType, currently are not part of csproj as suggested by cipop. Have included unix Interop & related code as well for completeness. You can choose to review Windows first as well. 3349 area-Infrastructure Declare requirements in the tests to run\skip based on runtime checks As of now a no. of tests have requirements which make them applicable only in certain situations. For example, ServiceProcess tests can only be run in admin mode, several PLINQ tests need to be run on multi-threaded machines. (We do have an option of marking these tests OpenLoop, but that seems like a broader classification). Currently, the only way to assert these requirements is to update the constructor to check for the requirements, causing each individual test to fail. It would be good to have a means to skip\run tests based on a runtime check. #3134 has more details 3356 area-System.Net Restrict the SSL handshake test to 3 seconds. When things don't go so well this test takes significantly longer than an acceptable waiting period. On success it's fractions of a second. 3360 area-System.Net Correct broken System.Net.Http solution file. When the folders were adjusted for test prep, the folder searched for the functional tests was adjusted, but the file name needed to be updated to match too. 3362 area-System.Net System.Net.Security related Pending PR coments/TODO 1. Interop.OpenSsl TODO - See if SSL_CTX_Set_quite_shutdown can be used 3364 area-System.Threading ReaderWriterLockSlim.AcquireWriterLock timing out does not wake up waiting readers The [documentation for `ReaderWriterLockSlim.TryEnterWriteLock`](https://msdn.microsoft.com/en-us/library/bb339812.aspx) states: > While threads are blocked waiting to enter write mode, additional threads that try to enter read mode or upgradeable mode **block until all the threads waiting to enter write mode have either timed out or** entered write mode and then exited from it. (emphasis mine). However, the implementation does not behave like the bolded part of the documentation states. Imagine the following scenario with three threads (_T1_, _T2_, _T3_): 1. _T1_ acquires a read lock. 2. _T2_ tries to acquire a write lock and blocks, waiting for a timeout (as _T1_ holds the lock). 3. _T3_ tries to acquire a read lock and blocks (because _T2_ is blocked waiting for the write lock, and per the documentation, this means all further readers are blocked until _T2_ times out). 4. _T2_’s timeout expires. Per the documentation, _T3_ should now wake up and acquire the read lock. However, this does not happen and _T3_ is blocked forever (or, until some other event, e.g. _T1_ releasing the read lock, causes the implementation to wake up waiting threads). [Reproducible code for this scenario is available on StackOverflow](http://stackoverflow.com/a/32656459/304138), with some discussion. AFAICT, this is a simple bug caused by the fact that `TryEnterWriteLock` blocks further attempts to acquire a read lock, but when leaving by timeout, it does not wake them up. Specifically, I’d guess the `ExitMyLock` call in [`ReaderWriterLockSlim’s WaitOnEvent`](https://github.com/dotnet/corefx/blob/master/src/System.Threading/src/System/Threading/ReaderWriterLockSlim.cs#L923) should have been `ExitAndWakeUpAppropriateWaiters`. The same bug seems to exist for the non-slim `ReaderWriterLock`. 3365 area-System.Net Dummy PR with xplat SslStream fixes Sharing some fixes found during unit testing. We will be sending these changes as part of official PRs. The idea is to unblock devs who may be hitting issues while testing. Note that the first 2 commits are from https://github.com/dotnet/corefx/pull/3345 3369 area-System.Net Incorporated some comments - Net Secure Xplat Implementation Incorporated some of the comments. Sending it as a new PR as original PR will be closed, once we merge into dev_sslstream to unblock partners. Tracking all issues via #3362 . (I am yet to updated the issue with complete list). Updated all TODO's in the code to refer this issue. This also includes fixes from Vijay's dummy PR https://github.com/dotnet/corefx/pull/3365. 3374 area-System.Security Add OuterLoop tests for X509Store We currently don't have tests for adding and removing certificates to an X509Store on the file system on Unix. We should add some. 3375 area-System.Net Add System.Net.Security to README.md cc: @stephentoub @CIPop @SidharthNabar 3382 area-System.Security GetECDSAPrivateKey() methods not being tested. This requires building a PFX which then triggers other testing problems (race conditions due to the temporary key being stored on disk.) 3383 area-System.Security X509Certificate2.GetECDsaPublicKey() on Unix still unimplemented. (from Jeremy) As for GetECDsaPublicKey, I think that you can get there with EVP_PKEY\* X509_PUBKEY_get(X509_PUBKEY_). Probably want to just add it to the native interop library as EVP_PKEY_ GetX509EvpPublicKey(X509\* x509). Then you can just unpack the EC_KEY the same way you did for the private key here. 3384 area-System.Globalization Investigate casing performance We should write some performance tests for casing and then play around with breaking up the loops in the implementation of the native ChangeCase method use on cross platform to see if we can make things faster. See the conversation [on the PR](https://github.com/dotnet/coreclr/pull/1604#discussion-diff-40141703) for more details. 3386 area-System.Net Various fixes for Unix SslStream @vijaykota had put out a PR into the dev-sslstream branch which gets an SslStream acting as a client working enough to connect to https://www.microsoft.com/, send it a malformed request, and read the reply. This PR is just a integrated version of #3365's non-experimental commits. 3389 area-System.Globalization Decouple CultureData from tests. Test data differs across OSes and so we need a way to select the expected data for globalization tests depending what windows version we are on or what version of the CLDR we are using. 3390 area-System.Net Add support for ECDsa certificates on Unix SslStream The initial version is being added with RSA only, because you have to start somewhere. 3391 area-System.Globalization TestDateTimeParsingWithSpecialCultures failing on ICU for sr-Latn-XX As part of b1995378c63df05117c57505c50f46e256c32b3a Tarek added some additional cultures to TestDateTimeParsingWithSpecialCultures in System.Runtime. These additional tests don't pass when run with ICU. ``` MESSAGE: Assert.True() Failure Expected: True Actual: False +++++++++++++++++++ STACK TRACE: at DateTimeTests.TestDateTimeParsingWithSpecialCultures(String cultureName) ``` 3394 area-System.Net HttpClient error on dnx-coreclr-linux-x64.1.0.0-beta8-15653 System.TypeInitializationException: The type initializer for 'System.Net.Http.CurlHandler' threw an exception. ---> System.TypeInitializationException: The type initializer for 'libcurl' threw an exception. ---> System.TypeInitializationException: The type initializer for 'HttpInitializer' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'System.Net.Http.Native': The specified module could not be found. (Exception from HRESULT: 0x8007007E) at Interop.HttpInitializer.EnsureCurlIsInitialized() at Interop.HttpInitializer..cctor() --- End of inner exception stack trace --- at Interop.HttpInitializer.Initialize() at Interop.libcurl..cctor() --- End of inner exception stack trace --- at Interop.libcurl.curl_version_info(Int32 curlVersionStamp) at System.Net.Http.CurlHandler..cctor() --- End of inner exception stack trace --- at System.Net.Http.CurlHandler..ctor() at System.Net.Http.HttpClientHandler..ctor() at ConsoleApp1.Program.d__7.MoveNext() 3406 area-System.Globalization IDNA tests conform to windows behavior, not specs The windows implementation of IDNA2008 does not follow the relevant specs in some cases (by design, for compatibility purposes). Our tests assume this behavior and then fail when run with ICU's implementation of ToAscii and ToUnicode. We need to decouple the tests into a core of tests which have the same behavior on both Windows and XPlat and then an additional set of tests which have different results and are platform specific. 3418 area-System.Runtime (Discussion) Case insensitive strings as a type I have read #649, and it seems to be a special case of a generic problem. Consider system where some strings are case sensitive (e.g. hash), and some aren't (e.g. name). Currently .NET defaults to being case sensitive, so I have to remember which string is which in all use cases. And those cases are not only about `s1.Equals(s2)` -- it is also every call to `ToDictionary`, every creation of `HashSet` and various other cases and optimizations that are really hard to keep track of. It would be great if I could define string as being case-insensitive on type level, e.g. use `CaseInsensitiveString`. This would affect Comparer selection wherever this type is used as a key, and all comparisons. Not quite sure whether it makes general sense and what the API would be like, so just putting it here as a discussion point. 3419 area-System.Runtime StringBuilder.AppendJoin (appending lists to StringBuilder) "#### Background Let's say you want to build a string that contains a separated list (e.g. list of filenames, messages, or anything else). If it is the only thing you want, you can use `string.Join`. However what if you want to append something else? If you `Concat` with the result of `string.Join`, that means that you unnecessarily allocated an intermediate joined string, which can be rather large (depending on the original collection). On the other hand, `StringBuilder` would require something like: ``` csharp var builder = new StringBuilder(""Names: ""); for (var i = 0; i < names.Length; i++) { if (i > 0) { // this becomes even more involved if `names` is `IEnumerable` builder.Append("", ""); } builder.Append(names[i]); } ``` That can be abstracted into an extension method, however I believe that extension would be general and useful enough to benefit from being in NetFX. #### API Design (updated based on API review, second pass -- see https://github.com/dotnet/corefx/issues/3419#issuecomment-273254581) ``` csharp public class StringBuilder { public StringBuilder AppendJoin(string separator, params object[] values); public StringBuilder AppendJoin(string separator, IEnumerable values); public StringBuilder AppendJoin(string separator, params string[] value); public StringBuilder AppendJoin(chat separator, params object[] values); public StringBuilder AppendJoin(char separator, IEnumerable values); public StringBuilder AppendJoin(char separator, params string[] value); // string.Join overloads NOT taken: //public StringBuilder AppendJoin(string separator, IEnumerable values); //public StringBuilder AppendJoin(string separator, string[] values, int startIndex, int count); //public StringBuilder AppendJoin(char separator, IEnumerable values); //public StringBuilder AppendJoin(char separator, string[] values, int startIndex, int count); // REJECTED in the first API review round: //public StringBuilder AppendJoin(string separator, T[] values, int startIndex, int count); //public StringBuilder AppendJoin(string separator, params T[] values); //public StringBuilder AppendJoin(char separator, params T[] values); } ``` Note: Motivation for the API approval update is described in https://github.com/dotnet/corefx/issues/3419#issuecomment-273254581 -- adjusting to follow proven working form of 'string.Join', correctly working with most-used overload calls - see usage example in https://github.com/dotnet/corefx/issues/5552#issuecomment-268395367. #### Compatibility Potential source-level issue if someone is already using an extension method with the same name. " 3421 area-System.Globalization DateTimeFormatInfoGetInstance.PosTest2 failed on Linux in CI "http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst_prtest/2662/console ``` 03:20:10 System.Globalization.Tests.DateTimeFormatInfoGetInstance.PosTest2 [FAIL] 03:20:10 Assert.Equal() Failure 03:20:10 Expected: DateTimeFormatInfo { AMDesignator = ""AM"", AbbreviatedDayNames = [""Sun"", ""Mon"", ""Tue"", ""Wed"", ""Thu"", ...], AbbreviatedMonthGenitiveNames = [""Jan"", ""Feb"", ""Mar"", ""Apr"", ""May"", ...], AbbreviatedMonthNames = [""Jan"", ""Feb"", ""Mar"", ""Apr"", ""May"", ...], Calendar = GregorianCalendar { CalendarType = Localized, Eras = [...], IsReadOnly = True, MaxSupportedDateTime = 9999-12-31T23:59:59.9999999, MinSupportedDateTime = 0001-01-01T00:00:00.0000000, ... }, ... } 03:20:10 Actual: DateTimeFormatInfo { AMDesignator = ""de."", AbbreviatedDayNames = [""V"", ""H"", ""K"", ""Sze"", ""Cs"", ...], AbbreviatedMonthGenitiveNames = [""jan."", ""febr."", ""m��rc."", ""��pr."", ""m��j."", ...], AbbreviatedMonthNames = [""jan."", ""febr."", ""m��rc."", ""��pr."", ""m��j."", ...], Calendar = GregorianCalendar { CalendarType = Localized, Eras = [...], IsReadOnly = False, MaxSupportedDateTime = 9999-12-31T23:59:59.9999999, MinSupportedDateTime = 0001-01-01T00:00:00.0000000, ... }, ... } 03:20:10 Stack Trace: 03:20:11 at System.Globalization.Tests.DateTimeFormatInfoGetInstance.PosTest2() 03:20:11 Finished: System.Globalization.Tests ``` " 3423 area-System.Data API for retrieving Columns Schema from DbDataReader This is to unwrap the specific issue of resultset schemas from the many involved in #1039. [Back on May 5th](https://github.com/dotnet/corefx/issues/1039#issuecomment-99186515) @davkean noted: > We want GetSchemaTable in some form (we should get a separate bug filed on that, however, as you could imagine bringing that back with a different design that doesn't pull in DataSet/DataTable). While it doesn't seem that anyone cares _what method_ exists for of getting the schema of a resultset, we seem to agree on needing _a method_ of doing it in .Net Core. For example, if a user runs a simple query such as: ``` SQL SELECT 'bob' Name, 1 Id ``` Then there's no way to see what the types are. While getting the .Net type ([via `.GetFieldType()`](https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.getfieldtype%28v=vs.110%29.aspx), e.g. `DateTime`) is possible and getting _part_ the SQL type ([via `.GetDataTypeName()`](https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.getdatatypename%28v=vs.110%29.aspx), e.g. `NVARCHAR`) is possible, other vital attributes of the schema shape currently aren't possible. For example there's no way to distinguish a `varchar(20)` from a `varchar(max)`. There's also no way to tell if the column was nullable. Previously, this functionality was provided by [`.GetSchemaTable()`](https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.getschematable%28v=vs.110%29.aspx) which returned a [`DataTable`](https://msdn.microsoft.com/en-us/library/system.data.datatable%28v=vs.110%29.aspx) class. Currently I have a very simple use case: query data here, create a table with that data elsewhere. The query can be something like: `SELECT * FROM sys.database_files`. I point this out to illustrate that `INFORMATION_SCHEMA` (as proposed by some in #1039 as an alternative) is not a viable option. The same issue presents on any stored procedure which can also return any result set shape depending on the code paths. We need a way to see the scheme _of a result set_, these database-query alternatives are both expensive and non-covering. This is a hard blocker for projects of myself and others. I have uses in both one-off projects as well as [Opserver](https://github.com/opserver/Opserver) (which monitors SQL) and [Dapper.Net](https://github.com/StackExchange/dapper-dot-net). I know from #1039 that I'm not alone on this block. The portability of .Net core is _extremely_ appealing for certain projects, especially those where we need to monitor the innards of SQL without depending on a .Net install (many if not most existing SQL servers only have .Net 3.5). Unfortunately though, this one missing piece of the puzzle may prevent using it altogether, forcing full CLR installs. While SqlClient specifically serves my blocking use case, it's important to point out as @FransBouma [notes in the other issue](https://github.com/dotnet/corefx/issues/1039#issuecomment-142202400): this needs to be in the base API, not specifically up in SqlClient. For example, I also need this for Dapper features and it works across many providers - it is not at all SQL Server specific. So how about it, can we please get an API for result set schemas added back? I'm happy to contribute to designing and provide feedback on a new API here if that's the best route. I know many others are as well. 3425 area-System.Net Testing SslStream Read/Write logic 3431 area-System.Net Unix SslStream needs to verify the remote cert is valid for the destination address 3432 area-System.Net Adjust the PAL separation for certificate verification The Windows version requires that there be a valid handle to the native chain representation; the Unix version never has a valid native handle. So move the PAL separation to a slightly higher abstraction level, and let each side party on it in their own way. 3439 area-Infrastructure Replace Microsoft.DotNet.CoreCLR dependency with Microsoft.NETCore.Runtime.CoreCLR Remove dotnet-coreclr feed from dir.props and NuGet.config once this is done as well. See https://github.com/dotnet/corefx/pull/3413#discussion_r40368451 cc @weshaggard 3441 area-System.Net Follow up on CR feedback for System.Net.Sockets. See #3422. 3444 area-System.Net [SslStream] CheckX509Hostname wildcard matching may be too restrictive "[RFC 2595](http://www.ietf.org/rfc/rfc2595.txt) says: ``` - A ""*"" wildcard character MAY be used as the left-most name component in the certificate. For example, *.example.com would match a.example.com, foo.example.com, etc. but would not match example.com. ``` [RFC 2818](http://www.ietf.org/rfc/rfc2818.txt) says: ``` Matching is performed using the matching rules specified by [RFC2459]. If more than one identity of a given type is present in the certificate (e.g., more than one dNSName name, a match in any one of the set is considered acceptable.) Names may contain the wildcard character * which is considered to match any single domain name component or component fragment. E.g., *.a.com matches foo.a.com but not bar.foo.a.com. f*.com matches foo.com but not bar.com. ``` Where did the `f*.com` => `foo.com` example come from? " 3446 area-System.Net [Feature] CheckX509Hostname does not match IDNA Internationalized domains are very likely going to confuse this function. 3447 area-System.Net UDPClientTest.BeginSend_AsyncOperationCompletes_Success failed in CI on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug_prtest/4229/console ``` Discovering: System.Net.Sockets.APMServer.Tests Discovered: System.Net.Sockets.APMServer.Tests Starting: System.Net.Sockets.APMServer.Tests System.Net.Sockets.Tests.UDPClientTest.BeginSend_AsyncOperationCompletes_Success [FAIL] System.Net.Sockets.SocketException : An address incompatible with the requested protocol was used Stack Trace: d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs(3211,0): at System.Net.Sockets.Socket.DoBeginSendTo(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint endPointSnapshot, SocketAddress socketAddress, OverlappedAsyncResult asyncResult) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs(3156,0): at System.Net.Sockets.Socket.BeginSendTo(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint remoteEP, AsyncCallback callback, Object state) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets\src\System\Net\Sockets\UDPClient.cs(598,0): at System.Net.Sockets.UdpClient.BeginSend(Byte[] datagram, Int32 bytes, IPEndPoint endPoint, AsyncCallback requestCallback, Object state) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets.Legacy\tests\FunctionalTests\UdpClientTest.cs(51,0): at System.Net.Sockets.Tests.UDPClientTest.BeginSend_AsyncOperationCompletes_Success() Finished: System.Net.Sockets.APMServer.Tests ``` 3450 area-System.Net 516 system.net Removing custom error checking from System.Net.* (ignoring System.Net.Sockets for the moment) @stephentoub - I'm planning on doing a squash/overall comment like for #3020 . 3463 area-System.Net Enable SslStream for Unix "Merging the current status of dev-sslstream into master. - The Windows version should continue to work just fine. - The Unix version has received sanity testing, and has limited functionality, but is believed to be in a ""basic scenarios, for integration purposes"" state. - `stream.AuthenticateAsClient(string)` :white_check_mark: - `stream.AuthenticateAsClientAsync(string)` :white_check_mark: - `stream.AuthenticateAsServer(X509Certificate)` :ok: (requires the provided instance be X509Certificate2, and using RSA) - `stream.Write(byte[])` :white_check_mark: - `stream.Read(byte[], int, int)` :white_check_mark: - {Read|Write}Async :grey_question: (it's expected to work, but wasn't explicitly verified) - Off the golden path may be a bit rough; unexpected disconnects and the like may have different exception flows than their Windows counterparts (if encountered, please report!) - Mutual authentication / client authentication certificates :x: " 3464 area-System.Net HttpClient isn't always canceling in response to cancellation requests "We first found this issue with a WCF negative test that expected a TimeOutException when setting a ‘SendTimeout’ on our BasicHttpBinding and calling a service operation that took longer to return. Previously this test passed with the elapsed time being just a little longer than the ‘SendTimeout’ value. As of a couple weeks ago we still got the TimeOutException but the elapsed time seemed to correlate to however long it took for the call to return from the service operation. So if the ‘SendTimeout’ was set to 5 milliseconds and the service operation waited 30 milliseconds to return, the elapsed time would be something over 30 milliseconds. As best we could determine it has something to do with the CancellationTokenSource perhaps when it is creating the linked token source and passing it to the SetTimeout method. (HttpClient.cs SendAsync method) We isolated this issue using no WCF code with the following client side code… ``` csharp Stopwatch watch = new Stopwatch(); HttpClient client = new HttpClient(); HttpRequestMessage message = new HttpRequestMessage(); message.RequestUri = new Uri(""http://localhost:54464/Home/About""); var cts = new CancellationTokenSource(TimeSpan.FromSeconds(10)); try { watch.Start(); var responseTask = client.SendAsync(message, cts.Token); responseTask.Wait(); } catch (Exception ex) { Debug.WriteLine(ex.Message + ""\n"" + ex.StackTrace); } finally{ watch.Stop(); } Assert.InRange(watch.ElapsedMilliseconds, 8000, 15000); ``` In this example we are just calling the ‘About’ page of an ASP.NET MVC application (default VS template) and just added the following in the HomeController.About() method… ``` csharp public ActionResult About() { ViewBag.Message = ""Your application description page.""; Thread.Sleep(30*1000); return View(); } ``` **NOTE: I have no idea why but it seems to work as expected when in debug mode, the issue reproduces when executed normally.** " 3467 area-System.Globalization Investigate ICU EndsWith when string has zero collation elements at the end In StartsWith we ignore zero collation elements at the start of the string, we probably need to do the same thing in EndsWith. 3468 area-System.Globalization Implement IndexOfOrdinal and LastIndexOfOrdinal in the ICU Shim The naive implementation of these methods in CompareInfo.Unix.cs is correct but allocates both to do a substring and to case the string when ignore case is true. We should just just implement these methods in the Shim itself. It can walk the string without allocating and do casing inline without having to round trip to managed code for each character. 3474 area-System.Security Add opt-in setting for ensuring strong random numbers There have been some reports that Linux and OpenSSL in particular may not use enough entropy in all scenarios https://www.blackhat.com/docs/us-15/materials/us-15-Potter-Understanding-And-Managing-Entropy-Usage-wp.pdf We need to ensure we are properly seeding OpenSSL's PRNG. There are some conflicting articles/sites that say using /dev/urandom is sufficient: http://www.2uo.de/myths-about-urandom/ http://security.stackexchange.com/questions/7718/openssl-rand-poll-good-enough http://security.stackexchange.com/questions/3259/howto-seed-the-prng-in-openssl-properly?rq=1 One idea is to use the new [getrandom()](http://man7.org/linux/man-pages/man2/getrandom.2.html) syscall, which will block if there isn't enough entropy in the system. When that isn't available, we need to decide whether we should: 1. block 2. fail 3. continue 3475 area-System.Security System.Security.Cryptography.X509Certificates.Tests.ChainTests.BuildChain failure on OSX in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx_mac_debug_tst/42/testReport/System.Security.Cryptography.X509Certificates.Tests/ChainTests/BuildChain/ 3476 area-System.Net Two OSX HttpClientHandlerTest Failures in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx_mac_debug_tst/42/testReport/System.Net.Http.Functional.Tests/HttpClientHandlerTest/GetAsync_ResponseHeadersRead_ReadFromEachIterativelyDoesntDeadlock/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx_mac_debug_tst/42/testReport/System.Net.Http.Functional.Tests/HttpClientHandlerTest/GetAsync_CredentialIsNetworkCredentialUriRedirect_StatusCodeUnauthorized/ 3477 area-System.Net Fixes #3464 where http requests don't honor cancellation Add a registration for the passed in cancellation token which cancels the CancellationTokenSource.Token that is returned to the caller. 3480 area-System.Data Make interfaces as the official ADO.NET Provider API instead of classes From what I can see currently on the [corefx-progress page for System.Data.Common](https://github.com/dotnet/corefx-progress/blob/master/src-diff/System.Data.Common.md), the interfaces (IDbCommand, IDbConnection, etc) were removed in favor of the usage of abstract classes. But in the new API, most of the main methods are not virtual or abstract. On DbCommand alone we can see this: ``` cs public DbConnection Connection { get; set; } public DbParameterCollection Parameters { get; } public DbTransaction Transaction { get; set; } public DbParameter CreateParameter(); public Task ExecuteNonQueryAsync(); public DbDataReader ExecuteReader(); public DbDataReader ExecuteReader(CommandBehavior behavior); public Task ExecuteReaderAsync(); public Task ExecuteReaderAsync(CommandBehavior behavior); public Task ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken); public Task ExecuteReaderAsync(CancellationToken cancellationToken); public Task ExecuteScalarAsync(); ``` While these methods can certainly be made virtual or abstract, it would be much more useful to have the real interfaces back, and make any public API depend on these interfaces instead of the abstract classes. This is mostly useful when developing libraries. Today it's very hard to mock a datareader to make it return a specific value for testing purposes. The same for ensuring that ExecuteReaderAsync was called, not ExecuteReader, etc. I propose the provider factory instead should be made as an interface: ``` cs public interface IDbProviderFactory { IDbCommand CreateCommand(); IDbConnection CreateConnection(); IDbConnectionStringBuilder CreateConnectionStringBuilder(); IDbParameter CreateParameter(); } ``` And then follow from there to the rest of the provider to things like `IDbDataReader`, `IDbTransaction`, etc. We know the interfaces became out of sync for some reason in the past and the abstract classes were made the official API, but this doesn't need to be the case anymore in corefx. Note that this doesn't mean removing the System.Data.Common in any way, but instead make the Common classes implement these interfaces, and you wouldn't use System.Data.Common unless you're implementing the provider. Applications would depend only on the interfaces instead. Please consider this to make the API more testable on corefx 1.0. Related to discussions on #1039 and #3423. 3481 area-System.Linq How best to implement Linq's iterators. The current approach with `System.Linq.Enumerator`'s enumerables and their enumerators copies the approach for compiler-generated iterators; the same instance that serves as the enumerable serves as the result for the first call to `GetEnumerator()`, so avoiding an extra allocation. There is a race inherent to this approach; if two threads called `GetEnumerator()` at the same time they could end up with the same object when they should have separate instances. This is resolved by capturing `Environment.CurrentManagedThreadId` on construction and only using `this` as the result of `GetEnumerator()` if it matches a second call. This relatively expensive call is of no value if: 1. `GetEnumerator()` is never called (many optimisations skip it in various ways). 2. `GetEnumerator()` is repeatedly called (after the first call). 3. `GetEnumerator()` is only called once, on another thread (e.g. if a query is constructed before an `await` and enumerated after it). #3313 changes the approach to changing the state with `Interlocked.CompareExchange()` to resolve the race in a different way. This means no call in case 1 and 3 above, but is more expensive in case 2. It's about even in the case of one `GetEnumerator()` at least as some tests with Win64 DNX suggest (`CompareExchange` being about twice the case of `CurrentManagedThreadId` and being called half as often). In the discussion on that pull request, @Vsadov points out that the optimisation of avoid an allocation may not be as valuable as it once was in any case. Some very limited experimentation suggests that indeed just creating a new object on every call to `GetEnumerator()` is a clear win. There are a few possible variants here. We can have the same classes that server as both enumerable and enumerator, or separate classes (some reduction in state held, some increase in jitted code). If separate classes are used, internal calls to `GetEnumerator()` can be moved to this object's construction, further reducing state held in some cases, but being an observable change if that call throws an exception. A completely different possibility is to use the current approach, but avoid calling CurrentManagedThreadId is some cases. Some experimentation is in order. Some possible approaches: 1. Leave things as they are. 2. Use the basic approach currently used, but avoiding the `CurrentManagedThreadId` call, https://github.com/JonHanna/corefx/tree/fewer_threadid_calls 3. Use `Interlocked.CompareExchange()`: https://github.com/JonHanna/corefx/tree/defer_obtaining_threadid 4. Use the same classes as currently, but always allocating for `GetEnumerator()`: https://github.com/JonHanna/corefx/tree/fresh_enumerators 5. Use separate enumerators https://github.com/JonHanna/corefx/tree/separate_enumerators_cautious 6. ~~Use separate enumerators, shifting `GetEnumerator()` calls (observable change) https://github.com/JonHanna/corefx/tree/separate_enumerators~~ I'm planning to do some comparisons with these variants, but I'm opening this issue ahead of that for suggestions as to situations the comparisons must cover. In particular: Is 6 (with the observable change) completely out of the question? What tests would one expect avoiding an allocation to do better than not avoiding it? (First brief experiments suggest it's always a lose, but I'm wary of removing what was clearly intended as an optimisation if I can't see where it succeeded in optimising, though maybe it's just a matter of older CLR versions). 3482 area-System.Collections Proposal: (I)Dictionary.GetValueOrDefault ## Scenario In almost every app or library I write I almost always end up needing to write code like this, in at least one place: ``` c# SomeClass returnValue; return DictionaryOfSomeClass.TryGetValue(someKey, out returnValue) ? returnValue : null; ``` The reason that the `IDictionary` contract throws from its indexer for a non-existent key are well-known: an alternative behavior of returning `null` is nonsensical if `TValue` is a value type. Returning `default(TValue)` would work, but would clearly be a misleading behavior. But with dictionaries of class-types it is often desirable and expected to return `null` for a non-existent key. ## Proposal ```c# namespace System.Collections.Generic { public class Dictionary { public TValue GetValueOrDefault(TKey key); public TValue GetValueOrDefault(TKey key, TValue defaultValue); } public static class CollectionExtensions { public static TValue GetValueOrDefault(this IDictionary dictionary, TKey key); public static TValue GetValueOrDefault(this IDictionary dictionary, TKey key, TValue defaultValue); public static TValue GetValueOrDefault(this IReadOnlyDictionary dictionary, TKey key); public static TValue GetValueOrDefault(this IReadOnlyDictionary dictionary, TKey key, TValue defaultValue); } } ``` **Notes:** - There will be source-compile problem with ambiguity in all projects that already have such custom extension method `GetValueOrDefault` on `IDictionary` or `IReadOnlyDictionary`. Which is general problem for any extension method we add into CoreFX. ### Original Proposal - replaced by the one above I propose the following extension method (I don't like the name `GetValueNoThrow`, so that can be ignored for now). Please note that it applies only when `TValue` is a class, so it does not violate any behavior for value types. ``` c# public static class ClassyDictionaryExtensions { public static TValue GetValueNoThrow_Ignore_The_Name(this IDictionary dictionary, TKey key) where TValue : class { if (dictionary == null) { throw new ArgumentNullException(nameof(dictionary)); } TValue value; dictionary.TryGetValue(key, out value); return value; } } ``` The new code would end up with one very-easy-to-read line of code: ``` c# return DictionaryOfSomeClass.GetValueNoThrow(someKey); ``` ## Discussion Would others find such an extension method useful? 3483 area-System.Console Add an API to execute a console program and capture its output in a simple way Clearly, we can use the `Process` class to run a program, redirect its output and capture the output. But doing so correctly is unfathomably complicated: 1. You need to read both StdOut and StdErr. Failing to do so can result in hangs. 2. Output events can arrive _after_ WaitForExit has returned. (Update: This concern does not exist.) 3. Output events signal their completing by sending one `null` string at the end. 4. `myProcess.StandardOutput.ReadAsync` throws an exception for the last read with a confusing message (http://stackoverflow.com/questions/32800802/unable-to-read-output-from-child-process-from-c-sharp-app-using-async-methods#32800802). 5. Reading binary output requires contortions (`myProcess.StandardOutput.BaseStream`) where it is not clear whether this is supported at all. We are reaching into the `BaseStream` property which might expose an internal object not meant for consumption. 6. Failing to quickly read the redirected streams stalls the child process. 7. Many more on this list: http://csharptest.net/321/how-to-use-systemdiagnosticsprocess-correctly/ 8. Probably, even more that are on nobodies list. This API is terrible! Please provide an easy and reliable way to capture output. Here's a strawman for a simple API `IEnumerable Process::StartWithOutputRedirected()` Now, this clearly is insufficient and probably not nice API design but you get the point. The following goals should be achieved: 1. Little potential for mistakes. 2. Streaming output for unbounded output size. 3. Text and binary output. 4. Differentiate between StdOut and StdErr. For example by returning an `IEnumerable` of a DTO like `struct ConsoleOutput { string Data; ConsoleOutputType Type; /*Output, Error*/ }`. 5. The output stream should end at exactly the same point in time that WaitForExit ends at. Delay both to only complete when the other also has completed. 6. The API should allow reading in a non-linewise fashion. 7. A simplified version that just captures all output on both channels into one `string`. This is probably what most consumers want anyway. 3484 area-System.Net Some asserts during X-Plat Sockets Tests See: http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst/1021/console. The Debug.Assert here did not cause the test to fail. ``` ---- DEBUG ASSERTION FAILED ---- ---- Assert Short Message ---- SafeCloseSocket::ReleaseHandle(handle:0) ---- Assert Long Message ---- ReleaseHandle failed. at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) at System.Diagnostics.Debug.Fail(String message, String detailMessage) at System.Net.GlobalLog.Assert(String message, String detailMessage) at System.Net.GlobalLog.Assert(Boolean condition, String messageFormat, Object[] data) at System.Net.Sockets.SafeCloseSocket.InnerSafeCloseSocket.ReleaseHandle() at System.Runtime.InteropServices.SafeHandle.DangerousRelease() at System.Net.Sockets.SafeCloseSocket.ReleaseHandle() at System.Runtime.InteropServices.SafeHandle.InternalFinalize() at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing) at System.Runtime.InteropServices.SafeHandle.Finalize() at System.Net.DebugSafeHandleMinusOneIsInvalid.Finalize() ---- DEBUG ASSERTION FAILED ---- ---- Assert Short Message ---- SafeCloseSocket::ReleaseHandle(handle:0) ---- Assert Long Message ---- ReleaseHandle failed. at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) at System.Diagnostics.Debug.Fail(String message, String detailMessage) at System.Net.GlobalLog.Assert(String message, String detailMessage) at System.Net.GlobalLog.Assert(Boolean condition, String messageFormat, Object[] data) at System.Net.Sockets.SafeCloseSocket.InnerSafeCloseSocket.ReleaseHandle() at System.Runtime.InteropServices.SafeHandle.DangerousRelease() at System.Net.Sockets.SafeCloseSocket.ReleaseHandle() at System.Runtime.InteropServices.SafeHandle.InternalFinalize() at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing) at System.Runtime.InteropServices.SafeHandle.Finalize() at System.Net.DebugSafeHandleMinusOneIsInvalid.Finalize() ---- DEBUG ASSERTION FAILED ---- ---- Assert Short Message ---- SafeCloseSocket::ReleaseHandle(handle:0) ---- Assert Long Message ---- ReleaseHandle failed. at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) at System.Diagnostics.Debug.Fail(String message, String detailMessage) at System.Net.GlobalLog.Assert(String message, String detailMessage) at System.Net.GlobalLog.Assert(Boolean condition, String messageFormat, Object[] data) at System.Net.Sockets.SafeCloseSocket.InnerSafeCloseSocket.ReleaseHandle() at System.Runtime.InteropServices.SafeHandle.DangerousRelease() at System.Net.Sockets.SafeCloseSocket.ReleaseHandle() at System.Runtime.InteropServices.SafeHandle.InternalFinalize() at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing) at System.Runtime.InteropServices.SafeHandle.Finalize() at System.Net.DebugSafeHandleMinusOneIsInvalid.Finalize() Finished: System.Net.Sockets.APMServer.Tests === TEST EXECUTION SUMMARY === System.Net.Sockets.APMServer.Tests Total: 231, Errors: 0, Failed: 0, Skipped: 0, Time: 13.856s ---- DEBUG ASSERTION FAILED ---- ---- Assert Short Message ---- SafeCloseSocket::ReleaseHandle(handle:0) ---- Assert Long Message ---- ReleaseHandle failed. at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) at System.Diagnostics.Debug.Fail(String message, String detailMessage) at System.Net.GlobalLog.Assert(String message, String detailMessage) at System.Net.GlobalLog.Assert(Boolean condition, String messageFormat, Object[] data) at System.Net.Sockets.SafeCloseSocket.InnerSafeCloseSocket.ReleaseHandle() at System.Runtime.InteropServices.SafeHandle.DangerousRelease() at System.Net.Sockets.SafeCloseSocket.ReleaseHandle() at System.Runtime.InteropServices.SafeHandle.InternalFinalize() at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing) at System.Runtime.InteropServices.SafeHandle.Finalize() at System.Net.DebugSafeHandleMinusOneIsInvalid.Finalize() Finished: System.Net.Sockets.AsyncServer.Tests === TEST EXECUTION SUMMARY === System.Net.Sockets.AsyncServer.Tests Total: 231, Errors: 0, Failed: 0, Skipped: 0, Time: 13.955s ---- DEBUG ASSERTION FAILED ---- ---- Assert Short Message ---- SafeCloseSocket::ReleaseHandle(handle:0) ---- Assert Long Message ---- ReleaseHandle failed. at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) at System.Diagnostics.Debug.Fail(String message, String detailMessage) at System.Net.GlobalLog.Assert(String message, String detailMessage) at System.Net.GlobalLog.Assert(Boolean condition, String messageFormat, Object[] data) at System.Net.Sockets.SafeCloseSocket.InnerSafeCloseSocket.ReleaseHandle() at System.Runtime.InteropServices.SafeHandle.DangerousRelease() at System.Net.Sockets.SafeCloseSocket.ReleaseHandle() at System.Runtime.InteropServices.SafeHandle.InternalFinalize() at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing) at System.Runtime.InteropServices.SafeHandle.Finalize() at System.Net.DebugSafeHandleMinusOneIsInvalid.Finalize() ---- DEBUG ASSERTION FAILED ---- ---- Assert Short Message ---- SafeCloseSocket::ReleaseHandle(handle:0) ---- Assert Long Message ---- ReleaseHandle failed. at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) at System.Diagnostics.Debug.Fail(String message, String detailMessage) at System.Net.GlobalLog.Assert(String message, String detailMessage) at System.Net.GlobalLog.Assert(Boolean condition, String messageFormat, Object[] data) at System.Net.Sockets.SafeCloseSocket.InnerSafeCloseSocket.ReleaseHandle() at System.Runtime.InteropServices.SafeHandle.DangerousRelease() at System.Net.Sockets.SafeCloseSocket.ReleaseHandle() at System.Runtime.InteropServices.SafeHandle.InternalFinalize() at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing) at System.Runtime.InteropServices.SafeHandle.Finalize() at System.Net.DebugSafeHandleMinusOneIsInvalid.Finalize() ``` 3490 area-System.Net Incorporated some comments - Net Secure Xplat Implementation This is same as https://github.com/dotnet/corefx/pull/3369 Comments have already been addressed/replied. Any new comments can be given here. Since it's pending for roughly ~6 days, would like a quick closure. Thanks. Creating a PR to dotnet/master as we will no longer be using dev-sslstream. I will squash the commits once,I get the sign off. 3494 area-System.Net ConnectV4MappedIPAddressToV4Host_Success failed in CI on Linux http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst_prtest/2785/console ``` 09:31:53 System.Net.Sockets.Tests.DualMode.ConnectV4MappedIPAddressToV4Host_Success [FAIL] 09:31:53 System.Net.Sockets.SocketException : Unknown error 10054 09:31:53 Stack Trace: 09:31:54 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) 09:31:54 at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) 09:31:54 at System.Net.Sockets.Socket.Connect(IPAddress address, Int32 port) 09:31:54 at System.Net.Sockets.Tests.DualMode.DualModeConnect_IPAddressToHost_Helper(IPAddress connectTo, IPAddress listenOn, Boolean dualModeServer, Int32 port) 09:31:54 at System.Net.Sockets.Tests.DualMode.ConnectV4MappedIPAddressToV4Host_Success() ``` 3495 area-System.Net SocketPerformance_SingleSocketClientAPM_LocalHostServerAPM failed in CI on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug/1351/console ``` 11:22:58 System.Net.Sockets.Performance.Tests.SocketPerformanceAPMTests.SocketPerformance_SingleSocketClientAPM_LocalHostServerAPM [FAIL] 11:22:58 Test execution is expected to be shorter than 5000 but was 7543 11:22:58 Expected: True 11:22:58 Actual: False 11:22:58 Stack Trace: 11:22:58 d:\j\workspace\dotnet_corefx_windows_debug\src\Common\tests\System.Net\Sockets\Performance\SocketPerformanceTests.cs(53,0): at System.Net.Sockets.Performance.Tests.SocketPerformanceTests.ClientServerTest(Int32 port, SocketImplementationType serverType, SocketImplementationType clientType, Int32 iterations, Int32 bufferSize, Int32 socket_instances, Int64 expectedMilliseconds) 11:22:58 d:\j\workspace\dotnet_corefx_windows_debug\src\System.Net.Sockets.Legacy\tests\PerformanceTests\SocketPerformanceAPMTests.cs(38,0): at System.Net.Sockets.Performance.Tests.SocketPerformanceAPMTests.SocketPerformance_SingleSocketClientAPM_LocalHostServerAPM() ``` cc: @davidsh, @cipop, @pgavlin 3497 area-System.Net SendPacketsElement_FilePart_Success failed in CI on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_release_prtest/4322/console ``` Starting: System.Net.Sockets.AsyncServer.Tests System.Net.Sockets.Tests.SendPacketsAsync.SendPacketsElement_FilePart_Success [FAIL] Timed out Expected: True Actual: False Stack Trace: d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Sockets.Legacy\tests\FunctionalTests\SendPacketsAsync.cs(397,0): at System.Net.Sockets.Tests.SendPacketsAsync.SendPackets(SendPacketsElement[] elements, SocketError expectedResut, Int32 bytesExpected) d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Sockets.Legacy\tests\FunctionalTests\SendPacketsAsync.cs(317,0): at System.Net.Sockets.Tests.SendPacketsAsync.SendPacketsElement_FilePart_Success() ``` cc: @davidsh, @cipop, @pgavlin 3498 area-System.Net System.Net changes for README.md - Update System.Net.Security description - Add System.Net.Sockets description 3499 area-System.Reflection Merge master to dev/metadata Straight PR from master -> dev/metadata (no conflicts) 3501 area-Infrastructure Add static and runtime verification tools against existing tests /cc: @stephentoub @vijaykota @pgavlin @davidsh We should augment our CI with static and runtime verification tools that can be enabled against our existing tests: Windows: - [ ] FXCop (edit: covered by https://github.com/dotnet/corefx/issues/14095) - [ ] PREfast for Native code - [ ] [AppVerifier](http://www.microsoft.com/en-us/download/details.aspx?id=20028) Linux: - [ ] [Valgrind](http://valgrind.org/) This should already be part of normal pre-commit procedures for all teams. Could we make this an automated part of CI/Weekly testing? 3502 area-System.Security Windows: new X509Certificate2(byte[]).GetRSAPrivateKey returns RSACSP instead of RSACng "The idea/thought was that we'd use CNG for everything except for hardware providers that were linked through CAPI. In particular, this would prevent the SHA256 lookup failure that occurs when using CAPI's PROV_RSA_FULL instead of PROV_RSA_AES. I'm pretty sure that we made the software keys be returned via RSACng on desktop (4.6). This was accomplished by calling CryptAcquireCertificatePrivateKey with the ""ncrypt only"" flag (see the code on [reference source](http://referencesource.microsoft.com/#System.Core/System/Security/Cryptography/X509Certificates/X509Native.cs,2e55137aa586849f)), since that can up-convert software based CAPI keys. " 3503 area-System.Reflection Merge master to dev/metadata Replacing #3499. Still no conflicts, but this time using an intermediate branch so that changes to master do not automatically become part of the PR and reset CI. 3504 area-System.Net ReceiveFromAsyncV4BoundToAnyV4_Success failure in CI on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug/1361/console ``` System.Net.Sockets.Tests.DualMode.ReceiveFromAsyncV4BoundToAnyV4_Success [FAIL] 18:41:42 System.TimeoutException : The operation has timed out. 18:41:42 Stack Trace: 18:41:42 d:\j\workspace\dotnet_corefx_windows_debug\src\System.Net.Sockets.Legacy\tests\FunctionalTests\DualModeSocketTest.cs(1836,0): at System.Net.Sockets.Tests.DualMode.ReceiveFromAsync_Helper(IPAddress listenOn, IPAddress connectTo, Int32 port) 18:41:42 d:\j\workspace\dotnet_corefx_windows_debug\src\System.Net.Sockets.Legacy\tests\FunctionalTests\DualModeSocketTest.cs(1766,0): at System.Net.Sockets.Tests.DualMode.ReceiveFromAsyncV4BoundToAnyV4_Success() ``` cc: @davidsh, @CIPop, @pgavlin 3505 area-System.Diagnostics Process.GetProcessesByName significantly slower on Linux than Windows for nonexistent process "The performance test being run: ``` [Benchmark] [InlineData(1)] [InlineData(2)] [InlineData(3)] public void GetProcessesByName(int innerIterations) { foreach (var iteration in Benchmark.Iterations) using (iteration.StartMeasurement()) { for (int i = 0; i < innerIterations; i++) { Process.GetProcessesByName(""1""); Process.GetProcessesByName(""1""); Process.GetProcessesByName(""1""); Process.GetProcessesByName(""1""); Process.GetProcessesByName(""1""); Process.GetProcessesByName(""1""); Process.GetProcessesByName(""1""); Process.GetProcessesByName(""1""); Process.GetProcessesByName(""1""); } } } ``` Linux perf results (38.455 total seconds): ``` ``` Windows perf results (3.355 total seconds): ``` ``` Further increasing the number of calls to GetProcessesByName makes comparatively little difference on Windows. For example, with an `InnerIterations` of 5000 (45000 total function calls), the elapsed time on Windows is only 106 seconds. In that same time Linux can only complete ~20 InnerIterations (180 total function calls). This suggests the Linux implementation takes roughly 250 times as long as the Windows implementation. " 3506 area-Infrastructure Can't run [Outerloop] tests using msbuild of individual test project "I frequently go to a single test directory to run tests just for that project. I.e., this will run just innerloop tests: > cd src\System.Net.Http\tests\FunctionalTests > msbuild /t:clean;build;test Now, say, I want to run `[Outerloop]` tests: I tried using this from the directory of the individual csproj file: `msbuild /t:clean;build;test /p:RunTestsWithCategories=Outerloop` or this: `msbuild /t:clean;build;test ""/p:XunitOptions=-trait category=outerloop""` and neither works. I have a vague memory of this working before. So, has this changed lately? " 3508 area-System.Net Change S.N.Sockets/tests to use (mostly) anonymous ports. This change only touches tests in System.Net.Sockets/tests; those under S.N.Sockets.Legacy/tests will be taken care of in a follow-up commit. 3510 area-System.Net Disabling System.Net.Sockets tests intermittently failing in CI. Disabling intermittently failing Sockets tests in CI. Related #3497 #3447 3512 area-System.IO Path.GetDirectoryName slower on Linux than Windows Core "The performance test being run: ``` [Benchmark] [InlineData(10000)] [InlineData(20000)] [InlineData(30000)] public void GetDirectoryName(int innerIterations) { string testPath = PerfUtils.GetTestFilePath(); foreach (var iteration in Benchmark.Iterations) using (iteration.StartMeasurement()) for (int i = 0; i < innerIterations; i++) { Path.GetDirectoryName(testPath); Path.GetDirectoryName(testPath); Path.GetDirectoryName(testPath); Path.GetDirectoryName(testPath); Path.GetDirectoryName(testPath); Path.GetDirectoryName(testPath); Path.GetDirectoryName(testPath); Path.GetDirectoryName(testPath); Path.GetDirectoryName(testPath); } } ``` Linux perf results (99.804 seconds): ``` ``` Windows Core perf results (4.147 seconds): ``` ``` " 3516 area-System.IO Modified PathInternal.Unix for great perf increase resolves #3515, #3515 3517 area-System.Reflection Add TypeNameParser tests @davkean Adding tests for your type name parser. I marked you as author on the commit with your original VS unit tests, then followed it up with commits to port to xunit. The port is minimal, and I have not for example bothered to convert to [Theory] etc. yet. I've also separated out the part that uses desktop-only API to compare against reflection type name parsing in to the .Desktop test project. Mind you, that project is temporary until we get test explorer working with portable tests, so I'm not sure we can keep that long term. cc @tmat Fix #534 3518 area-System.Collections Dictionary int constructor ~10 times faster on Windows than on Linux "Perf test being run: ``` [Benchmark] [InlineData(0)] [InlineData(1024)] [InlineData(4096)] [InlineData(16384)] public void ctor_int(int size) { foreach (var iteration in Benchmark.Iterations) using (iteration.StartMeasurement()) for (int i = 0; i <= 5000; i++) { new Dictionary(size); new Dictionary(size); new Dictionary(size); new Dictionary(size); new Dictionary(size); new Dictionary(size); new Dictionary(size); new Dictionary(size); new Dictionary(size); } } ``` Linux results: ``` ``` Windows results: ``` ``` Note that the because of the way the test is written, destructing of the dictionaries can be included in the measured portion. It would be worthwhile to store local copies of the dictionaries so that destruction doesn't happen within the iteration.StartMeasurement `using` so the exact problem can be narrowed down. " 3519 area-System.Net Use anonymous ports in S.N.Sockets.Legacy/test/FunctionalTests. This is a follow-up to #3508. With this change, all of the legacy functional tests use anonymous ports. This also includes a small change to `SocketPerformanceTests.cs` to address PR feedback from #3508. 3520 area-System.Threading System.Threading.Tasks.Dataflow.Tests.EtwTests.TestEtw failed in CI on OSX This is a deterministic failure as far as I can tell. ``` MESSAGE: Assert.Equal() Failure Expected: 0 Actual: 2 +++++++++++++++++++ STACK TRACE: at System.Threading.Tasks.Dataflow.Tests.EtwTests.<>c__DisplayClass7.b__1() at System.Diagnostics.Tracing.TestEventListener.RunWithCallback(Action`1 handler, Action body) at System.Threading.Tasks.Dataflow.Tests.EtwTests.TestEtw() ``` http://dotnet-ci.cloudapp.net/job/dotnet_corefx_mac_debug_tst/50/testReport/junit/System.Threading.Tasks.Dataflow.Tests/EtwTests/TestEtw/ 3524 area-System.Data Incorporate Misc code review comments for SqlClient Please refer PR https://github.com/dotnet/corefx/pull/2986 The items to be taken care of, 1. Use utility methods. 2. Remove unnecessary base class calls 3. There is Obsolete SMI code which can be removed. Followup on the SMI v1 support and clean this up. 3528 area-System.Net Using SafeHandles instead of IntPtrs in Interop.libssl Changed the Unix code to use SafeHandles cc: @stephentoub @bartonjs @rajansingh10 @shrutigarg 3532 area-System.Net SendPacketsAsync.BufferZeroCountThenNormal_ZeroCountIgnored failed in CI on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug_prtest/4396/console ``` System.Net.Sockets.Tests.SendPacketsAsync.BufferZeroCountThenNormal_ZeroCountIgnored [FAIL] Timed out Expected: True Actual: False Stack Trace: d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets.Legacy\tests\FunctionalTests\SendPacketsAsync.cs(231,0): at ``` cc: @davidsh, @cipop, @pgavlin 3533 area-System.Threading Timer_Change_BeforeDueTime_ChangesWhenTimerWillFire failed in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug/1368/console ``` TimerChangeTests.Timer_Change_BeforeDueTime_ChangesWhenTimerWillFire [FAIL] 05:19:31 Should have received a timer event after this new duration 05:19:31 Expected: True 05:19:31 Actual: False 05:19:31 Stack Trace: 05:19:31 d:\j\workspace\dotnet_corefx_windows_debug\src\System.Threading.Timer\tests\TimerChangeTests.cs(94,0): at TimerChangeTests.Timer_Change_BeforeDueTime_ChangesWhenTimerWillFire() ``` 3534 area-Infrastructure $(CommonPath) in paths causing bad Visual Studio experience. "A bunch of our .csproj files have lines like <Compile Include ""$(CommonPath)\blah\blah""> where $(CommonPath) is defined in dir.prop. This has a really bad effect on VS experience as its navigation and Intellisense engine struggle to find these files. Defining $(CommonPath) inside the individual .csproj fixes the Intellisense and still gives us some measure of encapsulation, albeit imperfect. Is the encapsulation of ""Common"" really worth this? " 3535 area-System.Data Refactor and consolidate the AdapterUtil.cs Reuse the common functions from AdapterUtil.cs The AdapterUtil is present in both Data.Common and Data.SqlClient with common functions. Refactor the AdapterUtil.cs so that most of it can reside in Data.Common 3537 area-System.Text Investigate System.Text.Encodings.Web.Tests encoding failure using XUnit Theory "We currently have this TODO in our UnicodeHelpersTests: ``` C# // This loop should instead be implemented as a [Theory] with multiple [InlineData]s. // However, until globalization support is implemented on Unix, this causes failures when // the xunit runner is configured with -xml to trace out results. When it does so with // [InlineData], the parameters get written out to the results xml file, and with our // current temporary globalization implementation on Unix, this causes exceptions like // ""The surrogate pair (0xD800, 0x22) is invalid. A high surrogate character // (0xD800 - 0xDBFF) must always be paired with a low surrogate character (0xDC00 - 0xDFFF)."" ``` However, after implementing the Encoding table on Unix, and converting this test back to a Theory, we still get a similar error running the test: `error: Invalid high surrogate character (0xDFFF). A high surrogate character must have a value from range (0xD800 - 0xDBFF).` We should investigate why this error is happening and fix it. " 3538 area-Infrastructure Discussion regarding support of CoreFX builds on non-windows OSes. "Today, building CoreFX on non windows platforms uses Mono as the runtime for all the managed code we need to run (namely MSBuild and Roslyn). The long term goal is to instead run on-top of a stable CoreCLR build. However, making this change has the possibility to regress supported build platforms since CoreCLR may not run everywhere Mono does (e.g. FreeBSD, other linux Distros, etc.) As a concrete example, our tool runtime package (which we would use to run GenFacades) contains a CoreCLR which only supports Ubuntu 14.04[1](#fr1). With buildtools 97 we are at the point now where we can actually enable GenFacades and have it work on Ubuntu 14.04, but doing so will break the build on incompatible distros. The question is, do we care enough to spend engineering effort to allow the build to work on platforms that we don't have a supported CoreCLR package for? Do we expect that when MSBuild on .NET Core lands and we try to adopt it that we will remove our mono dependency entirely? What does that mean for folks like the FreeBSD port team (/cc @janhenke), who want to build our stack on FreeBSD while they bring things up if we don't have FreeBSD packages? I know that @pgavlin is chomping at the bit to get more of the build working on Linux. It would be helpful to me as well, but we need closure here before we start going making changes that might break folks. I see a few paths forward. 1. Say that building Managed CoreFX code cross platform requires your platform be supported by CoreCLR. Since today the supported platforms are Ubuntu 14.04 and OSX, update build.sh to pass the correct RID for ToolNugetRuntimeId when invoking MSBuild. If you are on a different distro and want to go out of your way to install the correct set of dependencies so an existing supported RID can run on your distro, you're free to do so and then use that RID. 2. Do platform detection and ""light up"" when we are running on a CoreCLR supported distro. In this mode, if we are able to run CoreCLR, we prefer that otherwise we fallback to Mono. For cases where we can't fallback (e.g GenFacades) we just no-op the relevant builds tasks. 3. Make the statement that managed code that runs during build time _must_ run on Mono and _may_ run on CoreCLR. This is like (2) expect it means we can always fallback. This is not true today. I'm interested in getting everyone's take on this. Maybe I'm freaking out over nothing and I can go ahead and just do (1) without anyone getting upset. 1 Technically, this could mean any OS that has a set of libraries which are binary compatible with the versions of our dependencies in Ubuntu 14.04. For some dependencies this is easy (i.e. the version of openssl that is in another distro's package manager is probably binary compatible with the version in Ubuntu 14.04, but the version of the ICU library is probably not, since they decorate their export names per version). " 3541 area-System.Net Remove Assert(asynchronous failure) from Sockets tests. In principle, any call that fails ansynchronously may also fail synchronously. 3542 area-System.Net Should sockets performance tests be inner loop? These tests have failed to meet the baseline a few times, but they pass on re-run. http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug_prtest/4407/testReport/junit/System.Net.Sockets.Performance.Tests/SocketPerformanceAPMTests/SocketPerformance_SingleSocketClientAsync_LocalHostServerAPM/ When the CI System runs jobs, it can run multiple jobs on the same machine at the same time, could that be causing problems or are there real problems here that we should be investigating? It seems like the long term plan is that we move to @ianhays's [Performance] stuff. Can we just adopt these changes for that instead of having yet another perf testing thing that also runs inner loop? /cc @CIPop @davidsh @pgavlin @bartonjs. 3543 area-Infrastructure Repo organization guidelines for Common\tests Currently, there's a free-for-all regarding how code is placed in `src/Common/tests` folders, unlike the `src/Common/src` folder tree which has clear guidelines. There are a few proposals: 1) Mirror the `src/Common/src` idea and have everything properly aligned to the namespace. So, the folder paths would look like this: `src/Common/tests/System/Net/Http/HelperClass.cs`. Note that each namespace path is one word only per part in the pathname. This seems to be the most logical choice although. It could create some confusion at first since, for example, Sockets tests will add to Threading, EventSource and Resources but in the end will allow for better organization, review and increase code reuse. 2) Organize `src/Common/tests` per namespace ownership: /System.Net; /System.Xml, etc. So, the folder paths would look like this: `src/Common/tests/System.Net.Http/HelperClass.cs` This is partially what's going on today although there are folders that aren't fully specifying the namespace such as Collections, Compression, etc. Please add your opinions. 3544 area-System.Globalization "[Linux] Default locale is ""Invariant Language (Invariant Country)""" "Odd default locale with Core CLR on Linux: It is the invariant locale rather than the expected ""English (United States)"". Test just examines `Culture.CurrentCulture.EnglishName` and `Culture.CurrentUICulture.EnglishName`. Mono gets this right on the system system. I'm using `System.Globalization/4.0.11-beta-23326`, `System.Globalization.Extensions/4.0.1-beta-23326` and `System.Runtime/4.0.21-beta-23326` for most-recent tests of this scenario. " 3546 area-System.Linq Stack overflow enumerating EnumerableQuery created from null enumerable `EnumerableQuery` can be created passing null a `Expression`, an inappropriately typed `Expression`, a null `IEnumerable`, or a null value of a derived type. Blocking this would be a breaking change, especially since such objects can be usefully used as query providers. Calling `GetEnumerator()` on most such cases result in an `ArgumentNullException` or `ArgumentException`, which could probably be improved (another exception might be more appropriate), but if the constructor was passed a null `IEnumerable` then `GetEnumerator()` hits two cases where it would go into infinite recursion. First when the expression is visited, it is then recursively visited again until stack overflow. Potentially there are other ways this path could be hit, and so other bugs it could cause. If this is fixed, then `GetEnumerator()` itself will then delegate to its own `GetEnumerator()` causing infinite recursion again. ``` C# [Fact] public void NullEnumerableConstantNullExpression() { IQueryable query = new EnumerableQuery((IEnumerable)null); var exp = (ConstantExpression)query.Expression; query.GetEnumerator(); // stack overflow. } ``` 3548 area-System.Net Move Sockets performance tests into [OuterLoop]. Fixes #3495, #3542. 3550 area-System.Net Why HttpClient can't run on linux(coreclr-1.0.0-beta8-15776) "It's not ready yet? ``` C# using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Net.Http; namespace ConsoleApp2 { public class Program { public void Main(string[] args) { using (HttpClient client = new HttpClient()) { Task task = client.GetStringAsync(""https://github.com/""); task.Wait(); Console.WriteLine(task.Result); } Console.WriteLine(""exit!!""); } } } ``` ``` System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Http, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'System.Net.Http, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ---> System.IO.FileNotFoundException: Could not load the specified file. File name: 'System.Net.Http' at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) at ConsoleApp2.Program.Main(String[] args) at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider) at Microsoft.Dnx.ApplicationHost.Program.ExecuteMain(DefaultHost host, String applicationName, String[] args) at Microsoft.Dnx.ApplicationHost.Program.Main(String[] args) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider) at Microsoft.Dnx.Host.Bootstrapper.RunAsync(List`1 args, IRuntimeEnvironment env, String appBase, FrameworkName targetFramework) at Microsoft.Dnx.Host.RuntimeBootstrapper.ExecuteAsync(String[] args, BootstrapperContext bootstrapperContext) at Microsoft.Dnx.Host.RuntimeBootstrapper.Execute(String[] args, BootstrapperContext bootstrapperContext) System.IO.FileNotFoundException: Could not load the specified file. File name: 'System.Net.Http' at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) ``` " 3554 area-System.Net Add more HTTP tests - Add more tests ported from the internal ToF tests. - Cleanup existing tests to be consistent in style and format as it has drifted due to many different people working on the tests. - Disposing the HttpClient object will dispose the handler as well so we don't need multiple 'using' statements unless we are explicitly testing dispose ordering semantics. 3555 area-System.Net System.Net.Http (Linux) allows insecure HTTPS -> HTTP redirect Discovered during PR #3554 Test failure: System.Net.Http.Functional.Tests.HttpClientHandlerTest.GetAsync_AllowAutoRedirectTrue_RedirectFromHttpsToHttp_StatusCodeRedirect MESSAGE: Assert.Equal() Failure Expected: Redirect Actual: OK +++++++++++++++++++ STACK TRACE: at System.Net.Http.Functional.Tests.HttpClientHandlerTest.d__44.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 3556 area-System.Linq Interpreting dynamic expressions failed Hello, a really Q&D example for showing the issue. First the simple callsitebinder: ``` C# private class BinaryCallSiteBinder : BinaryOperationBinder { public BinaryCallSiteBinder() : base(ExpressionType.Add) { } public override DynamicMetaObject FallbackBinaryOperation(DynamicMetaObject target, DynamicMetaObject arg, DynamicMetaObject errorSuggestion) { return new DynamicMetaObject( Expression.Convert( Expression.Add( Expression.Convert(target.Expression, typeof(int)), Expression.Convert(arg.Expression, typeof(int)) ), typeof(object)), BindingRestrictions.GetTypeRestriction(target.Expression, typeof(int)).Merge( BindingRestrictions.GetTypeRestriction(arg.Expression, typeof(int)) )); } } ``` And the calling code: ``` C# var expr = DynamicExpression.Dynamic(new BinaryCallSiteBinder(), typeof(object), Expression.Constant(40, typeof(object)), Expression.Constant(2, typeof(object))); var f = Expression.Lambda>(expr); var f2 = f.Compile(); textbox1.Text = f2().ToString(); ``` If I run the code under Windows 8.1 Phone or the desktop .net framework, it works fine. But under Windows 10 UWP (it should .net core) I get the following exception: ``` System.ArgumentException wurde nicht von Benutzercode behandelt. HResult=-2147024809 Message=Expression of type 'System.Object' cannot be used for parameter of type 'System.Runtime.CompilerServices.CallSite' of method 'Boolean SetNotMatched(System.Runtime.CompilerServices.CallSite)' Source=System.Linq.Expressions StackTrace: at System.Dynamic.Utils.ExpressionUtils.ValidateOneArgument(MethodBase method, ExpressionType nodeKind, Expression arg, ParameterInfo pi) at System.Linq.Expressions.Expression.Call(MethodInfo method, Expression arg0) at System.Runtime.CompilerServices.CallSite`1.CreateCustomNoMatchDelegate(MethodInfo invoke) at System.Runtime.CompilerServices.CallSite`1.MakeUpdateDelegate() at System.Runtime.CompilerServices.CallSite`1.GetUpdateDelegate(T& addr) at System.Runtime.CompilerServices.CallSite`1.GetUpdateDelegate() at System.Runtime.CompilerServices.CallSite`1.Create(CallSiteBinder binder) at System.Runtime.CompilerServices.CallSite.Create(Type delegateType, CallSiteBinder binder) at System.Linq.Expressions.DynamicExpression.Reduce() at System.Linq.Expressions.Interpreter.LightCompiler.CompileNoLabelPush(Expression expr) at System.Linq.Expressions.Interpreter.LightCompiler.Compile(Expression expr) at System.Linq.Expressions.Interpreter.LightCompiler.CompileTop(LambdaExpression node) at System.Linq.Expressions.Expression`1.Compile() at TestLua.MainPage.btnClick_Click(Object sender, RoutedEventArgs e) ``` What is wrong? 3557 area-System.Net System.Net.Http (Linux) not passing credentials (in cache) during redirect Discovered during PR #3554 Test Failure: System.Net.Http.Functional.Tests.HttpClientHandlerTest.GetAsync_CredentialIsCredentialCacheUriRedirect_StatusCodeOK MESSAGE: Assert.Equal() Failure Expected: OK Actual: Unauthorized +++++++++++++++++++ STACK TRACE: at System.Net.Http.Functional.Tests.HttpClientHandlerTest.d__5c.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 3558 area-System.Console Expose System.Console.WindowWidth Azure CLI would like us to expose WindowWidth property 3559 area-System.Console Expose System.Console.CursorVisible Azure CLI would like us to expose this property 3562 area-System.Net Tracking issues for System.Net.NetworkInformation and System.Net.Utilities This issue is tracking TODOs and Shims removal for PR #: - [ ] Replace Interop.\* with OS names from the SDK (iphlpapi) - [ ] Unify error codes for Win32 (see Interop.ErrorCodes.cs in iphlpapi) - [ ] Investigate DangerousAddRef then Dispose within `SafeCloseSocketAndEvent::CompleteInitialization(...)` - [ ] In NetworkAddressChange.cs : > @stephentoub: We're invoking the user's callback while holding s_syncObject. There are trivial ways that could lead to deadlock (e.g. if the callback queued and waited on a work item that tried to add a handler), though maybe we don't care about such degenerate patterns? - [ ] In NetworkAddressChange.cs: StartHelper() > @ stephentoub: Is it not possible for both IPv4 and IPv6 to be supported and in the start options? If it is possible, we're overwriting statics that were just set in the previous section. > > > @CIPop Collaborator > > CIPop added a note just now > > Indeed, s_registeredWait is overwritten. There are other issues with this implementation: the RegisteredWaitHandle is never unregistered. https://msdn.microsoft.com/en-us/library/w9f75h7a(v=vs.110).aspx: > > > When you are finished using the RegisteredWaitHandle that is returned by this method, call its RegisteredWaitHandle.Unregister method to release references to the wait handle. We recommend that you always call the RegisteredWaitHandle.Unregister method, even if you specify true for executeOnlyOnce 3563 area-System.Collections Add System.Collections.Concurrent.ConcurrentHashSet "We already have classes in the `System.Collections.Concurrent` namespace that provide (mostly) equivalent APIs to most of those in the `System.Collections.Generic` namespace. However, one omission is a concurrent equivalent for `System.Collections.Generic.HashSet`. At the moment, if a thread-safe hash set is needed, we are left with one of three options: - Creating a thread-safe collection class from scratch. - Synchronizing `System.Collections.Generic.HashSet` in a wrapper class. - Using `System.Collections.Concurrent.ConcurrentDictionary` with ""dummy"" values such as `object` or `byte`, either directly or through a wrapper. None of these approaches is ideal. The first and second option are both error prone (concurrency is hard) and difficult to fully optimize. The third wastes memory and time spent allocating the dummy objects. It seems reasonable to expect such a class wouldn't be too challenging to create given that it would appear to mostly consist of reducing the functionality in the already-existing `ConcurrentDictionary` class (though that one is ~2,000 line long, so...). " 3564 area-System.Net Add unidirectional tests for Socket.{Send,Receive}. These tests send data in a loop from one socket to another and check that all data was correctly received. There are tests for each of: - {SendTo,ReceiveFrom} - {Begin,End}{SendTo,ReceiveFrom} - {SendTo,ReceiveFrom}Async - {Send,Receive} - {Begin,End}{Send,Receive} - {Send,Receive}Async The SendTo/ReceiveFrom tests use UDP sockets; the others use TCP sockets. All tests use either the IPv4 or IPv6 loopback interface. 3565 area-System.Net System.Net.Http (Linux) doesn't support ChannelBinding Test (HttpClientHandlerTest.cs) PostAsync_Post_ChannelBindingHasExpectedValue() fails because it returns a NULL value for ChannelBinding. 3566 area-System.Runtime Perf: Environment.ExpandEnvironmentVariables 4x slower on Linux "Perf test: ``` PerfUtils utils = new PerfUtils(); string env = utils.CreateString(15); string inputEnv = ""%"" + env + ""%""; try { // setup the environment variable so we can read it Environment.SetEnvironmentVariable(env, ""value""); // read the valid environment variable foreach (var iteration in Benchmark.Iterations) using (iteration.StartMeasurement()) for (int i = 0; i < 40000; i++) { Environment.ExpandEnvironmentVariables(inputEnv); Environment.ExpandEnvironmentVariables(inputEnv); Environment.ExpandEnvironmentVariables(inputEnv); Environment.ExpandEnvironmentVariables(inputEnv); Environment.ExpandEnvironmentVariables(inputEnv); Environment.ExpandEnvironmentVariables(inputEnv); Environment.ExpandEnvironmentVariables(inputEnv); Environment.ExpandEnvironmentVariables(inputEnv); Environment.ExpandEnvironmentVariables(inputEnv); Environment.ExpandEnvironmentVariables(inputEnv); } } finally { // clear the variable that we set Environment.SetEnvironmentVariable(env, null); } ``` Linux results: ``` ``` Windows results: ``` ``` " 3568 area-System.Runtime Perf: Environment.GetEnvironmentVariable 4x slower on Linux "Perf test: ``` [Benchmark] public void GetEnvironmentVariable() { PerfUtils utils = new PerfUtils(); string env = utils.CreateString(15); try { // setup the environment variable so we can read it Environment.SetEnvironmentVariable(env, ""value""); // read the valid environment variable for the test foreach (var iteration in Benchmark.Iterations) using (iteration.StartMeasurement()) for (int i = 0; i < 40000; i++) { Environment.GetEnvironmentVariable(env); Environment.GetEnvironmentVariable(env); Environment.GetEnvironmentVariable(env); Environment.GetEnvironmentVariable(env); Environment.GetEnvironmentVariable(env); Environment.GetEnvironmentVariable(env); Environment.GetEnvironmentVariable(env); Environment.GetEnvironmentVariable(env); Environment.GetEnvironmentVariable(env); } } finally { // clear the variable that we set Environment.SetEnvironmentVariable(env, null); } } ``` Linux results: ``` ``` Windows results: ``` ``` " 3569 area-System.Runtime System.Runtime.Loader.Tests.AssemblyLoadContextTest.InitializeDefaultContextTest failing on Linux in CI For example: http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst_prtest/2896/ 3570 area-System.Net Fix Net.NameResolutionPal.Unix when sockaddr shim'ing work comes in The System.Net.NameResolutionPal.Unix::TryGetAddrInfo function does a lot of copying a bit twiddling according to sockaddr sizes per-platform. This should be cleaned up when the sockaddr struct is shim'd 3571 area-System.Runtime Perf: DateTime.Now 3x slower on Linux "Perf test: ```c# [Benchmark] public void GetNow() { DateTime dt; foreach (var iteration in Benchmark.Iterations) using (iteration.StartMeasurement()) for (int i = 0; i < 10000; i++) { dt = DateTime.Now; dt = DateTime.Now; dt = DateTime.Now; dt = DateTime.Now; dt = DateTime.Now; dt = DateTime.Now; dt = DateTime.Now; dt = DateTime.Now; dt = DateTime.Now; } } ``` Linux results: ```xml ``` Windows results: ```xml ``` " 3572 area-System.Runtime Perf: new Random() 2x slower on Linux "Perf test: ``` [Benchmark] public void ctor() { foreach (var iteration in Benchmark.Iterations) using (iteration.StartMeasurement()) for (int i = 0; i < 40000; i++) { new Random(); new Random(); new Random(); new Random(); new Random(); new Random(); new Random(); new Random(); new Random(); } } ``` Linux results: ``` ``` Windows results: ``` ``` I expect this is due to the use of DateTime.Now as the seed for the default Random constructor, making this related to #3571 " 3573 area-System.Runtime Perf: Guid.NewGuid 200x slower on Linux "Perf test: ``` [Benchmark] public void NewGuid() { foreach (var iteration in Benchmark.Iterations) using (iteration.StartMeasurement()) for (int i = 0; i < 10000; i++) { Guid.NewGuid(); Guid.NewGuid(); Guid.NewGuid(); Guid.NewGuid(); Guid.NewGuid(); Guid.NewGuid(); Guid.NewGuid(); Guid.NewGuid(); Guid.NewGuid(); } } ``` Linux results: ``` ``` Windows results: ``` ``` " 3574 area-System.Runtime Perf: String.ToUpper and String.ToLower 3x slower on Linux "Perf test and relevant helper methods: ``` [Benchmark] [MemberData(""TestStringSizes"")] public void ToUpper(int size) { PerfUtils utils = new PerfUtils(); string testString = utils.CreateString(size); foreach (var iteration in Benchmark.Iterations) using (iteration.StartMeasurement()) for (int i = 0; i < 10000; i++) testString.ToUpper(); } public static IEnumerable TestStringSizes() { yield return new object[] { 10 }; yield return new object[] { 100 }; yield return new object[] { 1000 }; } /// /// Helper method to create a string containing a number of random /// characters equal to the specified length /// public string CreateString(int length) { byte[] bytes = new byte[length]; rand.NextBytes(bytes); return System.Convert.ToBase64String(bytes); } ``` Linux results (same for ToLower) for length=1000: ``` ``` Windows results (same for ToUpper) for length=1000: ``` ``` Results for other lengths are similar but less severe. I have excluded them for the conciseness but may post them if desired. " 3575 area-System.Net Fix a bug in Windows async sockets. Consider the following sequence of events for a SocketAsyncEventArgs `args` and a non-null `byte` buffer `buf`: 1. `args._buffer` is set to `buf` via `args.SetBuffer(buf, 0, buf.Length)` 2. Some asychronous call is made using `args` (e.g. `socket.SendAsync(args)`) 3. The asynchronous call completed 4. `args._buffer` is set to `null` via `args.SetBuffer(null, 0, 0)` 5. A GC occurs that relocates `buf`. 6. `args._buffer` is reset to `buf` via `args.SetBuffer(buf, 0, buf.Length)` 7. Another asynchronous call is made using `args` (e.g. `socket.SendAsync(args)`) - (2) will pin `buf` via a `PreAllocatedOverlapped` instance, store the instance in `args._preAllocatedOverlapped`, set `args._pinState` to `PinState.SingleBuffer`, set up a native overlapped object, and finally set `args._ptrNativeOverlapped` to a safe handle that wraps the overlapped object. - (3) will dispose the handle stored in `args._ptrNativeOverlapped` and set `args._ptrNativeOverlapped` to `null`. - (4) will call `args.FreeOverlapped`, which will dispose `args._preAllocatedOverlapped` (thus unpinning `buf`) and set `args._preAllocatedOverlapped` to `null`. `args._pinState` and related fields will not be updated: the code that does so is conditional upon `args._ptrNativeOverlapped` being non-`null`, and (3) already set the same to `null`. - (6) will call `args.CheckPinSingleBuffer`, which will observe that `args._pinState` is `PinState.SingleBuffer` and `_pinnedSingleBuffer` is the same as `_buffer` and consider the buffer already pinned. As a result, the call will not re-pin `buf`. - Because (6) did not re-pin `buf`, the asynchronous call made in (7) will reuse the address at which the buffer was located the last time it was pinned. At best, this address is no longer mapped and the call results in an AV; at worst, this address contains unknown (and potentially sensitive) data. The fix is to reset `_pinState` and related fields when `_preAllocatedOverlapped` is disposed. 3576 area-Infrastructure Is there a Resharper settings file for this coding style? I personally dislike the default R# C# coding style configuration. It would be nice to have R# configured for this coding style. Then I could use R#'s code reformatting functionality to bring code into line. :-) While the stand-alone CodeFormatter.exe is nice to have, for the rest of my team, if it isn't integrated into their VS workflow it might as well not exist. 3578 area-System.Net CURL Handler redirect fixes This commit fixes the following issues in CurlHandler w.r.t following URI redirection - Ensure that the credentials are nullified at the right place. We should not set username and/or password to null unnecessarily. - Ensure that libcurl follows only HTTPS uri if the original request was for a HTTPS URL. - Ensure that libcurl follows only a HTTPS or a HTTP uri if the original request was for a HTTP URL. 3580 area-System.Net NullReferenceException in System.Net.Sockets.Tests.Disconnect.Success on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug_prtest/4466/console ``` C# Discovering: System.Net.Sockets.AsyncServer.Tests Discovered: System.Net.Sockets.AsyncServer.Tests Starting: System.Net.Sockets.AsyncServer.Tests System.Net.Sockets.Tests.Disconnect.Success [FAIL] System.NullReferenceException : Object reference not set to an instance of an object. Stack Trace: d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets\src\System\Net\Sockets\Socket.Windows.cs(86,0): at System.Net.Sockets.Socket.DisconnectExBlocking(IntPtr socketHandle, IntPtr overlapped, Int32 flags, Int32 reserved) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets\src\System\Net\Sockets\SocketPal.Windows.cs(156,0): at System.Net.Sockets.SocketPal.Disconnect(Socket socket, SafeCloseSocket handle, Boolean reuseSocket) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs(2600,0): at System.Net.Sockets.Socket.Disconnect(Boolean reuseSocket) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets.Legacy\tests\FunctionalTests\Disconnect.cs(42,0): at System.Net.Sockets.Tests.Disconnect.Success() Finished: System.Net.Sockets.AsyncServer.Tests ``` cc: @davidsh, @cipop, @pgavlin 3583 area-System.Threading Timer_Change_BeforeDueTime_ChangesWhenTimerWillFire test fails A timer test failed on PR here: http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug_prtest/4494/testReport/junit/(root)/TimerChangeTests/Timer_Change_BeforeDueTime_ChangesWhenTimerWillFire/ MESSAGE: Should have received a timer event after this new duration Expected: True Actual: False +++++++++++++++++++ STACK TRACE: at TimerChangeTests.Timer_Change_BeforeDueTime_ChangesWhenTimerWillFire() in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Threading.Timer\tests\TimerChangeTests.cs:line 94 3588 area-System.Collections Perf: System.Collections List, Dictionary default constructors 2x slower on Linux "Perf Tests: ``` [Benchmark] public void ctor() { foreach (var iteration in Benchmark.Iterations) using (iteration.StartMeasurement()) for (int i = 0; i <= 20000; i++) { new Dictionary(); new Dictionary(); new Dictionary(); new Dictionary(); new Dictionary(); new Dictionary(); new Dictionary(); new Dictionary(); new Dictionary(); } } [Benchmark] public void ctor() { foreach (var iteration in Benchmark.Iterations) using (iteration.StartMeasurement()) { for (int i = 0; i < 20000; i++) { new List(); new List(); new List(); new List(); new List(); new List(); new List(); new List(); new List(); new List(); new List(); new List(); new List(); new List(); new List(); } } } ``` Linux perf results for Dictionary: ``` ``` Windows perf results for Dictionary: ``` ``` Linux perf results for List: ``` ``` Windows perf results for List ``` ``` Note that these results are only for the default constructors. Results for `new Dictionary(int size)`, `new List(int size)`, and `new List(IEnumerable enumerable)` are even across platforms. I suspect we would get similar results for other collections, but I have yet to add tests for any other generic collections Confirmed these results with the old-fashioned Stopwatch-around-the-iteration-loop method. " 3590 area-System.Collections Perf: NonGeneric.HashTable default constructor 4x slower on Linux "Perf test: ``` [Benchmark] public void ctor() { foreach (var iteration in Benchmark.Iterations) using (iteration.StartMeasurement()) { for (int i = 0; i < 40000; i++) { new Hashtable(); new Hashtable(); new Hashtable(); new Hashtable(); new Hashtable(); new Hashtable(); new Hashtable(); new Hashtable(); new Hashtable(); new Hashtable(); new Hashtable(); new Hashtable(); new Hashtable(); new Hashtable(); new Hashtable(); new Hashtable(); new Hashtable(); new Hashtable(); new Hashtable(); new Hashtable(); } } } ``` Linux results: ``` ``` Windows results: ``` ``` Probably somehow related to #3588. Confirmed results with Stopwatch. " 3591 area-System.IO Perf: Directory.GetCurrentDirectory 20% slower on Linux "Low priority, could use more investigation: Perf test: ``` [Benchmark] public void GetCurrentDirectory() { foreach (var iteration in Benchmark.Iterations) using (iteration.StartMeasurement()) for (int i = 0; i < 20000; i++) { Directory.GetCurrentDirectory(); Directory.GetCurrentDirectory(); Directory.GetCurrentDirectory(); Directory.GetCurrentDirectory(); Directory.GetCurrentDirectory(); Directory.GetCurrentDirectory(); Directory.GetCurrentDirectory(); Directory.GetCurrentDirectory(); Directory.GetCurrentDirectory(); } } ``` Linux results: ``` ``` Windows results: ``` ``` " 3592 area-System.Linq System.Linq.Parallel test hanging in Linux CI The CTT_NonSorting_AsynchronousMergerEnumeratorDispose seems to hang sometime in CI with a callstack that looks like this: ``` System.Threading.ManualResetEventSlim.Wait() System.Threading.ManualResetEventSlim.Wait(Int32, System.Threading.CancellationToken) System.Linq.Parallel.AsynchronousChannelMergeEnumerator`1[[System.Int32, mscorlib]].MoveNext() System.Linq.Parallel.QueryOpeningEnumerator`1[[System.Int32, mscorlib]].MoveNext() System.Linq.Parallel.Tests.WithCancellationTests.CTT_NonSorting_AsynchronousMergerEnumeratorDispose ``` Don't really have more details. If you would like, next time see it in CI I can hold the machine for you. 3598 area-System.Reflection Make signature and attribute decoders instances This is a new take based on the discussion on closed PR #1068. There's also some small cleanup in the other two commits. I'm going to merge this if it passes CI since dev/metadata is effectively a dead-end now. I'll resurface the SignatureDecoder with these changes in a new PR to master. Having this work captured in dev/metadata will just make it easier to reconcile things after the portable PDB and SignatureDecoder are merged to master. That will leave only CustomAttributeDecoder and TypeNameParser as features in dev but not master and we should cherry-pick those over to a new branch for v1.2 dev. 3600 area-System.Net Porting System.Net.NetworkInformation and System.Net.Utilities Will squash commits and change the author prior to commit. Note to reviewers: `Initial file port` represents the action of copying files from the dev-branch. It's probably simpler to leave comments on individual commit steps. @mellinoe @davidsh @pgavlin @stephentoub PTAL /cc @vijaykota @SidharthNabar @sokket (heads-up as this might be breaking #3471) 3601 area-System.Reflection Merge master -> dev/metadata No conflicts 3607 area-System.Linq QueryEnumerable only accepts expression features prior to Framework version 4.0 "Any expression type introduced after 3.5 will fail with an `ArgumentException`: ``` C# [Fact] public void Block() { Expression block = Expression.Block( Expression.Empty(), Expression.Constant(Enumerable.Range(0, 2).AsQueryable()) ); IQueryable q = _prov.CreateQuery(block); Assert.Equal(Enumerable.Range(0, 2), q); // ""Unhandled Expression Type: Block"" } ``` Expressions that existed with 3.5, but using features from 4.0 will also fail with an `ArgumentException`: ``` C# [Fact] public void ExplicitlyTypedConditional() { Expression call = Expression.Call( typeof(Queryable), ""OfType"", new[] { typeof(long) }, Expression.Condition( Expression.Constant(true), Expression.Constant(new long?[] { 2, 3, null, 1 }.AsQueryable()), Expression.Constant(Enumerable.Range(0, 3).AsQueryable().Select(i => (long)i)), typeof(IQueryable) ) ); IQueryable q = _prov.CreateQuery(call); Assert.Equal(new long[] { 2, 3, 1 }, q); // ""Argument types do not match"" } ``` " 3609 area-System.Net GSS-API bindings Are there any plans to implement GSS-API bindings? So that services running on linux could do domain authentication. 3610 area-System.Net SendToRecvFromAsync_Single_Datagram_UDP_IPv6 failed in CI on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx_outerloop_windows_debug/721/console ``` Discovering: System.Net.Sockets.Tests Discovered: System.Net.Sockets.Tests Starting: System.Net.Sockets.Tests System.Net.Sockets.Tests.SendReceive.SendToRecvFromAsync_Single_Datagram_UDP_IPv6 [FAIL] Assert.Equal() Failure Expected: 0 Actual: 2037238909 Stack Trace: d:\j\workspace\dotnet_corefx_outerloop_windows_debug\src\System.Net.Sockets\tests\FunctionalTests\SendReceive.cs(124,0): at System.Net.Sockets.Tests.SendReceive.SendToRecvFromAsync_Datagram_UDP(IPAddress leftAddress, IPAddress rightAddress) d:\j\workspace\dotnet_corefx_outerloop_windows_debug\src\System.Net.Sockets\tests\FunctionalTests\SendReceive.cs(315,0): at System.Net.Sockets.Tests.SendReceive.SendToRecvFromAsync_Single_Datagram_UDP_IPv6() Finished: System.Net.Sockets.Tests === TEST EXECUTION SUMMARY === System.Net.Sockets.Tests Total: 6, Errors: 0, Failed: 1, Skipped: 0, Time: 2.399s ``` cc: @davidsh, @cipop, @pgavlin 3611 area-System.Net Disable SendToRecvFromAsync_Single_Datagram_UDP_IPv6 test cc: @davidsh, @cipop, @pgavlin #3610 3614 area-System.Reflection Merge master to dev/metadata No literal conflict, but had to add bf192c7 to make buildtools happy. 3616 area-System.Globalization Fix Serbian date formats "In the following cultures sr-Cyrl-XK sr-Latn-ME sr-Latn-RS sr-Latn-XK it has wrong date pattern as ""d. M. yyyy."". the CLDR don't include spaces. the problem with that is parser get confused between the date and the time separator and fail parse these dates. these cultures has time pattern as hh.mm.ss. so we'll have date separator as "". "" and time separator as ""."". The fix is we need to remove the spaces in the date pattern to allow the parser detect such special cases and work. if we cannot fix the format then we'll need to work around this in the parser but this comes with the regression risk. " 3617 area-System.Net Fix a bug in the Socket constructor. Only the Windows constuctor was throwing the appropriate exceptions due to misplacement of the `throw` behind the PAL. The `throw` has been moved into the platform-independent code and tests have been added. 3620 area-System.Data Add Return Value for SendControlPacket in SNIMarsHandle 3621 area-System.Data Add SetBufferSize Methods To All SNIHandle Classes 3622 area-System.Data Add Async Overrides to SslOverTdsStream 3623 area-Infrastructure System.IO.Compression.Tests solution not building on Visual Studio 2015 "It does build with build.cmd, but if you open it and try to build it from the solution file with my current environment these are the errors. ``` Restoring NuGet packages... To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages during build.' System.Linq.Expressions 4.0.0 provides a compile-time reference assembly for System.Linq.Expressions on DNXCore,Version=v5.0, but there is no run-time assembly compatible with win7-x86. System.Console 4.0.0-beta-23401 provides a compile-time reference assembly for System.Console on DNXCore,Version=v5.0, but there is no run-time assembly compatible with win7-x86. System.ObjectModel 4.0.0 provides a compile-time reference assembly for System.ObjectModel on DNXCore,Version=v5.0, but there is no run-time assembly compatible with win7-x86. System.Runtime.InteropServices.RuntimeInformation 4.0.0-beta-23401 provides a compile-time reference assembly for System.Runtime.InteropServices.RuntimeInformation on DNXCore,Version=v5.0, but there is no run-time assembly compatible with win7-x86. System.Security.Cryptography.Algorithms 4.0.0-beta-23401 provides a compile-time reference assembly for System.Security.Cryptography.Algorithms on DNXCore,Version=v5.0, but there is no run-time assembly compatible with win7-x86. System.Text.RegularExpressions 4.0.0 provides a compile-time reference assembly for System.Text.RegularExpressions on DNXCore,Version=v5.0, but there is no run-time assembly compatible with win7-x86. Some packages are not compatible with DNXCore,Version=v5.0 (win7-x86). System.Linq.Expressions 4.0.0 provides a compile-time reference assembly for System.Linq.Expressions on DNXCore,Version=v5.0, but there is no run-time assembly compatible with win7-x64. System.Console 4.0.0-beta-23401 provides a compile-time reference assembly for System.Console on DNXCore,Version=v5.0, but there is no run-time assembly compatible with win7-x64. System.ObjectModel 4.0.0 provides a compile-time reference assembly for System.ObjectModel on DNXCore,Version=v5.0, but there is no run-time assembly compatible with win7-x64. System.Runtime.InteropServices.RuntimeInformation 4.0.0-beta-23401 provides a compile-time reference assembly for System.Runtime.InteropServices.RuntimeInformation on DNXCore,Version=v5.0, but there is no run-time assembly compatible with win7-x64. System.Security.Cryptography.Algorithms 4.0.0-beta-23401 provides a compile-time reference assembly for System.Security.Cryptography.Algorithms on DNXCore,Version=v5.0, but there is no run-time assembly compatible with win7-x64. System.Text.RegularExpressions 4.0.0 provides a compile-time reference assembly for System.Text.RegularExpressions on DNXCore,Version=v5.0, but there is no run-time assembly compatible with win7-x64. Some packages are not compatible with DNXCore,Version=v5.0 (win7-x64). NuGet package restore failed. 1>------ Build started: Project: System.IO.Compression, Configuration: Linux_Debug Any CPU ------ 1> System.IO.Compression -> G:\CoreCLR\corefx\bin\Linux.AnyCPU.Debug\System.IO.Compression\System.IO.Compression.dll 2>------ Build started: Project: System.IO.Compression.Tests, Configuration: Debug Any CPU ------ 2>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3274: The primary reference ""G:\CoreCLR\corefx\packages/Microsoft.DotNet.xunit.performance\1.0.0-alpha-build0022\lib\dotnet\xunit.performance.core.dll"" could not be resolved because it was built against the "".NETPortable,Version=v5.0"" framework. This is a higher version than the currently targeted framework "".NETPortable,Version=v4.5,Profile=Profile7"". 2>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3275: The primary reference ""G:\CoreCLR\corefx\packages/Microsoft.DotNet.xunit.performance\1.0.0-alpha-build0022\lib\dotnet\xunit.performance.execution.dotnet.dll"" could not be resolved because it has an indirect dependency on the assembly ""xunit.performance.core, Version=1.0.0.22, Culture=neutral, PublicKeyToken=67066efe964d3b03"" which was built against the "".NETPortable,Version=v5.0"" framework. This is a higher version than the currently targeted framework "".NETPortable,Version=v4.5,Profile=Profile7"". 2>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3274: The primary reference ""G:\CoreCLR\corefx\packages/Microsoft.DotNet.xunit.performance\1.0.0-alpha-build0022\lib\dotnet\xunit.performance.execution.dotnet.dll"" could not be resolved because it was built against the "".NETPortable,Version=v5.0"" framework. This is a higher version than the currently targeted framework "".NETPortable,Version=v4.5,Profile=Profile7"". 2> System.IO.Compression.Tests -> G:\CoreCLR\corefx\bin\Windows_NT.AnyCPU.Debug\System.IO.Compression.Tests\System.IO.Compression.Tests.dll ========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== ``` From the error message it looks like there are issues with some of the dependencies. How build.cmd manages to work is a mystery at least to me (unless it is not building the Test projects). > dnvm list > > ``` > Active Version Runtime Architecture Location Alias > ------ ------- ------- ------------ -------- ----- > 1.0.0-beta7 clr x86 C:\Users\Federico\.dnx\runtimes default > 1.0.0-beta7 coreclr x64 C:\Users\Federico\.dnx\runtimes > * 1.0.0-rc1-15779 coreclr x64 C:\Users\Federico\.dnx\runtimes > ``` Any idea on how to solve this? " 3624 area-System.Data Improve Managed SNI Performance With Async Delegate Caching 3625 area-System.Net Beta 8 blocker: IPAddress.ToString and .Parse fails on OS X with DNX "Example program: ``` csharp using System; using System.Net; namespace Test { public class Program { public void Main(string[] args) { System.Console.WriteLine(""Test!""); IPAddress.Loopback.ToString(); // Parse also causes the process to crash var ipAddress = IPAddress.Parse(""1.1.1.1""); Console.WriteLine(""IP address: {0}"", ipAddress); } } } ``` Stack Trace: ``` System.Net.Sockets.SocketException: Input/output error at System.Net.IPAddressParser.IPv4AddressToString(Byte[] numbers) at System.Net.IPAddress.ToString() at Test.Program.Main(String[] args) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider) at Microsoft.Dnx.ApplicationHost.Program.ExecuteMain(DefaultHost host, String applicationName, String[] args) at Microsoft.Dnx.ApplicationHost.Program.Main(String[] args) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider) at Microsoft.Dnx.Host.Bootstrapper.RunAsync(List`1 args, IRuntimeEnvironment env, String appBase, FrameworkName targetFramework) at Microsoft.Dnx.Host.RuntimeBootstrapper.ExecuteAsync(String[] args, BootstrapperContext bootstrapperContext) at Microsoft.Dnx.Host.RuntimeBootstrapper.Execute(String[] args, BootstrapperContext bootstrapperContext) ``` There is no exception or stack trace from “IPAddress.Parse(""1.1.1.1"")”. The process just crashes. Use the latest DNX (`dnx-coreclr-darwin-x64.1.0.0-beta8-15794`) from `aspnetrelease` feed. There's a reference issue that we're fixing that you'll need to workaround. Just copy `runtime.unix.Microsoft.Win32.Primitives/4.0.1-beta-23326/lib/dotnet/Microsoft.Win32.Primitives.dll` over to `~/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-beta8-15794/bin/` cc @halter73 @Eilon @davidfowl @brennanconroy " 3629 area-System.Data Fix the System.Net.Sockets version on SqlClient We have changed the version of the System.Data.SqlClient to use System.Net.Sockets 4.0.10-beta-\* from 4.0.10.0 This was happening due to a runtime error while resolving 4.0.10.0 This needs to be investigated. https://github.com/dotnet/corefx/pull/3567 3630 area-System.IO RenamedTests.FileSystemWatcher_Moved_NestedDirectoryRoot failed in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_release_prtest/4559/console ``` RenamedTests.FileSystemWatcher_Moved_NestedDirectoryRoot [FAIL] System.UnauthorizedAccessException : Access to the path '\\?\d:\j\workspace\dotnet_corefx_windows_release_prtest\bin\tests\Windows_NT.AnyCPU.Release\System.IO.FileSystem.Watcher.Tests\dnxcore50\FileSystemWatcher_Moved_NestedDirectoryRoot\test_root' is denied. Stack Trace: at System.IO.Win32FileSystem.RemoveDirectoryHelper(String fullPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound) at System.IO.Win32FileSystem.RemoveDirectory(String fullPath, Boolean recursive) d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.IO.FileSystem.Watcher\tests\Utility\TemporaryTestDirectory.cs(32,0): at TemporaryTestDirectory.Dispose() d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.IO.FileSystem.Watcher\tests\FileSystemWatcher.Renamed.cs(122,0): at RenamedTests.FileSystemWatcher_Moved_NestedDirectoryRoot() ``` 3633 area-System.Xml XSD Validation Support - Missing? As I [posted earlier on StackOverflow](http://stackoverflow.com/questions/32872684/how-do-i-validate-xml-against-xsd-separate-documents-in-dnx-core-5-0-asp-net?noredirect=1#comment53665404_32872684), I am attempting to port some older code to DNX core 5.0, but it seems that XSD validation support is missing from the library. Or if I am wrong, could someone please provide a sample or point me to the correct document that shows how to validate XML against XSD (separate documents). 3634 area-System.Drawing Which is the System.Drawing replaement? Hi, guys. I have a question... which way is to create images in .net core? 3635 area-System.Net Enable the SocketPerformance tests ``` System.Net.Sockets.Performance.Tests.SocketPerformanceAsyncTests.SocketPerformance_MultipleSocketClientAsync_LocalHostServerAsync [FAIL] 04:31:37 Test execution is expected to be shorter than 10000 but was 27753 04:31:37 Expected: True 04:31:37 Actual: False 04:31:37 Stack Trace: 04:31:37 d:\j\workspace\dotnet_corefx_outerloop_windows_win10_debug\src\Common\tests\System.Net\Sockets\Performance\SocketPerformanceTests.cs(63,0): at System.Net.Sockets.Performance.Tests.SocketPerformanceTests.ClientServerTest(Int32 port, SocketImplementationType serverType, SocketImplementationType clientType, Int32 iterations, Int32 bufferSize, Int32 socketInstances, Int64 expectedMilliseconds) 04:31:37 d:\j\workspace\dotnet_corefx_outerloop_windows_win10_debug\src\Common\tests\System.Net\Sockets\Performance\SocketPerformanceTests.cs(77,0): at System.Net.Sockets.Performance.Tests.SocketPerformanceTests.ClientServerTest(SocketImplementationType serverType, SocketImplementationType clientType, Int32 iterations, Int32 bufferSize, Int32 socketInstances, Int64 expectedMilliseconds) 04:31:37 d:\j\workspace\dotnet_corefx_outerloop_windows_win10_debug\src\System.Net.Sockets\tests\PerformanceTests\SocketPerformanceAsyncTests.cs(60,0): at System.Net.Sockets.Performance.Tests.SocketPerformanceAsyncTests.SocketPerformance_MultipleSocketClientAsync_LocalHostServerAsync() ``` cc: @davidsh, @cipop, @pgavlin 3636 area-System.ComponentModel Any chance to integrate functionality from System.ComponentModel.Composition? "A lot of `System.Composition` code has been [merged recently](https://github.com/dotnet/corefx/pull/1851), and lines up with the MEF 2 code from codeplex. Is any of the code from `System.ComponentModel.Composition` likely to be integrated? I have an old codebase that I've been refactoring and splitting out into separate components, and for some scenarios, I've had to use `System.ComponentModel.Composition` instead of the `System.Composition` package available from Nuget. The main justification behind our switch was that the `CompositionContainer` supports `ComposeExportedValue(T exportedValue)` while the `CompositionHost` doesn't. Being able to explicitly export an _existing_ object instance can be useful when the full architecture isn't adjustable. While it's not exactly the purest of approaches, in some scenarios a little flexibility goes a long way. `System.Composition` [""has been optimized for static composition scenarios and provides faster compositions""](http://mef.codeplex.com/). There are some scenarios where the alternative structure is a better fit, if less streamlined. We've also considered making this project cross-platform, which makes its presence in the OSS .NET Core desirable for us. I bring this up because `System.ComponentModel` is [marked as ""done"" on the progress chart](https://github.com/dotnet/corefx-progress/blob/master/src-diff/README.md), but `System.ComponentModel.Composition` isn't listed at all. With the integration of `System.Composition`, I'm concerned that this is something that's not even being considered and it might end up ignored by default. This also brings up the concern of whether merging namespaces would be feasible. Having multiple namespaces around isn't exactly ideal from a usability perspective, but changing them would be a compatibility issue. It's also possible that there's some code duplication between the two, at least as far as the attributes go. Discarding the old namespace for us is feasible - we want it for the functionality, but we're not attached to the namespace and are open to recompiling. If I've somehow missed the introduction of equivalent functionality, please enlighten me. " 3638 area-System.Net Fixed Renegotiate & sslV3 issue in System.Net.Security xplat. Made op… 1. Fixed xplat Renegotiate in both code path, as server & as client. 2. Fixed SSLv3 Decrypt. Now we understand Error_Want_Read & handle accordingly. 3. Various SSL method IntPtr are now being referenced once statically. 3641 area-System.Net UdpClientTest.BeginSend_Success failed in CI on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug_prtest/4595/console ``` System.Net.Sockets.Tests.UdpClientTest.BeginSend_Success [FAIL] System.Net.Sockets.SocketException : An address incompatible with the requested protocol was used Stack Trace: d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs(3217,0): at System.Net.Sockets.Socket.DoBeginSendTo(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint endPointSnapshot, SocketAddress socketAddress, OverlappedAsyncResult asyncResult) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs(3162,0): at System.Net.Sockets.Socket.BeginSendTo(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint remoteEP, AsyncCallback callback, Object state) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets\src\System\Net\Sockets\UDPClient.cs(598,0): at System.Net.Sockets.UdpClient.BeginSend(Byte[] datagram, Int32 bytes, IPEndPoint endPoint, AsyncCallback requestCallback, Object state) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets\tests\FunctionalTests\UdpClientTest.cs(59,0): at System.Net.Sockets.Tests.UdpClientTest.BeginSend_Success() ``` cc: @cipop, @pgavlin, @davidsh 3642 area-System.Data Move strings to .Resx for managed SNi in Sql Client if needed Refer PR https://github.com/dotnet/corefx/pull/3567 Move the strings in Managed SNI to .resx if needed 3644 area-System.Net Remove dead code in S.N.Sockets.Socket. Just what it says on the tin. 3645 area-System.Net Add argument validation tests for S.N.Sockets. These tests cover the validation of input arguments for all public methods on the Socket class. 3646 area-System.Net UriBuilder.Query property setter is not idempotent "The `UriBuilder.Query` property setter prepends the supplied value with a `?` character, even if the supplied value already starts with `?`. https://github.com/dotnet/corefx/blob/41e203011152581a6c65bb81ac44ec037140c1bb/src/System.Private.Uri/src/System/UriBuilder.cs#L277 This means that code calling the `Query` setter has to check to ensure the value it's passing doesn't already have the question mark even when hoping to simply append to the end of the query. Here's example code that suffers from the issues this surfaces: ``` csharp var uri = new UriBuilder(""http://localhost/page?param1=foo""); if (someOption) { uri.Query += ""&someOption=true""; } ``` Expected value of uri.Query: `?param1=foo&someOption=true` Actual value of uri.Query: `??param1=foo&someOption=true` " 3647 area-System.Net Make UriBuilder.Query setter idempotent Fixes #3646 in a way that is hopefully determined to be backwards compatible. 3648 area-System.Net Add Tcp{Client,Listener} and UdpClient SendReceive tests. This exercises NetworkStream as well as the aforementioned types. 3654 area-System.Net Editing Socket References Some constructors that are doing complex operations (like interop or trying to connect over the network) are removed. APM methods are removed and replaced by TPL equivalent methods. 3655 area-System.Net Editing Socket References Some constructors that are doing time consuming operations for constructors (like interop or trying to connect over the network) are removed. APM methods are removed and replaced by TPL equivalent methods. 3656 area-Infrastructure Instructions for using custom CoreFX with CLI I have made some changes to the CoreFX for SqlClient and I want to test those changes with an application which is executed using DNX. How do I achieve this? I have found some Windows instructions for creating custom DNX by a custom CoreCLR build at https://github.com/dotnet/coreclr/blob/master/Documentation/building/custom-dnx-instructions.md I couldn't find anything about CoreFX. I tried to replace the dlls in the DNX runtime folder with the CoreFX build, but the application fails to run silently without any console output. 3660 area-System.Net Update test namespaces in System.Net.Requests Update test namespaces in System.Net.Requests per #2898. Clean up `using`s. 3661 area-System.IO Word spelling problem with “occurred” https://github.com/dotnet/corefx/search?utf8=%E2%9C%93&q=occured 3664 area-System.Net Disable socket perf tests These are currently in outer loop, but they're sporadically failing due to lack of appropriate infrastructure to accurately run and measure them. cc: @pgavlin, @CIPop, @davidsh 3667 area-System.Security System.Security.Claims.Claim..ctor parameter checks are too restrictive in CoreCLR There is a behaviour difference in `System.Security.Claims.Claim...ctor` that got introduced in CoreCLR but this check does not exist in Desktop. As such, there are scenarios such as creating an anonymous identity (i.e., GenericIdentity with no subject name) that now breaks in CoreCLR. Sample Repro: ``` public static void Main() { System.Security.Principal.GenericIdentity identity = new System.Security.Principal.GenericIdentity(string.Empty); } ``` The difference is a change in the way the System.Security.Claims.Claim constructor works - the empty string (valid value in desktop) is now treated the same as null (an invalid value), and therefore the call fails with the exception below ``` System.ArgumentNullException : Value cannot be null. Parameter name: value Stack Trace: at System.Security.Claims.Claim..ctor(String type, String value, String valueType, String issuer, String originalIssuer, ClaimsIdentity subject, String propertyKey, String propertyValue) at System.Security.Principal.GenericIdentity.AddNameClaim() ``` This was discovered while testing basic WCF net.tcp scenarios and is considered a major blocker for WCF. dotnet/wcf#387 tracks fixing this issue in the WCF repo cc: @joshfree 3669 area-System.IO GZipStream & DeflateStream calling Flush after write or read is not equivalent to calling Dispose. `.Dispose()` will purge buffers and finish writing data while `.Flush()` will not force that to happen. While in other Streams the `.Flush()` call will ensure that all the data is written, it is not the case for `GZipStream` and `DefrateStream`. For example if we modify `RoundtripCompressDecompress` in the `System.IO.Compression.Tests` project in the following way, all tests using it will fail. ``` csharp private async Task RoundtripCompressDecompress(bool useAsync, bool useGzip, int chunkSize, int totalSize, CompressionLevel level) { byte[] data = new byte[totalSize]; new Random(42).NextBytes(data); var compressed = new MemoryStream(); var compressor = useGzip ? (Stream)new GZipStream(compressed, level, true) : new DeflateStream(compressed, level, true); { for (int i = 0; i < data.Length; i += chunkSize) // not using CopyTo{Async} due to optimizations in MemoryStream's implementation that avoid what we're trying to test { switch (useAsync) { case true: await compressor.WriteAsync(data, i, chunkSize); break; case false: compressor.Write(data, i, chunkSize); break; } } } compressor.Flush(); compressed.Position = 0; var decompressed = new MemoryStream(); var decompressor = useGzip ? (Stream)new GZipStream(compressed, CompressionMode.Decompress, true) : new DeflateStream(compressed, CompressionMode.Decompress, true); { if (useAsync) decompressor.CopyTo(decompressed, chunkSize); else await decompressor.CopyToAsync(decompressed, chunkSize, CancellationToken.None); } decompressor.Flush(); Assert.Equal(data, decompressed.ToArray()); compressor.Dispose(); decompressor.Dispose(); } ``` That means that `GZipStream` & `DefrateStream` will not finish writing until they are effectively disposed (which could take some time if `.Dispose()` is not called immediately) and may also fail if chained. This is particularly relevant for https://github.com/dotnet/corefx/issues/1991 (cc @stephentoub) 3671 area-System.Net Fix async abort behavior for *nix accept(). Aborted accept attempts are currently returning an accepted file descriptor of 0 instead of the proper -1. This change corrects this behavior. 3672 area-System.Runtime Perf: String.StartsWith Linux regression from 1x speed to 100x speed "The perf test and all applicable helper methods: ``` [Benchmark] [MemberData(""TestStringSizes"")] public void StartsWith(int size) { PerfUtils utils = new PerfUtils(); string testString = utils.CreateString(size); string subString = testString.Substring(0, testString.Length / 4); foreach (var iteration in Benchmark.Iterations) using (iteration.StartMeasurement()) for (int i = 0; i < 10000; i++) testString.StartsWith(subString); } public static IEnumerable TestStringSizes() { yield return new object[] { 10 }; yield return new object[] { 100 }; yield return new object[] { 1000 }; } /// /// Helper method to create a string containing a number of random /// characters equal to the specified length /// public string CreateString(int length) { byte[] bytes = new byte[length]; rand.NextBytes(bytes); return System.Convert.ToBase64String(bytes); } ``` Linux results after regression (today, 10/6/2015) ``` ``` Windows results: ``` ``` Linux results before Regression: (Unfortunately these are from before I was recording dates with my results, so I'm not sure when they're from or even how valid they are - the important thing is moreso the current Linux results vs Windows) ``` ``` I verified the results from today with a Console App and received the same results as with the xunit perf runner. My first guess is that this has something to do with https://github.com/dotnet/coreclr/pull/1632. " 3673 area-System.Net WinHttpHandler client SSL certificate fixes and tests "Fixed a couple of bugs discovered in WinHttpHandler where it was not sending out client SSL certificates. Changed the final parameter to the X509Certificate2Collection.Find() method to false. I had originally set this parameter to true. The parameter tells the .Find() API to only select ""valid"" certificates from the collection. The problem is that ""valid"" also means ""trusted by the client"". But a lot of client SSL certificates are not trusted by the client. They are only trusted by the server since many servers issue client certificates based on a different trust root. Added more tests for client SSL certificates. " 3674 area-System.Net WebSocket concurrent Send/ReceiveAsync semantics unclear As observed by @mkosieradzki different WebSocket implementations have different behaviour when it comes to concurrent Send/ReceiveAsync operations: see https://github.com/aspnet/WebSockets/issues/42 I am creating a matching issue here since the semantics should be specified at the WebSocket level, so a user of a 'WebSocket' doesn't need to know what library provided the implementation. \cc @davidfowl @Tratcher 3680 area-System.Net Add more tests for System.Net.Http library "Ported more HTTP related tests. These tests focus mostly on POST scenarios mixed with authentication, pre-authentication, and the ""rewind-ability"" of content if it needs to be re-POST'd due to AUTH challeges by the server. Added a new HttpTestServers2 class to Common/tests/System/Net. This is a point-in-time thing as we improve the test infrastructure capability. In particular, we are moving away from the use of the ""httpbin.org"" server. Our new networking test server that we are bringing up has more features than httpbin.org. It can support all the main HTTP verbs when doing ""echo"" of request headers. It includes a ""Content-MD5"" HTTP response header. This contains a hash of the response body. This makes it easier to validate the returned payloads. The ""httpbin.org"" server also has a bug where it does not properly echo chunked upload headers which was causing issues when trying to port these tests. I did not change other networking tests still using ""httpbin.org"" and the Common HttpTestServers class. I will be doing that later as we finalize the test infrastructure. " 3682 area-System.Net ConnectAsyncV4IPEndPointToDualHost_Succes failed in CI on Linux http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst_prtest/3091/console ``` System.Net.Sockets.Tests.DualMode.ConnectAsyncV4IPEndPointToDualHost_Success [FAIL] 16:16:16 System.Net.Sockets.SocketException : Unknown error 10054 16:16:16 Stack Trace: 16:16:16 at System.Net.Sockets.Tests.DualMode.DualModeConnectAsync_IPEndPointToHost_Helper(IPAddress connectTo, IPAddress listenOn, Boolean dualModeServer) 16:16:16 at System.Net.Sockets.Tests.DualMode.ConnectAsyncV4IPEndPointToDualHost_Success() ``` cc: @cipop, @pgavlin, @davidsh 3688 area-System.Data Better API for ADO.NET command batching "ADO.NET currently supports batching several statements in one command by packing them into a single string as follows: ``` c# cmd.CommandText = ""UPDATE message SET text = $text1 WHERE id = 1;"" + ""UPDATE message SET text = $text2 WHERE id = 2""; ``` While workable, it's a problematic API. The PostgreSQL protocol, for example, needs to send each single SQL statement as a separate protocol message, forcing Npgsql to split CommandText by semicolon at the client side, a pretty complex task (need to understand when the semicolon is quoted, etc.). It would be much better to provide a list-based API, where the user provides, say, an array of strings. A specific provider can still choose to join by semicolon if needed, but this should be done at the provider level rather than by the user. For backwards compatibility, the CommandText property would still support the legacy semicolon batching mode. A boolean LegacyBatchingMode connection string parameter, true by default, could be turned off to disable it (thereby removing the client-side SQL parsing in Npgsql, etc.). " 3689 area-System.Threading RunThreadLocalTest8_Values failed in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_release_prtest/4721/console ``` System.Threading.Tests.ThreadLocalTests.RunThreadLocalTest8_Values [FAIL] RunThreadLocalTest8_Values: Expected values to contain both previous values and 1000 new values Expected: True Actual: False Stack Trace: d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Threading\tests\ThreadLocalTests.cs(259,0): at System.Threading.Tests.ThreadLocalTests.RunThreadLocalTest8_Values() ``` 3690 area-System.Security Consider what a LocalMachine\My X509Store might be on Unix Largely there's a permissions problem. - File writes, without reaching into the PAL directly, are done as rwx------ - Windows has the flexible administrator concept, Unix has root. - There's sometimes the group wheel, but that's not universal. - Windows has different permissions for reading private keys and public keys There's a possibility of having someone create /etc/dotnet/corefx/cryptography/x509stores, setting the group to whatever they want, giving the group write permission, and then we could start making use of that... but it's not as obvious as how to do it on Windows. 3691 area-Infrastructure project.lock.json files are all out of date as of yesterday afternoon. - git checkout master (no local changes) - build.cmd - git status - Ponder the sea of red as the build process made local changes to every project.lock.json file in the project. I assume fixing this is just a matter of checking in those changes, but since I don't know what caused it, I'm not blindly sticking my head out either. 3693 area-System.Net PostNonRewindableContentUsingAuth_NoPreAuthenticate_ThrowsInvalidOperationException fails on Linux System.Net.Http.Functional.Tests: Reference PR: #3680 Reference build: http://dotnet-ci.cloudapp.net/job/dotnet_corefx_prtest/4926/ PostNonRewindableContentUsingAuth_NoPreAuthenticate_ThrowsInvalidOperationException looks like it's failing because it's expecting an InvalidOperationException but is getting an HttpRequestException. The InvalidOperationException should not be wrapped within a HttpRequestException by CurlHandler. See WinHttpHandler. It only wraps WinHttpException and IOException. WinHttpHandler also matches .NET Desktop. 3695 area-System.Net PostNonRewindableContentUsingAuth_PreAuthenticate_Success fails on Linux "System.Net.Http.Functional.Tests: Reference PR: #3680 Reference build: http://dotnet-ci.cloudapp.net/job/dotnet_corefx_prtest/4926/ PostNonRewindableContentUsingAuth_PreAuthenticate_Success is failing with a CurlException ""Send failed since rewinding of the data stream failed"". This is failing because it is trying to rewind a non-rewindable stream. BUT it shouldn't be attempting that. It shouldn't need to rewind the stream because the POST should succeed right away. This tells me that the .PreAuthenticate feature in the Linux version of the Handler (CurlHandler) is broken. The test is issuing a HEAD request first which should ""warm up"" the authentication for the .PreAuthenticate=true. But it looks like it is broken. Also, the CurlHandler should NOT be rewinding the stream on its own. Only the HttpContent class do that as part of the contract for SerializeToStreamAsync(). See StreamContent.cs in the Http Library. I see that the Linux code might be calling Seek to rewind the content to re-POST it. That itself shouldn't happen because only the StreamContent class is responsible for rewinding itself. The handlers are NOT supposed to rewind the content on their own. I suspect that the CurlHandler is doing this because one of the tests is failing with a CurlHandler specific message: ""Send failed since rewinding of the data stream failed"". That code probably needs to change in CurlHandler. There shouldn't be a separate string resource for this error since CurlHandler shouldn't be rewinding content. " 3696 area-System.Net Added exception messages to *.resx file. using Debug.Fail wherever ap… 1. Added exception messages to *.resx. Using the SR now. 2. using Debug.Fail/Assert wherever deemed fit. 3. Fixed GetException() method. 3697 area-System.Net Add retry pattern for tests that rely on TCP/UDP > As a design change, we should extract a common config for Sockets tests and consolidate all configuration parameters there. We should include a retry pattern/internal API for tests that rely on TCP stack defaults (in case we see those fail). See https://github.com/dotnet/corefx/issues/3504 for more details. 3698 area-System.Globalization "[Linux] Incorrect output for ""g"" custom `DateTimeOffset` format specifier" "The following statement behaves differently on Windows and Linux when `CultureInfo.CurrentCulture` is `new Culture(""en-GB"")`. See [full test application](https://github.com/dougbu/CultureInfo) for more context. ``` c# Console.WriteLine(""Formatted now '{0:dddd, yyyy/MM/dd/ g}'."", DateTimeOffset.Now); ``` On Windows using either `dnx451` or `dnxcore50` and on Linux using `dnx451` (i.e. Mono), the output is: ``` Formatted now 'Wednesday, 2015/10/07/ A.D.'. ``` However on Linux using `dnxcore50`: ``` Formatted now 'Wednesday, 2015/10/07/ AD'. ``` Note periods are missing in Linux / `dnxcore50` output. Not sure if other custom (or standard) format specifiers behave differently on Linux in some locales. --- OS: Ubuntu 14.04.3 LTS DNX: 1.0.0-rc1-15837 System.Globalization/4.0.11-beta-23405 System.Globalization.Extensions/4.0.1-beta-23405 System.Runtime/4.0.21-beta-23405 " 3699 area-System.Net PostRewindableContentUsingAuth_NoPreAuthenticate_Success is failing with a NotImplementedException on Linux "System.Net.Http.Functional.Tests: Reference PR: #3680 Reference build: http://dotnet-ci.cloudapp.net/job/dotnet_corefx_prtest/4926/ PostRewindableContentUsingAuth_NoPreAuthenticate_Success is failing with a NotImplementedException. See original discuss on PR #3680. But CurlHandler should not be using `Seek` to rewind the HttpContent request body. Instead, it should use the HttpContent.CopyToAsync() API to have the content serialize itself. @stephentoub (GitHub seems to hiding your comment so I'm re-quoting it here) > Thanks for the explanation, David. > Yes, libcurl provides a CURLOPT_SEEKFUNC callback. According to the docs, ""this function gets called by libcurl to seek to a certain position in the input stream and can be used to fast forward a file in a resumed upload (instead of reading all uploaded bytes with the normal read function/callback). It is also called to rewind a stream when data has already been sent to the server and needs to be sent again. This may happen when doing a HTTP PUT or POST with a multi-pass authentication method, or when an existing HTTP connection is reused too late and the server closes the connection."" We implement that callback by checking if the Stream's CanSeek is true, and if it is, calling Seek, otherwise we inform libcurl that the Stream isn't seekable: > https://github.com/dotnet/corefx/blob/master/src/System.Net.Http/src/System/Net/Http/Unix/CurlHandler.MultiAgent.cs#L851-L859 > What would you recommend we do here instead? The CurlHandler is not supposed to be rewinding the HttpRequestMessage.Content streams. It should be simply using the HttpContent contract APIs to tell the HttpContent to ""serialize"" itself. The HttpContent object is responsible for determining how to do that. The CurlHandler should not be directly retrieving a stream from the HttpContent. Instead the HttpContent is told to serialize itself to a some ""Http Request Stream"". And it does that via the its `CopyToAsync` method. See code in WinHttpHandler for example: ``` c# // Send request body if present. if (state.RequestMessage.Content != null) { using (var requestStream = new WinHttpRequestStream(requestHandle, chunkedModeForSend)) { await state.RequestMessage.Content.CopyToAsync( requestStream, state.TransportContext).ConfigureAwait(false); requestStream.EndUpload(); } } ``` " 3700 area-System.Net Increasing timeout values for sockets tests. Increasing timeout values for sockets tests and attempting to fix protocol issue in UdpClientTests. #3504, #3641 @pgavlin @stephentoub @davidsh PTAL 3705 area-System.ComponentModel TypeDescriptor.GetConverter, what is the expected result if there is no converter? in https://github.com/dotnet/corefx/blob/master/src/System.ComponentModel.TypeConverter/tests/TypeDescriptorTests.cs I notice: `Assert.NotNull(converter);` on line 17. Based on my limited exploratory testing in .NET 4.5 I can't seem to get this method to ever return null. It always seems to at least return an instance of `System.ComponentModel.TypeConverter` (if a better converter cannot be found). Is this test over specified (and somewhere something is missing to ensure a contract on the method) or is there some way to make that method return null (a missing test case)? 3707 area-System.Net Bring x-plat work for System.Net.NetworkInformation into dev branch "I've merged all of my existing work against corefx/master, and moved into a dev/ni-xplat branch. Changes to the shared code were mainly limited to the project file (splitting things into separate sections), and introducing a few ""Pal"" files, which contain platform-specific redirections for the various global accessors we expose in this library. # Shimming I have shim'd out the implementation of interface address discovery and enumeration (getifaddrs), and have built on top of that in LinuxNetworkInterface and OsxNetworkInterface. I intend to introduce more shim'd methods for OSX's statistics querying, as I believe it can be used on BSD systems as well (sysctl). --- As of right now, most of the following types are implemented. Some may have some members which are not implemented, but the majority are unless I've noted otherwise. # Linux NetworkInterface - IPInterfaceStatistics - Address collections - NOTE: Most of the properties on these are not supported - IPInterfaceProperties IPGlobalProperties - All of the protocol statistics - DomainName, HostName, etc (instance properties) - Address collections # OSX NetworkInterface - Only enumerating interfaces and addresses (shared code with Linux) # Unimplemented NetworkChange is not at all implemented yet. I do not know of a good way to hook a notification for this yet. Everything is still stubbed out on OSX currently. I have some idea how to implement the majority of the statistics queries, which should be portable as well. " 3708 area-System.Diagnostics Debug.Assert(false) does not behave as expected compared to full CLR Redirecting issue https://github.com/aspnet/dnx/issues/2778 This is what we see in full CLR: ![image](https://cloud.githubusercontent.com/assets/924164/10353329/61ebdb1e-6d0a-11e5-8719-efbc0f723fb6.png) CoreCLR does not give the user the option to ignore the problem or to attach a debugger to the process. 3709 area-System.Net Beta 8 blocker: System.Net.Sockets nuget package authoring needs to be updated to support xplat We're not producing runtime packages for System.Net.Sockets. This means that whatever version you restore via DNX will be windows specific. /cc @chcosta @ericstj @saurabh500 3710 area-System.Net Implement NetworkStream.ReadAsync/WriteAsync "NetworkStream currently implements its async functionality via the APM Begin/EndRead/Write methods. In the full Framework, the base Stream exposes these methods as well, as virtual, and NetworkStream's override the base ones. Then the base Stream's ReadAsync/WriteAsync implementations use these for their implementation, which means NetworkStream gets at least a basic async ReadAsync/WriteAsync implementation ""for free"". In corefx, however, Stream doesn't expose the Begin/End methods, which means NetworkStream's Begin/End methods don't override them, which means NetworkStream's ReadAsync/WriteAsync methods are currently just using the base implementation that queues a work item to call the synchronous Read/Write methods. That's far from ideal for a stream focused on I/O with high latency. This commit just adds basic implementations of NetworkStream.ReadAsync/WriteAsync that use TPL's FromAsync methods to delegate to the Begin/End methods, very similar to how the base class would have. There are currently no unit tests for NetworkStreamin the repo, so I haven't added any yet for these new methods. However, there is an existing functional test that does use ReadAsync/WriteAsync, so they're getting at least some coverage. cc: @cipop, @davidsh, @pgavlin " 3711 area-System.Net Beta 8 blocker: System.Net.Security nuget package authoring needs to be updated to support xplat Same issue as https://github.com/dotnet/corefx/issues/3709 only for System.Net.Security.dll /cc @bartonjs @chcosta @ericstj 3715 area-System.Net Pending features/comments in xplat NegotiateStream 1.1 Get the correct library to use on OSX and update Interop.Libraries.cs 3716 area-Meta Inconsistent versioning When you build the CoreFX assemblies and you put them altogether, you realize that there are some inconsistent version number. For example System.Console.dll requires System.Runtime version 4.0.20 but System.Runtime is version 4.0.21. Ideally it would be nice if all the generated assemblies were consistent with respect to the version. 3717 area-System.Net Investigate feasibility of supporting NTLM protocol on non-Windows platforms Ubuntu distribution ships with a libheimntlm. Need to see if something similar is available for OSX as well. There may be other pieces needed to make NTLM work meaningfully on non-Windows (maybe winbind etc.) 3718 area-System.Net Investigate feasibility of supporting NegotiateStream channel bindings on non-Windows platforms The gss_init_sec_context and gss_accept_sec_context APIs take channel binding as input. This support needs to be understood. This would be useful for NegotiateStream.Authenticate\* APIs 3720 area-System.Net Remove unnecessary scheme check in CurlHandler CurlHandler is explicitly checking to ensure that the request URI scheme is either http or https. HttpClient already does this check before getting to this point, WinHttpHandler doesn't do the duplicative check, and even if a bad scheme sneaks in, our subsequent usage of libcurl will enforce that only http/htps are used. Removing the check. Fixes #3322 cc: @kapilash 3722 area-System.Net Remove unnecessary TODO in CurlHandler This is handled by HttpClient. Fixes #3268 cc: @kapilash 3724 area-System.Net Renable some HttpWebResponse tests Modify tests checking for presence/absence of 'Content-Type' response headers. Switch to using the new HttpTestServers2 class which supports these kind of endpoints. Simplify the tests to be [Fact] and not [Theory]. These tests don't require to be run against both HTTP and HTTPS servers. I will be making these kinds of changes further in order to streamline the number of tests running in CI. This PR also fixes #2385. 3725 area-System.Net HttpRequestMessage multiple-send checking should be done in HttpMessageInvoker From https://github.com/dotnet/corefx/issues/3268#issuecomment-146564360 > it seems that we made a mistake when we did this. We should actually be checking for this in the HttpMessageInvoker base class SendAsync (which is public). Most people just use HttpClient to invoke the handlers. But simple scenarios can use the HttpMessageInvoker as well. That class was created as way to invoke the handler's SendAsync() method without a lot of overhead of HttpClient. The actual handler SendAsync() method is protected and can't be invoked directly. But HttpMessageInvoker is able to call that method being the handler's method is actually marked protected internal and not just protected. 3726 area-System.Net System.Net.Sockets tests will behave differently when running in an elevated (admin) context ``` Discovering: System.Net.Sockets.Tests (TaskId:239) Discovered: System.Net.Sockets.Tests (TaskId:239) Starting: System.Net.Sockets.Tests (TaskId:239) System.Net.Sockets.Tests.CreateSocket.Ctor_Failure(addressFamily: InterNetwork, socketType: Raw, protocolType: Tcp) [FAIL] (TaskId:239) Assert.Throws() Failure (TaskId:239) Expected: typeof(System.Net.Sockets.SocketException) (TaskId:239) Actual: (No exception was thrown) (TaskId:239) Stack Trace: (TaskId:239) D:\git\corefx\packages\Microsoft.DotNet ``` I'm hitting this failure consistently on my local machine any ideas of what is happening? 3727 area-System.Net Add more HTTP tests Ported some missing tests to GitHub. Cleaned up some of the existing tests. 3728 area-System.Net Merge changes from TFS 3729 area-System.Net WinHttpHandler MaxConnectionsPerServer default value Currently: ``` C# Assert.Equal(Int32.MaxValue, handler.MaxConnectionsPerServer); ``` Opening this issue to discuss if this is the correct behavior given the RFC recommendation of a max of 2 connections/server and browser current settings of about 6-10 connections/server. Throwing in a few articles about this: http://stackoverflow.com/questions/985431/max-parallel-http-connections-in-a-browser http://www.stevesouders.com/blog/2008/03/20/roundup-on-parallel-connections/ My proposal is to switch this to a smaller number, maybe something that's similar to what most modern browsers do today. 3731 area-System.Net Add test to verify default values for HttpClientHandler "Ported this test to GitHub. Note that the change in default values between Desktop and CoreFx for two of the properties is an ""intentional, improving, change"". " 3732 area-System.Net Merge changes from TFS 3735 area-System.Net Shim socket addresses. The socket address shim adds native accessors for the various bits that managed code needs to access, namely: - Address families - Port numbers - IP addresses This change also updates the name resolution shim to use an iterator-based design for walking host entries. This interface trades chattiness (a P/Invoke per IP address) for memory footprint (various native and managed allocations per IP address). 3736 area-System.Net Read the allowed certificate issuers list on Unix SslStream The Unix PAL version of GetRequestCertificateAuthorities. Development: - Split out SafeInteriorHandle to facilitate creating two more SafeHandle types following that pattern. - Applied the new shim style for the two macro-functions that were needed for reading STACK_OF(X509_NAME) - Created two new internal SafeHandle types. While in the past these were in isolated files in Common\src\Microsoft\Win32\SafeHandles, I wanted to try something new: keeping them in the file with their create/free/primary-usage. Testing: I couldn't figure out how to cause the flow that results in the PAL method getting called, so I inserted an artificial call to it in CompleteHandshake, and saw that it was decoding as expected. This is yet another partial fix for issue #3362 (GetRequestCertificateAuthorities - populate issuers. (CertModule.cs)) cc: @stephentoub @vijaykota @rajansingh10 @shrutigarg @CIPop 3737 area-System.Linq Expression interpreter - Missing support for OnesComplement nodes Found when porting an exhaustive test suite for cross-checking interpretation and compilation. I'll have a look at adding the support. 3739 area-Infrastructure Get 8 build errors on Linux Get 8 errors when building latest corefx on ubuntu with dnx-coreclr-linux-x64.1.0.0-rc1-15838. ``` CSC : error CS7027: Error signing output with public key from file '/data/git/corefx/packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00104/lib/ECMA.snk' -- mscoree.dll [/data/git/corefx/src/System.IO.Compression.ZipFile/ref/System.IO.Compression.ZipFile.csproj] CSC : error CS7033: Delay signing was specified and requires a public key, but no public key was specified [/data/git/corefx/src/System.IO.Compression.ZipFile/ref/System.IO.Compression.ZipFile.csproj] CSC : error CS7027: Error signing output with public key from file '/data/git/corefx/packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00104/lib/ECMA.snk' -- mscoree.dll [/data/git/corefx/src/System.IO.Compression/ref/System.IO.Compression.csproj] CSC : error CS7033: Delay signing was specified and requires a public key, but no public key was specified [/data/git/corefx/src/System.IO.Compression/ref/System.IO.Compression.csproj] CSC : error CS7027: Error signing output with public key from file '/data/git/corefx/packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00104/lib/ECMA.snk' -- mscoree.dll [/data/git/corefx/src/System.Reflection.Context/ref/System.Reflection.Context.csproj] CSC : error CS7033: Delay signing was specified and requires a public key, but no public key was specified [/data/git/corefx/src/System.Reflection.Context/ref/System.Reflection.Context.csproj] CSC : error CS7027: Error signing output with public key from file '/data/git/corefx/packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00104/lib/ECMA.snk' -- mscoree.dll [/data/git/corefx/src/System.Runtime.WindowsRuntime.UI.Xaml/ref/System.Runtime.WindowsRuntime.UI.Xaml.csproj] CSC : error CS7033: Delay signing was specified and requires a public key, but no public key was specified [/data/git/corefx/src/System.Runtime.WindowsRuntime.UI.Xaml/ref/System.Runtime.WindowsRuntime.UI.Xaml.csproj] ``` 3740 area-System.Threading Can we lift the name length limitation on semaphores? "Now that we have more-or-less gotten rid of the path length limitation (#645), could we also get rid of the semaphore name length restriction? The documentation for [CreateSemaphore](https://msdn.microsoft.com/en-us/library/windows/desktop/ms682438%28v=vs.85%29.aspx) claims that the name is limited to MAX_PATH characters, however testing this shows that the documentation is wrong (at least on Windows 10): ``` using Microsoft.Win32.SafeHandles; using System; using System.ComponentModel; using System.Runtime.InteropServices; namespace SemaphoreTest { class Program { [DllImport(""kernel32.dll"", BestFitMapping = false, CharSet = CharSet.Unicode, SetLastError = true)] private static extern SafeWaitHandle CreateSemaphore(IntPtr lpSecurityAttributes, int initialCount, int maximumCount, string name); [DllImport(""kernel32.dll"", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool CloseHandle(SafeHandle hObject); private static void TestCreateSemaphore(string longName) { var sem = CreateSemaphore(IntPtr.Zero, 0, 1, longName); if (sem.IsInvalid) { Console.WriteLine(""Failed: "" + new Win32Exception(Marshal.GetLastWin32Error())); } else { Console.WriteLine(""OK: "" + sem.DangerousGetHandle()); CloseHandle(sem); } } static void Main(string[] args) { var longName = ""!!!!!!!!!!012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"" + // 100 ""0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"" + // 200 ""012345678901234567890123456789012345678901234567890123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN""; // 260,300 TestCreateSemaphore(longName); } } } ``` Running this prints OK followed by the handle. Setting a breakpoint before CloseHandle and inspecting the handles shows that the semaphore is indeed created with the full name: ![Process Hacker showing that the path isn't truncated](http://i.imgur.com/MLHaKWQ.png) Edit: It would be a good idea if I posted the same code that I ran when I took the screenshot :) " 3741 area-System.Numerics Change System.Numerics.Vector's unsafe constructors' access level to public. Currently Vector's constructors that accept a pointer are marked as private, e.g: private unsafe Vector(void\* dataPointer, int offset) Please consider making them public. Because at some point we might have only the pointers themselves in our own code but rather than arrays. Recreating an array from these pointers is costly. So allow us to use this constructor directly as it is. 3742 area-System.Security Fixed second write issue, introduced by PR#3675 1. PR #3675 broke the scenario where there will be successive read/write calls on stream (>1). 2. older code in finally was like, where asyncRequest will always be null. finally { if (asyncRequest == null || failed) { _NestedWrite = 0; } } 3. After removing dead code i.e. asyncRequest in PR #3675 ,the flow will never set _NestedWrite==0 in positive scenario, causing failure when read/write is called next time by the user. 4. Added multi write testcase as well for this. 3744 area-System.Net ConnectV4MappedIPEndPointToV4Host_Success failed in CI on Linux http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst_prtest/3196/console ``` System.Net.Sockets.Tests.DualMode.ConnectV4MappedIPEndPointToV4Host_Success [FAIL] 16:14:57 System.Net.Sockets.SocketException : Unknown error 10054 16:14:57 Stack Trace: 16:14:57 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) 16:14:57 at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) 16:14:57 at System.Net.Sockets.Tests.DualMode.DualModeConnect_IPEndPointToHost_Helper(IPAddress connectTo, IPAddress listenOn, Boolean dualModeServer) 16:14:57 at System.Net.Sockets.Tests.DualMode.ConnectV4MappedIPEndPointToV4Host_Success() 16:14:57 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 16:14:57 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 16:14:57 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ``` 3748 area-System.Net ConnectAsyncV6IPEndPointToDualHost_Success failed in CI on Linux http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst_prtest/3215/console ``` 10:50:47 System.Net.Sockets.Tests.DualMode.ConnectAsyncV6IPEndPointToDualHost_Success [FAIL] 10:50:47 System.Net.Sockets.SocketException : Unknown error 10054 10:50:47 Stack Trace: 10:50:47 at System.Net.Sockets.Tests.DualMode.DualModeConnectAsync_IPEndPointToHost_Helper(IPAddress connectTo, IPAddress listenOn, Boolean dualModeServer) 10:50:47 at System.Net.Sockets.Tests.DualMode.ConnectAsyncV6IPEndPointToDualHost_Success() 10:50:47 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 10:50:47 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 10:50:47 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ``` 3749 area-System.Net GetAsync_ResponseContentAfterClientAndHandlerDispose_Success failed in CI on Linux http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst_prtest/3215/console ``` 10:54:28 System.Net.Http.Functional.Tests.HttpClientHandlerTest.GetAsync_ResponseContentAfterClientAndHandlerDispose_Success [FAIL] 10:54:28 Assert.True() Failure 10:54:28 Expected: True 10:54:28 Actual: False 10:54:28 Stack Trace: 10:54:28 Finished: System.Net.Http.Unit.Tests 10:54:28 10:54:28 === TEST EXECUTION SUMMARY === 10:54:28 System.Net.Http.Unit.Tests Total: 783, Errors: 0, Failed: 0, Skipped: 0, Time: 2.503s 10:54:28 at System.Net.Http.Functional.Tests.HttpClientHandlerTest.d__0.MoveNext() 10:54:28 --- End of stack trace from previous location where exception was thrown --- 10:54:28 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 10:54:28 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 10:54:28 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() 10:54:28 at System.Net.Http.Functional.Tests.HttpClientHandlerTest.d__14.MoveNext() 10:54:28 --- End of stack trace from previous location where exception was thrown --- 10:54:28 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 10:54:28 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 10:54:28 --- End of stack trace from previous location where exception was thrown --- 10:54:28 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 10:54:28 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 10:54:28 --- End of stack trace from previous location where exception was thrown --- 10:54:28 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 10:54:28 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 10:54:44 Finished: System.Net.Http.Functional.Tests 10:54:44 10:54:44 === TEST EXECUTION SUMMARY === 10:54:44 System.Net.Http.Functional.Tests Total: 254, Errors: 0, Failed: 1, Skipped: 0, Time: 19.002s ``` 3750 area-System.Linq Expression interpreter - NegateChecked doesn't throw OverflowException Repro case: `Expression.NegateChecked(Expression.Constant(short.MinValue))` Issue seems to be that the checked(...) expression does not incorporate the conversion back after performing the negation. I'll have a look at fixing it. 3752 area-System.Net Add more WinHttpHandler client certificate tests Add a fake X509Store to the unit tests to simulate a real per-user certificate store on the machine. Add tests related to WinHttpHandler ClientCertificateOption.Automatic property setting. 3753 area-System.Diagnostics Switch OS X process information retrieval over to use sysctl Currently, OS X uses the platform-specific `proc_*` calls to retrieve process and thread information. By moving these calls over to use `sysctl`, we can support many more platforms (such as FreeBSD). 3755 area-System.Net Re-enable HttpClient encoding tests on Unix cc: @davidsh, @kapilash 3758 area-System.Linq Expression interpreter - Some issues with Increment and Decrement Three issues found with the interpreter code when cross-checking compiler and interpreter for Increment and Decrement nodes: - [De|In]crement(T) != T for T = UInt16 and UInt32 - Missing implementation for UInt64 - Nullable support is lacking I'll have a look. 3760 area-System.Data SqlClient for Windows: Native SNI depends on MSVCR110.dll Using SqlClient can cause a DllNotFoundException on sni.dll. This has been reported a few times by customers trying to use SqlClient on coreclr-x64/x86 on Windows (see aspnet/Home#904 for detailed symptoms). One of the possible causes is that you may need the Microsoft Visual C++ 2012 Redistributable installed to get SqlClient to work. Beta8 has not solved the problem, e.g. `link /dump /imports sni.dll` still shows MSVCR110.dll in the list of dependencies. From an email thread with @ericstj it seems that it should use msvcrt.dll instead. 3765 area-System.Net Switched Sockets perf tests to Benchmarks "Rough draft of what the sockets tests will look switched to use Benchmarks for the perf tests. Ideally there would only be one tests csproj as in this PR and tests would function as they do in other projects. These perf tests run on Windows and give reasonable results, but on Linux they throw an error that ""ws2_32.dll"" is missing. @pgavlin @stephentoub " 3766 area-Infrastructure Corefx build fails in dnu restore on windows "I am attempting to follow the instructions at: https://github.com/dotnet/coreclr/blob/master/Documentation/building/linux-instructions.md While building the corefx portion of the code in a windows enlistment I see this failure output: ``` C:\Users\noahfalk\Documents\GitHub\corefx [master]> .\build.cmd /p:OSGroup=Linux /p:SkipTests=true Restoring all packages... EXEC : warning : FindPackagesById: Microsoft.Win32.Registry [C:\Users\noahfalk\Documents\GitHub\corefx\build.proj] C:\Users\noahfalk\Documents\GitHub\corefx\build.proj(24,5): error MSB3073: The command """"C:\Users\noahfalk\Documents\Gi tHub\corefx\packages//dnx-coreclr-win-x86.1.0.0-beta7/\bin\dnu.cmd"" restore --packages ""C:\Users\noahfalk\Documents\Git Hub\corefx\packages"" --source https://www.myget.org/F/dotnet-core/ --source https://www.myget.org/F/dotnet-coreclr/ --s ource https://www.myget.org/F/dotnet-corefxtestdata/ --source https://www.myget.org/F/dotnet-buildtools/ --source https ://www.nuget.org/api/v2/ ""C:\Users\noahfalk\Documents\GitHub\corefx\src"" ""C:\Users\noahfalk\Documents\GitHub\corefx\pac kages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00097/lib/"""" exited with code 1. ``` Running a build with more diagnostics enabled reveals this: ``` C:\Users\noahfalk\Documents\GitHub\corefx [master +0 ~22 -0]> msbuild /v:detailed /p:OSGroup=Linux /p:SkipTests=true .\b uild.proj Microsoft (R) Build Engine version 12.0.40629.0 [Microsoft .NET Framework, version 4.0.30319.42000] ``` ... Omitting some hopefully irrelevant build ouput for brevity ... ``` Task ""Exec"" ""C:\Users\noahfalk\Documents\GitHub\corefx\packages//dnx-coreclr-win-x86.1.0.0-beta7/\bin\dnu.cmd"" restore --packages ""C:\Users\noahfalk\Documents\GitHub\corefx\packages"" --source https://www.myget.org/F/dotnet-core/ --source https:// www.myget.org/F/dotnet-coreclr/ --source https://www.myget.org/F/dotnet-corefxtestdata/ --source https://www.myget.or g/F/dotnet-buildtools/ --source https://www.nuget.org/api/v2/ ""C:\Users\noahfalk\Documents\GitHub\corefx\src"" ""C:\Use rs\noahfalk\Documents\GitHub\corefx\packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00097/lib/"" Microsoft .NET Development Utility CoreCLR-x86-1.0.0-beta7-15532 CACHE https://www.myget.org/F/dotnet-core/ CACHE https://www.myget.org/F/dotnet-coreclr/ CACHE https://www.myget.org/F/dotnet-corefxtestdata/ CACHE https://www.myget.org/F/dotnet-buildtools/ CACHE https://www.nuget.org/api/v2/ Restoring packages for C:\Users\noahfalk\Documents\GitHub\corefx\src\Common\tests\project.json Following lock file C:\Users\noahfalk\Documents\GitHub\corefx\src\Common\tests\project.lock.json Restore complete, 288ms elapsed Restoring packages for C:\Users\noahfalk\Documents\GitHub\corefx\src\Common\tests\System\Diagnostics\RemoteExecutorCo nsoleApp\project.json Following lock file C:\Users\noahfalk\Documents\GitHub\corefx\src\Common\tests\System\Diagnostics\RemoteExecutorConso leApp\project.lock.json Restore complete, 14ms elapsed Restoring packages for C:\Users\noahfalk\Documents\GitHub\corefx\src\Common\tests\SystemXml\BaseLibManaged\project.js on Following lock file C:\Users\noahfalk\Documents\GitHub\corefx\src\Common\tests\SystemXml\BaseLibManaged\project.lock. json Restore complete, 5ms elapsed Restoring packages for C:\Users\noahfalk\Documents\GitHub\corefx\src\Common\tests\SystemXml\ModuleCore\project.json Following lock file C:\Users\noahfalk\Documents\GitHub\corefx\src\Common\tests\SystemXml\ModuleCore\project.lock.json Restore complete, 32ms elapsed Restoring packages for C:\Users\noahfalk\Documents\GitHub\corefx\src\Common\tests\SystemXml\XmlCoreTest\project.json Following lock file C:\Users\noahfalk\Documents\GitHub\corefx\src\Common\tests\SystemXml\XmlCoreTest\project.lock.jso n Restore complete, 33ms elapsed Restoring packages for C:\Users\noahfalk\Documents\GitHub\corefx\src\Common\tests\SystemXml\XmlDiff\project.json Following lock file C:\Users\noahfalk\Documents\GitHub\corefx\src\Common\tests\SystemXml\XmlDiff\project.lock.json Restore complete, 31ms elapsed Restoring packages for C:\Users\noahfalk\Documents\GitHub\corefx\src\Microsoft.CSharp\ref\project.json Following lock file C:\Users\noahfalk\Documents\GitHub\corefx\src\Microsoft.CSharp\ref\project.lock.json Restore complete, 16ms elapsed Restoring packages for C:\Users\noahfalk\Documents\GitHub\corefx\src\Microsoft.CSharp\src\project.json Following lock file C:\Users\noahfalk\Documents\GitHub\corefx\src\Microsoft.CSharp\src\project.lock.json Restore complete, 31ms elapsed Restoring packages for C:\Users\noahfalk\Documents\GitHub\corefx\src\Microsoft.VisualBasic\ref\project.json Following lock file C:\Users\noahfalk\Documents\GitHub\corefx\src\Microsoft.VisualBasic\ref\project.lock.json Restore complete, 2ms elapsed Restoring packages for C:\Users\noahfalk\Documents\GitHub\corefx\src\Microsoft.VisualBasic\src\project.json Following lock file C:\Users\noahfalk\Documents\GitHub\corefx\src\Microsoft.VisualBasic\src\project.lock.json ---------- System.IO.IOException: The supplied user buffer is not valid for the requested operation at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.IO.Win32FileStream.ReadCore(Byte[] buffer, Int32 offset, Int32 count) at System.IO.Win32FileStream.Read(Byte[] array, Int32 offset, Int32 count) at System.IO.FileStream.Read(Byte[] buffer, Int32 offset, Int32 count) at System.Xml.XmlTextReaderImpl.ReadData() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r) at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o) at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options) at NuGet.XmlUtility.LoadSafe(Stream input, Boolean ignoreWhiteSpace) at NuGet.Manifest.ReadFrom(Stream stream, IPropertyProvider propertyProvider, Boolean validateSchema) at NuGet.LocalPackage.ReadManifest(Stream manifestStream) at NuGet.UnzippedPackage.EnsureManifest() at NuGet.UnzippedPackage..ctor(IFileSystem fileSystem, String manifestPath) at NuGet.PackageInfo.get_Package() at Microsoft.Dnx.Runtime.NuGetDependencyResolver.d__14.MoveNext() at Microsoft.Dnx.Tooling.RestoreOperations.d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Dnx.Tooling.RestoreCommand.d__62.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.Dnx.Tooling.RestoreCommand.d__61.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Dnx.Tooling.RestoreCommand.<>c__DisplayClass60_0.<b__2>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.Dnx.Tooling.RestoreCommand.d__60.MoveNext() ---------- Restore failed The supplied user buffer is not valid for the requested operation ``` " 3767 area-System.Net Update CurlHandler to use HttpContent.CopyToAsync "To get a request content stream, CurlHandler currently uses the HttpContent's ReadAsStreamAsync, and when libcurl needs to rewind the stream, CurlHandler seeks on the stream. Unfortunately, it turns out ReadAsStreamAsync isn't actually intended to be used by handlers in this manner, and as such there are some deficiencies that lead to correctness problems. For example, some of the WCF HttpContent-derived types return non-seekable streams from CreateContentReadStreamAsync and thus from ReadAsStreamAsync. This means that, using ReadAsStreamAsync, if we need to resend a request, we need to call ReadAsStreamAsync again. But ReadAsStreamAsync doesn't do the same _contentConsumed check that SerializeToStreamAsync does. That means if the content is actually a StreamContent, whose CreateContentReadStreamAsync just does `return Task.FromResult(new ReadOnlyStream(this._content));`, and if the stream is non-seekable, then we'll end up getting back the ""new"" stream but that's already had its content consumed, and we won't know. We can't even try to do an object reference comparison, because StreamContent is wrapping the returned stream in a new ReadOnlyStream instance each time. The recommended approach for handlers is to use HttpContent.CopyToAsync. CopyToAsync is a push-based model, letting the HttpContent write to a target stream. CurlHandler/libcurl have a pull-based model, with CurlHandler ReadAsync'ing from the request content based on callback from libcurl. To straddle this divide, this commit adds a specialized push/pull adapter stream that let's CurlHandler effectively read from the pushing source. If/when libcurl asks to rewind, the stream resets itself by doing a new CopyToAsync operation. This revised approach does incur more costs, however care has been taken to try to minimize those overheads as much as possible, and the change is necessary for correctness. This PR also fixes an issue with regards to which exception type CurlHandler wraps. Fixes #3699, #3693 cc: @kapilash, @vijaykota, @davidsh, @pgavlin, @CIPop " 3768 area-System.Net Refactoring System.Net.Security PAL Refactoring System.Net.Security PAL in preparation to add back the Schannel Interop multi-interface SSPI object model required by NegotiateStream. The PAL design is similar to the one @pgavlin designed for System.Net.Primitives, NameResolution and Sockets: partial static classes replaced the interface/class/factory pattern that was derived from the SSPI object model. Semantics should remain the same. 1. \CertModule.cs was renamed to CertificateValidationPal..cs. CertWrapper and CertInterface have been removed. 2. \SSPISecureChannelType.cs was renamed to SslStreamPal..cs. Modified GlobalSSPI, SSPIInterface have been removed temporarily. The plan is to add them back with the original semantics for NegotiateStream support via Win32 SSPI. - Small change in QueryContextChannelBinding to simplify the PAL. - Added a static readonly sync object in the Windows implementation to preserve interlocked behavior. - Removed Win32Exception from MapToSecurityStatus. (Still needs to be redesigned to avoid string parsing.) 3. Rest of * have been moved to Interop. I did my best to integrate with the latest sources in master. 4. Removed NegotiateStream / Auth code. This will be added back with NegotiateStream support. @bartonjs @vijaykota @rajansingh10 PTAL /cc: @davidsh @stephentoub @pgavlin 3769 area-System.Security ECDsa Sign and Verify expect different data forms between Windows and Unix ECDSA's Sign operation, algorithmically, emits two values, `r` and `s`. The values produced by Desktop, and CoreFX-Windows are equivalent to `r.Concat(s)`. CoreFX-Unix is emitting (and expecting) the signature block: ``` ECDSA-Sig-Value ::= SEQUENCE { r INTEGER, s INTEGER } ``` These values will never be equal, differing by the ASN/DER structural information. Since Desktop is the de facto standard here, we need to make the Unix version match. 3771 area-System.Security Windows GetECDsaPrivateKey fails on ECDsa PFX files created with OpenSSL "When opening the private key NCrypt reports that the algorithm is ECDH_P384 instead of ECDSA_P384; then ECDsaCng rejects the key for being from the wrong algorithm group. Commenting out these lines showed the key to be functional in this role, so perhaps the checks need to be relaxed a bit. Taking a PFX generated from Windows which works and sending it through: ``` openssl pkcs12 -in working.pfx -info ``` supplying both the PFX decrypt password and a new private key encrypt password, then copying the .cer portion to `worked.cer`, and the key to `worked.encrypted.key` ``` openssl ec -in worked.encrypted.key -out worked.key openssl pkcs12 -export -in worked.cer -inkey worked.key -out worked.pfx -CSP ""Microsoft Software Key Storage Provider"" ``` Even when noticing that new keys had a parameters header, and including it in `worked.key` didn't help. Just an OID identifying the curve: secp384r1 ``` -----BEGIN EC PARAMETERS----- BgUrgQQAIg== -----END EC PARAMETERS----- ``` Clearly something is missing... " 3772 area-System.Security Unix ECDsa doesn't support P-256 Windows supports { 256, 384, 521 } Unix supports { 224, 384, 521 } I suspect the 224 was meant to be 256 (since 256 is a SuiteB curve). 256 should be added. 3777 area-System.Net Setting Socket.SendTimeOut throws SocketException on Linux "The following code runs fine on Windows dnxcore50 ``` csharp using System; using System.Net.Sockets; public class Program { public static void Main() { var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) { SendTimeout = 200, ReceiveTimeout = 200 }; } } ``` However on an Azure Linux VM it throws with Success! ``` System.Net.Sockets.SocketException: Success at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Int32 optionValue, Boolean silent) at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Int32 optionValue) at System.Net.Sockets.Socket.set_SendTimeout(Int32 value) at Program.Main() ``` Here's my project.json ``` javascript { ""commands"": { ""run"": ""test"" }, ""frameworks"": { ""dnxcore50"": { ""compilationOptions"": { ""define"": [ ""NETCORE"" ], ""allowUnsafe"": true, ""warningsAsErrors"": false }, ""dependencies"": { ""System.Console"": ""4.0.0-beta-*"", ""System.Net.Sockets"": ""4.1.0-beta-*"", ""System.Net.Security"": ""4.0.0-beta-*"", ""System.Net.NameResolution"": ""4.0.0-beta-*"", ""System.Net.Primitives"": ""4.0.11-beta-*"" } } }, ""dependencies"": { } } ``` " 3778 area-System.Drawing Current status of graphics library development. Hi all, I've been following the various conversations regarding graphics in corefx: #1563, #489, etc and also following the progress of the library in corefxlab https://github.com/dotnet/corefxlab/tree/master/src/System.Drawing.Graphics and I'm still left wondering what the overall plan is. Progress in the lab repo seems to have stopped and there seems to be no further discussion I can find anywhere on what is happening. I'm the primary author of the project [ImageProcessor](https://github.com/JimBobSquarePants/ImageProcessor/) which I wrote to make System.Drawing a little easier to work with. It's been fairly successful in adoption but as far as I can fathom my work (~3 years) will become obsolete very soon. Since corefx was announced I've started working on a library which can do basic stuff like encode/decode pngs, bmps, jpegs, and gifs (animated too), I've partially implemented some primitives for shapes and colors, and am experimenting with resampling algorithms now. All that work can be found [here](https://github.com/JimBobSquarePants/ImageSharp) I'm super uneasy about doing all this work though as I don't want it to be in vain, superseded immediately by something out of Microsoft. Should I continue? If so is it something that you would think the community could invest in and help me deliver (Graphics is tricky stuff and I'm no computer scientist). 3779 area-System.Runtime Collectible AssemblyLoadContext Collectible assemblies can be used for many different things but it usually comes down to some form of hot swapping code. Updating a plugin or compiling a new version of a Razor view, without restarting the process or leaking memory. .NET Core currently has no way to unload assemblies from memory if they are no longer required. In the full .NET Framework you could load the assemblies into a separate AppDomain so they can be unloaded later. ## Proposed API `AssemblyLoadContext` can be extended to enable developers to load normal assemblies, from the filesystem or any stream, as collectible assemblies. ``` csharp public abstract class AssemblyLoadContext { // ... protected AssemblyLoadContext(bool isCollectible) { } // ... } ``` Collectible assemblies loaded by `AssemblyLoadContext` would have the same [lifetime and limitations as those generated by `System.Reflection.Emit`](https://msdn.microsoft.com/en-us/library/vstudio/dd554932%28v=vs.100%29.aspx), except the lifetime extends to all assemblies loaded by the `AssemblyLoadContext`. This means the `AssemblyLoadContext` will not unload until there are no references to any of the assemblies it loaded. I am working on the implementation for this in CoreCLR: https://github.com/dotnet/coreclr/pull/1684 3780 area-System.IO IOException on recursive Directory.Delete of path with trailing backslash I observed this after we took a recent beta System.IO over in MSBuild. Many of our tests create a directory and have a `finally` that deletes it, which suddenly started failing. After debugging, I think this is a regression caused by 0721434, which added a call in [`RemoveDirectory`](https://github.com/dotnet/corefx/blob/0721434e19e7f9ecf8bf6dba7485f6c86827388c/src/System.IO.FileSystem/src/System/IO/Win32FileSystem.cs#L491) to canonicalize the path to extended form. The following call then adds a backslash before calling `FindFirstFile`, but the extended path has different behavior in Win32: it no longer silently condenses double backslashes to a single path separator. While proving to myself that I understood the bug I wrote a fix; I'll send a PR shortly. 3783 area-System.Net Disable failing ConnectV4MappedIPEndPointToV4Host_Success test #3744 cc: @pgavlin, @davidsh, @CIPop 3784 area-Infrastructure ALINK : error AL1078: Error signing assembly -- Access is denied. "Getting build errors on Win10 + VS2015: `ALINK : error AL1078: Error signing assembly -- Access is denied. [s:\c1\src\Microsoft.CSharp\src\Microsoft.CSharp.csproj]` From the log: ``` 175>GenerateSatelliteAssemblies: Creating directory ""s:\c1\bin/obj/Windows_NT.AnyCPU.Debug\Microsoft.CSharp\it"". Creating directory ""s:\c1\bin/obj/Windows_NT.AnyCPU.Debug\Microsoft.CSharp\ja"". Creating directory ""s:\c1\bin/obj/Windows_NT.AnyCPU.Debug\Microsoft.CSharp\ko"". Creating directory ""s:\c1\bin/obj/Windows_NT.AnyCPU.Debug\Microsoft.CSharp\ru"". Creating directory ""s:\c1\bin/obj/Windows_NT.AnyCPU.Debug\Microsoft.CSharp\zh-Hans"". Creating directory ""s:\c1\bin/obj/Windows_NT.AnyCPU.Debug\Microsoft.CSharp\zh-Hant"". C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\AL.exe /culture:de /delaysign+ /keyfile:s:\c1\packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00104/lib/MSFT.snk /out:s:\c1\bin/obj/Windows_NT.AnyCPU.Debug\Microsoft.CSharp\de\Microsoft.CSharp.resources.dll /template:s:\c1\bin/obj/Windows_NT.AnyCPU.Debug\Microsoft.CSharp\Microsoft.CSharp.dll /embed:s:\c1\bin/obj/Windows_NT.AnyCPU.Debug\Microsoft.CSharp\Microsoft.CSharp.Resources.Strings.de.resources 175>ALINK : error AL1078: Error signing assembly -- Access is denied. [s:\c1\src\Microsoft.CSharp\src\Microsoft.CSharp.csproj] 175>Done Building Project ""s:\c1\src\Microsoft.CSharp\src\Microsoft.CSharp.csproj"" (BuildAndTest target(s)) -- FAILED. ``` [msbuild.log.txt](https://github.com/dotnet/corefx/files/11943/msbuild.log.txt) " 3785 area-System.Net SendReceive.SendRecvAsync_Multiple_Stream_TCP_IPv4 failed in CI on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug_prtest/4952/console ``` System.Net.Sockets.Tests.SendReceive.SendRecvAsync_Multiple_Stream_TCP_IPv4 [FAIL] Assert.Equal() Failure Expected: 1430411494 Actual: 228538420 Stack Trace: d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets\tests\FunctionalTests\SendReceive.cs(381,0): at System.Net.Sockets.Tests.SendReceive.SendRecvAsync_Stream_TCP(IPAddress listenAt, Boolean useMultipleBuffers) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets\tests\FunctionalTests\SendReceive.cs(501,0): at System.Net.Sockets.Tests.SendReceive.SendRecvAsync_Multiple_Stream_TCP_IPv4() ``` 3786 area-System.Net Merge changes from TFS 3787 area-System.Reflection Add unit test coverage for portable PDB There is test coverage in Roslyn for portable PDBs, but before we ship a stable System.Reflection.Metadata, we need sufficient unit tests in corefx. We'll merge #3560 with Roslyn's sign-off now so that we can get them a -rc build out of master in time. 3788 area-System.IO Complete Environmment.SpecialFolder Filed on behalf of [Joel Bennett](https://twitter.com/Jaykul). Many of [the locations](https://msdn.microsoft.com/en-us/library/dd378457) added since Vista are missing. 3789 area-Infrastructure Get automated process to enforce coding rules Currently, we have code styling and formatting rules for both native and managed code but there is no process to enforce these rules. We should enforce these rules in an automated, easy way to ensure code cleanliness and styling 3790 area-System.Net Sending http requests segfaults sometimes on Mac if the request fails I noticed this issue when trying dnx beta-8 bits on Mac. When I restore packages of my dnx app I frequently (~50% of the time) get a segfault if the request fails with an HTTP error (e.g. 404 or 400). I am not exactly sure if this is a bug in coreclr, libcurl or somewhere else. I was not able to repro this issue on Linux. I also don’t seem to be getting the segfault if the request succeeds. Exception details: ``` Process 51039 stopped * thread #7: tid = 0x51dec4, 0x00007fff8ddc7852 libsystem_coretls.dylib`tls_handshake_set_peer_trust + 4, stop reason = EXC_BAD_ACCESS (code=1, address=0x48) frame #0: 0x00007fff8ddc7852 libsystem_coretls.dylib`tls_handshake_set_peer_trust + 4 libsystem_coretls.dylib`tls_handshake_set_peer_trust: -> 0x7fff8ddc7852 <+4>: movl %esi, 0x48(%rdi) 0x7fff8ddc7855 <+7>: xorl %eax, %eax 0x7fff8ddc7857 <+9>: popq %rbp 0x7fff8ddc7858 <+10>: retq ``` Stack trace: ``` * thread #7: tid = 0x2d98, 0x00007fff8a53b852 libsystem_coretls.dylib`tls_handshake_set_peer_trust + 4, stop reason = EXC_BAD_ACCESS (code=1, address=0x48) * frame #0: 0x00007fff8a53b852 libsystem_coretls.dylib`tls_handshake_set_peer_trust + 4 frame #1: 0x00007fff898c510b Security`tls_verify_peer_cert + 537 frame #2: 0x00007fff8a537676 libsystem_coretls.dylib`SSLProcessHandshakeRecordInner + 234 frame #3: 0x00007fff8a537eff libsystem_coretls.dylib`SSLProcessHandshakeRecord + 1119 frame #4: 0x00007fff8a53b4f1 libsystem_coretls.dylib`tls_handshake_process + 116 frame #5: 0x00007fff8988efb6 Security`SSLHandshakeProceed + 126 frame #6: 0x00007fff8988ef21 Security`SSLHandshake + 148 frame #7: 0x00007fff8b864b32 libcurl.4.dylib`darwinssl_connect_step2 + 74 frame #8: 0x00007fff8b864612 libcurl.4.dylib`darwinssl_connect_common + 4013 frame #9: 0x00007fff8b862cca libcurl.4.dylib`Curl_ssl_connect_nonblocking + 77 frame #10: 0x00007fff8b82b61b libcurl.4.dylib`https_connecting + 22 frame #11: 0x00007fff8b84c6e9 libcurl.4.dylib`multi_runsingle + 1016 frame #12: 0x00007fff8b84c24f libcurl.4.dylib`curl_multi_perform + 159 frame #13: 0x000000011db0eb32 frame #14: 0x000000011db0cd7a frame #15: 0x000000011db0c9d3 frame #16: 0x000000011db4f879 frame #17: 0x000000011db4e16e frame #18: 0x000000011db4f58c frame #19: 0x000000011db4ea66 frame #20: 0x000000011db4e16e frame #21: 0x0000000101373bca libcoreclr.dylib`FastCallFinalizeWorker_End + 124 frame #22: 0x000000010128f165 libcoreclr.dylib`MethodDescCallSite::CallTargetWorker(unsigned long const*) + 917 frame #23: 0x00000001012a210c libcoreclr.dylib`ThreadNative::KickOffThread_Worker(void*) + 348 frame #24: 0x0000000101255b05 libcoreclr.dylib`ManagedThreadBase_DispatchOuter(ManagedThreadCallState*) + 277 frame #25: 0x00000001012560b9 libcoreclr.dylib`ManagedThreadBase::KickOff(ADID, void (*)(void*), void*) + 57 frame #26: 0x00000001012a2230 libcoreclr.dylib`ThreadNative::KickOffThread(void*) + 160 frame #27: 0x0000000101078c55 libcoreclr.dylib`CorUnix::CPalThread::ThreadEntry(void*) + 357 frame #28: 0x00007fff8e17305a libsystem_pthread.dylib`_pthread_body + 131 frame #29: 0x00007fff8e172fd7 libsystem_pthread.dylib`_pthread_start + 176 frame #30: 0x00007fff8e1703ed libsystem_pthread.dylib`thread_start + 13 ``` 3793 area-System.Diagnostics EventListener.DisposeOnShutdown crashing xunit processes Recently we've seen xunit failing due to a bug in EventListener.DisposeOnShutdown. Here is the stack of the failure: ``` System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) at System.Collections.Generic.List`1.Enumerator.MoveNextRare() at System.Diagnostics.Tracing.EventListener.DisposeOnShutdown(Object sender, ``` Here is the relevant code: ``` csharp private static void DisposeOnShutdown(object sender, EventArgs e) { foreach (var esRef in s_EventSources) { EventSource es = esRef.Target as EventSource; if (es != null) es.Dispose(); } } ``` It appears this code is not accounting for the case that `s_EventSources` could be modified either by the `Dispose` call directly or indirectly via other methods in `EventListener`. All of the other methods which modify / enumerate `s_EventSources` take care to lock the appropriate guard. This method is the sole exception. Jenkins Job Link showing the failure in action: http://dotnet-ci.cloudapp.net/job/roslyn_master_win_rel_unit64/112/ 3796 area-Serialization Add perf test to deserialize large object graph Fix #3302 3797 area-System.Net Socket.Connect(dnsname, port) throws System.ArgumentException on Linux "(Please see my project.json and a Program.cs template at https://github.com/dotnet/corefx/issues/3777) The following code runs fine on Windows dnxcore50 ``` csharp socket.Connect(""yu-ubt2.cloudapp.net"", 6379); ``` On Linux it throws ``` System.ArgumentException: The AddressFamily 117 is not valid for the System.Net.IPEndPoint end point, use InterNetwork instead. Parameter name: socketAddress at System.Net.IPEndPoint.Create(SocketAddress socketAddress) at System.Net.Dns.TryGetAddrInfo(String name, AddressInfoHints flags, IPHostEntry& hostinfo) at System.Net.Dns.TryGetAddrInfo(String name, IPHostEntry& hostinfo) at System.Net.Dns.GetAddrInfo(String name) at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6) at System.Net.Dns.GetHostAddresses(String hostNameOrAddress) at System.Net.Sockets.Socket.Connect(String host, Int32 port) at Program.Main() ``` " 3799 area-System.Net Socket.Connect(ipaddress, port) throws System.Net.Sockets.SocketException on Linux "(Please see my `project.json` at https://github.com/dotnet/corefx/issues/3777) The following code runs fine on Windows dnxcore50 ``` csharp using System; using System.Net.Sockets; using System.Threading; using System.Threading.Tasks; public class Program { public static void Main() { var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) { }; try { var str = ""ping""; var data = new byte[str.Length * sizeof(char)]; System.Buffer.BlockCopy(str.ToCharArray(), 0, data, 0, data.Length); socket.Connect(""127.0.0.1"", 6379); socket.Send(data); Console.WriteLine(""data sent to server""); } catch (Exception ex) { System.Console.WriteLine(ex.ToString()); } } } ``` On Linux it throws ``` System.Net.Sockets.SocketException: Address family not supported by protocol 127.0.0.1:6379 at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port) at System.Net.Sockets.Socket.Connect(String host, Int32 port) at Program.Main() ``` " 3802 area-System.Net Test - Fix FakeNetwrokStream(System.Net.Security.Tests) read method for successive network read In SslStreamStreamToStreamTest.cs, SslStream_StreamToStream_Successive_ClientWrite_Success need to rely on DoNetworkRead() of FakeNetwrokStream because of the limitation of FakeNetworkStream. The read method in FakeNetworkStream does do NetworkRead on some condition which itself is wrong. As a result, in successive read, data is never read from the network. So for now we have put a workaround method named DoNetworkRead(), which is being explicitly called from SslStream_StreamToStream_Successive_ClientWrite_Success. This issue is to remove DoNetworkRead() & find the real fix so that a NetworkStream encapsulation is maintained 3806 area-System.Net PreAuthenticate fix When CURLOPT_HTTPAUTH is set to any, libcurl will first query the server to figure out the right authentication scheme. This breaks the expectation when PreAuthenticate is set to true. We need to iterate over available schemes and set the auth-scheme flags to only those that are available. Also, while updating the CredentialCache, we ignore ArgumentException (raised when the cache contains the given url and scheme pair) 3807 area-System.Net Adding client cert validation logic and usage of EncryptionPolicy This includes: 1. Client Certificate validation logic at server side. Enabled the Verify_callback. Added the logic of updating CA list to be sent to client. 2. Added the usage of EncryptionPolicy flag passed during handshake. 3. Enabled the constructors of SafeX509Handle and X509StoeCTXHandle to generate the handle from an Intptr. 4. Added SafeX509NameStackHandle to be used by the stack related APIs. 5. Added a few X509_NAME stack related Macro-functions in *X509_name.cpp/.h Testing done locally using the existing security testcases for Encryption Policy variations. Client Cert validation logic is tested by directly calling AuthenticateAsServer method by enabling clientCertificateRequired flag. 3808 area-System.Net Disable another failing sockets test #3494 cc: @pgavlin, @davidsh 3809 area-System.Net Fix bugs in IPPacketInformation. - GetHashCode() and Equals() both stood the chance of dereferencing a null pointer when called on default values. - GetHashCode() was using a weak method of combining hash codes. This has been updated to use the same technique used by Roslyn. - The equality and inequality operators were unnecessarily boxing input parameters. 3810 area-System.Numerics Perf: Vector operations up to 200x slower on Linux Perf results for the individual iterations are available on my share, or I can post them here if requested. The tests that produced these results are currently in PR #3764. I included all Vector tests here (not just the slower ones) to simplify comparisons. | test name | Windows time | Linux time | linux/windows | | --- | --- | --- | --- | | Perf_Vector2.Operation(operation: Add_Function) | 8.000289665 | 59.11430001 | 7.389019958 | | Perf_Vector2.Operation(operation: Add_Operator) | 0.288809858 | 52.2279 | 180.8383562 | | Perf_Vector2.Operation(operation: Distance_Squared) | 22.23037618 | 21.2417 | 0.955525891 | | Perf_Vector2.Operation(operation: Dot) | 0.351532631 | 18.29149999 | 52.03357636 | | Perf_Vector2.Operation(operation: Length_Squared) | 0.38232381 | 15.3581 | 40.17039899 | | Perf_Vector2.Operation(operation: Mul_Function) | 8.379477337 | 60.432 | 7.211905656 | | Perf_Vector2.Operation(operation: Mul_Operator) | 0.320741452 | 56.456 | 176.0171619 | | Perf_Vector2.Operation(operation: Normalize) | 60.02426801 | 67.0325 | 1.116756642 | | Perf_Vector2.Operation(operation: SquareRoot) | 0.321026555 | 73.6878 | 229.5380205 | | Perf_Vector2.Operation(operation: Sub_Function) | 8.074986785 | 60.292 | 7.466513767 | | Perf_Vector2.Operation(operation: Sub_Operator) | 0.266571784 | 56.0038 | 210.0890016 | | Perf_Vector3.Operation(operation: Add_Function) | 10.99273613 | 78.2232 | 7.115898995 | | Perf_Vector3.Operation(operation: Add_Operator) | 5.44148564 | 64.7522 | 11.89972818 | | Perf_Vector3.Operation(operation: Cross) | 37.46773341 | 70.217 | 1.874065859 | | Perf_Vector3.Operation(operation: Distance_Squared) | 23.74256521 | 20.9329 | 0.881661262 | | Perf_Vector3.Operation(operation: Dot) | 5.302070023 | 18.5697 | 3.502349068 | | Perf_Vector3.Operation(operation: Length_Squared) | 14.50720713 | 14.7616 | 1.01753562 | | Perf_Vector3.Operation(operation: Mul_Function) | 10.89209459 | 74.3459 | 6.825675206 | | Perf_Vector3.Operation(operation: Mul_Operator) | 5.499646757 | 64.2378 | 11.68035018 | | Perf_Vector3.Operation(operation: Normalize) | 69.1874949 | 90.3523 | 1.305905065 | | Perf_Vector3.Operation(operation: SquareRoot) | 2.665432739 | 117.7835 | 44.18925989 | | Perf_Vector3.Operation(operation: Sub_Function) | 10.91575818 | 75.24789999 | 6.89351108 | | Perf_Vector3.Operation(operation: Sub_Operator) | 5.528157108 | 65.3777 | 11.82631006 | | Perf_Vector4.Operation(operation: Add_Function) | 2.999859159 | 70.9498 | 23.65104368 | | Perf_Vector4.Operation(operation: Add_Operator) | 2.746117033 | 66.9818 | 24.39145863 | | Perf_Vector4.Operation(operation: Distance_Squared) | 19.94584174 | 20.5697 | 1.03127761 | | Perf_Vector4.Operation(operation: Dot) | 2.631220317 | 21.6594 | 8.231693811 | | Perf_Vector4.Operation(operation: Length_Squared) | 2.74754255 | 15.3553 | 5.588739654 | | Perf_Vector4.Operation(operation: Mul_Function) | 3.059730896 | 69.6198 | 22.75356963 | | Perf_Vector4.Operation(operation: Mul_Operator) | 2.709053576 | 68.6514 | 25.34147003 | | Perf_Vector4.Operation(operation: Normalize) | 69.79761642 | 82.259 | 1.178535947 | | Perf_Vector4.Operation(operation: SquareRoot) | 1.368781964 | 144.8611 | 105.8321222 | | Perf_Vector4.Operation(operation: Sub_Function) | 3.020101508 | 70.3999 | 23.31044165 | | Perf_Vector4.Operation(operation: Sub_Operator) | 2.664292325 | 69.3502 | 26.0295011 | Loop/testing overhead is equivalent to roughly .3 ms on both platforms. @mellinoe 3811 area-System.Globalization Perf: DateTime.Parse(string, CultureInfo) 90x slower on Linux "I can post or email the individual iteration results if desired; the values shown are the medians. | test name | date ran | Windows time | Linux time | linux/windows | | --- | --- | --- | --- | --- | | System.Globalization.Tests.Perf_DateTimeCultureInfo.Parse(culturestring: ""ja"") | 10/13/2015 | 3.926445575 | 269.9053 | 68.7403645 | | System.Globalization.Tests.Perf_DateTimeCultureInfo.Parse(culturestring: """") | 10/13/2015 | 3.748826086 | 151.5521 | 40.42654861 | | System.Globalization.Tests.Perf_DateTimeCultureInfo.Parse(culturestring: ""fr"") | 10/13/2015 | 3.861441974 | 135.64 | 35.12677412 | | System.Globalization.Tests.Perf_DateTimeCultureInfo.Parse(culturestring: ""da"") | 10/13/2015 | 5.109054945 | 113.3454 | 22.18519887 | Perf test: ``` [Benchmark] [InlineData(""fr"")] [InlineData(""da"")] [InlineData(""ja"")] [InlineData("""")] public void Parse(string culturestring) { CultureInfo cultureInfo = new CultureInfo(culturestring); foreach (var iteration in Benchmark.Iterations) using (iteration.StartMeasurement()) { for (int i = 0; i < innerIterations; i++) { DateTime.Parse(""10/10/2010 12:00:00 AM"", cultureInfo); DateTime.Parse(""10/10/2010 12:00:00 AM"", cultureInfo); DateTime.Parse(""10/10/2010 12:00:00 AM"", cultureInfo); DateTime.Parse(""10/10/2010 12:00:00 AM"", cultureInfo); } } } ``` " 3813 area-System.IO Perf: MemoryMappedFile.CreateFromFile ~20x slower on Linux | test name | date ran | Windows time | Linux time | linux/windows | | --- | --- | --- | --- | --- | | System.IO.MemoryMappedFiles.Tests.Perf_MemoryMappedFile.CreateFromFile(capacity: 10000) | 10/13/2015 | 0.433927546 | 73.4239 | 169.2077414 | | System.IO.MemoryMappedFiles.Tests.Perf_MemoryMappedFile.CreateFromFile(capacity: 100000) | 10/13/2015 | 0.626372417 | 51.90790001 | 82.87066702 | | System.IO.MemoryMappedFiles.Tests.Perf_MemoryMappedFile.CreateFromFile(capacity: 1000000) | 10/13/2015 | 1.818675306 | 57.4766 | 31.60355221 | | System.IO.MemoryMappedFiles.Tests.Perf_MemoryMappedFile.CreateFromFile(capacity: 10000000) | 10/13/2015 | 12.5975838 | 211.0644 | 16.7543557 | Perf test: ``` [Benchmark] [InlineData(10000)] [InlineData(100000)] [InlineData(1000000)] [InlineData(10000000)] public void CreateFromFile(int capacity) { // Note that the test results will include the disposal overhead of both the MemoryMappedFile // as well as the Accessor for it foreach (var iteration in Benchmark.Iterations) using (TempFile file = new TempFile(GetTestFilePath(), capacity)) using (iteration.StartMeasurement()) using (MemoryMappedFile mmfile = MemoryMappedFile.CreateFromFile(file.Path)) using (mmfile.CreateViewAccessor(capacity / 4, capacity / 2)) { } } ``` 3814 area-System.IO Perf: MemoryMappedFiles.CreateNew ~5x slower on Linux Probably related to #3813; possible duplicate | test name | date ran | Windows time | Linux time | linux/windows | | --- | --- | --- | --- | --- | | System.IO.MemoryMappedFiles.Tests.Perf_MemoryMappedFile.CreateNew(capacity: 10000) | 10/13/2015 | 1.420100596 | 25.587 | 18.01773767 | | System.IO.MemoryMappedFiles.Tests.Perf_MemoryMappedFile.CreateNew(capacity: 100000) | 10/13/2015 | 1.437777014 | 24.3962 | 16.96799974 | | System.IO.MemoryMappedFiles.Tests.Perf_MemoryMappedFile.CreateNew(capacity: 1000000) | 10/13/2015 | 1.6233794 | 24.3918 | 15.0253231 | | System.IO.MemoryMappedFiles.Tests.Perf_MemoryMappedFile.CreateNew(capacity: 10000000) | 10/13/2015 | 5.915327678 | 24.5068 | 4.142931944 | Perf Test: ``` [Benchmark] [InlineData(10000)] [InlineData(100000)] [InlineData(1000000)] [InlineData(10000000)] public void CreateNew(int capacity) { const int innerIterations = 1000; MemoryMappedFile[] files = new MemoryMappedFile[innerIterations]; foreach (var iteration in Benchmark.Iterations) { using (iteration.StartMeasurement()) for (int i = 0; i < innerIterations; i++) files[i] = MemoryMappedFile.CreateNew(null, capacity); for (int i = 0; i < innerIterations; i++) files[i].Dispose(); } } ``` Note that unlike CreateFromFile, the CreateNew tests only construct the files - they do not create an accessor. Therefore, any comparison of the results between the two tests probably won't be valid. If desired, I can add a test (or modify this test) that enables a better comparison between the two. 3815 area-System.Globalization Perf: double.ToString(CultureInfo) 7x slower on Linux "| test name | date ran | Windows time | Linux time | linux/windows | | --- | --- | --- | --- | --- | | System.Globalization.Tests.Perf_NumberCultureInfo.ToString(culturestring: ""fr"") | 10/13/2015 | 3.780472576 | 29.0264 | 7.677981896 | | System.Globalization.Tests.Perf_NumberCultureInfo.ToString(culturestring: ""da"") | 10/13/2015 | 3.757379192 | 28.05800001 | 7.467439025 | | System.Globalization.Tests.Perf_NumberCultureInfo.ToString(culturestring: ""ja"") | 10/13/2015 | 3.773344988 | 27.9326 | 7.402609643 | | System.Globalization.Tests.Perf_NumberCultureInfo.ToString(culturestring: """") | 10/13/2015 | 3.806987203 | 27.96 | 7.34439033 | Perf Test: ```c# [Benchmark] [InlineData(""fr"")] [InlineData(""da"")] [InlineData(""ja"")] [InlineData("""")] public void ToString(string culturestring) { double number = 104234.343; CultureInfo cultureInfo = new CultureInfo(culturestring); foreach (var iteration in Benchmark.Iterations) using (iteration.StartMeasurement()) { for (int i = 0; i < innerIterations; i++) { number.ToString(cultureInfo); number.ToString(cultureInfo); number.ToString(cultureInfo); number.ToString(cultureInfo); number.ToString(cultureInfo); number.ToString(cultureInfo); number.ToString(cultureInfo); number.ToString(cultureInfo); number.ToString(cultureInfo); } } } ``` Although it's an admittedly poor comparative data point, the ToString(CultureInfo) method for DateTime was 1:1 between Linux:Windows so not all ToString methods are equally slow when using CultureInfo. As such, I am unsure of whom to to notify; @steveharter @stephentoub? I have not yet added equivalent ToString tests to other classes, but can if desired for more data points. " 3816 area-System.Security Enable TestECDsaPublicKey_ValidatesSignature after new packages are published Since the test pulls the OpenSsl DLL from a nuget package it doesn't have the fix from #3800; so there's a bit of a lag in re-enabling this test. 3818 area-System.Console Perf: Console Color setting 5x slower on Linux | test name | Windows time | Linux time | linux/windows | | --- | --- | --- | --- | | Perf_Console.ForegroundColor | 11.91903744 | 49.60640001 | 4.161946822 | | Perf_Console.BackgroundColor | 12.05075527 | 62.62819999 | 5.197035257 | Perf Test (same for ForegroundColor): ``` [Benchmark] public void BackgroundColor() { const int innerIterations = 1000; foreach (var iteration in Benchmark.Iterations) { using (iteration.StartMeasurement()) { for (int i = 0; i < innerIterations; i++) { Console.BackgroundColor = ConsoleColor.Black; Console.BackgroundColor = ConsoleColor.Blue; Console.BackgroundColor = ConsoleColor.Cyan; Console.BackgroundColor = ConsoleColor.DarkBlue; Console.BackgroundColor = ConsoleColor.DarkGray; Console.BackgroundColor = ConsoleColor.Red; Console.BackgroundColor = ConsoleColor.DarkGreen; Console.BackgroundColor = ConsoleColor.White; } } } Console.ResetColor(); } ``` Can post individual iteration results if desired. 3819 area-System.Runtime Perf: Stringbuilder ctor 5x slower on Linux The constructor that takes a string is fine, but the default constructor is slow. | test name | date ran | Windows time | Linux time | linux/windows | | --- | --- | --- | --- | --- | | System.Runtime.Tests.Perf_StringBuilder.ctor | 10/13/2015 | 1.690948933 | 9.650000006 | 5.706854783 | | System.Runtime.Tests.Perf_StringBuilder.ctor_string(length: 100) | 10/13/2015 | 5.608841402 | 11.93529999 | 2.127943926 | | System.Runtime.Tests.Perf_StringBuilder.ctor_string(length: 1000) | 10/13/2015 | 32.82909926 | 36.8228 | 1.121651243 | Perf test: ``` [Benchmark] public void ctor() { StringBuilder builder; foreach (var iteration in Benchmark.Iterations) using (iteration.StartMeasurement()) for (int i = 0; i < 10000; i++) { builder = new StringBuilder(); builder = new StringBuilder(); builder = new StringBuilder(); builder = new StringBuilder(); builder = new StringBuilder(); builder = new StringBuilder(); builder = new StringBuilder(); builder = new StringBuilder(); builder = new StringBuilder(); } } [Benchmark] [InlineData(100)] [InlineData(1000)] public void ctor_string(int length) { PerfUtils utils = new PerfUtils(); string input = utils.CreateString(length); StringBuilder builder; foreach (var iteration in Benchmark.Iterations) using (iteration.StartMeasurement()) for (int i = 0; i < 10000; i++) { builder = new StringBuilder(input); builder = new StringBuilder(input); builder = new StringBuilder(input); builder = new StringBuilder(input); builder = new StringBuilder(input); builder = new StringBuilder(input); builder = new StringBuilder(input); builder = new StringBuilder(input); builder = new StringBuilder(input); } } ``` possibly related to #3588? @stephentoub @JeremyKuhne I think you have mentioned something like this? 3821 area-System.Net Shim in{,6}_pktinfo. This moves all of the processing for control messages--arguably some of the trickier interop in Sockets--into the native shims. 3825 area-System.Net Adding original SSPI object model back to the Windows SslStream implementation 1. In preparation for NegotiateStream I'm adding back the original SSPI object model. Code was brought in from c74b6f2 with cosmetic or no modifications (simplest way to review is to diff against that). SslStreamPal.Windows has been updated to match the original code in SecureChannel. 2. Updated both Windows and Unix PAL to match the interface (a few methods got moved, no substantial changes in non-Windows code). 3. Adding common test timeout configuration. @bartonjs @vijaykota @rajansingh10 PTAL /cc: @DavidSh, @josguil @SidharthNabar @pgavlin @stephentoub 3826 area-System.Security Unlist obsolete beta6/beta7 crypto packages from nuget.org "Many packages are marked ""obsolete"" and need to be removed by RTM. (It would be nice if we didn't have them for RC1) See packages marked obsolete here: https://www.nuget.org/packages?q=System.Security.Cryptography This is also throwing off corefx-progress results. cc @bartonjs @chcosta @terrajobst " 3827 area-System.Net Re-enable test on *Nix HttpContentTest.ReadAsStringAsync_SetInvalidCharset_ThrowsInvalidOperationException can be re-enabled due to fixes in the CoreCLR for System.Text.Encoding on *Nix. This fixes #3343. 3829 area-System.Net Unix SslStream: Implement RFC2812 IP Address matching for HTTP over TLS. If the hostname looks like an IP Address then do exact matches against GEN_IPADDR Subject Alternative Name entries. Unlike the GEN_DNS matching of text hostnames, the IP Address form always falls back to the CN text comparison if no other match has been found. Fixes #3445. cc: @vijaykota @stephentoub @rajansingh10 @shrutigarg @CIPop @davidsh 3830 area-System.Net Re-enable some WinHttpHandler unit tests Turned on tests: SendAsync_NoWinHttpDecompressionSupportAndResponseBodyIsDeflateCompressed_ExpectedResponse SendAsync_NoWinHttpDecompressionSupportAndResponseBodyIsGZipCompressed_ExpectedResponse since the issue with clrcompression.dll was resolved a while ago. Removed a *Nix annotation suppressing a unit test. This is not needed in the test sources since the WinHttpHandler library and tests are only supported on Windows and won't run anymore in CI (disabled in CSPROJ files) for non-Windows platforms. 3831 area-System.Net Intermittent System.Net.Security.Tests.SslStreamStreamToStreamTest.SslStream_StreamToStream_Authentication_Success failure See http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug_prtest/5040/ for an instance when this failed. 3832 area-System.Net Test: Add the Cipher Related tests to verify cipher Algorithms not present in the enum. Add the Cipher Related tests to verify cipher Algorithms not present in the enum. 3834 area-System.Linq Expression interpreter - Some instructions lacking an InstructionName Makes it hard to debug the emitted code. E.g. AssignLocalInstruction lacks an override for InstructionName. 3836 area-System.Linq Expression interpreter - Remove dead code There's some unused code in a variety of places of the expression interpreter that can be removed to reduce code size. 3838 area-System.Linq Expression compiler - No support for TryFault and TryCatch with Filter See CoreCLR https://github.com/dotnet/coreclr/issues/1764 for the underlying issue that causes this limitation. Note that this does work in the .NET Framework when emitting to a MethodBuilder that's not backed by a DynamicMethod. We could either get the support for it in CoreCLR or consider an emulation strategy a la a try/catch/rethrow/finally with a Boolean flag to check whether an exception was observed. 3839 area-System.Security System.Security.Cryptography.Algorithms.dll appears multiple time in the reference assemblies When you build the reference assemblies, the assembly System.Security.Cryptography.Algorithms.dll appears 3 times: ./bin/ref/System.Security.Cryptography.Algorithms/4.0.0.0/System.Security.Cryptography.Algorithms.dll ./bin/ref/System.Security.Cryptography.Cng/4.0.0.0/System.Security.Cryptography.Algorithms.dll ./bin/ref/System.Security.Cryptography.X509Certificates/4.0.0.0/System.Security.Cryptography.Algorithms.dll when I think it should only appear in ./bin/ref/System.Security.Cryptography.Algorithms/4.0.0.0/System.Security.Cryptography.Algorithms.dll 3840 area-System.Linq Expression interpreter - No support for TryFault This is not implemented right now. It may be possible to get it to work if we could get a try...fault... region in the interpreter code (in particular in EnterTryCatchFinallyInstruction.Run) but the C# compiler does not have this construct. Some options are: - Get it into the compiled binary using some ILASM magic, possibly by using a helper TryFault method that's self-contained and is parameterized on interpreter instruction ranges (range of try, range of fault, etc.). May be tricky with build. - Piggyback on a C# language construct that emits fault blocks, e.g. using blocks in iterators. An example of this trick is pasted below, but it'd obviously be changed to be parameterized on instruction ranges rather than take in Action delegates. - Emulate try...fault in some lowering phase by rewriting it to try...finally with a Boolean flag check. This could also be the way to get TryFault to work on the compiler, see #3838. Will have to be double-checked to be conform the exception semantics of the CLR construct. ``` csharp static class ExceptionHelpers { public static void TryFault(Action body, Action fault) { TryFaultCore(body, fault).MoveNext(); } private static IEnumerator TryFaultCore(Action body, Action fault) { using (new Handler(fault)) { body(); yield return null; } } } struct Handler : IDisposable { private readonly Action _fault; public Handler(Action fault) { _fault = fault; } public void Dispose() { _fault(); } } ``` 3841 area-System.Linq Expression interpreter - No support for exception filters "The expression interpreter lacks support for TryCatch with a CatchBlock whose Filter property is non-null. This is properly supported in the expression compiler though. Support for this could be likely be added by unflattening the list of catch blocks that are processed by EnterTryCatchFinallyInstruction.Run and using C# 6.0's support for filters to run a region of interpreter instructions when an exception occurs (those would have an ""isinst"" check followed by the user-supplied filter code) which get skipped on regular code paths using a goto. The reason the list of catch blocks needs to be unflattened (just in this case, we can keep things compact in cases where no filters are used) is to ensure that the code in the filters runs prior to unwinding the stack, such that any side-effects are visible across filters and eventually when the handlers run. By piggybacking on the CLR support for filters, we don't have to worry about this stack walk to evaluate which handler to use by running filter expressions; we just have to keep the nesting of exception handlers consistent with the emitted expression. Rough idea: ``` csharp public override int Run(InterpretedFrame frame) { // ... try { // ... } catch (Exception ex) when (RunFilter(frame, _filter.StartIndex, _filter.EndIndex)) { // ... } // ... } ``` There may be some trickiness around keeping the stack balance in all cases, but should be doable. " 3843 area-System.Security Unix AsnEncodedData.Format does not match Windows AsnEncodedData.Format (Apparently I missed this when moving x-plat crypto bugs from TFS to github back in April. Ouch.) The biggest example that people will notice would have to do with Subject Alternative Names. The examples below are `sanExtension.Format(true)` Windows en-US: ``` DNS Name=dns1.subject.example.org DNS Name=dns2.subject.example.org RFC822 Name=sanemail1@example.org RFC822 Name=sanemail2@example.org Other Name: Principal Name=subjectupn1@example.org Other Name: Principal Name=subjectupn2@example.org URL=http://uri1.subject.example.org/ URL=http://uri2.subject.example.org/ ``` Unix (non-localized): ``` DNS:dns1.subject.example.org, DNS:dns2.subject.example.org, email:sanemail1@example.org, email:sanemail2@example.org, othername:, othername:, URI:http://uri1.subject.example.org/, URI:http://uri2.subject.example.org/ ``` And, for good measure, showing that Windows localizes this: Windows es-ES ``` Nombre DNS=dns1.subject.example.org Nombre DNS=dns2.subject.example.org Nombre RFC822=sanemail1@example.org Nombre RFC822=sanemail2@example.org Otro nombre: Nombre de entidad de seguridad=subjectupn1@example.org Otro nombre: Nombre de entidad de seguridad=subjectupn2@example.org Dirección URL=http://uri1.subject.example.org/ Dirección URL=http://uri2.subject.example.org/ ``` Windows ja-JP: ``` DNS Name=dns1.subject.example.org DNS Name=dns2.subject.example.org RFC822 Name=sanemail1@example.org RFC822 Name=sanemail2@example.org Other Name: プリンシパル名=subjectupn1@example.org Other Name: プリンシパル名=subjectupn2@example.org URL=http://uri1.subject.example.org/ URL=http://uri2.subject.example.org/ ``` 3844 area-System.Net Crash in System.Net.Sockets.AsyncServer.Tests in CI on Windows "http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug_prtest/5061/consoleFull Not much to go on in the logs: ``` Discovering: System.Net.Sockets.AsyncServer.Tests Discovered: System.Net.Sockets.AsyncServer.Tests Starting: System.Net.Sockets.AsyncServer.Tests d:\j\workspace\dotnet_corefx_windows_debug_prtest\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00104\lib\tests.targets(129,5): warning MSB3073: The command ""CoreRun.exe xunit.console.netcore.exe System.Net.Sockets.AsyncServer.Tests.dll -xml testResults.xml -notrait category=nonwindowstests -notrait category=OuterLoop -notrait category=failing "" exited with code -2146232797. [d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets.Legacy\tests\FunctionalTests\System.Net.Sockets.AsyncServer.Tests.csproj] d:\j\workspace\dotnet_corefx_windows_debug_prtest\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00104\lib\tests.targets(136,5): error : One or more tests failed while running tests from 'System.Net.Sockets.AsyncServer.Tests' please check log for details! ``` " 3845 area-System.Net SslStream_StreamToStream_Authentication_Success failed in CI on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_release_prtest/5049/console ``` Discovering: System.Net.Security.Tests Discovered: System.Net.Security.Tests Starting: System.Net.Security.Tests System.Net.Security.Tests.SslStreamStreamToStreamTest.SslStream_StreamToStream_Authentication_Success [FAIL] Handshake completed in the allotted time Expected: True Actual: False Stack Trace: d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Security\tests\FunctionalTests\SslStreamStreamToStreamTest.cs(40,0): at System.Net.Security.Tests.SslStreamStreamToStreamTest.SslStream_StreamToStream_Authentication_Success() ``` 3849 area-System.Globalization Investigate removing Homebrew dependency for ICU The experience when you don't have an ICU or have a mismatched ICU (anything other than version 55) today is not great. Let's improve this experience for rc1 http://userguide.icu-project.org/design#TOC-ICU-Data-Compatibility Starting in ICU 3.8 and later, the data library that comes with ICU is binary compatible and structurally compatible with versions of ICU with the same major and minor version, or a maintenance release. This allows multiple maintenance releases of ICU to share the same data, but generally the latest maintenance release of the data should be used. 3850 area-System.Globalization Modify misc tests to use Invariant culture instead of current culture Also see issue #3759 for background Some tests assume en-us or invariant and on a test machine which is not configured the tests will fail. These tests should not depend on a specific default locale. Below is a set of tests that fail when LANG variable is not set in Linux. These should be fixed to explicitly use Invariant. Note that some of these tests fail due to unrelated but known issue with case-insensitive string comparison that happens to fail with the default locale of en-US-POSIX (when LANG is not set) so these tests may have to be disabled temporary for Linux until that issue is fixed Int32Tests.TestTryParse UInt32Tests.TestTryParse UInt16Tests.TestTryParse UInt64Tests.TestTryParse StringTests.TestLastIndexOf StringTests.TestEndsWith StringTests.TestStartsWith StringTests.TestIndexOf Int16Tests.TestTryParse Int64Tests.TestTryParse TypeTests.TestGetTypeByName Tests.Expression_Tests.TestCallInstanceMethodsByName CaseInsensitiveComparer_ctor.ExecuteCaseInsensitiveComparer_ctor CaseInsensitiveComparer_Default.ExecuteCaseInsensitiveComparer_Default CaseInsensitiveComparer_Object.ExecuteCaseInsensitiveComparer_Object CollectionsUtilTests.ExecuteCollectionsUtilTests System.Reflection.Tests.ModuleTest.GetTypeTest System.Reflection.Tests.MethodInfoPropertyTests.TestReturnType2 System.Reflection.Tests.MethodInfoPropertyTests.TestReturnType4 System.Reflection.Tests.GetTypeReflectionTests.GetType1 System.Reflection.Tests.ParameterInfoNameTests.TestMethodParams1 3856 area-System.Collections Fix exception documentation on System.Collections.Immutable I noticed in making another change that a bunch of incorrect xml docs describing exceptions existed. This fixes those up by removing the invalid ones and adding explanations for the valid ones. 3857 area-System.Net Shim ip_mreqn, ipv6_mreq, and linger. These types are used for getting and setting IP multicast options. 3858 area-System.Globalization Support all CompareOptions values For cross plat we don't currently support CompareOptions other than Ordinal, IgnoreCase, OrdinalIgnoreCase and None. We need to understand how to support the other options on top of ICU, which has a different collation model than Win32. 3860 area-System.Collections Fix ImmutableList IList implementation for incompatible element types Add 15 unit tests to cover the `ImmutableList` and `ImmutableList+Builder` class's implementation of `IList.Contains`, `IList.Remove`, and `IList.IndexOf` for cases where the `object` argument is not of a compatible type with the type argument for the collection. All 15 of the added unit tests fail. Until the final commit, which fixes all the issues the tests demonstrated. Fix #1414 3862 area-Meta Investigate all Double-Check locked patterns and consider static or Lazy Investigate all Double-Check locked patterns and consider alternative singleton implementations such as the `static` or `Lazy` patterns. See: http://csharpindepth.com/Articles/General/Singleton.aspx 3863 area-System.Runtime Add System.Runtime.InteropServices.ICustomMarshaler to the contract c.f. [coreclr #1767](https://github.com/dotnet/coreclr/issues/1767) The ICustomMarshaler interface needs to be added to the contract so that people can use it. 3865 area-System.Diagnostics Enable System.Diagnostics.Process.HandleCount property 3866 area-System.Net Implement System.Net.Utilities on OSX and Linux This is the library containing various Ping utilities. 3867 area-System.Net WinHttpHandler uses async WinHTTP patterns This is a large PR and addresses work item #3000. I apologize for not being able to structure it in a series of smaller commits. The bulk of this PR is switching WinHttpHandler to use the async pattern of calling WinHTTP APIs. This involved a significant restructuring of the code. As part of that, I split up the large WinHttpHandler class into multiple, smaller, helper classes. While the intent of using async WinHTTP calls is better performance and cancel-ability, this PR has not been fully optimized yet. Due to the schedule of RC1 code complete next week, it's important that this PR get in and get mileage on it in the next few weeks. There are several TODO items that will be done in later PR's. There is still work being tracked in #2165 for various follow-up items. For example, re-conciling the best SafeHandle pattern to use for WinHTTP between WebSockets.Client and WinHttpHandler. I'm currently using a simple Debug.WriteLine for verbose debug logging which can be turned on/off via environment variable. I plan to switch this to System.Net ETW trace loggers in the next commit and/or PR. But the logging has proved very useful in diagnosing issues. Please provide feedback. Depending on the feedback, some of it will be marked as follow-up items for future PRs. 3872 area-System.Net What is roadmap for HttpListener "It's not regular issue - it's design and road map question about HTTP stack. Our company focused on multi-agent solutions that are installed into multi-node trusted environment. So for recent years we use HttpListener and develop some set of lightweight http-servers, tightly bound to our task. If we need some features as Internet access, SSL, advaced static file support we use NGINX as frontend. So we not require to use some of prepared ASP.NET Servers or IIS while they are not so close to our task. But HttpListener has http.sys implementation in .NET so we require use netsh in Windows, if we use Mono - on Windows we got troubles and bugs and on Linux - all works well. So from netcore(dnx)/corefx we expected that HttpListener class will be kept but rewritten on Mono-like style with own socket wrapping and managed HTTP protocol support. So it would be good base for lightweight HTTP-based solutions. Instead of this we see that (or it seems) that roadmap of netcore is focused on aspnet-related HOSTS and we lost valid HttpListener support, but we are turned to use ASP.NET+MS MVC or Kestrels model. It's not what we expected - all other modules (as Reflection, Xml and so on) moved to more atomic and know-what-you-exactly-want style and design. But in NET stack we still see tendention to using monstrous-like complex ""hosts"". In System.Net.Http we see some improvements for client HTTP but not for Server. May we are not right but we not see activity on HttpListener or it's analog so it's limitation that force as to keep using not unified .NET 4.5 + Mono 4.0.4 stack. What exactly planned in HTTP stack for netcore/dnx? " 3873 area-System.Linq Incorrect assertions on compiling unbox expression `EmitUnboxUnaryExpression(Expression expr)` and `AddressOf(UnaryExpression node, Type type)` (only ever called on an unboxing expression) both assert that the value of the node is not a nullable type. Unboxing to nullable types is valid, and indeed works in release builds where these assertions aren't tested. The assertions cause attempts to test this valid use of unboxing to crash. 3877 area-System.Net Shim various socket methods. This change adds shims for most of the remaining straightforward methods in sockets: - accept - bind - connect - getpeername - getsockname - getsockopt - listen - setsockopt - shutdown 3878 area-System.Collections Add Sort(Comparison) methods to ImmutableArray and Builder ImmutableList and Builder has these Sort overloads, as does Array itself. This makes this same functionality easily accessible from ImmutableArray. Fix #2167 3880 area-System.Collections Do not throw from ImmutableArray.RemoveRange when index==length ImmutableArray.RemoveRange(int, int) would throw when the first argument equals the length of the array, whereas ImmutableList.RemoveRange(int, int) allows the first argument to equal the length of the list. This makes them consistent by slightly widening the allowed input to ImmutableArray. ImmutableList is changed slightly to simplify the logic (but keep the meaning equivalent). The test is enhanced and a bug in the test fixed. Fix #2028 3881 area-System.Linq Block.Expressions sometimes throws incorrect exception on out-of-range Given: ``` BlockExpression block = Expression.Block(Expression.Empty(), Expression.Constant(3)); ``` One would expect `block.Expressions[-1]`, `block.Expressions[2]`, etc. to throw `ArgumentOutOfRangeException`. Instead they throw `InvalidOperationException`. This depends on the factory used, so some cases will throw the correct exception, which is perhaps worse as this is then inconsistent. 3882 area-System.Linq Exception on empty block expression inconsistent. `Expression.Block()` throws an `ArgumentException`. `Expression.Block(Enumerable.Repeat(Expression.Parameter(typeof(int)), 1))` throws `InvalidOperaitonException`. They should both throw `ArgumentException`. 3883 area-System.Linq Block.Update returns different expression for identical children in different collection. According to the documentation: > If all of the children are the same, it will return this expression. However, only the enumerables themselves are compared, so a different enumeration of the same children will incorrectly return a new expression. 3887 area-System.Net Merge master into the dev/ni-xplat branch Merging back the changes from dotnet/master into the dev/ni-xplat branch, with all of the code that flowed into master during the PR. I've resolved the few conflicts there were in the shared shim code, which were fairly minor after all. I am planning on separating out the NetworkInformation shim code, so that there's less chance for unrelated changes to result in merge conflicts. 3888 area-System.Xml XmlBaseReader removes significant whitespace when wrapping another reader. "This issue produces data corruption because element contents are modified. We were able to condense the repro to a few lines in LinqPad: var sourceXml = ""a\r\nb\r\nc""; XmlReaderSettings settings = new XmlReaderSettings() { IgnoreWhitespace = true }; var streamToValidate = new MemoryStream(Encoding.UTF8.GetBytes(sourceXml), false); XmlReader dictionaryReader = XmlDictionaryReader.CreateTextReader(streamToValidate, new XmlDictionaryReaderQuotas()); //// XmlReader dictionaryReader = XmlReader.Create(streamToValidate, settings); XmlReader validatingReader = XmlReader.Create(dictionaryReader, settings); XDocument.Load(validatingReader).Dump(); Uncommenting the second dictionaryReader instead of the XmlDictionaryReader doesn’t reproduce the bug. " 3889 area-System.Net Establishing TLS secure channel fails when NewSessionTicket message received **Overview** HttpWebRequest throws error a connection error when a TLS key on the server is changed. Specifically this is the implementation done by CloudFlare. Every hour, on the hour xx:00 a web service fronted by CloudFlare will throw the following exception on the first execution, but all subsequent ones succeed: _System.Net Error: 0 : [7328] Exception in HttpWebRequest#58000300::EndGetResponse - The request was aborted: Could not create SSL/TLS secure channel._ **Sample** Reproducible example here, but it needs to be running right before the hour (xx:59:59) through the following hour (xx:00:00) in order to observe the exception. We are using Fitbit.com as the example as this is fronted by the CloudFlaire service: https://github.com/aarondcoleman/FitbitProxyTest **Other Links** - More info on how CloudFlare works: https://blog.cloudflare.com/tls-session-resumption-full-speed-and-secure/ - Forum thread on this issue: https://social.msdn.microsoft.com/Forums/vstudio/en-US/eb999cd4-b43b-4779-b01b-4a04017714e3/httpwebrequest-ssl-caching-bug-cloudflare-the-request-was-aborted-could-not-create-ssltls?forum=netfxbcl - System.Net.Trace showing the occurence at the changeover of hour: https://github.com/aarondcoleman/FitbitProxyTest/blob/master/System.Net.Trace.Log This is of high importance as our integration with the Fitbit API is affected. Every first call of the hour to the API fails per server node of our infrastructure. 3890 area-System.Net Shim Interop.libc.socket(). 3891 area-System.Net WinHttpHandler: Support retrieving the Trusted Issuer List from WinHTTP Get the Trusted Issuers List from WinHTTP and use that to help narrow down the list of eligible client certificates used in the WinHttpCertificateHelper class. 3892 area-System.Security Unix X500DistinguishedName prints multicomponent RDNs different than Windows "Normal certificate subjects are similar to ``` Sequence( Set(Sequence(Oid(CN), PrintableString(""CommonName""))), Set(Sequence(Oid(O), PrintableString(""Organization"")))) ``` When presented with a multi-component RDN like ``` Sequence( Set( Sequence(Oid(CN), PrintableString(""CommonName"")), Sequence(Oid(O), PrintableString(""Organization"")))) ``` Windows prints `CN=CommonName + O=Organization`. The OpenSSL library seems to float the latter into the former, resulting in Unix builds printing `CN=CommonName, O=Organization`. This is not expected to be very common, and Windows has an explicit disrecommendation for this on MSDN (https://msdn.microsoft.com/en-us/library/windows/desktop/aa376556%28v=vs.85%29.aspx - under Remarks): > We recommend against using multicomponent RDNs (e.g., CN=James+O=Microsoft) to avoid possible ordering problems when decoding occurs. Instead, consider using single valued RDNs (e.g., CN=James, O=Microsoft). " 3893 area-System.Security Unix X509Certificate2.SerialNumber doesn't include leading zero-bytes When the serial number's most significant byte has the most significant bit set, Windows includes a leading `0x00` to prevent it from being interpreted as a negative value. Unix does not. 3894 area-System.Net Documentation for HttpClient methods should state which exceptions can be thrown by the returned task Not 100% sure this is the right place for it, but it looks like HttpClient is in this repository so I'm reporting this here. The documentation for HttpClient methods (and async methods in general) should state which exceptions can be thrown by the returned task instead of just the exceptions that can be thrown by the method that returns the task. As example of this is the documentation for [HttpClient.GetStringAsync](https://msdn.microsoft.com/en-us/library/hh551746%28v=vs.118%29.aspx). Without this documentation you either have to catch everything ([well-documented as a bad practice](https://msdn.microsoft.com/en-us/library/ms182137.aspx?f=255&MSPPError=-2147217396)) or make educated guesses based on experimentation and [digging](https://stackoverflow.com/questions/24689263/exception-handling-for-httpclient-getstringasyncurl-async-api-call) through [various](https://social.msdn.microsoft.com/Forums/en-US/d8d87789-0ac9-4294-84a0-91c9fa27e353/bug-in-httpclientgetasync-should-throw-webexception-not-taskcanceledexception?forum=netfxnetcom) posts online, and if you go that route it's easy to miss that it throws, e.g., InvalidOperationException if the charset of the content type of the requested page can't be parsed into an encoding. 3895 area-System.Net Revising System.Net.Sockets contract v4.1 This issue discusses the changes being proposed in the current API surface of `System.Net.Sockets` contract version 4.1 in .NET Core. Version 4.1 is currently at an experimental stage and this revision takes it closer to the shape we intend to release at ASP.NET 5 RTM. ## Rationale .NET Core as a platform is intended to be modern, performant and cross-plat, so we need to ensure that the API surface is streamlined and adapted accordingly. This revision omits some of the Windows-specific or legacy types and methods that were present in the earlier (beta8) version of 4.1, and now includes new methods that follow the recommended TPL (async/await) pattern. ## Proposed API and Usage Following are the new Task Parallel Library-compatible methods being added to the class `System.Net.Sockets.Socket`. These are being added as extension methods to `Socket` class so that they can be supported on .NET framework via an OOB package as well (since we cannot add instance methods to types that are already defined in the .NET framework) ``` c# public static partial class SocketTaskExtensions { public static System.Threading.Tasks.Task AcceptAsync(this System.Net.Sockets.Socket socket) public static System.Threading.Tasks.Task AcceptAsync(this System.Net.Sockets.Socket thisSocket, System.Net.Sockets.Socket acceptSocket) public static System.Threading.Tasks.Task ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.EndPoint remoteEndPoint) public static System.Threading.Tasks.Task ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.IPAddress address, int port) public static System.Threading.Tasks.Task ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.IPAddress[] addresses, int port) public static System.Threading.Tasks.Task ConnectAsync(this System.Net.Sockets.Socket socket, string host, int port) public static System.Threading.Tasks.Task ReceiveAsync(this System.Net.Sockets.Socket socket, System.ArraySegment buffer, System.Net.Sockets.SocketFlags socketFlags) public static System.Threading.Tasks.Task ReceiveAsync(this System.Net.Sockets.Socket socket, System.Collections.Generic.IList> buffers, System.Net.Sockets.SocketFlags socketFlags) public static System.Threading.Tasks.Task ReceiveFromAsync(this System.Net.Sockets.Socket socket, System.ArraySegment buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint) public static System.Threading.Tasks.Task ReceiveMessageFromAsync(this System.Net.Sockets.Socket socket, System.ArraySegment buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint) public static System.Threading.Tasks.Task SendAsync(this System.Net.Sockets.Socket socket, System.ArraySegment buffer, System.Net.Sockets.SocketFlags socketFlags) public static System.Threading.Tasks.Task SendAsync(this System.Net.Sockets.Socket socket, System.Collections.Generic.IList> buffers, System.Net.Sockets.SocketFlags socketFlags) public static System.Threading.Tasks.Task SendToAsync(this System.Net.Sockets.Socket socket, System.ArraySegment buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndpoint) } public struct SocketReceiveFromResult { public int ReceivedBytes; public EndPoint RemoteEndPoint; } public struct SocketReceiveMessageFromResult { public int ReceivedBytes; public SocketFlags SocketFlags; public EndPoint RemoteEndPoint; public IPPacketInformation PacketInformation; } ``` The usage of these new methods is the same as other APIs in .NET that follow the async/await pattern. For example: ``` c# private async void ConnectToServerAsync () { var socket = new Socket(SocketType.Stream, ProtocolType.Tcp); await socket.ConnectAsync(serverAddress, serverPort); // Use connected socket. } ``` ## Pull Request The pull request for this API change is #3655. It shows the diff from the previous revision of this contract, so you can see the types and methods that are no longer included in the proposed revision. ## Updates from Discussion - Revised initial proposal based on API review feedback from @terrajobst - Revised the signatures of methods `ReceiveFromAsync` and `ReceiveMessageFromAsync` based on feedback from @CIPop and @stephentoub - these async methods were modifying multiple variables through `ref` and `out` parameters. In order to avoid this, we have now defined their return values as structs (`SocketReceiveFromResult` and `SocketReceiveMessageFromResult`) that contain all the variables returned by the respective async methods. These new structs will also be added to the contract. - Also revised `ReceiveAsync` and `SendAsync` methods to accept `ArraySegment` as input parameter, in order to match existing APIs. - Need to add overloads for methods such as ConnectAsync, SendAsync and ReceiveAsync that take CancellationTokens to support canceling the operations 3905 area-System.Net Disable failing socket tests running in elevated mode Some of the cases expected to fail don't actually fail when running elevated. See https://github.com/dotnet/corefx/issues/3726. This disables those test cases so the tests can run in elevated mode. 3906 area-System.Diagnostics PerformanceCounters - Read OS counters on .NET Core Currently CoreFX generates the reference assembly System.Diagnostics.PerformanceCounter.dll however, there doesn't seem to be any counter part implementation for it, nor can I see an entry for this in the progress page at https://github.com/dotnet/corefx-progress/blob/master/src-diff/README.md. Is this expected? Thanks 3908 area-System.Linq Incorrect exception in parameterised block's last child is null. Creating a block from a list of expressions which contains a null normally throws `ArgumentNullException`. However, if this null expression is the last expression, and if the block has variables and doesn't have an explicitly set type, then it throws `NullReferenceException` instead. 3909 area-System.Linq Wrong parameter name when creating block with erroneous element Creating a `BlockExpression` with a null or unreadable expression throws `ArgumentNullException` and `ArgumentException` respectively. However, if the call was made to one of the overloads that receives these expressions as `IEnumerable` or `params Expression[]` and there is no explicit type, no variables and the number of expressions is between 2 and 5, then the parameter name in the exception throw is incorrect. 3911 area-System.Net Finish most of the sockets shims. - Shim SocketFlags - Shim select() - Fix some issues with error propagation in socket creation and accepted sockets The only functions that have not been shimmed are those relied upon for event notification (epoll/kqueue). 3913 area-System.Net System.Net.Sockets 4.1. contract contains several Windows-specific APIs and APM pattern methods This issue tracks the removal of some APIs from the Sockets contract in order to align it better to the .NET Core platform. ## Rationale The current version of Sockets 4.1 contract in beta8 includes some types, properties and methods that are tied to Windows-specific concepts. Since .NET Core is intended to be cross-plat, these need to be excluded in order to provide similar behavior and API surface across platforms. Further, the Sockets contract also contains methods following the APM pattern (Begin/End), which is not supported for other APIs within .NET Core. Hence, these methods are being excluded and new methods are being added that follow the recommended pattern TPL-based pattern of async/await (See #3895). Lastly, there are some constructors that are performing expensive, blocking operations within the constructor - these need to be removed as well. This issue tracks the removal of these APIs - a related issue is #3895 , which tracks addition of the TPL-based methods. ## Proposed API Exclusions Following are the types, properties and methods being excluded by the proposed revision to the contract: ### Types: ``` c# public partial struct SocketInformation public enum SocketInformationOptions public enum TransmitFileOptions ``` ### Properties/Methods/Constructors: ``` c# Type: Socket public Socket(System.Net.Sockets.SocketInformation socketInformation) public System.IAsyncResult BeginAccept - all overloads public System.IAsyncResult BeginConnect - all overloads public System.IAsyncResult BeginDisconnect public System.IAsyncResult BeginReceive - all overloads public System.IAsyncResult BeginReceiveFrom public System.IAsyncResult BeginReceiveMessageFrom public System.IAsyncResult BeginSend - all overloads public System.IAsyncResult BeginSendTo public void Disconnect(bool reuseSocket) public bool DisconnectAsync(System.Net.Sockets.SocketAsyncEventArgs e) public System.Net.Sockets.SocketInformation DuplicateAndClose(int targetProcessId) public System.Net.Sockets.Socket EndAccept - all overloads public void EndConnect(System.IAsyncResult asyncResult) public void EndDisconnect(System.IAsyncResult asyncResult) public int EndReceive - all overloads public int EndReceiveFrom(System.IAsyncResult asyncResult, ref System.Net.EndPoint endPoint) public int EndReceiveMessageFrom(System.IAsyncResult asyncResult, ref System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint endPoint, out System.Net.Sockets.IPPacketInformation ipPacketInformation) public int EndSend - all overloads public int EndSendTo(System.IAsyncResult asyncResult) public void SetIPProtectionLevel(System.Net.Sockets.IPProtectionLevel level) Type: SocketAsyncEventArgs public bool DisconnectReuseSocket public System.Net.Sockets.TransmitFileOptions SendPacketsFlags Type: SocketFlags MaxIOVectorLength Type: TcpClient public TcpClient(System.Net.IPEndPoint localEP) public TcpClient(string hostname, int port) public System.IAsyncResult BeginConnect - all overloads public void Connect - all overloads public void EndConnect(System.IAsyncResult asyncResult) Type:TcpListener public System.Net.Sockets.Socket AcceptSocket() public System.Net.Sockets.TcpClient AcceptTcpClient() public void AllowNatTraversal(bool allowed) { } public System.IAsyncResult BeginAcceptSocket(System.AsyncCallback callback, object state) public System.IAsyncResult BeginAcceptTcpClient(System.AsyncCallback callback, object state) public static System.Net.Sockets.TcpListener Create(int port) public System.Net.Sockets.Socket EndAcceptSocket(System.IAsyncResult asyncResult) public System.Net.Sockets.TcpClient EndAcceptTcpClient(System.IAsyncResult asyncResult) Type:UdpClient public UdpClient(string hostname, int port) public void AllowNatTraversal(bool allowed) public System.IAsyncResult BeginReceive(System.AsyncCallback requestCallback, object state) public System.IAsyncResult BeginSend - all overloads public void Connect - all overloads public byte[] EndReceive(System.IAsyncResult asyncResult, ref System.Net.IPEndPoint remoteEP) public int EndSend(System.IAsyncResult asyncResult) public byte[] Receive(ref System.Net.IPEndPoint remoteEP) public int Send - all overloads public Task SendAsync(byte[] datagram, int bytes) ``` ## Pull Request The pull request that implements the removal of the above APIs is #3655 ## Discussion We are looking for feedback on the removal of these APIs based on the rationale described above. Also, if your code uses any of these APIs, please look at the revised contract in the PR for alternatives to use instead. If you believe the alternatives are not sufficient to address specific scenarios, that would be good to raise here as well. 3915 area-System.Net ClientAsyncAuthenticate_EachProtocol_Success failed in CI on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_release_prtest/5187/console ``` System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_EachProtocol_Success [FAIL] Timed Out Expected: True Actual: False Stack Trace: d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Security\tests\FunctionalTests\ClientAsyncAuthenticateTest.cs(196,0): at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy, SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Security\tests\FunctionalTests\ClientAsyncAuthenticateTest.cs(90,0): at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_EachProtocol_Success() ``` 3918 area-System.Net Create a placeholder stub for WebSockets.Client for non-Windows platforms WCF currently depends on WebSockets.Client API, but this API is not exposed on non-Windows platforms. There is a plan to add this in the future, but that will not happen in RC timeframe. However, we need to at least provide a placeholder stub so that WCF code will at least compile. @vijaykota - PTAL. 3920 area-System.Net Switched Sockets perf tests to Benchmarks "Rough draft of what the sockets tests will look switched to use Benchmarks for the perf tests. These perf tests run on Windows and give reasonable results, but on Linux they throw an error that ""ws2_32.dll"" is missing. replaces #3765 Results for Windows running on the core framework: ``` ``` Results for Windows running on the full framework: ``` ``` Times are in ms. @davidsh @pgavlin @cipop @stephentoub " 3922 area-System.Net Add a temporary PAL for ClientWebSocket. On Windows, the PAL delegates to WinHttpWebSocket; on *nix, all methods throw PlatformNotSupportedException. 3924 area-Infrastructure System.Security.Cryptography.Native fails to build on OSX El Capitan (10.11) It looks like that El Capitan may have removed the OpenSSL headers we depend on. @gkhanna79 is hitting some issues locally because `openssl/asn1.h` is not found. It would appear that the libraries we link against are still present in El Captian (so the .dylib we build should still run there) we just can't seem to build it out of the box. We need to figure out what the correct work around is (does installing the previous version of XCode or the command line compiler tools work, or maybe we need to get the headers via homebrew or something else)? The fact that Apple is on a 0.9.8 version of OpenSSL seems like it will also hurt us in obtaining the correct headers from a reasonably up to date package manager. 3926 area-System.Net Merge changes from TFS 3930 area-Meta Windows 7 build fails (update dev instructions about proxies and myget.org access) "I've been trying to build the latest good build for a couple of hours, I've updated dnvm and dnu build still cannot build: EXEC : error : FindPackagesById: Microsoft.NETCore.Platforms [c:\git\dotnet\corefx\build.proj] An error occurred while sending the request. EXEC : error : FindPackagesById: coveralls.io [c:\git\dotnet\corefx\build.proj] An error occurred while sending the request. EXEC : error : FindPackagesById: Microsoft.NETCore.Console [c:\git\dotnet\corefx\build.proj] HTTP request timed out. Exiting. EXEC : error : FindPackagesById: Microsoft.NETCore.TestHost [c:\git\dotnet\corefx\build.proj] An error occurred while sending the request. EXEC : error : FindPackagesById: OpenCover [c:\git\dotnet\corefx\build.proj] An error occurred while sending the request. EXEC : error : FindPackagesById: Microsoft.NETCore.Platforms [c:\git\dotnet\corefx\build.proj] HTTP request timed out. Exiting. EXEC : error : FindPackagesById: coveralls.io [c:\git\dotnet\corefx\build.proj] HTTP request timed out. Exiting. EXEC : error : FindPackagesById: Microsoft.NETCore.TestHost [c:\git\dotnet\corefx\build.proj] HTTP request timed out. Exiting. EXEC : error : FindPackagesById: Microsoft.NETCore.Console [c:\git\dotnet\corefx\build.proj] HTTP request timed out. Exiting. EXEC : error : FindPackagesById: OpenCover [c:\git\dotnet\corefx\build.proj] An error occurred while sending the request. EXEC : error : FindPackagesById: xunit.runner.utility [c:\git\dotnet\corefx\build.proj] An error occurred while sending the request. EXEC : error : FindPackagesById: Microsoft.NETCore.Platforms [c:\git\dotnet\corefx\build.proj] HTTP request timed out. Exiting. EXEC : error : FindPackagesById: ReportGenerator [c:\git\dotnet\corefx\build.proj] An error occurred while sending the request. EXEC : error : FindPackagesById: Microsoft.NETCore.Platforms [c:\git\dotnet\corefx\build.proj] HTTP request timed out. Exiting. EXEC : error : FindPackagesById: xunit.runner.utility [c:\git\dotnet\corefx\build.proj] An error occurred while sending the request. EXEC : error : FindPackagesById: ReportGenerator [c:\git\dotnet\corefx\build.proj] HTTP request timed out. Exiting. EXEC : error : FindPackagesById: Microsoft.DotNet.xunit.performance.analysis [c:\git\dotnet\corefx\build.proj] HTTP request timed out. Exiting. EXEC : error : FindPackagesById: ReportGenerator [c:\git\dotnet\corefx\build.proj] An error occurred while sending the request. c:\git\dotnet\corefx\build.proj(24,5): error MSB3073: The command """"c:\git\dotnet\corefx\packages//dnx-coreclr-win-x86.1.0.0-beta7/ \bin\dnu.cmd"" restore --packages ""c:\git\dotnet\corefx\packages"" --source https://www.myget.org/F/dotnet-core/ --source https://www .myget.org/F/dotnet-coreclr/ --source https://www.myget.org/F/dotnet-corefxtestdata/ --source https://www.myget.org/F/dotnet-buildt ools/ --source https://www.nuget.org/api/v2/ ""c:\git\dotnet\corefx\src"" ""c:\git\dotnet\corefx\packages/Microsoft.DotNet.BuildTools. 1.0.25-prerelease-00104/lib/"""" exited with code 1. I'd think this should ""just work"", did I miss an install or setup step? " 3934 area-Meta Produce reference assembly packages for everything that exists today in `c:\Program Files(x86)\Reference Assemblies` It would be great to not require visual studio installs to compile for any of the framework defined in `c:\Program Files(x86)\Reference Assemblies`. We don't have to do all up front but we could start with the most popular ones (this includes all of the PCL profiles as well). It would make it possible to compile PCLs on mono without installing the `xbuild-frameworks` package. It would also make it possible to compile class libraries on linux targeting .NET Framework. I would allow us to delete this entire class that I hate so much :smile: https://github.com/aspnet/dnx/blob/dev/src/Microsoft.Dnx.Runtime/FrameworkReferenceResolver.cs 3935 area-System.Security Unix FindBySubjectKeyIdentifier does not do the same fallback as Windows It turns out that a lot of the test failing marked as #3099 aren't failing due to that problem. The test failures coming from a PFX was a red herring. In the case of the System.Security.Cryptography.X509Certificates.Tests.FindTests.TestBySubjectKeyIdentifier_MatchA test case, it was actually testing the fallback behavior of [CertGetCertificateContextProperty(CERT_KEY_IDENTIFIER_PROP_ID)](https://msdn.microsoft.com/en-us/library/windows/desktop/aa376079%28v=vs.85%29.aspx#_CERT_KEY_IDENTIFIER_PROP_ID): > If nonexistent, searches for the szOID_SUBJECT_KEY_IDENTIFIER extension. If that fails, a SHA1 hash is done on the certificate's SubjectPublicKeyInfo member to produce the identifier values. So, yeah, we should do that. 3936 area-System.Security X509Duplicate is used like X509UpRef, but may actually allocate new memory, investigate usages For the most part the callers of the function use it to turn cert.Handle (IntPtr) into a SafeX509Handle. There are probably good-and-less-expensive ways of doing that. 3942 area-Infrastructure Set AssemblyInfomationalVersion to package version It would make tracking down builds so much easier. /cc @ericstj 3948 area-System.Net Linux Sockets: Background thread NullReferenceException in APMServer Tests http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst_prtest/3552/ ``` Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at System.Net.Sockets.SafeCloseSocket.get_AsyncContext() at System.Net.Sockets.SocketPal.AcceptAsync(Socket socket, SafeCloseSocket handle, SafeCloseSocket acceptHandle, Int32 receiveSize, Int32 socketAddressSize, AcceptOverlappedAsyncResult asyncResult) at System.Net.Sockets.Socket.DoBeginAccept(Socket acceptSocket, Int32 receiveSize, AcceptOverlappedAsyncResult asyncResult) at System.Net.Sockets.Socket.BeginAccept(Socket acceptSocket, Int32 receiveSize, AsyncCallback callback, Object state) at System.Net.Sockets.Socket.BeginAccept(Int32 receiveSize, AsyncCallback callback, Object state) at System.Net.Sockets.Socket.BeginAccept(AsyncCallback callback, Object state) at System.Net.Sockets.Tests.SocketTestServerAPM.OnAccept(IAsyncResult result) at System.Net.LazyAsyncResult.Complete(IntPtr userToken) at System.Net.ContextAwareResult.CompleteCallback(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Net.ContextAwareResult.Complete(IntPtr userToken) at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken) at System.Net.LazyAsyncResult.InvokeCallback(Object result) at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionCallback(Int32 numBytes, SocketError errorCode) at System.Net.Sockets.AcceptOverlappedAsyncResult.CompletionCallback(Int32 acceptedFileDescriptor, Byte[] socketAddress, Int32 socketAddressLen, SocketError errorCode) at System.Net.Sockets.SocketAsyncContext.AcceptOperation.InvokeCallback() at System.Net.Sockets.SocketAsyncContext.AsyncOperation.b__26(Object o) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() One or more tests failed while running tests from 'System.Net.Sockets.APMServer.Tests'. Exit code 6. ``` 3949 area-System.Net Merge changes from TFS 3951 area-System.Net Complete x-plat implementations of NetworkInformation This brings all of my pending changes into the corefx dev/ni-xplat branch. At this point, all of the members in this library are either implemented or throw a PlatformNotSupportedException. The only exception for this is NetworkChange.NetworkAddressChanged, which is implemented on Linux, but not yet on OSX. The implementation for that looks like it will be fairly complicated, so I am going to try to get everything else checked in before attempting it. Before moving all of this into corefx/master, I'll try to address any pending cleanup and refactoring that reviewers recomnmend. The goal is to get the code here into corefx/master by our Wednesday feature deadline. After that, and before RC1 releases, I will make do some additional code cleanup and add more test validation to the library; to the string parsing logic in particular. 3952 area-System.Security Unix AES in-place decryption returns incorrect answers There was a specific test, VerifyInPlaceEncryption, that passed. Another test, TransformStateSeparation, was marked as failing due to #1965. #1965 is fixed locally (it was a test bug), but TransformStateSeparation continues to fail. Investigation showed that the problem went away without using in-place decryption. So now TransformStateSeparation uses distinct buffers for input and output, and a new test, VerifyInPlaceDecryption, tracks this new failure. 3954 area-System.Net Support channel binding in xplat SslStream WCF uses the SslStream.TransportContext property from the client to the server. This requires support for the GetChannelBinding method 3956 area-Infrastructure Disk space for Mac CI tests "All CI tests are failing with ""There is not enough space on the disk."" on dotnet_corefx_mac_release_prtest " 3957 area-System.Linq CatchBlock with named exception variable should have space in before variable name on ToString() "The result of `Expression.Catch(Expression.Variable(typeof(Exception), ""ex""), Expression.Empty()).ToString()` is `catch (Exceptionex) { ... }`. It should be `catch (Exception ex) { ... }`. " 3958 area-System.Linq Many XxxExpression.Update returns different expression for identical children in different collection. According to the documentation: > If all of the children are the same, it will return this expression. However, only the enumerables themselves are compared, so a different enumeration of the same children will incorrectly return a new expression. In particular a `TryExpression` with no catch blocks (valid if the expression has a finally or fault block) must be `Update`d with the empty `Handlers` property it holds fed back to it, rather than `null` or another empty collection of handlers. 3962 area-System.Net Finish the shims for S.N.Sockets. - Unify the remaining platform-specific managed bits: Information on platform support for multiple connection attempts and dual-stack IPv4 packet info is now provided by a pair of shim functions rather than compile-time constants. - Change Interop.Sys.Socket() to be more restrictive in the address families, socket types, and protocol families it allows. The code now only recognizes values that we have mappings for and returns appropraite errors otherwise. - Delete some leftover files. 3963 area-Serialization Generalized serialization surrogate support Provide a solution for types that are serializable on desktop .NET but not on .NET Core 3966 area-Infrastructure Upgrade CoreFX to buildtools 106 Consumes some changes to perf testing from https://github.com/dotnet/buildtools/pull/308 @stephentoub @mellinoe 3967 area-Infrastructure Code coverage badge is out of date **Line coverage** Badge number: 56.8% Actual number: 57.8% **Branch coverage** Badge number: 45.5% Actual number: 47.0% 3968 area-System.Globalization [System.Globalization] TestLocaleAlternateSortOrder failed (local build) "``` Discovering: System.Globalization.Tests Discovered: System.Globalization.Tests Starting: System.Globalization.Tests System.Globalization.Tests.CompareInfoTest.TestLocaleAlternateSortOrder(locale: ""de-DE"", string1: ""њ"", string2: ""UE"", expected: -1) [FAIL] Assert.Equal() Failure Expected: -1 Actual: 1 Stack Trace: E:\Workspace\github\corefx\src\System.Globalization\tests\CompareInfo\compareinfo.cs(137,0): at System.Globalization.Tests.CompareInfoTest.TestLocaleAlternateSortOrder(String locale, String string1, String string2, Int32 expected) System.Globalization.Tests.CompareInfoTest.TestLocaleAlternateSortOrder(locale: ""de-DE_phoneb"", string1: ""њ"", string2: ""UE"", expected: 0) [FAIL] Assert.Equal() Failure Expected: 0 Actual: 1 Stack Trace: E:\Workspace\github\corefx\src\System.Globalization\tests\CompareInfo\compareinfo.cs(137,0): at System.Globalization.Tests.CompareInfoTest.TestLocaleAlternateSortOrder(String locale, String string1, String string2, Int32 expected) Finished: System.Globalization.Tests === TEST EXECUTION SUMMARY === System.Globalization.Tests Total: 1145, Errors: 0, Failed: 2, Skipped: 0, Time: 6,192s ``` " 3969 area-System.Net [System.Net.NetworkInformation] BasicTest_AccessInstanceProperties_NoExceptions test failed (local build) ``` System.Net.NetworkInformation.Tests.NetworkInterfaceBasicTest.BasicTest_AccessInstanceProperties_NoExceptions [FAIL] Overflow Expected: True Actual: False Stack Trace: Discovered: System.Composition.Tests E:\Workspace\github\corefx\src\System.Net.NetworkInformation\tests\FunctionalTests\NetworkInterfaceBasicTest.cs(39,0): at System.Net.NetworkInformation.Tests.NetworkInterfaceBasicTest.BasicTest_AccessInstanceProperties_NoExceptions() Finished: System.Net.NetworkInformation.Functional.Tests Starting: System.Composition.Tests === TEST EXECUTION SUMMARY === System.Net.NetworkInformation.Functional.Tests Total: 19, Errors: 0, Failed: 1, Skipped: 0, Time: 3,682s ``` 3970 area-System.Net Add System.Net.NetworkInformation to README.md @stephentoub @SidharthNabar @CIPop @pgavlin PTAL 3971 area-System.Net Add System.Net.NetworkInformation to README.md 3972 area-System.Globalization Hungarian double compression test failing on Linux "``` C# CultureInfo.CurrentCulture = new CultureInfo(""hu-HU""); Console.WriteLine(""dzsdzs"".IndexOf(""ddzs"")); ``` This prints out 0 on Windows but -1 on Linux. If StringComparison.CurrentCultureIgnoreCase is used instead of the CurrentCulture default, both Windows and Linux print out 0. " 3973 area-System.Globalization Diacritics test failing on Linux "``` C# CultureInfo.CurrentCulture = new CultureInfo(""en-US""); Console.WriteLine(""Exhibit a\u0300\u00C0"".IndexOf(""\u0300"")); ``` Using both StringComparison.CurrentCulture, CurrentCultureIgnoreCase, or OrdinalIgnoreCase, on Windows this prints out 9, but on Linux it prints out -1. " 3975 area-System.Net System.Net.Sockets.Tests failing ``` System.Net.Sockets.Tests -> E:\oss\corefx\bin\Windows_NT.AnyCPU.Debug\System.Net.Sockets.Tests\System.Net.Sockets.Tests.dll xUnit.net console test runner (64-bit .NET Core) Copyright (C) 2014 Outercurve Foundation. Discovering: System.Net.Sockets.Tests Discovered: System.Net.Sockets.Tests Starting: System.Net.Sockets.Tests System.Net.Sockets.Tests.UdpClientTest.BeginSend_Success [FAIL] System.Net.Sockets.SocketException : An address incompatible with the requested protocol was used Stack Trace: E:\oss\corefx\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs(3213,0): at System.Net.Sockets.Socket.DoBeginSendTo(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint endPointSnapshot, SocketAddress socketAddress, OverlappedAsyncResult asyncResult) E:\oss\corefx\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs(3158,0): at System.Net.Sockets.Socket.BeginSendTo(Byte[] buffer, Int32 offset, In t32 size, SocketFlags socketFlags, EndPoint remoteEP, AsyncCallback callback, Object state) E:\oss\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UDPClient.cs(598,0): at System.Net.Sockets.UdpClient.BeginSend(Byte[] datagram, Int32 bytes , IPEndPoint endPoint, AsyncCallback requestCallback, Object state) E:\oss\corefx\src\System.Net.Sockets\tests\FunctionalTests\UdpClientTest.cs(59,0): at System.Net.Sockets.Tests.UdpClientTest.BeginSend_Success() Finished: System.Net.Sockets.Tests ``` I think it might be some kind of intermittent issue. 3978 area-System.Net Shim the last platform APIs used by S.N.NameResolution. gethostbyaddr and gethostbyname had not yet been shimmed. 3982 area-System.Data System.Data.SqlClient package regression: no DNXCore50 build in 4.0.0-beta-23409 "I can't find anywhere this is intentional - so assuming it's a bug. Between `4.0.0-beta-23225` and `4.0.0-beta-23409` (current) the DNXCore50 lib was dropped. This of course breaks anyone with `4.0.0-beta-*` doing a `dnxcore50` build. Here's a better illustration of the problem: Was this an intentional change I just can't find the documentation for, or does nuget.org just need an fixed build here? Or am I an idiot? All of these are valid options. " 3985 area-System.Net Implement HttpContentAsyncStream.Write in CurlHandler WCF ends up trying to use Stream.Write as part of HttpContent.CopyToAsync implementation. While that should be addressed separately to use WriteAsync, it's possible others are also using Write instead of WriteAsync, and today we throw NotSupportedException from Write. So as to let this at least work, I'm implementing Write to delegate to WriteAsync. I also noticed we were missing a FlushAsync implementation, so I've added one. cc: @davidsh, @roncain, @kapilash 3986 area-System.IO Use Optimized Zlib-Intel to Build clrcompression.dll **Summary** Intel has developed an optimized version of Zlib that includes architecture specific optimizations and algorithmic changes to improve the included deflate() and crc32() functions. Since System.IO.Compression calls out to these functions through clrcompression.dll, I suggest that Zlib-Intel to be used to build clrcompression.dll. **Test Results** I have compiled the library myself, and by renaming the .dll to clrcompression.dll and replacing the clrcompression included with .NET Core, I see an improvement of **20-30%** when doing compression using GZipStream on an Intel® 5th Generation Core (tm) i5 Processor based system, as well as on an Intel® Xeon® Processor E5 v2 Family based server system. The gain comes entirely from the optimized deflate() function. **Link** The developer of Zlib-Intel has provided support for VS Intrinsics here: https://github.com/jtkukunas/zlib/tree/win32_nmake 3993 area-System.IO "Overload of Directory.DeleteDirectory(""path"", true) that deletes what it can and leaves rest" Whenever we have clean up code to remove directories and files, we always end up with hacks to workaround issues with readonly files, handles being temporarily held. The is no reliable mechanism to delete the folders and files, and there is no mechanism to skip failures and report them at the end. Which leads to poor implementations that fail on long paths, sym and hard links, and random errors. See: https://github.com/NuGet/NuGet.Client/pull/13 http://stackoverflow.com/questions/329355/cannot-delete-directory-with-directory-deletepath-true And many more random suggestions pop up on the interwebs CC // @xavierdecoster 3995 area-System.Linq Add tests for expression interpreter Cross-check expression interpreter against expression compiler by using a catalog of expressions. 4001 area-System.Net Fix assert and leak of WinHttpRequestState object Discovered during testing with DEBUG version of CoreCLR running internal ToF tests. The design of the WinHttpRequestState is such that it stays alive due to a GCHandle.Alloc(this) in its constructor. This keeps the object alive during any of the native WinHTTP callbacks. However, the object was being prematurely disposed during the Dispose() of the WinHttpResponseStream. Instead, it should have been explicitly disposed during the final HANDLE_CLOSING callback from WinHTTP when the request handle was disposed. The early disposing of the WinHttpRequestState object was doing a GCHandle.Free() of the state object. This later caused an Assert() in the DEBUG version of the CoreCLR when doing GCHandle.FromIntPtr() indicating that the handle was already deallocated. 4002 area-System.Net "Sockets tests depend on ""localhost"" resolving to an IPv6 and an IPv4 address" This is not always the case on Linux: how the name resolves depends on the host's configuration. 4003 area-System.Net Socket_SendToAsyncV4IPEndPointToV4Host_Throws_Unix fails on OSX. 4004 area-System.Net OS X does not provide IPv4 packet info for dual-stack sockets. There is not likely to be a mitigation, so this will probably just need to be documented. 4005 area-System.Net AcceptV6BoundToSpecificV6_Success fails on *nix. 4006 area-System.Net Socket_SendToAsyncV4IPEndPointToV4Host_Throws fails on *nix. There is a mismatch in the error code returned by Socket.SendToAsync. 4007 area-System.Net Consider implementing Socket.SendPacketsAsync on *nix. 4008 area-System.Net Linger time is incorrect on OS X for boundary values. 4009 area-System.Net Sockets APM performance tests fail on OS X. This is possibly due to a large number of open sockets: IIRC the default limit for open file descriptors on OS X is 256; these tests may open many more when run in parallel. 4010 area-System.Net Address PR feedback for System.Net.Sockets. I've also replaced all of the dummy issues with the actual issue numbers. Fixes #3441. 4012 area-System.Net Merge master back into dev/ni-xplat I'm going to put this PR here to check that it passes CI. I'll merge once it completes then rebase my work against master and submit there. 4014 area-System.Linq IRuntimeVariables implementations inconsistent on out-of-range access "Some of the implementations of `IRuntimeVariables` that can be produced from `RuntimeVariablesExpression` will, when indexed with an out-of-range index, throw `ArgumentOutOfRangeException` with a `ParamName` value of `""index""` as one would expect. Some however will throw `IndexOutOfRangeException`. " 4018 area-System.Linq Expression interpreter - Issue with MemberInit "See disabled test ""CompileInterpretCrossCheck_MemberInit"" in PR for #3995. System.Exception : Error for expression 'new MI2() {MI1 = {X = 42, Y = ""qux""}, Bars = {Void Add(Int32)(2), Void Add(Int32)(3), Void Add(Int32)(5)}}': ``` System.NullReferenceException: Object reference not set to an instance of an object. at System.Linq.Expressions.Interpreter.LightCompiler.CompileMember(Expression from, MemberInfo member) in src\System\Linq\Expressions\Interpreter\LightCompiler.cs:line 2415 ``` " 4019 area-System.Linq Expression interpreter - Issue with Convert "See disabled test ""CompileInterpretCrossCheck_Convert"" in PR for #3995. System.Exception : Error for expression 'Convert(null)': ``` Xunit.Sdk.NotNullException: Assert.NotNull() Failure ``` " 4020 area-System.Linq Expression interpreter - Issue with Invoke "See disabled test ""CompileInterpretCrossCheck_Invoke"" in PR for #3995. System.Exception : Error for expression '{var Param_0;var Param_1;var Param_2; ... }': ``` Xunit.Sdk.EqualException: Assert.Equal() Failure Expected: (null) Actual: 1 ``` " 4021 area-System.Linq Expression interpreter - Issue with Unbox "See disabled test ""CompileInterpretCrossCheck_Unbox"" in PR for #3995. System.Exception : Error for expression 'Unbox(null)': ``` Xunit.Sdk.NotNullException: Assert.NotNull() Failure at Xunit.Assert.NotNull(Object object) ``` " 4022 area-System.Linq Expression interpreter - Issue with ConvertChecked "See disabled test ""CompileInterpretCrossCheck_ConvertChecked"" in PR for #3995. System.Exception : Error for expression 'ConvertChecked(False)': ``` Xunit.Sdk.NotNullException: Assert.NotNull() Failure at Xunit.Assert.NotNull(Object object) ``` " 4030 area-System.Security Adding a dependency in one project.json breaks build very badly "Adding the following line in `src\System.Net.Http\src\project.json` is breaking build (on all platforms). ``` ""System.Security.Cryptography.OpenSsl"": ""4.0.0-beta-*"", ``` Firstly, running build in the root directory results in failure in the package restore step. This error is due to e945fa2b4e1d54ee68c92e8d027e99fc4b894448 Strangely, only on windows, we get to go past this just by running `build.cmd` again. Secondly, even if we revert the above commit, The build break is not just in System.Net.Http project but across the board. The following projects are broken because of one line change in one project.json : - `System.Net.Security` - `System.Net.Sockets` - `System.Security.AccessControl` - `System.Security.Cryptography.Algorithms` and a few more. I can see from the build logs that the System.Security.Cryptography etc are missing from the references. I am not able to figure out if this is an issue with dnu's resolution mechanism (coupled with the dependencies in corefx) or if this a problem with current version of this particular package. Please note that this was working till very recently in a PR. Am seeing this only when I tried to rebase it with master. " 4031 area-System.Net Fix System.Net's Interop.OpenSsl error handling There are 2 issues with OpenSsl's current error handling 1. In Interop.OpenSsl.Disconnect, we are ignoring the SSL_get_error error code, and just continuing even though there was an error from SSL_shutdown. 2. There are 2 sets of error codes in OpenSSL: 1. Those defined in err.h 2. Those defined in ssl.h These two sets overlap, for example ERR_R_SYS_LIB = 2 and SSL_ERROR_WANT_READ = 2. In Interop.OpenSsl.GetSslError, if the SslErrorCode returned from SSL_get_error (defined in ssl.h) is SSL_ERROR_SYSCALL, it calls ERR_get_error (defined in err.h), and casts that result to an SslErrorCode, which is incorrect since it will return a separate set of error codes. We need to treat these errors separately, since they are separate sets with conflicting values. 4033 area-System.Linq Unconditionally enable expression interpreter To ship in RC1, we can just enable it unconditionally in the .csproj files. 4037 area-System.Net System.Net.Sockets.APMServer.Tests crashed in CI on Windows "http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug_prtest/5448/console ``` Discovering: System.Net.Sockets.APMServer.Tests Discovering: System.Net.NetworkInformation.Functional.Tests Discovered: System.Net.NetworkInformation.Functional.Tests Starting: System.Net.NetworkInformation.Functional.Tests Discovered: System.Net.Sockets.APMServer.Tests Starting: System.Net.Sockets.APMServer.Tests Finished: System.Net.NetworkInformation.Functional.Tests === TEST EXECUTION SUMMARY === System.Net.NetworkInformation.Functional.Tests Total: 19, Errors: 0, Failed: 0, Skipped: 0, Time: 0.547s System.Xml.RW.XmlSystemPathResolver.Tests -> d:\j\workspace\dotnet_corefx_windows_debug_prtest\bin\Windows_NT.AnyCPU.Debug\System.Xml.RW.XmlSystemPathResolver.Tests\System.Xml.RW.XmlSystemPathResolver.Tests.dll System.Xml.RW.XmlReader.Tests -> d:\j\workspace\dotnet_corefx_windows_debug_prtest\bin\Windows_NT.AnyCPU.Debug\System.Xml.RW.XmlReader.Tests\System.Xml.RW.XmlReader.Tests.dll xUnit.net console test runner (64-bit .NET Core) Copyright (C) 2014 Outercurve Foundation. Discovering: System.Xml.RW.XmlSystemPathResolver.Tests Discovered: System.Xml.RW.XmlSystemPathResolver.Tests d:\j\workspace\dotnet_corefx_windows_debug_prtest\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00107\lib\tests.targets(129,5): warning MSB3073: The command ""CoreRun.exe xunit.console.netcore.exe System.Net.Sockets.APMServer.Tests.dll -xml testResults.xml -notrait category=nonwindowstests -notrait category=OuterLoop -notrait category=failing "" exited with code -2146232797. [d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets.Legacy\tests\FunctionalTests\System.Net.Sockets.APMServer.Tests.csproj] d:\j\workspace\dotnet_corefx_windows_debug_prtest\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00107\lib\tests.targets(136,5): error : One or more tests failed while running tests from 'System.Net.Sockets.APMServer.Tests' please check log for details! [d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets.Legacy\tests\FunctionalTests\System.Net.Sockets.APMServer.Tests.csproj] ``` " 4039 area-System.Net Implement System.Net.NetworkInformation on OSX, Linux This brings the Linux and OSX implementations of System.Net.NetworkInformation into master. I've rebased my work from my dev branch (dev/ni-xplat) into a single commit, as the history of that branch was very very convoluted and messy, and wasn't easily rebaseable. On top of that, I've run CodeFormatter.exe, manually formatted the project file with some extra spacing, and resolved an additional merge conflict with the master branch. The code was reviewed prior to merging into the dev branch. For context for anyone wanting a brief overview, here's the description I put into the consolidated commit: This commit adds the Linux and OSX implementations for System.Net.NetworkInformation, a library for querying local system information regarding network interfaces, network capabilities, current network connection status, socket connections, various network protocol statistics, both global and per-network-interface, current network addresses, and various other configuration options and statistics. On Linux the information is primarily surfaced through: - /proc/net/*, various other in-memory files that expose network configuration and machine statistics - Getifaddrs() for querying the addresses for all network interfaces - Netlink sockets for detecting network address change events On OSX: - Sysctl: Exposes most of the network and protocol statistics, as well as routing information, configuration options, etc. - Getifaddrs(): Same as above, for enumerating addresses. - Some network configuration files are also parsed from disk, if available, similar to above. NOTE: Due to the fact that this API is closely tied to the information and statistics that are exposed through Win32 APIs (iphlpapi.dll), some individual pieces of information are not available on Linux and OSX. Depending on the range of information exposed through those operating systems, we are able to gather much of the same data, but it is often not identical to the set that is exposed from Windows. Members that cannot be retrieved instead throw a PlatformNotSupportedException. 4040 area-System.IO DriveInfo tests seeing / instead of \ after CoreCLR test-runtime upgrade ``` Discovered: System.IO.FileSystem.DriveInfo.Tests Starting: System.IO.FileSystem.DriveInfo.Tests System.IO.FileSystem.DriveInfoTests.DriveInfoWindowsTests.TestConstructor [FAIL] Assert.Equal() Failure Expected: C:\ Actual: C:/ Stack Trace: D:\Src\corefx\src\System.IO.FileSystem.DriveInfo\tests\DriveInfo.Windows.Tests.cs(39,0): at System.IO.FileSystem.DriveInfoTests.DriveInfoWindowsTests.TestConstructor() Finished: System.IO.FileSystem.DriveInfo.Tests === TEST EXECUTION SUMMARY === System.IO.FileSystem.DriveInfo.Tests Total: 8, Errors: 0, Failed: 1, Skipped: 0, Time: 0.313s ``` 4041 area-System.Net Unify the two definitions of WinHttpException. Fixes #2542. 4044 area-System.Net Current proposed version of System.Net.NetworkInformation 4.1 contains APM and synchronous pattern methods The `IPGlobalProperties` abstract class has the following APM pattern/synchronous methods: ``` c# public virtual System.IAsyncResult BeginGetUnicastAddresses(System.AsyncCallback callback, object state) public virtual System.Net.NetworkInformation.UnicastIPAddressInformationCollection EndGetUnicastAddresses(System.IAsyncResult asyncResult) public virtual System.Net.NetworkInformation.UnicastIPAddressInformationCollection GetUnicastAddresses() ``` These need to be removed in order for this contract to better align with the other APIs in .NET Core. Further, an equivalent method that follows the TPL pattern already exists in this class and should be the one that is used for this functionality: ``` c# public virtual System.Threading.Tasks.Task GetUnicastAddressesAsync() ``` 4045 area-System.Reflection Handle properties on types in System.Reflection.Metadata should be public "It appears that all types that wrap metadata rows (such as TypeDefinition) have a private Handle property. [Example](https://github.com/dotnet/corefx/blob/master/src/System.Reflection.Metadata/src/System/Reflection/Metadata/TypeDefinition.cs#L36-L39): ``` csharp // from TypeDefinition.cs private TypeDefinitionHandle Handle { get { return TypeDefinitionHandle.FromRowId(RowId); } } ``` I find that I often use LINQ to search thru table results looking for specific information, but need the handle at the end. For example, this code searches thru the TypeReferences for System.Object - useful for finding all the class objects in an assembly. Note how I have to create an anonymous type to hold the handle separately from the type reference, even though the TypeReference can easily construct a handle internally. ``` csharp _reader.TypeReferences .Select(h => new { Handle = h, TypeRef = _reader.GetTypeReference(h) }) .Where(o => _reader.GetString(o.TypeRef.Name) == ""Object"" && _reader.GetString(o.TypeRef.Namespace) == ""System"") .Select(o => o.Handle) .Single(); ``` I'd much rather write this: ``` csharp _reader.TypeReferences .Select(h => _reader.GetTypeReference(h)) .Where(tr => _reader.GetString(tr.Name) == ""Object"" && _reader.GetString(tr.Namespace) == ""System"") .Select(tr => tr.Handle) .Single(); ``` " 4046 area-Meta Co-locate Reference Docs and Sample Code within the Repo on a Per-Library Basis "# Problem As .NET Core moves the platform towards being more modular, sample code and reference docs should move in that direction too. We should have a good story in place for reference docs and samples. **Note:** Samples here mean samples which _only_ call the API they are co-located with. These are not cross-cutting, they don't cover scenarios, and they don't involve other app models (ASP.NET, UWP, etc). They will be console apps which cover only the ""happy path"" of an API in a demonstrative way. # Solution Co-locate reference docs and samples with the code they describe and demonstrate usage of, on a per-library basis. The existing structure of libraries in corefx would be altered as such (using `System.Linq` as an example): Before: ``` /src |__System.Linq |__/ref |__/src |__/tests ``` After: ``` /src |__System.Linq |__/ref |__/doc (new! contains documentation, perhaps in markdown files) |__/src |__/samples (new! contains a buildable sample project) |__/tests ``` Sample code in `/samples` will be embedded directly into docs in the `/doc` folder so that any time sample code is changed, the documentation is automatically updated. See [an example of how this may look](https://github.com/cartermp/corefx/tree/samples/src/System.Linq) for some more detail. ## Building The proposed solution would affect the build process. I see two options here: a. Force `/samples` to build before a release b. Eventually have `/samples` build as ""full"" build, but do not require that to release Both have their benefits and drawbacks which are worth discussing. Finally, hooks will have to eventually be added to force other sample projects outside of corefx to build so their sample code can also stay up-to-date. # Justification This solution will form the ""core"" of an eventual samples system which will ultimately accomplish the following: - Easier to update reference docs and samples if they live with the code they describe - No code samples in reference docs will be out-of-date and fail to compile - No code samples in any .NET Core conceptual docs will be out-of-date and fail to compile - No .NET Core sample applications will be out-of-date and fail to compile We want to avoid a future scenario where developers have to turn to places like StackOverflow to learn how to use an API because the sample code in the documentation is outdated and/or won't compile. If all our .NET Core samples are tied into the build system, we can avoid that scenario. " 4047 area-System.Net HttpClientHandlerTest.PostAsync_CallMethod_StreamContent failed in Windows_Debug PR test ``` http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug_prtest/5475/testReport/junit/System.Net.Http.Functional.Tests/HttpClientHandlerTest/PostAsync_CallMethod_StreamContent_remoteServer__http___httpbin_org_post__requestContentStream__MemoryStream___CanRead___True__CanSeek___True__CanTimeout___False__CanWrite___False__Capacity___1234_________expectedData___62__23__186__150__174_______/ ``` It seems the operation timed out in the test run. Here's the log: ``` Stacktrace MESSAGE: System.Net.Http.HttpRequestException : An error occurred while sending the request. ---- System.Net.Http.WinHttpException : The operation timed out +++++++++++++++++++ STACK TRACE: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at System.Net.Http.Functional.Tests.HttpClientHandlerTest.d__c5.MoveNext() in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Http\tests\FunctionalTests\HttpClientHandlerTest.cs:line 478 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at System.Net.Http.WinHttpHandler.d__5.MoveNext() in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs:line 837 ``` 4048 area-System.Net HttpClientHandlerTest.PostAsync_CallMethod_FormUrlEncodedContent Failed in Windows_Debug PR Test ``` http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug_prtest/5475/testReport/junit/System.Net.Http.Functional.Tests/HttpClientHandlerTest/PostAsync_CallMethod_FormUrlEncodedContent_remoteServer__http___httpbin_org_post_/ ``` Operation timed out. Log: ``` Stacktrace MESSAGE: System.Net.Http.HttpRequestException : An error occurred while sending the request. ---- System.Net.Http.WinHttpException : The operation timed out +++++++++++++++++++ STACK TRACE: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at System.Net.Http.Functional.Tests.HttpClientHandlerTest.d__9d.MoveNext() in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Http\tests\FunctionalTests\HttpClientHandlerTest.cs:line 380 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at System.Net.Http.WinHttpHandler.d__5.MoveNext() in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs:line 837 ``` 4049 area-System.Net HttpClientHandlerTest.PostAsync_Post_ChannelBindingHasExpectedValue failed in Windows_Debug PR Test "``` http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug_prtest/5475/testReport/junit/System.Net.Http.Functional.Tests/HttpClientHandlerTest/PostAsync_Post_ChannelBindingHasExpectedValue/ ``` Another ""operation timed out"" error. Log: ``` Stacktrace MESSAGE: System.Net.Http.HttpRequestException : An error occurred while sending the request. ---- System.Net.Http.WinHttpException : The operation timed out +++++++++++++++++++ STACK TRACE: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at System.Net.Http.Functional.Tests.HttpClientHandlerTest.d__102.MoveNext() in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Http\tests\FunctionalTests\HttpClientHandlerTest.cs:line 584 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at System.Net.Http.WinHttpHandler.d__5.MoveNext() in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs:line 837 ``` " 4052 area-System.Net System.Net.Sockets TPL tracking items - [x] Optimize delegate allocations. - [x] Investigate behavior difference from Desktop: Used to throw SocketException. - [x] Investigate behavior difference in tests in System.Net.Sockets.Legacy 4054 area-System.Xml Reevaluate a design decision - XDocument automatically connects text nodes next to each other XDocument automatically connects text nodes which are next to each other, and combines them in a single node. The expected behavior is to have a separate node for each. 4056 area-System.Net 3 Name Resolution Tests fail on OSX ``` System.Net.NameResolution.PalTests.NameResolutionPalTests.TryGetAddrInfo_HostName [FAIL] Assert.Equal() Failure Expected: Success Actual: HostNotFound Stack Trace: at System.Net.NameResolution.PalTests.NameResolutionPalTests.TryGetAddrInfo_HostName() at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) System.Net.NameResolution.PalTests.NameResolutionPalTests.GetHostByName_HostName [FAIL] System.Net.Internals.InternalSocketException : Unknown error: 11001 Stack Trace: at System.Net.NameResolutionPal.GetHostByName(String hostName) at System.Net.NameResolution.PalTests.NameResolutionPalTests.GetHostByName_HostName() at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) System.Net.NameResolution.PalTests.NameResolutionPalTests.TryGetAddrInfo_HostName_TryGetNameInfo [FAIL] Assert.Equal() Failure Expected: Success Actual: HostNotFound Stack Trace: at System.Net.NameResolution.PalTests.NameResolutionPalTests.TryGetAddrInfo_HostName_TryGetNameInfo() at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ``` Seeing this on my local mac (which is connected to Corp-Net, so maybe that's an issue. Let me know if you need help getting a repo @pgavlin), 4057 area-System.Xml Reevaluate a design decision - XDocument allows double-hyphen within comment by adding a space in between "XDocument allows ""--"" within a comment by representing it with a space between the two hyphens (“- -“) in the outer Xml. However, when reading the document, the XmlReader will contain the invalid content “--“ which was forbidden in the outer Xml. According to the spec, double-hyphen MUST NOT occur within comments. This is not a regression issue. I tried writing some tests for Desktop. Tests are attached. The behavior was consistent among corefx and Desktop. [WriteCommentWithDoubleHyphensTests.txt](https://github.com/dotnet/corefx/files/18981/WriteCommentWithDoubleHyphensTests.txt) " 4058 area-System.Net [System.Net.NetworkInformation] Implement NetworkAddressChanged on OSX This is one of the leftovers that I did not have time to implement for today's deadline (10/21/15). A basic search came up with this, which seems to be the standard way to do this: http://stackoverflow.com/questions/11532144/how-to-detect-ip-address-change-on-osx-programmatically-in-c-or-c The approach mentioned there is using the SystemConfiguration framework. 4059 area-System.Net [System.Net.NetworkInformation] Pull out string parsing logic and test it Right now, the string parsing code is generally located in the class that uses it to parse some known network files. Instead, we should pull out all of the string parsing into a separate class, and separate it out from the file reading itself. Adding unit tests for all of the convoluted parsing logic would then be easy at that point. 4060 area-System.Net [System.Net.NetworkInformation] Follow up on miscellaneous perf / style issues - [x] There are a number of // PERF markers in the code - [x] @pgavlin suggested that, when collecting data using sysctl on OSX, we could try to use a stack-allocated buffer of some fixed size before falling back to heap allocation if the call fails. There are a number of instances of this in pal_networkstatistics.cpp. - [x] A number of properties on various types in the library can be lazily instantiated, assuming that doing so will not alter the resulting object that is created. I don't have an exhaustive list of all the properties that can be optimized this way. We should match the behavior of Windows here with regards to when the data is finalized for those properties. - [x] When parsing the Linux network files, we should probably use invariant string comparisons, rather than the default culture-aware. - [x] Address miscellaneous comments from the previous PR (https://github.com/dotnet/corefx/pull/4039) - [x] Move TcpState mapping from C# to native shim - [x] Consider bailing on sysctl calls if estimated buffer size isn't big enough. (Most code examples do this and I've never seen the estimated size be incorrect). 4062 area-Infrastructure build.sh on OS X has problems with package restore "When running build.sh on a Mac, I'm seeing a hang during package restore. I've built corefx successfully on this Mac before, but it's been at least a few weeks since I last tried. ``` ./build.sh clean Setting up directories for build WARNING: Mono 4.0.1.44 or later is required to build corefx. Unable to assess if current version is supported. Restoring NuGet.exe... Restoring MSBuild... Attempting to resolve dependency 'Microsoft.Tpl.Dataflow (≥ 4.5.24)'. Installing 'Microsoft.Tpl.Dataflow 4.5.24'. Successfully installed 'Microsoft.Tpl.Dataflow 4.5.24'. Installing 'Microsoft.Build.Mono.Debug 14.1.0.0-prerelease'. Successfully installed 'Microsoft.Build.Mono.Debug 14.1.0.0-prerelease'. Restoring build tools... Restoring all packages... ``` It was stuck on that part for a long time, and eventually, I got some timeout errors like the following (this is a small sampling of them): ``` Error: DownloadPackageAsync: https://www.myget.org/F/dotnet-core/api/v2/package/runtime.win7.System.IO.Pipes/4.0.0-beta-23328 Error getting response stream (InitRead): ReceiveFailure Error: DownloadPackageAsync: https://www.myget.org/F/dotnet-core/api/v2/package/runtime.win7.System.Net.Http/4.0.1-beta-23328 EXEC : error : SendFailure (Error writing headers) [/Users/adityam/code/corefx/build.proj] Error: DownloadPackageAsync: https://www.myget.org/F/dotnet-core/api/v2/package/runtime.win7.System.IO.FileSystem.Watcher/4.0.0-beta-23328 HTTP request timed out. Exiting. Error: DownloadPackageAsync: https://www.myget.org/F/dotnet-core/api/v2/package/runtime.win7.System.IO.MemoryMappedFiles/4.0.0-beta-23328 HTTP request timed out. Exiting. Error: DownloadPackageAsync: https://www.myget.org/F/dotnet-core/api/v2/package/runtime.win7.System.Net.Requests/4.0.11-beta-23328 HTTP request timed out. Exiting. Error: DownloadPackageAsync: https://www.myget.org/F/dotnet-core/api/v2/package/runtime.win7.System.Net.Primitives/4.0.11-beta-23328 HTTP request timed out. Exiting. ``` I then tried manually running the same dnu restore command that the script is trying to run. The first time I tried this, it seemed to download all the packages successfully, but then I ran into problems like the following when running build.sh: ``` Restoring all packages... /corefx/packages/Microsoft.Build.Mono.Debug.14.1.0.0-prerelease/lib/Microsoft.CSharp.CurrentVersion.targets(383,9): error MSB6006: ""csc2.exe"" exited with code 1. [/corefx/src/Microsoft.CSharp/ref/Microsoft.CSharp.csproj] /corefx/packages/Microsoft.Build.Mono.Debug.14.1.0.0-prerelease/lib/Microsoft.CSharp.CurrentVersion.targets(383,9): error MSB6006: ""csc2.exe"" exited with code 1. [/corefx/src/Microsoft.VisualBasic/ref/Microsoft.VisualBasic.csproj] ``` I've also tried deleting everything and starting from scratch and this time, I got some request timeouts when running the dnu command manually (and it still hangs on package restore when running build.sh). Is this a problem with myget or could there be something else going wrong? " 4063 area-System.Xml Reevaluate a design decision - bad PI within XDocument One of the tests prints error messages but does not fail. It checks for bad ProcessingInstruction within an XDocument. I'm not sure if the contents of the two XmlReaders are truly supposed to the equivalent or different. I have attached the simplified version of the test. [BadPITestExample.txt](https://github.com/dotnet/corefx/files/18179/BadPITestExample.txt) 4065 area-System.Net HttpClient.GetAsync() sends an empty Cookie header on Mac and Linux When running [this test](https://github.com/aspnet/KestrelHttpServer/blob/8d107b22aecc03785814643ef82b61233ff9196b/test/Microsoft.AspNet.Server.Kestrel.FunctionalTests/ResponseTests.cs#L52) (which just does a plain call to GetAsync without any special configuration), HttpClient sends the following request on Mac and Linux: ``` GET / HTTP/1.1\r\nHost: localhost:8792\r\nAccept: */*\r\nAccept-Encoding: gzip,deflate\r\nCookie: \r\n\r\n ``` This helped expose a header parsing bug in Ketrel :smile:, but I don't think the Cookie header should be sent in this case. 4066 area-System.Net CurlHandler sending empty cookie CurlHandler is sending an empty cookie unnecessarily. This commit fixes the behavior Fixes #4065 4071 area-System.Net TCP/UDP: System.Net.Sockets.SocketException : An address incompatible with the requested protocol was used http://dotnet-ci.cloudapp.net/job/dotnet_corefx_prtest/5713/ ``` System.Net.Sockets.Tests.DualMode.BeginSendToV4IPEndPointToDualHost_Success [FAIL] System.Net.Sockets.SocketException : An address incompatible with the requested protocol was used Stack Trace: d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs(3210,0): at System.Net.Sockets.Socket.DoBeginSendTo(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint endPointSnapshot, SocketAddress socketAddress, OverlappedAsyncResult asyncResult) d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs(3161,0): at System.Net.Sockets.Socket.BeginSendTo(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint remoteEP, AsyncCallback callback, Object state) d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Sockets.Legacy\tests\FunctionalTests\DualModeSocketTest.cs(1364,0): at System.Net.Sockets.Tests.DualMode.DualModeBeginSendTo_EndPointToHost_Helper(IPAddress connectTo, IPAddress listenOn, Boolean dualModeServer, Boolean expectedToTimeout) d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Sockets.Legacy\tests\FunctionalTests\DualModeSocketTest.cs(1350,0): at System.Net.Sockets.Tests.DualMode.BeginSendToV4IPEndPointToDualHost_Success() ``` cc: @cipop, @pgavlin 4072 area-System.Collections Suggested API Addition: ConcurrentDictionary.TryUpdate(TKey key, Func updateFactory) The discussion on #4068 made me think of how it's possible to add to a `ConcurrentDictionary` based on a key, or to do an add-or-update based on the key and/or current value, but it's not possible to do an update based on current values that would not add a new value if there wasn't one already. This can be added externally easily enough: ``` C# public static bool TryUpdate(this ConcurrentDictionary dict, TKey key, Func updateFactory) { TValue curValue; while(dict.TryGetValue(key, out curValue)) { TValue value = updateFactory(key, curValue); if( (default(TValue) == null && ReferenceEqual(curValue, value)) || dict.TryUpdate(key, value, curValue) ) return true; } return false; } ``` But this is slower (and hence more likely to have to loop) than if the call was an instance method, and also prevents the factory from being called with the stored key rather than the passed key (should a difference be significant to the factory). That it's come up for at least someone else before is suggested by http://stackoverflow.com/q/12240219/400547 (they didn't need the key in their factory, but the above would have provided them with an answer too as their factory could simply ignore it). 4074 area-System.Security If possible, stop hard-coding magic values that aren't exposed in OpenSSL headers See discussion here: https://github.com/dotnet/corefx/pull/4026/files#r42687456 4076 area-System.Collections [RC1 blocker] Access violation while running System.Collections.Tests in CI on Linux http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst_prtest/3747/consoleFull ``` 08:32:50 Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. 08:32:50 at System.Collections.Generic.HashSet`1.System.Collections.Generic.IEnumerable.GetEnumerator() 08:32:50 at Xunit.Assert.Contains[T](T expected, IEnumerable`1 collection, IEqualityComparer`1 comparer) 08:32:50 at Tests.HashSet_HashSetTestSupport.HashSetTestSupport`1.<>c__DisplayClass2.b__1(T item) 08:32:50 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) 08:32:50 at Tests.HashSet_HashSetTestSupport.HashSetTestSupport`1.VerifyHashSet(HashSet`1 set, ICollection`1 contents, IEqualityComparer`1 comparerToUse) 08:32:50 at Tests.HashSet_TrimExcessTests.TrimExcess_Test6() 08:32:50 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 08:32:50 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 08:32:50 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 08:32:50 at Xunit.Sdk.TestInvoker`1.CallTestMethod(Object testClassInstance) 08:32:50 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.<b__1>d.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.b__1() 08:32:50 at Xunit.Sdk.ExecutionTimer.d__4.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) 08:32:50 at Xunit.Sdk.ExceptionAggregator.d__9.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) 08:32:50 at Xunit.Sdk.TestInvoker`1.d__46.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance) 08:32:50 at Xunit.Sdk.TestInvoker`1.<b__45_0>d.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestInvoker`1.b__45_0() 08:32:50 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 08:32:50 at Xunit.Sdk.XunitTestRunner.d__4.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator) 08:32:50 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 08:32:50 at Xunit.Sdk.TestRunner`1.d__43.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestRunner`1.RunAsync() 08:32:50 at Xunit.Sdk.TestCaseRunner`1.d__19.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestCaseRunner`1.RunAsync() 08:32:50 at Xunit.Sdk.TestMethodRunner`1.d__32.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() 08:32:50 at Xunit.Sdk.TestMethodRunner`1.d__31.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestMethodRunner`1.RunAsync() 08:32:50 at Xunit.Sdk.TestClassRunner`1.d__38.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() 08:32:50 at Xunit.Sdk.TestClassRunner`1.d__37.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestClassRunner`1.RunAsync() 08:32:50 at Xunit.Sdk.TestCollectionRunner`1.d__28.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() 08:32:50 at Xunit.Sdk.TestCollectionRunner`1.d__27.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestCollectionRunner`1.RunAsync() 08:32:50 at System.Threading.Tasks.Task`1.InnerInvoke() 08:32:50 at System.Threading.Tasks.Task.Execute() 08:32:50 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 08:32:50 --- End of inner exception stack trace --- 08:32:50 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 08:32:50 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 08:32:50 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 08:32:50 at Xunit.Sdk.TestInvoker`1.CallTestMethod(Object testClassInstance) 08:32:50 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.<b__1>d.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.b__1() 08:32:50 at Xunit.Sdk.ExecutionTimer.d__4.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) 08:32:50 at Xunit.Sdk.ExceptionAggregator.d__9.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) 08:32:50 at Xunit.Sdk.TestInvoker`1.d__46.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance) 08:32:50 at Xunit.Sdk.TestInvoker`1.<b__45_0>d.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestInvoker`1.b__45_0() 08:32:50 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 08:32:50 at Xunit.Sdk.XunitTestRunner.d__4.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator) 08:32:50 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 08:32:50 at Xunit.Sdk.TestRunner`1.d__43.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestRunner`1.RunAsync() 08:32:50 at Xunit.Sdk.TestCaseRunner`1.d__19.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestCaseRunner`1.RunAsync() 08:32:50 at Xunit.Sdk.TestMethodRunner`1.d__32.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() 08:32:50 at Xunit.Sdk.TestMethodRunner`1.d__31.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestMethodRunner`1.RunAsync() 08:32:50 at Xunit.Sdk.TestClassRunner`1.d__38.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() 08:32:50 at Xunit.Sdk.TestClassRunner`1.d__37.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestClassRunner`1.RunAsync() 08:32:50 at Xunit.Sdk.TestCollectionRunner`1.d__28.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() 08:32:50 at Xunit.Sdk.TestCollectionRunner`1.d__27.MoveNext() 08:32:50 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 08:32:50 at Xunit.Sdk.TestCollectionRunner`1.RunAsync() 08:32:50 at System.Threading.Tasks.Task`1.InnerInvoke() 08:32:50 at System.Threading.Tasks.Task.Execute() 08:32:50 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 08:32:50 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 08:32:50 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 08:32:50 at Xunit.Sdk.MaxConcurrencySyncContext.RunOnSyncContext(SendOrPostCallback callback, Object state) 08:32:50 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 08:32:50 at Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc() 08:32:50 at Xunit.Sdk.XunitWorkerThread.<>c.b__5_0(Object _) 08:32:50 at System.Threading.Tasks.Task.Execute() 08:32:50 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 08:32:50 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 08:32:50 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 08:32:50 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 08:32:50 ./run-test.sh: line 130: 32445 Aborted (core dumped) ./corerun xunit.console.netcore.exe $testDllName -xml testResults.xml -notrait category=failing -notrait category=OuterLoop -notrait category=$xunitOSCategory 08:32:50 One or more tests failed while running tests from 'System.Collections.Tests'. Exit code 134. ``` 4077 area-System.Net HttpClient hangs when sending chunked encoded request When WCF uses HttpClient to send a chunked encoded request, the request never completes. There is a thread hung blocked on a Write call to the request stream. This was using build version 4.0.1-beta-23419. Here's the call stack. ``` mscorlib.ni.dll!System.Threading.ManualResetEventSlim.Wait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) Line 651 C# mscorlib.ni.dll!System.Threading.Tasks.Task.SpinThenBlockingWait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) Line 3308 C# mscorlib.ni.dll!System.Threading.Tasks.Task.InternalWait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) Line 3240 C# mscorlib.ni.dll!System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task) Line 149 C# mscorlib.ni.dll!System.Runtime.CompilerServices.TaskAwaiter.GetResult() Line 110 C# system.net.http.dll!System.Net.Http.WinHttpRequestStream.Write(byte[] buffer, int offset, int count) Line 136 C# system.private.datacontractserialization.dll!System.Xml.XmlStreamNodeWriter.FlushBuffer() Line 494 C# system.private.datacontractserialization.dll!System.Xml.XmlStreamNodeWriter.Flush() Line 513 C# system.private.datacontractserialization.dll!System.Xml.XmlBaseWriter.Flush() Line 67 C# system.private.datacontractserialization.dll!System.Xml.XmlDictionaryAsyncCheckWriter.Flush() Line 84 C# system.private.servicemodel.dll!System.ServiceModel.Channels.TextMessageEncoderFactory.TextMessageEncoder.WriteMessageAsync(System.ServiceModel.Channels.Message message, System.IO.Stream stream) Line 551 C# system.private.servicemodel.dll!System.ServiceModel.Channels.StreamedMessageContent.SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context) Line 189 C# system.net.http.dll!System.Net.Http.HttpContent.CopyToAsync(System.IO.Stream stream, System.Net.TransportContext context) Line 323 C# system.net.http.dll!System.Net.Http.WinHttpHandler.InternalSendRequestBodyAsync(System.Net.Http.WinHttpRequestState state, bool chunkedModeForSend) Line 1317 C# system.net.http.dll!System.Net.Http.WinHttpHandler.StartRequest(object obj) Line 841 C# [Resuming Async Method] mscorlib.ni.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 92 C# mscorlib.ni.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() Line 1070 C# mscorlib.ni.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.OutputAsyncCausalityEvents.AnonymousMethod__0() Line 977 C# mscorlib.ni.dll!System.Runtime.CompilerServices.TaskAwaiter.OutputWaitEtwEvents.AnonymousMethod__0() Line 284 C# mscorlib.ni.dll!System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action action, bool allowInlining, ref System.Threading.Tasks.Task currentTask) Line 806 C# mscorlib.ni.dll!System.Threading.Tasks.Task.FinishContinuations() Line 3605 C# mscorlib.ni.dll!System.Threading.Tasks.Task.TrySetResult(bool result) Line 485 C# mscorlib.ni.dll!System.Threading.Tasks.TaskCompletionSource.TrySetResult(bool result) Line 294 C# system.net.http.dll!System.Net.Http.WinHttpRequestCallback.OnRequestSendRequestComplete(System.Net.Http.WinHttpRequestState state) Line 123 C# system.net.http.dll!System.Net.Http.WinHttpRequestCallback.RequestCallback(System.IntPtr handle, System.Net.Http.WinHttpRequestState state, uint internetStatus, System.IntPtr statusInformation, uint statusInformationLength) Line 72 C# system.net.http.dll!System.Net.Http.WinHttpRequestCallback.WinHttpCallback(System.IntPtr handle, System.IntPtr context, uint internetStatus, System.IntPtr statusInformation, uint statusInformationLength) Line 57 C# ``` 4078 area-System.Net Fix hang when writing request stream in WinHttpHandler WinHttpHandler was hanging due to blocking on the WinHTTP status callback thread. The blocking was coming from a task continuation resuming on the same thread and subsequently calling a blocking Stream.Write method in a custom HttpContent class being written onto the request stream. Blocking is not allowed on the WinHTTP callback thread. So any task continuations need to occur on a different thread. The fix is to create the TaskCompletionSources to use RunContinuationsAsynchronously. This allows them to unblock the WinHTTP thread. Additionally, I added some missing ConfigureAwait(false) settings to some await'd operations. Added a new test which uses a custom HttpContent class that uses a blocking Write() call when serializing onto the request stream. Fix #4077 4080 area-System.Net Fix WinHttpHandler on Win7 When WinHttpHandler was recently switched to use async WinHTTP pattern, it started setting an option which improves performance. However, the WINHTTP_OPTION_ASSURED_NON_BLOCKING_CALLBACKS option is not available on downlevel Windows versions. This was causing an exception to be thrown when sending an HTTP request. The fix is to ignore the ERROR_WINHTTP_INVALID_OPTION error code when trying to set this option. 4081 area-System.Net Removing Nuget.Props file Nuget.Props file was added by mistake in a previous commit. 4082 area-System.Net Enable NetworkInformation tests on Linux, OSX "cc: @stephentoub , @CIPop This removes the ""Unsupported"" tag for OSX and Linux from the NetworkInformation tests. Some of the tests just attempt to enumerate all of the properties and statistics that the library exposes. I've disabled those test cases on Linux and OSX because many of those members are not supported. I encountered a couple small issues after running the tests and fixed the issues in subsequent commits: - In Linux's NetworkChange implementation, the field storing the netlink socket's file descriptor was not being set to 0 after it was closed. This means if you tried to close the socket, and then re-open or re-close it, you'd hit a debug assertion I had in place. I've set the field to 0 after it is closed, and clarified the debug assertion messages. - UnixIP(v4/v6)InterfaceProperties was caching the network interface's index too early, and was always storing 0. The network interface's index isn't initialized until the link-layer address is enumerated from the native shim call. To avoid timing issues like this, I might consider storing all of the information from the address enumeration in a separate object, and then constructing the UnixNetworkInterface object all at once. - OSX didn't implement OperationalStatus. I've added a very crude implementation which just determines whether an interface is ""Up"" or not by checking if it has any addresses assigned to it. I think the OS exposes a bit more information here, but I don't think that we can necessarily map that info to our enum values (except perhaps ""Dormant""). " 4083 area-System.Net Socket ArgumentValidation test failures See the discussion in https://github.com/dotnet/corefx/pull/4079#issuecomment-150347175. I am disabling the failing tests in order to get changes from TFS in. 4086 area-System.Net Validate linger time. Some platforms behave strangely when confronted with linger times that are out-of-range. In particular, OS X silently truncates `linger::l_linger` to 16 bits and interprets the results as a `short`. This change validates the linger time before calling `setsockopt` to ensure reliable behavior across platforms. On OS X, the maximum linger time is actually in units of ticks, so validation is a bit more involved than on other platforms (where the max time is defined by the size of the integer used to store the value): on the first call to `SetLingerOption`, the number of ticks per second is obtained via `sysconf()` and is then used to derive the maximum linger time by simple division. This does mean that the maximum linger time on OS X may vary with the number of ticks per second, and so may vary between machines. 4087 area-System.Net Merge changes from TFS 4089 area-System.Net Provisionally Ignoring tests to unblock the build Some tests that are having different behavior following the System.Net.Sockets API revision will be disabled temporally. 4091 area-Meta Question: Is .Net Remoting supported? Also WCF Interfacing We can hide .Net Remitting behind WCF and visa versa 4092 area-System.Net Fixing some of the tests throwing different expected exceptions A method CreateArraySegment for correctly throw ArgumentOutOfRangeException instead of ArgumentException is added to fix the Tests in ArgumentValidationTests. Fix #4083 4093 area-System.Net [Linux] HttpClientHandler PostSyncBlockingContentUsingChunkedEncoding_Success test hangs Referencing PR #4078, the new test added hangs on Linux. System.Net.Http.Functional.Tests, PostScenarioTest.cs, PostSyncBlockingContentUsingChunkedEncoding_Success test does a blocking Stream.Write() call in a custom HttpContent class SerializeToStreamAsync() method. This test passes on Windows. 4095 area-System.Net Fix CurlHandler deadlock with synchronous CopyToAsync CurlHandler calls to HttpContext.CopyToAsync with a stream that CopyToAsync should write to asynchronously. If, however, the call to CopyToAsync blocks Write'ing to it synchronously as part of the synchronous call to CopyToAsync, CurlHandler will deadlock. As a precaution, we ensure that the CopyToAsync call is asynchronous from the perspective of CurlHandler. Fixes #4093 cc: @davidsh, @kapilash, @vijaykota 4097 area-System.Net Disable sporadically failing SslStream test The timeout may simply need to be increased. For now, disabling. as it's failed several times. #3845 cc: @davidsh 4100 area-System.Reflection Missing accessors on PropertyDefinition The implementation of System.Reflection.Metadata [PropertyDefinition](https://github.com/dotnet/corefx/blob/master/src/System.Reflection.Metadata/src/System/Reflection/Metadata/TypeSystem/PropertyDefinition.cs#L91) and [EventDefinition](https://github.com/dotnet/corefx/blob/master/src/System.Reflection.Metadata/src/System/Reflection/Metadata/TypeSystem/EventDefinition.cs#L84) swallows some accessors and doesn't make them available publically. This has been marked as _TODO_ in the source code. These _'other'_ accessors are not often encountered, but handling them is required for certain special case tooling. ## usage of _'other'_ property accessors * The .NET Framework exposes 'other' accessors through [PropertyInfo.GetAccessors](https://referencesource.microsoft.com/#mscorlib/system/reflection/propertyinfo.cs,496) * .NET assemblies generated by the 'tlbimp' tool can generate this metadata when a COM property has both a PUT and a PUTREF accessor. * They are valid metadata, even though rarely used, but if you build tools for processing or inspecting .NET assemblies (like tlbexp or ildasm do) you want to handle them. The last point is a real-world use case I have. The tlbexp functionality built into the .NET Framework requires loading an assembly into the AppDomain to generate a TLB. Loading the assembly can fail for various reasons, so generating a TLB by only inspecting metadata is desireable. The omission of 'other' accessors is a problem here. ## Proposed API ``` csharp namespace System.Reflection.Metadata { public struct PropertyAccessors { // Existing public MethodDefinitionHandle Getter { get; } public MethodDefinitionHandle Setter { get; } // New public ImmutableArray Others { get; } } public struct EventAccessors { // Existing public MethodDefinitionHandle Adder { get; } public MethodDefinitionHandle Remover { get; } public MethodDefinitionHandle Raiser { get; } // New public ImmutableArray Others { get; } } } ``` ## Details In the large majority of cases there will be no 'other' accessors in the metadata. It is trivially possible to implement this case without any additional allocations compared to the current implementation. For the purpose of the discussion I have provided an initial [implementation](https://github.com/weltkante/corefx/pull/3) of the suggested change. ## Updates - Expose other accessors directly on the `PropertyAccessors` and `EventAccessors` structs instead of returning them as an out-param 4101 area-System.Net Unix HttpClient does not use the same https server cert validation as Unix SslStream It seems that - If you start with a certificate that is not trusted by the OpenSSL default trust list - Then you add the root to the CurrentUser\My X509Store It still fails to validate on an https connection (but would succeed if connecting with SslStream). The two SSL consumers should use the same validation. 4104 area-System.Linq Re-evaluate various #define symbols in System.Linq.Expressions The following symbols are used in the code but are never set in corefx: - FEATURE_DLG_INVOKE - FEATURE_FAST_CREATE - FEATURE_MAKE_RUN_METHODS - FEATURE_THREAD_ABORT - FEATURE_STACK_TRACES - NO_FEATURE_STATIC_DELEGATE We should re-evaluate whether those are useful to enable in some build flavors e.g. to improve performance of the interpreter. 4108 area-Infrastructure Add validation that project.json's don't overspecify dependencies It would be really nice if we validated that no project.json specifies dependencies that aren't used. See https://github.com/dotnet/corefx/pull/4107#issuecomment-150646389 4110 area-System.Data AccessViolationException in System.Data.SqlClient when a second copy is loaded at application shutdown We are seeing the following error [on one of the EF tests](https://github.com/aspnet/EntityFramework/blob/de4f73e9517ba75f69064e45ff30d2755a3981d3/test/EntityFramework.CrossStore.FunctionalTests/EndToEndTest.cs#L21). Not sure if it’s SqlClient or CoreCLR issue. ``` [12:16:22]Step 6/6: Run tests (Command Line) (3m:53s) [12:17:56][Step 6/6] xunit-test (2m:19s) [12:19:42][xunit-test] Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. [12:19:42][xunit-test] at System.Data.SqlClient.SNINativeMethodWrapper.SNITerminate() [12:19:42][xunit-test] at System.Data.SqlClient.SNILoadHandle.ReleaseHandle() [12:19:42][xunit-test] at System.Runtime.InteropServices.SafeHandle.InternalFinalize() [12:19:42][xunit-test] at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing) [12:19:42][xunit-test] at System.Runtime.InteropServices.SafeHandle.Finalize() [12:20:15][xunit-test] Step Run tests (Command Line) failed ``` 4111 area-System.Net Change some dual-mode tests to accommodate platform differences. On *nix, the OS IP stack changes a dual-mode socket back to a normal IPv6 socket once the socket is bound to an IPv6-specific address. This can cause behavioral differences in code that checks the value of DualMode (e.g. the checks in CanTryAddressFamily). We've decided not to emulate the Winsock behavior (which does not change the value of `IPV6_V6ONLY` for dual-mode sockets bound to IPv6-specific addresses) due to the cost of caching the expected value on each socket instance; some tests needed changes as a consequence of this decision. Fixes #4005. 4112 area-System.Linq Expression interpreter - Bug when passing Type.Missing to Invoke calls Blocked by https://github.com/dotnet/coreclr/issues/7253 Found while enabling more tests (see #3995): ``` Tests.Compiler_Tests.CallCompiledLambdaWithTypeMissing [FAIL] Assert.Equal() Failure Expected: (null) Actual: System.ArgumentException: Missing parameter does not have a default value. Parameter name: parameters at System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig) at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at System.Linq.Expressions.Interpreter.ByRefMethodInfoCallInstruction.Run(InterpretedFrame frame) in Interpreter\CallInstruction.cs:line 499 at System.Linq.Expressions.Interpreter.Interpreter.Run(InterpretedFrame frame) in \Interpreter\Interpreter.cs:line 106 at System.Linq.Expressions.Interpreter.LightLambda.Run(Object[] arguments) in Interpreter\LightLambda.cs:line 264 at Thunk(Func`2 , Object ) at lambda_method(Closure , Object ) Stack Trace: TestExtensions.cs(134,0): at TestExtensions.AssertVoid(Exception e1, Exception e2) TestExtensions.cs(145,0): at TestExtensions.AssertNonVoid(Object o1, Object o2, Exception e1, Exception e2) at lambda_method(Closure , Object ) SequenceTests\SequenceTests.cs(2914,0): at Tests.Compiler_Tests.CallCompiledLambdaWithTypeMissing() ``` 4114 area-System.Net Update a socket test to accommodate differences on *nix. On *nix, the SendTo APIs return ENETUNREACH instead of EFAULT when confronted with a socket address with an invalid address family: these platforms check the family of the provided socket address before checking its size (as long as the socket address is large enough to store an address family). Fixes #4003. 4117 area-System.Net WinHttpHandler: Fix POSTs with zero length content While researching #3292, I discovered that POST'ing zero length content throws an exception. This was because we were calling WinHttpWriteData() and passing in a zero length for the buffer size. This returns an error back from WinHTTP. We don't need to call WinHTTP APIs to write zero length data. We simply need to return a completed task back to the caller. Added tests to verify the fix. 4120 area-System.Net Unix HttpClient does not do CRL checking on the connection The libcurl+openssl default is to not check CRLs, since they have to be manually provided. The work done by #4101 isn't going to change the revocation check status, because currently the Unix X509Chain implementation doesn't support opportunistic revocation, and self-signed certs require opportunistic revocation. #2204 is the issue tracking opportunistic revocation. 4121 area-System.Net Make Unix HttpClient use X509Chain instead of the default chain validator "Opportunistically redirect the SSL validation logic. On OSX this is expected to return CURLE_NOT_BUILT_IN, and just use the DarwinSsl logic (unless the user has built libcurl+openssl themselves). This particular pull request enables the ability to use a self-signed certificate that is trusted only in the CurrentUser\Root store. Along the way I discovered that we weren't doing CRL validation either, and that's tracked in issue #4120. Enabling CRL validation in this change would mean self-signed test certs still don't work, because #2204 seems to be required for supporting ""opportunistic CRL"" (require it be valid if there's a CDP entry, but if there's no CDP don't consider that a failure). cc: @stephentoub @vijaykota @rajansingh10 @shrutigarg " 4123 area-System.Security Where's the TransformBlock functionality on SHA256? "Hi, I have this working code in good old .NET 4.5 console application: ``` c# var sha256 = System.Security.Cryptography.SHA256.Create(); var message = new byte[] {1, 2, 3}; var s = new byte[32]; var m = sha256.ComputeHash(message); sha256.TransformBlock(m, 0, m.Length, m, 0); sha256.TransformFinalBlock(s, 0, s.Length); var x = sha256.Hash; // x = {236, 196, 174, 128, 243....} ``` How do I achieve the same thing when targetting dnxcore50 or a Universal Windows 10 App? I get errormessages saying TransformBlock() / TransformFinalBlock() / Hash does not exist, but ComputeHash() seem to exist and work as before. I have added dependency to ""System.Security.Cryptography.Algorithms"": ""4.0.0-beta-23409"" " 4125 area-System.Linq Expression interpreter - Reflection calls could be made cheaper Blocked by https://github.com/dotnet/coreclr/issues/7253 Spotted while looking into #4112. The calls to MethodBase.Invoke in various places ultimately call into MethodBase.CheckArguments which performs a copy of the arguments array passed in. In cases such as the interpreter's where the caller is trusted to transfer ownership of the array, this copy is redundant. Both #4112 and this issue could possibly get resolved by controlling more of those behaviors (i.e. Type.Missing checks in #4112 and argument copying in this issue) through the Binder that's passed to the Invoke method. An (internal-only) specialized fast-path binder could be passed by the interpreter. 4128 area-System.Net Remove obsolete TODOs from xplat SslStream code In the code there are references to issue# 3362. These have been investigated and the existing code does not need changes. But there are TODO comments in the code which need to be removed. 4131 area-System.Net Handling Invalid http response This PR introduces changes in CurlHandler so that its behavior matches that of WinHttpHandler vis-a-vis invalid status line or invalid http headers in the response. Fix for #3269 4132 area-Serialization Make S.Runtime.Serialization.Xml 4.1 be legal for WCF to reference "Currently, if WCF attempts to take a dependency on S.R.Serialization.Xml 4.1.0, it causes CrossGen to fail because the new contract does not exist in TestNet, Desktop, etc. This became a P0 blocker during RC1, and it forced WCF to revert to referencing 4.0.10. We need WCF to be able to refer to 4.1 (or later) versions of S.R.S.Xml without breaking TFS lab builds. To verify the fix, increase the dependency to 4.1.0 in WcfOpen\src\System.Private.ServiceModel\src\project.json, update the lock file and then do a full build of NDP. You need to run CrossGen manually. I did it like this from a Razzle window: msbuild /m /nologo %_NTROOT%\Binaries.niproj /p:TargetPlatform=x86 /p:TargetClrAssembly=core /p:ProductGroupsToBuild=""PK"" /l:%VsSDKToolsPath%\StatusLogger.exe;context=""Process Ship Binaries/Generate Native Images"" /flp:append;logfile=e:_scr\CrossGen-2015-10-23-05-07-08.log /flp1:append;errorsonly;logfile=e:_scr\CrossGen-2015-10-23-05-07-08.err"" " 4134 area-System.Net HttpClient SendAsync sending a GET instead of DELETE on Mac OS "When I make a DELETE request via SendAsync, a GET is sent instead of a DELETE. This happens only on Mac OS. The code produces a correct DELETE request on Windows. Code: ``` C# using System; using System.Net.Http; namespace Deltest { public class Program { public static void Main(string[] args) { HttpClient client = new HttpClient(new HttpClientHandler() { // redirect to Charles Proxy on Mac OS and Fiddler on Windows Proxy = new WebProxy(new Uri(""http://127.0.0.1:8888"")), UseProxy = true }); HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Delete, ""http://localhost:8080/document""); // on Windows the host's IP is used instead HttpResponseMessage response = client.SendAsync(request).Result; Console.WriteLine(response); } } } ``` On Mac OS El Capitan, the following HTTP Request is send: ``` GET /document HTTP/1.1 Host: localhost:8080 Accept: */* Accept-Encoding: gzip,deflate Cookie: ``` Whereas on Windows 10, it is as follows: ``` DELETE http://192.168.1.8:8080/document HTTP/1.1 Accept-Encoding: gzip, deflate Connection: Keep-Alive Host: 192.168.1.8:8080 ``` Mac OS is the host machine. The code was run from both the host machine and a Windows client VM, connecting to the same server running on the host. Is this a bug or am I missing something? Thank you for your time. " 4135 area-System.Linq Common Language Runtime detected an invalid program Using Csla 4.5.701, using remote data-portal in Window 8.1 Store app. Trying to create/instantiate new Object, generating following error (i can fetch existing object from DB successfully), System.AggregateException: One or more errors occurred. ---> Csla.Server.DataPortalException: DataPortal.Create failed on the server ---> System.InvalidProgramException: Common Language Runtime detected an invalid program. at System.Runtime.CompilerServices.RuntimeHelpers._CompileMethod(IRuntimeMethodInfo method) at System.Reflection.Emit.DynamicMethod.CreateDelegate(Type delegateType, Object target) at System.Linq.Expressions.Compiler.LambdaCompiler.CreateDelegate() at System.Linq.Expressions.Compiler.LambdaCompiler.Compile(LambdaExpression lambda, DebugInfoGenerator debugInfoGenerator) at System.Linq.Expressions.Expression`1.Compile() at Csla.Reflection.DynamicMethodHandlerFactory.CreateConstructor(ConstructorInfo constructor) at Csla.Reflection.MethodCaller.GetCachedConstructor(Type objectType) at Csla.Reflection.MethodCaller.CreateInstance(Type objectType) at Csla.Server.DefaultDataPortalActivator.CreateInstance(Type requestedType) at Csla.Server.SimpleDataPortal.d__0.MoveNext() --- End of inner exception stack trace --- at Csla.Server.DataPortal.NewDataPortalException(String message, Exception innerException, Object businessObject) at Csla.Server.SimpleDataPortal.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at Csla.Server.DataPortalSelector.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at Csla.Server.DataPortal.d__4.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task`1.get_Result() at Csla.DataPortalClient.LocalProxy.<>c__DisplayClass1_0.b__0(Object s, DoWorkEventArgs o) at Csla.Threading.BackgroundWorker.InternalDoWork(Object sender, DoWorkEventArgs e) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at Csla.DataPortalClient.LocalProxy.d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at Csla.DataPortal`1.d__8.MoveNext() ---> (Inner Exception #0) Csla.Server.DataPortalException: DataPortal.Create failed on the server ---> System.InvalidProgramException: Common Language Runtime detected an invalid program. at System.Runtime.CompilerServices.RuntimeHelpers._CompileMethod(IRuntimeMethodInfo method) at System.Reflection.Emit.DynamicMethod.CreateDelegate(Type delegateType, Object target) at System.Linq.Expressions.Compiler.LambdaCompiler.CreateDelegate() at System.Linq.Expressions.Compiler.LambdaCompiler.Compile(LambdaExpression lambda, DebugInfoGenerator debugInfoGenerator) at System.Linq.Expressions.Expression`1.Compile() at Csla.Reflection.DynamicMethodHandlerFactory.CreateConstructor(ConstructorInfo constructor) at Csla.Reflection.MethodCaller.GetCachedConstructor(Type objectType) at Csla.Reflection.MethodCaller.CreateInstance(Type objectType) at Csla.Server.DefaultDataPortalActivator.CreateInstance(Type requestedType) at Csla.Server.SimpleDataPortal.d__0.MoveNext() --- End of inner exception stack trace --- at Csla.Server.DataPortal.NewDataPortalException(String message, Exception innerException, Object businessObject) at Csla.Server.SimpleDataPortal.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at Csla.Server.DataPortalSelector.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at Csla.Server.DataPortal.d__4.MoveNext()<--- 4136 area-System.Net Remove dead code in S.N.Sockets. Now that the Disconnect\* APIs are gone, we can remove the remnants of the code that used to support these APIs. 4140 area-System.Net Readjust a Sockets test to accommodate OS X. OS X returns yet another different error code when an IPv4 socket address is passed to recvmsg on an IPv6-only socket. Fixes #4003. 4142 area-System.Globalization System.Globalization tests crashed on Windows "See http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug_prtest/5634/console for more details: ``` d:\j\workspace\dotnet_corefx_windows_debug_prtest\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00110\lib\tests.targets(129,5): warning MSB3073: The command ""CoreRun.exe xunit.console.netcore.exe System.Globalization.Tests.dll -xml testResults.xml -notrait category=nonwindowstests -notrait category=OuterLoop -notrait category=failing "" exited with code -1073741819. [d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Globalization\tests\System.Globalization.Tests.csproj] d:\j\workspace\dotnet_corefx_windows_debug_prtest\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00110\lib\tests.targets(136,5): error : One or more tests failed while running tests from 'System.Globalization.Tests' please check log for details! [d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Globalization\tests\System.Globalization.Tests.csproj] ``` " 4143 area-System.Net Fix TFS integration for WebSockets.Client In https://github.com/dotnet/corefx/blob/master/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/WebSocketHandle.WinRT.cs: ``` // TODO: ** TFS BUILD IS BROKEN ** // This doesn't compile right now due to missing types 'WebErrorStatus' and 'RTWebSocketError' // Commenting out for now to allow the build to resume. //WebErrorStatus status = RTWebSocketError.GetStatus(ex.HResult); //var inner = new Exception(status.ToString(), ex); ``` 4144 area-System.Net Adding TODO issue number to WebSockets.Client Adding TODO tracking issue number (#4143) to fix the NetNative WebSocket.Client contract implementation. 4147 area-System.IO Added explicit reference to Compression in test-runtime DNX is consuming the runtime.json for 4.0.0 and pulling in old versions of CLRCompression that went by a different name. Adding an explicit reference in the common test-runtime project.json to System.IO.Compression resolves this issue until the DNX issue https://github.com/aspnet/dnx/issues/3078 is resolved. This change is to update our CLRCompression to a more recent version that includes the CRC32 function export. @stephentoub @ericstj @bjjones 4148 area-System.Net Unix HttpClient doesn't throw exceptions consistent with Windows/NetNative WCF throws specific exceptions consistent across all transports and platforms that allows developers using WCF to have unified exception handling. For HttpClient, because of lack of an explicit mechanism to indicate the error condition, we have been using HttpRequestException.InnerException.HResult as a consistent way to know what the error was. This was after a discussion with @davidsh and @CIPop about how to achieve this. For the error condition of the specified hostname in the url not resolving, we are expecting the HResult to have a value of 0x80072ee7 (ERROR_INTERNET_NAME_NOT_RESOLVED). With the Unix version of HttpClient, the value being returned is 0x00000006 (ERROR_INVALID_HANDLE). This is causing WCF to not be able to tell what the error condition is and we can't throw the correct exception. Currently we have one other error condition mapped, which is the case where the server sends a reset on the socket while we're receiving data. In this case, we expect an HResult of 0x80072eff (ERROR_INTERNET_CONNECTION_RESET). 4149 area-System.Linq [RC1 blocker] AV in System.Linq.Expressions tests http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst_prtest/3850/console ``` 15:34:41 Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. 15:34:41 at Tests.Expressions.InterpreterTests.Verify(Expression expr) 15:34:41 at Tests.Expressions.InterpreterTests.CompileInterpretCrossCheck_Divide() 15:34:41 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 15:34:41 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 15:34:41 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 15:34:41 at Xunit.Sdk.TestInvoker`1.CallTestMethod(Object testClassInstance) 15:34:41 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.<b__1>d.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.b__1() 15:34:41 at Xunit.Sdk.ExecutionTimer.d__4.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) 15:34:41 at Xunit.Sdk.ExceptionAggregator.d__9.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) 15:34:41 at Xunit.Sdk.TestInvoker`1.d__46.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance) 15:34:41 at Xunit.Sdk.TestInvoker`1.<b__45_0>d.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestInvoker`1.b__45_0() 15:34:41 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 15:34:41 at Xunit.Sdk.XunitTestRunner.d__4.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator) 15:34:41 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 15:34:41 at Xunit.Sdk.TestRunner`1.d__43.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestRunner`1.RunAsync() 15:34:41 at Xunit.Sdk.TestCaseRunner`1.d__19.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestCaseRunner`1.RunAsync() 15:34:41 at Xunit.Sdk.TestMethodRunner`1.d__32.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() 15:34:41 at Xunit.Sdk.TestMethodRunner`1.d__31.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestMethodRunner`1.RunAsync() 15:34:41 at Xunit.Sdk.TestClassRunner`1.d__38.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() 15:34:41 at Xunit.Sdk.TestClassRunner`1.d__37.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestClassRunner`1.RunAsync() 15:34:41 at Xunit.Sdk.TestCollectionRunner`1.d__28.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() 15:34:41 at Xunit.Sdk.TestCollectionRunner`1.d__27.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestCollectionRunner`1.RunAsync() 15:34:41 at System.Threading.Tasks.Task`1.InnerInvoke() 15:34:41 at System.Threading.Tasks.Task.Execute() 15:34:41 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 15:34:41 --- End of inner exception stack trace --- 15:34:41 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 15:34:41 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 15:34:41 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 15:34:41 at Xunit.Sdk.TestInvoker`1.CallTestMethod(Object testClassInstance) 15:34:41 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.<b__1>d.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.b__1() 15:34:41 at Xunit.Sdk.ExecutionTimer.d__4.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) 15:34:41 at Xunit.Sdk.ExceptionAggregator.d__9.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) 15:34:41 at Xunit.Sdk.TestInvoker`1.d__46.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance) 15:34:41 at Xunit.Sdk.TestInvoker`1.<b__45_0>d.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestInvoker`1.b__45_0() 15:34:41 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 15:34:41 at Xunit.Sdk.XunitTestRunner.d__4.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator) 15:34:41 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 15:34:41 at Xunit.Sdk.TestRunner`1.d__43.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestRunner`1.RunAsync() 15:34:41 at Xunit.Sdk.TestCaseRunner`1.d__19.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestCaseRunner`1.RunAsync() 15:34:41 at Xunit.Sdk.TestMethodRunner`1.d__32.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() 15:34:41 at Xunit.Sdk.TestMethodRunner`1.d__31.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestMethodRunner`1.RunAsync() 15:34:41 at Xunit.Sdk.TestClassRunner`1.d__38.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() 15:34:41 at Xunit.Sdk.TestClassRunner`1.d__37.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestClassRunner`1.RunAsync() 15:34:41 at Xunit.Sdk.TestCollectionRunner`1.d__28.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() 15:34:41 at Xunit.Sdk.TestCollectionRunner`1.d__27.MoveNext() 15:34:41 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 15:34:41 at Xunit.Sdk.TestCollectionRunner`1.RunAsync() 15:34:41 at System.Threading.Tasks.Task`1.InnerInvoke() 15:34:41 at System.Threading.Tasks.Task.Execute() 15:34:41 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 15:34:41 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 15:34:41 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 15:34:41 at Xunit.Sdk.MaxConcurrencySyncContext.RunOnSyncContext(SendOrPostCallback callback, Object state) 15:34:41 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 15:34:41 at Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc() 15:34:41 at Xunit.Sdk.XunitWorkerThread.<>c.b__5_0(Object _) 15:34:41 at System.Threading.Tasks.Task.Execute() 15:34:41 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 15:34:41 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 15:34:41 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 15:34:41 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 15:34:42 ./run-test.sh: line 130: 39009 Aborted (core dumped) ./corerun xunit.console.netcore.exe $testDllName -xml testResults.xml -notrait category=failing -notrait category=OuterLoop -notrait category=$xunitOSCategory ``` 4150 area-System.Linq System.Linq.Expression.Invoke not thread safe on lambda argument. "This is a crazy bug that took me awhile to track down. System.Expression.Invoke will modify its lambda argument, making it unsafe if the lambda can be changed in a field updated by another thread. This simple test illustrates the problem: ``` using System; using System.Diagnostics; using System.Linq.Expressions; using System.Threading.Tasks; public class Indirect { public Func DoItA = () => 0; public Func DoItB = () => 0; private int Count = 1; public void Refresh() { { var valueA = DoItA(); var valueB = DoItB(); Debug.Assert(valueA == valueB); } var idx = Count; Count += 1; DoItA = () => idx; DoItB = DoItA; } public static Action Compile(Indirect ind) { var ind0 = Expression.Constant(ind); var fld = Expression.PropertyOrField(ind0, ""DoItA""); var block = Expression.Block(typeof(void), Expression.Invoke(fld)); return (Action)Expression.Lambda(block).Compile(); } public static void DoTest() { var ind = new Indirect(); Task.Run(() => { while (true) ind.Refresh(); }); var act = Compile(ind); Task.Run(() => { while (true) act(); }); } } ``` Note that DoItA and DoItB are apparently only modified by the Refresh call that occurs in the first task forked by DoTest. However, the assertion will eventually fail because the mere invocation of the lambda through a field can cause that field to retain its value even if it is modified by another thread during the invocation! The work around on the user side is to load the field into a temporary variable and invoke on that variable. Not a big deal, but the fact that Expression.Invoke is not thread safe on its lambda argument is not documented...either it should be thread safe (by not storing into its lambda operand argument, which is really unexpected behavior), or it should be documented that it could do this. " 4152 area-Infrastructure Collect EventSource logs in CI system In order to help with investigations related to native failures we should have a way to collect the following from the CI system when a test fails: 1. Full-memory dumps + symbols [edit: covered by #14093] 2. EventSource traces System.Net defines EventSource (ETW) tracing for both production and test code: `*Microsoft-System-Net-Debug` `*Microsoft-System-Net-TestLogging` To investigate issues such as #4037 I would need to enable collection for these two sources as well as memory dump collection. 4153 area-System.Net Increasing test timeout for System.Net.Security (SslStream). Increasing test timeout for System.Net.Security (SslStream). Fix #3845 4154 area-System.Net [release/1.0.0-rc1] Cherry-pick two commits for System.Net.NetworkInformation for x-plat packaging work The two changes here to the System.Net.NetworkInformation project file are needed for our internal packaging build. This lets us build x-plat packages for System.Net.NetworkInformation that are properly divided up and packaged. I've just cherry-picked these two commits from the master branch. 4155 area-System.Net Removing APM and synchronous methods from System.Net.NetworkInformation Removing APM and synchronous methods from System.Net.NetworkInformation Fix #4044 4158 area-System.Net Removing ActiveIssue since the test timeouts have been already increased Removing ActiveIssue since the test timeouts have been already increased Fix #3497 4159 area-System.Net Stub out System.Net.Utilities on Unix This change introduces a Unix build of System.Net.Utilities, with an implementation that simply throws a PlatformNotSupportedException. We'll provide a functioning implementation later. Most of the Ping class can be shared between Windows and Unix. Since there's essentially just two instance methods (InternalSendAsync and InternalDisposeCore) that need differ between Windows and Unix, but which need access to the rest of the state on the Ping instance, I've made Ping a partial class and put those two methods into .Windows.cs and .Unix.cs files. The logic in the Windows implementation is unchanged, other than removing some dead code and cleaning up a few formatting issues. Some of the helper types, e.g. PingReply, had ctors with Windows-specific logic, so I moved those out of the helpers into Ping as platform-specific factories, leaving the helper types to be platform-agnostic. I've put the PR up with the commits that I had as I was going through the changes, but I'll squash them all (along with addressing any feedback) prior to merging. cc: @cipop, @pgavlin, @mellinoe 4161 area-System.Linq Expression compiler - VerificationException: Operation could destabilize the runtime. "Issue occurs when trying to evaluate the following using .Compile(): ``` var p = Expression.Parameter(typeof(TimeSpan).MakeArrayType(1)); var o = Expression.ArrayAccess(p, Expression.Constant(0)); var m = Expression.PropertyOrField(o, ""Ticks""); return Expression.Block(new[] { p }, m); ``` " 4166 area-System.Net Support for http delete method for CurlHandler Update CurlHandler to allow sending Http 'delete' method. Add two test cases for delete 4171 area-System.Net The server returned an invalid or unrecognized response http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_release_prtest/5650/console ``` System.Net.Http.Functional.Tests.PostScenarioTest.PostEmptyContentUsingChunkedEncoding_Success(serverUri: https://corefx-networking.azurewebsites.net/Echo.ashx) [FAIL] System.Net.Http.HttpRequestException : An error occurred while sending the request. ---- System.IO.IOException : The write operation failed, see inner exception. -------- System.Net.Http.WinHttpException : The server returned an invalid or unrecognized response Stack Trace: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Http\tests\FunctionalTests\PostScenarioTest.cs(152,0): at System.Net.Http.Functional.Tests.PostScenarioTest.d__2b.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Http\tests\FunctionalTests\PostScenarioTest.cs(62,0): at System.Net.Http.Functional.Tests.PostScenarioTest.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpRequestStream.cs(160,0): at System.Net.Http.WinHttpRequestStream.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs(1326,0): at System.Net.Http.WinHttpHandler.d__15.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs(847,0): at System.Net.Http.WinHttpHandler.d__5.MoveNext() ----- Inner Stack Trace ----- ``` 4172 area-System.Net Sockets ReceiveMessageFrom.Success test failed in CI on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_release_prtest/5657/console ``` System.Net.Sockets.Tests.ReceiveMessageFrom.Success [FAIL] System.NullReferenceException : Object reference not set to an instance of an object. Stack Trace: d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Sockets\src\System\Net\Sockets\Socket.Windows.cs(100,0): at System.Net.Sockets.Socket.WSARecvMsgBlocking(IntPtr socketHandle, IntPtr msg, Int32& bytesTransferred, IntPtr overlapped, IntPtr completionRoutine) d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Sockets\src\System\Net\Sockets\SocketPal.Windows.cs(315,0): at System.Net.Sockets.SocketPal.ReceiveMessageFrom(Socket socket, SafeCloseSocket handle, Byte[] buffer, Int32 offset, Int32 size, SocketFlags& socketFlags, SocketAddress socketAddress, SocketAddress& receiveAddress, IPPacketInformation& ipPacketInformation, Int32& bytesTransferred) d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs(1714,0): at System.Net.Sockets.Socket.ReceiveMessageFrom(Byte[] buffer, Int32 offset, Int32 size, SocketFlags& socketFlags, EndPoint& remoteEP, IPPacketInformation& ipPacketInformation) d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Sockets.Legacy\tests\FunctionalTests\ReceiveMessageFrom.cs(29,0): at System.Net.Sockets.Tests.ReceiveMessageFrom.Success() ``` 4173 area-System.Net Add self-signed and untrusted root HTTPS tests for HttpClient Both the Windows and X-Plat codebases would benefit from these tests. Negative trust tests are good for verifying that the trust model is being respected, and validating the exceptions being thrown. Additionally, OuterLoop versions which then temporarily add trust for the untrusted root and verify it's then passes are virtuous. Other potential cases of increasing complexity - Target vs SubjectAltName/Subject mismatch - Expired - Revoked - Certificate is invalid for server role (has an EKU extension, but doesn't say ServerAuthentication) - Domain is outside of the issuance scope of the CA 4174 area-System.Linq Expression interpreter - Test some write-back edge cases Creating this issue as a coat hanger for tests related to write-back behavior. 4180 area-System.Net Enable some System.Net tests for OSX/*nix. - The NameResolution functional tests were disabled on all *nixes. - The NameResolution PAL tests have been switched to the more modern style. - The Sockets.Legacy tests were disabled for OS X when using run-test.sh. 4184 area-System.Net Add HttpClient tests to support all HTTP verbs Added tests for validating against all standard and custom HTTP verbs. These tests use the new networking test server. Cosolidated some existing tests that were duplicative. More test porting and reorganzing will be done in later PRs. 4186 area-System.Net Add shim for libcurl version info. Adding a native shim for curl_version_info and removing the managed constants that are no longer needed. @kapilash @nguerrera @sokket @stephentoub 4187 area-System.Net [Linux] SendAsync_SendRequestUsingMethodToEchoServerWithNoContent_MethodCorrectlySent tests fail New tests added in PR #4184 has tests failing on Linux: SendAsync_SendRequestUsingMethodToEchoServerWithNoContent_MethodCorrectlySent() SendAsync_SendRequestUsingMethodToEchoServerWithContent_Success http://dotnet-ci.cloudapp.net/job/dotnet_corefx_prtest/5931/ 4190 area-System.Runtime Add System.String constructors taking sbyte * If you have a lot of code that interops with C strings, chances are that you have used those constructors in the past. Not having them makes code a little bit more complicated to port to CoreCLR. So this would be a nice addition to have. 4191 area-System.Linq Update ref file for System.Linq.Expressions to add Compile overload Seems this was omitted. 4194 area-System.Net Trim response headers in CurlHandler Apply same header response trimming done by WinHttpHandler. Fixes #4187 cc: @kapilash, @davidsh (At some point I'd like to go through and replace all Substring(...).Trim() calls with a more efficient SubstringTrim(...) that doesn't allocate an intermediate string. But in the meantime, this addresses the problem.) 4196 area-System.Linq Lambdas with same signature always have same hash codes "In debugging my last issue (Expression.Invoke not being thread safe), I ran into a problem with code execution in being tell my lambdas apart since they had the same signature; consider: Since the hashcode of f and g is the same, the only way I can tell them apart in the debugger is by (a) executing them, (b) comparing them via equality, or (c) using the IDE's assign ID function. I realize unequal objects can have the same hash code by accident, but I think it is not very useful if unequal objects _always_ have the same hash code, if only for debugging purposes. In normal Windows, a work around is probably to use the hashcode of Method (e.g. f.Method.GetHashCode()), which seems to return a more diverse result. However, in universal Windows, that member isn't available. We could also use the string, but that isn't useful when the lambda is compiled via the DLR. " 4198 area-System.Data Support windows authentication for SqlClient on Xplat Currently Windows Authentication is not supported on Xplat. Explore supporting Windows Authentication using Kerberos on Xplat 4199 area-System.Net Port to RC1: Support for http delete and other methods for CurlHandler Update CurlHandler to allow sending Http 'delete', 'options' and etc Add two test cases for delete Add two test cases for options TRACE should not upload content. 4203 area-System.Net Replace Substring(...).Trim() with SubstringTrim(...) System.Net.WebHeaderCollection already had a SubstringTrim helper that's used instead of Substring(...).Trim() to avoid first creating the substring and then trimming it, instead just offsetting the startIndex and length appropriately to do the Substring and create only one string. I've factored this helper out into Common, cleaned it up a bit, added unit tests for it, and used it in a few more places in System.Net. cc: @ellismg, @davidsh, @cipop (@justinvp, I know you have an outstanding PR that touches one of these locations, though I think that's already needing updates based on other changes that have gone in. Sorry for any additional churn.) 4204 area-System.Net System.Net.Sockets tests crashed in CI on Windows "http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_release_prtest/5725/console ``` Discovering: System.Net.Sockets.Tests Discovered: System.Net.Sockets.Tests Starting: System.Net.Sockets.Tests d:\j\workspace\dotnet_corefx_windows_release_prtest\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00111\lib\tests.targets(129,5): warning MSB3073: The command ""CoreRun.exe xunit.console.netcore.exe System.Net.Sockets.Tests.dll -xml testResults.xml -notrait category=nonwindowstests -notrait category=OuterLoop -notrait category=failing "" exited with code -1073741819. [d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Sockets\tests\FunctionalTests\System.Net.Sockets.Tests.csproj] d:\j\workspace\dotnet_corefx_windows_release_prtest\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00111\lib\tests.targets(136,5): error : One or more tests failed while running tests from 'System.Net.Sockets.Tests' please check log for details! [d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Sockets\tests\FunctionalTests\System.Net.Sockets.Tests.csproj] ``` " 4206 area-System.Net Port to RC1: Fix hang when writing request stream in WinHttpHandler Cherry-pick of #4078 for RC1 4207 area-System.Net Port to RC1: WinHttpHandler Fix POSTs with zero length content Cherry-pick of #4117 for RC1 4208 area-System.IO Make System.IO.Path.NormalizePath public Right now the only way to normalize a path is by calling `GetFullPath`, but this is not always desirable. This could be especially useful since .NET is cross platform now. Thoughts? 4209 area-System.Net Port to RC1: Fix CurlHandler deadlock with synchronous CopyToAsync CurlHandler calls to HttpContext.CopyToAsync with a stream that CopyToAsync should write to asynchronously. If, however, the call to CopyToAsync writes to it synchronously as part of the synchronous call to CopyToAsync, CurlHandler will deadlock. As a precaution, we ensure that the CopyToAsync call is asynchronous from the perspective of CurlHandler. 4213 area-Infrastructure Move non-Windows scripts over to Python To help normalize our helper scripts cross-platform while removing environment dependencies (such as shells), we should switch our non-Windows scripts over from bash scripts to Python scripts. This will remove the Bash dependency (which is a heavy one) and add a Python dependency, which is installed by-default on our supported, non-Windows platforms to date (OS X and Ubuntu). The scripts that need to be changed are: - [ ] build.sh - [ ] run-test.sh - [ ] src/Native/format-code.sh - [ ] src/Native/gen-buildsys-clang.sh /cc @ellismg @mmitche /fyi @janhenke @ghuntley @jasonwilliams200OK 4215 area-Serialization Add implementation and contract change for serialization surrogate Fix #1931 4216 area-System.Net Shim libcurl slist and easy functions Add shims for Interop.libcurl_slist.cs functions. Add shims for libcurl curl_easy_\* functions. @kapilash @vijaykota @nguerrera @sokket @stephentoub @bartonjs 4217 area-System.Net System.Net.Security not found on Linux I installed the runtime version 1.0.0-rc1-16048 on Ubuntu 14.04 and tried to connect to Azure Sql database on Linux When I run the test I receive the error System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. I checked the runtime folder coreCLR and I dont see System.Net.Security.dll in there. Is this a packaging issue? 4218 area-System.Net Add some missing using statements. The lack of these statements was breaking the TFS build. Fixes #4143. 4219 area-System.Console [System.Console] Behavior of piping into a bad/nonexistent program on Unix Right now, if you try to pipe a program's output into a non-existent program on Unix, you will get an IOException on the first call to Console.Write(Line) (and probably other paths): ``` Unhandled Exception: System.IO.IOException: Broken pipe at Interop.CheckIo(Int64 result, String path, Boolean isDirectory, Func`2 errorRewriter) at System.ConsolePal.Write(Int32 fd, Byte[] buffer, Int32 offset, Int32 count) at System.ConsolePal.UnixConsoleStream.Write(Byte[] buffer, Int32 offset, Int32 count) at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder) at System.IO.SyncTextWriter.WriteLine(String value) at System.Console.WriteLine(String value) ``` I chatted with Stephen briefly and we thought that it might be sensible to just ignore this particular exception (in Interop.CheckIO) and allow the program to continue. That is, if we are able to easily detect such a case, and are still able to correctly throw if some other error occurs. How do others feel about this? This seems to be in line with what other programs do if piped into a bad program. 4222 area-System.Runtime Adding ApplicationException and other some other exception types I've been migrating quite a few projects to CoreCLR recently and the lack of ApplicationException is definitely problematic as a lot of existing code is using that type. Using just Exception doesn't sound quite right. Can we have it back in CoreFX? Other exceptions I've seen no present in CoreFX that would also be useful are: - AccessViolationException - EntryPointNotFoundException Thanks, Manu 4223 area-System.Net Update the Trailer Size with the correct value which vaires with the protocol used This is to track the changes needed to update the Trailer size value in StreamSizes with the correct value 4224 area-System.Diagnostics System.Diagnostics.Process missing environment variables. "/cc @Priya91, @pallavit, @joshfree, @stephentoub I am using Process to run a ""Build.cmd"", I have `echo %PATH%`, The result which run by C# is empty, at the same time, I tried add the system env vars again, it still not works. However, I double click the ""Build.cmd"", It can run the correct %PATH% ``` Process = new Process(); WorkingDirectory = FindDirectory(workingDirectory); var fileName = ""cmd.exe""; if (OS.Current != OSType.Windows) { fileName = ""bash""; } var arguments = ""/c build.cmd""; if (OS.Current != OSType.Windows) { arguments = ""./build.sh""; } Process.StartInfo = new ProcessStartInfo { FileName = fileName, Arguments = arguments, UseShellExecute = false, RedirectStandardError = true, RedirectStandardOutput = true, RedirectStandardInput = true, WorkingDirectory = WorkingDirectory }; ``` ... ``` var sysenv = Environment.GetEnvironmentVariables(); foreach(dynamic ev in sysenv) { #if DNXCORE50 if (Process.StartInfo.Environment[ev.Key] != null) Process.StartInfo.Environment[ev.Key] = Process.StartInfo.Environment[ev.Key].TrimEnd(' ').TrimEnd(';') + "";"" + ev.Value; else Process.StartInfo.Environment.Add(ev.Key, ev.Value); #else if (Process.StartInfo.EnvironmentVariables[ev.Key] != null) Process.StartInfo.EnvironmentVariables[ev.Key] = Process.StartInfo.EnvironmentVariables[ev.Key].TrimEnd(' ').TrimEnd(';') + "";"" + ev.Value; else Process.StartInfo.EnvironmentVariables.Add(ev.Key, ev.Value); #endif } ``` " 4227 area-Infrastructure Code coverage broken on Windows "It appears recent buildtools changes result in a corrupted path while trying to invoke OpenCover, causing code coverage to fail with a ""The filename, directory name, or volume label syntax is incorrect."" error. " 4231 area-Infrastructure Native code format checker failing in CI "All PRs are failing with errors like: ``` 06:10:33 [native_code_format_check_prtest] $ cmd /c call /tmp/hudson5140982484119790206.bat 06:10:33 FATAL: command execution failed 06:10:33 java.io.IOException: Cannot run program ""cmd"" (in directory ""/mnt/j/workspace/dotnet_corefx/native_code_format_check_prtest""): error=2, No such file or directory 06:10:33 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047) ``` " 4234 area-System.Data SqlClient cannot connect to server from Linux/OS X SqlConnection.Open() fails to establish a connection from Linux (Ubuntu 14.04) or OS X 10.11 to SQL Server. The error thrown on Linux is > System.Data.SqlClient.SqlException : A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - A call to SSPI failed, see inner exception.) The error thrown on OS X is > System.Data.SqlClient.SqlException : A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server) Using SqlClient 4.0.0-beta-23428 and dnx-coreclr-1.0.0-rc1-16048. SqlConnection works just fine when using dnx-**mono**-1.0.0-rc1-16048 instead. Repro: https://github.com/natemcmaster/test-sqlclient/tree/b2e76a6bcbd3805d8f84696f6d0ec208647d33b2 (change config.json to include connection string). 4237 area-System.Net Added Support for GetChannelBinding() in xplat Added Support for GetChannelBinding() in xplat System.Net.Security - Added support for both EndPoint & Unique type of channel binding. - Validated cbt with what we get with Windows. - corresponding tests passed as well. There is no inbuilt openssl library which gives you channel binding token directly. It have to be framed using basic APIs. 4248 area-System.Net Fixing tests having different behavior We discovered some tests were having a different behavior due to the nondeterministic nature of calling a disposal of a socket that is doing an EndAccept operation in a different thread. Also, the test was incorrectly propagating the expected SocketException coming from the client socket, using the server as an intermediary. Now it's correctly done using a SocketError. Fix #4052 4249 area-System.Reflection Merge master to dev/metadata Reconcile the portable-pdb work that went in to master with additional API review changes. dev/metadata is now a proper superset of master with decoders added. Bump dev S.R.M version to 1.2 Note that the decoders will also go through individual API review/PRs to master, but this puts dev/metadata back in a place where follow-up work on the decoders can be reviewed vs. what we had in dev/metadata so far. 4252 area-System.Net System.Net.NetworkInformation: Use List instead of Collection Avoids unnecessary `Collection` overhead. cc: @CIPop, @mellinoe 4253 area-System.Net Handle CURLE_UNKNOWN_OPTION when registering HTTPS callbacks on older… … versions of curl. Prior to curl 7.39 the case label for CURLOPT_SSL_CTX_FUNCTION was compiled out, resulting in CURLE_UNKNOWN_OPTION. In 7.39 they changed it to always present, but reporting CURLE_NOT_BUILT_IN when the backend SSL provider didn't support that callback. The code was written based on the behavior of curl 7.43, so didn't know about the legacy behavioral difference. Fixes #4233. cc: @stephentoub @eerhardt @kapilash 4254 area-System.Net WinHttpHandler WinHttpResponseStream reads should return back with partial data ".NET Stream.Read() semantics leave it to the implementation to decide how much data to return given a buffer of size N: https://msdn.microsoft.com/en-us/library/system.io.stream.read(v=vs.110).aspx ""An implementation is free to return fewer bytes than requested even if the end of the stream has not been reached."" The behavior of System.Net HTTP APIs (i.e. .NET Framework) are such that stream reads are able to return as soon as data is available. They don't wait until the provided buffer is full. The current WinHttpHandler was not behaving that way because it didn't call WinHttpQueryDataAvailable before calling WinHttpReadData. WinHttpQueryDataAvailable would indicate how many bytes can be read immediately. This fix changes the WinHttpResponseStream.Read\* methods to use WinHttpQueryDataAvailable before calling WinHttpReadData. Added both WinHttpHandler unit tests (helps with simulating/testing network errors) and HttpClientHandler functional tests (which will test x-plat). Fixes #1825 " 4255 area-System.Net WinHttpHandler ResponseStream reads should return back with partial data ".NET Stream.Read() semantics leave it to the implementation to decide how much data to return given a buffer of size N: https://msdn.microsoft.com/en-us/library/system.io.stream.read(v=vs.110).aspx ""An implementation is free to return fewer bytes than requested even if the end of the stream has not been reached."" The behavior of System.Net HTTP APIs (i.e. .NET Framework) are such that stream reads are able to return as soon as data is available. They don't wait until the provided buffer is full. The current WinHttpHandler was not behaving that way because it didn't call WinHttpQueryDataAvailable before calling WinHttpReadData. WinHttpQueryDataAvailable would indicate how many bytes can be read immediately. This fix changes the WinHttpResponseStream.Read\* methods to use WinHttpQueryDataAvailable before calling WinHttpReadData. Added both WinHttpHandler unit tests (helps with simulating/testing network errors) and HttpClientHandler functional tests (which will test x-plat). Fixes #1825 " 4256 area-System.Net [System.Net.NetworkInformation] Address performance to-do markers "Contains a few changes based on the perf markers I left in the code. - I made it optional to pass in callbacks to the Interop.Sys.EnumerateInterfaceAddresses function. In the new usages, I don't need to know about the link-layer addresses, so I don't pass a callback for them. - I pulled out two common methods into an IPAddressUtil class for use when dealing with Interop.SysEnumerateInterfaceAddresses. - The implemention for GetUnicastAddresses(Async) is the same for Linux and OSX, so I've created a ""UnixIPGlobalProperties"" base class that implements that method for both operating systems. - There was an additional marker regarding using sysctl to query the machine's address count. Looking at it again, I don't think it's actually worth bothering. All we are doing instead is adding up the number of addresses from the list of interfaces we already have. It's probably faster than PInvoking for a single number. Addresses the first part of #4060. " 4257 area-Serialization Port to RC1: Add implementation and contract change for serialization surrogate PR for serialization surrogate targeting 1.0.0.rc1 branch. Merge pull request #4215 from khdang/add_serialization_surrogate 4259 area-System.Net [Linux] HttpClient test SendAsync_ReadFromSlowStreamingServer_PartialDataReturned failed "Reference new PR #4255 Build: http://dotnet-ci.cloudapp.net/job/dotnet_corefx_prtest/6065/ New test added: test failed on Linux: System.Net.Http.Functional.Tests.HttpClientHandlerTest.SendAsync_ReadFromSlowStreamingServer_PartialDataReturned ""bytesRead should be less than buffer.Length Expected: True Actual: False"" " 4261 area-Infrastructure Build failure on OSX "Building from root fails on OSX with 7 errors related to GenFacades. A sample is below > /Users/kapilash/src/corefx/packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00112/lib/partialfacades.targets(180,5): error MSB3073: The command """"/Users/kapilash/src/corefx/bin/obj/OSX.AnyCPU.Debug/ToolRuntime/corerun"" ""/Users/kapilash/src/corefx/packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00112/lib/GenFacades.exe"" -partialFacadeAssemblyPath:""/Users/kapilash/src/corefx/bin/obj/OSX.AnyCPU.Debug/System.Reflection.TypeExtensions.CoreCLR/PreGenFacades/System.Reflection.TypeExtensions.dll"" -contracts:""/Users/kapilash/src/corefx/packages/System.Reflection.TypeExtensions/4.1.0-beta-23429/ref/dotnet5.1/System.Reflection.TypeExtensions.dll"" -seeds:""/Users/kapilash/src/corefx/packages/Microsoft.DotNet.CoreCLR/1.0.5-prerelease/lib/dnxcore50/mscorlib.dll"" -facadePath:""/Users/kapilash/src/corefx/bin/obj/OSX.AnyCPU.Debug/System.Reflection.TypeExtensions.CoreCLR/"" -producePdb:false"" exited with code 255. [/Users/kapilash/src/corefx/src/System.Reflection.TypeExtensions/src/System.Reflection.TypeExtensions.CoreCLR.csproj] It seems the problem is the presence of the [file called mscorlib.ni.dll](https://github.com/dotnet/coreclr/issues/1419#issuecomment-134156283). Removing that from `$HOME/bin/obj/OSX.AnyCPU.Debug/ToolRuntime` fixes the build failure. " 4262 area-System.Net Remove obsolete TODOs from xplat SslStream code This includes removing TODOs from the places which are already investigated and fixed . There are few places where TODO was kept but after investigation no changes needed. At few places updated the TODO with new issue id where we have scope to further investigate and fix. 4263 area-System.Net Enabling System.Net.Security tests in Linux Enabled the tests to run on Linux . Marked all ssl2 related tests to run on windows only as Openssl doesn't allow ssl2 .. 4267 area-System.Net Add shims for libcurl multi_* functions. Adding shims for all of the libcurl multi_\* functions. I was able to remove all of the structs being used. There is only 1 place left to shim for libcurl, and it is a little tricky. Libcurl has some callback functions that use 'size_t' and 'long' in their signatures. To shim this, I will need to add some native 'thunk' functions that will do the marshalling between size_t and long to the managed stable signature. This will be my next task. @bartonjs @stephentoub @nguerrera @sokket @vijaykota @kapilash @shrutigarg 4268 area-System.Net Implement GetEnumerator for InternalIPAddressCollection "Right now, there's a bit of a mix-up with this type/method. Both the Windows and x-plat libraries use this type to return IPAddress collections. The base class (IPAddressCollection) throws a NotImplemented exception for the GetEnumerator method, which is not overridden here in System.Net.NetworkInformation. The Windows tests are not catching this issue because they are running against the ""System.Private.Networking"" version of System.Net.Primitives, which DOES implement the enumerator. This change just adds a very simple overload for GetEnumerator which defers to the wrapped List. " 4272 area-System.Net [NetworkInformation] Add basic API surface tests for Linux, OSX I've copied out the existing tests that Windows uses, which log all of the properties available on various types in the library, to separate versions for Linux and OSX. For those properties that aren't supported on Linux or OSX, I instead assert that a PlatformNotSupportedException is thrown. Although this doesn't give us guarantees about the results of those methods, it does let us know if they have stopped working altogether. One issue I discovered was that UnixUnicastIPAddressInformation was throwing a NotImplementedException (from the base class) rather than a PlatformNotSupportedException. I've fixed this as well. 4273 area-System.Data 28% of SqlClient connections on OSX/Linux break On Linux, calls to `SqlCommand.ExecuteReader` often die due to a broken connection. Ubuntu 14.04, CoreCLR rc1 System.Data.SqlClient build 23429 These failures are nondeterministic, and do not appear on Windows. ``` Microsoft.Data.Entity.SqlServer.FunctionalTests.DataAnnotationSqlServerTest.TimestampAttribute_throws_if_value_in_database_changed [FAIL] Microsoft.Data.Entity.DbUpdateException : An error occurred while updating the entries. See the inner exception for details. ---- System.Data.SqlClient.SqlException : The connection is broken and recovery is not possible. The connection is marked by the server as unrecoverable. No attempt was made to restore the connection. ----- Inner Stack Trace ----- at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.SqlConnection.ValidateAndReconnect(Action beforeDisconnect, Int32 timeout) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) ``` Calls to `ExecuteNonQuery` often fail with this error: ``` System.Data.SqlClient.SqlException : A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - Connection was terminated) A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - Connection was terminated) Stack Trace: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error) at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync() at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket() at System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer() at System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() ``` or with a similar variant that has this error: ``` (provider: TCP Provider, error: 0 - Unable to read data from the transport connection: Unknown error 10054.) ``` Repeated runs of one test do not always fail, but it does not take high load to produce the error. This error consistently reproduces at some point when running the all tests in EntityFramework ([code here](https://github.com/aspnet/EntityFramework/tree/release/test/EntityFramework.MicrosoftSqlServer.FunctionalTests)). I can create a simplified repro project if necessary. Full test log here: [sqlserver-functionaltests.log](https://gist.githubusercontent.com/natemcmaster/13532755aeeee6a53ccb/raw/259802c7a4e6fd182e0e0bf5a86d04392eba8dad/sqlserver-functionaltests.log) 4274 area-System.IO Path.GetDirectoryName removes necessary relative paths "`Path.GetDirectoryName(@""..\..\files.txt"")` returns an empty string instead of `..\..` This breaks stories such as ""write a new file in the same directory as another specific file"" " 4275 area-System.Net Merge changes from TFS 4276 area-System.Net Optimize delegate allocations in SocketTaskExtensions Fixes #4052 If you have plans to eliminate Begin/End in short terms feel free to close PR :smile: 4277 area-System.Net HttpWebRequest request stream WriteAsync, FlushAsync overrides This was a prior TODO from PR #2386. Added overrides for Stream's WriteAsync and FlushAync methods. As the request stream is a memory stream, it'll perform the operations synchronously anyways. Whereas if these methods remain not overridden, it'll default to the base stream's implementation which will queue work items that just call Write and Flush, respectively. So, this improves performance a little bit by not having to queue work items. Added tests for RequestStream class that is returned via the HttpWebRequest.GetRequstStream\* methods. 4278 area-System.Security Add System.Security.Cryptography.Xml.SignedXml class ## Execution plan **Goal:** Provide APIs fully compatible with full/Desktop .NET Framework (no changes as part of this work - straight port only) **Plan:** - [x] 1. Add the source code on GH sanitized, with licenses, etc. (it won't build) - [x] 2. Make the source code build (still excluded from overall repo build) - [x] 3. Remove Desktop registry-compat code paths - Remove methods that have [RegistryPermission] (Utils and SignedXml classes) along with any owned methods - Address any other registry-related compile errors such as those using Registry, RegistryPermission, RegistryKey, etc (delete code as necessary) - [x] 4. Add tests (We have to agree on expected code coverage and how much of the spec we have to cover) - Compare test results between Desktop and .NET Core implementations - [x] 5. Make it part of overall repo build & ship it! Code changes rules: **Only code changes absolutely necessary** to make it build and compatible with (full) .NET Framework are allowed, no additional bug fixes or changing architecture - such PRs will be rejected now. Changes like that can be considered after the initial port is done, when we have a good test bed and when we are able to validate such change. If larger code/architecture changes are needed from some reason, we should discuss them first here, before doing the work / submitting PR. If you work on some parts of the plan, please say so in the discussion to avoid duplicated work. We (@steveharter @karelz) will co-assign the issue to you. --------------------------------------------------------- ## Original The class to digitally sign XML needs to be added. 4279 area-System.Net Please provide inline authorization support for HttpClient Hi, The [`HttpClient`](https://github.com/dotnet/corefx/blob/c02d33b18398199f6acc17d375dab154e9a1df66/src/System.Net.Http/src/System/Net/Http/HttpClient.cs) facility is amazing. However, it lacks OO support for authentication and authorization. There should be a way to set a few properties (like `ClientId`, `SecretId`, `AuthenticationType`, `UserName` and `Password` etc.), and once the `HttpClient` is initialized with authentication, it should internally keep track of its authentication state, token expiry, refresh tokens, and all that. 4282 area-System.Diagnostics On OSX, launching a non existent process looks for Windows specific DllImport ``` Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'api-ms-win-core-errorhandling-l1-1-0.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) at Interop.mincore.SetErrorMode(UInt32 newMode) at System.IO.Win32FileSystem.FillAttributeInfo(String path, WIN32_FILE_ATTRIBUTE_DATA& data, Boolean tryagain, Boolean returnErrorOnNotFound) at System.IO.Win32FileSystem.FileExists(String fullPath) at System.IO.File.Exists(String path) at System.Diagnostics.Process.ResolvePath(String filename) at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at Program.Main() ``` /cc @stephentoub 4283 area-System.Diagnostics [RC1] Avoid hang related to System.Diagnostics.Process and shutdown #4269 We need to port PR #4269 to RC1 4284 area-Serialization Fix the header of DataContractSurrogateCaller.cs Update the header of file below to be under MIT license System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSurrogateCaller.cs 4285 area-System.Net [NetworkInformation] Address remaining code issues and general code cleanup @CIPop I went through and tried to address all of the feedback you left on the original PR to bring the code into corefx. I also did some general cleanup and formatting, and fixed up things like the XML doc comments, etc. Here's a list of the things I did: - Attempted to normalize the formatting of properties (single-line properties for trivial getters) - Added missing newlines - Normalized exception messages and exception throwing behavior in the library, particularly around string parsing errors, and PInvoke errors encountered when calling to System.Native. - Re-formatted existing comments into XML documentation comments in variety of shared files. I also removed some redundant comments from derived classes when the parent class already has the comment in place. - Deleted some dead code and some unused files from previous work-in-progress states 4286 area-System.Net Port to RC1: WinHttpHandler ResponseStream reads should return back with partial data Cherry-pick of #4255 for RC1 4288 area-System.Net CoreFx builds failing with undeclared identifier - CURLM_ADDED_ALREADY "I've just started this failure in CoreFx builds on CentOS 7.1.1503 This is with libcurl version 7.29.0 See PR #4267 2015-11-02T18:00:27.683Z: [ 12%] Building C object System.Security.Cryptography.Native/CMakeFiles/System.Security.Cryptography.Native.dir/openssl.c.o 2015-11-02T18:00:27.772Z: error: use of undeclared identifier 'CURLM_ADDED_ALREADY'; did you mean 'PAL_CURLM_ADDED_ALREADY'? 2015-11-02T18:00:27.772Z: static_assert(PAL_CURLM_ADDED_ALREADY == CURLM_ADDED_ALREADY, """"); 2015-11-02T18:00:27.773Z: ^~~~~~~~~~~~~~~~~~~ 2015-11-02T18:00:27.773Z: PAL_CURLM_ADDED_ALREADY 2015-11-02T18:00:27.773Z: /root/corefx/src/Native/System.Net.Http.Native/pal_multi.h:19:5: note: 'PAL_CURLM_ADDED_ALREADY' declared here 2015-11-02T18:00:27.773Z: PAL_CURLM_ADDED_ALREADY = 7, 2015-11-02T18:00:27.773Z: ^ 2015-11-02T18:00:27.780Z: 1 error generated. 2015-11-02T18:00:27.782Z: make[2]: **\* [System.Net.Http.Native/CMakeFiles/System.Net.Http.Native.dir/pal_multi.cpp.o] Error 1 " 4289 area-System.Reflection The System.Reflection.Emit.ILGeneration contract contains APM-style async APIs Consider replacing Begin/End APM-style APIs with TPL Task-Async APIs: ``` C# public virtual void BeginCatchBlock(System.Type exceptionType) { } public virtual void BeginExceptFilterBlock() { } public virtual System.Reflection.Emit.Label BeginExceptionBlock() { return default(System.Reflection.Emit.Label); } public virtual void BeginFaultBlock() { } public virtual void BeginFinallyBlock() { } public virtual void BeginScope() { } public virtual void EndExceptionBlock() { } public virtual void EndScope() { } ``` 4290 area-System.Net Optimize Task Extension Methods Calling directly all begin methods to avoid delegate allocations which improves the performance overall. Fix #4052 4291 area-Serialization Header and formatting changes for serialization Fix #4284 cc: @shmao @SGuyGe 4293 area-System.Net Fixing Debug code to do proper snapshot isolation of the ref-count variable Adding snapshot isolation to debugging ref-count code to avoid a race condition with SafeCloseSocket.Dispose() or .CloseAsIs(). Fix #4204 Validated that the original setup: VM with 2 CPUs and 8 instances of the same test. @josguil @davidsh @pgavlin PTAL 4295 area-System.Net Enabling ChannelBinding testcase in Unix Channel binding implementation has been added by Rajan , so enabling the testcase , 4297 area-System.Net Fix FakeNetworkStream to remove direct Fix DoNetworkRead() use fix for the issue #3802 4298 area-System.Linq Expression.Loop doesn't check against reference equal break and continue labels Fails to compile with non-obvious error. Factory should likely check against this. 4299 area-System.IO BufferedStream should have a leaveOpen constructor [Migrated issue https://github.com/dotnet/coreclr/issues/1825 on behalf of @redknightlois] Currently the BufferedStream class doesnt have such a constructor, while there are many others that are intended to be chained like GZipStream do have it. 4301 area-System.Net 21 System.Net.Security tests failing on OS X ``` 03:30:45 Starting: System.Net.Security.Tests 03:30:46 ---- DEBUG ASSERTION FAILED ---- 03:30:46 ---- Assert Short Message ---- 03:30:46 Exception Caught. - Interop+OpenSsl+SslException: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher ---> Interop+Crypto+OpenSslCryptographicException: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher 03:30:46 --- End of inner exception stack trace --- 03:30:46 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 03:30:46 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:46 ---- Assert Long Message ---- 03:30:46 03:30:46 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:46 at System.Environment.get_StackTrace() 03:30:46 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:46 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:46 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 03:30:46 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:46 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:46 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:46 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:46 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 03:30:46 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 03:30:46 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 03:30:46 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 03:30:46 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 03:30:46 at System.Threading.Tasks.Task.Execute() 03:30:46 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:46 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:46 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:46 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:46 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:46 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 03:30:46 at System.Threading.Tasks.Task.FinishContinuations() 03:30:46 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 03:30:46 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:46 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:46 at System.Threading.ThreadPoolWorkQueue.Dispatch() 03:30:46 System.Net.Security.Tests.ServerNoEncryptionTest.ServerNoEncryption_ClientAllowNoEncryption_ConnectWithNoEncryption [FAIL] 03:30:46 System.DllNotFoundException : Unable to load DLL 'libcurl.so.4': The specified module could not be found. 03:30:46 (Exception from HRESULT: 0x8007007E) 03:30:46 ---- DEBUG ASSERTION FAILED ---- 03:30:46 ---- Assert Short Message ---- 03:30:46 Exception Caught. - Interop+OpenSsl+SslException: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher ---> Interop+Crypto+OpenSslCryptographicException: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher 03:30:46 --- End of inner exception stack trace --- 03:30:46 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 03:30:46 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:46 ---- Assert Long Message ---- 03:30:46 03:30:46 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:46 at System.Environment.get_StackTrace() 03:30:46 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:46 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:46 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 03:30:46 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:46 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:46 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:46 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:46 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 03:30:46 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 03:30:46 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 03:30:46 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 03:30:47 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 03:30:47 at System.Threading.Tasks.Task.FinishContinuations() 03:30:47 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.ThreadPoolWorkQueue.Dispatch() 03:30:47 Stack Trace: 03:30:47 ---- DEBUG ASSERTION FAILED ---- 03:30:47 ---- Assert Short Message ---- 03:30:47 Exception Caught. - Interop+OpenSsl+SslException: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher ---> Interop+Crypto+OpenSslCryptographicException: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher 03:30:47 --- End of inner exception stack trace --- 03:30:47 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 ---- Assert Long Message ---- 03:30:47 03:30:47 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:47 at System.Environment.get_StackTrace() 03:30:47 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:47 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 03:30:47 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 03:30:47 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 03:30:47 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 03:30:47 at System.Threading.Tasks.Task.FinishContinuations() 03:30:47 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.ThreadPoolWorkQueue.Dispatch() 03:30:47 ---- DEBUG ASSERTION FAILED ---- 03:30:47 ---- Assert Short Message ---- 03:30:47 Exception Caught. - Interop+OpenSsl+SslException: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher ---> Interop+Crypto+OpenSslCryptographicException: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher 03:30:47 --- End of inner exception stack trace --- 03:30:47 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 ---- Assert Long Message ---- 03:30:47 03:30:47 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:47 at System.Environment.get_StackTrace() 03:30:47 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:47 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 03:30:47 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 03:30:47 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 03:30:47 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 03:30:47 at System.Threading.Tasks.Task.FinishContinuations() 03:30:47 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.ThreadPoolWorkQueue.Dispatch() 03:30:47 ---- DEBUG ASSERTION FAILED ---- 03:30:47 ---- Assert Short Message ---- 03:30:47 Exception Caught. - Interop+OpenSsl+SslException: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol ---> Interop+Crypto+OpenSslCryptographicException: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol 03:30:47 --- End of inner exception stack trace --- 03:30:47 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 ---- Assert Long Message ---- 03:30:47 03:30:47 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:47 at System.Environment.get_StackTrace() 03:30:47 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:47 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 03:30:47 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 03:30:47 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 03:30:47 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 03:30:47 at System.Threading.Tasks.Task.FinishContinuations() 03:30:47 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.ThreadPoolWorkQueue.Dispatch() 03:30:47 ---- DEBUG ASSERTION FAILED ---- 03:30:47 ---- Assert Short Message ---- 03:30:47 Exception Caught. - Interop+OpenSsl+SslException: error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version number ---> Interop+Crypto+OpenSslCryptographicException: error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version number 03:30:47 --- End of inner exception stack trace --- 03:30:47 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 ---- Assert Long Message ---- 03:30:47 03:30:47 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:47 at System.Environment.get_StackTrace() 03:30:47 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:47 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 03:30:47 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 03:30:47 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 03:30:47 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 03:30:47 at System.Threading.Tasks.Task.FinishContinuations() 03:30:47 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.ThreadPoolWorkQueue.Dispatch() 03:30:47 ---- DEBUG ASSERTION FAILED ---- 03:30:47 ---- Assert Short Message ---- 03:30:47 Exception Caught. - Interop+OpenSsl+SslException: Failed to get SSL method 'TLSv1_1_method'. Ensure the OpenSSL method exists on the current system. 03:30:47 at Interop.OpenSsl.GetSslMethod(SslProtocols protocols) 03:30:47 at Interop.OpenSsl.AllocateSslContext(SslProtocols protocols, SafeX509Handle certHandle, SafeEvpPKeyHandle certKeyHandle, EncryptionPolicy policy, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SafeDeleteContext..ctor(SafeFreeCredentials credential, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 ---- Assert Long Message ---- 03:30:47 03:30:47 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:47 at System.Environment.get_StackTrace() 03:30:47 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:47 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 03:30:47 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 03:30:47 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 03:30:47 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 03:30:47 at System.Threading.Tasks.Task.FinishContinuations() 03:30:47 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.ThreadPoolWorkQueue.Dispatch() 03:30:47 ---- DEBUG ASSERTION FAILED ---- 03:30:47 ---- Assert Short Message ---- 03:30:47 Exception Caught. - Interop+OpenSsl+SslException: Failed to get SSL method 'TLSv1_2_method'. Ensure the OpenSSL method exists on the current system. 03:30:47 at Interop.OpenSsl.GetSslMethod(SslProtocols protocols) 03:30:47 at Interop.OpenSsl.AllocateSslContext(SslProtocols protocols, SafeX509Handle certHandle, SafeEvpPKeyHandle certKeyHandle, EncryptionPolicy policy, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SafeDeleteContext..ctor(SafeFreeCredentials credential, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 ---- Assert Long Message ---- 03:30:47 03:30:47 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:47 at System.Environment.get_StackTrace() 03:30:47 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:47 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 03:30:47 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 03:30:47 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 03:30:47 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 03:30:47 at System.Threading.Tasks.Task.FinishContinuations() 03:30:47 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.ThreadPoolWorkQueue.Dispatch() 03:30:47 ---- DEBUG ASSERTION FAILED ---- 03:30:47 ---- Assert Short Message ---- 03:30:47 Exception Caught. - Interop+OpenSsl+SslException: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol ---> Interop+Crypto+OpenSslCryptographicException: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol 03:30:47 --- End of inner exception stack trace --- 03:30:47 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 ---- Assert Long Message ---- 03:30:47 03:30:47 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:47 at System.Environment.get_StackTrace() 03:30:47 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:47 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 03:30:47 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 03:30:47 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 03:30:47 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 03:30:47 at System.Threading.Tasks.Task.FinishContinuations() 03:30:47 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.ThreadPoolWorkQueue.Dispatch() 03:30:47 ---- DEBUG ASSERTION FAILED ---- 03:30:47 ---- Assert Short Message ---- 03:30:47 Exception Caught. - Interop+OpenSsl+SslException: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number ---> Interop+Crypto+OpenSslCryptographicException: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number 03:30:47 --- End of inner exception stack trace --- 03:30:47 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 ---- Assert Long Message ---- 03:30:47 03:30:47 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:47 at System.Environment.get_StackTrace() 03:30:47 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.InitializeSecurityContext(SafeFreeCredentials credential, SafeDeleteContext& context, String targetName, SecurityBuffer[] inputBuffers, SecurityBuffer outputBuffer) 03:30:47 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:47 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 03:30:47 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 03:30:47 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 03:30:47 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 03:30:47 at System.Threading.Tasks.Task.FinishContinuations() 03:30:47 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.ThreadPoolWorkQueue.Dispatch() 03:30:47 ---- DEBUG ASSERTION FAILED ---- 03:30:47 ---- Assert Short Message ---- 03:30:47 Exception Caught. - Interop+OpenSsl+SslException: Failed to get SSL method 'TLSv1_1_method'. Ensure the OpenSSL method exists on the current system. 03:30:47 at Interop.OpenSsl.GetSslMethod(SslProtocols protocols) 03:30:47 at Interop.OpenSsl.AllocateSslContext(SslProtocols protocols, SafeX509Handle certHandle, SafeEvpPKeyHandle certKeyHandle, EncryptionPolicy policy, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SafeDeleteContext..ctor(SafeFreeCredentials credential, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 ---- Assert Long Message ---- 03:30:47 03:30:47 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:47 at System.Environment.get_StackTrace() 03:30:47 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:47 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 03:30:47 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 03:30:47 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 03:30:47 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 03:30:47 at System.Threading.Tasks.Task.FinishContinuations() 03:30:47 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.ThreadPoolWorkQueue.Dispatch() 03:30:47 ---- DEBUG ASSERTION FAILED ---- 03:30:47 ---- Assert Short Message ---- 03:30:47 Exception Caught. - Interop+OpenSsl+SslException: Failed to get SSL method 'TLSv1_2_method'. Ensure the OpenSSL method exists on the current system. 03:30:47 at Interop.OpenSsl.GetSslMethod(SslProtocols protocols) 03:30:47 at Interop.OpenSsl.AllocateSslContext(SslProtocols protocols, SafeX509Handle certHandle, SafeEvpPKeyHandle certKeyHandle, EncryptionPolicy policy, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SafeDeleteContext..ctor(SafeFreeCredentials credential, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 ---- Assert Long Message ---- 03:30:47 03:30:47 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:47 at System.Environment.get_StackTrace() 03:30:47 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:47 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 03:30:47 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 03:30:47 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 03:30:47 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 03:30:47 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 03:30:47 at System.Threading.Tasks.Task.FinishContinuations() 03:30:47 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.ThreadPoolWorkQueue.Dispatch() 03:30:47 ---- DEBUG ASSERTION FAILED ---- 03:30:47 ---- Assert Short Message ---- 03:30:47 Exception Caught. - Interop+OpenSsl+SslException: Failed to get SSL method 'TLSv1_1_method'. Ensure the OpenSSL method exists on the current system. 03:30:47 at Interop.OpenSsl.GetSslMethod(SslProtocols protocols) 03:30:47 at Interop.OpenSsl.AllocateSslContext(SslProtocols protocols, SafeX509Handle certHandle, SafeEvpPKeyHandle certKeyHandle, EncryptionPolicy policy, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SafeDeleteContext..ctor(SafeFreeCredentials credential, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 ---- Assert Long Message ---- 03:30:47 03:30:47 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:47 at System.Environment.get_StackTrace() 03:30:47 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.InitializeSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, String targetName, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer) 03:30:47 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:47 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.BeginAuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.SslStream.<>c__DisplayClass1.b__0(AsyncCallback callback, Object state) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions) 03:30:47 at System.Threading.Tasks.TaskFactory.FromAsync(Func`3 beginMethod, Action`1 endMethod, Object state) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClientAsync(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.SslStreamAPMExtensions.BeginAuthenticateAsClient(SslStream s, String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy, SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.<>c__DisplayClassb.b__a() 03:30:47 at Xunit.Assert.RecordException(Action testCode) 03:30:47 at Xunit.Assert.Throws(Type exceptionType, Action testCode) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_MismatchProtocols_Fails(SslProtocols server, SslProtocols client, Type expected) 03:30:47 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 03:30:47 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 03:30:47 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 03:30:47 at Xunit.Sdk.TestInvoker`1.CallTestMethod(Object testClassInstance) 03:30:47 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.<b__1>d.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.b__1() 03:30:47 at Xunit.Sdk.ExecutionTimer.d__4.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__9.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) 03:30:47 at Xunit.Sdk.TestInvoker`1.d__46.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance) 03:30:47 at Xunit.Sdk.TestInvoker`1.<b__45_0>d.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.b__45_0() 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 03:30:47 at Xunit.Sdk.XunitTestRunner.d__4.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator) 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 03:30:47 at Xunit.Sdk.TestRunner`1.d__43.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.XunitTheoryTestCaseRunner.d__9.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.XunitTheoryTestCaseRunner.RunTestAsync() 03:30:47 at Xunit.Sdk.TestCaseRunner`1.d__19.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCaseRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestMethodRunner`1.d__32.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() 03:30:47 at Xunit.Sdk.TestMethodRunner`1.d__31.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestMethodRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestClassRunner`1.d__38.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() 03:30:47 at Xunit.Sdk.TestClassRunner`1.d__37.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestClassRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.d__28.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.d__27.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.RunAsync() 03:30:47 at System.Threading.Tasks.Task`1.InnerInvoke() 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at Xunit.Sdk.MaxConcurrencySyncContext.RunOnSyncContext(SendOrPostCallback callback, Object state) 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc() 03:30:47 at Xunit.Sdk.XunitWorkerThread.<>c.b__5_0(Object _) 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 ---- DEBUG ASSERTION FAILED ---- 03:30:47 ---- Assert Short Message ---- 03:30:47 Exception Caught. - Interop+OpenSsl+SslException: Failed to get SSL method 'TLSv1_1_method'. Ensure the OpenSSL method exists on the current system. 03:30:47 at Interop.OpenSsl.GetSslMethod(SslProtocols protocols) 03:30:47 at Interop.OpenSsl.AllocateSslContext(SslProtocols protocols, SafeX509Handle certHandle, SafeEvpPKeyHandle certKeyHandle, EncryptionPolicy policy, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SafeDeleteContext..ctor(SafeFreeCredentials credential, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 ---- Assert Long Message ---- 03:30:47 03:30:47 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:47 at System.Environment.get_StackTrace() 03:30:47 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.InitializeSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, String targetName, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer) 03:30:47 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:47 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.BeginAuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.SslStream.<>c__DisplayClass1.b__0(AsyncCallback callback, Object state) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions) 03:30:47 at System.Threading.Tasks.TaskFactory.FromAsync(Func`3 beginMethod, Action`1 endMethod, Object state) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClientAsync(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.SslStreamAPMExtensions.BeginAuthenticateAsClient(SslStream s, String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy, SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.<>c__DisplayClassb.b__a() 03:30:47 at Xunit.Assert.RecordException(Action testCode) 03:30:47 at Xunit.Assert.Throws(Type exceptionType, Action testCode) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_MismatchProtocols_Fails(SslProtocols server, SslProtocols client, Type expected) 03:30:47 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 03:30:47 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 03:30:47 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 03:30:47 at Xunit.Sdk.TestInvoker`1.CallTestMethod(Object testClassInstance) 03:30:47 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.<b__1>d.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.b__1() 03:30:47 at Xunit.Sdk.ExecutionTimer.d__4.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__9.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) 03:30:47 at Xunit.Sdk.TestInvoker`1.d__46.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance) 03:30:47 at Xunit.Sdk.TestInvoker`1.<b__45_0>d.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.b__45_0() 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 03:30:47 at Xunit.Sdk.XunitTestRunner.d__4.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator) 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 03:30:47 at Xunit.Sdk.TestRunner`1.d__43.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.XunitTheoryTestCaseRunner.d__9.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.XunitTheoryTestCaseRunner.RunTestAsync() 03:30:47 at Xunit.Sdk.TestCaseRunner`1.d__19.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCaseRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestMethodRunner`1.d__32.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() 03:30:47 at Xunit.Sdk.TestMethodRunner`1.d__31.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestMethodRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestClassRunner`1.d__38.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() 03:30:47 at Xunit.Sdk.TestClassRunner`1.d__37.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestClassRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.d__28.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.d__27.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.RunAsync() 03:30:47 at System.Threading.Tasks.Task`1.InnerInvoke() 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at Xunit.Sdk.MaxConcurrencySyncContext.RunOnSyncContext(SendOrPostCallback callback, Object state) 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc() 03:30:47 at Xunit.Sdk.XunitWorkerThread.<>c.b__5_0(Object _) 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 ---- DEBUG ASSERTION FAILED ---- 03:30:47 ---- Assert Short Message ---- 03:30:47 Exception Caught. - Interop+OpenSsl+SslException: Failed to get SSL method 'TLSv1_1_method'. Ensure the OpenSSL method exists on the current system. 03:30:47 at Interop.OpenSsl.GetSslMethod(SslProtocols protocols) 03:30:47 at Interop.OpenSsl.AllocateSslContext(SslProtocols protocols, SafeX509Handle certHandle, SafeEvpPKeyHandle certKeyHandle, EncryptionPolicy policy, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SafeDeleteContext..ctor(SafeFreeCredentials credential, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 ---- Assert Long Message ---- 03:30:47 03:30:47 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:47 at System.Environment.get_StackTrace() 03:30:47 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.InitializeSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, String targetName, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer) 03:30:47 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:47 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.BeginAuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.SslStream.<>c__DisplayClass1.b__0(AsyncCallback callback, Object state) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions) 03:30:47 at System.Threading.Tasks.TaskFactory.FromAsync(Func`3 beginMethod, Action`1 endMethod, Object state) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClientAsync(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.SslStreamAPMExtensions.BeginAuthenticateAsClient(SslStream s, String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy, SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.<>c__DisplayClassb.b__a() 03:30:47 at Xunit.Assert.RecordException(Action testCode) 03:30:47 at Xunit.Assert.Throws(Type exceptionType, Action testCode) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_MismatchProtocols_Fails(SslProtocols server, SslProtocols client, Type expected) 03:30:47 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 03:30:47 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 03:30:47 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 03:30:47 at Xunit.Sdk.TestInvoker`1.CallTestMethod(Object testClassInstance) 03:30:47 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.<b__1>d.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.b__1() 03:30:47 at Xunit.Sdk.ExecutionTimer.d__4.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__9.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) 03:30:47 at Xunit.Sdk.TestInvoker`1.d__46.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance) 03:30:47 at Xunit.Sdk.TestInvoker`1.<b__45_0>d.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.b__45_0() 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 03:30:47 at Xunit.Sdk.XunitTestRunner.d__4.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator) 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 03:30:47 at Xunit.Sdk.TestRunner`1.d__43.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.XunitTheoryTestCaseRunner.d__9.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.XunitTheoryTestCaseRunner.RunTestAsync() 03:30:47 at Xunit.Sdk.TestCaseRunner`1.d__19.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCaseRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestMethodRunner`1.d__32.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() 03:30:47 at Xunit.Sdk.TestMethodRunner`1.d__31.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestMethodRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestClassRunner`1.d__38.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() 03:30:47 at Xunit.Sdk.TestClassRunner`1.d__37.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestClassRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.d__28.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.d__27.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.RunAsync() 03:30:47 at System.Threading.Tasks.Task`1.InnerInvoke() 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at Xunit.Sdk.MaxConcurrencySyncContext.RunOnSyncContext(SendOrPostCallback callback, Object state) 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc() 03:30:47 at Xunit.Sdk.XunitWorkerThread.<>c.b__5_0(Object _) 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 ---- DEBUG ASSERTION FAILED ---- 03:30:47 ---- Assert Short Message ---- 03:30:47 Exception Caught. - Interop+OpenSsl+SslException: Failed to get SSL method 'TLSv1_1_method'. Ensure the OpenSSL method exists on the current system. 03:30:47 at Interop.OpenSsl.GetSslMethod(SslProtocols protocols) 03:30:47 at Interop.OpenSsl.AllocateSslContext(SslProtocols protocols, SafeX509Handle certHandle, SafeEvpPKeyHandle certKeyHandle, EncryptionPolicy policy, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SafeDeleteContext..ctor(SafeFreeCredentials credential, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 ---- Assert Long Message ---- 03:30:47 03:30:47 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:47 at System.Environment.get_StackTrace() 03:30:47 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.InitializeSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, String targetName, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer) 03:30:47 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:47 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.BeginAuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.SslStream.<>c__DisplayClass1.b__0(AsyncCallback callback, Object state) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions) 03:30:47 at System.Threading.Tasks.TaskFactory.FromAsync(Func`3 beginMethod, Action`1 endMethod, Object state) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClientAsync(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.SslStreamAPMExtensions.BeginAuthenticateAsClient(SslStream s, String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy, SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.<>c__DisplayClassb.b__a() 03:30:47 at Xunit.Assert.RecordException(Action testCode) 03:30:47 at Xunit.Assert.Throws(Type exceptionType, Action testCode) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_MismatchProtocols_Fails(SslProtocols server, SslProtocols client, Type expected) 03:30:47 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 03:30:47 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 03:30:47 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 03:30:47 at Xunit.Sdk.TestInvoker`1.CallTestMethod(Object testClassInstance) 03:30:47 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.<b__1>d.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.b__1() 03:30:47 at Xunit.Sdk.ExecutionTimer.d__4.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__9.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) 03:30:47 at Xunit.Sdk.TestInvoker`1.d__46.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance) 03:30:47 at Xunit.Sdk.TestInvoker`1.<b__45_0>d.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.b__45_0() 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 03:30:47 at Xunit.Sdk.XunitTestRunner.d__4.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator) 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 03:30:47 at Xunit.Sdk.TestRunner`1.d__43.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.XunitTheoryTestCaseRunner.d__9.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.XunitTheoryTestCaseRunner.RunTestAsync() 03:30:47 at Xunit.Sdk.TestCaseRunner`1.d__19.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCaseRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestMethodRunner`1.d__32.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() 03:30:47 at Xunit.Sdk.TestMethodRunner`1.d__31.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestMethodRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestClassRunner`1.d__38.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() 03:30:47 at Xunit.Sdk.TestClassRunner`1.d__37.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestClassRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.d__28.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.d__27.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.RunAsync() 03:30:47 at System.Threading.Tasks.Task`1.InnerInvoke() 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at Xunit.Sdk.MaxConcurrencySyncContext.RunOnSyncContext(SendOrPostCallback callback, Object state) 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc() 03:30:47 at Xunit.Sdk.XunitWorkerThread.<>c.b__5_0(Object _) 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 ---- DEBUG ASSERTION FAILED ---- 03:30:47 ---- Assert Short Message ---- 03:30:47 Exception Caught. - Interop+OpenSsl+SslException: Failed to get SSL method 'TLSv1_2_method'. Ensure the OpenSSL method exists on the current system. 03:30:47 at Interop.OpenSsl.GetSslMethod(SslProtocols protocols) 03:30:47 at Interop.OpenSsl.AllocateSslContext(SslProtocols protocols, SafeX509Handle certHandle, SafeEvpPKeyHandle certKeyHandle, EncryptionPolicy policy, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SafeDeleteContext..ctor(SafeFreeCredentials credential, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 ---- Assert Long Message ---- 03:30:47 03:30:47 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:47 at System.Environment.get_StackTrace() 03:30:47 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.InitializeSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, String targetName, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer) 03:30:47 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:47 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.BeginAuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.SslStream.<>c__DisplayClass1.b__0(AsyncCallback callback, Object state) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions) 03:30:47 at System.Threading.Tasks.TaskFactory.FromAsync(Func`3 beginMethod, Action`1 endMethod, Object state) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClientAsync(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.SslStreamAPMExtensions.BeginAuthenticateAsClient(SslStream s, String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy, SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.<>c__DisplayClassb.b__a() 03:30:47 at Xunit.Assert.RecordException(Action testCode) 03:30:47 at Xunit.Assert.Throws(Type exceptionType, Action testCode) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_MismatchProtocols_Fails(SslProtocols server, SslProtocols client, Type expected) 03:30:47 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 03:30:47 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 03:30:47 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 03:30:47 at Xunit.Sdk.TestInvoker`1.CallTestMethod(Object testClassInstance) 03:30:47 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.<b__1>d.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.b__1() 03:30:47 at Xunit.Sdk.ExecutionTimer.d__4.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__9.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) 03:30:47 at Xunit.Sdk.TestInvoker`1.d__46.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance) 03:30:47 at Xunit.Sdk.TestInvoker`1.<b__45_0>d.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.b__45_0() 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 03:30:47 at Xunit.Sdk.XunitTestRunner.d__4.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator) 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 03:30:47 at Xunit.Sdk.TestRunner`1.d__43.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.XunitTheoryTestCaseRunner.d__9.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.XunitTheoryTestCaseRunner.RunTestAsync() 03:30:47 at Xunit.Sdk.TestCaseRunner`1.d__19.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCaseRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestMethodRunner`1.d__32.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() 03:30:47 at Xunit.Sdk.TestMethodRunner`1.d__31.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestMethodRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestClassRunner`1.d__38.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() 03:30:47 at Xunit.Sdk.TestClassRunner`1.d__37.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestClassRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.d__28.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.d__27.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.RunAsync() 03:30:47 at System.Threading.Tasks.Task`1.InnerInvoke() 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at Xunit.Sdk.MaxConcurrencySyncContext.RunOnSyncContext(SendOrPostCallback callback, Object state) 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc() 03:30:47 at Xunit.Sdk.XunitWorkerThread.<>c.b__5_0(Object _) 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 ---- DEBUG ASSERTION FAILED ---- 03:30:47 ---- Assert Short Message ---- 03:30:47 Exception Caught. - Interop+OpenSsl+SslException: Failed to get SSL method 'TLSv1_2_method'. Ensure the OpenSSL method exists on the current system. 03:30:47 at Interop.OpenSsl.GetSslMethod(SslProtocols protocols) 03:30:47 at Interop.OpenSsl.AllocateSslContext(SslProtocols protocols, SafeX509Handle certHandle, SafeEvpPKeyHandle certKeyHandle, EncryptionPolicy policy, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SafeDeleteContext..ctor(SafeFreeCredentials credential, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 ---- Assert Long Message ---- 03:30:47 03:30:47 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:47 at System.Environment.get_StackTrace() 03:30:47 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.InitializeSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, String targetName, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer) 03:30:47 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:47 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.BeginAuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.SslStream.<>c__DisplayClass1.b__0(AsyncCallback callback, Object state) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions) 03:30:47 at System.Threading.Tasks.TaskFactory.FromAsync(Func`3 beginMethod, Action`1 endMethod, Object state) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClientAsync(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.SslStreamAPMExtensions.BeginAuthenticateAsClient(SslStream s, String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy, SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.<>c__DisplayClassb.b__a() 03:30:47 at Xunit.Assert.RecordException(Action testCode) 03:30:47 at Xunit.Assert.Throws(Type exceptionType, Action testCode) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_MismatchProtocols_Fails(SslProtocols server, SslProtocols client, Type expected) 03:30:47 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 03:30:47 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 03:30:47 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 03:30:47 at Xunit.Sdk.TestInvoker`1.CallTestMethod(Object testClassInstance) 03:30:47 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.<b__1>d.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.b__1() 03:30:47 at Xunit.Sdk.ExecutionTimer.d__4.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__9.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) 03:30:47 at Xunit.Sdk.TestInvoker`1.d__46.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance) 03:30:47 at Xunit.Sdk.TestInvoker`1.<b__45_0>d.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.b__45_0() 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 03:30:47 at Xunit.Sdk.XunitTestRunner.d__4.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator) 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 03:30:47 at Xunit.Sdk.TestRunner`1.d__43.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.XunitTheoryTestCaseRunner.d__9.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.XunitTheoryTestCaseRunner.RunTestAsync() 03:30:47 at Xunit.Sdk.TestCaseRunner`1.d__19.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCaseRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestMethodRunner`1.d__32.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() 03:30:47 at Xunit.Sdk.TestMethodRunner`1.d__31.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestMethodRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestClassRunner`1.d__38.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() 03:30:47 at Xunit.Sdk.TestClassRunner`1.d__37.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestClassRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.d__28.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.d__27.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.RunAsync() 03:30:47 at System.Threading.Tasks.Task`1.InnerInvoke() 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at Xunit.Sdk.MaxConcurrencySyncContext.RunOnSyncContext(SendOrPostCallback callback, Object state) 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc() 03:30:47 at Xunit.Sdk.XunitWorkerThread.<>c.b__5_0(Object _) 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 ---- DEBUG ASSERTION FAILED ---- 03:30:47 ---- Assert Short Message ---- 03:30:47 Exception Caught. - Interop+OpenSsl+SslException: Failed to get SSL method 'TLSv1_2_method'. Ensure the OpenSSL method exists on the current system. 03:30:47 at Interop.OpenSsl.GetSslMethod(SslProtocols protocols) 03:30:47 at Interop.OpenSsl.AllocateSslContext(SslProtocols protocols, SafeX509Handle certHandle, SafeEvpPKeyHandle certKeyHandle, EncryptionPolicy policy, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SafeDeleteContext..ctor(SafeFreeCredentials credential, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 ---- Assert Long Message ---- 03:30:47 03:30:47 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:47 at System.Environment.get_StackTrace() 03:30:47 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.InitializeSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, String targetName, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer) 03:30:47 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:47 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.BeginAuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.SslStream.<>c__DisplayClass1.b__0(AsyncCallback callback, Object state) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions) 03:30:47 at System.Threading.Tasks.TaskFactory.FromAsync(Func`3 beginMethod, Action`1 endMethod, Object state) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClientAsync(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.SslStreamAPMExtensions.BeginAuthenticateAsClient(SslStream s, String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy, SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.<>c__DisplayClassb.b__a() 03:30:47 at Xunit.Assert.RecordException(Action testCode) 03:30:47 at Xunit.Assert.Throws(Type exceptionType, Action testCode) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_MismatchProtocols_Fails(SslProtocols server, SslProtocols client, Type expected) 03:30:47 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 03:30:47 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 03:30:47 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 03:30:47 at Xunit.Sdk.TestInvoker`1.CallTestMethod(Object testClassInstance) 03:30:47 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.<b__1>d.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.b__1() 03:30:47 at Xunit.Sdk.ExecutionTimer.d__4.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__9.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) 03:30:47 at Xunit.Sdk.TestInvoker`1.d__46.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance) 03:30:47 at Xunit.Sdk.TestInvoker`1.<b__45_0>d.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.b__45_0() 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 03:30:47 at Xunit.Sdk.XunitTestRunner.d__4.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator) 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 03:30:47 at Xunit.Sdk.TestRunner`1.d__43.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.XunitTheoryTestCaseRunner.d__9.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.XunitTheoryTestCaseRunner.RunTestAsync() 03:30:47 at Xunit.Sdk.TestCaseRunner`1.d__19.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCaseRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestMethodRunner`1.d__32.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() 03:30:47 at Xunit.Sdk.TestMethodRunner`1.d__31.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestMethodRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestClassRunner`1.d__38.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() 03:30:47 at Xunit.Sdk.TestClassRunner`1.d__37.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestClassRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.d__28.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.d__27.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.RunAsync() 03:30:47 at System.Threading.Tasks.Task`1.InnerInvoke() 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at Xunit.Sdk.MaxConcurrencySyncContext.RunOnSyncContext(SendOrPostCallback callback, Object state) 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc() 03:30:47 at Xunit.Sdk.XunitWorkerThread.<>c.b__5_0(Object _) 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at Interop.libcurl.curl_easy_init() 03:30:47 at Internal.Cryptography.Pal.CertificateAssetDownloader.DownloadAsset(String uri, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.CertificateAssetDownloader.DownloadCertificate(String uri, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.FindIssuer(X509Certificate2 cert, X509Certificate2Collection[] stores, List`1 downloadedCerts, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.FindCandidates(X509Certificate2 leaf, X509Certificate2Collection extraStore, List`1 downloaded, List`1 systemTrusted, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.ChainPal.BuildChain(Boolean useMachineContext, ICertificatePal cert, X509Certificate2Collection extraStore, OidCollection applicationPolicy, OidCollection certificatePolicy, X509RevocationMode revocationMode, X509RevocationFlag revocationFlag, DateTime verificationTime, TimeSpan timeout) 03:30:47 at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate) 03:30:47 at System.Net.CertificateValidationPal.VerifyCertificateProperties(X509Chain chain, X509Certificate2 remoteCertificate, Boolean checkCertName, Boolean isServer, String hostName) 03:30:47 at System.Net.Security.SecureChannel.VerifyRemoteCertificate(RemoteCertValidationCallback remoteCertValidationCallback) 03:30:47 at System.Net.Security.SslState.CompleteHandshake() 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.Tests.ServerNoEncryptionTest.ServerNoEncryption_ClientAllowNoEncryption_ConnectWithNoEncryption() 03:30:47 System.Net.Security.Tests.ServerRequireEncryptionTest.ServerRequireEncryption_ClientRequireEncryption_ConnectWithEncryption [FAIL] 03:30:47 System.DllNotFoundException : Unable to load DLL 'libcurl.so.4': The specified module could not be found. 03:30:47 (Exception from HRESULT: 0x8007007E) 03:30:47 Stack Trace: 03:30:47 at Interop.libcurl.curl_easy_init() 03:30:47 at Internal.Cryptography.Pal.CertificateAssetDownloader.DownloadAsset(String uri, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.CertificateAssetDownloader.DownloadCertificate(String uri, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.FindIssuer(X509Certificate2 cert, X509Certificate2Collection[] stores, List`1 downloadedCerts, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.FindCandidates(X509Certificate2 leaf, X509Certificate2Collection extraStore, List`1 downloaded, List`1 systemTrusted, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.ChainPal.BuildChain(Boolean useMachineContext, ICertificatePal cert, X509Certificate2Collection extraStore, OidCollection applicationPolicy, OidCollection certificatePolicy, X509RevocationMode revocationMode, X509RevocationFlag revocationFlag, DateTime verificationTime, TimeSpan timeout) 03:30:47 at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate) 03:30:47 at System.Net.CertificateValidationPal.VerifyCertificateProperties(X509Chain chain, X509Certificate2 remoteCertificate, Boolean checkCertName, Boolean isServer, String hostName) 03:30:47 at System.Net.Security.SecureChannel.VerifyRemoteCertificate(RemoteCertValidationCallback remoteCertValidationCallback) 03:30:47 at System.Net.Security.SslState.CompleteHandshake() 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 ---- DEBUG ASSERTION FAILED ---- 03:30:47 ---- Assert Short Message ---- 03:30:47 Exception Caught. - Interop+OpenSsl+SslException: Failed to get SSL method 'TLSv1_2_method'. Ensure the OpenSSL method exists on the current system. 03:30:47 at Interop.OpenSsl.GetSslMethod(SslProtocols protocols) 03:30:47 at Interop.OpenSsl.AllocateSslContext(SslProtocols protocols, SafeX509Handle certHandle, SafeEvpPKeyHandle certKeyHandle, EncryptionPolicy policy, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SafeDeleteContext..ctor(SafeFreeCredentials credential, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 ---- Assert Long Message ---- 03:30:47 03:30:47 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:47 at System.Environment.get_StackTrace() 03:30:47 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.InitializeSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, String targetName, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer) 03:30:47 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:47 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.BeginAuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.SslStream.<>c__DisplayClass1.b__0(AsyncCallback callback, Object state) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions) 03:30:47 at System.Threading.Tasks.TaskFactory.FromAsync(Func`3 beginMethod, Action`1 endMethod, Object state) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClientAsync(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.SslStreamAPMExtensions.BeginAuthenticateAsClient(SslStream s, String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy, SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.<>c__DisplayClassb.b__a() 03:30:47 at Xunit.Assert.RecordException(Action testCode) 03:30:47 at Xunit.Assert.Throws(Type exceptionType, Action testCode) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_MismatchProtocols_Fails(SslProtocols server, SslProtocols client, Type expected) 03:30:47 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 03:30:47 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 03:30:47 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 03:30:47 at Xunit.Sdk.TestInvoker`1.CallTestMethod(Object testClassInstance) 03:30:47 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.<b__1>d.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.b__1() 03:30:47 at Xunit.Sdk.ExecutionTimer.d__4.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__9.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) 03:30:47 at Xunit.Sdk.TestInvoker`1.d__46.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance) 03:30:47 at Xunit.Sdk.TestInvoker`1.<b__45_0>d.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.b__45_0() 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 03:30:47 at Xunit.Sdk.XunitTestRunner.d__4.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator) 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 03:30:47 at Xunit.Sdk.TestRunner`1.d__43.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.XunitTheoryTestCaseRunner.d__9.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.XunitTheoryTestCaseRunner.RunTestAsync() 03:30:47 at Xunit.Sdk.TestCaseRunner`1.d__19.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCaseRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestMethodRunner`1.d__32.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() 03:30:47 at Xunit.Sdk.TestMethodRunner`1.d__31.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestMethodRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestClassRunner`1.d__38.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() 03:30:47 at Xunit.Sdk.TestClassRunner`1.d__37.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestClassRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.d__28.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.d__27.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.RunAsync() 03:30:47 at System.Threading.Tasks.Task`1.InnerInvoke() 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at Xunit.Sdk.MaxConcurrencySyncContext.RunOnSyncContext(SendOrPostCallback callback, Object state) 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at Xunit.Sdk.MaxConcurrency at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 SyncContext.WorkerThreadProc() 03:30:47 at Xunit.Sdk.XunitWorkerThread.<>c.b__5_0(Object _) 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.Tests.ServerRequireEncryptionTest.ServerRequireEncryption_ClientRequireEncryption_ConnectWithEncryption() 03:30:47 System.Net.Security.Tests.ClientDefaultEncryptionTest.ClientDefaultEncryption_ServerAllowNoEncryption_ConnectWithEncryption [FAIL] 03:30:47 System.DllNotFoundException : Unable to load DLL 'libcurl.so.4': The specified module could not be found. 03:30:47 (Exception from HRESULT: 0x8007007E) 03:30:47 Stack Trace: 03:30:47 at Interop.libcurl.curl_easy_init() 03:30:47 at Internal.Cryptography.Pal.CertificateAssetDownloader.DownloadAsset(String uri, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.CertificateAssetDownloader.DownloadCertificate(String uri, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.FindIssuer(X509Certificate2 cert, X509Certificate2Collection[] stores, List`1 downloadedCerts, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.FindCandidates(X509Certificate2 leaf, X509Certificate2Collection extraStore, List`1 downloaded, List`1 systemTrusted, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.ChainPal.BuildChain(Boolean useMachineContext, ICertificatePal cert, X509Certificate2Collection extraStore, OidCollection applicationPolicy, OidCollection certificatePolicy, X509RevocationMode revocationMode, X509RevocationFlag revocationFlag, DateTime verificationTime, TimeSpan timeout) 03:30:47 at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate) 03:30:47 at System.Net.CertificateValidationPal.VerifyCertificateProperties(X509Chain chain, X509Certificate2 remoteCertificate, Boolean checkCertName, Boolean isServer, String hostName) 03:30:47 at System.Net.Security.SecureChannel.VerifyRemoteCertificate(RemoteCertValidationCallback remoteCertValidationCallback) 03:30:47 at System.Net.Security.SslState.CompleteHandshake() 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.Tests.ClientDefaultEncryptionTest.ClientDefaultEncryption_ServerAllowNoEncryption_ConnectWithEncryption() 03:30:47 System.Net.Security.Tests.SslStreamStreamToStreamTest.SslStream_StreamToStream_Authentication_Success [FAIL] 03:30:47 System.AggregateException : One or more errors occurred. 03:30:47 ---- System.DllNotFoundException : Unable to load DLL 'libcurl.so.4': The specified module could not be found. 03:30:47 (Exception from HRESULT: 0x8007007E) 03:30:47 Stack Trace: 03:30:47 at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) 03:30:47 at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout) 03:30:47 at System.Threading.Tasks.Task.WaitAll(Task[] tasks, TimeSpan timeout) 03:30:47 at System.Net.Security.Tests.SslStreamStreamToStreamTest.SslStream_StreamToStream_Authentication_Success() 03:30:47 ----- Inner Stack Trace ----- 03:30:47 at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) 03:30:47 at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 03:30:47 System.Net.Security.Tests.ServerRequireEncryptionTest.ServerRequireEncryption_ClientAllowNoEncryption_ConnectWithEncryption [FAIL] 03:30:47 System.DllNotFoundException : Unable to load DLL 'libcurl.so.4': The specified module could not be found. 03:30:47 (Exception from HRESULT: 0x8007007E) 03:30:47 Stack Trace: 03:30:47 at Interop.libcurl.curl_easy_init() 03:30:47 at Internal.Cryptography.Pal.CertificateAssetDownloader.DownloadAsset(String uri, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.CertificateAssetDownloader.DownloadCertificate(String uri, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.FindIssuer(X509Certificate2 cert, X509Certificate2Collection[] stores, List`1 downloadedCerts, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.FindCandidates(X509Certificate2 leaf, X509Certificate2Collection extraStore, List`1 downloaded, List`1 systemTrusted, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.ChainPal.BuildChain(Boolean useMachineContext, ICertificatePal cert, X509Certificate2Collection extraStore, OidCollection applicationPolicy, OidCollection certificatePolicy, X509RevocationMode revocationMode, X509RevocationFlag revocationFlag, DateTime verificationTime, TimeSpan timeout) 03:30:47 at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate) 03:30:47 at System.Net.CertificateValidationPal.VerifyCertificateProperties(X509Chain chain, X509Certificate2 remoteCertificate, Boolean checkCertName, Boolean isServer, String hostName) 03:30:47 at System.Net.Security.SecureChannel.VerifyRemoteCertificate(RemoteCertValidationCallback remoteCertValidationCallback) 03:30:47 at System.Net.Security.SslState.CompleteHandshake() 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.Tests.ServerRequireEncryptionTest.ServerRequireEncryption_ClientAllowNoEncryption_ConnectWithEncryption() 03:30:47 System.Net.Security.Tests.ClientDefaultEncryptionTest.ClientDefaultEncryption_ServerRequireEncryption_ConnectWithEncryption [FAIL] 03:30:47 System.DllNotFoundException : Unable to load DLL 'libcurl.so.4': The specified module could not be found. 03:30:47 (Exception from HRESULT: 0x8007007E) 03:30:47 Stack Trace: 03:30:47 at Interop.libcurl.curl_easy_init() 03:30:47 at Internal.Cryptography.Pal.CertificateAssetDownloader.DownloadAsset(String uri, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.CertificateAssetDownloader.DownloadCertificate(String uri, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.FindIssuer(X509Certificate2 cert, X509Certificate2Collection[] stores, List`1 downloadedCerts, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.FindCandidates(X509Certificate2 leaf, X509Certificate2Collection extraStore, List`1 downloaded, List`1 systemTrusted, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.ChainPal.BuildChain(Boolean useMachineContext, ICertificatePal cert, X509Certificate2Collection extraStore, OidCollection applicationPolicy, OidCollection certificatePolicy, X509RevocationMode revocationMode, X509RevocationFlag revocationFlag, DateTime verificationTime, TimeSpan timeout) 03:30:47 at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate) 03:30:47 at System.Net.CertificateValidationPal.VerifyCertificateProperties(X509Chain chain, X509Certificate2 remoteCertificate, Boolean checkCertName, Boolean isServer, String hostName) 03:30:47 at System.Net.Security.SecureChannel.VerifyRemoteCertificate(RemoteCertValidationCallback remoteCertValidationCallback) 03:30:47 at System.Net.Security.SslState.CompleteHandshake() 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.Tests.ClientDefaultEncryptionTest.ClientDefaultEncryption_ServerRequireEncryption_ConnectWithEncryption() 03:30:47 System.Net.Security.Tests.SslStreamStreamToStreamTest.SslStream_StreamToStream_Authentication_IncorrectServerName_Fail [FAIL] 03:30:47 Assert.Throws() Failure 03:30:47 Expected: typeof(System.Security.Authentication.AuthenticationException) 03:30:47 Actual: typeof(System.DllNotFoundException): Unable to load DLL 'libcurl.so.4': The specified module could not be found. 03:30:47 (Exception from HRESULT: 0x8007007E) 03:30:47 Stack Trace: 03:30:47 at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) 03:30:47 at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 03:30:47 --- End of stack trace from previous location where exception was thrown --- 03:30:47 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 03:30:47 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 03:30:47 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() 03:30:47 at System.Net.Security.Tests.SslStreamStreamToStreamTest.<>c__DisplayClass1.b__0() 03:30:47 System.Net.Security.Tests.ServerNoEncryptionTest.ServerNoEncryption_ClientNoEncryption_ConnectWithNoEncryption [FAIL] 03:30:47 System.DllNotFoundException : Unable to load DLL 'libcurl.so.4': The specified module could not be found. 03:30:47 (Exception from HRESULT: 0x8007007E) 03:30:47 Stack Trace: 03:30:47 at Interop.libcurl.curl_easy_init() 03:30:47 at Internal.Cryptography.Pal.CertificateAssetDownloader.DownloadAsset(String uri, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.CertificateAssetDownloader.DownloadCertificate(String uri, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.FindIssuer(X509Certificate2 cert, X509Certificate2Collection[] stores, List`1 downloadedCerts, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.FindCandidates(X509Certificate2 leaf, X509Certificate2Collection extraStore, List`1 downloaded, List`1 systemTrusted, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.ChainPal.BuildChain(Boolean useMachineContext, ICertificatePal cert, X509Certificate2Collection extraStore, OidCollection applicationPolicy, OidCollection certificatePolicy, X509RevocationMode revocationMode, X509RevocationFlag revocationFlag, DateTime verificationTime, TimeSpan timeout) 03:30:47 at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate) 03:30:47 at System.Net.CertificateValidationPal.VerifyCertificateProperties(X509Chain chain, X509Certificate2 remoteCertificate, Boolean checkCertName, Boolean isServer, String hostName) 03:30:47 at System.Net.Security.SecureChannel.VerifyRemoteCertificate(RemoteCertValidationCallback remoteCertValidationCallback) 03:30:47 at System.Net.Security.SslState.CompleteHandshake() 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.Tests.ServerNoEncryptionTest.ServerNoEncryption_ClientNoEncryption_ConnectWithNoEncryption() 03:30:47 System.Net.Security.Tests.SslStreamStreamToStreamTest.SslStream_StreamToStream_Successive_ClientWrite_Success [FAIL] 03:30:47 System.AggregateException : One or more errors occurred. 03:30:47 ---- System.DllNotFoundException : Unable to load DLL 'libcurl.so.4': The specified module could not be found. 03:30:47 (Exception from HRESULT: 0x8007007E) 03:30:47 Stack Trace: 03:30:47 at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) 03:30:47 at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout) 03:30:47 at System.Threading.Tasks.Task.WaitAll(Task[] tasks, TimeSpan timeout) 03:30:47 at System.Net.Security.Tests.SslStreamStreamToStreamTest.DoHandshake(SslStream clientSslStream, SslStream serverSslStream) 03:30:47 at System.Net.Security.Tests.SslStreamStreamToStreamTest.SslStream_StreamToStream_Successive_ClientWrite_Success() 03:30:47 ----- Inner Stack Trace ----- 03:30:47 at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) 03:30:47 at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 03:30:47 System.Net.Security.Tests.ServerAllowNoEncryptionTest.ServerAllowNoEncryption_ClientNoEncryption_ConnectWithNoEncryption [FAIL] 03:30:47 System.DllNotFoundException : Unable to load DLL 'libcurl.so.4': The specified module could not be found. 03:30:47 (Exception from HRESULT: 0x8007007E) 03:30:47 Stack Trace: 03:30:47 at Interop.libcurl.curl_easy_init() 03:30:47 at Internal.Cryptography.Pal.CertificateAssetDownloader.DownloadAsset(String uri, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.CertificateAssetDownloader.DownloadCertificate(String uri, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.FindIssuer(X509Certificate2 cert, X509Certificate2Collection[] stores, List`1 downloadedCerts, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.FindCandidates(X509Certificate2 leaf, X509Certificate2Collection extraStore, List`1 downloaded, List`1 systemTrusted, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.ChainPal.BuildChain(Boolean useMachineContext, ICertificatePal cert, X509Certificate2Collection extraStore, OidCollection applicationPolicy, OidCollection certificatePolicy, X509RevocationMode revocationMode, X509RevocationFlag revocationFlag, DateTime verificationTime, TimeSpan timeout) 03:30:47 at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate) 03:30:47 at System.Net.CertificateValidationPal.VerifyCertificateProperties(X509Chain chain, X509Certificate2 remoteCertificate, Boolean checkCertName, Boolean isServer, String hostName) 03:30:47 at System.Net.Security.SecureChannel.VerifyRemoteCertificate(RemoteCertValidationCallback remoteCertValidationCallback) 03:30:47 at System.Net.Security.SslState.CompleteHandshake() 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.Tests.ServerAllowNoEncryptionTest.ServerAllowNoEncryption_ClientNoEncryption_ConnectWithNoEncryption() 03:30:47 System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_EachProtocol_Success [FAIL] 03:30:47 System.DllNotFoundException : Unable to load DLL 'libcurl.so.4': The specified module could not be found. 03:30:47 (Exception from HRESULT: 0x8007007E) 03:30:47 Stack Trace: 03:30:47 at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) 03:30:47 at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 03:30:47 --- End of stack trace from previous location where exception was thrown --- 03:30:47 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 03:30:47 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 03:30:47 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() 03:30:47 at System.Net.Security.SslStreamAPMExtensions.EndAuthenticateAsClient(SslStream s, IAsyncResult asyncResult) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy, SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_EachProtocol_Success() 03:30:47 System.Net.Security.Tests.ServerAllowNoEncryptionTest.ServerAllowNoEncryption_ClientAllowNoEncryption_ConnectWithEncryption [FAIL] 03:30:47 System.DllNotFoundException : Unable to load DLL 'libcurl.so.4': The specified module could not be found. 03:30:47 (Exception from HRESULT: 0x8007007E) 03:30:47 Stack Trace: 03:30:47 at Interop.libcurl.curl_easy_init() 03:30:47 at Internal.Cryptography.Pal.CertificateAssetDownloader.DownloadAsset(String uri, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.CertificateAssetDownloader.DownloadCertificate(String uri, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.FindIssuer(X509Certificate2 cert, X509Certificate2Collection[] stores, List`1 downloadedCerts, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.FindCandidates(X509Certificate2 leaf, X509Certificate2Collection extraStore, List`1 downloaded, List`1 systemTrusted, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.ChainPal.BuildChain(Boolean useMachineContext, ICertificatePal cert, X509Certificate2Collection extraStore, OidCollection applicationPolicy, OidCollection certificatePolicy, X509RevocationMode revocationMode, X509RevocationFlag revocationFlag, DateTime verificationTime, TimeSpan timeout) 03:30:47 at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate) 03:30:47 at System.Net.CertificateValidationPal.VerifyCertificateProperties(X509Chain chain, X509Certificate2 remoteCertificate, Boolean checkCertName, Boolean isServer, String hostName) 03:30:47 at System.Net.Security.SecureChannel.VerifyRemoteCertificate(RemoteCertValidationCallback remoteCertValidationCallback) 03:30:47 at System.Net.Security.SslState.CompleteHandshake() 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.Tests.ServerAllowNoEncryptionTest.ServerAllowNoEncryption_ClientAllowNoEncryption_ConnectWithEncryption() 03:30:47 System.Net.Security.Tests.ServerAllowNoEncryptionTest.ServerAllowNoEncryption_ClientRequireEncryption_ConnectWithEncryption [FAIL] 03:30:47 System.DllNotFoundException : Unable to load DLL 'libcurl.so.4': The specified module could not be found. 03:30:47 (Exception from HRESULT: 0x8007007E) 03:30:47 Stack Trace: 03:30:47 at Interop.libcurl.curl_easy_init() 03:30:47 at Internal.Cryptography.Pal.CertificateAssetDownloader.DownloadAsset(String uri, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.CertificateAssetDownloader.DownloadCertificate(String uri, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.FindIssuer(X509Certificate2 cert, X509Certificate2Collection[] stores, List`1 downloadedCerts, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.OpenSslX509ChainProcessor.FindCandidates(X509Certificate2 leaf, X509Certificate2Collection extraStore, List`1 downloaded, List`1 systemTrusted, TimeSpan& remainingDownloadTime) 03:30:47 at Internal.Cryptography.Pal.ChainPal.BuildChain(Boolean useMachineContext, ICertificatePal cert, X509Certificate2Collection extraStore, OidCollection applicationPolicy, OidCollection certificatePolicy, X509RevocationMode revocationMode, X509RevocationFlag revocationFlag, DateTime verificationTime, TimeSpan timeout) 03:30:47 at System.Security.Cryptography.X509Certificates.X509Chain.Build(X509Certificate2 certificate) 03:30:47 at System.Net.CertificateValidationPal.VerifyCertificateProperties(X509Chain chain, X509Certificate2 remoteCertificate, Boolean checkCertName, Boolean isServer, String hostName) 03:30:47 at System.Net.Security.SecureChannel.VerifyRemoteCertificate(RemoteCertValidationCallback remoteCertValidationCallback) 03:30:47 at System.Net.Security.SslState.CompleteHandshake() 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.Tests.ServerAllowNoEncryptionTest.ServerAllowNoEncryption_ClientRequireEncryption_ConnectWithEncryption() 03:30:47 System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_MismatchProtocols_Fails(server: Tls11, client: Ssl2, expected: typeof(System.IO.IOException)) [FAIL] 03:30:47 Assert.Throws() Failure 03:30:47 Expected: typeof(System.IO.IOException) 03:30:47 Actual: typeof(System.Security.Authentication.AuthenticationException): A call to SSPI failed, see inner exception. 03:30:47 Stack Trace: 03:30:47 at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.BeginAuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.SslStream.<>c__DisplayClass1.b__0(AsyncCallback callback, Object state) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions) 03:30:47 at System.Threading.Tasks.TaskFactory.FromAsync(Func`3 beginMethod, Action`1 endMethod, Object state) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClientAsync(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.SslStreamAPMExtensions.BeginAuthenticateAsClient(SslStream s, String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy, SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.<>c__DisplayClassb.b__a() 03:30:47 System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_MismatchProtocols_Fails(server: Tls11, client: Tls12, expected: typeof(System.IO.IOException)) [FAIL] 03:30:47 Assert.Throws() Failure 03:30:47 Expected: typeof(System.IO.IOException) 03:30:47 Actual: typeof(System.Security.Authentication.AuthenticationException): A call to SSPI failed, see inner exception. 03:30:47 Stack Trace: 03:30:47 at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.BeginAuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.SslStream.<>c__DisplayClass1.b__0(AsyncCallback callback, Object state) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions) 03:30:47 at System.Threading.Tasks.TaskFactory.FromAsync(Func`3 beginMethod, Action`1 endMethod, Object state) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClientAsync(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.SslStreamAPMExtensions.BeginAuthenticateAsClient(SslStream s, String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy, SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.<>c__DisplayClassb.b__a() 03:30:47 System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_MismatchProtocols_Fails(server: Tls12, client: Ssl2, expected: typeof(System.IO.IOException)) [FAIL] 03:30:47 Assert.Throws() Failure 03:30:47 Expected: typeof(System.IO.IOException) 03:30:47 Actual: typeof(System.Security.Authentication.AuthenticationException): A call to SSPI failed, see inner exception. 03:30:47 Stack Trace: 03:30:47 at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.BeginAuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.SslStream.<>c__DisplayClass1.b__0(AsyncCallback callback, Object state) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions) 03:30:47 at System.Threading.Tasks.TaskFactory.FromAsync(Func`3 beginMethod, Action`1 endMethod, Object state) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClientAsync(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.SslStreamAPMExtensions.BeginAuthenticateAsClient(SslStream s, String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy, SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.<>c__DisplayClassb.b__a() 03:30:47 System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_ServerRequireEncryption_ConnectWithEncryption [FAIL] 03:30:47 System.DllNotFoundException : Unable to load DLL 'libcurl.so.4': The specified module could not be found. 03:30:47 (Exception from HRESULT: 0x8007007E) 03:30:47 Stack Trace: 03:30:47 at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) 03:30:47 at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 03:30:47 --- End of stack trace from previous location where exception was thrown --- 03:30:47 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 03:30:47 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 03:30:47 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() 03:30:47 at System.Net.Security.SslStreamAPMExtensions.EndAuthenticateAsClient(SslStream s, IAsyncResult asyncResult) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy, SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_ServerRequireEncryption_ConnectWithEncryption() 03:30:47 System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_AllServerVsIndividualClientProtocols_Success [FAIL] 03:30:47 System.DllNotFoundException : Unable to load DLL 'libcurl.so.4': The specified module could not be found. 03:30:47 (Exception from HRESULT: 0x8007007E) 03:30:47 Stack Trace: 03:30:47 at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) 03:30:47 at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 03:30:47 --- End of stack trace from previous location where exception was thrown --- 03:30:47 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 03:30:47 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 03:30:47 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() 03:30:47 at System.Net.Security.SslStreamAPMExtensions.EndAuthenticateAsClient(SslStream s, IAsyncResult asyncResult) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy, SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_AllServerVsIndividualClientProtocols_Success() 03:30:47 System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_AllServerAllClient_Success [FAIL] 03:30:47 System.DllNotFoundException : Unable to load DLL 'libcurl.so.4': The specified module could not be found. 03:30:47 (Exception from HRESULT: 0x8007007E) 03:30:47 Stack Trace: 03:30:47 at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) 03:30:47 at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 03:30:47 --- End of stack trace from previous location where exception was thrown --- 03:30:47 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 03:30:47 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 03:30:47 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() 03:30:47 at System.Net.Security.SslStreamAPMExtensions.EndAuthenticateAsClient(SslStream s, IAsyncResult asyncResult) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy, SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_AllServerAllClient_Success() 03:30:47 System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_IndividualServerVsAllClientProtocols_Success [FAIL] 03:30:47 System.DllNotFoundException : Unable to load DLL 'libcurl.so.4': The specified module could not be found. 03:30:47 (Exception from HRESULT: 0x8007007E) 03:30:47 Stack Trace: 03:30:47 at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) 03:30:47 at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 03:30:47 --- End of stack trace from previous location where exception was thrown --- 03:30:47 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 03:30:47 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 03:30:47 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() 03:30:47 at System.Net.Security.SslStreamAPMExtensions.EndAuthenticateAsClient(SslStream s, IAsyncResult asyncResult) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy, SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_IndividualServerVsAllClientProtocols_Success() 03:30:47 ---- DEBUG ASSERTION FAILED ---- 03:30:47 ---- Assert Short Message ---- 03:30:47 Exception Caught. - Interop+OpenSsl+SslException: Failed to get SSL method 'TLSv1_2_method'. Ensure the OpenSSL method exists on the current system. 03:30:47 at Interop.OpenSsl.GetSslMethod(SslProtocols protocols) 03:30:47 at Interop.OpenSsl.AllocateSslContext(SslProtocols protocols, SafeX509Handle certHandle, SafeEvpPKeyHandle certKeyHandle, EncryptionPolicy policy, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.Security.SafeDeleteContext..ctor(SafeFreeCredentials credential, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 ---- Assert Long Message ---- 03:30:47 03:30:47 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 03:30:47 at System.Environment.get_StackTrace() 03:30:47 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 03:30:47 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 03:30:47 at System.Net.SslStreamPal.InitializeSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, String targetName, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer) 03:30:47 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 03:30:47 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.BeginAuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.SslStream.<>c__DisplayClass1.b__0(AsyncCallback callback, Object state) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions) 03:30:47 at System.Threading.Tasks.TaskFactory.FromAsync(Func`3 beginMethod, Action`1 endMethod, Object state) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClientAsync(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.SslStreamAPMExtensions.BeginAuthenticateAsClient(SslStream s, String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy, SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_Tls12ServerSsl2Tls12Client_Success() 03:30:47 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 03:30:47 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 03:30:47 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 03:30:47 at Xunit.Sdk.TestInvoker`1.CallTestMethod(Object testClassInstance) 03:30:47 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.<b__1>d.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.b__1() 03:30:47 at Xunit.Sdk.ExecutionTimer.d__4.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__9.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) 03:30:47 at Xunit.Sdk.TestInvoker`1.d__46.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance) 03:30:47 at Xunit.Sdk.TestInvoker`1.<b__45_0>d.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestInvoker`1.b__45_0() 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 03:30:47 at Xunit.Sdk.XunitTestRunner.d__4.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator) 03:30:47 at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) 03:30:47 at Xunit.Sdk.TestRunner`1.d__43.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestCaseRunner`1.d__19.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCaseRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestMethodRunner`1.d__32.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() 03:30:47 at Xunit.Sdk.TestMethodRunner`1.d__31.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestMethodRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestClassRunner`1.d__38.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() 03:30:47 at Xunit.Sdk.TestClassRunner`1.d__37.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestClassRunner`1.RunAsync() 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.d__28.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.d__27.MoveNext() 03:30:47 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) 03:30:47 at Xunit.Sdk.TestCollectionRunner`1.RunAsync() 03:30:47 at System.Threading.Tasks.Task`1.InnerInvoke() 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at Xunit.Sdk.MaxConcurrencySyncContext.RunOnSyncContext(SendOrPostCallback callback, Object state) 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc() 03:30:47 at Xunit.Sdk.XunitWorkerThread.<>c.b__5_0(Object _) 03:30:47 at System.Threading.Tasks.Task.Execute() 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 03:30:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 03:30:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 03:30:47 System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_Tls12ServerSsl2Tls12Client_Success [FAIL] 03:30:47 System.Security.Authentication.AuthenticationException : A call to SSPI failed, see inner exception. 03:30:47 ---- Interop+OpenSsl+SslException : Operation failed with error - 12. 03:30:47 Stack Trace: 03:30:47 at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) 03:30:47 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 03:30:47 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 03:30:47 at System.Net.Security.SslStream.BeginAuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.SslStream.<>c__DisplayClass1.b__0(AsyncCallback callback, Object state) 03:30:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions) 03:30:47 at System.Threading.Tasks.TaskFactory.FromAsync(Func`3 beginMethod, Action`1 endMethod, Object state) 03:30:47 at System.Net.Security.SslStream.AuthenticateAsClientAsync(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 03:30:47 at System.Net.Security.SslStreamAPMExtensions.BeginAuthenticateAsClient(SslStream s, String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy, SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 03:30:47 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_Tls12ServerSsl2Tls12Client_Success() 03:30:47 ----- Inner Stack Trace ----- 03:30:47 03:30:47 Finished: System.Net.Security.Tests 03:30:47 03:30:47 === TEST EXECUTION SUMMARY === 03:30:47 System.Net.Security.Tests Total: 39, Errors: 0, Failed: 21, Skipped: 0, Time: 2.173s ``` 4302 area-Serialization Cleanup an inactive directive in serialization Clean up MERGE_DCJS directive for data contract serializers. Fix #3061 cc: @SGuyGe @shmao 4303 area-System.Security "Windows: new Oid("""").Value is not """"" "On Desktop, `""""` is returned for the OID Value, and null for the OID name (http://referencesource.microsoft.com/#System/security/system/security/cryptography/x509/x509utils.cs,359) On Linux, `""""` is returned. But Windows CoreFX returns `1.2.840.113549.1.9.9`. One can only presume that this unexpected result is why that empty value check existed in Desktop. " 4307 area-System.Net Add shims for Seek, ReadWrite and SslCtx callbacks in libcurl. Since libcurl defines callbacks with varying signatures from platform to platform, we need to define a signature for the callbacks that doesn't change. Then we register our own native callbacks, which then converts the parameters from the varying signature to the unchanging signature and invokes the managed callback. @stephentoub @nguerrera @bartonjs @sokket @vijaykota @kapilash @shrutigarg 4308 area-System.Net CentOS CI build failing to compile System.Net.Http.Native "``` /mnt/resource/j/workspace/dotnet_corefx_linux_centos71_nativecomp_release/src/Native/System.Net.Http.Native/pal_multi.cpp:15:42: error: use of undeclared identifier 'CURLM_ADDED_ALREADY'; did you mean 'PAL_CURLM_ADDED_ALREADY'? static_assert(PAL_CURLM_ADDED_ALREADY == CURLM_ADDED_ALREADY, """"); ^~~~~~~~~~~~~~~~~~~ PAL_CURLM_ADDED_ALREADY /mnt/resource/j/workspace/dotnet_corefx_linux_centos71_nativecomp_release/src/Native/System.Net.Http.Native/pal_multi.h:19:5: note: 'PAL_CURLM_ADDED_ALREADY' declared here PAL_CURLM_ADDED_ALREADY = 7, ^ 1 error generated. make[2]: *** [System.Net.Http.Native/CMakeFiles/System.Net.Http.Native.dir/pal_multi.cpp.o] Error 1 ``` " 4309 area-System.Net Fix a race in DynamicWinsockMethods. There was a race between an initialization check and an initializer: in EnsureWSARecvMsg, the field used to check that multiple fields had been initialized was written to before the other field. The writes have been reordered and appropriate barriers have been added. Fixes #4172. 4316 area-System.Collections Add TryDequeue to Queue [`System.Collections.Generic.Queue`](https://github.com/dotnet/corefx/blob/master/src/System.Collections/src/System/Collections/Generic/Queue.cs) does not have a `TryDequeue` method, however its `Dequeue` is a throwing method so the following pattern always has to be used: ``` csharp T item ...; if (queue.Count > 0) { item = queue.Dequeue(); ... } ``` with extra boilerplate for for whatever no item handling; this would be better as: ``` csharp T item; if (queue.TryDequeue(out item) { ... } ``` As per `ConcurrentQueue` or `TryGet` of Dictionary 4317 area-System.Net System.Net.Security tests asserting and failing on Linux in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst/1373/consoleFull ``` 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher ---> Interop+Crypto+OpenSslCryptographicException: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher ---> Interop+Crypto+OpenSslCryptographicException: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher ---> Interop+Crypto+OpenSslCryptographicException: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher ---> Interop+Crypto+OpenSslCryptographicException: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 Finished: System.Threading.Timer.Tests 00:17:33 00:17:33 === TEST EXECUTION SUMMARY === 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:14077102:SSL routines:SSL23_GET_SERVER_HELLO:unsupported protocol ---> Interop+Crypto+OpenSslCryptographicException: error:14077102:SSL routines:SSL23_GET_SERVER_HELLO:unsupported protocol 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.InitializeSecurityContext(SafeFreeCredentials credential, SafeDeleteContext& context, String targetName, SecurityBuffer[] inputBuffers, SecurityBuffer outputBuffer) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:14077102:SSL routines:SSL23_GET_SERVER_HELLO:unsupported protocol ---> Interop+Crypto+OpenSslCryptographicException: error:14077102:SSL routines:SSL23_GET_SERVER_HELLO:unsupported protocol 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.InitializeSecurityContext(SafeFreeCredentials credential, SafeDeleteContext& context, String targetName, SecurityBuffer[] inputBuffers, SecurityBuffer outputBuffer) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:14077102:SSL routines:SSL23_GET_SERVER_HELLO:unsupported protocol ---> Interop+Crypto+OpenSslCryptographicException: error:14077102:SSL routines:SSL23_GET_SERVER_HELLO:unsupported protocol 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.InitializeSecurityContext(SafeFreeCredentials credential, SafeDeleteContext& context, String targetName, SecurityBuffer[] inputBuffers, SecurityBuffer outputBuffer) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 System.Threading.Timer.Tests Total: 27, Errors: 0, Failed: 0, Skipped: 0, Time: 3.129s 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:14077102:SSL routines:SSL23_GET_SERVER_HELLO:unsupported protocol ---> Interop+Crypto+OpenSslCryptographicException: error:14077102:SSL routines:SSL23_GET_SERVER_HELLO:unsupported protocol 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.InitializeSecurityContext(SafeFreeCredentials credential, SafeDeleteContext& context, String targetName, SecurityBuffer[] inputBuffers, SecurityBuffer outputBuffer) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol ---> Interop+Crypto+OpenSslCryptographicException: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 00:17:33 at System.Net.Security.SslStream.BeginAuthenticateAsServer(X509Certificate serverCertificate, Boolean clientCertificateRequired, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 00:17:33 at System.Net.Security.SslStream.<>c__DisplayClass4.b__3(AsyncCallback callback, Object state) 00:17:33 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions) 00:17:33 at System.Threading.Tasks.TaskFactory.FromAsync(Func`3 beginMethod, Action`1 endMethod, Object state) 00:17:33 at System.Net.Security.SslStream.AuthenticateAsServerAsync(X509Certificate serverCertificate, Boolean clientCertificateRequired, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 00:17:33 at System.Net.Security.SslStreamAPMExtensions.BeginAuthenticateAsServer(SslStream s, X509Certificate serverCertificate, Boolean clientCertificateRequired, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 00:17:33 at System.Net.Security.Tests.DummyTcpServer.OnAccept(IAsyncResult result) 00:17:33 at System.Net.LazyAsyncResult.Complete(IntPtr userToken) 00:17:33 at System.Net.ContextAwareResult.Complete(IntPtr userToken) 00:17:33 at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken) 00:17:33 at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionCallback(Int32 numBytes, SocketError errorCode) 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_MismatchProtocols_Fails(server: Ssl3, client: Ssl2, expected: typeof(System.IO.IOException)) [FAIL] 00:17:33 Assert.Throws() Failure 00:17:33 Expected: typeof(System.IO.IOException) 00:17:33 Actual: typeof(System.InvalidOperationException): EndAuthenticate can only be called once for each asynchronous operation. 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version number ---> Interop+Crypto+OpenSslCryptographicException: error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version number 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version number ---> Interop+Crypto+OpenSslCryptographicException: error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version number 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version number ---> Interop+Crypto+OpenSslCryptographicException: error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version number 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol ---> Interop+Crypto+OpenSslCryptographicException: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 Stack Trace: 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number ---> Interop+Crypto+OpenSslCryptographicException: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.InitializeSecurityContext(SafeFreeCredentials credential, SafeDeleteContext& context, String targetName, SecurityBuffer[] inputBuffers, SecurityBuffer outputBuffer) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version number ---> Interop+Crypto+OpenSslCryptographicException: error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version number 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version number ---> Interop+Crypto+OpenSslCryptographicException: error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version number 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol ---> Interop+Crypto+OpenSslCryptographicException: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number ---> Interop+Crypto+OpenSslCryptographicException: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.InitializeSecurityContext(SafeFreeCredentials credential, SafeDeleteContext& context, String targetName, SecurityBuffer[] inputBuffers, SecurityBuffer outputBuffer) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number ---> Interop+Crypto+OpenSslCryptographicException: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.InitializeSecurityContext(SafeFreeCredentials credential, SafeDeleteContext& context, String targetName, SecurityBuffer[] inputBuffers, SecurityBuffer outputBuffer) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version number ---> Interop+Crypto+OpenSslCryptographicException: error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version number 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol ---> Interop+Crypto+OpenSslCryptographicException: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.AcceptSecurityContext(SafeFreeCredentials& credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean remoteCertRequired) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number ---> Interop+Crypto+OpenSslCryptographicException: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.InitializeSecurityContext(SafeFreeCredentials credential, SafeDeleteContext& context, String targetName, SecurityBuffer[] inputBuffers, SecurityBuffer outputBuffer) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number ---> Interop+Crypto+OpenSslCryptographicException: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.InitializeSecurityContext(SafeFreeCredentials credential, SafeDeleteContext& context, String targetName, SecurityBuffer[] inputBuffers, SecurityBuffer outputBuffer) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:33 ---- DEBUG ASSERTION FAILED ---- 00:17:33 ---- Assert Short Message ---- 00:17:33 Exception Caught. - Interop+OpenSsl+SslException: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number ---> Interop+Crypto+OpenSslCryptographicException: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number 00:17:33 --- End of inner exception stack trace --- 00:17:33 at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset, Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 ---- Assert Long Message ---- 00:17:33 00:17:33 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 00:17:33 at System.Environment.get_StackTrace() 00:17:33 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 00:17:33 at System.Net.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, Boolean isServer, Boolean remoteCertRequired) 00:17:33 at System.Net.SslStreamPal.InitializeSecurityContext(SafeFreeCredentials credential, SafeDeleteContext& context, String targetName, SecurityBuffer[] inputBuffers, SecurityBuffer outputBuffer) 00:17:33 at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) 00:17:33 at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) 00:17:33 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) 00:17:33 at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result) 00:17:33 at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes) 00:17:33 at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) 00:17:33 at System.IO.StreamAsyncHelper.b__4(Task _, Object obj) 00:17:33 at System.Threading.Tasks.Task.Execute() 00:17:33 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued) 00:17:33 at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection) 00:17:33 at System.Threading.Tasks.Task.FinishContinuations() 00:17:33 at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) 00:17:33 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 00:17:33 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 00:17:33 at System.Threading.ThreadPoolWorkQueue.Dispatch() 00:17:34 at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) 00:17:34 at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) 00:17:34 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 00:17:34 --- End of stack trace from previous location where exception was thrown --- 00:17:34 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 00:17:34 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 00:17:34 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() 00:17:34 at System.Net.Security.SslStreamAPMExtensions.EndAuthenticateAsClient(SslStream s, IAsyncResult asyncResult) 00:17:34 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(EncryptionPolicy encryptionPolicy, SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 00:17:34 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncSslHelper(SslProtocols clientSslProtocols, SslProtocols serverSslProtocols) 00:17:34 at System.Net.Security.Tests.ClientAsyncAuthenticateTest.<>c__DisplayClassb.b__a() 00:17:34 Finished: System.Net.Security.Tests 00:17:34 00:17:34 === TEST EXECUTION SUMMARY === 00:17:34 System.Net.Security.Tests Total: 44, Errors: 0, Failed: 1, Skipped: 0, Time: 4.134s ``` 4322 area-System.Net [NetworkInformation] Make last fixes tracked by issue #4060. This addresses the last two issues I have tracked in #4060. - When calling into System.Native for obtaining TCP and UDP socket connection information (current open/listening sockets), just bail if the first call fails, i.e. if the estimated buffer size is not big enough. This is what most code examples do that I have seen, and I have not personally seen the first call fail anyways. - Shim out MapTcpState for Linux. There was previously a function doing the same thing, but only for OSX, and only in the context of gather connection informations. I've pulled it out into a separate source file and made an implementation for both platforms. This replaces the hard-coded enum in the managed code. NOTE: I have kept the managed enum in the test project, because the static test files we are using are from a specific distribution, and we therefore need to account for that some way in the parsing logic in the test library. cc: @CIPop , @stephentoub . After this, the only remaining work item I have is implementing NetworkChange for OSX, which I've already started. 4323 area-System.Net NetworkStream doesn't retrieve all the data for the SqlClient Refer https://github.com/dotnet/corefx/issues/4273 While using stream.ReadAsync to retrieve data, the stream returns 0 bytes when data is expected from the server. This problem occurs on Windows, Linux and OSX while running the entity framework tests at https://github.com/aspnet/EntityFramework 4328 area-System.Net Disable System.Net.Security tests on Unix https://github.com/dotnet/corefx/issues/4317 https://github.com/dotnet/corefx/issues/4301 cc: @ellismg, @eerhardt, @shrutigarg 4329 area-System.Net Implement NetworkAddressChanged event on OSX This is the last work item I have for NetworkInformation. It addresses Issue #4058 . I'm using the OSX SystemConfiguration Framework to listen for notifications about network address changes. The implementation here works, but I'd like some feedback on the threading approach and the general style I've used for cleaning up the temporary OSX string objects that need to be created for the native calls. It's fairly messy right now. @sokket I followed your general example from FileSystemWatcher and adapted it a bit for this. Please take a look, @sokket, @stephentoub , @CIPop 4331 area-System.Net Fix 43 of the 44 failing System.Net.Security tests on Linux - System.Net.Sockets removed a bunch of APIs. They're somehow still in the contracts, so compilation succeeds, but they're not implementation, so the tests fail when trying to use methods like TcpClient.Connect and various Begin/End methods. I've changed these to use the appropriate Async methods. - SslStream has a Debug.Fail which has been failing regularly, but it wasn't being noticed. Now that Debug.Fail will throw an exception, the tests that were previously asserting are now failing. I've temporarily commented out the Debug.Fail with a TODO comment. One test is still failing: ``` System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_MismatchProtocols_Ssl2_Fails_Linux(server: Ssl2, client: Tls11, expected: typeof(System.Security.Authentication.AuthenticationException)) [FAIL] Assert.Throws() Failure Expected: typeof(System.Security.Authentication.AuthenticationException) Actual: typeof(System.InvalidOperationException): EndAuthenticate can only be called once for each asynchronous operation. Stack Trace: at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) ``` cc: @ellismg, @eerhardt, @bartonjs, @shrutigarg, @vijaykota, @CIPop, @josguil, @davidsh 4336 area-System.Security X509Certificates.Tests.ChainTests.BuildChain failing on CentOS http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_centos71_debug_tst/133/consoleFull ``` 18:57:46 System.Security.Cryptography.X509Certificates.Tests.ChainTests.BuildChain [FAIL] 18:57:46 Chain built validly 18:57:46 Expected: True 18:57:46 Actual: False 18:57:46 Stack Trace: 18:57:46 at System.Security.Cryptography.X509Certificates.Tests.ChainTests.BuildChain() 18:57:46 Finished: System.Security.Cryptography.X509Certificates.Tests ``` cc: @bartonjs, @ellismg 4337 area-System.Security ECDsaOpenSsl tests failing on CentOS http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_centos71_debug_tst/133/consoleFull ``` Interop+Crypto+OpenSslCryptographicException : error:100AE081:elliptic curve routines:EC_GROUP_new_by_curve_name:unknown group 19:01:48 Stack Trace: 19:01:48 at System.Security.Cryptography.ECDsaOpenSsl.GenerateKey() 19:01:48 at System.Lazy`1.CreateValue() 19:01:48 at System.Lazy`1.LazyInitValue() 19:01:48 at System.Security.Cryptography.ECDsaOpenSsl.SignHash(Byte[] hash) 19:01:48 at System.Security.Cryptography.ECDsa.SignData(Byte[] data, Int32 offset, Int32 count, HashAlgorithmName hashAlgorithm) 19:01:48 at System.Security.Cryptography.EcDsaOpenSsl.Tests.EcDsaOpenSslTests.Exercise(ECDsaOpenSsl e) 19:01:48 at System.Security.Cryptography.EcDsaOpenSsl.Tests.EcDsaOpenSslTests.KeySizeProp() 19:01:48 System.Security.Cryptography.EcDsaOpenSsl.Tests.EcDsaOpenSslTests.Ctor224 [FAIL] 19:01:48 Interop+Crypto+OpenSslCryptographicException : error:100AE081:elliptic curve routines:EC_GROUP_new_by_curve_name:unknown group 19:01:48 Stack Trace: 19:01:48 at System.Security.Cryptography.ECDsaOpenSsl.GenerateKey() 19:01:48 at System.Lazy`1.CreateValue() 19:01:48 at System.Lazy`1.LazyInitValue() 19:01:48 at System.Security.Cryptography.ECDsaOpenSsl.SignHash(Byte[] hash) 19:01:48 at System.Security.Cryptography.ECDsa.SignData(Byte[] data, Int32 offset, Int32 count, HashAlgorithmName hashAlgorithm) 19:01:48 at System.Security.Cryptography.EcDsaOpenSsl.Tests.EcDsaOpenSslTests.Exercise(ECDsaOpenSsl e) 19:01:48 at System.Security.Cryptography.EcDsaOpenSsl.Tests.EcDsaOpenSslTests.Ctor224() ``` Looks like this particular algorithm isn't available in the OpenSSL installed on the CentOS image. Can we install one that has them? cc: @bartonjs, @mmitche, @ellismg 4338 area-System.Globalization Several NumberFormatInfoCurrencyNegativePattern tests failing on CentOS "http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_centos71_debug_tst/133/consoleFull ``` 19:01:41 System.Globalization.Tests.NumberFormatInfoCurrencyNegativePattern.TestCurrencyNegativePatternLocale(locale: ""fr-CD"", expectedWindows: 4, expectedIcu: 8) [FAIL] 19:01:41 Assert.Equal() Failure 19:01:41 Expected: 8 19:01:41 Actual: 15 19:01:41 Stack Trace: 19:01:42 Finished: System.Reflection.Tests 19:01:42 19:01:42 === TEST EXECUTION SUMMARY === 19:01:42 System.Reflection.Tests Total: 677, Errors: 0, Failed: 0, Skipped: 0, Time: 1.694s 19:01:42 at System.Globalization.Tests.NumberFormatInfoCurrencyNegativePattern.TestCurrencyNegativePatternLocale(String locale, Int32 expectedWindows, Int32 expectedIcu) 19:01:42 System.Globalization.Tests.NumberFormatInfoCurrencyNegativePattern.TestCurrencyNegativePatternLocale(locale: ""en-US"", expectedWindows: 0, expectedIcu: 1) [FAIL] 19:01:42 Assert.Equal() Failure 19:01:42 Expected: 1 19:01:42 Actual: 0 19:01:42 Stack Trace: 19:01:42 at System.Globalization.Tests.NumberFormatInfoCurrencyNegativePattern.TestCurrencyNegativePatternLocale(String locale, Int32 expectedWindows, Int32 expectedIcu) 19:01:42 System.Globalization.Tests.NumberFormatInfoCurrencyNegativePattern.TestCurrencyNegativePatternLocale(locale: ""fa-IR"", expectedWindows: 3, expectedIcu: 1) [FAIL] 19:01:42 Assert.Equal() Failure 19:01:42 Expected: 1 19:01:42 Actual: 0 19:01:42 Stack Trace: 19:01:42 at System.Globalization.Tests.NumberFormatInfoCurrencyNegativePattern.TestCurrencyNegativePatternLocale(String locale, Int32 expectedWindows, Int32 expectedIcu) 19:01:42 System.Globalization.Tests.NumberFormatInfoCurrencyNegativePattern.TestCurrencyNegativePatternLocale(locale: ""fr-CA"", expectedWindows: 15, expectedIcu: 8) [FAIL] 19:01:42 Assert.Equal() Failure 19:01:42 Expected: 8 19:01:42 Actual: 15 19:01:42 Stack Trace: 19:01:42 at System.Globalization.Tests.NumberFormatInfoCurrencyNegativePattern.TestCurrencyNegativePatternLocale(String locale, Int32 expectedWindows, Int32 expectedIcu) 19:01:42 System.Globalization.Tests.NumberFormatInfoCurrencyNegativePattern.TestCurrencyNegativePatternLocale2(locale: ""en-CA"", expected: 1) [FAIL] 19:01:42 Assert.Equal() Failure 19:01:42 Expected: 1 19:01:42 Actual: 0 19:01:42 Stack Trace: 19:01:42 at System.Globalization.Tests.NumberFormatInfoCurrencyNegativePattern.TestCurrencyNegativePatternLocale2(String locale, Int32 expected) ``` cc: @steveharter, @ellismg " 4339 area-System.Data SqlClient fails on Ubuntu with exception While trying to connect to a database using SqlClient on Ubuntu, the following exception is encountered. The version of DNX used is : 1.0.0-rc1-16108 System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - A call to SSPI failed, see inner exception.) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean& marsCapable) at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, TimeoutTimer timeout) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at SqlClientError.Program.Main(String[] args) The error originates from SslStream.AuthenticateAsClient where the authentication fails. This is a regression from 1.0.0-rc1-16048 build where the authentication was succeeding for PreLogin handshake of the SqlClient. 4343 area-Meta Generate API docs grouped by .NET Platform Standard version from packages The same way we generated this list: https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/standard-platform.md#list-of-net-corefx-apis-and-their-associated-net-standard-platform-version-tentative It would be cool if we could generate an MSDN style API doc experience for the .NET Standard Platform versions. /cc @ericstj @richlander @Petermarcu 4346 area-System.Data "SqlClient connection with ""instance""" "If I establish a connection with SqlClient using the ""server\instance"" data source syntax this works fine on windows. On Linux it fails with a host resolution error. If I monitor with Wireshark, I can see the DNS query being executed but it is searching for serverinstance - i.e. it concatenates the both the service and the instance into one host name - which then fails. Is anyone else seeing this ? " 4347 area-System.Net Merge changes from TFS 4351 area-System.Net Adjust System.Net.Sockets implementation to match contract The System.Net.Sockets 4.1 contract (refs folder) does NOT have public methods for Socket.Close() or NetworkStream.Close(). However, the implementional DLL was still having public methods for these. Changed the 'public' to 'internal' for the Close() methods and removed a test that isn't needed anymore. 4352 area-System.Net Avoid delegate and closure allocations in System.Net.Sockets 4355 area-Serialization Remove project reference to System.Runtime.Serialization.Primitives from System.Private.DataContractSerialization "The project reference should be removed from csproj and put into project.json. 151 152 {CDF0ACB5-1361-4E48-8ECB-22E8022F5F01} 153 System.Runtime.Serialization.Primitives 154 " 4357 area-System.Net TCPClient.ReceiveTimeout should be in Milliseconds ? Based on MSDN TCPCleint.ReceiveTimeout should be in Millisecond. https://msdn.microsoft.com/en-us/library/system.net.sockets.tcpclient.receivetimeout(v=vs.110).aspx But when I read the code it said in second. https://github.com/dotnet/corefx/blob/master/src/System.Net.Sockets/src/System/Net/Sockets/TCPClient.cs#L328 Which one is correct ? 4360 area-System.Reflection Fixup previous merge from master -> dev/metadata - Dead files were left behind - Doc comment fix was merged incorrectly 4361 area-System.Data SqlCommand Timeout = 0 should behave as infinite timeout SqlCommand Timeout = 0 should behave as infinite timeout 4363 area-System.Net BeginSend_AsyncOperationCompletes_Success failure in CI on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx_prtest/6206/ ``` System.Net.Sockets.Tests.UdpClientTest.BeginSend_AsyncOperationCompletes_Success MESSAGE: System.Net.Sockets.SocketException : An address incompatible with the requested protocol was used +++++++++++++++++++ STACK TRACE: at System.Net.Sockets.Socket.DoBeginSendTo(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint endPointSnapshot, SocketAddress socketAddress, OverlappedAsyncResult asyncResult) in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs:line 2955 at System.Net.Sockets.Socket.BeginSendTo(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint remoteEP, AsyncCallback callback, Object state) in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs:line 2900 at System.Net.Sockets.UdpClient.BeginSend(Byte[] datagram, Int32 bytes, IPEndPoint endPoint, AsyncCallback requestCallback, Object state) in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets\src\System\Net\Sockets\UDPClient.cs:line 297 at System.Net.Sockets.UdpClient.b__4(Byte[] targetDatagram, Int32 targetBytes, IPEndPoint targetEndpoint, AsyncCallback callback, Object state) in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets\src\System\Net\Sockets\UDPClient.cs:line 618 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl[TArg1,TArg2,TArg3](Func`6 beginMethod, Func`2 endFunction, Action`1 endAction, TArg1 arg1, TArg2 arg2, TArg3 arg3, Object state, TaskCreationOptions creationOptions) at System.Threading.Tasks.TaskFactory`1.FromAsync[TArg1,TArg2,TArg3](Func`6 beginMethod, Func`2 endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, Object state) at System.Net.Sockets.UdpClient.SendAsync(Byte[] datagram, Int32 bytes, IPEndPoint endPoint) in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets\src\System\Net\Sockets\UDPClient.cs:line 617 at System.Net.Sockets.UdpClientAPMExtensions.BeginSend(UdpClient client, Byte[] datagram, Int32 bytes, IPEndPoint endPoint, AsyncCallback requestCallback, Object state) in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\Common\src\System\Net\Sockets\SocketAPMExtensions.cs:line 1184 at System.Net.Sockets.Tests.UdpClientTest.BeginSend_AsyncOperationCompletes_Success() in d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Sockets.Legacy\tests\FunctionalTests\UdpClientTest.cs:line 51 ``` 4364 area-System.Net GetAsync_AllowAutoRedirectFalse_RedirectFromHttpToHttp_StatusCodeRedirect failed in CI on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug_prtest/5997/console ``` System.Net.Http.Functional.Tests.HttpClientHandlerTest.GetAsync_AllowAutoRedirectFalse_RedirectFromHttpToHttp_StatusCodeRedirect [FAIL] Assert.Equal() Failure Expected: Redirect Actual: NotFound Stack Trace: d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Net.Http\tests\FunctionalTests\HttpClientHandlerTest.cs(217,0): at System.Net.Http.Functional.Tests.HttpClientHandlerTest.d__45.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` 4365 area-System.Data System.Data Should surface the internal exceptions Currently all the internal exceptions received by System.Data are being wrapped around as SNI error codes. These exceptions should be surfaced in the exception stack trace so that the reason for exception is knows. This is needed in the managed SNI components of System.Data where we are relying on other .Net components for networking etc. 4366 area-System.Net Array Segment change in Global Log When length was equal to 0, bufferSegment was not correctly initialized and does not let logging work. Instead of copying from a loop, now we use the ArraySegment constructor for this, which has a better behavior when length is 0. 4368 area-System.Data Refactor SNIHandle.ReceivePacket to use out instead of ref "https://github.com/dotnet/corefx/blob/master/src/System.Data.SqlClient/src/System/Data/SqlClient/SNI/SNITcpHandle.cs#L269 I think we should refactor this to use ""out"" instead of ref. As it can lead to confusion whether that Packet is always null or there may have initialized object. Especially when the decision of releasing that packet. If it designed to always null, then we should use ""out"" instead. " 4369 area-System.Net Delete SslStreamAPMExtensions.cs from System.Net.Security tests After https://github.com/dotnet/corefx/pull/4331, it's now dead code. cc: @CIPop, @josguil, @davidsh 4370 area-System.Net Remove non-Windows clutter from WinHttpHandler sln/projs This project is and will always be Windows-specific. There's no need for all of the placeholders related to non-Windows targets. cc: @davidsh 4371 area-System.Reflection Why GetRuntimeFields return non public field vs GetRuntimeField return public only flags ? Why GetRuntimeFields return non public field vs GetRuntimeField return public only flags ? ``` public static IEnumerable GetRuntimeFields(this Type type) { return type.GetFields(defaultNonPublicFlags).AsNothingButIEnumerable(); } public static FieldInfo GetRuntimeField(this Type type, String name) { return type.GetField(name, defaultPublicFlags); } ``` 4373 area-Meta .NET Platform Standard Document - Some Ideas to improve it "I was reading the "".NET Platform Standard"" document. I liked it a lot, but there are some details where I would love some clarification in the document - It is about the Platform Standard. Nevertheless, many will use the netstandard TFMs for their libraries. So when speaking of ""Reference Assembly"" and ""Implementation Assembly"", I think we need a very clear separation between a library targeting a netstandard which is - distributed by an normal library developer which is portable (he delivers a nuget package with a ref and a implementation assembly (or only a impl?)) - distributed by an normal library developer which is not portable (bait and switch) - a library like System.IO which is 99% delivered as part of the platform which is not portable (which has a ref assembly and a implementation assembly per platform, in the platform), but nevertheless has a NuGet package. How does that work (only ref?). - a library like System.Xml.XDocument which is part of the CoreFx, which is portable which future platforms should just use via NuGet but some older platforms may still have as a implementation assembly in the platform. - I would add a line stating that targeting a lower platform standard is preferable. - In the CoreFx list a classification which library is portable, sometimes portable and always platform specific would be nice - A word about how the NuGet packages of the netstandard (e.g. System.IO) build only with their refs and their implementation assemblies as part of the platforms (they are build and shipped with them, e.g. in coreclr). I think it should be clarified that the public NuGet which reflect platform features only have refs. @davidfowl @AArnott ps: I am surely not 100% accurate here. I just think myself into nuget3, DNX, corefx, coreclr, etc. and jump on any documentation I get. " 4375 area-System.Linq Expression.Property should reject indexers - SecurityException "Generates invalid IL ``` csharp Expression.Lambda>( Expression.Property( Expression.Default(typeof(List)), typeof(List).GetProperty(""Item"") ) ).Compile()(); ``` with exception ``` System.Security.VerificationException: Operation could destabilize the runtime. ``` Simple fix in expression factories to reject indexers. " 4376 area-System.Xml DtdProcessing.Parse missing Not sure if I am doing something wrong, but how do I access DtdProcessing.Parse enum value in corefx? There seems to be a Parse static method as well now, so getting this compilation error: ``` DNXCore,Version=v5.0 error CS0428: Cannot convert method group 'Parse' to non-delegate type 'DtdProcessing'. Did you intend to invoke the method? ``` Any advice? 4379 area-System.Collections Implementation of IStructuralEquatable.GetHashCode in Array class consider just element with 0 index "This is the implementation: ``` int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) { if (comparer == null) { throw new ArgumentNullException(""comparer""); } int num = 0; for (int i = (this.Length >= 8) ? (this.Length - 8) : 0; i < this.Length; i++) { num = CombineHashCodes(num, comparer.GetHashCode(this.GetValue(0))); } return num; } ``` As you can see the CombineHashCodes keeps combining the hashcode of element with 0 index. This makes array as new[]{""aa"",""bb""} and new[]{""aa"",""cc""} to have the same hashcode. And the probability that there are array with the first element equal is usually higher. " 4381 area-System.Net Change TCPClient.ReceiveTimeout comment into Milliseconds #4357 4382 area-System.Net Update HttpStatusCode enum with updates # Latest Proposal We should update current [HttpStatusCode](https://github.com/dotnet/corefx/blob/bffef76f6af208e2042a2f27bc081ee908bb390b/src/System.Net.Primitives/src/System/Net/HttpStatusCode.cs) to include more official status codes defined in recent RFCs. ## Proposed API ```diff public enum HttpStatusCode { // Informational 1xx Continue = 100, SwitchingProtocols = 101, + Processing = 102, + EarlyHints = 103, // Successful 2xx OK = 200, Created = 201, Accepted = 202, NonAuthoritativeInformation = 203, NoContent = 204, ResetContent = 205, PartialContent = 206, + MultiStatus = 207, + AlreadyReported = 208, + IMUsed = 226, // Redirection 3xx MultipleChoices = 300, Ambiguous = 300, MovedPermanently = 301, Moved = 301, Found = 302, Redirect = 302, SeeOther = 303, RedirectMethod = 303, NotModified = 304, UseProxy = 305, Unused = 306, TemporaryRedirect = 307, RedirectKeepVerb = 307, + PermanentRedirect = 308, // Client Error 4xx BadRequest = 400, Unauthorized = 401, PaymentRequired = 402, Forbidden = 403, NotFound = 404, MethodNotAllowed = 405, NotAcceptable = 406, ProxyAuthenticationRequired = 407, RequestTimeout = 408, Conflict = 409, Gone = 410, LengthRequired = 411, PreconditionFailed = 412, RequestEntityTooLarge = 413, RequestUriTooLong = 414, UnsupportedMediaType = 415, RequestedRangeNotSatisfiable = 416, ExpectationFailed = 417, + // Removed status code: ImATeapot = 418, + MisdirectedRequest = 421, + UnprocessableEntity = 422, + Locked = 423, + FailedDependency = 424, UpgradeRequired = 426, + PreconditionRequired = 428, + TooManyRequests = 429, + RequestHeaderFieldsTooLarge = 431, + UnavailableForLegalReasons = 451, // Server Error 5xx InternalServerError = 500, NotImplemented = 501, BadGateway = 502, ServiceUnavailable = 503, GatewayTimeout = 504, HttpVersionNotSupported = 505, + VariantAlsoNegotiates = 506, + InsufficientStorage = 507, + LoopDetected = 508, + NotExtended = 510, + NetworkAuthenticationRequired = 511, } ``` ## Details Values added from WinRT: [Windows.Web.Http.HttpStatusCode](https://docs.microsoft.com/en-us/uwp/api/windows.web.http.httpstatuscode): ``` AlreadyReported FailedDependency IMUsed InsufficientStorage Locked LoopDetected MultiStatus NetworkAuthenticationRequired None (not sure what's this, not added) NotExtended PermanentRedirect PreconditionRequired Processing RequestHeaderFieldsTooLarge TooManyRequests UnprocessableEntity VariantAlsoNegotiates ``` * [RFC 2324](https://tools.ietf.org/html/rfc2324): `ImATeapot` * [RFC 7540](https://tools.ietf.org/html/rfc7540): `MisdirectedRequest` * [RFC 7725](https://tools.ietf.org/html/rfc7725): `UnavailableForLegalReasons` * [RFC 8297](https://tools.ietf.org/html/rfc8297): `EarlyHints` # Original Proposal Please update with codes from RFCs 2817, 5785, 6266, 6585. 4383 area-System.Collections Fix Culture bug around NameValueCollection tests Some tests for NameValueCollection were setting the DefaultThreadCurrentCulture to Turkish and not resetting it back to the default. This was causing failures in the HybridDictionary tests that were running concurrently with these tests. I refactored the code to instead use CurrentCulture and also added a try/finally to reset the CurrentCulture just to be safe. Resloves #1136 @stephentoub 4385 area-System.Runtime Replace windows RTLGetVersion with a better win32 version api that will work on all platforms. This change will affect the output of `RuntimeInformation.OSDecription` on windows. This API and several other documented version APIs for windows are not available on onecoreuwp and hence will fail WACK test for .NET Native. This work item tracks sync up with windows team to either expose these to onecoreuwp or for better alternatives. 4386 area-System.Net Cleanup System.Net.Requests tests Switch remaining tests to use the new test server. Fix up 'var' usage. Use 'async Task' pattern and 'await' instead of GetResult() for tests. 4388 area-Infrastructure Test baseline is wrong We need to investigate the bits that we use for testing in corefx and for CI. Today each test decides which dependencies are live (via ProjectReferences) or baseline (via packages). Additionally the baseline is only updated periodically. This can lead us to a place where folks commit bits that might work independently by not together. For TOF, internally, folks are solving this by always using a fixed set of packages after they are produced by the build. In CoreFx we don't yet build the packages in build, so we have the [TestWithLocalLibraries](https://github.com/dotnet/buildtools/blob/master/src/Microsoft.DotNet.Build.Tasks/PackageFiles/publishtest.targets#L75) property, but I don't know if this is used in CI or local dev builds. Also I don't think this will currently work for linux/OS due to the assumed DLL pattern. Finally it looks to me like our RC builds are still pulling packages from the [master feed](https://github.com/dotnet/corefx/blob/release/1.0.0-rc1/dir.props#L77). /cc @joshfree @weshaggard 4389 area-System.Net Removing the X509Chain shim from System.Net.Security Adding code proposed by @bartonjs and remving the X509CertificateExtensions shim. Changing the test server and client certificates (pending https://github.com/dotnet/corefx-testdata/pull/3) and adding a few e2e tests. Related: #3114. 4391 area-System.Runtime Add version information to FrameworkDescription. What version string is expected for .NET Framework, .NET Core and .NET Native. +PM @terrajobst on providing insight with marketing names. cc @weshaggard cc @gkhanna79 To provide insight on runtime side. @davidfowl Please provide more data on how useful knowing version of framework is, and what you expect for the 3 different framework stacks. 4396 area-System.Net Called on completed result assert in Socket APM tests on Linux http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst_prtest/4193/console ``` 16:36:36 Unhandled Exception: System.Diagnostics.Debug+DebugAssertException: LazyAsyncResult#1978366::set_Result() 16:36:36 Called on completed result. 16:36:36 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 16:36:36 at System.Environment.get_StackTrace() 16:36:36 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 16:36:36 at System.Net.GlobalLog.Assert(String message, String detailMessage) 16:36:36 at System.Net.GlobalLog.Assert(Boolean condition, String messageFormat, Object[] data) 16:36:36 at System.Net.LazyAsyncResult.set_Result(Object value) 16:36:36 at System.Net.Sockets.BaseOverlappedAsyncResult.CheckAsyncCallOverlappedResult(SocketError errorCode) 16:36:36 at System.Net.Sockets.Socket.DoBeginAccept(Socket acceptSocket, Int32 receiveSize, AcceptOverlappedAsyncResult asyncResult) 16:36:36 at System.Net.Sockets.Socket.BeginAccept(Socket acceptSocket, Int32 receiveSize, AsyncCallback callback, Object state) 16:36:36 at System.Net.Sockets.Socket.BeginAccept(Int32 receiveSize, AsyncCallback callback, Object state) 16:36:36 at System.Net.Sockets.Socket.BeginAccept(AsyncCallback callback, Object state) 16:36:36 at System.Net.Sockets.SocketTaskExtensions.b__0(AsyncCallback callback, Object state) 16:36:36 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions) 16:36:36 at System.Net.Sockets.SocketTaskExtensions.AcceptAsync(Socket socket) 16:36:36 at System.Net.Sockets.SocketAPMExtensions.BeginAccept(Socket socket, AsyncCallback callback, Object state) 16:36:36 at System.Net.Sockets.Tests.SocketTestServerAPM.OnAccept(IAsyncResult result) 16:36:36 at System.Threading.Tasks.TaskToApm.<>c__DisplayClass1.b__0() 16:36:36 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 16:36:36 at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask) 16:36:36 at System.Threading.Tasks.Task.FinishContinuations() 16:36:36 at System.Threading.Tasks.Task`1.TrySetResult(TResult result) 16:36:36 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 16:36:36 at System.Net.LazyAsyncResult.Complete(IntPtr userToken) 16:36:36 at System.Net.ContextAwareResult.CompleteCallback(Object state) 16:36:36 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 16:36:36 at System.Net.ContextAwareResult.Complete(IntPtr userToken) 16:36:36 at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken) 16:36:36 at System.Net.LazyAsyncResult.InvokeCallback(Object result) 16:36:36 at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionCallback(Int32 numBytes, SocketError errorCode) 16:36:36 at System.Net.Sockets.AcceptOverlappedAsyncResult.CompletionCallback(Int32 acceptedFileDescriptor, Byte[] socketAddress, Int32 socketAddressLen, SocketError errorCode) 16:36:36 at System.Net.Sockets.SocketAsyncContext.AcceptOperation.InvokeCallback() 16:36:36 at System.Net.Sockets.SocketAsyncContext.AsyncOperation.b__26(Object o) 16:36:36 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 16:36:36 at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() 16:36:36 at System.Threading.ThreadPoolWorkQueue.Dispatch() 16:36:36 at System.Diagnostics.Debug.UnixDebugLogger.ShowAssertDialog(String stackTrace, String message, String detailMessage) 16:36:36 at System.Net.GlobalLog.Assert(String message, String detailMessage) 16:36:36 at System.Net.GlobalLog.Assert(Boolean condition, String messageFormat, Object[] data) 16:36:36 at System.Net.LazyAsyncResult.set_Result(Object value) 16:36:36 at System.Net.Sockets.BaseOverlappedAsyncResult.CheckAsyncCallOverlappedResult(SocketError errorCode) 16:36:36 at System.Net.Sockets.Socket.DoBeginAccept(Socket acceptSocket, Int32 receiveSize, AcceptOverlappedAsyncResult asyncResult) 16:36:36 at System.Net.Sockets.Socket.BeginAccept(Socket acceptSocket, Int32 receiveSize, AsyncCallback callback, Object state) 16:36:36 at System.Net.Sockets.Socket.BeginAccept(Int32 receiveSize, AsyncCallback callback, Object state) 16:36:36 at System.Net.Sockets.Socket.BeginAccept(AsyncCallback callback, Object state) 16:36:36 at System.Net.Sockets.SocketTaskExtensions.b__0(AsyncCallback callback, Object state) 16:36:36 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions) 16:36:36 at System.Net.Sockets.SocketTaskExtensions.AcceptAsync(Socket socket) 16:36:36 at System.Net.Sockets.SocketAPMExtensions.BeginAccept(Socket socket, AsyncCallback callback, Object state) 16:36:36 at System.Net.Sockets.Tests.SocketTestServerAPM.OnAccept(IAsyncResult result) 16:36:36 at System.Threading.Tasks.TaskToApm.<>c__DisplayClass1.b__0() 16:36:36 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 16:36:36 at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask) 16:36:36 --- End of stack trace from previous location where exception was thrown --- 16:36:36 at System.Threading.Tasks.AwaitTaskContinuation.<>c.b__18_0(Object s) 16:36:36 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 16:36:36 at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() 16:36:36 at System.Threading.ThreadPoolWorkQueue.Dispatch() 16:36:36 ./run-test.sh: line 130: 61302 Aborted (core dumped) ./corerun xunit.console.netcore.exe $testDllName -xml testResults.xml -notrait category=failing -notrait category=OuterLoop -notrait category=$xunitOSCategory 16:36:36 One or more tests failed while running tests from 'System.Net.Sockets.APMServer.Tests'. Exit code 134. ``` cc: @pgavlin, @cipop, @davidsh 4397 area-System.Diagnostics Perf_Process.Kill test failed in CI on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_debug_prtest/6046/console ``` System.InvalidOperationException : Cannot process request because the process (10824) has exited. Stack Trace: d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Diagnostics.Process\src\System\Diagnostics\Process.Windows.cs(810,0): at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Diagnostics.Process\src\System\Diagnostics\Process.Windows.cs(839,0): at System.Diagnostics.Process.GetProcessHandle(Int32 access) d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Diagnostics.Process\src\System\Diagnostics\Process.Windows.cs(71,0): at System.Diagnostics.Process.Kill() d:\j\workspace\dotnet_corefx_windows_debug_prtest\src\System.Diagnostics.Process\tests\Performance\Perf.Process.cs(30,0): at System.Diagnostics.Tests.Perf_Process.Kill() ``` 4400 area-System.Linq Expression.VisitBlock throws NullReferenceException if only variables change Repro: ``` csharp static void Repro() { new V().Visit(Expression.Block(new[] { Expression.Parameter(typeof(int)) }, Expression.Empty())); } class V : ExpressionVisitor { protected override Expression VisitParameter(ParameterExpression node) { return Expression.Parameter(node.Type, node.Name); } } ``` This came up when writing a variable substitution visitor to eliminate aliasing of variables. The issue is in the loop at the end of `VisitBlock` making the assumption that the array cannot be null. It will only be non-null if at least one expression in the block was rewritten. 4403 area-System.Net Consolidate some shared Linux/OSX code in NetworkInformation The same code was duplicated in both the Linux and OSX implementations, when it could instead be on the base Unix implementation. This also results in a better error message being used on OS X. cc: @mellinoe, @cipop 4405 area-Serialization Serializing a TimeSpan writes an empty element ``` using System; using System.IO; using System.Text; using System.Xml; using System.Xml.Serialization; public class Program { public static void Main() { var dummy = new Dummy { Value = TimeSpan.FromSeconds(1) }; Console.WriteLine(dummy.Value); Console.WriteLine(XmlConvert.ToString(dummy.Value)); var stringBuilder = new StringBuilder(); var serializer = new XmlSerializer(dummy.GetType()); using (var writer = new StringWriter(stringBuilder)) { serializer.Serialize(writer, dummy); } var xml = stringBuilder.ToString(); Console.WriteLine(); Console.Write(xml); } public class Dummy { public TimeSpan Value { get; set; } } } ``` Outputs `` This is not pit of success. [Sample](https://dotnetfiddle.net/t6tE23) 4406 area-System.Runtime Additional coverage for GetEnvironmentVariable for empty variable We should add some more tests around GetEnvironmentVariable when the value of the environment variable is an empty string. This is not possible on Windows, but should be possible on other platforms. 4410 area-Infrastructure Performance testing I'm trying to write own performance test but get the following error. `msbuild /t:RebuildAndTest /p:Performance=true /p:Configuration=Release` ``` System.IO.FileLoadException : Could not load file or assembly 'xunit.pe rformance.core, Version=1.0.0.26, Culture=neutral, PublicKeyToken=67066efe964 d3b03' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Stack Trace: at Microsoft.Xunit.Performance.BenchmarkTestInvoker.CallTestMetho d(Object testClassInstance) --- End of stack trace from previous location where exception was th rown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAn dDebuggerNotification(Task task) --- End of stack trace from previous location where exception was th rown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAn dDebuggerNotification(Task task) ``` @ianhays 4411 area-System.Reflection There is no way to make a reflection call to a method with ref parameters while preserving aliasing nature of ref VSadov: while passing parameters byref can be modeled through passing mutable object[] + copybacks. It is not the same as truly passing arguments byref. Some methods, like ones from Interlocked family, rely on aliasing nature of ref and the difference is observable. Since all the calls in Interpreter are done via reflection, we cannot interpret certain calls correctly due to insufficient APIs. ============== Unlike the expression compiler where address-obtaining instructions are used to call by reference, the expression interpreter has to perform copy operations in and out of an arguments array upon calling the `Invoke` method. As a result, calls to constructs like `Interlocked` methods don't have the intended effect. An example repro is shown below: ``` csharp var inc = ReflectionUtils.MethodInfoOf((int x) => Interlocked.Increment(ref x)); var run = ReflectionUtils.MethodInfoOf(() => Task.Run(default(Action))); var all = ReflectionUtils.MethodInfoOf(() => Task.WaitAll(default(Task), default(Task))); var p = Expression.Parameter(typeof(int)); var n = Expression.Parameter(typeof(int)); var i = Expression.Parameter(typeof(int)); var b = Expression.Label(); var l = Expression.Block( new[] { i }, Expression.Loop( Expression.Block( Expression.IfThen( Expression.Equal(i, n), Expression.Break(b) ), Expression.Call(inc, p), Expression.PostIncrementAssign(i) ), b ) ); var a = Expression.Lambda(l); var t = Expression.Call(run, a); var e = Expression.Block( new[] { p }, Expression.Call(all, Expression.NewArrayInit(typeof(Task), t, t)), p ); var f = Expression.Lambda>(e, n).Compile(); ``` One would expect f(N) to return 2 \* N. This is the case for the compiler, but not for the interpreter. 4414 area-System.Net Cleanup System.Net.Http tests - Move more tests to the new test server - Cleanup 'var' coding patterns - Remove duplicate tests (*Content clas related) that are already covered with the *Content class tests - Utiilize the newer test server VerifyUpload endpoint which does 'Content-MD5' verification of transmitted payload to the server as well as payload from the server - Add GZip related tests in addition to Deflate compression schemes 4416 area-System.Net Cleanup System.Net.Http.WinHttpHandler tests - Move tests to the new test server - Fixup an SSL certificate test to handle wildcard certs - Remove HttpTestServers.cs file. The next PR will then rename HttpTestServers2.cs to HttpTestServers.cs 4417 area-System.Net Rename HttpTestServers2.cs to HttpTestServers.cs @CIPop @stephentoub PTAL 4420 area-System.Net Failed Debug.Assert in SendAsync_SendRequestUsingMethodToEchoServerWithContent_Success on Linux "http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst_prtest/4225/console ``` 14:05:57 System.Net.Http.Functional.Tests.HttpClientHandlerTest.SendAsync_SendRequestUsingMethodToEchoServerWithContent_Success(method: ""GET"", secureServer: True) [FAIL] 14:05:57 System.Diagnostics.Debug+DebugAssertException : The task must have completed if we're getting called back. 14:05:57 14:05:57 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 14:05:57 at System.Environment.get_StackTrace() 14:05:57 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 14:05:57 at System.Net.Http.CurlHandler.MultiAgent.TransferDataFromRequestStream(IntPtr buffer, Int32 length, EasyRequest easy) 14:05:57 at System.Net.Http.CurlHandler.MultiAgent.CurlSendCallback(IntPtr buffer, UInt64 size, UInt64 nitems, IntPtr context) 14:05:57 at Interop.Http.MultiPerform(SafeCurlMultiHandle multiHandle) 14:05:57 at Interop.Http.MultiPerform(SafeCurlMultiHandle multiHandle) 14:05:57 at System.Net.Http.CurlHandler.MultiAgent.WorkerLoop() 14:05:57 at System.Net.Http.CurlHandler.MultiAgent.b__14(Object s) 14:05:57 at System.Threading.Tasks.Task.Execute() 14:05:57 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 14:05:57 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 14:05:57 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 14:05:57 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 14:05:57 Stack Trace: 14:05:57 at System.Diagnostics.Debug.UnixDebugLogger.ShowAssertDialog(String stackTrace, String message, String detailMessage) 14:05:57 at System.Net.Http.CurlHandler.MultiAgent.TransferDataFromRequestStream(IntPtr buffer, Int32 length, EasyRequest easy) 14:05:57 at System.Net.Http.CurlHandler.MultiAgent.CurlSendCallback(IntPtr buffer, UInt64 size, UInt64 nitems, IntPtr context) 14:05:57 --- End of stack trace from previous location where exception was thrown --- 14:05:57 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:05:57 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:05:57 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() 14:05:57 at System.Net.Http.StreamToStreamCopy.d__0.MoveNext() 14:05:57 --- End of stack trace from previous location where exception was thrown --- 14:05:57 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:05:57 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:05:57 at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() 14:05:57 at System.Net.Http.Functional.Tests.HttpClientHandlerTest.d__12e.MoveNext() 14:05:57 --- End of stack trace from previous location where exception was thrown --- 14:05:57 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:05:57 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:05:57 --- End of stack trace from previous location where exception was thrown --- 14:05:57 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:05:57 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:05:57 --- End of stack trace from previous location where exception was thrown --- 14:05:57 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:05:57 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` " 4421 area-System.Net Some System.Net.Primitive Tests Covered: - IPAddress - IPEndPoint - DnsEndPoint - EndPoint - Cookie - CookieCollection - CookieContainer - NetworkCredential - SystemCredential - CredentialCache 4422 area-System.Net Disable test BeginSend_AsyncOperationCompletes_Success Issue #4363 4423 area-System.Net ReceiveFromAsyncV4BoundToSpecificV4_Success timed out in CI on Windows ``` Discovering: System.Net.Sockets.Tests Discovered: System.Net.Sockets.Tests Starting: System.Net.Sockets.Tests System.Net.Sockets.Tests.DualMode.ReceiveFromAsyncV4BoundToSpecificV4_Success [FAIL] System.TimeoutException : The operation has timed out. Stack Trace: d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Sockets\tests\FunctionalTests\DualModeSocketTest.cs(596,0): at System.Net.Sockets.Tests.DualMode.ReceiveFromAsync_Helper(IPAddress listenOn, IPAddress connectTo) Finished: System.Net.Sockets.Tests ``` 4425 area-Meta A contributors team on the Stack Overflow Teams beta Stack Overflow just started a private beta of [Teams](http://meta.stackoverflow.com/questions/309716/the-teams-private-beta-is-starting) where you create a page around an OSS project, team, company, etc. I wondered whether people are interested in joining such a team page around corefx contributions? If so it can be done by clicking [here](http://stackoverflow.com/teams/98/corefx-contributors/join?auth=12806578-0500-4963-8821-399d75de5ee4) 4428 area-System.Data Refactor SNI 'ref' to use 'out' 4429 area-System.Net System.Net.WebSockets.Client hangs when blocking a callback thread The effective sequence of events (this isn't the actual code, it's a lot more convoluted and disjoint so it's a lot of work to change) is this: ``` csharp var result = await _webSocket.ReceiveAsync(new ArraySegment(buffer, 0, _receiveBufferSize), _ct); result = _webSocket.ReceiveAsync(new ArraySegment(buffer, 0, _receiveBufferSize), _ct).GetAwaiter().GetResult(); ``` The second ReceiveAsync never completes. Here is the bottom of the call stack. Further up won't help any, it eventually calls _webSocket.ReceiveAsync() and ends up blocking in TaskAwaiter<int>.GetResult(). ``` system.private.servicemodel.dll!System.ServiceModel.Channels.WebSocketTransportDuplexSessionChannel.WebSocketMessageSource.PrepareMessage(System.Net.WebSockets.WebSocketReceiveResult result, byte[] buffer, int count) Line 891 C# system.private.servicemodel.dll!System.ServiceModel.Channels.WebSocketTransportDuplexSessionChannel.WebSocketMessageSource.StartNextReceiveAsync() Line 815 C# [Resuming Async Method] mscorlib.ni.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown mscorlib.ni.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() Unknown mscorlib.ni.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.OutputAsyncCausalityEvents.AnonymousMethod__0() Unknown mscorlib.ni.dll!System.Runtime.CompilerServices.TaskAwaiter.OutputWaitEtwEvents.AnonymousMethod__0() Unknown mscorlib.ni.dll!System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action action, bool allowInlining, ref System.Threading.Tasks.Task currentTask) Unknown mscorlib.ni.dll!System.Threading.Tasks.Task.FinishContinuations() Unknown mscorlib.ni.dll!System.Threading.Tasks.Task.TrySetResult(System.__Canon result) Unknown mscorlib.ni.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder.SetResult(System.Net.WebSockets.WebSocketReceiveResult result) Unknown system.net.websockets.client.dll!System.Net.WebSockets.WinHttpWebSocket.ReceiveAsync(System.ArraySegment buffer, System.Threading.CancellationToken cancellationToken) Unknown mscorlib.ni.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown mscorlib.ni.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() Unknown mscorlib.ni.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.OutputAsyncCausalityEvents.AnonymousMethod__0() Unknown mscorlib.ni.dll!System.Runtime.CompilerServices.TaskAwaiter.OutputWaitEtwEvents.AnonymousMethod__0() Unknown mscorlib.ni.dll!System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action action, bool allowInlining, ref System.Threading.Tasks.Task currentTask) Unknown mscorlib.ni.dll!System.Threading.Tasks.Task.FinishContinuations() Unknown mscorlib.ni.dll!System.Threading.Tasks.Task.TrySetResult(bool result) Unknown mscorlib.ni.dll!System.Threading.Tasks.TaskCompletionSource.TrySetResult(bool result) Unknown system.net.websockets.client.dll!System.Net.WebSockets.WinHttpWebSocketCallback.OnWebSocketReadComplete(System.Net.WebSockets.WinHttpWebSocketState state, Interop.WinHttp.WINHTTP_WEB_SOCKET_STATUS info) Unknown system.net.websockets.client.dll!System.Net.WebSockets.WinHttpWebSocketCallback.WebSocketCallback(System.IntPtr handle, System.Net.WebSockets.WinHttpWebSocketState state, uint internetStatus, System.IntPtr statusInformation, uint statusInformationLength) Unknown system.net.websockets.client.dll!System.Net.WebSockets.WinHttpWebSocketCallback.WinHttpCallback(System.IntPtr handle, System.IntPtr context, uint internetStatus, System.IntPtr statusInformation, uint statusInformationLength) Unknown ``` I tried removing the following code from WinHttpWebSocket.InitializeWinHttp but it made no difference: ``` uint optionAssuredNonBlockingTrue = 0; // TRUE if (!Interop.WinHttp.WinHttpSetOption( sessionHandle, Interop.WinHttp.WINHTTP_OPTION_ASSURED_NON_BLOCKING_CALLBACKS, ref optionAssuredNonBlockingTrue, (uint)Marshal.SizeOf())) { WinHttpException.ThrowExceptionUsingLastError(); } ``` As an experiment, I changed our call to PrepareMessage to use await Task.Run instead and everything started working. 4431 area-System.Net ReceiveFromAsyncV6BoundToAnyV6_Success failed due to timeouts in CI on Windows This has failed due to timeouts a few times recently. http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_release_prtest/6089/consoleFull ``` System.Net.Sockets.Tests.DualMode.ReceiveFromAsyncV6BoundToAnyV6_Success [FAIL] System.TimeoutException : The operation has timed out. Stack Trace: d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Sockets\tests\FunctionalTests\DualModeSocketTest.cs(596,0): at ``` 4434 area-Infrastructure Enable CMake sanitizers for coreclr This enables the CMake sanitizers for coreclr including all native code (clr and pal layers). The sanitizers include Address Sanitizer, Undefined Behavior Sanitizer, and Leak Sanitizer. See http://clang.llvm.org/docs/UsersManual.html (search for sanitize) http://clang.llvm.org/docs/AddressSanitizer.html http://clang.llvm.org/docs/LeakSanitizer.html It works in debug mode only and is enabled by running enablesanitizers.sh (a new shell script). Performance hit is approx. 50% slower to build and test (unknown since tests abort currently due to sanitizers failure). Size of libraries doubles. Enabling sanitizers including fixing cryptic linker errors where the header files includes methods that don't have a corresponding implementation. Normally those methods are dropped by the linker because they are unused\dead code but not with address sanitizer enabled. Current code: https://github.com/dotnet/coreclr/compare/master...steveharter:CMake 4438 area-System.Data Mars - Intermittently Failed - Causing Timeout "Repro ``` using (var conn = new SqlConnection(""Data Source=***; User ID=***; Password=***;Initial Catalog=***;MultipleActiveResultSets=true;"")) { conn.Open(); var cmdText = ""select 1""; var cmd1 = new SqlCommand(cmdText, conn); var cmd2 = new SqlCommand(cmdText, conn); Console.WriteLine(""{0:hh:mm:ss} - Execute Reader 1"", DateTime.Now); using (var reader1 = cmd1.ExecuteReader()) { Console.WriteLine(""{0:hh:mm:ss} - Execute Reader 2"", DateTime.Now); using (var reader2 = cmd2.ExecuteReader()) { Console.WriteLine(""{0:hh:mm:ss} - Start Read Reader 2"", DateTime.Now); reader2.Read(); Console.WriteLine(""{0:hh:mm:ss} - Finish Read Reader 2"", DateTime.Now); } Console.WriteLine(""{0:hh:mm:ss} - Start Read Reader 1"", DateTime.Now); reader1.Read(); Console.WriteLine(""{0:hh:mm:ss} - Finish Read Reader 1"", DateTime.Now); } } ``` results : 01:01:19 - Execute Reader 1 01:01:19 - Execute Reader 2 01:01:49 - ERROR : System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. " 4439 area-System.Data Managed SNI - Open connection to unsupported sql server (SQL2000) - get timeout based on connection string and spit different error "Repro ``` try { using (var conn = new SqlConnection(""Data Source = sql2000; User ID = ***; Password = ***;"") ) { Console.WriteLine(""{0:hh:mm:ss} - Start Opening Invalid connection"", DateTime.Now); conn.Open(); } } catch (Exception ex) { Console.WriteLine(""{0:hh:mm:ss} - ERROR : {1}"", DateTime.Now, ex.ToString()); } ``` Expected Error Message ``` 02:27:15 - Start Opening 02:27:36 - ERROR : System.InvalidOperationException: The SQL Server instance returned an invalid or unsupported protocol version during login negotiation. at System.Data.SqlClient.TdsParser.TryProcessLoginAck( ``` Actual Error Message ``` 02:16:47 - Start Opening Invalid connection 02:17:02 - ERROR : System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server) ``` " 4441 area-System.Runtime Add Convert.ToHexString / FromHexString This would complement `Convert.ToBase64String` / `Convert.FromBase64String`. You all know you've written this API over and over again in your projects. :) 4442 area-System.IO LastAccessTime throws on Linux for non-existent files on CoreCLR "LastAccessTime for non-existent file must return 1/1/1601 12:00:00 AM. It does so on Windows. Throws on Linux. Below program assumes file ""haha"" does not exist. ``` using System; using System.IO; namespace nonExistent { public class Program { public void Main(string[] args) { FileInfo i = new FileInfo(""haha""); Console.WriteLine(i.LastAccessTimeUtc); } } } ``` " 4443 area-System.Globalization Update System.Text.Encodings.Web to Unicode 8 When HttpAbstractions issue https://github.com/aspnet/HttpAbstractions/issues/391 was resolved it switched to using the encoders in the CoreFX repo. The encoders in the aspnet org already had support for Unicode 8.0, which is not yet available in the CoreFX repo. 4449 area-System.Net Replace faulty assert in CurlHandler with proper handling CurlHandler's support for pausing the connection needs to be resilient against spurious unpausing. This commit just removes a faulty assert for a condition that is possible and replaces it with proper handling (repausing). Fixes #4187 cc: @kapilash, @davidsh 4451 area-System.IO Remove Managed Inflator and Deflator code in System.IO.Compression With #4440 we no longer need the managed compression code as we are always using a native compression implementation. The managed code is now dead and can't be hit by a user. We should remove this code. 4452 area-System.Net Changing S.N.NetworkInformation tests to allow NICs with Speed==-1 Certain WiFi NICs report `Speed` of -1 when the `OperationalStatus` is `Down`. This was discovered by @stephentoub by running the tests on his machine. @mellinoe @stephentoub @davidsh PTAL /cc @SidharthNabar 4453 area-System.Threading Linux System.Threading.Tasks.Dataflow.Tests failed http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst_prtest/4273/consoleFull#-21371504001f1a4601-6aec-4fd5-b678-78d4389fd5e8 13:34:51 === TEST EXECUTION SUMMARY === 13:34:51 System.Runtime.Extensions.Tests Total: 503, Errors: 0, Failed: 0, Skipped: 0, Time: 4.543s 13:34:53 System.Threading.Tasks.Dataflow.Tests.DebugAttributeTests.TestDebuggerDisplaysAndTypeProxies [FAIL] 13:34:53 System.InvalidOperationException : Collection was modified; enumeration operation may not execute. 13:34:53 Stack Trace: 13:34:53 at System.Collections.Generic.Queue`1.Enumerator.MoveNext() 13:34:53 at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) 13:34:53 at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) 13:34:53 at System.Threading.Tasks.Dataflow.BroadcastBlock`1.BroadcastingSourceCore`1.DebuggingInformation.get_InputQueue() 13:34:53 at System.Threading.Tasks.Dataflow.BroadcastBlock`1.DebugView.get_InputQueue() 13:34:59 Finished: System.Numerics.Vectors.Tests 13:34:59 13:34:59 === TEST EXECUTION SUMMARY === 13:34:59 System.Numerics.Vectors.Tests Total: 1058, Errors: 0, Failed: 0, Skipped: 0, Time: 12.685s 13:35:04 Finished: System.Threading.Tasks.Dataflow.Tests 13:35:04 13:35:04 === TEST EXECUTION SUMMARY === 13:35:04 System.Threading.Tasks.Dataflow.Tests Total: 282, Errors: 0, Failed: 1, Skipped: 0, Time: 17.754s 13:35:04 One or more tests failed while running tests from 'System.Threading.Tasks.Dataflow.Tests'. Exit code 1. 4454 area-System.Data _gcHandle usage ? https://github.com/dotnet/corefx/blob/1d9edc6f2da2c9cedf1e1c700fe88d3fe3299d91/src/System.Data.SqlClient/src/System/Data/SqlClient/SNI/SNIProxy.cs It seems there is no one allocated this _gcHandle. This path will always false https://github.com/dotnet/corefx/blob/1d9edc6f2da2c9cedf1e1c700fe88d3fe3299d91/src/System.Data.SqlClient/src/System/Data/SqlClient/TdsParserStateObject.cs#L902 Can we remove this ? 4455 area-System.Text System.Text.Encodings.Web.TextEncoder.EncodeIntoBuffer throws ArgumentException on 32-bit Mono "Simple repro: ``` using System; using System.Text.Encodings.Web; namespace EncodeIssue { public class Program { public void Main(string[] args) { Console.WriteLine(UrlEncoder.Default.Encode(""na me"")); } } } ``` When run: ``` System.ArgumentException: Argument encoder does not implement MaxOutputCharsPerInputChar correctly. at System.Text.Encodings.Web.TextEncoder.EncodeIntoBuffer (System.Char* value, Int32 valueLength, Int32 firstCharacterToEncode, System.Char* buffer, Int32 bufferLength) [0x00000] in :0 at System.Text.Encodings.Web.TextEncoder.Encode (System.String value) [0x00000] in :0 at EncodeIssue.Program.Main (System.String[] args) [0x00000] in :0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0 at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly assembly, System.String[] args, IServiceProvider serviceProvider) [0x00000] in :0 at Microsoft.Dnx.ApplicationHost.Program+<>c__DisplayClass3_0.b__0 () [0x00000] in :0 at System.Threading.Tasks.Task`1[System.Threading.Tasks.Task`1[System.Int32]].InnerInvoke () [0x00000] in :0 at System.Threading.Tasks.Task.Execute () [0x00000] in :0 ``` Make sure you're using a 32-bit Mono to repro, since it doesn't happen on 64-bit. " 4456 area-System.IO Add BufferedStream to CoreFX Adds source and tests to CoreFX for System.IO.BufferedStream. Tests: I modified the existing System.IO tests that used MemoryStreams to instead be inheritable. I made a FakeStream that is an indirection around MemoryStream that enables BufferedStream(new FakeStream) to be used interchangeably with MemoryStream(). Though wrapping a MemoryStream with a BufferedStream isn't useful in the real world, it's an adequate method of ensuring the BufferedStream is calling the underlying stream functions correctly. Coverage is 89%/80% for BufferedStream with these additions. resolves #1793 The tests will fail CI as they will be compiled against the contract pulled in from nuget for System.IO version 4.0.10. For testing, I manually modified the reference assemblies to those produced by my System.IO/src build and all tests pass. I expect I need to do something on the TFS side of things to resolve this issue. The N custom implementation in \ndp\FxCore\src\System.Runtime.WindowsRuntime\System\IO can also be removed in favor of this one. @stephentoub @mellinoe @manu-silicon 4458 area-System.Runtime Ensure minimum GUID entropy on all platforms. GUIDs on Windows have, for years, provided 122 bits of entropy. This behavior needs to be enshrined and guaranteed on all platforms as people have taken dependencies upon it. 4459 area-System.Diagnostics Fix intermittent perf_process test failure. Perf_Process.Kill was trying to kill processes that could exit before it had the chance to get to them. I modified the ProcessTestBase helpers to make CreateProcessInfinite create an actually infinitely running process for the Kill test and renamed the old CreateProcessInfinite to the more accurate CreateProcessLong resolves #4397 @stephentoub @Priya91 4460 area-Infrastructure Enabled Native Windows Build of System.IO.Compression.Native (zlib) "This commit adds scripts to enable building Windows-specific binaries in CoreFX. The code is mostly modeled off of CoreCLR with some elements taken from build.sh building for native Unix components. It uses CMake to produce the projects that are then passed to msbuild. The logic primarily resides within the ""build-native.cmd"" script that is called by ""build.cmd"" from the corefx root when ""__BuildNative"" is set. Some things to be aware of: - __BuildNative in build.cmd is currently always set. Either some logic should be added to actually evaluate it, or the variable should be removed. - Cross compilation isn't set up. build-native.cmd can only build for windows at this time. It can build for x64 or x86, however. The default is currently x64. AnyCPU also defaults to x64. - Since manual parsing of args is used, most of the msbuild targets that can be passed to build.cmd will be ignored by native compilation. Currently, only Configuration and Platform are acknowledged. I can imagine a system where the native project can be used with the same targets as the managed ones, but that capability isn't complete now. Those properties/targets are still used in the managed build, of course. - A TFS-side commit to the package definitions will need to follow this PR so that we can consume the publicly built System.IO.Compression.Native. - I minimized most of the compilation options for Windows cmake. Some will likely needed to be reenabled in the CMakeLists.txt in corefx/src/native/ - I tested the System.IO.Compression.Native.dll built by ""build.cmd /p:Configuration=Release"" by renaming it to ""clrcompression.dll"" and running the unit tests using it. - This PR will need to be modified pending the merging of https://github.com/dotnet/corefx/pull/4440. - The Zlib code included is unaltered 1.2.3 code. - This will unblock https://github.com/dotnet/corefx/issues/3986 @bjjones if we merge this and don't decide to instead consume a different zlib package (e.g. http://nuget.org/api/v2/package/zlib/1.2.8.8) resolves #826 @stephentoub @mellinoe @joshfree @richlander @eerhardt " 4462 area-System.Reflection Expose GetMethod and GetConstructor extensions with both BindingFlags and Type[] `System.Reflection.TypeExtensions` is good for porting existing .NET Framework code across, however it is missing an overload with a combination of `BindingFlags` and `Type[]` for both `GetMethod` and `GetConstructor`. My use case is getting a private constructor when there are multiple constructors: ``` type.GetConstructor( BindingFlags.Instance | BindingFlags.NonPublic, null, // binder new[] { typeof(object), ... }, null // modifiers ); ``` I assume these weren't exposed in corefx because you didn't want to provide the overloads with a `Binder` parameter, so something like these would be optimal however would be new overloads not available in .NET Framework: ``` public static MethodInfo GetMethod(this Type type, string name, BindingFlags bindingAttr, Type[] types) public static ConstructorInfo GetConstructor(this Type type, BindingFlags bindingAttr, Type[] types) ``` I've looked at using Linq over the `TypeInfo` but I'd have to check each property rather than use BindingFlags, and `TypeInfo` isn't available in .NET 3.5/4.0 so I can't just change to one or the other. For now I've emulated the old .NET Framework signature using `type.GetConstructors(bindingAttr).SingleOrDefault(...)`, it is ugly and likely heaps slower than the .NET Framework reflection call. I'm keen to hear if you have any intention of providing this API, otherwise I'll probably change all our code using the API to a shim extension method something like `type.GetPrivateConstructor(new[] { ... })` with conditionally compiled implementation. 4463 area-System.Reflection Expose System.Reflection.TargetException .NET Framework exposed both `TargetException` (fail on an invalid target, e.g, null) and `TargetInvocationException` (fail actually invoking the target). The runtime still throws a `TargetException` in coreclr and there is code in the corefx unit tests that check the exception is thrown using `Type.FullName` or `Assert.ThrowsAny`. Is there a reason this exception hasn't been exposed? I'm porting code checking for this exception. 4465 area-System.ComponentModel EnsureValidDataType should reject whitespaces in DataTypeAttribute.CustomDataType property "Method EnsureValidDataType() should not raise an exception when the property CustomDataType is a WhiteSpace? This code: ``` c# /// /// Throws an exception if this attribute is not correctly formed /// /// is thrown if the current attribute is ill-formed. private void EnsureValidDataType() { if (DataType == DataType.Custom && string.IsNullOrEmpty(CustomDataType)) { throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.DataTypeAttribute_EmptyDataTypeString)); } } ``` Should be? ``` c# /// /// Throws an exception if this attribute is not correctly formed /// /// is thrown if the current attribute is ill-formed. private void EnsureValidDataType() { if (DataType == DataType.Custom && string.IsNullOrWhiteSpace(CustomDataType)) { throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.DataTypeAttribute_EmptyDataTypeString)); } } ``` " 4466 area-System.Diagnostics TestUserCredentialsPropertiesOnWindows failed in CI in outer loop http://dotnet-ci.cloudapp.net/job/dotnet_corefx_outerloop_windows_win10_debug/88/console ``` 03:38:50 System.Diagnostics.Tests.ProcessStartInfoTests.TestUserCredentialsPropertiesOnWindows [FAIL] 03:38:50 System.InvalidOperationException : No process is associated with this object. 03:38:50 Stack Trace: 03:38:50 d:\j\workspace\dotnet_corefx_outerloop_windows_win10_debug\src\System.Diagnostics.Process\src\System\Diagnostics\Process.cs(753,0): at System.Diagnostics.Process.EnsureState(State state) 03:38:50 d:\j\workspace\dotnet_corefx_outerloop_windows_win10_debug\src\System.Diagnostics.Process\src\System\Diagnostics\Process.cs(172,0): at System.Diagnostics.Process.get_HasExited() 03:38:50 d:\j\workspace\dotnet_corefx_outerloop_windows_win10_debug\src\System.Diagnostics.Process\tests\ProcessStartInfoTests.cs(325,0): at System.Diagnostics.Tests.ProcessStartInfoTests.TestUserCredentialsPropertiesOnWindows() ``` 4467 area-System.Net SslStream tests: timeout http://dotnet-ci.cloudapp.net/job/dotnet_corefx_windows_release_prtest/6135/console ``` System.Net.Security.Tests.SslStreamStreamToStreamTest.SslStream_StreamToStream_Authentication_Success [FAIL] Handshake completed in the allotted time Expected: True Actual: False Stack Trace: d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Security\tests\FunctionalTests\SslStreamStreamToStreamTest.cs(36,0): at System.Net.Security.Tests.SslStreamStreamToStreamTest.SslStream_StreamToStream_Authentication_Success() System.Net.Security.Tests.CertificateValidationClientServer.CertificateValidationClientServer_EndToEnd_Ok [FAIL] Client/Server Authentication timed out. Expected: True Actual: False Stack Trace: d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Security\tests\FunctionalTests\CertificateValidationClientServer.cs(80,0): at System.Net.Security.Tests.CertificateValidationClientServer.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_EachProtocol_Success [FAIL] Timed Out Expected: True Actual: False Stack Trace: d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Security\tests\FunctionalTests\ClientAsyncAuthenticateTest.cs(252,0): at System.Net.Security.Tests.ClientAsyncAuthenticateTest.d__5c.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) d:\j\workspace\dotnet_corefx_windows_release_prtest\src\System.Net.Security\tests\FunctionalTests\ClientAsyncAuthenticateTest.cs(108,0): at System.Net.Security.Tests.ClientAsyncAuthenticateTest.d__16.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` 4468 area-Infrastructure Reenable Win7 in CI All of our Windows 7 testing is offline. 4473 area-System.Net WinHTTP certificate chain build algorithm is potentially not including certificates obtained from the TLS connection Similarly to how SslStream is including TLS certificates obtained from Schannel, WinHTTP should use the `PCERT_CONTEXT` obtained using `WINHTTP_OPTION_SERVER_CERT_CONTEXT` to extract certificates from the virtual store and use them during chain construction. See https://github.com/dotnet/corefx/blob/master/src/Common/src/Interop/Windows/SChannel/UnmanagedCertificateContext.cs for reference. 4474 area-System.Diagnostics Debug.Assert throws System.Diagnostics.Debug+DebugAssertException Is this by designed for corefx ? because in .net, this should open a debugger instead. Our code currently depends a lot on Debug.Assert. Unfortunately Debug.Assert now throws Debug+DebugAssertException which causing inconsistent from the release mode I remember previously it throws a special uncatchable exception (Environment.FailFast()) which i think can be better instead of causing different behavior. 4475 area-System.IO Change ZLib Optimal CompressionLevel on Unix We currently have this comment and code in System.IO.Compression: ``` C# // Note that ZLib currently exactly correspond to the optimal values. // However, we have determined the optimal values by intependent measurements across // a range of all possible ZLib parameters and over a set of different data. // We stress that by using explicitly the values obtained by the measurements rather than // ZLib defaults even if they happened to be the same. // For ZLib 1.2.3 we have (copied from ZLibNative.cs): // ZLibNative.CompressionLevel.DefaultCompression = 6; // ZLibNative.Deflate_DefaultWindowBits = -15; // ZLibNative.Deflate_DefaultMemLevel = 8; case CompressionLevel.Optimal: zlibCompressionLevel = (ZLibNative.CompressionLevel)6; windowBits = -15; memLevel = 8; strategy = ZLibNative.CompressionStrategy.DefaultStrategy; break; ``` Since we are now using the “current” ZLib version on Unix, and because we are planning on changing which version we use on Windows, I don’t think this is the best approach anymore. It was probably correct when we were hard-coding a version, but since we don’t know which version will actually be used, I think we should be letting the zlib library figure out which is the best compression level to use. I have 2 separate options on how to address this: 1. On Unix, create a new shim method DeflateInit that only takes in the ZStream. The shim code will use the default values from the ZLib headers. Windows remains unchanged. https://github.com/eerhardt/corefx/commit/c1be54d6dfaf64098b42c186c041344e4378f083 2. Change both Windows and Unix code to always use the default compression level (-1) and let the zlib version pick. https://github.com/eerhardt/corefx/commit/38883e3df53153a9434dfc16696667279b18dd82 @ianhays @stephentoub - Do you guys agree this should be fixed? If so, do you have a preferred option - or an even better option than the 2 I've listed? 4476 area-System.Net Add support for custom validation of server SSL Certificate to HttpClient API This issue tracks the addition of new functionality to the HttpClient API. In order to implement certificate pinning and self-signed SSL certificate scenarios, developers need access to the SSL cert presented by the server, and the ability to do their own validation and then accept/reject the connection accordingly. Today, this ability is provided in .NET Framework by ServicePointManager.ServerCertificateValidationCallback and in ASP.NET 5 by WinHttpHandler.ServerCertificateValidationCallback. However, ServicePointManager is not in .NET Core, and WinHttpHandler is not available x-plat and on all app models. Hence, there is a need to add this API to the top-level HttpClient or HttpClientHandler types. If you have specific requirements around this scenario, please enter those here - we will track this issue in our backlog. 4477 area-System.Security Add missing X509ChainStatusFlags net461 added some new X509ChainStatusFlags values. While these are present already in the implementation library, they aren't in the ref library. GetChainStatusInformation was rewritten as a loop for net461, that change should also be ported over to corefx. 4478 area-System.Net Add System.Net.WebSockets.Client tests - Port some of the ToF ClientWebSocket tests that talk to a real websocket server - Cleanup naming of existing tests to conform to System.Net test method naming - Skip tests if not supported on platform. Specifically, these tests were failing on Win7 since Win7 does not support WinHttp WebSockets. We haven't really noticed this failing since the CI doesn't yet run Win7 tests (issue #4468) I plan to port the remainder of the ToF websocket related tests in a subsequent PR. 4479 area-System.Net Add Client certificate support to HttpClient API "The `HttpClientHandler` API has a `ClientCertificateOptions` enum that lets you pick between `Automatic` and `Manual` client cert option. Choosing `Automatic` lets the system choose the ""best"" client certificate for the user from among the installed and accessible ones. `Manual` means that the developer can explicitly pass in a client cert. However, `HttpClientHandler` does not have a `ClientCertificate` property, so you can't assign a certificate for the `Manual` option to use. This issue tracks the fix to address this gap. (`WinHttpHandler` has a `ClientCertificates` property for this purpose, but it is not x-plat and is not supported for all app models (e.g. UWP)) If you have specific requirements around this feature, please enter them here. " 4480 area-System.Net Interop.Ssl.SslShutdown crashes process during GC finalization A WCF test that attempts to write to an SslStream(https://github.com/dotnet/wcf/blob/master/src/System.Private.ServiceModel/tests/Scenarios/Security/TransportSecurity/Tcp/ClientCredentialTypeTests.cs) leaves SafeSslHandle in a closed state (which is correct). But when the next GC happens its finalizer is called and tries to Dispose it, causing an ObjectDisposedException. On Linux, this crashes the process. Unhandled Exception: System.ObjectDisposedException: Safe handle has been closed at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean& success) at System.StubHelpers.StubHelpers.SafeHandleAddRef(SafeHandle pHandle, Boolean& success) at Interop.Ssl.SslShutdown(SafeSslHandle ssl) at Interop.OpenSsl.Disconnect(SafeSslHandle context) at System.Net.Security.SafeDeleteContext.ReleaseHandle() at System.Runtime.InteropServices.SafeHandle.InternalFinalize() at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing) at System.Runtime.InteropServices.SafeHandle.Finalize() 4481 area-System.ComponentModel new DataAnnotations.EmailAddressAttribute() set customErrorMessageSet=true When create a `new EmailAddressAttribute()` the property Errormessage has the value of DefaultErrormessage and customErrorMessageSet=true. Now I can't detect if the user set this Errormessage. Look to CompareAttribute. This is the way it can be implemented. Create an extra overload in DataTypeAttribute. ```c# public EmailAddressAttribute() : base(DataType.EmailAddress) { // DevDiv 468241: set DefaultErrorMessage not ErrorMessage, allowing user to set // ErrorMessageResourceType and ErrorMessageResourceName to use localized messages. DefaultErrorMessage = DataAnnotationsResources.EmailAddressAttribute_Invalid; } ``` Should be ```c# public EmailAddressAttribute() : base(DataType.EmailAddress, DataAnnotationsResources.EmailAddressAttribute_Invalid) { } ``` This should also be done for all other Attributes that has the basetype `DataTypeAttribute` 4483 area-System.Net Removing SSLv2 and SSLv3 support from System.Net.Security APIs will throw NotSupportedException if SSLv2 or v3 is used. This behavior is different from .NET Desktop. There is _no_ way to re-enable SSL2 or 3 support via configuration in CoreFX. Tests have been changed to pin this new behavior. Increased passing-test timeouts to 15s. Fix #3114 (partial), #4467 @davidsh @josguil @bartonjs @vijaykota @rajansingh10 @shrutigarg PTAL /cc: @stephentoub @SidharthNabar 4484 area-System.Net Implement Ping on Unix. "This implements System.Net.Utilities on Unix. The implementation is shared between Unix platforms, and should work anywhere that either supports raw sockets or has a discoverable ""ping"" utility. There are two ""modes"" in which a Ping can be sent on Unix. If the user has privileges to create and use raw sockets, then the ""good"" path is taken. The good path uses raw sockets to send ICMP echo requests to the given host, and then listens for ICMP echo replies. If the user does not have privileges to do so, then the implementation simply launches a new process using the ping or ping6 utility program (depending on whether the destination address is an IPv4 or IPv6 address), parses the output, and returns the result. The information from the ""bad path"" is less reliable, and doesn't include things like the IPStatus property, which should be able to cover most of the possible ICMP response message types, not just ""Success"". Additionally, the ""bad path"" cannot send arbitrary buffers along with the echo request, although we can at least preserve the size of the data. This means you can't inspect the PingReply and see that the same data you sent in the echo request was returned unchanged. There are a couple of additions to the Sockets PAL and shim in order to accomodate the ICMP protocol which I'm using in the ""good path"" described above. @cipop, @stephentoub, @pgavlin " 4487 area-System.Data Mars - Intermittently Failed - because of race condition "Repro ``` using (var conn = new SqlConnection(""Data Source=***; User ID=***; Password=***;Initial Catalog=***;MultipleActiveResultSets=true;"")) { conn.Open(); var cmdText = ""select 1""; var cmd1 = new SqlCommand(cmdText, conn); var cmd2 = new SqlCommand(cmdText, conn); Console.WriteLine(""{0:hh:mm:ss} - Execute Reader 1"", DateTime.Now); using (var reader1 = cmd1.ExecuteReader()) { Console.WriteLine(""{0:hh:mm:ss} - Execute Reader 2"", DateTime.Now); using (var reader2 = cmd2.ExecuteReader()) { Console.WriteLine(""{0:hh:mm:ss} - Start Read Reader 2"", DateTime.Now); reader2.Read(); Console.WriteLine(""{0:hh:mm:ss} - Finish Read Reader 2"", DateTime.Now); } Console.WriteLine(""{0:hh:mm:ss} - Start Read Reader 1"", DateTime.Now); reader1.Read(); Console.WriteLine(""{0:hh:mm:ss} - Finish Read Reader 1"", DateTime.Now); } } ``` Sometimes this will error caused by syn packet was sent after the second data packet for second session sent. " 4488 area-System.Net Fix WebHeaderCollection test TODO Now that our xunit runner doesn't balk at some bad characters in theory arguments, fixing a few TODOs. Fixes #2370 cc: @davidsh, @pgavlin 4489 area-System.Data Mars cleanup - create session async constructor https://github.com/dotnet/corefx/pull/4486 I think this async constructor was carried over from native sni params. But it doesn't mean that it will create a session async. Create session async will be dangerous as it will potentially caused race condition where data packet get sent before SYN control packet / session created. 4491 area-System.Reflection System.Reflection.Emit.AssemblyBuilder.Save `AssemblyBuilder.Save` and `AssemblyBuilderAccess.RunAndSave` isn't available in .NET Core, however coreclr seems to have the code to implement it but I looks conditionally compiled out. https://github.com/dotnet/coreclr/blob/bc146608854d1db9cdbcc0b08029a87754e12b49/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilder.cs#L1690-L1711 Our use case in Castle DynamicProxy is to write out dynamically created assemblies to disk so we can run peverify over the assembly in unit tests. It also greatly helps writing out the assembly and opening it in ildasm to manually verify IL. Is there any chance we can get this functionality that .NET Framework has introduced into .NET Core, or an alternative way of doing the same thing. This might not sound like a big deal if you aren't familiar with Castle DynamicProxy's internals, but it really is as it heavily reduces our confidence in both our code and the .NET runtime as well as reducing our ability to track down defects. 4492 area-System.Net Fixing Issue #4480, ReleaseHandle() getting called more than once due to probable race condition Fix for issue #4480. Looks like this is happening due to probable race condition which leads to ReleaseHandle() getting called more than once. ReleaseHandle was not setting holding object/pointer to null/Intptr. Setting it explicitly now. @roncain can you please validate this fix with your test which was crashing earlier. 4495 area-System.Net Support IDNA host matching on Unix SslStream - Split the Unix and Windows project.json files for System.Net.Security since they have different dependencies at the implementation level. - Use the managed IdnMapping to do the IDNA rules application - Update comments in the native half of the match logic This was verified against a private domain which uses a mix of ASCII and non-ASCII characters. - Lowercase punycode form: Success before, success after - Mixed-case punycode form: Failed before, success after - Unicode form: Failed before, success after. cc: @ellismg @stephentoub @vijaykota @rajansingh10 @shrutigarg @CIPop @davidsh 4497 area-System.Reflection Add support for calling a varargs constructor through IlGenerator.EmitCall "## Rationale Emitting code which calls vararg method is good, but emitting code to invoke **vararg constructor** is different tricky (via symbol lookup). ## Proposed API Goal: Unify emitting of vararg constructor calls with any other vararg method calls ```diff public partial class System.Reflection.Emit.ILGenerator { + public virtual void EmitCall(OpCode opcode, ConstructorInfo constructorInfo, Type[] optionalParameterTypes); public virtual void EmitCall(OpCode opcode, MethodInfo methodInfo, Type[] optionalParameterTypes); } ``` Context: * [ILGenerator methods - apisof.net](https://apisof.net/catalog/System.Reflection.Emit.ILGenerator) * [EmitCall on msdn](https://msdn.microsoft.com/en-us/library/system.reflection.emit.ilgenerator.emitcall(v=vs.110).aspx) ## Usage ```c# public class V { public V(__arglist) { /* ... */ } public int MyMethod(__arglist) { /* ... */ } } // Emitting calls - code snippets { var il = mb.GetIlGenerator(); // Emitting call to static vararg method il.EmitCall(Opcodes.Call, typeof(V).GetMethod(""MyMethod"", BindingFlags.Public), new[] { typeof(string), typeof(string), typeof(int) } ); // Emitting call to vararg constructor - today requires MetaData token var token = mb.GetConstructorToken( typeof(V).GetConstructors()[0], // or other way to get to ConstructorInfo new[] { typeof(string),typeof(string), typeof(int) } ); il.Emit(Opcodes.Call, token.Token); // Emitting call to vararg constructor - with the newly proposed API il.EmitCall(Opcodes.Call, typeof(V).GetConstructors()[0], // or other way to get to ConstructorInfo new[] { typeof(string), typeof(string), typeof(int) } ); } ``` # Original Proposal Currently, the only way to call a varargs constructor through an `IlGenerator` is through the usage of a symbol, which is weird and poorly documented. I propose `EmitCall` which is the supported way to call varargs methods should have an overload to take `MethodBase` instead of a `MethodInfo`. see: http://stackoverflow.com/a/24041217/468672 edit: I propose adding the following method to the `IlGenerator` base type: ``` csharp public virtual void EmitCall(OpCode opcode, ConstructorInfo constructor, Type[] optionalParameterTypes); ``` This overload would allow support for calling a `vararg` constructor. Consider the following class `V` ``` csharp public class V { public int Count{get;} public V(__arglist) { this.Count = new ArgIterator(__arglist).GetRemainingCount(); } public static int F(__arglist) { return new ArgIterator(__arglist).GetRemainingCount(); } } ``` To generate a method that calls the static method F, we can do the following: ``` csharp public void BuildCallFMethod(TypeBuilder tb) { var mb = tb.DefineMethod(""CallFMethod"", MethodAttributes.Public | MethodAttributes.Static); var il = mb.GetIlGenerator(); il.Emit(OpCodes.Ldstr, ""one""); il.Emit(OpCodes.Ldstr, ""two""); il.Emit(OpCodes.Ldc_I4_3); il.EmitCall(Opcodes.Call, typeof(V).GetMethod(""F"", BindingFlags.Static | BindingFlags.Public), new[]{typeof(string), typeof(string), typeof(int)}); il.Emit(OpCodes.Ret); } ``` However, if we wanted to create a type that extended `V`, despite needing to emit a `call` opcode on the constructor, we cannot use `EmitCall` and instead need to look up a symbol. This is asymmetric and is bad api design. ``` csharp public void BuildCtorForExtenderOfV(TypeBuilder tb, ModuleBuilder mb) { var ctor = tb.DefineConstructor(MethodAttributes.HideBySig | MethodAttributes.Public | MethodAttributes.SpecialName | MethodAttributes.RTSpecialName, CallingConventions.HasThis, Type.EmptyTypes); var il = ctor.GetIlGenerator(); var token = mb.GetConstructorToken(typeof(V).GetConstructors()[0], new[]{typeof(string),typeof(string), typeof(int)}); il.Emit(OpCodes.Ldarg_0); il.Emit(OpCodes.Ldstr, ""one""); il.Emit(OpCodes.Ldstr, ""two""); il.Emit(OpCodes.Ldc_I4_3); il.Emit(Opcodes.Call, token.Token); il.Emit(OpCodes.Ret); } ``` Instead, I propose we allow this overload, allowing the two calls to have the same IlGenerator code pattern. The benefit is that `EmitCall`, does some validation beforehand, where as the token variant basically only validates when you build the method/ctor. As an additional benefit, I also recommend we allow using the `OpCode.NewObj` for the first parameter of `EmitCall` as well." 4500 area-System.Net Investigate problematic Sockets assertion There is an assertion in the Socket constructor which I believe might be faulty. I've tried the same code on the desktop framework and didn't hit any issues. The assertion is on line 112 of Socket.cs: https://github.com/dotnet/corefx/blob/a22364202c6d6cabeeb662fde346941b7284a8da/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs#L112 ``` CSharp Debug.Assert(addressFamily != AddressFamily.InterNetworkV6 || !DualMode); ``` I hit this assertion on CoreCLR when instantiating a Socket with the following args: ``` CSharp new Socket(AddressFamily.InterNetworkV6, SocketType.Raw, ProtocolType.IcmpV6); ``` (NOTE: You have to run as admin or the above will throw some other exception.) cc: @CIPop , @pgavlin 4501 area-System.Net XPlat: System.Net.Socket.Poll(0, SelectMode.SelectError) provides incorrect results On Linux, the call to System.Net.Socket.Poll(0, SelectMode.SelectError) returns true for some cases when consumed in SqlClient. If the SqlClient ignores the Socket poll result and continues to use the socket, there is no problem reading from the socket. Based on the investigation @pgavlin figured out that this is a bug with linux Native implementation for Poll. 4502 area-System.Net Add support to HttpClient for mutual authentication On the desktop, WCF uses mutual authentication when using Kerberos authentication. We specify the servers SPN by adding the relevant SPN to `AuthenticationManager.CustomTargetNameDictionary`. We need a way to: 1. Enable mutual authentication 2. Override the SPN we expect the server to be using The second item is needed if mutual auth is enabled as on the service side only a system process is able to use the host/hostname SPN. When the remote service is using HTTP.SYS in a non-system process and not using Kernal mode authentication, a unique SPN must be created and used. If mutual auth is enabled, this would break without being able to specify the SPN for the server on the client side. 4503 area-System.Data sni.dll can't be loaded on Win 7/2008R2 This issue is not the same as [this one](https://github.com/dotnet/corefx/issues/3760) because I already have the C++ runtime installed. We're seeing the issue while running the ASP.NET MusicStore sample automation on Win 7 and Win 2008 R2 but we don't know what's the root cause. Worth mentioning that the same code works on Win 8 and Win 10. ``` System.Reflection.TargetInvocationException: Exception has been thr own by the target of an invocation. ---> System.AggregateException: One or more errors occurred. ---> System.DllNotFoundException: Unable to load DLL 'C:\Users\ victorhu\.dnx\packages\runtime.win7-x86.System.Data.SqlClient.sni\4.0.0-beta-235 09\runtimes\win7-x86\native\sni.dll': The specified module could not be found. ( Exception from HRESULT: 0x8007007E) at System.Runtime.Loader.AssemblyLoadContext.InternalLoadUnmanagedDllFromPath (String unmanagedDllPath) at System.Runtime.Loader.AssemblyLoadContext.LoadUnmanagedDllFromPath(String unmanagedDllPath) at Microsoft.Dnx.Runtime.Loader.LoadContext.LoadUnmanagedLibraryFromPath(Stri ng path) at Microsoft.Dnx.Runtime.Loader.PackageAssemblyLoader.LoadUnmanagedLibrary(St ring name) at Microsoft.Dnx.Host.LoaderContainer.LoadUnmanagedLibrary(String name) at Microsoft.Dnx.Host.DefaultLoadContext.LoadUnmanagedLibrary(String name) at Microsoft.Dnx.Runtime.Loader.LoadContext.LoadUnmanagedDll(String unmanaged DllName) at System.Runtime.Loader.AssemblyLoadContext.ResolveUnmanagedDll(String unman agedDllName, IntPtr gchManagedAssemblyLoadContext) at System.Data.SqlClient.SNINativeMethodWrapper.UnmanagedIsTokenRestricted(In tPtr token, Boolean& isRestricted) at System.Data.Win32NativeMethods.IsTokenRestrictedWrapper(IntPtr token) at System.Data.ProviderBase.DbConnectionPoolIdentity.GetCurrent() at System.Data.ProviderBase.DbConnectionPoolGroup.GetConnectionPool(DbConnect ionFactory connectionFactory) at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPool(DbConnectio n owningObject, DbConnectionPoolGroup connectionPoolGroup) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions , DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(Db Connection outerConnection, DbConnectionFactory connectionFactory, TaskCompletio nSource`1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.OpenAsync(CancellationToken cancellati onToken) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot ification(Task task) at Microsoft.Data.Entity.Storage.RelationalConnection.d__32.MoveNe xt() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot ification(Task task) at Microsoft.Data.Entity.Storage.Internal.SqlServerDatabaseCreator.d__13.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot ification(Task task) at Microsoft.Data.Entity.Storage.RelationalDatabaseCreator.d__23.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot ification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at MusicStore.Models.SampleData.d__3.MoveN ext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceled Exceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationTo ken cancellationToken) at System.Threading.Tasks.Task.Wait() at MusicStore.Startup.Configure(IApplicationBuilder app) at MusicStore.Startup.ConfigureDevelopment(IApplicationBuilder app, ILoggerFa ctory loggerFactory) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Objec t[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke Attr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.AspNet.Hosting.Startup.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder) at Microsoft.AspNet.Hosting.Startup.ConfigureBuilder.<>c__DisplayClass4_0.b__0(IApplicationBuilder builder) at Microsoft.AspNet.Hosting.Internal.AutoRequestServicesStartupFilter.<>c__Di splayClass0_0.b__0(IApplicationBuilder builder) at Microsoft.AspNet.Hosting.Internal.HostingEngine.BuildApplication() ``` The investigation that we did so far involved looking at the dependencies of `sni.dll` but there's nothing obviously wrong. Maybe someone with more experience in this area can identify something: ``` Dump of file C:\Users\victorhu\.dnx\packages\runtime.win7-x86.System.Data.SqlClient.sni\4.0.0-beta-23509\runtimes\win7-x86\native\sni.dll File Type: DLL Image has the following dependencies: api-ms-win-core-processenvironment-l1-1-0.dll api-ms-win-core-file-l1-1-0.dll api-ms-win-core-debug-l1-1-0.dll api-ms-win-core-errorhandling-l1-1-0.dll api-ms-win-core-synch-l1-2-0.dll api-ms-win-core-interlocked-l1-1-0.dll api-ms-win-core-memory-l1-1-0.dll api-ms-win-core-libraryloader-l1-1-0.dll api-ms-win-core-string-obsolete-l1-1-0.dll api-ms-win-core-kernel32-legacy-l1-1-0.dll api-ms-win-core-registry-l1-1-0.dll api-ms-win-core-sysinfo-l1-2-0.dll api-ms-win-core-handle-l1-1-0.dll api-ms-win-core-io-l1-1-0.dll api-ms-win-core-synch-l1-1-0.dll api-ms-win-core-processthreads-l1-1-0.dll api-ms-win-core-sysinfo-l1-1-0.dll api-ms-win-core-timezone-l1-1-0.dll api-ms-win-core-stringansi-l1-1-0.dll api-ms-win-core-string-l1-1-0.dll api-ms-win-core-localization-obsolete-l1-2-0.dll api-ms-win-core-localization-l1-2-0.dll api-ms-win-security-base-l1-1-0.dll api-ms-win-core-namedpipe-l1-1-0.dll MSVCR110.dll KERNEL32.dll ADVAPI32.dll RPCRT4.dll WS2_32.dll CRYPT32.dll Summary 4000 .data 16000 .rdata 6000 .reloc 1000 .rsrc 3000 .sdbid 2C000 .text ``` To reproduce clone [MusicStore](https://github.com/aspnet/musicstore/tree/release) and run `build verify` cc @divega 4504 area-Serialization Data Contract overflow when reading objects concurrently Data contract serializers are prone to cache exception when used by multiple threads. This is an issue that are being fixed on Desktop which should be ported to CoreClr. 4507 area-System.Console Provide better x-plat Console/Terminal features The current implementation of System.Console doesn't provide good experience on Linux. For example, arrow keys (left/right for caret navigation, up/down for history) don't work. It is left to the developer to implement this basic functionality in their app if they want to provide consistent good experience across platforms. CoreFX should provide such implementation either as part of System.Console or as a separate library/nuget. On Linux the implementation can use existing native libraries such as curses or readline. Related Roslyn issue: https://github.com/dotnet/roslyn/issues/6751 4508 area-System.Net Ensure that only API usage exceptions are thrown on the sync path from System.Net TPL APIs API usage and development-time errors should throw exceptions on the sync path of TPL (async) APIs. All other errors should be configured within the returned Task object. /cc: @davidsh @stephentoub 4510 area-System.Net X509Certificate2(X509Certificate) missing I am using SslStream with a userCertificateValidationCallback. The callback is passed a X509Certificate which I would like to convert to a X509Certificate2. The constructor to convert the certificate is missing/not yet implemented. Somewhat related: perhaps SslStream should pass a X509Certificate2 instead of a X509Certificate to the userCertificateValidationCallback? 4511 area-System.Data SqlClient - Mars Bug - FIN Packet handler after session is disposed **Repro:** ExecuteReaderAsyn couple times and wait until that reader is dispose / called dispose. **Root Cause:** When session is disposed it send FIN packet. https://github.com/dotnet/corefx/blob/5344db30650f331851f3232538616704d713d9e1/src/System.Data.SqlClient/src/System/Data/SqlClient/SNI/SNIMarsHandle.cs#L60-L64 after server receive FIN packet, it will also send FIN Packet back to the client. Unfortunately, we don't handle this properly and causing to error as that session no longer exists. https://github.com/dotnet/corefx/blob/a3050bacc9b716f52f086751bfb4bf0384019f53/src/System.Data.SqlClient/src/System/Data/SqlClient/SNI/SNIMarsConnection.cs#L247-L254 **More investigation:** - need to find out why FIN packet only sent on disposed - this can results another issue where all other sessions are not put back into the pool. **Possible solutions:** - check if it is FIN packet during HandleReceiveComplete and handle this gracefully. - we may need to send FIN packet outside dispose() as well. rather than wait dispose to happen. 4512 area-System.Net SslStream.AuthenticateAsServer with client certificates doesn't allow for ACCEPT I am connecting to a server which has an invalid certificate, using HttpClientHandler (desktop) and WinHttpHandler (CoreCLR). This works fine. ``` // Desktop Framework var handler = new HttpClientHandler(); ServicePointManager.ServerCertificateValidationCallback = // return true; // CoreCLR var handler = new WinHttpHandler(); handler.ServerCertificateValidationCallback += // return true ``` When I configure the server to accept client certificates (ssl handshake), but do not provide a client certificate. The HttpClientHandler works as before, but the WinHttpHandler throws a WinHttpException (ERROR_INTERNET_SECURE_FAILURE). 4513 area-System.Net Use new ConditionalFact in WebSockets tests Upgrade to new buildtools and try out ConditionalFact in the WebSockets tests. Other tests elsewhere in corefx can be moved over separately. cc: @davidsh, @CIPop Fixes #3349 4518 area-System.Net Reduce the size of System.Net.IPAddress This change reduces the size of `IPAddress` from 40 bytes to 24 bytes (64 bit) and also avoids an unnecessary array allocation for IPv4 addresses. cc: @davidsh, @CIPop, @stephentoub These are the current fields on `IPAddress` that add up to 40 bytes (64 bit): ``` c# internal long Address; internal string StringRepresentation; private readonly AddressFamily _family = AddressFamily.InterNetwork; private readonly ushort[] _numbers = new ushort[NumberOfLabels]; private long _scopeId = 0; private int _hashCode = 0; ``` - `Address` is only used for IPv4 addresses. The size is actually `uint`, but it is typed as `long` because public APIs use `long` for CLS compliance. This field can be changed to `uint` to save 4 bytes. - `StringRepresentation` is a cache of the result of `ToString()` and can remain as-is. - `_family` indicates whether the `IPAddress` instance is an IPv4 address or an IPv6 address through the `AddressFamily.InterNetwork` (IPv4) and `AddressFamily.InterNetworkV6` (IPv6) enum values. We can eliminate this field and instead use the `_numbers` field, which is only used for IPv6 addresses, to indicate whether or not the address is IPv4 vs. IPv6. This saves 4 bytes. - `_numbers`, as mentioned in the previous bullet, is only used for IPv6 addresses. Note that currently the array is always being allocated, even for IPv4 addresses. We can change this to only allocate the array for IPv6 addresses. When the field is null, it indicates that the address is an IPv4 address, when the field is non-null it is an IPv6 address. - `_scopeId` is only used for IPv6 addresses. Similar to `Address`, the size is actually `uint`, but it is typed as `long` because public APIs use `long` for CLS compliance. We can eliminate this field and instead use the same `uint` field as `Address` for IPv4 addresses, reducing the size by another 8 bytes. - `_hashCode` is only used for IPv6 addresses (IPv4 just uses the `Address` for the hash code). We could consider getting rid of this field, to reduce the size by another 4 bytes, and instead always re-calculate the hash code when `GetHashCode` is called (all it's doing is calling `StringComparer.OrdinalIgnoreCase.GetHashCode()` on a cached `ToString()` result), but I assume it is here for performance reasons, so I've kept it for now. Here are the fields after the changes: ``` C# private uint _addressOrScopeId; private readonly ushort[] _numbers; private string _toString; private int _hashCode; ``` From 40 bytes to 24 bytes (64 bit). (Note: I renamed some of the fields and made them all private. The two renamed internal fields (`Address` and `StringRepresentation`) now have internal properties with the same type and name as the old fields, to avoid breaking any internal callers.) (There are other potential optimizations for `IPAddress` that could be handled in separate PRs. For example, `ToString()` could be optimized to avoid unnecessary intermediate allocations. Also, as noted in #2891, some means to access to the internal buffer to avoid unnecessary `byte[]` allocations could be added.) 4525 area-System.Net Address PR feedback for System.Net.Requests - Remove unnecessary string.Format in WebException - Replace several string.Compare calls with string.Equals - Improve FromAsync usage in WebRequest cc: @pgavlin, @CIPop, @davidsh Fixes https://github.com/dotnet/corefx/issues/2409 4526 area-System.Net Disable three System.Net.Security tests that repeatedly timeout https://github.com/dotnet/corefx/issues/4467 cc: @CIPop, @davidsh 4528 area-System.Net Port more System.Net.WebSockets.Client tests Continued porting internal ToF tests to GitHub. Modified tests to use a good dev pattern of `using` around websocket use. 4530 area-System.Net Change System.Net.WebSockets contract for WebSocketReceiveResult "Follow up from ""Resuable WebSocketReceiveResult"" #4520 At the moment is `WebSocketReceiveResult` is a read only POCO type that as a class must be garbage collected on every single socket message; probably gen0; but still bad for high speed websockets. I can see two approaches to address this: 1. Change the setters to protected, which opens up a possibility for types derived from `System.Net.WebSockets.WebSocket` to reuse the result object using a derived `WebSocketReceiveResult` type. 2. Change type from `class` to `struct`. Either approach halves the number of allocations, second is safer but allocates more memory. (Though ValueTask returns could change this) " 4532 area-System.Net Update MultipartContent.cs Added a support for choosing a CRLF type during content creation. Check #4531. 4533 area-System.Net System.Net.Security doesn't support coreclr It targets .NETFramework 4.6 but not .NETPlatoform 5.4/netstandard 1.3 or dnxcore5.0 Myget feed ![myget](http://aoa.blob.core.windows.net/aspnet/myget.png) Libs installed ![installedlibs](http://aoa.blob.core.windows.net/aspnet/installedlibs.png) Error using ![errors](http://aoa.blob.core.windows.net/aspnet/errors.png) 4534 area-System.Net Fixed Issue #4480, Adding Addref for the handle & doing release in releaseHandle() Adding Addref for the parent handle & doing release before disposing in releaseHandle(). 4535 area-System.Runtime System.Runtime.Tests The tests contained in System.Runtime.Tests (probably as well as others) do not follow the testing naming and structure guidelines suggested by the corefx team. A good example for the suggested naming and structure guidelines are tests in the System.Net namespace. Examples include suffixing test classes with `Test` and naming test methods in the format `UnitOfWork_StateUnderTest_ExpectedBehaviour()`. Edit: I think that this is the book recommended by the corefx team for unit testing standards http://www.amazon.co.uk/The-Art-Unit-Testing-Examples/dp/1933988274 For example the `String` test class should be renamed to `StringTest`. A method named `TestContains` should be renamed to `Contains_String_MatchesExpected` and `TestContainsInvalid` to `Contains_InvalidInput_ThrowsException`. Why this could be good: - Matches suggested naming standards for .NET unit tests - Modernises the test suite - Consistency with other unit tests in the project - Easier to understand what tests do for debugging, test changes or future test additions - Reasons of perfectionism Why this could be undesirable: - Renaming existing tests or test classes could be a breaking change - Could break parity with the full .NET Framework - Could cause merge conflicts and extra hassle for the team If the good people of GitHub and the corefx team see this as desirable, then I shall submit a pull request to modernize this System.Runtime.Tests suite. Maybe in the future, other test namespaces could be updated too. 4537 area-Infrastructure Build should collect all errors and write a summary after build completed Example log contains a hidden error about 10 pages up in the command prompt. Developers shouldn't be required to scroll up or to search for keywords to find errors. These should be summarized at the end of the log. ``` [ . . . ] System.Globalization.Extensions -> s:\c2\bin\Windows_NT.AnyCPU.Debug\System.Globalization.Extensions\System.Globalization.Exte nsions.dll System.IO.FileSystem.Primitives -> s:\c2\bin\Windows_NT.AnyCPU.Debug\System.IO.FileSystem.Primitives\System.IO.FileSystem.Prim itives.dll ALINK : error AL1078: Error signing assembly -- Access is denied. [s:\c2\src\Microsoft.CSharp\src\Microsoft.CSharp.csproj] System.IO.Compression.ZipFile -> s:\c2\bin\Windows_NT.AnyCPU.Debug\System.IO.Compression.ZipFile\System.IO.Compression.ZipFile .dll System.IO.FileSystem.DriveInfo -> s:\c2\bin\Windows_NT.AnyCPU.Debug\System.IO.FileSystem.DriveInfo\System.IO.FileSystem.DriveI nfo.dll System.IO.Compression -> s:\c2\bin\Windows_NT.AnyCPU.Debug\System.IO.Compression\System.IO.Compression.dll System.Dynamic.Runtime -> s:\c2\bin\Windows_NT.AnyCPU.Debug\System.Dynamic.Runtime\System.Dynamic.Runtime.dll System.IO.FileSystem.Watcher -> s:\c2\bin\Windows_NT.AnyCPU.Debug\System.IO.FileSystem.Watcher\System.IO.FileSystem.Watcher.dl [ . . . ] === TEST EXECUTION SUMMARY === System.Runtime.Serialization.Xml.Tests Total: 127, Errors: 0, Failed: 0, Skipped: 0, Time: 1.594s 0 Warning(s) 1 Error(s) Time Elapsed 00:06:51.95 Build Exit Code = 1 ``` 4540 area-System.Net WinHttpHandlerFunctional.Tests.WinHttpHandlerTest.SendAsync_SlowServerRespondsAfterDefaultReceiveTimeout_ThrowsHttpRequestException (from (empty)) http://dotnet-ci.cloudapp.net/job/dotnet_corefx_outerloop_windows_win8_release/lastCompletedBuild/testReport/junit/System.Net.Http.WinHttpHandlerFunctional.Tests/WinHttpHandlerTest/SendAsync_SlowServerRespondsAfterDefaultReceiveTimeout_ThrowsHttpRequestException/ System.Net.Http.WinHttpHandlerFunctional.Tests.WinHttpHandlerTest.SendAsync_SlowServerRespondsAfterDefaultReceiveTimeout_ThrowsHttpRequestException (from (empty)) Failing for the past 1 build (Since Failed#786 ) Took 11 sec. Stacktrace MESSAGE: Assert.Throws() Failure\r\nExpected: typeof(System.AggregateException)\r\nActual: (No exception was thrown) +++++++++++++++++++ STACK TRACE: at System.Net.Http.WinHttpHandlerFunctional.Tests.WinHttpHandlerTest.SendAsync_SlowServerRespondsAfterDefaultReceiveTimeout_ThrowsHttpRequestException() in d:\j\workspace\dotnet_corefx_outerloop_windows_win8_release\src\System.Net.Http.WinHttpHandler\tests\FunctionalTests\WinHttpHandlerTest.cs:line 68 4543 area-System.Reflection Some specific meta-programming (metadata access) questions... "Blame @davidfowl - he told me to put them here ;p 1. the big one; is there an indirect equivalent to `GetMethodBody()` / `GetILAsByteArray()` (plus locals, params, exception clauses etc)? Basically, is there an API that exposes the raw underlying IL? If the answer to this one is ""nope"", then the rest is moot... 2. `[UnverifiableCodeAttribute]` - no longer exists; is there a way to determine if a member is unverifiable? 3. can `volatile` fields be detected? Sigil used to do this via `GetRequiredCustomModifiers()` 4. `TypedReference` - am I right in thinking this simply doesn't exist as a concept? 5. any mechanism to resolve string literal and fields from metadata tokens? (akin to `ResolveString()` / `ResolveField()`) Context: I'm converting Sigil/Jil; most stuff is working, but some low-level meta-programming stuff is missing. It would be nice to reinstate the original optimizations to Jil (and an entire chunk of Sigil). " 4544 area-Meta Presence of project.json breaks existing csproj tooling (and makes unexpected demands) "I'm trying to transition multiple libraries to CoreCLR, moving to the DNX build tools. Since the folder name defines the assembly/package name (not editable), and since `**/*.cs` is the default inclusion list, the natural thing to want to do is to add a project.json _alongside_ the pre-existing csproj. This is particularly valuable where not all parties are yet working with DNX. Things go south very quickly, though, with errors from nuget package restore including errors about ""runtimes"", having to add explicit version numbers to project references, and complains about projects targeting multiple frameworks (which gets generated into `{projectt}.nuget.targets`). Short term, `del project.json /s`, `del project.lock.json /s` (and `del *.nuget.targes /s` if you have already failed once) makes everything work - so it is the mere presence of those files that makes the csproj unhappy. And obviously you need to not push those deletions back to source control! This means that the only way to transition to DNX tooling alongside csproj is: - have the `project.json` in the `{ProjectName}` folder - have the csproj in a _different_ folder - edit the csproj to pick the files up from outside the tree, ideally using `""../{ProjectName}/**/*.cs""` so no more edits will be needed - (note you can do the same from `project.json`, but if you do that the IDE doesn't show them, where-as this at least does) - accept the fact that adding new files via the csproj is a ""no-no"" It is a bit of a faff. Am I doing something insanely wrong here? I know csproj alongside project.json isn't the ideal end goal, but we live in the real world where most people aren't using pre-RC software ;p " 4553 area-System.Net Ping is internally posting back to the original SynchronizationContext Several issues to be fixed: 1. The Ping contract doesn't expose the EAP methods, but they're still in the implementation. 2. The SendPingAsync methods are implemented on top of that EAP implementation, resulting in unnecessary additional costs. 3. As a result of that wrapping, completion of the task requires posting back to the original synchronization context. 4554 area-Serialization Fix XmlSerializer writes empty element when serializing TimeSpan XmlSerializer writes empty element when serializing TimeSpan because this type's properties and fields are get only. This change is to handle TimeSpan type by reading and writing it in string with XmlConvert. Fixes #4405 cc: @SGuyGe @shmao @zhenlan 4561 area-Serialization Pre-generated serializers using sgen.exe Hello, We currently use pre-generated XMLSerializers generated by sgen.exe to boost the startup time, but these serializers are not available in CoreCLR. Is there any plan to include these serializers into CoreCLR? Or is there any modified version of sgen.exe which generates the CoreCLR compliant assembly? Thanks, Mehul. 4562 area-System.Net Support TLS client certs in CurlHandler (for libcurl+openssl) Make curlHandler support Client Certificates when the linked libcurl's ssl backend is compatible with openssl. Fix for #3151 4563 area-System.Net Unknown error 10058 caused crash in Sockets tests on OS X http://dotnet-ci.cloudapp.net/job/dotnet_corefx_mac_debug_tst/128/console ``` Unhandled Exception: System.Net.Sockets.SocketException: Unknown error: 10058 11:40:37 at System.Net.Sockets.Socket.Receive(IList`1 buffers, SocketFlags socketFlags) 11:40:37 at System.Net.Sockets.Tests.SendReceive.<>c__DisplayClassa.b__9() 11:40:37 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 11:40:40 ./run-test.sh: line 130: 95631 Abort trap: 6 ./corerun xunit.console.netcore.exe $testDllName -xml testResults.xml -notrait category=failing -notrait category=OuterLoop -notrait category=$xunitOSCategory -notrait Benchmark=true 11:40:40 One or more tests failed while running tests from 'System.Net.Sockets.APMServer.Tests'. Exit code 134. ``` 4564 area-System.Net terminate called recursively in System.Net.Requests tests on Linux in CI "Not much to go on, but the System.Net.Requests tests failed with the error ""terminate called recursively"" here: http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst_prtest/4406/console ``` 00:11:29 Discovered: System.Net.Requests.Tests 00:11:29 Discovered: System.Reflection.DispatchProxy.Tests 00:11:29 Starting: System.Net.Requests.Tests 00:11:29 Starting: System.Reflection.DispatchProxy.Tests 00:11:29 Discovered: System.IO.Compression.ZipFile.Tests 00:11:29 Discovered: InterProcessCommunication.Tests 00:11:29 Starting: System.IO.Compression.ZipFile.Tests 00:11:29 Discovered: System.Reflection.Emit.Lightweight.Tests 00:11:30 Starting: InterProcessCommunication.Tests 00:11:30 Starting: System.Reflection.Emit.Lightweight.Tests 00:11:30 Finished: System.Reflection.DispatchProxy.Tests 00:11:30 00:11:30 === TEST EXECUTION SUMMARY === 00:11:30 System.Reflection.DispatchProxy.Tests Total: 22, Errors: 0, Failed: 0, Skipped: 0, Time: 1.323s 00:11:31 terminate called recursively 00:11:31 Finished: System.Reflection.Emit.Lightweight.Tests 00:11:31 00:11:31 === TEST EXECUTION SUMMARY === 00:11:31 ./run-test.sh: line 130: 11518 Aborted (core dumped) ./corerun xunit.console.netcore.exe $testDllName -xml testResults.xml -notrait category=failing -notrait category=OuterLoop -notrait category=$xunitOSCategory -notrait Benchmark=true 00:11:31 One or more tests failed while running tests from 'System.Net.Requests.Tests'. Exit code 134. ``` " 4571 area-System.Data Port over DbProviderFactories class I have seen no info about this with respect to .NET Core, and it's a crucial element for (micro) ORMs and data-access libraries. The .NET full API for DbProviderFactory contains usage of DataTable, so I recon that's not going to be ported anytime soon, but there's a bigger problem: most provider factories are defined in machine.config, which with 'bcl per app' isn't going to fly anymore. Have there been any design thoughts on this? Will .NET core have DbProviderFactory machinery so an ORM can obtain the factory from a central API (I couldn't find the API of .NET full in corefx at the moment), and create ADO.NET elements using that factory? Or is this in limbo just like DataTable (https://github.com/dotnet/corefx/issues/1039) 4574 area-System.Security Desktop Compat: GetECDsa*Key doesn't check the KeyUsage values In Desktop GetECDsaPublicKey and GetECDsaPrivateKey will return null when KeyAgreement is the only KeyUsage value specified. This logic didn't get ported into corefx when ECDSA support was added. 4577 area-System.Diagnostics X-plat Performance Counters Hi all, is there any way I can get machine-specs with .NET Core that are cross-platform friendly? Like mono's PerformanceCounters? Specifically I'm trying to get the physical RAM available for a machine in .NET Core. I notice mono has a native function `mono_determine_physical_ram_size` that is cross-platform. Are there any plans to incorporate something similar with .NET Core PerformanceCounters? Thanks :) 4579 area-System.Data Unable to load DLL 'api-ms-win-core-localization-obsolete-l1-2-0.dll' "This issue occurs in System.Data.SqlClient on Linux. Set the database collation to Chinese_PRC_CI_AS in SQL Server. The SQL Server will reponse ""Codepage: 2052"" to SqlClient. See the following tabular tata stream. This will cause System.Data.SqlClient to load api-ms-win-core-localization-obsolete-l1-2-0.dll. Changing database collation from Chinese_PRC_CI_AS to SQL_Latin1_General_CP1_CI_AS will fix. Error messages: ``` DllNotFoundException: Unable to load DLL 'api-ms-win-core-localization-obsolete-l1-2-0.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) ``` ``` System.DllNotFoundException: Unable to load DLL 'api-ms-win-core-localization-obsolete-l1-2-0.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) at System.Data.LocaleInterop.LCIDToLocaleName(UInt32 Locale, StringBuilder lpName, Int32 cchName, Int32 dwFlags) at System.Data.LocaleInterop.LcidToLocaleNameInternal(Int32 lcid) at System.Data.LocaleInterop.GetDetailsInternal(Int32 lcid) at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) at System.Data.SqlClient.TdsParser.GetCodePage(SqlCollation collation, TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.TryProcessEnvChange(Int32 tokenLength, TdsParserStateObject stateObj, SqlEnvChange[]& sqlEnvChange) ``` " 4581 area-System.Security Add DiffieHellman Dear all, It looks like we got ECDH in corefx now, but what about the old DH? Are these two interchangeable or any specific reason the old DH is not implemented. It is done in mono. I can try to port it here if it is allowed to merge. ( I mean if there is no policy saying we must NOT have DH anymore, things like that.) Best, Dong 4585 area-System.Net Port more System.Net.WebSockets.Client tests Add subprotocol tests Add unknown/incorrect websocket endpoint tests 4586 area-System.Data SQL Server connection fails via web app, but succeeds in all other tools "I'm running ASP.NET 5, RC1 and am trying to connect to a MSSQL server instance on the local network. There are no firewalls between here and there. _If I try the same code in the same environment under MVC 5, everything works fine._ I am able to connect to the server successfully with the VS2015 Server Explorer as well as SQL Management Studio. When I attempt to connect to the DB with the following connection string (which I got from the VS2015 Server Explorer), it fails with the given error: string cs = @""Data Source=DBSERVER\INSTANCE1;Initial Catalog=MyDb;User ID=ASPNET-Db-User;Password=thepassword""; The code is: System.Data.SqlClient.SqlConnection con = new System.Data.SqlClient.SqlConnection(cs); con.Open(); The exception is: An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.SqlClient.dll but was not handled in user code Additional information: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) The stack is: at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, TimeoutTimer timeout) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at Isengard.Startup.ConfigureServices(IServiceCollection services) in C:\TFS\Isengard\src\Isengard\Startup.cs:line 46 " 4587 area-System.Globalization String.EndsWith on CoreCLR \ Linux does not work correctly for line feeds "Here's the repro example: ``` C# using System; public class Program { public static void Main (string[] args) { var text = ""Hello\r\n""; Console.WriteLine(text.EndsWith(""\n"")); Console.WriteLine(text.LastIndexOf('\n') == text.Length - 1); } } ``` **Expected**: True True **Actual**: False True I used DNX v1.0.0-rc2-16216 to run this application. The version of `System.Console` I used was `4.0.0-beta-23516`. Running it with DNX Mono or running this on Windows produces the right results. " 4588 area-System.Net Enable Unix domain sockets to be used via System.Net.Sockets 4590 area-System.Globalization "Support locales ending with ""utf8"" (as compared to ""UTF-8"")" "Something changed on my CentOS machines that has switch my locale from ""en_US.UTF-8"" to ""en_US.utf8"". As a result I can no longer run .NET Core apps (see stack trace below). I don't know what caused this change but it seems like we should support both formats. Unhandled Exception: System.ArgumentException: 'utf8' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. Parameter name: name at System.Globalization.EncodingTable.GetCodePageFromName(String name) at System.Text.Encoding.GetEncoding(String name) at System.ConsolePal.GetConsoleEncoding() at System.Console.CreateOutputWriter(Stream outputStream) at System.Console.EnsureInitialized[T](T& field, Func`1 initializer) at System.Console.WriteLine(String format, Object arg0) at Xunit.ConsoleClient.Program.Main(String[] args) " 4593 area-System.Data RC1- A call to SSPI failed, see inner exception I am getting a similar issue to this too, @natemcmaster mentioned my issue was similar to this, I have managed to create a repro https://github.com/hahmed/TeamKudu my app is being developed on osx for dnx rc1. I cleaned out the cache too dnu clear-http-cache which did not resolve this issue for me. Hope you can help... ``` fail: Microsoft.Data.Entity.Query.Internal.QueryCompiler[1] An exception occurred in the database while iterating the results of a query. System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - A call to SSPI failed, see inner exception.) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean& marsCapable) at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, TimeoutTimer timeout) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.Data.Entity.Storage.RelationalConnection.Open() at Microsoft.Data.Entity.Query.Internal.QueryingEnumerable.Enumerator.MoveNext() at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext() at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source) at lambda_method(Closure , QueryContext ) at Microsoft.Data.Entity.Query.Internal.QueryCompiler.<>c__DisplayClass18_1`1.b__1(QueryContext qc) ClientConnectionId:197d6bf2-dc99-4209-a2f7-e4b8c8aad6e0 fail: Microsoft.AspNet.Diagnostics.DeveloperExceptionPageMiddleware[0] An unhandled exception has occurred while executing the request System.IO.FileNotFoundException: Could not load the specified file. File name: 'EntityFramework.Core.resources' at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) at Microsoft.Data.Entity.Query.Internal.QueryCompiler.<>c__DisplayClass18_1`1.b__1(QueryContext qc) at System.Linq.Queryable.SingleOrDefault[TSource](IQueryable`1 source, Expression`1 predicate) at Team.Controllers.HomeController.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Mvc.Controllers.ControllerActionExecutor.d__8`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Mvc.Controllers.ControllerActionInvoker.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.d__53.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.d__44.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Mvc.Infrastructure.MvcRouteHandler.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at Microsoft.AspNet.Mvc.Routing.InnerAttributeRoute.d__10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at Microsoft.AspNet.Routing.RouteCollection.d__9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Builder.RouterMiddleware.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Diagnostics.Entity.MigrationsEndPointMiddleware.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Diagnostics.Entity.DatabaseErrorPageMiddleware.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNet.Diagnostics.Entity.DatabaseErrorPageMiddleware.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Diagnostics.DeveloperExceptionPageMiddleware.d__7.MoveNext() info: Microsoft.AspNet.Hosting.Internal.HostingEngine[2] Request finished in 0.1901ms 500 text/html; charset=utf-8 ``` 4595 area-Serialization Issue with serializing ReadOnlyCollection using DCS in NetCoreForCoreClr Error: ``` Exception thrown: 'System.InvalidOperationException' in mscorlib.ni.dll Additional information: The API 'System.Collections.ObjectModel.ReadOnlyCollection`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]._syncRoot' cannot be used on the current platform. See http://go.microsoft.com/fwlink/?LinkId=248273 for more information. ``` Call stack: ``` mscorlib.ni.dll!System.Reflection.Emit.DynamicILGenerator.GetTokenFor(System.Reflection.RuntimeFieldInfo runtimeField, System.RuntimeType rtType) Unknown mscorlib.ni.dll!System.Reflection.Emit.DynamicILGenerator.Emit(System.Reflection.Emit.OpCode opcode, System.Reflection.FieldInfo field) Unknown System.Private.DataContractSerialization.dll!System.Runtime.Serialization.CodeGenerator.LoadMember(System.Reflection.MemberInfo memberInfo) Unknown System.Private.DataContractSerialization.dll!System.Runtime.Serialization.XmlFormatWriterGenerator.CriticalHelper.LoadMemberValue(System.Runtime.Serialization.DataMember member) Unknown System.Private.DataContractSerialization.dll!System.Runtime.Serialization.XmlFormatWriterGenerator.CriticalHelper.WriteMembers(System.Runtime.Serialization.ClassDataContract classContract, System.Reflection.Emit.LocalBuilder extensionDataLocal, System.Runtime.Serialization.ClassDataContract derivedMostClassContract) Unknown System.Private.DataContractSerialization.dll!System.Runtime.Serialization.XmlFormatWriterGenerator.CriticalHelper.WriteClass(System.Runtime.Serialization.ClassDataContract classContract) Unknown System.Private.DataContractSerialization.dll!System.Runtime.Serialization.XmlFormatWriterGenerator.CriticalHelper.GenerateClassWriter(System.Runtime.Serialization.ClassDataContract classContract) Unknown System.Private.DataContractSerialization.dll!System.Runtime.Serialization.ClassDataContract.XmlFormatWriterDelegate.get() Unknown System.Private.DataContractSerialization.dll!System.Runtime.Serialization.ClassDataContract.WriteXmlValue(System.Runtime.Serialization.XmlWriterDelegator xmlWriter, object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext context) Unknown System.Private.DataContractSerialization.dll!System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue(System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlWriterDelegator xmlWriter, object obj, System.RuntimeTypeHandle declaredTypeHandle) Unknown System.Private.DataContractSerialization.dll!System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlWriterDelegator xmlWriter, object obj, System.RuntimeTypeHandle declaredTypeHandle) Unknown System.Private.DataContractSerialization.dll!System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(System.Runtime.Serialization.XmlWriterDelegator writer, object graph, System.Runtime.Serialization.DataContractResolver dataContractResolver) Unknown System.Private.DataContractSerialization.dll!System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(System.Runtime.Serialization.XmlWriterDelegator writer, object graph, System.Runtime.Serialization.DataContractResolver dataContractResolver) Unknown System.Private.DataContractSerialization.dll!System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(System.Runtime.Serialization.XmlWriterDelegator writer, object graph, System.Runtime.Serialization.DataContractResolver dataContractResolver) Unknown System.Private.DataContractSerialization.dll!System.Runtime.Serialization.XmlObjectSerializer.WriteObject(System.Xml.XmlDictionaryWriter writer, object graph) Unknown System.Private.DataContractSerialization.dll!System.Runtime.Serialization.XmlObjectSerializer.WriteObject(System.IO.Stream stream, object graph) Unknown > App1.exe!App1.App.TestReadOnlyCollection() Line 120 C# App1.exe!App1.App.OnLaunched(Windows.ApplicationModel.Activation.LaunchActivatedEventArgs e) Line 85 C# ``` 4596 area-System.IO "Add ""static"" BinaryReader-like APIs on Stream" In many scenarios, there is a need to read binary data from a stream without allocating BinaryReader. See System.Resources.Reader as an example. We should add such non-allocating static reader APIs, e.g. int ReadInt32(Stream stream). 4597 area-System.Net CurlHandler empty header values not being sent "You can use the following piece of code to test this: ``` var client = new HttpClient(); client.DefaultRequestHeaders.Add(""No-value"", """"); client.DefaultRequestHeaders.Add(""With-value"", ""value""); await client.GetAsync(""http://www.google.com""); ``` Then on linux, the header No-value is not sent. This breaks things such as the AWS SDK on linux due to the request's signature not matching, plus, it is different to the behaviour on windows " 4604 area-System.Net Ensure CurlHandler sends no-value headers "By default libcurl drops headers with empty values, as it uses an empty value as a sentinel to mean ""remove a previously added header with this key name."" If you actually want a header with an empty value, it needs to have a semicolon appended to the key name. cc: @vijaykota, @kapilash, @davidsh Fixes #4597 " 4605 area-System.IO A bunch of tests recently started failing on OS X These have been consistently failing for the last few days: ``` System.IO.MemoryMappedFiles.Tests.MemoryMappedFileTests_CreateFromFile.ReadOnlyFile(access: CopyOnWrite) System.IO.MemoryMappedFiles.Tests.MemoryMappedFileTests_CreateFromFile.ReadOnlyFile(access: ReadWrite) System.IO.Tests.FileInfo_AppendText.WriteToReadOnlyFile_UnauthException System.IO.Tests.File_ReadWriteAllLines_Encoded.WriteToReadOnlyFile_UnauthException System.IO.Tests.File_AppendAllLines.WriteToReadOnlyFile_UnauthException System.IO.Tests.File_OpenText.WriteToReadOnlyFile_UnauthException System.IO.Tests.File_ReadWriteAllLines.WriteToReadOnlyFile_UnauthException System.IO.Tests.FileInfo_CreateText.WriteToReadOnlyFile_UnauthException System.IO.Tests.FileInfo_OpenText.WriteToReadOnlyFile_UnauthException System.IO.Tests.File_ReadLines_Encoded.WriteToReadOnlyFile_UnauthException System.IO.Tests.File_ReadWriteAllText_Encoded.WriteToReadOnlyFile_UnauthException System.IO.Tests.File_ReadWriteAllText.WriteToReadOnlyFile_UnauthException System.IO.Tests.File_ReadLines.WriteToReadOnlyFile_UnauthException System.IO.Tests.File_CreateText.WriteToReadOnlyFile_UnauthException System.IO.Tests.File_AppendAllText_Encoded.WriteToReadOnlyFile_UnauthException System.IO.Tests.File_AppendAllText.WriteToReadOnlyFile_UnauthException System.IO.Tests.File_AppendText.WriteToReadOnlyFile_UnauthException System.IO.Tests.File_ReadWriteAllBytes.WriteToReadOnlyFile_UnauthException System.IO.Tests.File_AppendAllLines_Encoded.WriteToReadOnlyFile_UnauthException ``` These are all tests that expected an UnauthorizedAccessException, and they're no longer getting one: ``` 11:29:49 Expected: typeof(System.UnauthorizedAccessException) 11:29:49 Actual: (No exception was thrown) ``` 4606 area-System.Net Re-enable System.Net.Security tests on Linux and OSX The tests were disabled in PR #4328 since there were multiple crashes in CI builds. They should be renabled after fixing foll. issues: #4317 #4301 Also regressions since then (eg. PR #4483) need to be resolved 4608 area-Meta Consistent ToString() implementations At the moment some classes override `ToString()` and some don't. So it means that if you call `ToString()` on an object for debugging/logging purposes you may get something useful or you may just get the default which is the fully qualified `Type` name. To see how widespread this is, I wrote a [simple app using Cecil](https://gist.github.com/mattwarren/33edc6d07ea087542ccb) (please let me know if [my logic is wrong](https://gist.github.com/mattwarren/33edc6d07ea087542ccb#file-clrtostringoverrides-cs-L91-L107)). Here's the lists of types that don't override ToString(): - [Value types](https://gist.github.com/mattwarren/1dc37901be49a18a7204) and a [shorter summary](https://gist.github.com/mattwarren/afba4b325f02e66db419) - [Reference types](https://gist.github.com/mattwarren/3bcecf5d2b9810c48b41) and a [shorter summary](https://gist.github.com/mattwarren/79cc5669e1e4ebae6a46) Is there any desire to be more consistent across types or is it not something that people worry about? Is it expected that `[DebuggerDisplayAttribute]` should be used instead? For instance in Java you can call ToString() on an object and you always gets something meaningful back. This even extends to collections, it calls ToString() on each item in the collection and appends those into a string, which might be going a bit too far. **Useful links**: - [Object.ToString Method ()](https://msdn.microsoft.com/en-us/library/system.object.tostring.aspx) - [Framework Design Guidelines: Overriding Object.ToString()](http://blogs.msdn.com/b/brada/archive/2009/02/02/framework-design-guidelines-overriding-object-tostring.aspx) - [Why override ToString()? Use DebuggerDisplayAttribute instead](http://blogs.msdn.com/b/soultech/archive/2011/04/05/whyoverridetostring_2d00_use_2d00_debuggerdisplayattribute_2d00_instead.aspx) 4609 area-System.Runtime FileNotFoundException issue "I can not compile a new lib I started with new VS 2015 Update 1 RC. ``` The type ""FileNotFoundException"" is in ""System.IO, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" and ""System.Runtime, Version=4.0.21.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" available. ``` It's only underlined in the corefx code view. Any ideas? " 4610 area-System.Numerics BigInteger helper methods like IsProbablePrime(), GenerateRandom(), etc. Dear all, Shall we implement those which exist in JAVA and Mono? If there is no objection from design point of view or other concerns then I will make a PR soon. (BTW, in general is it ok to copy code from Mono into Corefx? What about reference the JAVA source?) 4613 area-System.Net Remove EAP implementation from Ping When System.Net.NetworkInformation.Ping had async functionality added to it originally, it was done with the Event-based Async Pattern (EAP). Then when Task-based Async Pattern (TAP) was added to it, the Task-based implementation was done in a quick manner on top of the EAP implementation. And now that Ping is being exposed in corefx, it only has the TAP implementation. There are several ramifications of this and issues to be addressed: - The Task-based implementation is suffering from some of the behaviors of the EAP implementation, e.g. completing the Task requires posting back to the original synchronization context, which both is inefficient and can cause problems for a caller that blocks waiting for the result. - There's lots of unnecessary code now in Ping. - There are members being exposed as public and protected that aren't part of the contract. - When a host name is provided, an extra worker is being queued and then synchronously blocked waiting for the results of the DNS lookup. This PR fixes all of that. It also adds some more tests. cc: @mellinoe, @CIPop, @davidsh Fixes #4553 4622 area-System.Data Investigate why InnerExceptions for SNI SqlExceptions only have top line in stack trace 4624 area-System.Net Add some validation/sanity tests for usage of the Unix ping command line tool I wrote a basic validation test for our usage of the ping command line utility in System.Net.Utilities. I am validating that we only send a single ping, and that we send the correct number of bytes in our packet. This will give us some basic assurance that, at the very least, the machine's ping utility is usable, supports the options we are using, and its output can be parsed as we expect. I also noticed this issue after writing the test: - It appears that ping6 on OSX does not allow you to specify a 0-length packet size for whatever reason, even though you can do so with ping (IPv4 version of the utility), as well as with ping6 on Ubuntu. Because of that, I just send a packet size of 1 instead. cc; @CIPop, @stephentoub 4628 area-System.Net System.Net.Sockets.Tests.ConnectExTest.Success failure on Linux "http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst_prtest/4500/testReport/ Hit a failure in this test: [System.Net.Sockets.Tests.ConnectExTest.Success](http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_debug_tst_prtest/4500/testReport/System.Net.Sockets.Tests/ConnectExTest/Success/) Exception in question: `System.Net.Sockets.SocketException : Unknown error 10048` Seems to indicate a ""Address In Use"" error, so perhaps this is a timing issue from multiple tests trying to open the same socket, or something of the sort. I didn't see any other issues mentioning this so it may be very rare. " 4631 area-System.Net Socket.Select() method doesn't work correctly in linux. "I use linux mint mate 17.2 which is ubuntu and debian based. I cannot connect to Ngpsql database from Linux client. But I can connect from Windows client. Because: After the following line is called =>Socket.Select(null, write, error, perIpTimeout); In Linux: The list write doesn't have any elements. As a result it enters the if (!write.Any()) block and creates ""Timeout exception"" there. In Windows: The list write has the element. It works. Here is a sample code to produce it. It is a console application that works on CoreClr. ``` c# // Program.cs using System; // using Npgsql; using System.Net; using System.Net.Sockets; using System.Collections.Generic; using System.Linq; namespace Sample { public class Program { public void Main() { Console.WriteLine(""App started..""); string Host = ""192.168.1.72""; int Port = 5432; int perIpTimeout = -1; var ips = Dns.GetHostAddressesAsync(Host).Result; var ep = new IPEndPoint(ips[0], Port); var socket = new Socket(ep.AddressFamily, SocketType.Stream, ProtocolType.Tcp) { Blocking = false }; try { try { socket.Connect(ep); } catch (SocketException e) { if (e.SocketErrorCode != SocketError.WouldBlock) { throw; } } var write = new List { socket }; var error = new List { socket }; Socket.Select(null, write, error, perIpTimeout); var errorCode = (int)socket.GetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Error); if (errorCode != 0) { throw new SocketException((int)socket.GetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Error)); } if (!write.Any()) { // When it is Linux, it will enter this block here! Console.WriteLine( $""Timeout after {new TimeSpan(perIpTimeout * 10).TotalSeconds} seconds when connecting to {ips[0]}""); try { socket.Dispose(); } catch { // ignored } // if i == 0 Console.WriteLine(""i==0 exception""); throw new TimeoutException(); // continue; } socket.Blocking = true; return; } catch (TimeoutException) { throw; } catch { try { socket.Dispose(); } catch { // ignored } Console.WriteLine(""Failed to connect to "" + ips[0]); // if (i == 0) Console.WriteLine(""i==0 exception 2""); throw; } } } // TODO: Remove. Will be fixed in the next release of EF. public class Startup { public void Configure() { } } } ``` " 4632 area-System.Runtime StringBuilder creates unnecessary strings with Append methods Append that takes a non-string value like int, double, etc, converts the value to a string then appends that string. StringBuilder should write the value's chars to the buffer without creating unnecessary strings. 4633 area-System.Net Cookies Added tests , especially for CookieContainer/Parser/Tokenizer Removed unused usings and simplified names Removed unecessary code 4634 area-System.Net Undo dependency on System.Net.Http #4562 introduced a temporary csproj dependency between System.Net.Requests.Tests and System.Net.Http.csproj as a work-around to a backward-incompatible change in System.Net.Http.Native library. This commit removes the dependency. 4635 area-System.Net Enable ChannelBinding Test for CurlHandler Enabling Channel Binding test for curlhandler. 4637 area-System.Threading System.Threading.Thread - Unable to run as foreground thread. Hi there, For `System.Threading.Thread : 4.0.0-beta-23516`, there appears to be a problem having the thread execute as a foreground thread on DNX (`1.0.0-beta6-12120`). The property `IsBackground` does not appear to have any bearing on how this thread is treated, with it seemingly behaving like a background thread with `IsBackground` reporting false. The end result is the caller must explicitly join on the thread to prevent a process exiting, which is not typical behavior. I am mindful that this may be related to DNX, or potentially functionality under review for corefx with consideration to varying platforms. MSDN: CLR Thread.IsBackground Property https://msdn.microsoft.com/en-us/library/system.threading.thread.isbackground%28v=vs.110%29.aspx Below, the expected behavior would be to have the process stay running until this thread exits. ``` csharp using System; namespace example { public class Program { public static void Main(string[] args) { // 4.0.0-beta-23516 var t = new System.Threading.Thread(() => { var running = true; while(running) { // we do not want this thread to exit. } }); t..Start(); // t.Join(); // this shouldn't be necessary for IsBackground = false } } } ``` Many Thanks 4638 area-System.Xml Wrong encoding when using XmlTextWriter Hi, does anyone know how to do the following with .NET core? ``` using (XmlTextWriter sw = new XmlTextWriter(this.FilePath, new UTF8Encoding(false))) { sw.Formatting = Formatting.Indented; sw.Indentation = 1; sw.IndentChar = '\t'; this.XmlDocument.WriteTo(sw); } ``` Kind regards 4641 area-Serialization Add support for surrogate for XmlSerializer 4642 area-Serialization Add support for surrogate in DataContractJsonSerializer 4646 area-System.Data Request for clarification on System.Data DbDataRecord / DbDataReader "`DbDataReader` has a `GetEnumerator()` API which is intended to return an `IEnumerable` that exposes `IDataRecord` (often: `DbDataRecord`) - this is often implemented via `DbEnumerator`. On core-clr at the current time, `DbDataReader` has an `abstract IEnumerator GetEnumerator()` method that must be overridden. However, without `DbDataRecord` or `DbEnumerator`, it is unclear how this is meant to be done in any way. I've checked the `SqlDataReader` code, and it currently refers to a local copy of a publicly declared `DbEnumerator` (et al), but these public declarations do not seem to be accessible on the currently published packages. So; can someone clarify this? a: is this `abstract` method an accidental inclusion that should have been dropped in the core-clr API? or b: is this meant to be there, but the required APIs to do it are in the wrong place and not yet available? Assuming ""b"", is there a timescale to get this into place so we can verify again the proposed API? " 4647 area-System.Security Missing CFB cipher mode Currently only three modes are supported by .NET Core, (CBC = 1, CTS = 5, ECB = 2). Is there any plan to add CFB support as it has been required by some network protocols (such as SNMP v3)? This mode is available on .NET Framework though. From where does the limitation of three modes come? The comment in `CipherMode` does not reveal enough background information. https://github.com/dotnet/corefx/blob/master/src/System.Security.Cryptography.Primitives/src/System/Security/Cryptography/CipherMode.cs 4650 area-Infrastructure ./build.sh doesn't work on CentOS "I set up a CentOS 7.1.1503 machine with the following steps: 1. Install a new VM using ""Gen 1"" in Hyper-V and using an .iso from http://isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1503-01.iso - I had this mounted as a DVD drive - When installing the OS, make sure you don't use the default ""minimal"" because you don't even get networking enabled. I used the ""developer"" option, which took a really long time. 2. Run software updates after installing the OS 3. sudo yum install -y libuuid-devel uuid-devel userspace-rcu-de bzip2 libicu-devel unzip openssl-devel libcurl-devel git clang libunwind-devel libxml2-devel python-devel libedit-devel libstdc++-static wget swig gcc cmake 4. Install Mono and Reference Assemblies: 1. sudo rpm --import ""http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"" 2. sudo yum-config-manager --add-repo http://download.mono-project.com/repo/centos/ 3. sudo yum upgrade -y 4. sudo yum install -y mono-complete referenceassemblies-pcl 5. add `fs.file-max = 100000` to /etc/sysctl.conf, and then run `sudo sysctl -p`. 6. Git clone corefx 7. `./build.sh` And during the build, I got errors like the following: ``` System.Private.Uri.CoreCLR -> /home/eerhardt/git/corefx/bin/Linux.AnyCPU.Debug/System.Private.Uri.CoreCLR/System.Private.Uri.dll EXEC : dlopen failed to open the libcoreclr.so with error libunwind-x86_64.so.8: cannot open shared object file: No such file or directory [/home/eerhardt/git/corefx/src/System.Runtime/src/System.Runtime.CoreCLR.csproj] /home/eerhardt/git/corefx/packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00121/lib/partialfacades.targets(180,5): error MSB3073: The command """"/home/eerhardt/git/corefx/bin/obj/Linux.AnyCPU.Debug/ToolRuntime/corerun"" ""/home/eerhardt/git/corefx/packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00121/lib/GenFacades.exe"" -partialFacadeAssemblyPath:""/home/eerhardt/git/corefx/bin/obj/Linux.AnyCPU.Debug/System.Runtime.CoreCLR/PreGenFacades/System.Runtime.dll"" -contracts:""/home/eerhardt/git/corefx/packages/System.Runtime/4.0.21-rc2-23523/ref/dotnet5.4/System.Runtime.dll"" -seeds:""/home/eerhardt/git/corefx/packages/Microsoft.DotNet.CoreCLR/1.0.5-prerelease/lib/dnxcore50/mscorlib.dll;/home/eerhardt/git/corefx/bin/Linux.AnyCPU.Debug/System.Private.Uri.CoreCLR/System.Private.Uri.dll"" -facadePath:""/home/eerhardt/git/corefx/bin/obj/Linux.AnyCPU.Debug/System.Runtime.CoreCLR/"" -producePdb:false"" exited with code 255. [/home/eerhardt/git/corefx/src/System.Runtime/src/System.Runtime.CoreCLR.csproj] EXEC : dlopen failed to open the libcoreclr.so with error libunwind-x86_64.so.8: cannot open shared object file: No such file or directory [/home/eerhardt/git/corefx/src/System.Diagnostics.Debug/src/System.Diagnostics.Debug.csproj] /home/eerhardt/git/corefx/packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00121/lib/partialfacades.targets(180,5): error MSB3073: The command """"/home/eerhardt/git/corefx/bin/obj/Linux.AnyCPU.Debug/ToolRuntime/corerun"" ""/home/eerhardt/git/corefx/packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00121/lib/GenFacades.exe"" -partialFacadeAssemblyPath:""/home/eerhardt/git/corefx/bin/obj/Linux.AnyCPU.Debug/System.Diagnostics.Debug/PreGenFacades/System.Diagnostics.Debug.dll"" -contracts:""/home/eerhardt/git/corefx/packages/System.Diagnostics.Debug/4.0.11-rc2-23523/ref/dotnet5.4/System.Diagnostics.Debug.dll"" -seeds:""/home/eerhardt/git/corefx/packages/Microsoft.DotNet.CoreCLR/1.0.5-prerelease/lib/dnxcore50/mscorlib.dll"" -facadePath:""/home/eerhardt/git/corefx/bin/obj/Linux.AnyCPU.Debug/System.Diagnostics.Debug/"" -producePdb:false"" exited with code 255. [/home/eerhardt/git/corefx/src/System.Diagnostics.Debug/src/System.Diagnostics.Debug.csproj] System.ComponentModel.Annotations -> /home/eerhardt/git/corefx/bin/Linux.AnyCPU.Debug/System.ComponentModel.Annotations/System.ComponentModel.Annotations.dll ``` Also, after those build errors, none of the tests pass during the build. This is because the CoreCLR fails to initialize when running `./corerun xunit.console.netcore.exe` with the same error: ``` [eerhardt@localhost dnxcore50]$ pwd /home/eerhardt/git/corefx/bin/tests/Linux.AnyCPU.Debug/System.Globalization.Tests/dnxcore50 [eerhardt@localhost dnxcore50]$ ./corerun xunit.console.netcore.exe dlopen failed to open the libcoreclr.so with error libunwind-x86_64.so.8: cannot open shared object file: No such file or directory ``` " 4651 area-Serialization XmlDictionaryReaderQuotas.MaxDepth \ MaxStringContentLength don't seem to be honored in dnxcore50 \ coreclr "Minimal repro from a failing test in Mvc: ``` C# using System; using System.IO; using System.Runtime.Serialization; using System.Text; using System.Xml; namespace ConsoleApp4 { public class Program { public static void Main(string[] args) { var input = ""10""; var content = new MemoryStream(Encoding.UTF8.GetBytes(input)); var quotas = new XmlDictionaryReaderQuotas { MaxDepth = 1, }; using (var reader = XmlDictionaryReader.CreateTextReader(content, Encoding.UTF8, quotas, onClose: null)) { var serializer = new DataContractSerializer(typeof(TestLevelTwo), new DataContractSerializerSettings()); // This throws a SerializerException in dnx451 but succeeds just fine in CoreCLR. var deserializedObject = (TestLevelTwo)serializer.ReadObject(reader); Console.WriteLine(deserializedObject.TestOne.SampleInt); } } } [DataContract(Name = ""TestLevelOne"", Namespace = """")] public class TestLevelOne { [DataMember] public int SampleInt { get; set; } } [DataContract(Name = ""TestLevelTwo"", Namespace = """")] public class TestLevelTwo { [DataMember] public TestLevelOne TestOne { get; set; } } } ``` We're seeing a similar issue with MaxStringContentLength. I'm using build 23509 of `System.Runtime.Serialization.Xml` " 4652 area-System.Net Fix a bug in Select() on *nix. The translations between PAL <-> platform file descriptor sets were inverted, causing incorrect behavior in the case that a Select() completed with any signalled file descriptors. 4653 area-Infrastructure "Add ""Windows Server 2008 R2 Enterprise (Server Core Installation)"" CI / Rolling Build" We're currently testing NT 6.1+ versions of full client and server windows. We need to also add an NT 6.1 Server Core installation to Jenkins outer loop. https://en.wikipedia.org/wiki/Server_Core https://msdn.microsoft.com/en-us/library/dd184075.aspx /cc @Chrisboh @mmitche @markwilkie @leecow 4654 area-Infrastructure Change minimum required Mac OS X version to 10.11.1 (El Capitan) We should be upgrading our Mac OS X test bed to 10.11.1. https://en.wikipedia.org/wiki/OS_X_El_Capitan /cc @Chrisboh @mmitche @markwilkie @leecow 4656 area-Infrastructure Add Debian 8.2 (Jessie) CI / Rolling Build We should have a DebianStable Jenkins outerloop build & test. The current stable version is 8.2 (Jessie) https://hub.docker.com/_/debian/. We'll need to upgrade this about once per year when newer Debian stable releases are available. https://wiki.debian.org/DebianReleases /cc @mmitche @leecow @dleeapho @ellismg @chcosta 4658 area-Serialization Add serialization performance tests for XmlSerializer and DCJS 4659 area-System.Data System.Data.Common from a PCL project Posting on behalf of a customer report via nuget.org > I would really like to be able to reference System.Data.Common from a PCL project - however the >current NuGet package doesn't support PCL. > Would you consider adding support for PCL? > Otherwise, I am planning on implementing it in a separate repository - I'm looking at using Type >Forwarding based on approach here: http://stackoverflow.com/questions/21357321/handling-missing->types-in-pcl-with-real-types-existing-on-some-of-the-platforms > Kind Regards Darrell /cc @saurabh500 @YoungGah 4661 area-System.Net Remove Secur32 dependencies from System.Net.Security Currently, I've replaced the `Secur32` string to point at the OneCore supported `sspicli.dll`. We need to properly replace the name and move Interop files under the `\sspicli` folder. 4663 area-System.Net CurlHandler empty header values not being sent in the event of a redirect occuring Thanks for your quick turnaround on https://github.com/dotnet/corefx/issues/4597. There is still an issue which seems related (although, I'm not personally affected by this one): The example I gave (http://www.google.com) actually causes a 302 redirect in Australia, and I happened to notice that the header is missing from the subsequent request on linux. This is different behaviour to windows Linux: ``` GET http://www.google.com/ HTTP/1.1 Host: www.google.com Accept: */* Accept-Encoding: gzip,deflate Connection: Keep-Alive No-value: With-value: value ``` ``` GET http://www.google.com.au/?gfe_rd=cr&ei=btBTVp6vCsTu8we45Kv4Dg HTTP/1.1 Host: www.google.com.au Accept: */* Accept-Encoding: gzip,deflate Connection: Keep-Alive With-value: value ``` Windows: ``` GET http://www.google.com/ HTTP/1.1 Accept-Encoding: gzip, deflate No-value: With-value: value Connection: Keep-Alive Host: www.google.com ``` ``` GET http://www.google.com.au/?gfe_rd=cr&ei=pdBTVqyuG8Tu8we45Kv4Dg HTTP/1.1 Accept-Encoding: gzip, deflate No-value: With-value: value Connection: Keep-Alive Host: www.google.com.au ``` 4665 area-System.Net New Socket select tests failing on OS X, CentOS, openSUSE CentOS: http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_centos71_debug_tst/157/console ``` 20:09:40 terminate called after throwing an instance of 'PAL_SEHException' 20:09:40 ./run-test.sh: line 130: 59310 Aborted ./corerun xunit.console.netcore.exe $testDllName -xml testResults.xml -notrait category=failing -notrait category=OuterLoop -notrait category=$xunitOSCategory -notrait Benchmark=true 20:09:40 One or more tests failed while running tests from 'System.Net.Sockets.APMServer.Tests'. Exit code 134. 20:09:41 System.Net.Sockets.Tests.SelectAndPollTests.SelectWrite_Multiple_Mixed [FAIL] 20:09:41 Assert.Equal() Failure 20:09:41 Expected: 1 20:09:41 Actual: 0 20:09:41 terminate called after throwing an instance of 'PAL_SEHException' 20:09:41 ./run-test.sh: line 130: 59318 Aborted ./corerun xunit.console.netcore.exe $testDllName -xml testResults.xml -notrait category=failing -notrait category=OuterLoop -notrait category=$xunitOSCategory -notrait Benchmark=true 20:09:41 One or more tests failed while running tests from 'System.Net.Sockets.AsyncServer.Tests'. Exit code 134. ``` openSUSE http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_opensuse132_debug_tst/188/console ``` 20:15:57 terminate called after throwing an instance of 'PAL_SEHException' 20:15:57 ./run-test.sh: line 130: 2689 Aborted ./corerun xunit.console.netcore.exe $testDllName -xml testResults.xml -notrait category=failing -notrait category=OuterLoop -notrait category=$xunitOSCategory -notrait Benchmark=true 20:15:57 One or more tests failed while running tests from 'System.Net.Sockets.APMServer.Tests'. Exit code 134. 20:15:57 System.Net.Sockets.Tests.SelectAndPollTests.SelectWrite_Multiple_Mixed [FAIL] 20:15:57 System.Net.Sockets.SocketException : Unknown error -1 20:15:57 terminate called after throwing an instance of 'PAL_SEHException' 20:15:57 ./run-test.sh: line 130: 2688 Aborted ./corerun xunit.console.netcore.exe $testDllName -xml testResults.xml -notrait category=failing -notrait category=OuterLoop -notrait category=$xunitOSCategory -notrait Benchmark=true 20:15:57 One or more tests failed while running tests from 'System.Net.Sockets.AsyncServer.Tests'. Exit code 134. ``` 4667 area-System.Globalization NumberFormatInfoNumberGroupSizes.TestNumberGroupSizesLocale failing on OS X "``` 20:31:33 System.Globalization.Tests.NumberFormatInfoNumberGroupSizes.TestNumberGroupSizesLocale(locale: ""ur-IN"") [FAIL] 20:31:33 Assert.Equal() Failure 20:31:33 Expected: Int32[] [3] 20:31:33 Actual: Int32[] [3, 2] 20:31:33 Stack Trace: 20:31:33 at System.Globalization.Tests.NumberFormatInfoNumberGroupSizes.TestNumberGroupSizesLocale(String locale) ``` " 4668 area-Serialization XML parsing fails in dnx451 but passes in dnxcore50 "I'm the maintainer of a library that provides C# bindings for the MusicBrainz API in DNX (it's a fork of a previous project). It's open source an available there: https://github.com/ribandelle/MusicBrainz.DNX While I was porting and using the library I noticed that some of the XML responses would crash when the application was running from the dnx451 profile, but not when using the dnxcore50 profile. An example of an XML response that crashes is this one: http://musicbrainz.org/ws/2/artist/?query=Metallica But other responses don't crash at all, like this one: http://musicbrainz.org/ws/2/artist/?query=Lofofora According to the W3C XML Validator, both responses are valid XML (just a warning that there's no doctype): http://validator.w3.org/check?uri=http%3A%2F%2Fmusicbrainz.org%2Fws%2F2%2Fartist%2F%3Fquery%3DMetallica http://validator.w3.org/check?uri=http%3A%2F%2Fmusicbrainz.org%2Fws%2F2%2Fartist%2F%3Fquery%3DLofofora The error I get happens here: ``` public static T Find(string query, int limit, int offset, string part) { var serializer = new XmlSerializer(typeof(T)); try { var o = Get(""http://musicbrainz.org/ws/2/"" + part + ""/?query="" + query + LimitOffsetToString(limit, offset)); { return (T)serializer.Deserialize(o.CreateReader()); } } catch (Exception ex) { return default(T); } } ``` When the Deserialize part of the code is reached, the catch is triggered and the exception says `There is an error in XML document (0, 0)`. The stacktrace is the following: `at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader) at MusicBrainz.Help.Find[T](String query, Int32 limit, Int32 offset, String part) in D:\GitHub\MusicBrainz.DNX\MusicBrainz.DNX\Help.cs:line 111` I have created a small console program that illustrates that issue. It's available here: https://github.com/acastaner/xmlparsing.git (make sure to use the ""debug"" branch). I haven't bundled the library in that program, you'll need to also clone the MusicBrainz.DNX repo. Also make sure to clone the debug branch as I have added an ""ex"" Exception object in the catch so you can see the details of the exception. If you run that console program with dnx451 it WILL crash when trying to parse the Metallica response, but it will NOT crash if you run it with a dnxcore50 profile. Note that I'm using Windows 10 build 10586 but I've also reproduced the issue on Linux (Ubuntu and CentOS). It _seems_ to me that only responses with a larger body will crash. Metallica triggers the crash, but so does ""Queen"" for instance. Artists with a shorter content response seem to never crash. Just a thought, maybe it's unrelated. " 4669 area-System.ComponentModel RequireAttribute ignored "I have a class with an integer property decorated with [Required] attribute. When I use it within an ASP.NET 5 application MVC controller as a parameter in a Post method accepting json, RequiredAttribute seemed to be ignored when property is not contained in JSON. Model deserialized in controller method contains UserId with default property value 0 for an Int32 and is therefore valid. If the RequiredAttribute was not ignored, model should not be deserialized and should be null, right? I am using ASP.NET 5 RC1 Here is my code: JSON: ``` { ""Token"" : ""abcd"" } ``` Model: ``` [DataContract] public class MyClass { [Required] [DataMember] public int UserId { get; set; } [DataMember] public string Token { get; set; } } ``` MVC Controller: ``` [HttpPost] public async Task MyMethod([FromBody][Required] MyClass model) { if (!ModelState.IsValid || model == null) throw new HttpResponseException(400); await ... } ``` Thanks for your help Alain " 4670 area-System.Reflection MemberTypes not found, yet the immediate window can find the type. "I'm not sure if this is a runtime mismatch of something Here is my method: ``` private static object ValueFor(object obj, MemberInfo member) { object value = null; if (member != null) { switch (member.MemberType) { case MemberTypes.Field: value = ((FieldInfo)member).GetValue(obj); break; case MemberTypes.Property: value = ((PropertyInfo)member).GetValue(obj, null); break; case MemberTypes.Method: break; default: throw new System.ArgumentOutOfRangeException(); } } return value; } ``` And then in my immediate window: ``` ?member.MemberType Property ?member.MemberType.GetType() {Name = ""MemberTypes"" FullName = ""System.Reflection.MemberTypes""} Assembly: {mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e} ``` My dependencies in project.json ``` { ""dependencies"": { ""EntityFramework.MicrosoftSqlServer"": ""(7.0.0-rc1-final,]"", ""EntityFramework.MicrosoftSqlServer.Design"": ""(7.0.0-rc1-final,]"", ""EntityFramework.Commands"": ""(7.0.0-rc1-final,]"", ""System.Reflection"": ""4.1.0-beta-*"", ""Microsoft.Extensions.PlatformAbstractions"": ""(1.0.0-rc1-final,]"" }, ... ``` So there looks to be a version mismatch of System.Reflection. What's up with that? I'm debugging in Visual Studio 2015. " 4671 area-System.Reflection SignatureDecoder.DecodeMethodSignature throws `BadImageFormatException` when decoding method with `int, __arglist` parameters "A BadImageFormatException is thrown when using System.Reflection.Metadata to get method signature for `public static void ArglistMethod(int i, __arglist)`. This behaviour worked in ""1.1.0-alpha-00008"". ## Version **Branch**: `dev/metadata` **Affected Package/Version**: ""System.Reflection.Metadata"": ""1.2.0-alpha-00016"" ## Repro Steps 1. Create library with the following code below. 2. Try to decode the method with: `SignatureDecoder.DecodeMethodSignature(memberReference.Signature, this)` ``` csharp public class TestClass { public static void ArglistMethod(int i, __arglist) { } public static void Main(string[] args) { ArglistMethod(5, __arglist(1, 2, 3)); } } ``` ## Expected ""M:TestClass.ArglistMethod(System.Int32,__arglist)"" ## Actual ``` System.BadImageFormatException occurred HResult=-2147024885 Message=Format of the executable (.exe) or library (.dll) is invalid. Source=System.Reflection.Metadata StackTrace: at System.Reflection.Metadata.Decoding.SignatureDecoder.DecodeType[TType](BlobReader& blobReader, Int32 typeCode, ISignatureTypeProvider`1 provider) at System.Reflection.Metadata.Decoding.SignatureDecoder.DecodeType[TType](BlobReader& blobReader, ISignatureTypeProvider`1 provider) at System.Reflection.Metadata.Decoding.SignatureDecoder.DecodeMethodSignature[TType](BlobReader& blobReader, ISignatureTypeProvider`1 provider) at System.Reflection.Metadata.Decoding.SignatureDecoder.DecodeMethodSignature[TType](BlobHandle handle, ISignatureTypeProvider`1 provider) at Microsoft.Fx.Portability.Analyzer.MemberMetadataInfoTypeProvider.GetMemberRefInfo(MemberReference memberReference) in E:\dotnet-apiport\src\Microsoft.Fx.Portability.MetadataReader\MemberMetadataInfoTypeProvider.cs:line 43 InnerException: ``` " 4672 area-Microsoft.CSharp DLR does not respect InternalsVisibleTo for anonymous types "In full .NET, anonymous types are accessible via DLR across assembly boundaries if an `InternalsVisibleTo` attribute is present. This behavior is not the same in CoreCLR. Instead, a `RuntimeBinderException` is thrown. ``` Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'object' does not contain a definition for 'xxxx' ``` Consider the following scenario: In assembly ConsoleApp: ``` c# public class Program { public static void Main() { var list = new List(); list.AddGreeting(""Hello world""); dynamic item = list[0]; Console.WriteLine(item.Greeting); // throws in CoreCLR. Prints ""Hello world"" in full .NET } } ``` In assembly GreetingLibrary: ``` c# [assembly: InternalsVisibleTo(""ConsoleApp"")] public static class ListExtension { public static void AddGreeting(this List source, string greeting) { source.Add(new { Greeting = greeting }); } } ``` In .NET 4.5.1, this console application will print ""Hello world"" but in CoreCLR this application throws an exception. Full repro project: [test-dlr-bug-master.zip](https://github.com/dotnet/corefx/files/402776/test-dlr-bug-master.zip) " 4673 area-System.Runtime Add: BitConverter.SingleToInt32Bits and Int32BitsToSingle ### Migrated from https://github.com/dotnet/coreclr/issues/832 To match the existing `DoubleToInt64Bits` and `Int64BitsToDouble`. This is important for binary serialization tools to get hold of the underlying value without requiring unsafe themselves, which may not be accepted. Example usage: IO / sockets tools, raw protocol tools, network libraries, serialization tools. ## Existing 64-bit API ``` public static long BitConverter.DoubleToInt64Bits(double value); public static double BitConverter.Int64BitsToDouble(long value); ``` However, no 32-bit api exists ## Proposed 32-bit API To mimic existing API: ``` public static int BitConverter.SingleToInt32Bits(float value); public static float BitConverter.Int32BitsToSingle(int value); ``` ## Rationale and Usage Exactly the same as pre-existing 64-bit API: - caller can populate an `int` (perhaps via shift ops and network access / stream, perhaps via raw memory access), and force it to a `float`, for example during deserialization - caller can consume a `float` and force it to an `int` (perhaps for use on network access / stream via shift, perhaps via raw memory access), for example during serialization ## Details To follow same rules and conventions as the existing 64-bit api, which is to say: uses straight unsafe cast - does not explicitly consider machines where integer and floating-point endianness are different (integer big-endian, floating-point little-endian), but is fine on both big-endian and little-endian machines - in reality the endianness matches. To emphasise: there is nothing in here that is different from the expectations of the existing 64-bit api. It would be inconsistent to have the 32-bit API operate with different expectations to the 64-bit api, and it would be a breaking change to alter the expectations of the existing 64-bit api. ## Pull Request A pull request is available with the proposed implementation (comments etc based on the existing 64-bit API): https://github.com/dotnet/coreclr/pull/833 ## Issues None known; not a breaking change, and no overload resolution issue since uniquely named static non-extension methods. ## Discussion Point Possible doubt over relevancy of comments and assertion. This is addressed separately in https://github.com/dotnet/coreclr/issues/834 4676 area-System.Data SqlDataReader throws invalid operation exception `System.Data.SqlDataReader` throws when it attempts to dispose Using System.Data.SqlClient 4.0.0-rc2-23525 on OSX and Linux. ``` System.InvalidOperationException : Internal connection fatal error. Stack Trace: at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryCloseInternal(Boolean closeReader) at System.Data.SqlClient.SqlDataReader.Close() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader() ``` Reproduces consistently when running [SqlServerDatabaseModelFactoryTest](https://github.com/aspnet/EntityFramework/blob/48e365d3433eef53b210a3f132676f1f1a1f1c4c/test/EntityFramework.MicrosoftSqlServer.Design.FunctionalTests/SqlServerDatabaseModelFactoryTest.cs#L16) from Entity Framework against SQL 2014. 4682 area-System.ComponentModel [DataAnnotations] resx localization not work on RC1 "### environment - Windows 10 Enterprize N + japanese lang pack - Visual Studio 2015 Enterprize (ja-jp localized) ### repro steps 1. create new ASP.NET Web Application project 2. add Resource.resx 3. define `Password` resource 4. edit `ViewModels/Account/LoginViewModel.cs` ``` [Required] [DataType(DataType.Password)] [Display( ResourceType = typeof(Resource), Name =""Password"")] public string Password { get; set; } ``` run application and go to login page ### expected result Login form field label shown as resource defined text. ### actual result ``` An unhandled exception occurred while processing the request. InvalidOperationException: ローカライズに失敗したため、プロパティ 'Name' を取得できません。型 'WebApplication1.Resource' がパブリックでないか、'Password' という名前のパブリックで静的な文字列プロパティが含まれていません。 場所 System.ComponentModel.DataAnnotations.LocalizableString.<>c__DisplayClass0.b__3() ``` error was reports WebApplication1.Resource is not `public` or 'Password' is not `public static`. in generated Resources.Designer.cs ``` internal class Resource { snip internal static string Password { get { return ResourceManager.GetString(""Password"", resourceCulture); } } } ``` - Resource class generated with `internal` - Password property generated with `internal static` " 4686 area-System.Net SelectRead_Multiple_Success failing in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx_mac_debug_tst/140/console ``` 04:51:52 System.Net.Sockets.Tests.SelectAndPollTests.SelectRead_Multiple_Success [FAIL] 04:51:52 Assert.Equal() Failure 04:51:52 Expected: 2 04:51:52 Actual: 1 04:51:52 Stack Trace: 04:51:52 at System.Net.Sockets.Tests.SelectAndPollTests.SelectRead_Multiple_Success() ``` 4690 area-System.Collections Add bool TryGetValue(TKey, out TItem) method to a KeyedCollection<,> class "Suggested TryGetValue method allows to check a collection for an ""item"" with specific ""key"" and get item if it exists in the collection. Similar that occur in the [Dictionary<,>](https://msdn.microsoft.com/en-us/library/bb299639.aspx). ``` cs public bool TryGetValue(TKey key, out TItem item) { if (key == null) { throw new ArgumentNullException(""key""); } if (_dict != null) { return _dict.TryGetValue(key, out item); } foreach (TItem itemInItems in Items) { TKey keyInItems = GetKeyForItem(itemInItems); if (keyInItems != null && _comparer.Equals(key, keyInItems)) { item = itemInItems; return true; } } item = default(TItem); return false; } ``` If some existing derived type ""MyKeyedCollection<,>"" already contains the same method, only warning occurred in compilation: > warning CS0108: 'MyKeyedCollection. TryGetValue(TKey, out TItem)' hides inherited member 'KeyedCollection. TryGetValue(TKey, out TItem)'. Use the new keyword if hiding was intended. " 4691 area-System.Collections Redundant checks in KeyedCollection<,> classes "In methods [Contains](https://github.com/dotnet/corefx/blob/49b8925bcf2bd1bd742915fe2f673b153dc74942/src/System.ObjectModel/src/System/Collections/ObjectModel/KeyedCollection.cs#L91) and [Remove](https://github.com/dotnet/corefx/blob/49b8925bcf2bd1bd742915fe2f673b153dc74942/src/System.ObjectModel/src/System/Collections/ObjectModel/KeyedCollection.cs#L131) we have a checks ``` cs if (key == null) { throw new ArgumentNullException(""key""); } // … if (key != null) // <-- this ""if"" is redundant because we checked key == null above { // … } ``` Should this be fixed? " 4693 area-System.ComponentModel Proposal: CompareAttribute should apply to fields, too Currently the CompareAttribute can't be used with fields. Particularly with ViewModels, where property logic commonly isn't applicable, fields are a valid alternative, if not even a better choice to use. So I propose to extend all DataAnnotation attributes to be applicable to properties and fields as well. 4694 area-System.Linq Expression.Label with null LabelTarget has wrong parameter name in exception. We would expect the following: ``` C# try { Expression.Label(default(LabelTarget)); } catch(ArgumentNullException ane) { Console.WriteLine(ane.ParamName); } ``` To output `target` as that is the name of the parameter that is incorrectly null. Instead it outputs `label`. 4695 area-System.Collections Indexer for SortedSet ``` var set = new SortedSet(); set.Add(5.6); set.Add(2.1); set.Add(3.4); var x = set[1]; Assert.AreEqual(3.4, x); CS0021 Cannot apply indexing with [] to an expression of type 'SortedSet' ``` It would be useful if SortedSet had an indexer for random access. Would this be possible? Reading the code I see SortedSet is implemented using a red-black tree. Also useful would be an IndexOf method. https://github.com/dotnet/corefx/blob/master/src/System.Collections/src/System/Collections/Generic/SortedSet.cs 4696 area-System.Collections Stable sort [As documented](https://msdn.microsoft.com/en-us/library/w56d4y5z%28v=vs.110%29.aspx), `List.Sort` does an unstable sort: > This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal. It would be useful to offer a stable sort method for when the stronger behaviour is required. The same applies to Array.Sort 1. C++ offers both sort and [stable_sort](http://www.cplusplus.com/reference/algorithm/stable_sort/) 2. Golang offers both Sort and Stable https://golang.org/pkg/sort/#Stable 3. Python's sort is stable https://docs.python.org/3/library/stdtypes.html#list.sort 4697 area-System.Collections Binary search for IList and IReadOnlyList > arguably the most important algorithm of all: binary search We have [List.BinarySearch](https://msdn.microsoft.com/en-us/library/6sh2ey19%28v=vs.110%29.aspx) and [Array.Search](https://msdn.microsoft.com/en-us/library/system.array.binarysearch%28v=vs.110%29.aspx) for searching sorted lists and arrays. But what about other collections that implement `IList` or `IReadOnlyList`? It would be useful to have similar functions (extension methods) to search them. Binary search is a fundamental algorithm, so it's helpful to have a fast reliable well-documented implementation in the standard library. Otherwise developers waste time reinventing the wheel. A workaround is calling `.ToList()` or `.ToArray()` and then searching the new object, but that's not ideal because it copies the collection. 4698 area-System.Collections Strengthen binary search to return index of first matching element "[As documented](https://msdn.microsoft.com/en-us/library/w4e7fxsh%28v=vs.110%29.aspx) the behaviour of List.BinarySearch and Array.BinarySearch is undefined when the sorted list contains two elements with the same value: > If the List contains more than one element with the same value, the method returns only one of the occurrences, and it might return any one of the occurrences, not necessarily the first one. It would be useful to strengthen this to return the first matching element—for some problems this detail is important. This could be done without cost—the complexity would remain O(log n). The binary search methods in C++, Golang and Python all return the first matching element 1. http://www.cplusplus.com/reference/algorithm/lower_bound/ ""Returns an iterator pointing to the first element which ... "" 2. https://golang.org/pkg/sort/#Search ""find and return the smallest index ... "" 3. https://docs.python.org/3/library/bisect.html#bisect.bisect_left ""the insertion point will be before (to the left of) any existing entries ... "" " 4699 area-System.Net GetAllNetworkInterfaces throws FileNotFoundException on OS X "`System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()` throws an error when OS X (v 10.10.5) has no internet access (i.e after turning off Wi-Fi, removing the network cable etc.). .NET Version Manager: Version 1.0.0-rc2-15545 ``` Active Version Runtime Architecture OperatingSystem Alias ------ ------- ------- ------------ --------------- ----- 1.0.0-rc1-final clr x64 win 1.0.0-rc1-final clr x86 win * 1.0.0-rc1-final coreclr x64 darwin default 1.0.0-rc1-final coreclr x64 linux 1.0.0-rc1-final coreclr x64 win 1.0.0-rc1-final coreclr x86 win 1.0.0-rc1-final mono linux/osx ``` project.json ``` { ""version"": ""1.0.0-*"", ""compilationOptions"": { ""emitEntryPoint"": true }, ""dependencies"": { ""Microsoft.NETCore.Runtime"": ""1.0.1-beta-*"", ""System.IO"": ""4.0.10-beta-*"", ""System.Console"": ""4.0.0-beta-*"", ""System.Runtime"": ""4.0.21-beta-*"", ""System.Net.NetworkInformation"": ""4.1.0-beta-23516"" }, ""frameworks"": { ""dnxcore50"": { } } } ``` Exception ``` Unhandled Exception: System.IO.FileNotFoundException: Could not find file '/etc/resolv.conf'. at Interop.CheckIo(Int64 result, String path, Boolean isDirectory, Func`2 errorRewriter) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode) at System.IO.UnixFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) at System.IO.UnixFileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.File.InternalReadAllText(String path, Encoding encoding) at System.Net.NetworkInformation.UnixIPInterfaceProperties.GetDnsSuffix() at System.Net.NetworkInformation.UnixIPInterfaceProperties..ctor(UnixNetworkInterface uni) at System.Net.NetworkInformation.OsxIpInterfaceProperties..ctor(OsxNetworkInterface oni, Int32 mtu) at System.Net.NetworkInformation.OsxNetworkInterface..ctor(String name) at System.Net.NetworkInformation.OsxNetworkInterface.GetOrCreate(Dictionary`2 interfaces, String name) at System.Net.NetworkInformation.OsxNetworkInterface.<>c__DisplayClass3_0.b__2(String name, LinkLayerAddressInfo* llAddr) at Interop.Sys.EnumerateInterfaceAddresses(IPv4AddressDiscoveredCallback ipv4Found, IPv6AddressDiscoveredCallback ipv6Found, LinkLayerAddressDiscoveredCallback linkLayerFound) at System.Net.NetworkInformation.OsxNetworkInterface.GetOsxNetworkInterfaces() at System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces() at ConsoleApplication.Program.Main(String[] args) ``` " 4707 area-System.Net Fix corruption when FD_SETSIZE larger than expected The expected FD_SETSIZE for Select is currently hardcoded to be 1024. While common, this is not required, and many servers will have this limit increased. With the current hardcoded value, if a file descriptor comes in beyond the limit, we end up corrupting memory. This commit fixes it by making the limit in managed code dynamic, supplied via a call to the native shim to return the actual value of FD_SETSIZE so that the managed and native expectations match. cc: @pgavlin, @sergiy-k 4708 area-System.Threading Add ValueTask to corefx [ValueTask](https://github.com/dotnet/corefxlab/blob/master/src/System.Threading.Tasks.Channels/src/System/Threading/Tasks/ValueTask.cs) being developed for System.Threading.Tasks.Channels in corefxlab is very valuable on its own and should be included independently of Channels (and earlier). > `ReadAsync` is defined to return a `ValueTask`, a new struct type included in this library. `ValueTask` is a discriminated union of a `T` and a `Task`, making it allocation-free for `ReadAsync` to synchronously return a `T` value it has available (in contrast to using `Task.FromResult`, which needs to allocate a `Task` instance). `ValueTask` is awaitable, so most consumption of instances will be indistinguishable from with a `Task`. If a `Task` is needed, one can be retrieved using `ValueTask`'s `AsTask()` method, which will either return the `Task` it stores internally or will return an instance created from the `T` it stores. 4717 area-System.Reflection Fix decoding of varags method references We were peeking at the sentinel between required and variable arguments, but not consuming it. Fix #4671 FYI, @tmat, @conniey -- I'm going to merge this to the dev branch if CI succeeds. I have a bunch of more refactoring+tests for the signature decoder pending and it will all show up soon for full review in a PR to master. 4719 area-System.Reflection Merge master to dev/metadata 4720 area-System.Diagnostics Escaping quotes - portable way How do you escape quotes the portable way when using Process with UseShellExecute and Arguments? EDIT: UseShellExecute: ``` System.PlatformNotSupportedException: UseShellExecute must always be set to false. at System.Diagnostics.ProcessStartInfo.set_UseShellExecute(Boolean value) ``` Process could perhaps have an option of taking string[] to match Main and be able roundtrip 4721 area-System.Net Add ALPN support to System.Net.Security.SslStream API "## Rationale In order to initiate HTTP/2 connection over TLS, application protocol must be negotiated (References: [rfc7540 section-3.3](https://tools.ietf.org/html/rfc7540#section-3.3),[rfc7301](https://tools.ietf.org/html/rfc7301)). ALPN support [is available](https://technet.microsoft.com/en-us/library/hh831771.aspx) in SChannel for Windows Server 2012 R2, Windows 8.1 or later. Support in SslStream is a popular feature request: See [here](https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/6264363-add-support-for-alpn-to-system-net-security-sslstr) and #2928. Client and server applications need a way to specify their supported application protocol list and be able to query the negotiated protocol. ## Proposed API change ``` C# public partial class SslStream : AuthenticatedStream { ... public virtual void AuthenticateAsClient(string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation, string[] applicationProtocols); public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync(string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation, string[] applicationProtocols); public virtual void AuthenticateAsServer(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation, string[] applicationProtocols); public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation, string[] applicationProtocols); public virtual string NegotiatedApplicationProtocol; } ``` (New method overloads of `AuthenticateAsClient`/`AuthenticateAsServer` (+their async versions) are being added having new parameter `string[] applicationProtocols`. New property `string NegotiatedApplicationProtocol` is added as well). Full view of SslStream API containing the proposed changes is in [PR](https://github.com/jubarat/corefx/blob/sslstream_alpn/src/System.Net.Security/ref/System.Net.Security.cs). ## Example usage Client: ``` C# SslStream sslStream = new SslStream(serverStream); string[] applicationProtocols = new[] { ""h2"", ""http/1.1"" }; sslStream.AuthenticateAsClient(certificate.Subject, new X509CertificateCollection(), SslProtocols.Tls12, false, applicationProtocols); string protocol = sslStream.NegotiatedApplicationProtocol; ``` Server: ``` C# SslStream sslStream = new SslStream(serverStream) string[] applicationProtocols = new[] { ""h2"", ""http/1.1"" }; sslStream.AuthenticateAsServer(certificate, false, SslProtocols.Tls12, false, applicationProtocols); string protocol = sslStream.NegotiatedApplicationProtocol; ``` ## Details Client advertises list of protocols in descending order of preference. After the TLS handshake is complete the client queries the TLS stack for negotiated application protocol. Similar way server side application provides its own list of supported protocols (again in descending order of preference). The TLS stack makes the application protocol match internally. After the handshake completes the server application queries the negotiated application protocol. Note: This behavior is supported by SChannel and is compatible with OpenSSL ALPN API. Unlike OpenSSL the SChannel does not expose possibility of querying client's advertised list of protocols therefore this API proposal does not contain server side protocol selecting based on callback. `AuthenticateAsClient`/`AuthenticateAsServer` methods - null value passed to `applicationProtocols` parameter means the caller is not requesting application protocol negotiation. This is also the behavior of existing method overloads. - If both client and server specified their application protocol list and there was no match then `AuthenticateAsServer` throws `AuthenticationException` with inner exception having OS native error code. At this point the TLS handshake is aborted so the client gets `IOException` due to server application closing the transport connection. - An alternative approach how to pass application protocol list instead of `AuthenticateAs…` methods could be as parameter of SslStream constructor. - In following cases `ArgumentException` is thrown: - Empty protocol list. - Any element of protocol list is null. - Any element has more than 255 characters. - The full protocol list serialized size is more than 32767 bytes. `NegotiatedApplicationProtocol` property - If successfully negotiated then it returns the negotiated application protocol string. - If peer did not advertise ALPN TLS extension or `applicationProtocols` was null then this property returns null. - Throws `InvalidOperationException` if calling before `AuthenticateAsClient` or `AuthenticateAsServer` completes. Examples of API behavior are in [functional tests](https://github.com/jubarat/corefx/blob/sslstream_alpn/src/System.Net.Security/tests/FunctionalTests/ApplicationProtocolNegotiationTest.cs) of PR. ## Pull request #4685 " 4722 area-System.Linq Public Surface of System.Linq.Expressions.Expression exposing too much? In the code base, the methods [`DebugView`](https://github.com/dotnet/corefx/blob/master/src/System.Linq.Expressions/src/System/Linq/Expressions/Expression.cs#L222), [`ReturnReadOnly`](https://github.com/dotnet/corefx/blob/master/src/System.Linq.Expressions/src/System/Linq/Expressions/Expression.cs#L245), [`ReturnReadOnly`](https://github.com/dotnet/corefx/blob/master/src/System.Linq.Expressions/src/System/Linq/Expressions/Expression.cs#L263), [`ReturnObject`](https://github.com/dotnet/corefx/blob/master/src/System.Linq.Expressions/src/System/Linq/Expressions/Expression.cs#L276), [`RequiresCanRead`](https://github.com/dotnet/corefx/blob/master/src/System.Linq.Expressions/src/System/Linq/Expressions/Expression.cs#L281), [`RequiresCanRead` (another overload)](https://github.com/dotnet/corefx/blob/master/src/System.Linq.Expressions/src/System/Linq/Expressions/Expression.cs#L286), are all public. They are not documented, nor public in any of the other .Net versions. I can't see any trace of a decision to make them public here, and the blame record suggests they were imported as such. With the possible exception of `DebugView`, they don't seem particularly useful to outside code or if they are they should perhaps be defined elsewhere. Also, `RequiresCanWrite` remains private and should surely be public if `RequiresCanRead` is. This looks like it was introduced by accident in a refactoring of some of these methods into `ExpressionUtils` that happened in between the release of .NET 4.6 and the code being brought into dotnet/corefx (or in a different branch, etc.). If I'm correct in deducing that their access is a mistake, removing the access to them would be a breaking change, but by the same token should perhaps be done as soon as possible before more dependencies on them appear. 4724 area-Serialization [.Net Native] XmlTextAttribute on a primitive type property in struct seems not to be supported "This problem only occur when the c# code was compiled by .Net Native tool. If there's a property in a class. This property is a struct. In this struct, there's a primitive type property, such as string. If there's an XmlTextAttribute on this property, the xml serialization and deserialization will go wrong. Here is the code: It is a piece of code from a UWP App. ``` [XmlRoot(""库"")] public class LibraryPropertyFile { [XmlElement(""库名称"")] public FieldWithDateTime Name { get; set; } } public struct FieldWithDateTime//struct, not class. { //Here: [XmlText] public T Field { get; set; } [XmlAttribute(""修改日期"")] public DateTime DateTime { get; set; } } ``` //Serialize: ``` StorageFile libraryFile = ...; XmlSerializerNamespaces xmlSerializerNamespaces = new XmlSerializerNamespaces(); xmlSerializerNamespaces.Add(string.Empty, string.Empty); XmlWriterSettings xmlWriterSettings = new XmlWriterSettings { Encoding = new UTF8Encoding(false) }; Stream libraryFileStream = await libraryFile.OpenStreamForWriteAsync(); XmlSerializer serializer = new XmlSerializer(typeof(LibraryPropertyFile)); XmlWriter xmlWriter = XmlWriter.Create(libraryFileStream, xmlWriterSettings); serializer.Serialize(xmlWriter, libraryPropertyFile, xmlSerializerNamespaces); xmlWriter.Flush(); xmlWriter.Dispose(); libraryFileStream.Flush(); libraryFileStream.Dispose(); ``` //Deserialize: ``` StorageFile libraryFile = ...; Stream libraryFileStream = await libraryFile.OpenStreamForReadAsync(); XmlSerializer libraryXmlSerializer = new XmlSerializer(typeof(LibraryPropertyFile)); LibraryPropertyFile libraryPropertyFile = libraryXmlSerializer.Deserialize(libraryFileStream) as LibraryPropertyFile; libraryFileStream.Dispose(); ``` Pay attention! In the Debug mode, the code is run on CLR, it works perfectly. But in the release mode, the code is compiled into native code. When it is going to Serialize or Deserialize, it crashs. But I can modify my code: ``` public class FieldWithDateTime//change from struct to class ``` And then, Compile it, it works perfectly. So, if FieldWithDateTime is a class, the code can work both in Debug or Release mode, but if FieldWithDateTime is a struct, the code can only work in Debug mode. My develop platform: Windows 10 1511, Visual Studio 2015. " 4727 area-System.IO FileVersionInfo.GetVersionInfo(string fileName) fails on Unix with ArgumentException Calling FileVersionInfo.GetVersionInfo(string) on Unix (passing valid input) results in the following exception: ``` System.ArgumentException: Argument must be between 0 and 3. Parameter name: fieldCount at System.Version.ToString(Int32 fieldCount) at System.Diagnostics.FileVersionInfo.LoadManagedAssemblyMetadata(MetadataReader metadataReader) at System.Diagnostics.FileVersionInfo.TryLoadManagedAssemblyMetadata() at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName) ``` The error seems to be in [FileVersionInfo.Unix.cs@131](https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.FileVersionInfo/src/System/Diagnostics/FileVersionInfo.Unix.cs#L131) which explicitly calls Version.ToString with an argument '4' despite the exception message saying that the argument should fall in the range [0-3]. 4728 area-System.Net Switch Socket.Select to use poll rather than select in the implementation 4732 area-System.Net Incorporate API review feedback for System.Net.* APIs All networking APIs in .NET Core (System.Net, System.Net.Sockets, etc.) were recently reviewed by the API Review board. The detailed notes are here: https://github.com/dotnet/apireviews/pull/21 Filing this issue to track the following proposed changes based on API review feedback: - [x] In `WebException` in the System.Net.Requests contract: For the constructors, change parameter name `inner` to `innerException` to match that in .NET Framework - Done #4740 - [x] In `WinHttpHandler.ServerCertificateValidationCallback`: Document/add comments for the meaning of each parameter - Documentation bug referred to MSDN doc team. Update - Added this here: https://msdn.microsoft.com/en-US/library/mt345545(VS.105).aspx - [x] In types `NegotiateStream` and `SslStream`: Remove synchronous versions of `AuthenticateAsServer` and `AuthenticateAsClient` methods - Done #4868 - [x] In `System.Net.Utilities` contract: Consider if we want it to be a bag of multiple utilities OR more scoped down to just ICMP-related utilities. If scoped down, consider renaming the contract - Done #5232 renamed the contract to `System.Net.Ping` - [x] Cancellation support: Add CancellationToken overloads to appropriate async methods in all contracts – e.g. `System.Net.Sockets`, `System.Net.Security` - Deferred #5211 - [x] In `enum SocketFlags`: Remove value `MaxIOVectorLength`, but document that slot 16 should not be used since it will cause conflict with .NET Framework - Done #4888 - [x] In `enum SocketOptionName`: Add ReuseUnicastPort support. This is a new option added to .NET Framework 4.6 to improve server scalability and is currently missing from .NET Core. - Done #4888 - [x] In structs `SocketReceiveFromResult` and `SocketReceiveMessageFromResult`: Investigate if the individual fields be properties. - Investigated. Final decision is to leave it as-is with public fields. 4733 area-System.Net System.Net.Sockets.Socket.DoConnect() doesn't work as expected. "Here is an other application which makes the stack trace more clear: ``` C# try { try { socket.Connect(ep); } catch (SocketException e) { => The socket exception is catched here! Console.WriteLine(""Excpetion Message="" + e.Message); Console.WriteLine(""Excpetion Stack="" + e.StackTrace); Console.WriteLine(""Socket Error Code="" + e.SocketErrorCode.ToString()); if (e.SocketErrorCode != SocketError.WouldBlock) { throw; } } var write = new List { socket }; var error = new List { socket }; Socket.Select(null, write, error, perIpTimeout); var errorCode = (int)socket.GetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Error); if (errorCode != 0) { Console.WriteLine(""error code is not zero!""); throw new SocketException((int)socket.GetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Error)); } if (!write.Any()) { Console.WriteLine( $""Timeout after {new TimeSpan(perIpTimeout * 10).TotalSeconds} seconds when connecting to {ips[0]}""); try { socket.Dispose(); } catch { // ignored } // if i == 0 Console.WriteLine(""i==0 exception""); throw new TimeoutException(); // continue; } socket.Blocking = true; return; } catch (TimeoutException) { throw; } catch { try { socket.Dispose(); } catch { // ignored } Console.WriteLine(""Failed to connect to "" + ips[0]); // if (i == 0) Console.WriteLine(""i==0 exception 2""); throw; } ``` Here is my output from the above program: Excpetion Message=Unknown error 10035 Excpetion Stack= at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) at SirenTek.Program.Main(String[] args) Socket Error Code=WouldBlock Timeout after -1E-06 seconds when connecting to 192.168.1.72 i==0 exception System.TimeoutException: The operation has timed out. Socket.DoConnect method creates an exception. _This makes us unable to use npgsql with core50 runtime._ " 4734 area-Serialization Remove dependency from System.Xml.XmlSerializer on System.Runtime.WindowsRuntime 4.0.10 Fix #1761 cc: @ericstj @SGuyGe @shmao 4736 area-Serialization Fix DCS serialization tests compilation failures Fix compilations failures due to recent update of surrogate API in this PR #4735 cc: @stephentoub @SGuyGe 4737 area-System.Security Update libssl minimum required version for Mac OS X "We're currently using a deprecated and unsupported version of OpenSSL on Mac (0.9.8). We need to upgrade our minimum required version to a supported version 1.0.1/1.0.2. This issue is tracking this upgrade; including updating the build server definitions; updating dev instructions; and updating the Mac end-user binary installer (TBD either requiring homebrew again or possibly using another provided libssl installer). http://lists.apple.com/archives/macnetworkprog/2015/Jun/msg00025.html > Subject: Re: OpenSSL -> Secure Transport for libevent2 > From: ""Quinn \""The Eskimo!\"""" email@hidden > Date: Mon, 15 Jun 2015 12:28:41 -0700 > On 15 Jun 2015, at 11:11, John Pannell email@hidden wrote: > > Apple stopped shipping OpenSSL with OS X some time ago, citing lack of a stable API from version to version. > > It's a bit more subtle than that: > > o Apple deprecated its OpenSSL shared libraries a while back (with OS X 10.7). That's because OpenSSL doesn't offer release-to-release binary compatibility, so we can't update the shared libraries to the latest OpenSSL without breaking all the existing clients. > > o At the same time we marked the OpenSSL headers in the OS X SDK as deprecated so you'd get deprecation warnings if you build with a deployment target of 10.7 or later. > > o With the latest OS X SDK we've removed the headers entirely, making it much harder to use the long-since-deprecated shared libraries. > > o We recommend that developers who need OpenSSL build their own copy of it and include that copy in their app. Alternatively you can use native OS X APIs, like Secure Transport. > > Share and Enjoy > > Quinn ""The Eskimo!"" http://www.apple.com/developer/ > Apple Developer Relations, Developer Technical Support, Core OS/Hardware Related issue https://github.com/dotnet/corefx/issues/3924 " 4738 area-System.IO FileSystemWatcher.Dispose hangs on OSX It seems that the FileSystemWatcher doesn't trigger on OSX. This makes [dnx-watch](https://github.com/aspnet/dnx-watch) unusable on CoreCLR. Side note: it works on Mono. I will provide a simple repro soon but I wanted to open the bug so we can start tracking this because `dnx-watch` will need to become `dotnet-watch` for RC2 and we want it to work on OSX. For now you can repro by running `dnx-watch` cc @glennc 4739 area-System.Net Building System.Net.Security/tests/UnitTests clean causing project.lock.json to update Recent changes in GitHub are now causing the System.Net.Security/tests/UnitTests to update the project.lock.json file everything I build the enlistment clean. It causes my git working directory to show a the file as modified. 4740 area-System.Net Fix WebException constructor parameters to match Desktop naming As per the System.Net.\* API review dotnet/apireviews#21 fixing the parameter name used for the inner exception in the WebException constructor overloads to match the name used in .NET Framework (Desktop). Part of #4732 4750 area-System.Linq Improve Enumerable.Reverse() performance for IList and LinkedList I would like to suggest and discuss a possible performance improvement of the Enumerable.Reverse() extension function in the System.Linq namespace. Currently a _Buffer_ struct is created that allocates a new array of elements in most cases, as can be seen here: ``` csharp internal struct Buffer { internal TElement[] items; internal int count; internal Buffer(IEnumerable source) { IArrayProvider iterator = source as IArrayProvider; if (iterator != null) { TElement[] array = iterator.ToArray(); items = array; count = array.Length; } else { items = EnumerableHelpers.ToArray(source, out count); } } internal TElement[] ToArray() { //... } } ``` For the ReverseIterator the _items_ array of the _Buffer_ struct is then iterated through from end to start. I would think that the array allocation is not always needed, so I suggest to handle the reverse iteration of _IList_ and _LinkedList_ differently. An _IList_ object could be directly used for reverse iteration like the buffer struct but without creating and allocating the in this case unneccesary buffer first. For _LinkedList_ sources the reverse iteration would be easily possible without a _Buffer_ too. So what do you think about this? Am I missing a good reason here why this has not been done already? I could imagine the argument that Enumerable cannot handle every special collection differently, but at least _IList_ is often treated special. Oh and btw: I think this ``` csharp TElement[] array = iterator.ToArray(); items = array; count = array.Length; ``` should be ``` csharp items = iterator.ToArray(); count = items.Length; ``` as I don't see a reason for introducing the variable _array_. 4754 area-System.Net HttpClient doesn't respect HttpRequestMessage.Version e.g. if it's set to 1.0, the request still gets sent with a version 1.1 4756 area-System.Net Add HTTP/2 support to HttpClient on Unix The latest versions of libcurl have HTTP/2 support; this commit enables that to be used from HttpClient via setting the request Version. Setting the Version will now pass along that version preference to libcurl; if it's set to 2.0, libcurl will use HTTP/2 if supported, otherwise it'll fall back to its default (1.1). As part of this I also fixed CurlHandler to pass along v1.0 and v1.1 so libcurl can respect the developer's explicit wishes. (Note that the HTTP/2 light-up is only available if libcurl supports it. libcurl relies on nghttp2, which needs to be installed, and a version of libcurl needs to be used that's built against it. To test, I built these locally from source.) cc: @vijaykota, @kapilash, @davidsh, @cipop, @eerhardt 4757 area-System.Net Updating and locking project.lock.json for Security UnitTests. Updating and locking project.lock.json for Security UnitTests. Fix #4739 4760 area-System.Net Method not found: 'System.Threading.Tasks.Task`1 System.Net.NetworkInformation.Ping.SendPingAsync(System.Net.IPAddress, Int32)'. I think I found a bug in System.Net.NetworkInformation where PingReply is missing. You can find my source code [here](https://github.com/00101010b/PingTest1/blob/master/Controllers/HomeController.cs) on GitHub. I get the following errors during build: ``` An unhandled exception has occurred: Method not found: 'System.Threading.Tasks.Task`1 System.Net.NetworkInformation.Ping.SendPingAsync(System.Net.IPAddress, Int32)'. System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1 System.Net.NetworkInformation.Ping.SendPingAsync(System.Net.IPAddress, Int32)'. ``` 4767 area-System.Net System.Net.Http nuget package need depend on System.Security.Cryptography.X509Certificates dotnet publish System.Net.Http can not work, it need System.Security.Cryptography.X509Certificates. 4769 area-System.Reflection Change SignatureDecoder design in preparation for API review - Segregate type provider interfaces so that custom attribute decoding does not require unnecessary provider implementation. - Change SignatureDecoder from static class to struct, which captures the provider, metadata reader, and options. - Move the overloads that took (MetadataReader, Handle) to instead hang off of the corresponding entity struct. This follows the precedent of blob-decoding done for Portable PDBs, makes the API more discoverable, and eliminates questions around which API to call for which blobs, which was exacerbated by the weak typing of BlobHandle. SignatureDecoder.DecodeXxx now all take ref BlobReader alone. Convenience overloads to allow parsing byte sequences without forcing the caller to pin and use pointers should be added, but that is deferred until `Span` arrives. - Remove ISignatureTypeProvider.Reader and instead pass along the metadata reader to the provider whenever there is a handle. The reader is allowed to be null (to decode byte sequence that didn't come from a metadata reader, which our tests do). Many type providers will already capture the metadata reader so that they have enough context in other situations than resolving handles (e.g. interpreting generic parameters beyond their index.), but this duplication is harmless and it simplifies the API. - Change CustomModifier handling to happen one-at-a-time and give the provider the raw handle rather than a decoded TType so that modifiers are cheaper to skip, and so that we do not traverse in to typespec signatures on provider's behalf. - Make class/value-type differentiation optional and handle WinRT projections correctly when enabled. - Add considerably more doc comments. - Add significant test coverage. All blocks in the SignatureDecoder with the exception of WinRT class <-> value type projection (I'll write some tests for that shortly) are now covered. - Use ImmutableArray.Builder.MoveToImmutable throughout to eliminate unnecessary copying. - Move everything in the Decoding folder to the Decoding namespace. (Some types being in the root was unintentional.) - Add specific error messages to all BadImageFormatException throws. NOTE: - A change to make it possible for the context-carrying provider to be passed around as an unboxed struct (reducing allocation) was attempted and reverted. The API is complex enough and the extra type parameter that could not be inferred was quite cumbersome. The Decoding namespace is given more freedom than the rest of S.R.M to allocate. In typical scenarios, symbols are parsed once and cached. - The type name parser and custom attribute decoder still need more refactoring and testing and will not be submitted to master just yet. FYI: @tmat, @michaelcfanning -- I'm going to turn around and submit this (minus type name and custom attribute decoding) as a PR to master (along with API review materials), so I'll merge to the dev branch once CI is green. 4771 area-System.Net System.Net.Sockets Build Failure (VS2015/Win10) Steps to reproduce: 1. git clone https://github.com/dotnet/corefx (OK) 2. C:\git\corefx>build.cmd /t:rebuild (OK) 3. Install .NET Core via the official MSI installer (OK~ dotnet/cli #362 ) 4. C:\git\corefx\src\System.Net.Sockets\ref>dotnet restore (OK) 5. C:\git\corefx\src\System.Net.Sockets\src>dotnet restore (OK) 6. C:\git\corefx\src\System.Net.Sockets\tests\FunctionalTests>dotnet restore (OK) 7. C:\git\corefx\src\System.Net.Sockets\tests\PerformanceTests>dotnet restore (OK) 8. Opened C:\git\corefx\src\System.Net.Sockets\System.Net.Sockets.sln via in V2015 Community Ed. 9. Rebuild Solution Errors: Severity Code Description Project File Line Error xunit.abstractions 2.0.0 is not compatible with DNXCore,Version=v5.0. 0 Error Some packages are not compatible with DNXCore,Version=v5.0. 0 Error xunit.abstractions 2.0.0 is not compatible with DNXCore,Version=v5.0. 0 Error Some packages are not compatible with DNXCore,Version=v5.0. 0 Warnings: Severity Code Description Project File Line Warning The referenced component 'System.Net.NameResolution' could not be found. System.Net.Sockets.Async.Performance.Tests Warning The referenced component 'System.Net.NameResolution' could not be found. System.Net.Sockets.Tests Warning Failed to resolve all project references for 'tests\PerformanceTests\System.Net.Sockets.Async.Performance.Tests'. The package restore result for 'tests\PerformanceTests\System.Net.Sockets.Async.Performance.Tests' may be incomplete. 0 Warning Detected package downgrade: System.Threading from 4.0.10 to 4.0.0 System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> System.Threading.Tasks.Parallel (≥ 4.0.0) -> System.Threading (≥ 4.0.10) System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> System.Threading (≥ 4.0.0) 0 Warning Detected package downgrade: System.Threading from 4.0.10 to 4.0.0 System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> xunit.netcore.extensions (≥ 1.0.0-prerelease-) -> System.Threading (≥ 4.0.10) System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> System.Threading (≥ 4.0.0) 0 Warning Detected package downgrade: System.Collections from 4.0.10 to 4.0.0 System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> System.Net.Primitives (≥ 4.0.10) -> System.Private.Networking (≥ 4.0.0) -> System.Collections (≥ 4.0.10) System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> System.Collections (≥ 4.0.0) 0 Warning Detected package downgrade: System.Threading from 4.0.10 to 4.0.0 System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> System.Net.Primitives (≥ 4.0.10) -> System.Private.Networking (≥ 4.0.0) -> System.Threading (≥ 4.0.10) System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> System.Threading (≥ 4.0.0) 0 Warning Detected package downgrade: System.Collections from 4.0.10 to 4.0.0 System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> System.Threading.Tasks.Parallel (≥ 4.0.0) -> System.Collections.Concurrent (≥ 4.0.10) -> System.Collections (≥ 4.0.10) System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> System.Collections (≥ 4.0.0) 0 Warning Detected package downgrade: System.Collections from 4.0.10 to 4.0.0 System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> xunit.netcore.extensions (≥ 1.0.0-prerelease-) -> System.Linq (≥ 4.0.0) -> System.Collections (≥ 4.0.10) System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> System.Collections (≥ 4.0.0) 0 Warning Detected package downgrade: System.Collections from 4.0.10 to 4.0.0 System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> src\System.Net.Sockets -> System.IO.FileSystem (≥ 4.0.0) -> System.Collections (≥ 4.0.10) System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> System.Collections (≥ 4.0.0) 0 Warning Detected package downgrade: System.Threading from 4.0.10 to 4.0.0 System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> src\System.Net.Sockets -> System.IO.FileSystem (≥ 4.0.0) -> System.Threading (≥ 4.0.10) System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> System.Threading (≥ 4.0.0) 0 Warning Detected package downgrade: System.Threading from 4.0.10 to 4.0.0 System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> src\System.Net.Sockets -> System.Security.Principal.Windows (≥ 4.0.0-beta-) -> System.Threading (≥ 4.0.10) System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> System.Threading (≥ 4.0.0) 0 Warning Detected package downgrade: System.Collections from 4.0.10 to 4.0.0 System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> xunit (≥ 2.1.0) -> xunit.core (= 2.1.0) -> System.Linq (≥ 4.0.0) -> System.Collections (≥ 4.0.10) System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> System.Collections (≥ 4.0.0) 0 Warning Detected package downgrade: System.Collections from 4.0.10 to 4.0.0 System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> xunit (≥ 2.1.0) -> xunit.assert (= 2.1.0) -> System.Linq (≥ 4.0.0) -> System.Collections (≥ 4.0.10) System.Net.Sockets.Async.Performance.Tests (≥ 1.0.0) -> System.Collections (≥ 4.0.0) 0 Warning Failed to resolve all project references for 'tests\FunctionalTests\System.Net.Sockets.Tests'. The package restore result for 'tests\FunctionalTests\System.Net.Sockets.Tests' may be incomplete. 0 Warning Detected package downgrade: System.Threading from 4.0.10 to 4.0.0 System.Net.Sockets.Tests (≥ 1.0.0) -> System.Threading.Tasks.Parallel (≥ 4.0.0) -> System.Threading (≥ 4.0.10) System.Net.Sockets.Tests (≥ 1.0.0) -> System.Threading (≥ 4.0.0) 0 Warning Detected package downgrade: System.Threading from 4.0.10 to 4.0.0 System.Net.Sockets.Tests (≥ 1.0.0) -> xunit.netcore.extensions (≥ 1.0.0-prerelease-) -> System.Threading (≥ 4.0.10) System.Net.Sockets.Tests (≥ 1.0.0) -> System.Threading (≥ 4.0.0) 0 Warning Detected package downgrade: System.Collections from 4.0.10 to 4.0.0 System.Net.Sockets.Tests (≥ 1.0.0) -> System.Net.Primitives (≥ 4.0.10) -> System.Private.Networking (≥ 4.0.0) -> System.Collections (≥ 4.0.10) System.Net.Sockets.Tests (≥ 1.0.0) -> System.Collections (≥ 4.0.0) 0 Warning Detected package downgrade: System.Threading from 4.0.10 to 4.0.0 System.Net.Sockets.Tests (≥ 1.0.0) -> System.Net.Primitives (≥ 4.0.10) -> System.Private.Networking (≥ 4.0.0) -> System.Threading (≥ 4.0.10) System.Net.Sockets.Tests (≥ 1.0.0) -> System.Threading (≥ 4.0.0) 0 Warning Detected package downgrade: System.Collections from 4.0.10 to 4.0.0 System.Net.Sockets.Tests (≥ 1.0.0) -> System.Threading.Tasks.Parallel (≥ 4.0.0) -> System.Collections.Concurrent (≥ 4.0.10) -> System.Collections (≥ 4.0.10) System.Net.Sockets.Tests (≥ 1.0.0) -> System.Collections (≥ 4.0.0) 0 Warning Detected package downgrade: System.Collections from 4.0.10 to 4.0.0 System.Net.Sockets.Tests (≥ 1.0.0) -> xunit.netcore.extensions (≥ 1.0.0-prerelease-) -> System.Linq (≥ 4.0.0) -> System.Collections (≥ 4.0.10) System.Net.Sockets.Tests (≥ 1.0.0) -> System.Collections (≥ 4.0.0) 0 Warning Detected package downgrade: System.Collections from 4.0.10 to 4.0.0 System.Net.Sockets.Tests (≥ 1.0.0) -> src\System.Net.Sockets -> System.IO.FileSystem (≥ 4.0.0) -> System.Collections (≥ 4.0.10) System.Net.Sockets.Tests (≥ 1.0.0) -> System.Collections (≥ 4.0.0) 0 Warning Detected package downgrade: System.Threading from 4.0.10 to 4.0.0 System.Net.Sockets.Tests (≥ 1.0.0) -> src\System.Net.Sockets -> System.IO.FileSystem (≥ 4.0.0) -> System.Threading (≥ 4.0.10) System.Net.Sockets.Tests (≥ 1.0.0) -> System.Threading (≥ 4.0.0) 0 Warning Detected package downgrade: System.Threading from 4.0.10 to 4.0.0 System.Net.Sockets.Tests (≥ 1.0.0) -> src\System.Net.Sockets -> System.Security.Principal.Windows (≥ 4.0.0-beta-) -> System.Threading (≥ 4.0.10) System.Net.Sockets.Tests (≥ 1.0.0) -> System.Threading (≥ 4.0.0) 0 Warning Detected package downgrade: System.Collections from 4.0.10 to 4.0.0 System.Net.Sockets.Tests (≥ 1.0.0) -> xunit (≥ 2.1.0) -> xunit.core (= 2.1.0) -> System.Linq (≥ 4.0.0) -> System.Collections (≥ 4.0.10) System.Net.Sockets.Tests (≥ 1.0.0) -> System.Collections (≥ 4.0.0) 0 Warning Detected package downgrade: System.Collections from 4.0.10 to 4.0.0 System.Net.Sockets.Tests (≥ 1.0.0) -> xunit (≥ 2.1.0) -> xunit.assert (= 2.1.0) -> System.Linq (≥ 4.0.0) -> System.Collections (≥ 4.0.10) System.Net.Sockets.Tests (≥ 1.0.0) -> System.Collections (≥ 4.0.0) 0 Warning Detected package downgrade: System.Collections from 4.0.10 to 4.0.0 System.Net.Sockets (≥ 1.0.0) -> System.IO.FileSystem (≥ 4.0.0) -> System.Collections (≥ 4.0.10) System.Net.Sockets (≥ 1.0.0) -> System.Collections (≥ 4.0.0) 0 Warning Detected package downgrade: System.Threading from 4.0.10 to 4.0.0 System.Net.Sockets (≥ 1.0.0) -> System.IO.FileSystem (≥ 4.0.0) -> System.Threading (≥ 4.0.10) System.Net.Sockets (≥ 1.0.0) -> System.Threading (≥ 4.0.0) 0 Warning Detected package downgrade: System.Threading from 4.0.10 to 4.0.0 System.Net.Sockets (≥ 1.0.0) -> System.Security.Principal.Windows (≥ 4.0.0-beta-) -> System.Threading (≥ 4.0.10) System.Net.Sockets (≥ 1.0.0) -> System.Threading (≥ 4.0.0) 0 Warning Detected package downgrade: System.Collections from 4.0.10 to 4.0.0 System.Net.Sockets (≥ 1.0.0) -> System.Net.Primitives (≥ 4.0.10) -> System.Private.Networking (≥ 4.0.0) -> System.Collections (≥ 4.0.10) System.Net.Sockets (≥ 1.0.0) -> System.Collections (≥ 4.0.0) 0 Warning Detected package downgrade: System.Threading from 4.0.10 to 4.0.0 System.Net.Sockets (≥ 1.0.0) -> System.Net.Primitives (≥ 4.0.10) -> System.Private.Networking (≥ 4.0.0) -> System.Threading (≥ 4.0.10) System.Net.Sockets (≥ 1.0.0) -> System.Threading (≥ 4.0.0) 0 Warning Detected package downgrade: System.Globalization from 4.0.10 to 4.0.0 System.Net.Sockets (≥ 1.0.0) -> System.Net.Primitives (≥ 4.0.10) -> System.Private.Networking (≥ 4.0.0) -> System.Globalization (≥ 4.0.10) System.Net.Sockets (≥ 1.0.0) -> System.Globalization (≥ 4.0.0) 0 4777 area-System.Net System.Net.Socket EndPoint-extensibility broken in corefx The current corefx codebase appears to be closed off to any EndPoint customization. The Sockets codebase expects every EndPoint to be either a DnsEndPoint or an IPEndPoint, and anything that’s not built in to System.Net.Sockets will result in failures. This is a silly little quick example which obviously won’t do anything meaningful: ``` C# private class MyEndPoint : EndPoint { } [Fact] public void Socket_CustomEndPoint() { Socket s = new Socket(SocketType.Raw, ProtocolType.Raw); s.Connect(new MyEndPoint()); } ``` but it fails on corefx due to a cast exception that highlights the problem: ``` System.InvalidCastException : Unable to cast object of type 'MyEndPoint' to type 'System.Net.IPEndPoint'. Stack Trace: c:\Users\stoub\Source\repos\corefx\src\Common\src\System\Net\Internals\IPEndPointExtensions.cs(14,0): at System.Net.Sockets.IPEndPointExtensions.Serialize(EndPoint endpoint) c:\Users\stoub\Source\repos\corefx\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs(4894,0): at System.Net.Sockets.Socket.CheckCacheRemote(EndPoint& remoteEP, Boolean isOverwrite) c:\Users\stoub\Source\repos\corefx\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs(848,0): at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) ``` In contrast, on desktop it also fails but where and with the exception I’d expect: ``` Unhandled Exception: System.NotImplementedException: This method is not implemented by this class. at System.Net.EndPoint.Serialize() at System.Net.Sockets.Socket.CallSerializeCheckDnsEndPoint(EndPoint remoteEP) at System.Net.Sockets.Socket.CheckCacheRemote(EndPoint& remoteEP, Boolean isOverwrite) at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) ``` cc: @cipop, @davidsh, @SidharthNabar 4779 area-Infrastructure "Add ""Windows Server 2016 TP4 (Nano Server Installation)"" CI / Rolling Build" Now that Nano Server TP4 is available in the Azure Gallery we should investigate adding it to our non-blocking outer-loop build and test system: http://blogs.technet.com/b/nanoserver/archive/2015/11/25/nano-server-iaas-image-in-the-azure-gallery.aspx https://en.wikipedia.org/wiki/Windows_Server_2016#Nano_Server 4782 area-System.Data Add basic test for System.Data.SqlClient Connection.Open to debug package issues 4784 area-System.Reflection System.Reflection.Metadata depends on Windows API's @nguerrera , I noticed that System.Reflection.Metadata has a dependency on Windows API's (api-ms-win-core-file-l1-2-0.dll). I understand that this is light-up code, but is there a reason that we have this requirement instead of using a different method that doesn't include this dependency? cc @ericstj 4786 area-System.IO Mechanism for reading directly from file to unmanaged memory System.Reflection.Metadata has an optimization where it reads files small enough to not warrant memory mapping directly into the unmanaged heap (without an intermediate copy on the managed heap). This optimization is done by lighting up on Windows to the native `ReadFile` API. For this to work cross-plat there should be a way to pass unmanaged memory to Stream and have FileStream override it to not involve intermediate copies to managed memory. This could possibly be accomplished via `Span` support in `Stream` overridden by `FileStream`. cc @KrzysztofCwalina 4792 area-System.IO Add Path.TryGetExtension Today Path.GetExtension throws if the value passed in has invalid chars. See https://github.com/aspnet/StaticFiles/commit/657a5ab26bea3f0b9293a216f28f7b37e004d707#diff-e0272e80448d0ed39c75613bfe35ee62R438. It would be great if there was a way to avoid that exception without reimplementing it. 4793 area-Serialization Make ISerializatonSurrogateProvider support OOB to desktop .NET Framework By making ISerializatonSurrogateProvider support OOB to desktop .NET Framework, the end user can have the same code that works on both .NET Core and full .NET Framework. 4794 area-System.Diagnostics Process.Start not working for HTTP links On windows (with .NET Core) calling: System.Diagnostics.Process.Start(SomeWebLinkHere); Results in: An exception of type 'System.ComponentModel.Win32Exception' occurred in System.Diagnostics.Process.dll but was not handled in user code. Additional information: The system cannot find the file specified. Works fine on the .NET Framework, is this intended? 4797 area-System.Xml How to use XmlWriter.Close(); in coreCLR 4798 area-Meta Evaluate the need to shim native calls on OSX We have a few OSX-specific native calls that don't use shims. From my understanding this was deemed acceptable because OSX already has a stable Application Binary Interface (ABI). However, looking through some of these calls, I'm not completely sure this is true. For example https://github.com/dotnet/corefx/blob/master/src/Common/src/Interop/OSX/Interop.CoreFoundation.cs#L72-L77 has : ``` C# private static extern SafeCreateHandle CFArrayCreate( IntPtr allocator, [MarshalAs(UnmanagedType.LPArray)] IntPtr[] values, ulong numValues, IntPtr callbacks); ``` Which on my Mac appears to be defined as: ``` C++ CFArrayRef CFArrayCreate( CFAllocatorRef allocator, const void **values, CFIndex numValues, const CFArrayCallbacks *callbacks); ``` And where `CFIndex` is defined as: ``` C++ #if __LLP64__ typedef signed long long CFIndex; #else typedef signed long CFIndex; #endif ``` Are we guaranteed that CFIndex will always be an 8-byte integer? What if we were on a 32-bit OSX? We should analyze all our non-shimmed native calls on OSX and be 100% sure we will always have ABI stability, no matter the OSX system we are running on. 4801 area-System.Net GetAsync_ResponseHeadersRead_ReadFromEachIterativelyDoesntDeadlock failed on CentOS in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx_linux_centos71_debug_tst/166/console ``` 07:38:26 System.Net.Http.Functional.Tests.HttpClientHandlerTest.GetAsync_ResponseHeadersRead_ReadFromEachIterativelyDoesntDeadlock [FAIL] 07:38:26 System.Threading.Tasks.TaskCanceledException : A task was canceled. 07:38:26 Stack Trace: 07:38:27 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 07:38:27 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 07:38:27 at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() 07:38:27 at System.Net.Http.Functional.Tests.HttpClientHandlerTest.d__94.MoveNext() 07:38:27 --- End of stack trace from previous location where exception was thrown --- 07:38:27 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 07:38:27 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 07:38:27 --- End of stack trace from previous location where exception was thrown --- 07:38:27 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 07:38:27 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 07:38:27 --- End of stack trace from previous location where exception was thrown --- 07:38:27 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 07:38:27 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` 4802 area-System.Data Windows 8 support for System.Data.Common According to [this](https://github.com/aspnet/Microsoft.Data.Sqlite/issues/185#issuecomment-161726607) issue, `System.Data.Common` needs to support Windows 8 before `Microsoft.Data.Sqlite` can. Is it possible to add Windows 8 support to that package? cc @bricelam 4803 area-Infrastructure Enable Clang sanitizers for debug builds As part of #3501 enable the Clang sanitizers for corefx native code. It has already been enabled for coreclr native code. 4804 area-Meta Fix CLR startup issues provided by Clang sanitizer As part of #3501, attempt fix the clr startup issues so that test-specific sanitizer output can be determined and evaluated. Currently, when the sanitizers are enabled, several messages from the undefined behavior sanitizer are displayed when any program is run: /src/inc/clrhost.h:137:30: runtime error: call to function CExecutionEngine::GetTlsData() through pointer to incorrect function type 'void ()()' /src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp:336:22: runtime error: call to function coreclr_initialize through pointer to incorrect function type 'int ()(const char *, const char *, int, const char *, const char *, void *, unsigned int *)' /src/dlls/mscoree/unixinterface.cpp:187: note: coreclr_initialize defined here /src/inc/clrhost.h:137:30: runtime error: call to function ClrFlsGetBlockGeneric() through pointer to incorrect function type 'void *()()' /src/utilcode/clrhost_nodependencies.cpp:768: note: ClrFlsGetBlockGeneric() defined here /src/inc/clrhost.h:184:30: runtime error: call to function ClrFlsGetBlockGeneric() through pointer to incorrect function type 'void *()()' /src/vm/object.cpp:2633:5: runtime error: member call on null pointer of type 'Object' /src/vm/object.cpp:2712:5: runtime error: member call on null pointer of type 'Object' /src/gc/handletablecore.cpp:1987:42: runtime error: shift exponent 64 is too large for 32-bit type 'unsigned int' /src/debug/ee/debugger.cpp:2351:24: runtime error: reference binding to null pointer of type 'const InteropSafe' /src/debug/ee/controller.cpp:894:26: runtime error: reference binding to null pointer of type 'const InteropSafe' /src/inc/random.h:108:30: runtime error: signed integer overflow: 1855390761 - -1417746578 cannot be represented in type 'int' /src/gc/gc.cpp:9922:14: runtime error: member access within null pointer of type 'WKS::gc_heap' /src/inc/sstring.inl:2090:20: runtime error: left shift of negative value -1 /src/pal/src/map/map.cpp:1588:35: runtime error: member access within null pointer of type 'MAPPED_VIEW_LIST' (aka 'CorUnix::_MVL') There is also an address sanitizer error (these errors stop processing so it is blocking) ==51212==ERROR: AddressSanitizer: stack-buffer-underflow on address 0x7ffd252450df at pc 0x7fe3711c2a68 bp 0x7ffd25244f70 sp 0x7ffd25244f68 READ of size 1 at 0x7ffd252450df thread T0 #0 0x7fe3711c2a67 in CMiniMdBase::UsesAllocatedMemory(CMiniColDef*) /src/md/runtime/metamodel.cpp:1240:5 4805 area-System.Runtime Add/Expose String.EndsWith(char) "Moved bug from https://github.com/dotnet/coreclr/issues/1463 to proper repo > ## davidfowl commented on Aug 31 > > So we don't have to rewrite it over and over :smile:. Seems like its already there just made internal for > some reason: > > https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/String.cs#L2210 > > People end up writing code like this: > > https://github.com/aspnet/dnx/blob/dev/ext/compiler/preprocess/Internalization.cs#L100 > > and this > > https://github.com/aspnet/dnx/blob/dev/src/Microsoft.Dnx.Runtime/NuGet/Utility/PathUtility.cs#L45 > ## bbowyersmyth commented on Sep 2 > > I had the same thought a while back and discovered it would be a breaking change for an edge case in VB. > > Against the current framework the following is valid VB: > Dim find As Char = ""a""c > Dim result = ""abc"".StartsWith(find) > > The compiler wraps find with a call to a string conversion and all is good. If EndsWith(char) was > made public and the code recompiled it would switch from using the CurrentCulture based EndsWith(string) to the Ordinal based EndsWith(char) . > > Whether any of the offending characters or the above scenario is deemed important I would love to hear. Especially a StartsWith(char) with direct access to String.m_firstChar > ## AlexGhiondea commented on Sep 8 > > It seems like the VB compiler is trying to help by picking an overload that will work. > > @VSadov -- do you know what the VB compile would do if we were to introduce the bool EndsWith(char value) overload on string? > > @davidfowl can you create an issue in the CoreFx repo (following the API review process)? " 4807 area-System.Security System.Security.Principal.Windows throws exceptions of type Exception Several code paths in System.Security.Principal.Windows throw a System.Exception, which is generally not a good practice. These are all code paths which threw a System.SystemException in desktop, which does not exist in .NET Core. They should probably be updated to Win32Exception since they all relate to Win32 failures. At the very least, they should be changed to a more specific exception type than 'Exception'. The APIs that throw a plain Exception are: - SecurityIdentifier.ctor(string) - SecurityIdentifier.ctor(WellKnownSidType, SecurityIdentifier) - SecurityIdentifier.GetAccountDomainSid - SecurityIdentifier.TranslateToNTAccounts - Win32.LsaOpenPolicy 4809 area-System.Reflection Add SignatureDecoder to System.Reflection.Metadata See #262 for API review and design information. For those who followed the evolution in the dev branch, #4769 shows just the last round of design changes. cc @tmat 4812 area-System.Reflection Bump dev/metadata version to 1.3 Master will move to 1.2 and acquire SignatureDecoder and MetadataWriter dev/metadata, still has CustomAttributeDecoder and TypeNameParser which need further refactoring and testing, so bump dev version to 1.3. 4813 area-System.Security Add DSA to CoreFX When added there should be adequate support for implementation hiding, and it should support FIPS 186-3's addition of SHA-2 algorithms. 4816 area-System.Net Fix pipelining in System.Net.Http on CentOS My previous change to add HTTP/2 multiplexing broke some System.Net.Http functionality on CentOS, or more specifically when using an old version of libcurl that's in our CentOS 7.1 image. That version of libcurl is from before HTTP/2 multiplexing was introduced. When multiplexing was added to libcurl, one of the existing libcurl functions (curl_multi_setopt) was changed such that if you were to pass in the HTTP/2 multiplexing option (which didn't exist at the time), due to the way the method was implemented, you'd end up opting in to HTTP 1.1 pipelining rather than having the option just be ignored. This is not the desired behavior and ends up breaking behaviors where we issue multiple HTTP 1.1 calls on the same multi handle concurrently. This fix exposes from the native shim whether we're using a version of libcurl that supports HTTP/2 and that knows about the multiplexing option, and only configures the multi handle for multiplexing in that case. Fixes #4801 cc: @kapilash, @ellismg, @eerhardt 4817 area-System.Net SendToRecvFrom_Single_Datagram_UDP_IPv6 failed in CI on OS X http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_release_tst_prtest/3/console ``` 16:32:02 System.Net.Sockets.Tests.SendReceive.SendToRecvFrom_Single_Datagram_UDP_IPv6 [FAIL] 16:32:02 Assert.True() Failure 16:32:02 Expected: True 16:32:02 Actual: False 16:32:02 Stack Trace: 16:32:02 at System.Net.Sockets.Tests.SendReceive.SendToRecvFrom_Datagram_UDP(IPAddress leftAddress, IPAddress rightAddress) ``` 4820 area-System.Security VerifyKnownTransform_CBC128_NoPadding failed on OS X in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_release_tst_prtest/11/console ``` 20:30:37 System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_CBC128_NoPadding [FAIL] 20:30:37 Assert.Equal() Failure 20:30:37 Expected: Byte[] [216, 245, 50, 83, 130, ...] 20:30:37 Actual: Byte[] [0, 0, 0, 0, 0, ...] 20:30:37 Stack Trace: 20:30:38 at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.TestAesTransformDirectKey(CipherMode cipherMode, PaddingMode paddingMode, Byte[] key, Byte[] iv, Byte[] plainBytes, Byte[] cipherBytes) ``` 4821 area-System.Net Disabling intermittently failing tests (timeout) from System.Net.Security Disabling two of the tests to investigate the intermittent authentication timeouts. @stephentoub @bartonjs @davidsh PTAL 4822 area-System.Net SslStream: Authentication failed because the remote party has closed the transport stream @SidharthNabar Hey ... ran into an issue following the updates to `System.Net.Sockets`. Under `4.0.10-beta-*`, I was using this to hit up a GoDaddy (yuck!) mail server ... ``` using (var client = new TcpClient(server, port)) { using (var stream = new SslStream(client.GetStream(), false)) { stream.AuthenticateAsClient(server); ... USE THE STREAM ... ``` ... after the [revision](https://github.com/dotnet/corefx/issues/3913) to `System.Net.Sockets` using `4.1.0-beta-*`, I converted that over to ... ``` using (var client = new TcpClient()) { await client.ConnectAsync(server, port); using (var stream = new SslStream(client.GetStream(), true)) { stream.AuthenticateAsClient(server); ... USE THE STREAM ... ``` ... it runs locally (note that I had to change the `leaveInnerStreamOpen` to `true` to even get it to run on IIS Express), but it throws on the server ... ``` System.IO.IOException: Authentication failed because the remote party has closed the transport stream. at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost) at MyApp.ContactController.d__5.MoveNext() ``` If I immediately re-submit the form, it throws slightly differently ... ``` System.IO.IOException: Authentication failed because the remote party has closed the transport stream. at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost) at MyApp.ContactController.d__5.MoveNext() ``` Am I coding that change correctly? 4823 area-System.Security Seg fault in X509Certificates.Tests on Ubuntu in CI Unfortunately not much to go on in the log: http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/ubuntu_release_tst_prtest/14/console ``` 23:38:13 Discovering: System.Security.Cryptography.X509Certificates.Tests 23:38:13 Discovering: System.Globalization.Tests 23:38:13 xUnit.net console test runner (64-bit .NET Core) 23:38:13 Copyright (C) 2014 Outercurve Foundation. 23:38:13 23:38:13 xUnit.net console test runner (64-bit .NET Core) 23:38:13 Copyright (C) 2014 Outercurve Foundation. 23:38:13 23:38:13 xUnit.net console test runner (64-bit .NET Core) 23:38:13 Copyright (C) 2014 Outercurve Foundation. 23:38:13 23:38:14 Discovering: System.Security.Cryptography.OpenSsl.Tests 23:38:14 Discovering: System.Resources.ResourceManager.Tests 23:38:14 Discovered: System.Security.Cryptography.X509Certificates.Tests 23:38:14 Discovering: System.Diagnostics.TraceSource.Tests 23:38:14 Starting: System.Security.Cryptography.X509Certificates.Tests 23:38:14 Discovered: System.Resources.ResourceManager.Tests 23:38:15 Discovered: System.Diagnostics.TraceSource.Tests 23:38:15 Discovered: System.Security.Cryptography.OpenSsl.Tests 23:38:15 Starting: System.Resources.ResourceManager.Tests 23:38:15 Discovered: System.Globalization.Tests 23:38:15 Starting: System.Diagnostics.TraceSource.Tests 23:38:15 Starting: System.Security.Cryptography.OpenSsl.Tests 23:38:15 Starting: System.Globalization.Tests 23:38:16 Finished: System.Resources.ResourceManager.Tests 23:38:16 23:38:16 === TEST EXECUTION SUMMARY === 23:38:16 terminate called after throwing an instance of 'PAL_SEHException' 23:38:16 System.Resources.ResourceManager.Tests Total: 22, Errors: 0, Failed: 0, Skipped: 0, Time: 1.036s 23:38:16 ./run-test.sh: line 130: 21770 Aborted (core dumped) ./corerun xunit.console.netcore.exe $testDllName -xml testResults.xml -notrait category=failing -notrait category=OuterLoop -notrait category=$xunitOSCategory -notrait Benchmark=true 23:38:16 One or more tests failed while running tests from 'System.Security.Cryptography.X509Certificates.Tests'. Exit code 134. ``` 4824 area-System.Net NameResolutionPalTests.GetHostByName_HostName failed on OS X in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_debug_tst_prtest/10/console ``` 20:10:25 System.Net.NameResolution.PalTests.NameResolutionPalTests.GetHostByName_HostName [FAIL] 20:10:25 System.Net.Internals.InternalSocketException : Unknown error: 11001 20:10:25 Stack Trace: 20:10:25 at System.Net.NameResolutionPal.GetHostByName(String hostName) 20:10:25 at System.Net.NameResolution.PalTests.NameResolutionPalTests.GetHostByName_HostName() ``` 4825 area-System.IO coreCLR no option for passing filepath as string inside constructors "I noticed there are several constructors for IO tasks that do not include the option for passing a string in .NET Core. ``` csharp //old way XmlDocument xdoc xdoc.Load(@""file\path""); //new way XmlDocument xdoc xdoc.Load(new FileStream(@""file\path"", FileMode.Open); //old string file = @""file\path""; var sw = new StreamWriter(file, false, new UTF8Encoding(false)) // new string file = @""file\path""; var sw = new StreamWriter(new FileStream(file, FileMode.OpenOrCreate), new UTF8Encoding(false)) ``` What is the reason behind this and is there a better way than using the FileStream constructor to pass the filepath as string? " 4829 area-System.Net AcceptAsyncV4BoundToAnyV6_Success failed on OSX in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_debug_tst_prtest/21/console ``` 09:22:19 System.Net.Sockets.Tests.DualMode.AcceptAsyncV4BoundToAnyV6_Success [FAIL] 09:22:19 Assert.Equal() Failure 09:22:19 Expected: ::ffff:127.0.0.1 09:22:19 Actual: ::127.0.0.1 09:22:19 Stack Trace: 09:22:19 at System.Net.Sockets.Tests.DualMode.DualModeConnect_AcceptAsync_Helper(IPAddress listenOn, IPAddress connectTo) 09:22:19 at System.Net.Sockets.Tests.DualMode.AcceptAsyncV4BoundToAnyV6_Success() ``` 4833 area-System.Numerics Intermittent Matrix4x4DecomposeTest01 failed in CI on OS X http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_release_tst_prtest/19/console ``` 08:54:36 System.Numerics.Tests.Matrix4x4Tests.Matrix4x4DecomposeTest01 [FAIL] 08:54:36 Matrix4x4.Decompose did not return expected value. Expected:<10, 20, 30> actual:<10, 20.19675, 30>. 08:54:36 Expected: True 08:54:36 Actual: False 08:54:36 Stack Trace: 08:54:36 at System.Numerics.Tests.Matrix4x4Tests.DecomposeTest(Single yaw, Single pitch, Single roll, Vector3 expectedTranslation, Vector3 expectedScales) 08:54:36 at System.Numerics.Tests.Matrix4x4Tests.Matrix4x4DecomposeTest01() ``` 4834 area-System.Threading Allow to configure IO awaited Tasks to complete on the IOCP worker thread. "For background info see @stephentoub excellent post: http://blogs.msdn.com/b/pfxteam/archive/2012/01/20/10259049.aspx Key relevant quote: ""If the context comes back as null, then the continuation could run “anywhere”. I put anywhere in quotes because obviously the continuation can’t run “anywhere,” but logically you can think of it like that… it’ll either end up running on the same thread that completed the awaited task, or it’ll end up running in the ThreadPool."" What I noticed in .NET FW 4.6 is that HttpListener completions _sometimes_ get posted to the ThreadPool _Work Queue_ instead of being directly completed on the IOCP worker thread itself. The way I manage to avoid this unnecessarily context switch is by ""overriding"" the Task code policy on how to dispatch the completion: var currentContext = SynchronizationContext.Current; try { SynchronizationContext.SetSynchronizationContext(new NoOpSynchronizationContext()); ``` await listener.GetContextAsync() ``` } finally { SynchronizationContext.SetSynchronizationContext(currentContext); } public class NoOpSynchronizationContext : SynchronizationContext { public override void Post(SendOrPostCallback d, object state) { d(state); } } Needless to say this is boilerplate code one would want to avoid when awaiting tasks of libs using IOCP. " 4836 area-System.Net System.Net.Sockets.APMServer.Tests has a test that hangs, causes build timeout on OSX. ``` System.Net.Sockets.Tests.SendReceive.SendRecvAPM_Single_Stream_TCP_IPv4 [FAIL] 15:49:15 Assert.True() Failure 15:49:15 Expected: True 15:49:15 Actual: False 15:49:15 Stack Trace: 15:49:16 at System.Net.Sockets.Tests.SendReceive.SendRecvAPM_Stream_TCP(IPAddress listenAt, Boolean useMultipleBuffers) 15:49:16 at System.Net.Sockets.Tests.SendReceive.SendRecvAPM_Single_Stream_TCP_IPv4() 17:34:43 Build timed out (after 120 minutes). Marking the build as aborted. 17:34:44 ./run-test.sh: line 130: 9296 Terminated: 15 ./corerun xunit.console.netcore.exe $testDllName -xml testResults.xml -notrait category=failing -notrait category=OuterLoop -notrait category=$xunitOSCategory -notrait Benchmark=true 17:34:44 One or more tests failed while running tests from 'System.Net.Sockets.APMServer.Tests'. Exit code 143. ``` 4839 area-System.IO Determine the correct notification smoothing for all FileSystemWatchers Currently, each system's FileSystemWatcher generates different notifications based on different non-trivial events. For instance, OS X and Ubuntu generate Changed events on the root watch folder while Windows does not; or, on OS X, unlink and link (aka a FileSystem Move) causes a metadata change on the parent folder. Smoothing out some of the above scenarios (aka making them consistent across each platform) can get quite complicated due to the underlying non-deterministic basis of each FSW API. None of the supported OS kernels (Linux Kernel, Darwin, or NT) make a guarantee that callers will receive all notifications or notifications in a timely manor, due to internal buffers and system load. Theoretically, each underlying File System **could** also generate events differently (ie ext3 to ext4); it may not, but that would require more intensive testing. Consumers of the FSW, anecdotally from my past experience, will usually have state machines to determine what actually changed based on certain notifications or notification patterns. Trying to fit each platforms nuances into one single pattern would require a quite intricate state machine to handle some of the edge case situations that can occur, such as a delay between the unlink and the re-link notifications due to system load or a full buffer; therefore, I'd propose that we allow the FSW classes to be best-effort and acknowledge that minor differences will happen cross-platform (for example, an extra Change notification on OS X due to unlink and re-link behavior) as long as the differences do not cause dramatic functional differences to consumers. The action for this proposal would be changing the tests to be a little less strict about what is an expected and not-expected notification; for instance, allowing metadata change notifications to be sent to parent items when children items generate non-file-data changes. @stephentoub, thoughts? 4845 area-System.Security Symmetric encryption with TripleDES ... not implemented? "I get a ""not implemented"" exception if I try to use TripleDES. What's the preferred ""simple"" and ""not so secure but easy and fast"" way to symmetrically encrypt/decrypt a string with a key in a dnxcore50 project? ![capture](https://cloud.githubusercontent.com/assets/1622880/11606629/e7c81784-9adc-11e5-9d68-4978bedeac85.PNG) " 4851 area-System.Net System.Net.Primitives tests Added tests, especially for CookieContainer/Parser/Tokenizer/Collection Removed unecessary code 4854 area-System.Net AcceptAsyncV4BoundToSpecificV4_Success failed on OSX in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_release_tst_prtest/55/consoleFull#-21371504001f1a4601-6aec-4fd5-b678-78d4389fd5e8 ``` 17:00:48 System.Net.Sockets.Tests.DualMode.AcceptAsyncV4BoundToSpecificV4_Success [FAIL] 17:00:48 Assert.Equal() Failure 17:00:48 Expected: ::ffff:127.0.0.1 17:00:48 Actual: ::127.0.0.1 17:00:48 Stack Trace: 17:00:48 at System.Net.Sockets.Tests.DualMode.DualModeConnect_AcceptAsync_Helper(IPAddress listenOn, IPAddress connectTo) ``` 4856 area-System.IO WatcherDoesntFollowSymLinkToFolder failed on OSX in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_debug_tst_prtest/50/console ``` 11:48:22 CreatedTests.FileSystemWatcher_Created_WatcherDoesntFollowSymLinkToFolder [FAIL] 11:48:22 Didn't observe a symlink created event within 30000ms 11:48:22 Expected: True 11:48:22 Actual: False 11:48:22 Stack Trace: 11:48:22 at Utility.ExpectEvent(WaitHandle eventOccurred, String eventName, Int32 timeout) 11:48:22 at CreatedTests.FileSystemWatcher_Created_WatcherDoesntFollowSymLinkToFolder() ``` 4864 area-System.Diagnostics Vaildation of ETW events need TraceEvent EventSource needs TraceEvent to validate ETW events in the tests. 4865 area-System.Diagnostics EventListener tests for Events are not enabled because we haven't shipped that API yet We are in the process of putting a new API to consume EventSource events through EventListeners without having to subclass an EventListener. The tests for these changes are disabled until the feature ships. 4866 area-System.Security CURDLE and Cryptographic algorithm APIs / selection One of the major problem areas in .NET at present is the organization and algorithm selection for cryptography. In particular: - .NET 4.6 does not supply many of the preferred algorithms for IETF protocols - The organization of the APIs is haphazard and inconsistent. I know that there are several comments on this and an expectation that 'something' will be done. I would like to make some suggestions. First, for algorithm selection, note that IETF just started a call for comments on a new working group to choose a consistent set of algorithms for use in IETF protocols. So the idea is that S/MIME, TLS, SSH, OpenPGP, etc. all use the same set of algorithms. This is not a completely open ended process either as pretty much anyone involved in that process can tell you right now that you are not going to need anything outside: Encryption/Integrity: AES-CCM, AES-GSCM, AES-CBC in 128 and 256 bit strengths ChaCha20 and Poly1305 Digest: SHA2 and SHA3 Public Key: Key agreement (ECDH) and digital signatures (EdDSA) with Curve25519 and Curve448 as defined by CFRG RSA signature and encryption at 1024 and 2048 bit key strengths. It will take at least 18 months to get documents out that describe in detail how these are applied in all the application protocols. But that is the set of algorithms we are trying to establish as standard across the board. On the API side, there is a lot of inconsistency right now and the current classes are really not well suited for use with the encrypt-plus-authenticate modes we prefer in modern protocol design. The classes for encryption, authentication and public key ops expose different functionality at different layers in the inheritance hierarchy. They don't expose the identification info we need for interface with certificates, or S/MIME, JOSE, etc. So what I have done for my own code is to develop a set of classes that essentially wrap the .NET classes which in turn wrap either the Windows classes or OpenSSL. I also have a much simpler certificate parser/issuer library that is in native C#. Both of those will be released as open source under an MIT license in the next few days. Right now my project is built in .NET 4.6 because it is what existed. But the aim all along was to move to .NET Core, that was part of the reason for choosing .NET in the first place. 4867 area-System.Diagnostics EventSource dictionary events are broken on CoreCLR "Writing a dictionary to an EventSource like the following is broken. `EventSource logger = new EventSource();` `logger.Write(""EventWithStringDict_C"", new { myDict = dict, s = ""end"" });` This fails because Activator.CreateInstance fails because it can't find the constructor for one of the types we use in TraceLogging to parse the dictionary. The type is `KeyValuePairTypeInfo`. " 4868 area-System.Net Remove sync APIs from SslStream and NegotiateStream As per the System.Net.\* API review dotnet/apireviews#21 removing the sync versions of the AuthenticateAsClient, AuthenticateAsServer methods from the SslStream and NegotiateStream classes. Part of #4732 4870 area-System.Net Adding HTTP 2.0 support to HttpClient It appears as though UWP has a new HttpClient in the Windows.Web.Http namespace which has HTTP 2.0 support: https://msdn.microsoft.com/en-us/library/windows/apps/mt187345.aspx Is porting this work to the coreclr HttpClient in the roadmap? 4871 area-System.Diagnostics EventSource tests fail on non-windows platforms The majority of the EventSource tests fail on non-windows platforms. Need to investigate further. 4872 area-System.Diagnostics Add Tests for Dataflow ETW events in EventSource The failing tests are tracked by issue #1000. It needs to be verified that this issue is fixed and tests added. 4873 area-System.Diagnostics Add tests for null/empty array issue in EventSource Add tests for https://github.com/dotnet/coreclr/pull/1988. 4874 area-System.IO Removed Managed Inflater/Deflater code in System.IO.Compression Now that we always use the zlib implementations for inflation/deflation, the managed ones may be removed. resolves #4451 @eerhardt @stephentoub @tarekgh 4879 area-System.IO Modify System.IO.Compression.DeflateStream.Flush to actually flush. The existing implementation of Flush and FlushAsync for System.IO.Compression.DeflateStream doesn't actually flush - it only checks that the stream isn't disposed. This commit modifies Flush to Flush and also adds unit tests around the new functionality. Some more detailed discussion is available at #3669 @stephentoub @redknightlois @ericstj 4880 area-System.Net Reconsider Socket Timeout Api Timeout settings for Socket Send/Recv operations only work for blocking API's. It's too easy to shoot yourself in the foot thinking these setting will come into effect for non-blocking network operations, especially nowadays given the simplicity of issuing async calls using async/await. I suggest either: - Implement timeout support for async send/recv operations into the Socket class (Preferred) - Why windows doesn't support timeouts for non-blocking socket calls is quite a mystery. - Remove blocking timeout properties (force explicit use of socket options) For reference, all these properties are no-up with respect to async calls Socket Class: ReceiveTimeout SendTimeout NetworkStream: CanTimeout (fixed to True) ReadTimeout WriteTimeout TcpClient: ReceiveTimeout SendTimeout 4882 area-System.Numerics Matrix4x4CreateFromYawPitchRollTest2 failed on OS X in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_release_tst_prtest/79/console ``` 07:00:32 System.Numerics.Tests.Matrix4x4Tests.Matrix4x4CreateFromYawPitchRollTest2 [FAIL] 07:00:32 Yaw:-265 Pitch:155 Roll:-405 07:00:32 Expected: True 07:00:32 Actual: False 07:00:32 Stack Trace: 07:00:33 at System.Numerics.Tests.Matrix4x4Tests.Matrix4x4CreateFromYawPitchRollTest2() ``` 4883 area-Infrastructure Resource editing stopped working in VS on corefx projects Attempting to open a Strings.resx now fails with an error like this: ![capture](https://cloud.githubusercontent.com/assets/2642209/11661432/e1eb2c5a-9d9f-11e5-80f6-83f2bf18254e.PNG) Seems to have started happening in the last week or two. 4884 area-Infrastructure IntelliSense/coloring/etc. broken in corefx projects Within the last few weeks, something has changed to break IntelliSense, coloring, etc. within corefx projects. For example, open a test project: [Fact] attributes aren't colored, no IntelliSense is provided for the Assert class, etc. And IntelliSense within src assemblies appears to be pulling from the full framework rather than from the actually referenced corefx assemblies. 4887 area-System.Net Allow test infrastructure to work for specialized Windows 10 tests Some Windows CoreFx features like System.Net.Sockets socket option SocketOptionName.ReuseUnicastPort require a specific version of Windows (10) and customized networking configuration using Powershell scripts. And changing these settings requires a machine reboot. This is difficult to test in the current CI environment. Need to find a way to create 'disposable' test machines/VM's with these customized settings so that these kinds of specific tests can be automated. 4888 area-System.Net Add System.Net.Sockets, SocketOptionName.ReuseUnicastPort As per the System.Net.\* API review dotnet/apireviews#21 adding back the SocketOptionName.ReuseUnicastPort enum value. Also, reserving SocketFlags.MaxIOVectorLength=16 enum value to prevent future conflicts. Part of #4732 4890 area-System.Net AcceptV6BoundToAnyV6_Success failed on OS X in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_release_tst_prtest/66/console ``` 12:50:37 System.Net.Sockets.Tests.DualMode.AcceptV6BoundToAnyV6_Success [FAIL] 12:50:37 System.ArgumentException : The supplied System.Net.Internals.SocketAddress is an invalid size for the System.Net.IPEndPoint end point. 12:50:37 Parameter name: socketAddress 12:50:37 Stack Trace: 12:50:37 at System.Net.Sockets.IPEndPointExtensions.Create(EndPoint thisObj, SocketAddress socketAddress) 12:50:37 at System.Net.Sockets.Socket.Accept() 12:50:37 at System.Net.Sockets.Tests.DualMode.Accept_Helper(IPAddress listenOn, IPAddress connectTo) ``` 4891 area-System.IO "GZipStream always writes a header with the OS set to ""Windows"" even on Unix" "`GZipStream` [always](https://github.com/dotnet/corefx/blob/085865e6f375d11dd1d5dd815b251356b0f88d2b/src/System.IO.Compression/src/System/IO/Compression/GZipUtils.cs#L43) writes a header with the OS member set to ""Windows"" (0). When running on Unix, should it be set to ""Unix"" (3)? Or maybe even ""unknown"" (255) for all OSes? From the [RFC](http://www.zlib.org/rfc-gzip.html#header-trailer): ``` OS (Operating System) This identifies the type of file system on which compression took place. This may be useful in determining end-of-line convention for text files. The currently defined values are as follows: 0 - FAT filesystem (MS-DOS, OS/2, NT/Win32) 1 - Amiga 2 - VMS (or OpenVMS) 3 - Unix 4 - VM/CMS 5 - Atari TOS 6 - HPFS filesystem (OS/2, NT) 7 - Macintosh 8 - Z-System 9 - CP/M 10 - TOPS-20 11 - NTFS filesystem (NT) 12 - QDOS 13 - Acorn RISCOS 255 - unknown ``` Now that the managed inflater/deflater implementation has been removed in #4874, perhaps it'd be a good time to refactor the gzip implementation to have zlib handle it entirely (zlib can be configured to write the gzip header/footer itself). This should take care of the header OS issue (let zlib handle it) and would reduce the number of lines of code that needs to be maintained in CoreFX, allow zlib to handle the crc32 calculation on its own, and avoid unnecessary allocations associated with having to create instances of `GZipFormatter` and intermediate `byte[]` buffers for the header/footer. cc: @ianhays, @stephentoub " 4895 area-System.IO Remove custom header writing in System.IO.Compression in favor of Zlib Now that we removed the managed implementations for compression, we should consider removing the manual header writing/reading in favor of calling the zlib header setter/getter. Diverged from #4891 where the discussion started. 4897 area-System.Net Change System.Net.Sockets, SocketOptionName.ReuseUnicastPort behavior on *NIX See related PR #4888. Change *NIX to throw SocketException (instead of PlatformNotSupportedException) when doing a Set/Get SocketOption with SocketOptionName.ReuseUnicastPort. 4899 area-System.Net System.Net.Requests.Tests seg faulting on shutdown on Unix Most of our test runs recently started failing on Unix when the System.Net.Requests.Tests are shutting down. It appears to be due to an interaction between https://github.com/dotnet/coreclr/pull/2207 and something in our System.Net.Http implementation related to multi and easy handle cleanup. @kouvel and I are investigating. 4900 area-System.Net Implement SocketAsyncEventArgs FILE_SKIP_COMPLETION_PORT_ON_SUCCESS - TODO Tracking Issue While there is a TODO comment for this in SocketAsyncEventArgs, I think this is important enough to be tracked as an issue. 4906 area-System.Net Support HttpRequestMessage.Version in WinHttpHandler WinHttpHandler was currently ignoring the `HttpRequestMessage.Version` property and was always sending out requests using 'HTTP/1.1' which is the default for winhttp. This fix now will look at the request message `Version` property and send out the request using either 1.0 or 1.1. If neither of these versions are specified, then the request is sent out using the default winhttp version (which is currently 1.1 as of Windows 10). Note: The .NET Framework (Desktop) will throw an exception if neither 1.0 nor 1.1 version is specified. Currently CoreFx including NETNative, WinHttpHandler and CurlHandler will simply use a default instead of throwing. While this is different behavior than Desktop, it is more desirable in the long run. There is a separate issue #4870 to add HTTP/2.0 support to WinHttpHandler. Fixes #4754 4907 area-System.Globalization CompareOptions.IgnoreSymbols only ignores punctuation on Unix, but not other symbols When using CompareOptions.IgnoreSymbols for string comparison on Unix, we are using the ICU option ALTERNATE_HANDLING = SHIFTED. This effectively ignores any punctuation characters: ! - . , etc. However by default, ICU only includes punctuation characters, and not other symbols, like currency and math symbols. We need to ignore these characters on Unix as well when IgnoreSymbols is set to true. 4909 area-System.Console Share GetCharset() for Unix We need to use this code as well in SQL Client for Unix. In Windows we use Windows API to get windows locale. I will be reusable if this code can be shared in CurrentCulture.CharSet() (CultureInfo). 4910 area-System.Net Optimize error handling around chain.Build in WinHttpHandler This was a TODO item from #2165 suggested by @bartonjs. The X509CertificateChain.Build() method returns a boolean indicating if there were errors building the chain. It's more performant to check that instead of inspecting the individual fields in the chain. 4913 area-System.Net Fix two issues in SelectAndPollTests "1. The timeout value used in the tests was written assuming the unit was milliseconds, but microseconds is actually used. This meant we were passing in a timeout of 5 milliseconds instead of 5 seconds. Changed to use the right value. 2. The SelectRead_Multiple_Success test attempts to use Select as a form of ""when all"", passing in two sockets and expecting that it'll find both have data available. But the data is available asynchronously from the send, and Select returns when at least one of the sockets is readable. As a result, there's a race condition that results in the test failing sporadically: on my machine, it fails ~15 out of every 1000 runs. I've fixed the test by looping until either the timeout is reached or we find both sockets available, whichever comes first. Fixes #4686 cc: @pgavlin, @CIPop, @davidsh " 4915 area-System.Net Remove dead code from System.Runtime Remove unused private fields, methods, nested types and resource strings. 4916 area-System.IO FileSystemWatcher_Changed_FileInNestedDirectory failed in CI on OpenSUSE http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/opensuse13.2_debug_tst_prtest/126/console ``` 15:21:12 ChangedTests.FileSystemWatcher_Changed_FileInNestedDirectory [FAIL] 15:21:12 Didn't observe a nested created event within 30000ms 15:21:12 Expected: True 15:21:12 Actual: False 15:21:12 Stack Trace: 15:21:13 at Utility.ExpectEvent(WaitHandle eventOccurred, String eventName, Int32 timeout) 15:21:13 at Utility.TestNestedDirectoriesHelper(WatcherChangeTypes change, Action`2 action, NotifyFilters changeFilers) 15:21:13 at ChangedTests.FileSystemWatcher_Changed_FileInNestedDirectory() ``` 4917 area-System.IO Remove custom header writers in System.IO.Compression Now that we removed the managed implementations for compression we can remove the manual header writing/reading in favor of calling the zlib header setter/getter. I also cleaned up the constructors a bit and removed some now dead code. resolves #4895. Also affects #4891: this PR uses zlib for gzip header generation without calling DeflateSetHeader. This means that the OS value in the Gzip header will be set based on the platform zlib was compiled to. This PR will therefore need to be updated if we decide to go a different route than using the default behavior. 4919 area-Infrastructure VS: Create tool to generate VS .sln from .builds files Continuing #4901 @weshaggard I suggest keeping this open just for a little bit longer. > We want to keep libraries isolated so they can ship independent of each other and in general we want the libraries to depend upon the lowest version of the package that contains the necessary dependencies, and not have project references to the live versions of their dependent libraries. This goal is completely orthogonal to the pain points I listed. Inter-project dependencies are a fact and attempting to solve the granularity problem (Packages or not) by trading in developer productivity is simply a mistake, and if you insist to compare apples to oranges than aiding to code comprehension is by far more important to correctness. Technically there is nothing that prohibits someone from directly referencing any other project (csprog) . (something which is already being done between existing projects in the corefx repo). What constitutes the right level of package isolation can only be determined by peer code-review not the build system. Suggesting that independent build scripts solve the problem is a misunderstanding of the problem because build scripts are also modified to create dependencies just in a less visible way. > For cases were folks have a desire to run tests against the live versions of all the dependencies built in the repo people can pass /p:TestWithLocalLibraries=true when building test projects Building unit tests is a minor problem and has nothing to do with this issue. The fundamental problem is Navigating the source (Goto To Definition) and Debugging (Step Into) _across different implementation projects and test projects using Visual Studio_ again, aiding to code comprehension should be a key requirement. (WinDbg - Forget it!) We need to automatically generate a solution that references projects (csproj) that live in parallel to the independent existing project csproj. What gets into final Nuget packages or specified in the project.json is a completely different issue. Failing to address this is a pushback to potential contributing (a.k.a volunteering) efforts - a financial lose for the project. 4925 area-System.Security Add PackageTargetRuntime to System.Security.Principal.Windows to name supported OSes Update the .csproj in System.Security.Principal.Windows to specify for only the runtimes it supports. Right now, the package believes a Linux implementation exists but inserts the Windows implementation, causing consumers to break at runtime if they attempt to use it. 4927 area-System.Net Specifying SSL3.0 throws an exception when trying to authenticate with SslStream In PR #4483 a change was made which causes an exception to be thrown when requesting SSL3.0. This is the wrong behavior for the following reasons: - Existing code written for the desktop may fail with an exception - There's no compile time error when writing code which is guaranteed to fail at runtime - An exception can be thrown even when SSL3.0 wouldn't be used even though specified - Inconsistent behavior with other mechanisms to disable SSL3.0 **Existing code written for the desktop may fail with an exception** Any code written for the desktop which specifies SSL3.0 will now throw an exception, but the developer may not discover this until after code has been released. If a third party library developer is able to port their code to core clr with minimal changes, they may not test every code path in their library on core clr. This is becoming more and more likely now that we support Linux and OSX as many developers won't have the capability to verify their code on those platforms. They should be able to expect that as long as the api surface is available, that their code will behave the same on all platforms that support the api. **There's no compile time error when writing code which is guaranteed to fail at runtime** If I create an SslStream and try to authenticate to a remote host specifying SSL3 | TLS | TLS11 | TLS12 in a call to AuthenticateAsClient, this method call is now guaranteed to fail at runtime 100% of the time. That code is deemed invalid and yet there's no compile time warning or error. This is a bad developer experience. **An exception can be thrown even when SSL3.0 wouldn't be used even though specified** On desktop and with the prior behavior, if I pass the list SSL3 | TLS | TLS11 | TLS12 to SslStream.AuthenticateAsXXXXX at both ends of a stream I'm attempting to secure, SSL3 won't get negotiated as a higher protocol will attempt to be established. This change causes an application/library which wouldn't have resulted in an insecure connection being negotiated now having a runtime failure despite still being secure. **Inconsistent behavior with other mechanisms to disable SSL3.0** Other mechanisms where SSL3.0 can't be used are the protocol being disabled at the OS level (registry change in Windows for example), or the remote end not supporting SSL3.0. In either of these cases, specifying SSL3.0 can't result in SSL3.0 being used as it's been made unavailable, and as long as other protocols have been specified the connection will be negotiated without any problem. If SSL3.0 was the only protocol specified, then an exception would be thrown stating that a secure connection wasn't able to be negotiated. Throwing a different exception because SSL3.0 has been disabled via a different mechanism (hard coded in .NET networking code) is an inconsistent response to the same basic reason (support for the protocol has been disabled for security reasons). Specifying the protocol to use is a negotiation and there's no guarantee that any one protocol that was specified can or will be used as there are other dependent factors (OS support, remote party protocol support etc). If SSL3.0 (or 2.0) is specified, simply removing it from the list passed down to lower layers (such as SCHANNEL) without any error or exception is compatible with the purpose of specifying which protocols to use in that it's a negotiation and there's no guarantee that everyone agrees to the same list. If only SSL3.0 or SSL2.0 are specified, then there are no alternatives so I could see failing fast and informing by exception that those protocols aren't supported. But in that situation you would be guaranteed a failure regardless of mechanism to disable the protocol and you wouldn't be breaking code which otherwise would continue working had a different mechanism been used to disable these protocols. When other more secure protocols have been specified, there's no need to fail the request, just don't use the insecure protocols. I would suggest having the following behavior(s): - Bitwise AND any specified protocols with the compliment of (SSL3 | SSL2) to disable their usage when applying the specified protocols (so as not to break round-tripping of property getter and setter values). - Optionally throw an exception if only unsupported protocols have been specified. - Optionally, if SSL3/SSL2 were specified along with other protocols but a secure connection was unable to be negotiated, have a special exception message noting that SSL3/SSL2 are no longer supported to give a hint to a possible cause 4928 area-System.Runtime Add StringBuilder append methods to StringBuilder. This is useful for more complicated string manipulation (interop in particular). See CoreCLR issue: https://github.com/dotnet/coreclr/issues/1843 And PR: https://github.com/dotnet/coreclr/pull/2287 @terrajobst; @vancem Per the discussion below the following is the *new* proposal: ### (NEW) APIs being added ``` diff namespace System.Text { public sealed class StringBuilder { + // Parameter handling to match existing string Append methods + public StringBuilder Append(StringBuilder value) + public StringBuilder Append(StringBuilder value, int startIndex, int count) } } ``` ### REJECTED Proposal: ``` diff namespace System.Text { public sealed class StringBuilder { + public StringBuilder(StringBuilder value) + public StringBuilder(StringBuilder value, int capacity) + public StringBuilder(StringBuilder value, int startIndex, int length, int capacity) } } ``` 4930 area-System.Net Remove dead code from System.Private.Uri Remove unused private fields, methods, nested types and resource strings. 4934 area-System.Net Got System.IO.Exception When Expecting a Not-Found Response "https://github.com/dotnet/wcf/issues/87 seems caused by an issue in System.Net. I have a repro for the issue. To repro the issue, you can add the following test in System.Net.Http.Functional.Tests and run the test. ``` csharp [Theory, MemberData(""VerifyUploadServersStreamsAndExpectedData"")] public async Task PostAsync_CallMethod_StreamContent_NotFound(Uri remoteServer, Stream requestContentStream, byte[] expectedData) { int contentLenght = 1000000; using (var client = new HttpClient()) { // Ensure the service start HttpContent content = content = new StringContent( """", Encoding.UTF8, ""application/json""); client.PutAsync(""http://localhost:44283/resource/WcfService.TestResources.BasicHttpResource"", content).GetAwaiter().GetResult(); content = new StringContent(new string('a', contentLenght)); content.Headers.ContentMD5 = TestHelper.ComputeMD5Hash(expectedData); using (HttpResponseMessage response = await client.PostAsync(new Uri(""http://localhost:8081/BridgeAppDomain0/Basicnot-an-endpoint""), content)) { Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); } } } ``` Note that the test needs to use WCF's bridge service to repro the issue. The service is available on [One Drive](https://onedrive.live.com/redir?resid=CE2984E291F58617!3365&authkey=!ACO_zktAGj0aTZI&ithint=folder%2c). To start the service, download the 'bridge folder', and run the script SetupWCFTestService.cmd in bridge\tools. You need to start the service on your machine before running the test. Expect: the test passes. Actual: the test fails. Please feel free to contact me if you have any questions. Thanks. " 4935 area-System.Security Respond to PR code review comments for ported library System.Security.Claims @brentschmaltz as the owner of the System.Security.Claims library can you please have a look through the code review comments provided in https://github.com/dotnet/corefx/pull/4933 and address them appropriately. 4941 area-Infrastructure Consolidate facade projects With #4878 , we have a bunch of loose facade projects that can be consolidated into the other project for the library, and also a handful of facade projects in a subdirectory unnecessarily. We should go and consolidate those where we can. Here's a list from the tool I ran to detect such projects: - [ ] Microsoft.Win32.Primtives - [ ] Microsoft.Win32.Registry - [x] System.AppContext only has a 'facade' project - [x] System.Collections has a full facade and partial facade project that should be merged. - [x] System.Diagnostics.Contracts only has a 'facade' project - [x] System.Diagnostics.Debug has a full facade and partial facade project that should be merged. - [x] System.Diagnostics.Tools only has a 'facade' project - [x] System.Diagnostics.Tools has a full facade and partial facade project that should be merged. - [x] System.Diagnostics.Tracing only has a 'facade' project - [x] System.Globalization only has a 'facade' project - [x] System.Globalization.Calendars only has a 'facade' project - [ ] System.IO has a full facade and partial facade project that should be merged. - [x] System.Reflection only has a 'facade' project - [x] System.Reflection.Emit only has a 'facade' project - [x] System.Reflection.Emit.ILGeneration only has a 'facade' project - [x] System.Reflection.Emit.Lightweight only has a 'facade' project - [x] System.Reflection.Extensions only has a 'facade' project - [x] System.Reflection.Primitives only has a 'facade' project - [x] System.Resources.ResourceManager only has a 'facade' project - [x] System.Runtime only has a 'facade' project - [x] System.Runtime has a full facade and partial facade project that should be merged. - [x] System.Runtime.CompilerServices.VisualC only has a 'facade' project - [x] System.Runtime.Extensions only has a 'facade' project - [x] System.Runtime.Extensions has a full facade and partial facade project that should be merged. - [x] System.Runtime.Handles only has a 'facade' project - [x] System.Runtime.Handles has a full facade and partial facade project that should be merged. - [x] System.Runtime.InteropServices only has a 'facade' project - [x] System.Runtime.InteropServices has a full facade and partial facade project that should be merged. - [x] System.Runtime.InteropServices.WindowsRuntime only has a 'facade' project - [x] System.Runtime.Loader only has a 'facade' project - [x] System.Runtime.Serialization.Json only has a 'facade' project - [x] System.Runtime.Serialization.Xml only has a 'facade' project - [x] System.Security.AccessControl only has a 'facade' project - [ ] System.Security.Claims only has a 'facade' project - [x] System.Text.Encoding only has a 'facade' project - [x] System.Text.Encoding.Extensions only has a 'facade' project - [x] System.Threading only has a 'facade' project - [x] System.Threading has a full facade and partial facade project that should be merged. - [x] System.Threading.Tasks only has a 'facade' project - [x] System.Threading.Tasks has a full facade and partial facade project that should be merged. - [x] System.Threading.Thread only has a 'facade' project - [x] System.Threading.ThreadPool only has a 'facade' project - [x] System.Threading.Timer only has a 'facade' project 4942 area-System.ComponentModel Some ValidationAttributes are stateful. "CompareAttribute has the property OtherPropertyDisplayName, which is set to the otherProperty value you passed in until you call IsValid, at which point it becomes the other properties actual DisplayName. RangeAttribute has an overload which takes a type and lets you give it string for Min and Max, however those strings aren't converted until you call FormatErrorMessage. Both of these instances of statefulness make the attributes unpredictable and require gross hacks. If for example you call the Minimum property of RangeAttribute before and after calling FormatErrorMessage you might first get ""0"" then 0d (which is not a side effect one would expect without examining the source). Now you have to keep track of whether you've called that or not when looking at Minimum and Maximum so you know what to expect. I understand that throwing in setters and Attribute constructors is bad, but perhaps the work could be done in the getters so that it's never wrong and any exceptions don't break attribute construction. " 4945 area-System.Net Redirected request's absolute uri is missing the query string information on CoreClr and Linux "I have a http client which tries to communicate to a secure endpoint. This endpoint authorizes the request and redirects if the user is not authenticated. Some of tests are failing due to different api behavior when on windows and linux platforms. **CoreClr and Windows** http://localhost:5000/Account/Login?ReturnUrl=%2Fadmin%2Fstoremanager <--- **this is fine** --- http://localhost:5000/Admin/StoreManager StatusCode: 302, ReasonPhrase: 'Found', Version: 1.1, Content: System.Net.Http.StreamContent, Headers: { Date: Fri, 11 Dec 2015 20:03:29 GMT Location: http://localhost:5000/Account/Login?ReturnUrl=%2FAdmin%2FStoreManager Server: Kestrel Content-Length: 0 } **CoreClr and Linux** http://localhost:5000/Admin/StoreManager <--- **note this** --- http://localhost:5000/Admin/StoreManager StatusCode: 302, ReasonPhrase: 'Found', Version: 1.1, Content: System.Net.Http.StreamContent, Headers: { Date: Fri, 11 Dec 2015 20:00:46 GMT Location: http://localhost:5000/Account/Login?ReturnUrl=%2FAdmin%2FStoreManager Server: Kestrel Content-Length: 0 } **Repro** ``` using System; using System.Net.Http; namespace ConsoleApp24 { public class Program { public static void Main(string[] args) { WithAutoRedirect(); Console.WriteLine(""-------------""); NoAutoRedirect(); } private static void WithAutoRedirect() { var client = new HttpClient(); client.BaseAddress = new Uri(""http://localhost:5000/""); var response = client.GetAsync(""admin/storemanager"").Result; Console.WriteLine(response.RequestMessage.RequestUri); } private static void NoAutoRedirect() { var clientHandler = new HttpClientHandler() { AllowAutoRedirect = false }; var client = new HttpClient(clientHandler); client.BaseAddress = new Uri(""http://localhost:5000/""); var response = client.GetAsync(""Admin/StoreManager"").Result; Console.WriteLine(response.RequestMessage.RequestUri); Console.WriteLine(response); } } } ``` cc @Tratcher " 4950 area-Infrastructure tags don't correspond to nuget releases I tried to find the source for for https://www.nuget.org/packages/System.Reflection.Metadata/ v 1.1.0 and https://www.nuget.org/packages/System.Collections.Immutable/ v 1.1.37 Unfortunately, tags are out-of-sync with nuget releases. 4953 area-System.IO Increase Code Coverage for System.IO.FileSystem.AccessControl @GiriSr as the owner of the System.IO.FileSystem.AccessControl library can you please have a look through the code review comments provided in https://github.com/dotnet/corefx/pull/4946 and address them appropriately. 4955 area-System.Data Fix Localization Issues on Linux Due to Unsupported Windows DLLs "Bypasses Windows localization references on Linux/OSX by using hardcoded English-US locale constants. Using the Windows localization DLLs on Linux/OSX causes DLL load failure issues. Once actual localization support is added for Linux/OSX, these workarounds can be removed. Same DLL load issue as in: https://github.com/dotnet/corefx/issues/4579 This DLL load issue also caused the problems seen in: https://github.com/dotnet/corefx/issues/4676 ^ The Close() error in the issue 4676 is due to packet data processing issues in a graceful close that was caused by a caught load-DLL exception. Basically, the localization DLL load throws an Exception, and when we catch this exception we try to do some cleanup & close on a DataReader. This throws another exception due to invalid packet data caused by the original DLL exception. Thus the true cause was being masked by this new ""connection error"" exception in SqlDataReader.Close(). " 4960 area-System.Net HttpClient not sending cookies which were part of earlier redirect response in Core Clr I am using CoreClr version of HttpClient on my Windows 10 OS. **Scenario:** Successful login will redirect the user to a page where the logging in user info is displayed **Issue:** Since the necessary cookie is not present, the system thinks that the user is not logged in **Trace of calls for the above scenario(Note: all these messages were logged at the server side)** --- Request: _request for login page_ GET /account/login ||Connection: Keep-Alive||Accept-Encoding: gzip, deflate||Cookie: U58hr9PQBAQ=CfDJ8IcTvLBrmYtHm19jNmsLC62rbm_jC2LBGRmurk0fd2R9YeGdeOLdRpC-rEVSSK24hsMjOToMUnjgo_cZwFLrDge_a0sHVy5eJc9qYkjYvThiFcG7MA9MB-HYLsoxlQIzT6v8tmAUbTOZ-39AakEWLTI; .AspNet.Session=7e8cee49-8d6b-6ab5-357b-d29e964af60d||Host: localhost:5000 Response: _login page sent to client_ 200 GET /account/login ||Date: Sat, 12 Dec 2015 14:27:39 GMT||Transfer-Encoding: chunked||Content-Type: text/html; charset=utf-8||Server: Kestrel|| Request: _client request to login with details of username and password_ POST /Account/Login ||Connection: Keep-Alive||Content-Length: 69||Content-Type: application/x-www-form-urlencoded||Accept-Encoding: gzip, deflate||Cookie: U58hr9PQBAQ=CfDJ8IcTvLBrmYtHm19jNmsLC62rbm_jC2LBGRmurk0fd2R9YeGdeOLdRpC-rEVSSK24hsMjOToMUnjgo_cZwFLrDge_a0sHVy5eJc9qYkjYvThiFcG7MA9MB-HYLsoxlQIzT6v8tmAUbTOZ-39AakEWLTI; .AspNet.Session=7e8cee49-8d6b-6ab5-357b-d29e964af60d||Host: localhost:5000|| Response: _server successful login response with redirect to home page /_ 302 POST /Account/Login ||Cache-Control: no-cache||Date: Sat, 12 Dec 2015 14:27:39 GMT||Pragma: no-cache||Expires: -1||Location: /||Server: Kestrel||Set-Cookie: .AspNet.Microsoft.AspNet.Identity.Application=CfDJ8IcTvLBrmYtHm19jNmsLC60z9IhWh_D65HPs01cDjGLzpfs5B5SeoX4k5tem5BqxDavdDWtijmOSUKuWw_lkI3PEeWJjUHn_mk8ArChjrFgySrEuCSkQMZU4vGVL3R3F2_aNbpixFkI3Oh2_PN1VF9Peb1XUJJTZDCDLlUFP7QSreFC4qaiJWaWTpGdp-_nStQSr2OzP5qAvqbGn2ME4fICTfm7BqWas_h_WaZPWjOwRT68V9ewibMxR2odTbcQf3Bqie1IEx2kjwiYLdXrzaT2sc-TmzKnNSTELgWmCVBdV27dMM2YGlwUOIL_YTgyAqCNLSO_YjfG8_gTODvhjTCJ9ff8hc_xTx0PYiZMdah5oNZPmAyAC2FJh_hWCRQD1jzgDVVGp2le9TaEw6XPdvsa_2u1HbjH_vRBIdtd49i9ZJv9Z_rO5X3PDgTYkAahAlGx7ym_vDOTZA-VC3KvM-JMOyIfcjYjovU9QkhsXBg8UI5COArVxLPXHSyXADoltftMxOg8oKBdl-55I8bKe-0ep6haIAz6ozlSFR41fEQN_j9kyNCaSjZYGu6-A6Qu8YP6tGEb3EPGhicE15NtrkDj7YhnJruOGKip2ZMvv-V0xg1UfzmNgOvvpMZHElbFsL2jlPaP0nzPn4uffArK6hlxo_ExYOdp596omQjPCF4h-; path=/; httponly|| **NOTE:** This call is missing the `.AspNet.Microsoft.AspNet.Identity.Application` cookie Request: _client request to home page_ GET / ||Connection: Keep-Alive||Accept-Encoding: gzip, deflate||Cookie: U58hr9PQBAQ=CfDJ8IcTvLBrmYtHm19jNmsLC62rbm_jC2LBGRmurk0fd2R9YeGdeOLdRpC-rEVSSK24hsMjOToMUnjgo_cZwFLrDge_a0sHVy5eJc9qYkjYvThiFcG7MA9MB-HYLsoxlQIzT6v8tmAUbTOZ-39AakEWLTI; .AspNet.Session=7e8cee49-8d6b-6ab5-357b-d29e964af60d||Host: localhost:5000|| Response: 200 GET / ||Date: Sat, 12 Dec 2015 14:27:39 GMT||Transfer-Encoding: chunked||Content-Type: text/html; charset=utf-8||Server: Kestrel|| --- **NOTE** that this scenario works fine with regular desktop HttpClient. @Tratcher 4961 area-System.Collections Stack and Queue should allow for random access in constant time The `Stack` and `Queue` classes algorithmically could allow for random access in constant time. At the moment this is not represented in the API surface of those types. I propose to lift that restriction. In fact most members of `List` could be made available on `Stack` and `Queue` as well. Really, `Stack` and `Queue` are mostly different ways to index and interpret an underlying array. There is no reason a `Stack` could not have for example `Remove(T)` or a `RemoveAll(Func)` methods just like `List` has. I propose in priority order: 1. Add `get` indexers to `Stack` and `Queue` 2. Add the core read and write methods that are required for users to implement the remaining ones. I think that would be `Insert`, `RemoveAt` and a `set` indexer. 3. Add as many `List` methods as seems appropriate to `Stack` and `Queue`, copying them from `List`. I don't see a reason why the set of methods to copy should be limited. We could go for feature parity. This issue seems like a good candidate for a community contribution. 4963 area-Infrastructure Top-level dir.props claims Roslyn can't build PDBs on Unix In particular, this piece of (Unix-only) code: ``` xml false none ``` ... claims that it's necessary to disable PDBs when building on Unix because dotnet/roslyn#2449 wasn't yet ready. However, that's been implemented, so perhaps this doesn't need to stay disabled anymore? Also note this, just a bit further down in the same Unix-only block: ``` xml true ``` (And, um, while we're looking at this comment: Windows is the one that uses backslashes as directory separators, not Unix, and you don't seem to have any nuspec files in this repository, so I'm not sure where any unexpected backslashes could be creeping in from.) 4964 area-System.Collections CreateSetComparer methods for HashSet<> and SortedSet<> This methods exists in the .NET Framework: [here](https://msdn.microsoft.com/en-us/library/bb335475.aspx) and [here](https://msdn.microsoft.com/en-us/library/dd321103.aspx). I know, this methods has a some issues and I want report about it and, probably, try to fix it. Are these methods still supported? If not, class [SortedSetEqualityComparer](https://github.com/dotnet/corefx/blob/d43a8a92151b2af9073257bd3c40160dd7404927/src/System.Collections/src/System/Collections/Generic/SortedSet.cs#L2419) should be removed. 4967 area-System.Net Cookie Tests Added tests, especially for CookieContainer/Parser/Tokenizer/Collection 4968 area-System.Net "UDP Socket.ConnectAsync result in ""An invalid argument was supplied Error Code:10022""" "For version RC1 A very simple call failed and throw exception ""An invalid argument was supplied Error Code:10022"" Repro: ``` var c = new UdpClient(); c.Client.ConnectAsync(""114.114.114.114"", 53).Wait(); ``` It works with sync mode: ``` var c = new UdpClient(); c.Client.Connect(""114.114.114.114"", 53); ``` Let me know if it's not a bug " 4969 area-System.Data SqlParameter Scale and Precison properties should override DbParameter implementations # Background In the desktop framework, The System.Data namespace included a set of interfaces from the .net 1.1 era. DbParameter implemented the IDbParameter interface which included the Scale and Precision properties. When System.Data was added to corefx, the interfaces were dropped since the abstract classes had been preferred since .net 2.0 and forward. @mgravell noticed ( #1612 ) however, that when the interfaces were removed, the Scale and Precision properties were broken. For some reason they used the interface to call the child implementation instead of traditional class inheritance. You can see the old implementation here : http://referencesource.microsoft.com/#System.Data/System/Data/Common/DBParameter.cs,68 The net result is that calling Scale or Precision on a SqlParameter object **casted to a DbParameter** is a no-op. This is the problem. # Motivation The are 3 motivators for this change. 1. Maintaining perceived behavior from the desktop framework 2. Implementing the path of least surprise 3. Enabling DB agnostic code (very important) The first point being that the following 2 statements are equivalent in .net 4.5 ``` C# SqlParameter param = new SqlParameter(); param.Scale = 1; ``` and ``` C# DbParameter param = new SqlParameter(); param.Scale = 1; ``` Whereas they are not currently equivalent in corefx. The 2nd statement will **not** update the value of Scale. The same behavior applies to the Precision property. The second motivation is that this kind of behavior difference is very unexpected. Most developers would assume that the behavior of setting or reading a property would not change due to inheritance. Lastly if you wanted to write DB agnostic code that only used the Db\* classes, you would be unable to set these parameters without a test and cast special case down to SqlParameter. # Proposed Change Simply alter SqlParameter to make Scale and Precision override the DbParameter implementations. # Risks I can see two _possibly_ breaking changes here: 1. Calling Scale and Precision from DbParameter now returns the SqlParameter implementation 2. Scale and Precision on SqlParameter are now virtual and therefore overridable The first one, is actually the existing behavior under .net. The SqlParameter members implicitly implemented the interface and get called from the parent (DbParameter) by it casting itself to the interface. The net result was the child implementation getting called. The second is not actually observable since SqlParameter is sealed and therefore no child classes can break. Now lets say that a 3rd party library was inheriting from DbParameter. They would more than likely just override Scale and Precision directly in .net. In core they could only do that, so this should not present a breaking change to existing or ported libraries. So i think that this is a safe change to make unless someone wrote code against corefx that was counting on DbParameter.Scale always being zero regardless of what they assigned it. Therefore **I believe this change has minimal risk in breaking code.** # Pull Request The changes are implemented here #4902 4970 area-System.Diagnostics An argument for dnx to set the process name _From @tuespetre on December 5, 2015 17:36_ Since ASP.NET 5 is aiming to provide a highly scalable, deployable, or otherwise 'cloud-friendly' approach to writing applications, I think it is important to discuss [the 'processes' components of the twelve-factor methodology:](http://12factor.net/processes) > ... a production deploy of a sophisticated app may use many process types, instantiated into zero or more running processes. In order to properly identify the running instances of a process, it can be useful for each process to have a distinct name. This allows processes to be easily identified through various user interfaces and command line utilities that provide information on a node's running process, and if set via command-line arguments, allows other utilities like Powershell DSC to distinguish the instances of the running processes that they are supposed to manage. I realize this can be implemented within each application with very little effort but I hadn't seen a discussion on this yet so I wanted to hear some other opinions. _Copied from original issue: aspnet/dnx#3235_ 4973 area-System.IO Re-enable DriveInfo VolumeLabel test resolves #1355 4976 area-System.Diagnostics Address reviews for porting System.Diagnostics.StackTrace to open @noahfalk Please address the comments posted to PR related to porting System.Diagnostics.StackTrace here https://github.com/dotnet/corefx/pull/4972#issuecomment-164534670 4980 area-System.Net SMTP Client does not use correct MediaType for Body when Alternate Views are Specified "Hi DotNet: I've found a bug in System.Net.Mail. First, here's how you replicate the issue: ``` var MessageTest = new System.Net.Mail.MailMessage(FromAddress, ToAddress); MessageTest.Body = ""This is HTML""; MessageTest.IsBodyHtml = true; MessageTest.AlternateViews.Add(System.Net.Mail.AlternateView.CreateAlternateViewFromString(""This is text"", Encoding.ASCII, ""text/plain"")); Server.Send(MessageTest); ``` You'll notice that I am sending an HTML email that has a plaintext alternate view. The problem that occurs is that the message gets generated like so: ``` ----boundary_0_f09cf3de-0b0f-45cf-960c-47ec45675f7e Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable This is HTML ----boundary_0_f09cf3de-0b0f-45cf-960c-47ec45675f7e Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable This is text ----boundary_0_f09cf3de-0b0f-45cf-960c-47ec45675f7e-- ``` If you look at that content above, you'll see that the HTML part has its content-type as text/plain. After digging through the System.Net.Mail.MailMessage class with JustDecompile, I have found the issue: in the lines following the elseif ``` else if (this.AlternateViews.Count != 0 || this.Attachments.Count <= 0) ``` there is this line: ``` this.bodyView = AlternateView.CreateAlternateViewFromString(this.body, this.bodyEncoding, null); ``` You'll notice that null is passed in as the last parameter. This is the error. ""text/html"" should be passed in if IsBodyHtml is set to true and, otherwise, ""text/plain"" should be passed in. Can you please fix this bug? Thanks! " 4981 area-System.Security Respond to PR code review comments for ported library System.Security.AccessControl @GiriSr as the owner of the System.Security.AcessControl library can you please have a look through the code review comments provided in https://github.com/dotnet/corefx/pull/4977 and address them appropriately. 4984 area-System.Linq Reduce methods in UnaryExpression and BinaryExpression don't honor mutable struct semantics "Found while working on extended expression tree support for C#: ``` csharp // Prints 5 { var s = new S(); s.X += 5; Console.WriteLine(s.X); } // Prints 0 { var s = Expression.Parameter(typeof(S), ""s""); var x = Expression.Field(s, ""X""); var e = Expression.Lambda( Expression.Block( new[] { s }, Expression.Assign(s, Expression.New(typeof(S))), Expression.AddAssign(x, Expression.Constant(5)), Expression.Call(typeof(Console).GetMethod(""WriteLine"", new[] { typeof(int) }), x) ) ); var f = e.Compile(); f(); } ``` where ``` csharp struct S { public int X; } ``` The culprit is in `ReduceMember` and `ReduceIndex` in `UnaryExpression` and `BinaryExpression` where the receiver of the LHS is copied to a temporary. Those should really capture a `ref` to the value rather than making a copy of the value. Unfortunately, blocks don't support `ByRef` variables (if they would escape the stack frame, things would go terribly wrong of course), so options are: - do nothing and consider this behavior to be expression-specific; extension nodes for languages like C# and VB need to deal with it themselves; - make the copying behavior for receivers less aggressive; if the target is classified as a variable, the copy can be avoided (also the case of accessing a field with a mutable struct); - use a write-back approach (not desirable knowing that there are perfectly suited IL instructions to deal with reference indirection for loads and stores); - support ByRef variables in blocks which would need escape analysis in the lambda compiler to ensure verifiable code gets emitted. Obviously, any change here would be considered a breaking change. Nonetheless, this is an interesting behavior that can cause issues when layering language-specific extension nodes on top of the existing API. " 4986 area-System.Security Investigate adding common Linux crypto algorithms Most of the crypto algorithms that .NET supports on Windows are now included in CoreFX. However, there are a number of algorithms in common use on Linux that .NET doesn't support. We should investigate if there are some from that set that we should support for better integration with other Linux components. That would include assessing the current security of the algorithms. This would likely also require finding a way to have them work on Windows (and other OSes). Some possibilities include: - BCrypt hash algorithm - Blowfish (possibly only for BCrypt) - TwoFish - ThreeFish - GPG 4988 area-System.Net CurlHandler Fix for request uri during redirect CurlHandler is fixed to set the Response.RequestMessage.RequestUri to the redirected uri. Fixes #4945 4989 area-System.Net Provide a way for developers to self-instantiate a server for networking API tests Most of the tests for networking APIs (e.g. System.Net.Sockets, System.Net.Http, etc.) depend on a setup where the client machine exchanges data with a remote server (since loopback to same host introduces unsolicited optimizations). In order to allow developers to test their PR locally, it would be great to have a script that sets up a server on their machine with a consistent set of configurations, features and settings. The developer can then run the suite of tests against this server to validate their PR. Today, tests run the tests against an Azure server. This issue tracks the creation and publishing of a script for setting up a local server. 4991 area-System.IO System.IO.Compression: Path validation of zip entries is done based on current OS "When reading a Zip file, calls are made to Path validation that check invalid characters based on the current OS. This brings about ArgumentException errors with the message ""Illegal characters in path."" Example repro: - Linux commands: - touch ""ab"" - zip newzip.zip ""ab"" - copy newzip.zip to Windows - Windows console app: ``` using System; using System.Diagnostics; using System.IO; using System.IO.Compression; class Program { static void Main() { using (ZipArchive archive = new ZipArchive(new FileStream(""newzip.zip"", FileMode.Open), ZipArchiveMode.Read)) { foreach (var entry in archive.Entries) { } } } } ``` Result: ``` Unhandled Exception: System.ArgumentException: Illegal characters in path. arameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path, Boolean checkAdditional) at System.IO.Path.GetFileName(String path) at System.IO.Compression.ZipHelper.EndsWithDirChar(String test) at System.IO.Compression.ZipArchiveEntry.set_FullName(String value) at System.IO.Compression.ZipArchiveEntry..ctor(ZipArchive archive, ZipCentralDirectoryFileHeader cd) at System.IO.Compression.ZipArchive.ReadCentralDirectory() at System.IO.Compression.ZipArchive.get_Entries() at Program.Main() ``` We should at least throw a more useful error message like ""Zip file contains files with invalid characters in the path names"". We should also consider modifying the checks to do path validation based on the zip's source OS instead of the current OS but will need to be careful to think about the ramifications of returning paths from Name and FullName that are invalid on the current system. @stephentoub @justinvp " 4992 area-System.IO System.IO.Compression: Add tests to ZipArchive for zips with invalid file names There are currently no tests for zip archives that contain files with invalid names. We should add these tests and the corresponding zips. The tests should cover zips that are created on Windows as well as those created on Unix since names that are valid on one will be invalid on the other. Should be done regardless of the outcome of #4991, though does depend on it. 4994 area-System.IO System.IO.Compression : Consider protection against zip bombs As folks tend to use the built in classes for random zipping and unzipping they are vulnerable to zip bombs. Consider adding a way to protect against this. Typically this involves decompressing in a separate process which is time limited, or examining the file entries looking for nested compressed files. 4997 area-System.Reflection System.Reflection.Assembly contract contains internal constructor causing friction for testing The contract for `System.Reflection.Assembly` contains a internal parameter-less constructor, although most implementations (all as far as I can see) have it protected. The internal constructor blocks compiling a type that derives from Assembly, which would be useful thing to create for testing purposes. This forces you to take different testing strategies depending on whether the tests targets .NET Core (you have to use Moq) or desktop .NET (then you can't use Moq because of `ISerializable` but you can easily create a test double that derives from Assembly). The internal constructor in the contract may very well be intentional and I think this is a very advanced scenario, but I wanted to raise it mainly because: 1. It would be nice if you could use a uniform and simple testing strategy for both .NET Core and desktop .NET. 2. The compilation error is very annoying and obscure: It is even hard to understand what is going on by looking at the source code of the implementation. As far I am aware you have to reverse engineer the ref assembly to see the internal constructor. 3. This might actually be a leftover. See https://github.com/aspnet/EntityFramework/pull/4084 where we hit this. 4998 area-System.Threading Address PR code review feedback for ported System.Threading.AccessControl @GiriSr as the owner of the System.Threading.AccessControl library can you please have a look through the code review comments provided in https://github.com/dotnet/corefx/pull/4996 and address them appropriately. 4999 area-System.IO Fixed OS tag in ZipArchive header When writing, the OS tag in the header of a ZipArchive CentralDirectoryHeader was being set to 0 (Windows) regardless of platform. When reading, the os tag was being ignored. I added logic to set/get this tag properly and also modified the ArchiveEntry Name getter to parse the path based on the source OS instead of on the running OS. This will break anyone that was uzing the Name property of ZipArchiveEntries that had paths containing the backslash character within a ZipArchive that was compressed on a Unix machine but decompressed on a Windows machine. resolves #1904. Related to #4991 @stephentoub @justinvp @mellinoe 5001 area-System.Net Fix WinHttpHandler response handling for manual cookie parsing WinHttpHandler was losing 'Set-Cookie' response headers during auto redirection handling when the handler was in 'manual cookie' mode. I.e. `CookieUsePolicy.UseSpecifiedCookieContainer`. This is the only mode that HttpClientHandler uses. The 'Set-Cookie' headers were currently only parsed out when a final HTTP response happened. This meant that 'Set-Cookie' headers present in interim 3xx redirection responses as well as interim 401, 407 auth responses would not be stored into the CookieContainer. Hence, those same cookies could not be sent back to the server when needed. The fix is to make sure we parse out the 'Set-Cookie' headers whenever we get an HTTP response back from WinHTTP. As part of this fix, I re-factored out the cookie handling code into a separate class. I also added specific WinHttpHandler tests for the two different cookie modes as well as a HttpClientHandler test to validate cross-platform (i.e. CurlHandler). Fixes #4960 5002 area-System.Net Corefx test hang from System.Net.Utilities.Functional.Tests Configuration: Debug CoreCLR runtime: coreclr.dll, corerun.exe and mscorlib.dll CoreFX assemblies and CoreFX tests: release Linux environment: Ubuntu 14.04 LTS on Hyper-V The following test doesn't finish with **one virtual processor** on Hyper-V. ./corerun xunit.console.netcore.exe System.Net.Utilities.Functional.Tests.dll -xml testResults.xml -notrait category=failing -notrait category=OuterLoop -notrait category=nonlinuxtests -notrait Benchmark=true **\* GDB stack traces for all threads *** [thread_backtrace.txt](https://github.com/dotnet/corefx/files/63367/thread_backtrace.txt) **\* SOS clr stack *** (lldb) sos ClrStack OS Thread Id: 0x1762 (1) Child SP IP Call Site 00007FFFFFFFD028 00007FFFF79C4414 [HelperMethodFrame_1OBJ: 00007fffffffd028] System.Threading.WaitHandle.WaitOneNative(System.Runtime.InteropServices.SafeHandle, UInt32, Boolean, Boolean) 00007FFFFFFFD160 00007FFF7C4F9F32 System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle, Int64, Boolean, Boolean) 00007FFFFFFFD180 00007FFF7C4F9DDE System.Threading.WaitHandle.WaitOne(Int32, Boolean) 00007FFFFFFFD1B0 00007FFF7C31C45E Xunit.ConsoleClient.Program.ExecuteAssembly(System.Object, System.String, Xunit.XunitProjectAssembly, Boolean, Boolean, Boolean, Boolean, System.Nullable`1, System.Nullable`1, Xunit.XunitFilters) 00007FFFFFFFD2B0 00007FFF7C31521F Xunit.ConsoleClient.Program.RunProject(System.String, Xunit.XunitProject, Boolean, Boolean, Boolean, System.Nullable`1, System.Nullable`1, System.Nullable`1) 00007FFFFFFFD420 00007FFF7C2FA889 Xunit.ConsoleClient.Program.Main(System.String[]) 00007FFFFFFFD8D0 00007FFFF5FB21DF [GCFrame: 00007fffffffd8d0] 00007FFFFFFFDF80 00007FFFF5FB21DF [GCFrame: 00007fffffffdf80] **\* SOS threads *** (lldb) sos Threads ThreadCount: 9 UnstartedThread: 0 BackgroundThread: 4 PendingThread: 0 DeadThread: 4 Hosted Runtime: no Lock ID OSID ThreadOBJ State GC Mode GC Alloc Context Domain Count Apt Exception 1 1 1762 00000000006648F0 2020020 Preemptive 00007FFF5C1C03A0:00007FFF5C1C1FD0 0000000000645A80 0 Ukn 7 2 176b 0000000000688D70 21220 Preemptive 0000000000000000:0000000000000000 0000000000645A80 0 Ukn (Finalizer) XXXX 3 0 0000000000864760 31820 Preemptive 0000000000000000:0000000000000000 0000000000645A80 0 Ukn XXXX 4 0 00007FFF5000EFC0 31820 Preemptive 0000000000000000:0000000000000000 0000000000645A80 0 Ukn 11 5 176f 0000000000890AF0 2021220 Preemptive 00007FFF5C1B5E68:00007FFF5C1B5FD0 0000000000645A80 0 Ukn 12 6 1770 0000000000943B50 2021220 Preemptive 00007FFF5C210200:00007FFF5C212040 0000000000645A80 0 Ukn XXXX 7 0 00007FFF5007D840 1031820 Preemptive 0000000000000000:0000000000000000 0000000000645A80 0 Ukn (Threadpool Worker) XXXX 8 0 00007FFF48015D20 1031820 Preemptive 0000000000000000:0000000000000000 0000000000645A80 0 Ukn (Threadpool Worker) 16 9 1775 00007FFF3C000F50 1020220 Preemptive 0000000000000000:0000000000000000 0000000000645A80 0 Ukn (Threadpool Worker) 5003 area-System.Security WindowsIdentity.Name is missing from the System.Security.Principal.Windows contract The test code at https://github.com/dotnet/corefx/blob/master/src/System.Security.Principal.Windows/tests/WindowsIdentityTests.cs References `WindowsIdentity.Name`: `Assert.Throws(() => identity.Name);` which is not present in the contract defined within the respective `ref` folder. This is currently working because the test code references the `src` project. It's unclear what the right fix is: add the `Name` property to the contract or remove the test reference. @AtsushiKan @ericstj @nguerrera @weshaggard @bartonjs PTAL (usernames determined based on GitHub history for src) 5008 area-System.Security Respond to PR code review comments for ported library System.Security.Crypto.Algorithms @bartonjs as the owner of the System.Security.Crypto.Algorithms library can you please have a look through the code review comments provided in https://github.com/dotnet/corefx/pull/5005 and address them appropriately. Edit: For clarity, the issues are - [ ] See if the TFS Desktop-targetting build can succeed when using Array.Empty(). - [ ] The desktop facade is facading against net46, but 4.6.1 is the minimum compatible version. 5009 area-System.Reflection Implements PE Debug Directory reader. @nguerrera Please review. 5014 area-System.Net Bug in HttpContent.ReadAsStringAsync() if the content-type charset is surrounded with quotes (which is allowed by http spec) "I have just found a small bug in System.Net.HttpContent.ReadAsStringAsync(). This method tries to get the encoding from the content-type HTTP header. Unfortunately the HTTP spec allows to surround the charset value with quotes as in the following example: application/json; charset=""utf-8"" You can find the spec here: https://tools.ietf.org/html/rfc2616#section-3.6 Of course Encoding.GetEncoding(""\""utf-8\"""") throws an ArgumentException because of the surrounding quotes which leads to an InvalidOperationException in System.Net.HttpContent.ReadAsStringAsync(). This is the corresponding line: https://github.com/dotnet/corefx/blob/master/src/System.Net.Http/src/System/Net/Http/HttpContent.cs#L204 " 5015 area-System.IO File.GetFileAttributes doesn't get symbolic link data on Unix Directories which are symbolic links or junctions (made with mklink /d or /j) on Windows have the FileAttributes.ReparsePoint flag set in their attributes. On *nix platforms, though, symbolic links (made with ln -s) have no special attributes set. A better user experience would be to use the ReparsePoint flag on such file or, possibly, to add new Unix-specific flags if the ReparsePoint one is inapplicable for some reason. 5017 area-System.Diagnostics Respond to PR code review comments for ported library System.Diagnostics.StackTrace @noahfalk as the owner of the System.Diagnostics.StackTrace library can you please have a look through the code review comments provided in https://github.com/dotnet/corefx/pull/4972 and address them appropriately. 5018 area-System.Reflection A few small public API changes To be used by metadata/PE writer. 5019 area-System.Net Update Http and WebSocket test servers Switch to a different (more scalable) Azure-based test server for Http and WebSocket.tests. 5021 area-Infrastructure Use .NetCore MSBuild to build corefx repo in Linux We want to remove the dependency of using Mono MSBuild, so we want to use the .NetCore version of MSBuild instead. There is still some work that need to be done to actually be able to restore .NetCore MSBuild, so the idea is to use what we have now to try to build corefx repo and start calling out the issues we find to the MSBuild so that we can get those issues addressed. For now, we are only going to use this version of MSBuild in Linux builds, since it is still not yet in the scope to support building in parallel, so that would slow the windows builds by a lot. Once/If that is enabled, we can change to use .NetCore MSBuild in Windows as well. 5022 area-System.Globalization Compare string with IgnoreCase/Kana in ja-JP character failed in unix "There seems to be a bug when ignoring Kana Character in ja-JP locale. **Repro** ``` private static CultureInfo[] _cultureInfo = { new CultureInfo(""ar-SA""), // Arabic - Saudi Arabia new CultureInfo(""ja-JP""), // Japanese - Japan new CultureInfo(""de-DE""), // German - Germany new CultureInfo(""hi-IN""), // Hindi - India new CultureInfo(""tr-TR""), // Turkish - Turkey new CultureInfo(""th-TH""), // Thai - Thailand new CultureInfo(""el-GR""), // Greek - Greece new CultureInfo(""ru-RU""), // Russian - Russia new CultureInfo(""he-IL""), // Hebrew - Israel new CultureInfo(""cs-CZ""), // Czech - Czech Republic new CultureInfo(""fr-CH""), // French - Switzerland new CultureInfo(""en-US"") // English - United States }; private static string[,] _specialMatchingString = new string[4, 2] {{""Lorem ipsum dolor sit amet"", ""Lorem ipsum dolor sit amet""}, {""かたかな"", ""カタカナ""}, {""ファズ・ギター"", ""ファズ・ギター""}, {""engine"", ""eNGine""}}; [Fact] public void CultureComparisonTests() { foreach (var cultureInfo in _cultureInfo) { for (var testNo = 0; testNo < _specialMatchingString.GetLength(0); testNo++) { CultureComparisonTests(cultureInfo.Name, _specialMatchingString[testNo, 0], _specialMatchingString[testNo, 1]); } } } public void CultureComparisonTests(string localeName, string str1, string str2) { Console.WriteLine(""CultureComparisonTests for {0} : {1} : {2}"", localeName, str1, str2); var options = CompareOptions.IgnoreCase | CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth; var comparisonInfo = new CultureInfo(localeName).CompareInfo; var result = comparisonInfo.Compare(str1, 0, str1.Length, str2, 0, str2.Length, options); Assert.True(result == 0, String.Format(""{0} : {1} comparison should ignore case, kana type and width"", str1, str2)); } ``` **Summary** Test this in UNIX ``` CultureComparisonTests(""ja-JP"", ""ファズ・ギター"" , ""ファズ・ギター""); ``` Expected to be true for comparison with ignore Kana and ignore case character This only failed in - Unix - ja-JP locale - Probably cause by Kana Case character ""ファズ・ギター"" VS ""ファズ・ギター"" " 5024 area-System.Data Define the Schema Objects for the DbConnection getSchema Ref issue https://github.com/dotnet/corefx/issues/3423 The Database schema being exposed by the DbConnection.GetSchema() needs to return the schema of the database. The API should expose strongly typed objects. Issue #3423 is an effort to design the DbColumn representing the Column schema which will be one of the items of the collection of Base types which the Database schema should expose. This issue is for the discussion of the Types for the schema and refining the types. I will add more details here as we come up with the design. The Base types will be added to System.Data.Common and an API will be added to the DbConnection exposing the top level schema object. 5034 area-System.Net Fix race condition in SslStream authentication This fixes the race condition we were seeing in test case execution .For which the issue is #4317 . the basic cause for it was - _nestedAuth was getting set at 2 places still at the later stage it was checking if its not already checked , but there can be cases where (due to the delay in the execution of another threads) at both the places it sets _nestedAuth to 0 and hence results into the unwanted exception. Refer issue #4317 for more details. 5036 area-System.Net Improve WinHttpHandler use of notification callbacks WinHttpHandler currently uses the WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS when setting up the status callback function. This isn't strictly necessary. However, some of the notification flags are required such as WINHTTP_CALLBACK_FLAG_REDIRECT, WINHTTP_CALLBACK_FLAG_READ_COMPLETE and others. This issue will track optimizing the set of notification required as well as providing a way to turn them all on for debugging/logging purposes. 5037 area-System.Net System.Net.Security.Unit.Tests: Test failures with System.NotImplementedException : The method or operation is not implemented. "**Configuration** Debug CoreCLR runtime: coreclr.dll, corerun.exe and mscorlib.dll CoreFX assemblies and CoreFX tests: release **Linux environment** Ubuntu 14.04 LTS on Hyper-V Run .run-test.sh **with sudo** to avoid a hang issue in #5025 **Test names** ``` ./bin/tests/Linux.AnyCPU.Release/System.Net.Security.Unit.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.Net.Security.Unit.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.Net.Security.Unit.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.Net.Security.Unit.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.Net.Security.Unit.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.Net.Security.Unit.Tests/dnxcore50/testResults.xml: ``` **Stack trace** ``` d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)]]> ``` " 5039 area-System.IO System.IO.FileSystem.Tests: Test failures with Assert.Throws() Failure\nExpected: typeof(System.UnauthorizedAccessException)\nActual: (No exception was thrown) "**Configuration** Debug CoreCLR runtime: coreclr.dll, corerun.exe and mscorlib.dll CoreFX assemblies and CoreFX tests: release **Linux environment** Ubuntu 14.04 LTS on Hyper-V Run .run-test.sh **with sudo** to avoid a hang issue in #5025 **Test names** ``` ./bin/tests/Linux.AnyCPU.Release/System.IO.FileSystem.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.IO.FileSystem.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.IO.FileSystem.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.IO.FileSystem.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.IO.FileSystem.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.IO.FileSystem.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.IO.FileSystem.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.IO.FileSystem.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.IO.FileSystem.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.IO.FileSystem.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.IO.FileSystem.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.IO.FileSystem.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.IO.FileSystem.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.IO.FileSystem.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.IO.FileSystem.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.IO.FileSystem.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.IO.FileSystem.Tests/dnxcore50/testResults.xml: ``` **Stack trace** ``` ``` " 5040 area-Infrastructure String resources need to be configurable on a per-configuration basis "Right now, string resources are included by default in an assembly if there exists a ""Strings.resx"" file in a ""Resources"" subdirectory under the csproj. All of the string resources in that file are included in the assembly, even if they are not used at all, or if only a subset are used. You can ""opt-out"" in a sense by changing the directory that the resource targets look in for the ""Strings.resx"" file (the `ResourcesSourceOutputDirectory` Property). This has worked fine for our projects with a single configuration, or with only a few similar configurations. However, this can cause significant bloat in assemblies which don't need those resources. For example, full-facade projects are generally around 5-6 KB in total size. With unnecessary string resources included, they can easily bloat to 25-30 KB each. To a lesser extent, configurations which only need a subset of the resources are also bloated by having extra strings in them. In our internal build, I recall we used text files that allowed condition inclusion/exclusion of certain strings, based on the project's DefineConstants. We might want to look into something similar to that in order to accomodate this. " 5041 area-System.IO System.IO.MemoryMappedFiles.Tests: Test failures with Assert.Throws() Failure\nExpected: typeof(System.UnauthorizedAccessException)\nActual: (No exception was thrown "The error message is the same as #5039 but the failures are from a different test set. **Configuration** Debug CoreCLR runtime: coreclr.dll, corerun.exe and mscorlib.dll CoreFX assemblies and CoreFX tests: release **Linux environment** Ubuntu 14.04 LTS on Hyper-V Run run-test.sh **with sudo** to avoid a hang issue reported in #5025 **Test names** ``` ./bin/tests/Linux.AnyCPU.Release/System.IO.MemoryMappedFiles.Tests/dnxcore50/testResults.xml: ./bin/tests/Linux.AnyCPU.Release/System.IO.MemoryMappedFiles.Tests/dnxcore50/testResults.xml: ``` **Stack trace** ``` ``` " 5042 area-Infrastructure TargetingPackReference items show up in VS Solution Explorer This has no real negative effect, it's just kind of annoying. We should consider putting the `false` metadata on the includes, which hides them from the solution explorer. 5044 area-System.Net Discussion: advantage to using sync over async for I/O? "Continuation of discussion from #4868 > > Without AuthenticateAsClient(), Open() must resort to calling an async method internally, which means that it's no longer purely synchronous... > > The code above is as synchronous as the old implementation. When you call synchronous I/O on something like NetworkStream, internally, the thread will be waiting on an event for the operation to finish. Even more broadly: in reality there is no such thing as synchronous I/O in Windows. Thanks for this detail. I was aware that at least in some cases sync methods actually perform async operations under the hood. However, coming from the Unix universe, it doesn't seem to hold that there's ""no such thing as synchronous I/O"" at least at the kernel level: I would expect .NET I/O operations to map to simple sync I/O system calls such as write and read. Also, the implementation details underlying async operations across platforms may make sync I/O more attractive at least in some cases (i.e. is async I/O implemented efficiently on Linux with mono, or with coreclr for that matter?). I admit I'm just asking questions, I don't have enough solid knowledge here. Regardless of these questions, and I said back in #4868, there's something odd about removing such a specific sync API (SslStream.AuthenticateAsClient) for such a general ""sync I/O is bad"" argument, without touching any other sync API. In other words, I'd expect either all sync APIs to stay for backwards compatibility or for a more sweeping removal of sync I/O APIs. " 5045 area-System.Net HttpClientHandler is not honoring UseDefaultCredentials set to false We're trying to enable [WebListener](https://github.com/aspnet/WebListener) tests on CoreCLR, however we're running into some issues on authentication tests. We have tests that check that an anonymous request to a server requiring authentication gets a 401 status back along with challenges. The request is made using an `HttpClient` taking an `HttpClientHandler` with `UseDefaultCredentials` set to `false`. On desktop CLR, we only see one HTTP request/response pair in the network: ![image](https://cloud.githubusercontent.com/assets/924164/11881634/cc350af6-a4bc-11e5-83b4-9be7f4bc9861.png) Which is expected for the test to pass. On CoreCLR however, we're seeing the client trying to negotiate authentication even when `UseDefaultCredentials` is set to `false`: ![image](https://cloud.githubusercontent.com/assets/924164/11881643/e1365590-a4bc-11e5-9b72-805c7d629375.png) Here's what we see when setting `UseDefaultCredentials` to `true`: ![image](https://cloud.githubusercontent.com/assets/924164/11881665/f63bcd30-a4bc-11e5-9f83-617a440601fb.png) Which is essentially the same as when it's set to `false`, which means the `UseDefaultCredentials` is not being honored in requests. Our tests are failing because they don't expect authentication to be successful in those requests. cc @Tratcher 5048 area-System.Net Disabling tests failing on *NIX. Fix #5037 Temporarily disabling UTs from running on *NIX. Fix #5037 5049 area-System.Net Enable custom socket end points and allow Unix Domain Sockets With code separation into System.Net.Primitives and System.Net.Sockets, EndPoint extensibility was broken because System.Net.Sockets started to use its own copy of SocketAddress and didn't respect SocketAddress that a custom EndPoint may provide. The fix is to allow conversion between SocketAddress from System.Net.Primitives and System.Net.Sockets. This way custom implementations of EndPoint will be able to provide their own SocketAddress and it'll be honored by the Socket APIs. The fix also allows sockets to use 'Unspecified' protocol type which is needed for Unix Domain Sockets. There are several changes in socket test server to allow tests pass protocol type. Add new unit tests that use end point extensibility to implement Unix Domain Sockets. Fix #4777 5050 area-System.Runtime System.Runtime.Extensions should be 4.1.0.0 There were API changes since the last stable version so we need to update minor version. 5051 area-System.Net Enable custom socket end points and allow Unix Domain Sockets With code separation into System.Net.Primitives and System.Net.Sockets, EndPoint extensibility was broken because System.Net.Sockets started to use its own copy of SocketAddress and didn't respect SocketAddress that a custom EndPoint may provide. The fix is to allow conversion between SocketAddress from System.Net.Primitives and System.Net.Sockets. This way custom implementations of EndPoint will be able to provide their own SocketAddress and it'll be honored by the Socket APIs. The fix also allows sockets to use 'Unspecified' protocol type which is needed for Unix Domain Sockets. There are several changes in socket test server to allow tests pass protocol type. Add new unit tests that use end point extensibility to implement Unix Domain Sockets. Fix #4777 5055 area-System.Collections Clean up and Format System.Collections There's quite a few things in this project that should be cleaned up, not limited to: - Remove/sort usings - Use C# alias over type name (`Object` -> `object`, `Int32` -> `int`, etc.) - Non-compliant field names - We need to be careful about renaming these, we've hit issues in the past where Debugger components were relying on the exact names of these fields to not change. - General block/braces formatting 5058 area-System.Data Timeout Error on Conn.Open() for TDS Version 7.3 and below Timeout Error on Conn.Open() for TDS Version 7.3 and below or SQL Server 2008 and below # Here error message ``` System.Data.SqlClient.SqlException : Connection Timeout Expired. The timeout period elapsed during the post-login phase. The connection could have timed out while waiting for server to complete the login process and respond; Or it could have timed out while attempting to create multiple active connections. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=33; handshake=433; [Login] initialization=0; authentication=0; [Post-Login] complete=29018; ---- System.ComponentModel.Win32Exception : Unknown error 258 Stack Trace: at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParserStateObject.ThrowExceptionAndWarning(Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error) at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync() at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket() at System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer() at System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, TimeoutTimer timeout) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at Suites.Data.Test.ExceptionTest.TestConnectionString(String connstr) at Suites.Data.Test.ExceptionTest.TestConnectionString() ----- Inner Stack Trace ----- ``` 5060 area-System.Data Invalid Server Name Exception will return Name Piped error message in Windows VS TCP in UNIX "Repro : ``` static void Main(string[] args) { try { TestConnectionString(""Data Source=NotAServer;Initial Catalog=Northwind;User ID=xx;Password=xxx;Connect Timeout=30""); } catch (Exception ex) { Console.WriteLine(""Exception : "" + ex.Message); } } public void TestConnectionString(string connstr) { using (var conn = new SqlConnection(connstr)) { Console.WriteLine(""Conn Open..."" + connstr); conn.Open(); Console.WriteLine(""create command...""); var cmd = new SqlCommand(""select @@Version"", conn); Console.WriteLine(""Execute reader...""); using (var reader = cmd.ExecuteReader()) { Console.WriteLine(""read...""); while (reader.Read()) { Console.WriteLine(reader.GetString(0)); } } } } ``` **_EXCEPTION**_ A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: **Named Pipes**\* Provider, error: 40 - Could not open a connection to SQL Server) But in unix it will return **.....TCP Provider ...***, **_Expected**_ We just need to make consistent for this. whether we should return Named Pipes / TCP if there is invalid server name. Or **_This can be the expected behavior**_ as Unix only support TCP provider at this moment, but Windows try to connect this with TCP first and Namepipe, and since Name pipe was the last provider than Name pipe was picked up. " 5062 area-System.Net Fixing System.Net.Security.Unit.Tests failure Fxing issue #5037 Tested on both Windows and Linux. 5065 area-System.Net "System.Net.Http.HttpClient SendAsync throws ""The requested header was not found"" when parsing 307 HTTP response from server" "Hi I am actually having ta weird issue with System.Net.Http.HttpRequestMessage when trying to add a custom header. The header is added and yet SendAsync throws an exception about ""header was not found""! Here in the team, we have spent 4 days in vain to get this to work. Any help would be appreciated. private static async Task MakeRequestExample(string url) { try { HttpMethod httpMethod = HttpMethod.Get; ``` using (HttpClient httpClient = new HttpClient()) { using (HttpRequestMessage httpRequestMessage = new HttpRequestMessage(httpMethod, url)) { //httpRequestMessage.Headers.Accept.TryParseAdd(""text/plain""); <-- not sure about this bool added = httpRequestMessage.Headers.TryAddWithoutValidation(""Client-Id"", ""314""); // added will be true and when I debug this I actually find the header using (HttpResponseMessage httpResponse = await httpClient.SendAsync(httpRequestMessage)) { switch (httpResponse.StatusCode) { case HttpStatusCode.OK: // logic 1 break; case HttpStatusCode.RedirectKeepVerb: case HttpStatusCode.NotFound: case HttpStatusCode.Moved: case HttpStatusCode.BadRequest: case HttpStatusCode.InternalServerError: // logic 2 break; default: // logic 3 break; } } } } } catch (Exception e) { Debug.WriteLine(""MakeRequest - Exception message: "" + e.Message); Debug.WriteLine(""MakeRequest - Exception stack trace: "" + e.StackTrace); Debug.WriteLine(""MakeRequest - Exception HResult: "" + e.HResult); Debug.WriteLine(""MakeRequest - Exception inner ex: "" + e.InnerException); } } ``` The exception: Exception message: An error occurred while sending the request. Exception stack trace: at System.Net.Http.HttpClientHandler.d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at Proj.Api.d__7.MoveNext() Proj.Api=> Exception HResult: -2147012746 Proj.Api=> Exception inner ex: System.Runtime.InteropServices.COMException (0x80072F76): The text associated with this error code could not be found. The requested header was not found at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.Http.HttpHandlerToFilter.d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.Http.HttpClientHandler.d__1.MoveNext() " 5068 area-System.Runtime unsafe struct with fixed byte array runtime error If i create an unsafe struct with an explicit layout and add a fixed byte array to access the data in a lib targeting dotnet5.4, and then try to access that struct in a unit test it compiles ok, but I get a runtime error. The unit test lib target dnxcore50 as per the instructions on the xunit site. If i try and access via a method in a third lib also targeting dotnet5.4 it works fine. I have a small repo containing a reproduction of the issue here https://github.com/jageall/DNXRuntimeIssueWithFIxedByteArray if this behaviour is by design I would expect a compile time error, not a runtime error 5072 area-System.Diagnostics Code cleanup related to System.Diagnostics.Tracing porting @vancem @davmason please clean up, format and address reviews for code ported as a part of https://github.com/dotnet/corefx/pull/5071 5073 area-System.Net HttpClient hangs on 206 Partial Content response until connection is closed by the server "Request: ``` GET / HTTP/1.1 Connection: Keep-Alive Accept-Encoding: gzip, deflate Range: bytes=0-10 Host: localhost:8080 ``` Response: ``` HTTP/1.1 206 Partial Content Content-Length: 100 Content-Length: 11 Content-Range: bytes 0-10/100 Accept-Ranges: bytes <...content...> ``` Code: ``` var request = new HttpRequestMessage(new HttpMethod(""GET""), ""http://localhost:8080""); request.Headers.Add(""Range"", ""bytes=0-10""); var response = await httpClient.SendAsync(request); ``` Expected: `response` should be available as soon as 11 bytes are read by `HttpClient`. **This is the behavior on desktop CLR**. Actual: Execution hangs on `SendAsync`. If I set `httpCompletionOption` to `ResponseHeadersRead`, it hangs later when I try to read `response.Content`. If the connection is closed by the server, `SendAsync` completes and I can read `response.Content`. I think it is waiting for the 100 bytes indicated by the first `Content-Length` header and ignoring the latter value (11). " 5077 area-System.Net SslStream ReadAsync and WriteAsync never continues. "Calling ""await ReadAsync"" then calling ""await WriteAsync"" (while ReadAsync is still waiting) results in neither continuing ever. I tested the exact same app with .NET Framework libraries and it works fine. Using Windows 10 PRO x64, with DNX RC1 runtime. " 5078 area-System.Linq Add instance factory overloads to Enumerable.Repeat "Hi, There are `Enumerable.Range` and `Enumerable.Repeat` which are awesome, however, when using `Repeat` with a reference type, it's the reference to the same object being repeated, hence, changing a property of the repeated object will reflect in that property being changed for all indexes. The solution would be to create another overload of `Enumerable.Repeat` that is either parameterless or ones that accepts `Func` or `Func` that uses as a factory of the generated element, where the latter overload (with the `int` argument provides the index of the current element to be generated. ``` //will initialize an array of 40 instantiated StringBuilder objects. var builders = Enumerable.Repeat(40).ToArray(); //will initialize an array of 40 instantiated StringBuilder objects using a custom constructor var builders = Enumerable.Repeat(i => new StringBuilder($""Line {i} says:"")); ``` Another overload I'd want to see is for `Enumberable.Range`, is omitting the `start` parameter so that it's set to `0`, and only the `count` is provided. Merely a syntactic sugar. " 5079 area-System.Text Proposal: System.Text.RegularExpressions.RegexRunner to become a public type Today the RegexRunner class is internal in CoreFX, because the Regex.CompileToAssembly functionality (the historically main entry point) that generates code inheriting from this class is not available in CoreFX. The CompileToAssembly API is not the only way to create such assemblies though, one could write code that inherits from this class and all the functionality required by RegexRunner to function properly is available in CoreFX and is used by other internal classes. The proposal is to make the RegexRunner class public, allowing scenarios where people are willing to generate code using a tool other than Regex.CompileToAssembly that targets CoreFX to be able to do so. In fact, it is also entirely possible that a developer could use Regex.CompileToAssembly in a build step (where they may have access to the full framework) and generate an assembly that initially (i.e. the output of CompileToAssembly) compiles against mscorlib, but further processing could result in the assembly being compiled against the System.Runtime contract assemblies. This brings a well-tested Regex interpreter implementation, the same one that is used in all other scenarios except precompilation to this scenario as well. The precompilation scenario is compelling (to us) for working set and startup performance reasons. 5080 area-System.Net CurlHandler fix for cookie handling CurlHandler has been handling cookies only from the final HTTP response. The cookies sent during the intermediate http responses (during 3XX redirection as well as interim 401, 407 responses) were getting ignored. This fix ensures that the cookies from all the responses are handled. 5085 area-System.IO Fixed System.IO.Compression FileData DST bug The FileData class for testing in System.IO.Compression was initializing DateTimes using Ticks and an unspecified DateTimeKind that resulted in some times being off by an hour when the time was during Daylight Savings Time. I've fixed these times and reformatted them to use UTC times so testing is timezone independent. I also reformatted some tests to use Theories. resolves #1326 @stephentoub @justinvp 5086 area-System.IO Add tests for System.IO.BufferedStream Once BufferedStream gets mirrored over from TFS, tests need to be added for it. Depends on #4456 5087 area-System.Collections Specialized Collections Tests Improve code coverage to 100% for System.Collections.Specialized Remove dead code 5088 area-System.Linq System.Linq.Expression rd.xml file leads to spurious warnings Start a new UWP and add this to it: ``` System.Linq.Expressions.Expression> e = () => 1234; ``` When building with .NET Native you'll now get two build warnings because the rd.xml file in this assembly has some wonky bits. This keeps folks from being warning clean and is actually pretty distracting for folks as it provides a lovely red herring for their other investigations. :-) Here's the warnings I get with VS Update 1: Method 'CreateLambda' within 'System.Linq.Expressions.Expression' could not be found. Method 'ParameterIsAssignable' within 'System.Linq.Expressions.Expression' could not be found. @VSadov ? 5093 area-System.Net Avoid some array allocations in HttpContent Changes: - `CopyToAsync` avoids creating a huge intermediary array when copying to another stream. - `ReadAsStreamAsync` avoids allocating a new array in .NET 4.6 by using `TryGetBuffer`, which should be invisible to the caller since the returned `MemoryStream` isn't writable. - Fixed associated TODO in `GetDataBuffer`. - Removed an assert for `_bufferedContent.Length` being less than `int.MaxValue` (as the comments themselves say, .NET doesn't support arrays with lengths over that). 5096 area-System.IO System.IO.Compression: Tests for creating ZipArchive with unicode filename failing on Unix When trying to create a ZipArchive from a directory that contains a filename containing unicode characters a FileNotFoundException is thrown. CI failure from #5085: 12:22:45 System.IO.FileNotFoundException : Could not find file '/mnt/j/workspace/dotnet_corefx/ubuntu_debug_tst_prtest/bin/tests/Linux.AnyCPU.Debug/System.IO.Compression.Tests/dnxcore50/ZipTestData/refzipfolders/unicode/������.txt'. Unable to repro on my Ubuntu VM but is failing CI for CentOS and Ubuntu Debug&Release. 5099 area-System.Net System.Net EventSource Logging Adding EventSources to substitute the previous logging model using TraceSources. In this PR 4 event sources are added: -NetEventSource -SocketsEventSource -HttpEventSource -SecurityEventSource Only the event methods for NetEventSource and SocketsEventSource are fully added. HttpEventSource and SecurityEventSource have only a few of the new event methods implemented. Changes in production are done to match this new implementation. (Only changes for events in Sockets are mostly done). 5101 area-System.Net System.Net EventSource Logging Adding EventSources to substitute the previous logging model using TraceSources. In this PR 4 event sources are added: -NetEventSource -SocketsEventSource -HttpEventSource -SecurityEventSource Event methods for NetEventSource, SocketsEventSource and HttpEventSource are fully added. SecurityEventSource has only a few of the new event methods implemented. Changes in production code are done to match this new implementation. (Only changes for events in Sockets, Http are fully done in this iteration). 5102 area-System.Security Unix X500DistinguishedName.Decode throws with an empty RDN value "``` C# var dn = new X500DistinguishedName(""300B3109300706035504031300"".HexToByteArray()); string value = dn.Format(false); Assert.Equal(""CN="", value); ``` Throws on dn.Format(false); ``` System.Security.Cryptography.X509Certificates.Tests.X500DistinguishedNameEncodingTests.EncodeSingleRdn(testCase: SimpleEncoderTestCase { Input = ""CN="" }) [FAIL] System.Security.Cryptography.CryptographicException : Error occurred during a cryptographic operation. Stack Trace: at Interop.Crypto.Asn1StringToManagedString[THandle](THandle asn1String, Func`4 asn1StringPrintEx) at Interop.Crypto.Asn1StringToManagedString(SafeSharedAsn1StringHandle asn1String) at Internal.Cryptography.Pal.X500NameEncoder.X500DistinguishedNameDecode(Byte[] encodedName, Boolean printOid, X500DistinguishedNameFlags flags, Boolean addTrailingDelimieter) at Internal.Cryptography.Pal.OpenSslX509Encoder.X500DistinguishedNameFormat(Byte[] encodedDistinguishedName, Boolean multiLine) at System.Security.Cryptography.X509Certificates.X500DistinguishedName.Format(Boolean multiLine) at System.Security.Cryptography.X509Certificates.Tests.X500DistinguishedNameEncodingTests.ProcessTestCase(SimpleEncoderTestCase testCase, X500DistinguishedName dn) at System.Security.Cryptography.X509Certificates.Tests.X500DistinguishedNameEncodingTests.EncodeSingleRdn(SimpleEncoderTestCase testCase) ``` " 5105 area-Infrastructure Cannot run tests from console if sln previusly was built with VS 2015 CE (log of error in task) "Clone and build coreclr and corefx according to guide, Windows 10, Visual Studio 15 CE. It succeed. When I start investigate code in VS Open System.Collections.sln, build from VS (many many errors in intellisense and so on but Output writes that build succed) Then go to console: ``` cd .\src\System.Collections\tests msbuild /t:Test ``` It fails with: ``` ""d:\net\corefx\src\System.Collections\tests\System.Collections.Tests.csproj"" (target object Build ) (1) -> ""d:\net\corefx\src\System.Collections\src\System.Collections.csproj"" (target object Build;DebugSymbolsProjectOutputGroup ) (2) -> (Целевой объект OpenSourceSign) -> d:\net\corefx\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00137\li b\sign.targets(39,5): error : d:\net\corefx\bin/obj/Windows_NT.AnyCPU.Debug\Sys tem.Collections\System.Collections.dll: PE file is already strong-name signed. [d:\net\corefx\src\System.Collections\src\System.Collections.csproj] ``` But if i build sln from cmd: ``` cd .\src\System.Collections msbuild /t:Clean;Build cd .\tests msbuild /t:Test ``` All is well. What is bad with visual studio and how to match it's behavior with what MSBuild does itself? " 5106 area-System.Numerics Add overload for Vector.CopyTo() that supports pointers At the moment we have only one signature that supports arrays only: ``` csharp public unsafe void CopyTo(T[] destination) ``` But sometimes we have only pointers in code when converting them back to arrays isn't an option. Please add the ability to pass pointers directly to `CopyTo()` method. Something like that would work: ``` csharp public unsafe void CopyTo(void* destination) ``` The issue is related to #3741 5107 area-System.Net CurlHandler fix for cookie handling CurlHandler has been handling cookies only from the final HTTP response. The cookies sent during the intermediate http responses (during 3XX redirection as well as interim 401, 407 responses) were getting ignored. This fix ensures that the cookies from all the responses are handled. 5109 area-System.Console Console stops echoing typed keys after calling ReadKey from background thread and exiting process on Ubuntu Repro application is the ASP.NET benchmarks app at https://github.com/aspnet/benchmarks/tree/dev/src/Benchmarks I'm creating a background thread in order to do non-blocking reads of keys as `Console.KeyAvailable` isn't in .NET Core yet. Once the app exits however (after Ctrl+C) no keystrokes show up in the console. The keystrokes are still being sent to the shell as commands can be executed. Normality is restored after executing `reset`. I attempted to resolve it by changing the `while` loop in the bg thread to return once the `app.Run()` had returned and joining it with the main thread, and while it exits fine, the issue remained. The same app behaves as expected on Windows. Repro steps: 1. Clone https://github.com/aspnet/benchmarks 2. Ensure latest DNX for Core CLR: `dnvm install latest -r coreclr -arch x64 -u` 3. Switch to latest DNX: `dnvm use 1.0.0-rc2-[version installed above] -r coreclr` 4. Navigate to `~/src/Benchmarks` in repo 5. Restore packages: `dnu restore` 6. Run application: `dnx run` 7. Hit the spacebar to see console interaction and output from application background thread works 8. Hit Ctrl+C, application will shutdown 9. Try typing in the console now, no keystrokes are echoed 5114 area-System.Data SqlBulkCopy class lacks option to specify ORDER BY hint Bulk insert into a table with PK is significantly faster if input data is in order (no need to write to tempdb first and run a sort). Need to add the ORDER(...) hint to the tdscommand string. 5116 area-System.Net Can't disable KeepAlive for ClientWebSocket I ported a project from .net 4.5 to Core. Building worked fine, but execution with .net Core doesn't work. First of all setting KeepAliveInterval to -1 is no longer supported and throws an OutOfRangeException. Setting it to any other value (e.g. 0) keeps KeepAlive on. I looked at the ClientWebSocket-Code. I suspect KeepAliveInterval is never used. So currently there is no way to modify KeepAlive behavior. 5118 area-System.Runtime Christmas Analysis of .NET Core Libraries (CoreFX) To demonstrate the capabilities of our analyzer, we regularly perform analysis of open source projects. We had recently checked the CoreFX project. Here is the link to the article about it: http://www.viva64.com/en/b/0365/ Official page of the analyzer: http://www.viva64.com/en/pvs-studio/ If you have any questions, or if you are interested in the evaluation of our static analyzer or in any other source code quality control services that our company provides, please contact us at support@viva64.com. 5120 area-System.Net Fully implement ClientWebSocketOptions for .NET Core Currently, .NET Core has a placeholder implementation for ClientWebSocketOptions. Filing this issue to track the complete implementation. 5126 area-System.Diagnostics Keeping in sync Localization Resources name when using Event Sources. "Event Sources can be localized by specifying the name of the resources file. But that name needs to be hard coded in the attribute of the event source. So, if at some point in time, the name of the resources changes, the event source will not be in sync anymore and a message like: ""Could not find any resources appropriate for the specified culture or the neutral culture. Make sure ""NameOfMyResources.resources"" was correctly embedded or linked into assembly..."" will be the only log that appears in our event source recorder. If in the future, a better way to specify LocalizationResources that does not depend on a constant variable is available, changes to the EventSources code in System.Net should be made. " 5127 area-Serialization Some DateTime Serialization tests failed in Moscow time zone "### Description Some DateTime Serialization tests failed in Moscow time zone. Test output [placed](https://gist.github.com/speshuric/49c7e1b5072095cebe7b) in a gist. Here is reduced output: ``` XmlSerializerTests.Xml_DateTimeAsRoot [FAIL] Test failed for input: 02.01.2013 3:04:05 Expected: 2013-01-02T03:04:05.006+03:00 Actual: 2013-01-02T03:04:05.006+04:00 =================================================================== DataContractJsonSerializerTests.DCJS_DateTimeAsRoot [FAIL] [expected]:ate(1357084800000+0300)\/"" [actual ]:ate(1357081200000+0400)\/"" [Expected (with length=30)]: ""\/Date(1357084800000+0300)\/"" [Actual (with length=30)]: ""\/Date(1357081200000+0400)\/"" =================================================================== DataContractSerializerTests.DCS_TypeWithDatetimeOffsetTypeProperty [FAIL] Expected: 2013-01-02T03:04:05.006Z180 Actual: 2013-01-02T02:04:05.006Z240 DataContractSerializerTests.DCS_DateTimeOffsetAsRoot [FAIL] Expected: 2013-01-02T03:04:05.006Z180 Actual: 2013-01-02T02:04:05.006Z240 ``` ### Research All these tests failed by the similar reasons. In these tests used `TimeZoneInfo.Local.BaseUtcOffset.TotalMinutes` which is not right. Offset _can_ change. For example: ``` cs TimeZoneInfo timeZone = TimeZoneInfo.FindSystemTimeZoneById(""Russian Standard Time""); DateTime d1Utc = new DateTime(2015, 1, 2, 3, 4, 5, 6, DateTimeKind.Utc); Console.WriteLine(""2015: Offset: {0}"", timeZone.GetUtcOffset(d1Utc)); DateTime d2Utc = new DateTime(2013, 1, 2, 3, 4, 5, 6, DateTimeKind.Utc); Console.WriteLine(""2013: Offset: {0}"", timeZone.GetUtcOffset(d2Utc)); ``` Output is: ``` 2015: Offset: 03:00:00 2013: Offset: 04:00:00 ``` This issue was fixed in #2496 **Fix serialization test failure in Minsk timezone**, and #2541 **Serialization time zone fixes** but broken again in 3f91ae10 (it was rather big commit and it's no wonder that something was broken). ### Questions to discuss As @stephentoub mentioned in #2496, it would be better > to make this test not depend on the local timezoneinfo and instead have the test run for a variety of specific time zones, e.g. by making it a `[Theory]` and passing in via InlineData or MemberData a few different time zones to test I think this is right idea and I propose to discuss how to do it better: 1. Make 2 PR (the first - small roll back fix, the second - new tests with `[Theory]` attribute) 2. Make only full PR (but it will take some time for me) Small rollback PR I can do ASAP And how can we prevent accidental changes like https://github.com/dotnet/corefx/commit/3f91ae10 " 5130 area-System.Collections System.Collections.Generic: HashSet constructor throwing when passed another HashSet The constructor for HashSet that takes an IEnumerable is throwing an unexpected exception when passed another HashSet. repro test added to System.Collections test proj: ``` [Fact] public void CopyConstructor() { HashSet set = new HashSet(); HashSet set2 = new HashSet(set); // throws NullReferenceException } ``` Stack trace: ``` System.Collections.Tests.HashSet_Generic_Tests_int.CopyConstructor [FAIL] System.NullReferenceException : Object reference not set to an instance of an object. Stack Trace: D:\git\corefx\src\system.collections\src\System\Collections\Generic\HashSet.cs(118,0): at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection, IEqualityComparer`1 comparer) D:\git\corefx\src\system.collections\src\System\Collections\Generic\HashSet.cs(96,0): at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection) D:\git\corefx\src\system.collections\tests\Generic\HashSet\HashSet.Generic.Tests.cs(39,0): at System.Collections.Tests.HashSet_Generic_Tests`1.CopyConstructor() ``` The throwing code was introduced in #4349 by Toni Petrina and is snippeted here: ``` ... var otherAsHashSet = collection as HashSet; if (otherAsHashSet != null && AreEqualityComparersEqual(this, otherAsHashSet)) { _buckets = (int[])otherAsHashSet._buckets.Clone(); // THROWS _slots = (Slot[])otherAsHashSet._slots.Clone(); ... ``` Note that it doesn't fail when using the System.Collections.dll in 4.0.11-rc2-23616. 5137 area-System.Net System.Net.CredentialKey and System.Net.CredentialHostKey should implement IEquatable These classes exist to be used as keys, and hence to be compared for equality. As such the faster path offered to `EqualityComparer.Default` by implementing `IEquatable` is worth obtaining. Doing so would also remove the logical error identified in #5118, and although the path with this error (throwing on comparison with other instance of another type) is unreachable, that's worth doing. 5138 area-System.Net Implement IEquatable in CredentialKey and CredentialHostKey Improve performance of these types uses as dictionary keys, which is their intended purpose. Fixes #5137 5139 area-System.Net Make SslStream::RemoteCertificate return an X509Certificate2 object. This is the only place in all of corefx (outside of the X509Certificates tests) that instantiates an X509Certificate object (instead of an X509Certificate2). Since the property still return an X509Certificate(1), the callers would have to cast it to use the X509Certificate2-only properties, but now an `as` will suffice, whereas before it required an up-converting operation. This should alleviate the user concern from #4510. cc: @CIPop @davidsh 5141 area-System.Collections HashSet constructor perf optimization concern #4349 added an optimization to `HashSet`'s constructor when constructing from another `HashSet` with the same comparer, by cloning the other `HashSet`'s fields: ``` c# public HashSet(IEnumerable collection, IEqualityComparer comparer) : this(comparer) { ... var otherAsHashSet = collection as HashSet; if (otherAsHashSet != null && AreEqualityComparersEqual(this, otherAsHashSet)) { ... _buckets = (int[])otherAsHashSet._buckets.Clone(); _slots = (Slot[])otherAsHashSet._slots.Clone(); _count = otherAsHashSet._count; ... } .... } ``` The upside to this optimization is it's fast, but there's a downside that I haven't seen discussed: If the other set had a large number of items at one point, and was subsequently reduced in size, the new set is going to simply clone the `_buckets` and `_slots` arrays, which means the new set could be creating new arrays that are substantially larger than they need to be. For example: ``` c# var source = new HashSet(Enumerable.Range(1, 8950)); source.Clear(); source.UnionWith(Enumerable.Range(1, 20)); var destination = new HashSet(source); ``` Behavior before the #4349 optimization: - `source._buckets` and `source._slots` are of length 17,519. - `destination._buckets` and `destination._slots` are of length 23. Behavior after the #4349 optimization: - `source._buckets` and `source._slots` are of length 17,519. - `destination._buckets` and `destination._slots` are of length 17,519. A workaround would be to call `source.TrimExcess()` before using it to construct a new `HashSet`, or calling `destination.TrimExcess()` after constructing, but that won't help existing code and using `TrimExcess()` is going to result in more array allocations. It'd be nice if the optimized path didn't blindly clone potentially unnecessarily huge arrays for `_buckets` and `_slots` when smaller array sizes would be sufficient for the destination. Does anyone else share this concern? An alternative optimization might look something like: ``` c# var otherAsHashSet = collection as HashSet; if (otherAsHashSet != null && AreEqualityComparersEqual(this, otherAsHashSet)) { Initialize(otherAsHashSet.Count); int lastIndex = otherAsHashSet._lastIndex; Slot[] slots = otherAsHashSet._slots; for (int i = 0; i < lastIndex; i++) { if (slots[i].hashCode >= 0) { AddIfNotPresent(slots[i].hashCode, slots[i].value) } } } ``` Where `AddIfNotPresent` has a new overload that supports taking a pre-calculated hashcode. This entire alternative optimization could also be moved inside `UnionWith`, which would simplify the constructor and optimize `UnionWith`. cc: @tpetrina @stephentoub @ellismg @ianhays @JonHanna 5144 area-System.Net System.Net Logging Tracking Items Tracking Items for https://github.com/dotnet/corefx/pull/5101 Formatting in *EventSource classes: - [ ] Make constants have PascalCasing. - [ ] Correctly separate arguments of methods in different lines (when needed). - [ ] Add spaces needed in the attributes of the methods when not correctly aligned. - [ ] New lines after if/else blocks (mainly after the IsEnabled check). Dump Methods in SocketsEventSource: - [ ] Analyse if the method type is necessary.Change if possible to receive a Socket (hash). - [ ] Analyse if copying the buffer when it is received as an IntPtr to a byte [] is necessary. Update: After trying in different ways, I couldn't make the event method work without making a copy to a byte[]. When using the predefined WriteEvent it would only log the address and not the array. I could not make an override method work properly. Keywords: - [ ] Analyse if the right keywords are used for each event. Logging.cs class - [ ] Look for all the references done to this class in all projects and change calls to hash methods instead to LoggingHash. - [ ] Delete Logging.cs (in both S:\corefx\src\Common\src\System\Net\Logging AND S:\corefx\src\common\src\system\net) Keep in sync with Localization: - [ ] https://github.com/dotnet/corefx/issues/5126 Testing - [ ] Add some automated tests for the new EventSources created. Compatibility - [ ] Due to possible incompatibility between different versions of NetEventSource packaged inside distinct dlls, this class should not be changed in the future: > The minute you have multiple copies of an EventSource that claim to be the same identity, you have the problem of who to 'believe' at runtime (each will send out a manifest for the events). Sure if they are the same, you are OK, but if they are in different modules, there is a pretty good chance they will ship at different times, and thus you might have machines that have one copy that is older than another. This creates a bunch of subtle error modes (new events may not be recognized) that would be very difficult to diagnose. We are trying to avoid subtlety like this. Performance - [x] Update System.Net.Sockets to avoid allocations/work at call sites when logging is disabled - [x] Update System.Net.Security accordingly - [x] Update System.Net.Ping accordingly - [x] Update the rest of System.Net.\* accordingly - [x] Remove GlobalLog.Assert(bool, ...) as it leads to bad habits 5147 area-System.Collections Improve memory use of HashSet constructed from HashSet. If a `HashSet` is constructed from an existing `HashSet` then use the current approach if the count is above a particular ratio to the capacity, but if it is below that ratio (small enough that if created just from those items and then added to the next resize would still not reach that capacity) use an optimised version of `AddIfNotPresent` to add each item. Fixes #5141 @justinvp this combines your suggestion about an optimised version of `AddIfNotPresent` with mine of using the current approach above a certain threshold of count/capacity. I took that threshold as being `ExpandPrime(count + 1)` though there's no perfect value (the best value would depend on what additions where later done, and how long the produced set would be kept in memory, so it can't be perfectly deduced). Done on top of the two commits for #5131 rather than repeat things that need to be included in this. I pretty much ignored the idea of optimising `UnionWith`. That certainly could be done along the same lines, but the `AddValue` I have here couldn't be quite as tightly optimised, with the skip on tests for the item being present and the skips on incrementing the count and version having to be undone. At the very least this needs more tests before I take off the WIP tag. Contains the commits that were previously in #5131, so Fixes #5130. 5148 area-System.Net Port System.Private.Uri project configurations cc @tarekgh PTAL at the resource files when you get a chance. cc @davidsh @CIPop PTAL look at the project conversion when you get a chance. 5149 area-System.Collections System.Collections.Generic: SortedSet constructors not properly validating passed IComparer The SortedSet constructors: - `new SortedSet(IComparer< T> comparer)` - `new SortedSet(IEnumerable< T> collection, IComparer< T> comparer)` are not consistent with their behavior when `comparer` is null. The docs for [the comparer constructor](https://msdn.microsoft.com/en-us/library/dd395024%28v=vs.110%29.aspx) state that a null comparer should throw an ArgumentNullException. However, the code actually performs a check on the comparer if it is null and sets it to the default comparer if it is. The docs for [the enumerable and comparer constructor](https://msdn.microsoft.com/en-us/library/dd394885%28v=vs.110%29.aspx) neglect to mention any behavior for when the comparer is null. The code will throw a NullReferenceException on [line 148 of SortedSet.cs](https://github.com/dotnet/corefx/blob/master/src/System.Collections/src/System/Collections/Generic/SortedSet.cs) when it attempts to call `Compare` on the null Comparer that was passed as input. Suggested Solution: Behavior for null Comparers should be consistent across constructors. Modify the `SortedSet(IEnumerable< T> collection, IComparer< T> comparer)` constructor to use the default Comparer when the passed comparer is null. 5150 area-System.Collections Fix SortedSet constructors to use default Comparer tests coming in #754 resolves #5149 5151 area-System.Net Deleting Logging.cs file and references Substituting Logging calls to EventSource calls, or calls to LoggingHash. Fix #5144 5152 area-System.Numerics Should Vector.Count be readonly? ``` csharp [JitIntrinsic] public static int Count { get { return s_count; } } private static int s_count = InitializeCount(); ``` If hardware accelerated is false will `s_count` still be Jitted to a const even though its not `readonly`? Or should it be readonly? 5153 area-Infrastructure Use different strong name key for new projects Commit that key to source control and don't delay sign or oss sign those binaries. - System.Buffers - System.Text.Encodings.Web - System.Diagnostics.DiagnosticSource Anything that doesn't have the burden of assembly strong name backwards compatiblity 5156 area-System.Net Porting NegotiateStream Summary: - Porting NegotiateStream - Adding a simple Unix PAL that throws `PlatformNotSupportedException`. - Renaming Secur32 to SspiCli - Integrating with ETW Logging changes - Formatting Fix #1844, #4661 @davidsh @josguil @bartonjs @stephentoub @roncain PTAL @ericeil @vijaykota - PTAL, parts of this will need to be ported to x-plat as well. /cc: @SidharthNabar 5157 area-System.Security Unix: GetECDsaPublicKey from an unknown named curve throws ArgumentException ``` System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests.TestECDsa224PublicKey [FAIL] System.ArgumentException : Cannot open an invalid handle. Parameter name: pkeyHandle Stack Trace: at System.Security.Cryptography.ECDsaOpenSsl..ctor(SafeEvpPKeyHandle pkeyHandle) at Internal.Cryptography.Pal.OpenSslX509CertificateReader.GetECDsaPublicKey() at Internal.Cryptography.Pal.OpenSslX509Encoder.DecodePublicKey(Oid oid, Byte[] encodedKeyValue, Byte[] encodedParameters, ICertificatePal certificatePal) at Internal.Cryptography.Pal.CertificateExtensionsCommon.GetPublicKey[T](X509Certificate2 certificate, Predicate`1 matchesConstraints) at System.Security.Cryptography.X509Certificates.ECDsaCertificateExtensions.GetECDsaPublicKey(X509Certificate2 certificate) at System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests.TestECDsa224PublicKey() ``` A more graceful exception seems warranted. On Windows (2008 R2): ``` Discovering: System.Security.Cryptography.X509Certificates.Tests Discovered: System.Security.Cryptography.X509Certificates.Tests Starting: System.Security.Cryptography.X509Certificates.Tests System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests.TestECDsa224PublicKey [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : Unknown cryptographic algorithm Stack Trace: at Internal.Cryptography.Pal.X509Pal.ImportPublicKeyInfo(SafeCertContextHandle certContext) at Internal.Cryptography.Pal.X509Pal.DecodeECDsaPublicKey(CertificatePal certificatePal) at Internal.Cryptography.Pal.X509Pal.DecodePublicKey(Oid oid, Byte[] encodedKeyValue, Byte[] encodedParameters, ICertificatePal certificatePal) at Internal.Cryptography.Pal.CertificateExtensionsCommon.GetPublicKey[T](X509Certificate2 certificate, Predicate`1 matchesConstraints) at System.Security.Cryptography.X509Certificates.ECDsaCertificateExtensions.GetECDsaPublicKey(X509Certificate2 certificate) at System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests.TestECDsa224PublicKey() ``` 5159 area-System.IO FileStream opens in async mode by default "The following code: ``` var fs = new FileStream(""vogavoa"", FileMode.OpenOrCreate, FileAccess.Write); Console.WriteLine(fs.IsAsync); ``` Returns false for full .net and true for coreclr. shouldn't the behavior be the same? " 5162 area-System.Security Add ChaCha20-Poly1305 to CoreFX Add ChaCha20-Poly1305 to CoreFX's cipher suite. It is a very fast AEAD (significantly faster than AES-GCM except when the latter has hardware support) that is immune to side channel attacks and is relatively easy to implement. It is included in OpenSSL 1.1 or later, or in libSodium. 5165 area-System.Collections Documentation needed on System.Collections.Immutable (what exist is seriously lacking) The documentation for how to use System.Collections.Immutable is the worst I have seen of any general microsoft libraries. No general introduction and very few examples. + Most stuff that google can find on the net is outdated and may no longer work. I need quite some detective work just to find out how to instantiate an instance of an immutable list with specific values, how to convert a IEnumerable etc. 5167 area-System.Security Windows 10: x509 GetECDsa*Key fails on new keys (secp224r1, brainpool, etc) This likely applies to any curve which was added in Windows 10. The data that DecodeECDsaPublicKey (https://github.com/dotnet/corefx/blob/master/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Windows/X509Pal.PublicKey.cs#L64) passes into CngKey.Import ends up failing (and throwing) for curves that are not { secp256r1, secp384r1, secp521r1 }. 5168 area-Infrastructure Outerloop tests failing with packaging error System.IO.FileSystem.dll does not exist, ensure you have built libraries before building the package. ``` 08:07:44 d:\j\workspace\dotnet_corefx\outerloop_win10_release\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00141\lib\Packaging.targets(460,5): error : File d:\j\workspace\dotnet_corefx\outerloop_win10_release\bin\Linux.AnyCPU.Release\System.IO.FileSystem\System.IO.FileSystem.dll does not exist, ensure you have built libraries before building the package. [d:\j\workspace\dotnet_corefx\outerloop_win10_release\src\System.IO.FileSystem\pkg\unix\System.IO.FileSystem.pkgproj] 08:07:44 d:\j\workspace\dotnet_corefx\outerloop_win10_release\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00141\lib\Packaging.targets(886,5): error : Error when creating nuget package from d:\j\workspace\dotnet_corefx\outerloop_win10_release\bin\pkg\specs\runtime.unix.System.IO.FileSystem.nuspec. System.IO.DirectoryNotFoundException: Could not find a part of the path 'd:\j\workspace\dotnet_corefx\outerloop_win10_release\bin\Linux.AnyCPU.Release\System.IO.FileSystem'. [d:\j\workspace\dotnet_corefx\outerloop_win10_release\src\System.IO.FileSystem\pkg\unix\System.IO.FileSystem.pkgproj] 08:07:44 d:\j\workspace\dotnet_corefx\outerloop_win10_release\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00141\lib\Packaging.targets(886,5): error : at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) [d:\j\workspace\dotnet_corefx\outerloop_win10_release\src\System.IO.FileSystem\pkg\unix\System.IO.FileSystem.pkgproj] 08:07:44 d:\j\workspace\dotnet_corefx\outerloop_win10_release\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00141\lib\Packaging.targets(886,5): error : at System.IO.FileSystemEnumerableIterator`1.CommonInit() [d:\j\workspace\dotnet_corefx\outerloop_win10_release\src\System.IO.FileSystem\pkg\unix\System.IO.FileSystem.pkgproj] 08:07:44 d:\j\workspace\dotnet_corefx\outerloop_win10_release\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00141\lib\Packaging.targets(886,5): error : at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost) [d:\j\workspace\dotnet_corefx\outerloop_win10_release\src\System.IO.FileSystem\pkg\unix\System.IO.FileSystem.pkgproj] 08:07:44 d:\j\workspace\dotnet_corefx\outerloop_win10_release\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00141\lib\Packaging.targets(886,5): error : at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption) [d:\j\workspace\dotnet_corefx\outerloop_win10_release\src\System.IO.FileSystem\pkg\unix\System.IO.FileSystem.pkgproj] 08:07:44 d:\j\workspace\dotnet_corefx\outerloop_win10_release\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00141\lib\Packaging.targets(886,5): error : at NuGet.PathResolver.PerformWildcardSearchInternal(String basePath, String searchPath, Boolean includeEmptyDirectories, String& normalizedBasePath) [d:\j\workspace\dotnet_corefx\outerloop_win10_release\src\System.IO.FileSystem\pkg\unix\System.IO.FileSystem.pkgproj] 08:07:44 d:\j\workspace\dotnet_corefx\outerloop_win10_release\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00141\lib\Packaging.targets(886,5): error : at NuGet.PathResolver.ResolveSearchPattern(String basePath, String searchPath, String targetPath, Boolean includeEmptyDirectories) [d:\j\workspace\dotnet_corefx\outerloop_win10_release\src\System.IO.FileSystem\pkg\unix\System.IO.FileSystem.pkgproj] 08:07:44 d:\j\workspace\dotnet_corefx\outerloop_win10_release\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00141\lib\Packaging.targets(886,5): error : at NuGet.PackageBuilder.AddFiles(String basePath, String source, String destination, String exclude) [d:\j\workspace\dotnet_corefx\outerloop_win10_release\src\System.IO.FileSystem\pkg\unix\System.IO.FileSystem.pkgproj] 08:07:44 d:\j\workspace\dotnet_corefx\outerloop_win10_release\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00141\lib\Packaging.targets(886,5): error : at NuGet.PackageBuilder.PopulateFiles(String basePath, IEnumerable`1 files) [d:\j\workspace\dotnet_corefx\outerloop_win10_release\src\System.IO.FileSystem\pkg\unix\System.IO.FileSystem.pkgproj] 08:07:44 d:\j\workspace\dotnet_corefx\outerloop_win10_release\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00141\lib\Packaging.targets(886,5): error : at NuGet.PackageBuilder.ReadManifest(Stream stream, String basePath, IPropertyProvider propertyProvider) [d:\j\workspace\dotnet_corefx\outerloop_win10_release\src\System.IO.FileSystem\pkg\unix\System.IO.FileSystem.pkgproj] 08:07:44 d:\j\workspace\dotnet_corefx\outerloop_win10_release\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00141\lib\Packaging.targets(886,5): error : at NuGet.PackageBuilder..ctor(String path, String basePath, IPropertyProvider propertyProvider, Boolean includeEmptyDirectories) [d:\j\workspace\dotnet_corefx\outerloop_win10_release\src\System.IO.FileSystem\pkg\unix\System.IO.FileSystem.pkgproj] 08:07:44 d:\j\workspace\dotnet_corefx\outerloop_win10_release\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00141\lib\Packaging.targets(886,5): error : at Microsoft.DotNet.Build.Tasks.Packaging.NuGetPack.Execute() [d:\j\workspace\dotnet_corefx\outerloop_win10_release\src\System.IO.FileSystem\pkg\unix\System.IO.FileSystem.pkgproj] ``` 5173 area-System.Data Certificate validation fails on osx 10.11 Moved from https://github.com/dotnet/corefx/issues/4593#issuecomment-166719300 --- I am not able to connect from OS X 10.11 to **SQL Azure** when using `Encrypt=true` in the connection string. ``` System.Data.SqlClient.SqlException : A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught) ---- System.Security.Authentication.AuthenticationException : The remote certificate is invalid according to the validation procedure. ``` [Full stack trace here](https://gist.github.com/natemcmaster/d4816c77789a08f78a41) dnx 1.0.0-rc2-16348 coreclr System.Data.SqlClient 4.0.0-rc2-23622 5178 area-System.Net TLS Client Handshake seems to violate the protocol in unix I am currently having problem communicating with SQL Server (older version) with TLS 1.0 I do notice that the packet that was sent by SSLStream sent different versions In UNIX ![image](https://cloud.githubusercontent.com/assets/698547/12099774/6aafc6a0-b2df-11e5-8726-9f003ccd0f90.png) 5181 area-Serialization Fix serialization data contract overflow when reading object concurrently This change is to port the fix from Desktop (CS 1558305) which has been validated. @SGuyGe @shmao Fix #4504 5183 area-System.Numerics Add support for floating point control register manipulation - esp denormal/subnormal flush-to-zero "The general request I'm making is to expose the floating point control register to managed code. I realize that could have a lot of implications, so the minimal request is exposing the denormal/subnormal flush mode, so that ""flush to zero"" can be enabled on IEEE float values. The scenario is that for certain real-time signal processing applications denormal numbers can pose performance problems. For a concrete scenario, consider the case of a real-time music synthesis program which provides various audio channels which have various audio processors operating on them. There is a class of audio processors, including delay/reverb type effects, which are implemented as IIR (infinite impulse response) filters. The character of these filters is that, when the input goes to silence, the internal state (and output) of the filter exponentially decays towards zero over time. The trouble arises if non-silent input occurs sporadically, which significant periods of silence between. In that case, it is possible for the internal state of the filter to decay to denormal float range. This usually causes a 1-2 order of magnitude cost increase in computation time, which often causes the synthesizer to glitch because it starts missing it's deadlines to provide buffers to the audio output device. The classic ""C"" solution is to enable ""flush-to-zero"" mode on the fpu, which solves the problem without code changes. The denormal threshhold is so far below audible that there is no loss of correctness for audio applications. In managed code, one could write code to detect the denormal bit pattern and flush to zero explicitly, but this comes at a performance cost, which is a pity especially since the hardware can do it for free. The reason it could be difficult is the question of how this would interoperate with other floating point consumers in the managed realm, such as WPF/winforms graphics libraries, as well as interop with unmanaged users of floating point. In general, modifying the fpu control register is very expensive (basically purges the entire processor pipeline), so it's to be done only infrequently. But correctness of other packages potentially could rely on IEEE denormal behavior. At minimum there could be a significant test impact. One mitigation could be that this option would be set on a per-thread basis, once, at thread initialization, much like the COM apartment model specification is done. That would fit well with the music synthesis world of this specific scenario, where dedicated threads are used to do the real-time work. " 5185 area-System.Net UDP tests fail with timeout sending/receiving data over loopback Hit a timeout in this test: http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_debug_prtest/565/testReport/junit/System.Net.Sockets.Tests/DualMode/ReceiveFromAsyncV6BoundToSpecificV6_Success/ ``` Stacktrace MESSAGE: System.TimeoutException : The operation has timed out. +++++++++++++++++++ STACK TRACE: at System.Net.Sockets.Tests.DualMode.ReceiveFromAsync_Helper(IPAddress listenOn, IPAddress connectTo) in d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Sockets\tests\FunctionalTests\DualModeSocketTest.cs:line 599 at System.Net.Sockets.Tests.DualMode.ReceiveFromAsyncV6BoundToSpecificV6_Success() in d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Sockets\tests\FunctionalTests\DualModeSocketTest.cs:line 536 ``` 5187 area-System.Net TLS 1.0 in Unix send additional 32 bytes of application data In Unix, TLS 1.0 via SSLStream send addition 32 bytes of application data. This may cause old communication server only pick the first application data. ***In Unix - TLS 1.0 - (send 2 application data - Additional 32 bytes of data) ![image](https://cloud.githubusercontent.com/assets/698547/12105337/a5388680-b308-11e5-81c0-310ccb78178a.png) ***In Windows - TLS 1.0 - (send 1 application data) ![image](https://cloud.githubusercontent.com/assets/698547/12105340/b42823d0-b308-11e5-88dd-22b7a314a410.png) ***In Unix - TLS 1.2 (send 1 application data) ![image](https://cloud.githubusercontent.com/assets/698547/12105357/e21128c8-b308-11e5-8e61-7c025082ef1d.png) 5188 area-System.Collections Add key value to KeyNotFoundException It would be great if, for example, when dictionary throws KeyNotFoundException, we can have the searched key in the exception for some traces 5189 area-System.Net Sockets.APMServer.Tests failed on OS X with unhandled SocketException 10004 http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_debug_tst/110/console ``` Unhandled Exception: System.Net.Sockets.SocketException: Unknown error: 10004 05:45:07 at System.Net.Sockets.Socket.Receive(IList`1 buffers, SocketFlags socketFlags) 05:45:07 at System.Net.Sockets.Tests.SendReceive.<>c__DisplayClass4_0.b__0() 05:45:07 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 05:45:10 ./run-test.sh: line 130: 62000 Abort trap: 6 ./corerun xunit.console.netcore.exe $testDllName -xml testResults.xml -notrait category=failing -notrait category=OuterLoop -notrait category=$xunitOSCategory -notrait Benchmark=true 05:45:10 error: One or more tests failed while running tests from 'System.Net.Sockets.APMServer.Tests'. Exit code 134. ``` 5190 area-Infrastructure CoreFx managed build doesn't distinguish by distro "We currently only distinguish between OSX, Linux, FreeBSD and Windows in the managed build. See https://github.com/dotnet/corefx/blob/13486efbd6619da273c6658fbf927cccd67fa27c/build.sh#L200-L220. This is sufficient for our managed implementations, but packages for the native shims require a specific OS. Today I'm ignoring this distinction and building all Linux packages on any linux distro and we need to ""know"" not to publish the centos shim packages produced from an unbuntu machine. We should clean this up. /cc @weshaggard @chcosta " 5193 area-Serialization Fix behavior difference when XmlSerializer deserializes out-of-range byte values Deserializing out-of-range byte value using XmlSerializer succeeds whereas it fails on Desktop. The reason was due to additional conditionals were used as workaround for issues on Silverlight. This change will make the behavior consistent with Desktop which is to throw InvalidOperationException when reading invalid value for byte data type. Fix #4668 @SGuyGe @shmao 5199 area-Infrastructure Build failure on master (Ubuntu Desktop 14.04.3) "Installed fresh copy of Ubuntu Desktop 14.04.3 LTS in VirtualBox 5.0.12 **Build CoreCLR on Linux (Instructs to build CoreFx as well)** https://github.com/dotnet/coreclr/blob/master/Documentation/building/linux-instructions.md installed git 1) clrjunkie@ubuntu-14-desktop:~$ cd ~ 2) clrjunkie@ubuntu-14-desktop:~$ mkdir git 3) clrjunkie@ubuntu-14-desktop:~$ cd git 4) clrjunkie@ubuntu-14-desktop:~/git$ git clone https://github.com/dotnet/coreclr.git //today 5) clrjunkie@ubuntu-14-desktop:~/git$ git clone https://github.com/dotnet/corefx.git //today 6) clrjunkie@ubuntu-14-desktop:~/git$ echo ""deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.6 main"" | sudo tee /etc/apt/sources.list.d/llvm.list 7) clrjunkie@ubuntu-14-desktop:~/git$ wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add - 8) clrjunkie@ubuntu-14-desktop:~/git$ sudo apt-get update 9) clrjunkie@ubuntu-14-desktop:~/git$ sudo apt-get install cmake llvm-3.5 clang-3.5 lldb-3.6 lldb-3.6-dev libunwind8 libunwind8-dev gettext libicu-dev liblttng-ust-dev libcurl4-openssl-dev libssl-dev uuid-dev 10) clrjunkie@ubuntu-14-desktop:~/git$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF 11) clrjunkie@ubuntu-14-desktop:~/git$ echo ""deb http://download.mono-project.com/repo/debian wheezy main"" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list 12) clrjunkie@ubuntu-14-desktop:~/git$ sudo apt-get update 13) clrjunkie@ubuntu-14-desktop:~/git$ sudo apt-get install mono-devel 14) clrjunkie@ubuntu-14-desktop:~/git$ sudo nano /etc/security/limits.conf Add: clrjunkie soft nofile 50000 clrjunkie hard nofile 50000 15) clrjunkie@ubuntu-14-desktop:~/git$ sudo nano /etc/sysctl.conf Add: fs.file-max = 100000 16) clrjunkie@ubuntu-14-desktop:~/git$ sudo sysctl -p 17) logout & login 18) clrjunkie@ubuntu-14-desktop:~$ ulimit -Hn 50000 19) clrjunkie@ubuntu-14-desktop:~$ cd git/coreclr 20) clrjunkie@ubuntu-14-desktop:~/git/coreclr$ ./build.sh Repo successfully built. Product binaries are available at /home/clrjunkie/git/coreclr/bin/Product/Linux.x64.Debug 21) clrjunkie@ubuntu-14-desktop:~/git/coreclr$ cd ../corefx **Website doc error - Need to mention FX requires additional setup** 22) clrjunkie@ubuntu-14-desktop:~/git/corefx$ ./build.sh Setting up directories for build PCL reference assemblies not found. Please see https://github.com/dotnet/corefx/blob/master/Documentation/building/unix-instructions.md for more details. [fxbuild.txt](https://github.com/dotnet/corefx/files/80209/fxbuild.txt) **Building CoreFX on FreeBSD, Linux and OS X** https://github.com/dotnet/corefx/blob/master/Documentation/building/unix-instructions.md 23) clrjunkie@ubuntu-14-desktop:~/git/corefx$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF 24) clrjunkie@ubuntu-14-desktop:~/git/corefx$ echo ""deb http://download.mono-project.com/repo/debian wheezy main"" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list 25) clrjunkie@ubuntu-14-desktop:~/git/corefx$ echo ""deb http://jenkins.mono-project.com/repo/debian sid main"" | sudo tee /etc/apt/sources.list.d/mono-jenkins.list 26) clrjunkie@ubuntu-14-desktop:~/git/corefx$ sudo apt-get update 27) clrjunkie@ubuntu-14-desktop:~/git/corefx$ sudo apt-get install mono-snapshot-latest referenceassemblies-pcl 28) clrjunkie@ubuntu-14-desktop:~/git/corefx$ . mono-snapshot mono 29) [mono-2016.01.05+18.26.39]clrjunkie@ubuntu-14-desktop:~/git/corefx$ sudo ln -s /usr/lib/mono/xbuild-frameworks/.NETPortable/ $MONO_PREFIX/lib/mono/xbuild-frameworks/ 30) [mono-2016.01.05+18.26.39]clrjunkie@ubuntu-14-desktop:~/git/corefx$ ./build.sh 7 Warning(s) 73 Error(s) Time Elapsed 01:50:40.53 Build Exit Code = 1 (Attached full log) " 5200 area-System.Net ReceiveAsync cancellation throws WebSocketException and terminates the socket await Socket.ReceiveAsync( new ArraySegment( Buffer ), Ct ); cannot be cancelled on a ClientWebSocket when Ct is the CancellationToken. Instead of throwing a OperationCanceledException and keeping the socket alive, the following exception is thrown and the socket is aborted: System.Net.WebSockets.WebSocketException: The 'System.Net.WebSockets.InternalClientWebSocket' instance cannot be used for communication because it has been transitioned into the 'Aborted' state. ---> System.Net.Http.WinHttpException: The operation has been canceled This is true for both the ClientWebSocket and on a server socket when WebListener is used. When Kestrel is used, ReceiveAsync CAN be cancelled on the SERVER, the cancellation takes about 10 seconds though. Minimal solution with both the client and server part to reproduce on Stack Overflow: http://stackoverflow.com/questions/34634652/dnx-core-websocket-clientwebsocket-receiveasync-cancellation-is-not-working-p 5202 area-System.Numerics [API Proposal] Support for constructing and copying Vector from pointers # Summary Currently, the System.Numerics.Vectors library provides no way to construct `Vector` objects out of native pointers, or from anything other than an array or a single constant element. Although part of the draw of this library is access to high-performance vector math without resorting to native or unsafe code, there’s a lot of reasons you might have your data stored somewhere outside of a managed array. It’s not reasonable to copy all of your data into an array just to do vector operations on it, and then copy it back to its original location. Additionally, you might want to construct a one-off vector from the stack (perhaps using `stackalloc`), without having to make an entire array for the purpose of a single vector. Even if you have a safe `IntPtr` to your storage location, you cannot currently construct a `Vector` from it. We should expose better support for, at the very least, constructing `Vector`’s from arbitrary pointers, and storing them back into arbitrary locations. # Proposed API ``` CSharp public struct Vector { public Vector(void* dataPointer); public Vector(void* dataPointer, int offset); public Vector(IntPtr dataPointer); public Vector(IntPtr dataPointer, int offset); public void CopyTo(void* destination); public void CopyTo(void* destination, offset); public void CopyTo(IntPtr destination); public void CopyTo(IntPtr destination, offset); } ``` Because all pointer types can be implicitly converted to a `void*` pointer, you can use the first overloads above to load a `Vector` by passing a `float*` for example. It also allows you to load a `Vector` with any other pointer type, but in my opinion this is not a problem. Even with the alternate approach below (see “Alternative Approaches”), you can simply cast a pointer type to another and construct any kind of `Vector` you would like. This is desirable in some situations if you want to perform different calculations or reinterpret your data in some way. ## Constructor This behaves exactly the same way as the constructor taking an array, and allows an optional offset to be given in order to skip elements at the beginning of your storage. ## CopyTo This behaves exactly the same way as `CopyTo(T[])`, also with an optional offset to control the storage location. # JIT Recognition These new overloads must be recognized by the JIT. Functionally, they are pretty much identical to the existing overloads which operate on arrays. # Alternative Approach Instead of a “universal” pointer constructor, we could expose some “factory” methods which take a specifically-typed pointer and return a specifically typed `Vector`. ``` CSharp public static Vector Load(byte* dataPointer, int offset); public static Vector Load(int* dataPointer, int offset); public static Vector Load(float* dataPointer, int offset); ... ``` I don’t personally favor this approach as using static methods for construction doesn’t necessarily mesh with the existing usage patterns, and it also just adds a lot more methods than constructors (two per primitive type, so 20 in total). Also, It would still make sense to add the `IntPtr` constructor even if we went this route. Related to https://github.com/dotnet/corefx/issues/5106, https://github.com/dotnet/corefx/issues/3741 I have part of the additions (`void*` overloads) implemented in [this branch](https://github.com/mellinoe/corefx/commit/b7c5db276ac89dd599d9d088d0a467482ca340e8) with tests added. # Clarifications ### Q: Since `Vector` is a struct, why do we need special constructors for pointers pointers? Other BCL structures don't need special constructors for this, you can just cast, de-reference, etc. Because `Vector` is a generic struct, you can't directly take it's address, nor have a pointer to it. ``` error CS0208: Cannot take the address of, get the size of, or declare a pointer to a managed type ('Vector') ``` Consider `Vector4`, which is sort of similar to `Vector`. If you want to get a `Vector4` from a `float*` or vice-versa, you can just do the following, and you don't need a specialized constructor for it: ``` CSharp float* data = stackalloc float[4]; Vector4 vec = *(Vector4*)data; Vector4* vectorData = stackalloc Vector4[100]; Vector4 first = vectorData[0]; float* xPtr = &first.X; // etc. ``` Because `Vector` is generic, the above mechanisms aren't applicable and you're much more limited in how you can constructor and store them with pointers. 5203 area-System.ComponentModel Fix CustomValidationAttribute to properly implement RequiresValidatonContext Squashed replacement for https://github.com/dotnet/corefx/pull/3794 5204 area-Infrastructure corefx code coverage runs are consistently failing in CI "Some are failing with errors like this in the log: ``` 12:13:13 An exception occured: Failed to register(user:True,register:True,is64:False):5 the profiler assembly; you may want to look into permissions or using the -register:user option instead. C:\Windows\system32\regsvr32.exe /s /n /i:user ""d:\j\workspace\dotnet_corefx\code_coverage_windows\packages\OpenCover\4.6.166\tools\x86\OpenCover.Profiler.dll"" 12:13:13 stack: at OpenCover.Framework.ProfilerRegistration.ExecuteRegsvr32(Boolean userRegistration, Boolean register, Boolean is64) in c:\projects\opencover\main\OpenCover.Framework\ProfilerRegistration.cs:line 66 12:13:13 at OpenCover.Console.Program.RunWithContainer(CommandLineParser parser, Bootstrapper container, IPersistance persistance) in c:\projects\opencover\main\OpenCover.Console\Program.cs:line 114 12:13:13 at OpenCover.Console.Program.Main(String[] args) in c:\projects\opencover\main\OpenCover.Console\Program.cs:line 57 12:13:14 d:\j\workspace\dotnet_corefx\code_coverage_windows\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00142\lib\tests.targets(129,5): warning MSB3073: The command ""d:\j\workspace\dotnet_corefx\code_coverage_windows\packages/OpenCover\4.6.166\tools\OpenCover.Console.exe -filter:""+[*]* -[*.Tests]*"" -excludebyfile:""*\Common\src\System\SR.*"" -nodefaultfilters -excludebyattribute:*.ExcludeFromCodeCoverage* -skipautoprops -hideskipped:All -threshold:1 -returntargetcode -register:user -target:d:\j\workspace\dotnet_corefx\code_coverage_windows\bin/tests/Windows_NT.AnyCPU.Debug\System.Net.Primitives.Pal.Tests\dnxcore50/CoreRun.exe -output:d:\j\workspace\dotnet_corefx\code_coverage_windows\bin/tests/coverage\System.Net.Primitives.Pal.Tests.coverage.xml -targetargs:""xunit.console.netcore.exe System.Net.Primitives.Pal.Tests.dll -xml testResults.xml -notrait category=nonwindowstests -notrait Benchmark=true -notrait category=OuterLoop -notrait category=failing """" exited with code 1. [d:\j\workspace\dotnet_corefx\code_coverage_windows\src\System.Net.Primitives\tests\PalTests\System.Net.Primitives.Pal.Tests.csproj] ``` Others are failing with errors like this in the log: ``` 16:21:59 Unhandled Exception: System.OverflowException: Array dimensions exceeded supported range. 16:21:59 at OpenCover.Framework.Communication.CommunicationManager.HandleMemoryBlock(IManagedMemoryBlock mmb) in c:\projects\opencover\main\OpenCover.Framework\Communication\CommunicationManager.cs:line 82 16:22:00 at OpenCover.Framework.Manager.ProfilerManager.<>c__DisplayClass24.b__22(Object state) in c:\projects\opencover\main\OpenCover.Framework\Manager\ProfilerManager.cs:line 248 16:22:00 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 16:22:00 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 16:22:01 at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() 16:22:01 at System.Threading.ThreadPoolWorkQueue.Dispatch() ``` We haven't updated to a newer version of OpenCover since July, and these issues only just started happening in the last few days, implying to me this is somehow infrastructure related...? " 5205 area-System.Runtime API review: During shutdown, revisit finalization and provide a way to clean up resources "Running finalizers on reachable objects during shutdown is currently unreliable. This is a proposal to fix that and provide a way to clean up resources on shutdown in a reliable way. ## Issues observed on shutdown Currently, a best-effort attempt is made to run finalizers for all finalizable objects during shutdown, including reachable objects. Running finalizers for reachable objects is not reliable, as the objects are in an undefined state. - In order to finalize reachable objects, threads must be blocked, since objects that are still reachable cannot be used during or after finalization. Later, threads are terminated without running any more user code. - Running user code in finalizers after blocking other threads is unreliable, as those threads may be blocked at an inopportune point, and may cause finalizers to block indefinitely or result in undefined behavior due to the undefined state of the object - Example from a user code perspective. Consider an object that writes to a network stream using some stateful communication protocol. The finalizer would write a termination value to the stream and close the stream. Suppose that the termination value indicates to the receiving end that all data has been written, while abruptly closing the stream without writing the termination value would indicate incomplete transmission due to disconnection or some other reason. Writing the termination value in the finalizer assumes that there are no more references to the object, indicating that all data has been written. Suppose that a background thread is using the object, writing data to the pipe. During shutdown, the background thread is blocked at some arbitrary point, and the object is still referenced. Writing the termination value to the pipe in the finalizer at that point may be invalid according to the protocol. - Example from a runtime perspective. If a thread is blocked during GC, and a finalizer tries to allocate something, it may block waiting for GC to complete, which will never happen. The finalizer itself may not even allocate anything, but even just jitting the finalizer method will trigger allocation. While this particular issue can be fixed separately, it demonstrates the unreliability of the current design not just from a user code perspective but from a runtime perspective. - Effectively, the best-effort attempt to run finalizers for reachable finalizable objects is not reliable. ## Proposal - Don't run finalizers on shutdown (for reachable or unreachable objects) - Don't block threads on shutdown - Don't do a GC on shutdown (no change from current behavior) - Under this proposal, it is not guaranteed that all finalizable objects will be finalized before shutdown. - Doing a GC on shutdown and running finalizers for unreachable objects can guarantee that objects that are deterministically unreachable by the time of shutdown will be finalized. However, such objects should also be deterministically disposed before shutdown. For cases that require this, the user can trigger a GC explicitly and wait for finalizers before shutdown. - When there are background threads that are still running, there would be no guarantee on how many objects will be finalized anyway - Provide a public AssemblyLoadContext.Unloading event - An AssemblyLoadContext manages the lifetime of assemblies loaded under that context - Code should register for the event in the AssemblyLoadContext instance associated with the assembly - The event is raised when the GC determines that the AssemblyLoadContext instance is no longer referenced. For the default AssemblyLoadContext instance and for a custom instance installed as the default load context, the event will be raised before normal shutdown. - Abrupt shutdown due to unhandled exception, process kill, etc., will not raise any further Unloading events - As unloading an AssemblyLoadContext is not yet implemented, instances that have been used to load assemblies will currently live until the end of the process - No timeout. The timeout on waiting for finalizers to complete on shutdown was removed in CoreCLR some time back. In favor of treating blocking issues as program errors, no timeout will be used for this event either. - Event handler exceptions will crash the process. Any exception propagating out of an event handler will be treated as an unhandled exception. - Since other threads are not blocked before this, and may continue to run for a short period after the event is raised, event handlers may need to handle concurrency, and safeguard from using cleaned up resources from other threads ### Behavioral change ``` c# public static void Main() { var obj = new MyFinalizable(); } private class MyFinalizable { ~MyFinalizable() { Console.WriteLine(""~MyFinalizable""); } } ``` Previous output: ~MyFinalizable Typical output with the proposal above (running the finalizer is not guaranteed, but may run if a GC is triggered): (empty) ## Proposed API ``` c# namespace System.Runtime.Loader { public abstract class AssemblyLoadContext { public event Action Unloading; } } ``` ### Example ``` c# public class Logger { private static readonly object s_lock = new object(); private static bool s_isClosed = false; static Logger() { var currentAssembly = typeof(Loader).GetTypeInfo().Assembly; AssemblyLoadContext.GetLoadContext(currentAssembly).Unloading += OnAssemblyLoadContextUnloading; // Create log file based on configuration } private static void OnAssemblyLoadContextUnloading(AssemblyLoadContext sender) { // This may be called concurrently with WriteLine Close(); } private static void Close() { lock (s_lock) { if (s_isClosed) return; s_isClosed = true; // Write remaining in-memory log messages to log file and close log file } } public static void WriteLine(string message) { lock (s_lock) { if (s_isClosed) return; // Save log message in memory, if buffer is full, write messages to log file } } } ``` " 5206 area-Serialization XmlDictionaryReader removing significant whitespace "Using XmlDictionaryReader wrapped in a XmlReader to parse element with white spaces results in the white spaces being skipped. The MSDN suggests this is a by-design behavior. However XML specs indicates white spaces in content are significant and should not be ignored. The following is the test demonstrating the issue: ``` static Stream GetXmlStream() { //var sourceXml = ""a\r\nb\r\nc""; return new MemoryStream(Encoding.UTF8.GetBytes(sourceXml), false); } static XmlReaderSettings GetXmlSettings() { return new XmlReaderSettings() { IgnoreWhitespace = true }; } static string Escape(string s) { return s.Replace(""\r"", ""\\r"").Replace(""\n"", ""\\n""); } static string PrintNodes(string header, XmlReader r) { var sb = new StringBuilder(); //Console.WriteLine($""--== {header} ==--""); while (r.Read()) { //Console.Write(""{0}"", r.NodeType); sb.Append(string.Format(""{0}"", r.NodeType)); switch (r.NodeType) { case XmlNodeType.Element: { //Console.Write("" {0}="", r.Name); sb.Append(string.Format("" {0}="", r.Name)); goto case XmlNodeType.Text; } case XmlNodeType.Text: case XmlNodeType.CDATA: case XmlNodeType.Whitespace: case XmlNodeType.SignificantWhitespace: { //Console.Write("" \""{0}\"""", Escape(r.Value)); sb.Append(string.Format("" \""{0}\"""", Escape(r.Value))); break; } } //Console.WriteLine(); } return sb.ToString(); } [Fact] public static void XmlReaderTest() { var s1 = PrintNodes(""XmlDictionaryReader"", XmlDictionaryReader.CreateTextReader(GetXmlStream(), new XmlDictionaryReaderQuotas())); var s2 = PrintNodes(""XmlReader"", XmlReader.Create(GetXmlStream(), GetXmlSettings())); var s3 = PrintNodes(""XmlReader(XmlDictionaryReader)"", XmlReader.Create(XmlDictionaryReader.CreateTextReader(GetXmlStream(), new XmlDictionaryReaderQuotas()), GetXmlSettings())); Assert.StrictEqual(@""XmlDeclarationElement Value= """"""""Text """"a""""SignificantWhitespace """"\n""""Text """"b""""SignificantWhitespace """"\n""""Text """"c""""EndElement"", s1); Assert.StrictEqual(@""XmlDeclarationElement Value= """"""""Text """"a\nb\nc""""EndElement"", s2); Assert.StrictEqual(@""XmlDeclarationElement Value= """"""""Text """"a""""SignificantWhitespace """"\n""""Text """"b""""SignificantWhitespace """"\n""""Text """"c""""EndElement"", s3); } ``` " 5207 area-System.Net Fix #3610 Fixes #3610. These tests were failing due to a problem with re-use of `SocketAsyncEventArgs` objects. `args.SetBuffer(null, 0, 0)` unpins the buffer, and other miscellaneous items. Subsequent re-use of the `SocketAsyncEventArgs` object is supposed to pin whatever buffers, etc., are current, but will only do so if the previous cached pointers appear to be invalid. 86241bd4e80971e803b1c7440888fee23afaa1d3 fixed this for the buffer itself; this change implements the same pattern for the other pinned items. @stoub, @pgavlin, @CIPop 5211 area-System.Net Add CancellationToken overloads to async methods in System.Net.Security Ref: #4732 5212 area-System.Reflection API review: System.Reflection.Metadata debug directory reading + misc Tracking the pending API review for PRs #5009 and #5018 ## New types ``` C# namespace System.Reflection { public enum MethodSemanticsAttributes { Setter = 0x0001, Getter = 0x0002, Other = 0x0004, Adder = 0x0008, Remover = 0x0010, Raiser = 0x0020, } } namespace System.Reflection.PortableExecutable { public struct CodeViewDebugDirectoryData { public Guid Guid { get; } public int Age { get; } public string Path { get; } } public struct DebugDirectoryEntry { public uint Stamp { get; } public ushort MajorVersion { get; } public ushort MinorVersion { get; } public DebugDirectoryEntryType Type { get; } public int DataSize { get; } public int DataRelativeVirtualAddress { get; } public int DataPointer { get; private set; } public DebugDirectoryEntry( uint stamp, ushort majorVersion, ushort minorVersion, DebugDirectoryEntryType type, int dataSize, int dataRelativeVirtualAddress, int dataPointer) } public enum DebugDirectoryEntryType { Unknown = 0, Coff = 1, CodeView = 2, Deterministic = 16, } } ``` ## New members ``` C# namespace System.Reflection.PortableExecutable { public struct DirectoryEntry { + public DirectoryEntry(int relativeVirtualAddress, int size); } public sealed class PEReader { + public ImmutableArray ReadDebugDirectory(); + public CodeViewDebugDirectoryData ReadCodeViewDebugDirectoryData( DebugDirectoryEntry entry); } } namespace System.Reflection.Metadata { public struct BlobReader { + public Guid ReadGuid(); } } ``` 5217 area-System.Reflection Add signing support to System.Reflection.Metadata There is already work in progress to [add the capability](https://github.com/dotnet/cli/issues/720) to the `dotnet` tool However, compilers usually do strong naming as part of the compilation process. This requires having a library that can be used to perform the signing. It seems `System.Reflection.Metadata` is the right location said functionality, especially when we support writing metadata. Compiler integration is also most logical way to make these attributes work: - `AssemblyDelaySignAttribute` - `AssemblyKeyFileAttribute` - `AssemblyKeyNameAttribute` 5222 area-System.Numerics Vector2 precision I'm finding Vector2's precision to be completely unsuitable for my app (a sketching application with lots of trigonometry), and I'm wondering what the sanctioned Vector with double precision elements are? There was the one in WPF, of course, but for a universal app we can't use that. There is Point, but it doesn't provide much of the necessary math. Are people just rolling their own when they need it? 5223 area-System.Drawing Add System.Drawing.Primitives contract to .NET Core. 5228 area-System.IO Add tests for BufferedStream This PR has two commits: - The first commit adds tests for BufferedStream and consolidates some of the existing tests - The second commit modifies all System.IO tests to be in the System.IO.Tests namespace. It also simplifies all of the variable declarations. resolves #5086 @stephentoub 5230 area-Infrastructure VB projects cannot be built on non-Windows platforms "We only have one in the repo here, but I believe there is an issue in the x-plat version of MSBuild that is causing these to fail. I think the problem is that this Task (https://github.com/Microsoft/msbuild/blob/xplat/src/Utilities/ToolTask.cs) has a workaround to normalize all backslashes to forward-slashes, for file paths. Unfortunately it does that on the entire response file we generate to pass to vbc.exe. The define constants have quotation marks in them that need to be escaped, so we initially start with something like ``` -define: ""CONFIG=\""Debug\"" ``` which gets normalized to ``` -define: ""CONFIG=/""Debug/"" ``` which is no longer valid, and causes vbc.exe to error out. I've manually invoked vbc.exe with the same command line, but with the backslashes put back in, and it seems to work fine. @weshaggard " 5232 area-System.Net Merge changes from TFS 5233 area-Infrastructure NuGet packages cannot be built on Ubuntu (Probably other non-Windows platforms as well) There seems to be some path issue on Ubuntu when running the package build on Ubuntu. It seems like some paths are not being combined properly, or something of the sort. The inputs to the packaging task seem to be correct, though, so there may be an issue in the NuGet task itself. Here's a representative error: ``` /home/eric/projects/corefx/packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00144/lib/Packaging.targets : error : Error when creating nuget package from /home/eric/projects/corefx/bin/pkg/specs/System.Reflection.Metadata.nuspec. System.IO.DirectoryNotFoundException: Directory '/home/eric/projects/corefx/bin/pkg/specs/home/eric/projects/corefx/bin/AnyOS.AnyCPU.Debug/System.Reflection.Metadata' not found. [/home/eric/projects/corefx/src/System.Reflection.Metadata/pkg/System.Reflection.Metadata.pkgproj] ``` Notice the path: **/home/eric/projects/corefx/bin/pkg/specs/home/eric/projects/corefx/bin/AnyOS.AnyCPU.Debug/System.Reflection.Metadata** is malformed and includes the whole project directory prefix twice. [Full build output with stacktrace](https://gist.github.com/mellinoe/053405a1187abb91abf3) @ericstj , @weshaggard 5234 area-System.Net UDP tests fail with invalid checksum ``` System.Net.Sockets.Tests.SendReceive.SendToRecvFromAsync_Single_Datagram_UDP_IPv4 [FAIL] 11:27:58 Assert.Equal() Failure 11:27:58 Expected: 0 11:27:58 Actual: 1161193313 11:27:58 Stack Trace: 11:27:58 d:\j\workspace\dotnet_corefx\windows_nt_release_prtest\src\System.Net.Sockets\tests\FunctionalTests\SendReceive.cs(121,0): at System.Net.Sockets.Tests.SendReceive.SendToRecvFromAsync_Datagram_UDP(IPAddress leftAddress, IPAddress rightAddress) ``` http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_release_prtest/682/console 5235 area-Infrastructure Build.sh runs tests that should not be supported Running build.sh on Ubuntu (for example) will run the Microsoft.Win32.Registry tests, as well as a bunch of other inapplicable test projects. It seems that only runtests.sh is actually detecting which projects should be skipped. 5236 area-Infrastructure GenFacades failure in CI due to file in use "http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_debug_prtest/689/consoleFull#-37241274779494335-f7bd-47d0-8771-8661e00c2db2 cc @mellinoe @weshaggard ``` 11:29:16 Unhandled Exception: System.IO.IOException: The process cannot access the file 'd:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\bin\obj\AnyOS.AnyCPU.Debug\System.Runtime\System.Runtime.dll' because it is being used by another process. 11:29:16 at System.IO.Win32FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs) 11:29:16 at System.IO.Win32FileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) 11:29:16 at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) 11:29:16 at GenFacades.Program.OutputFacadeToFile(String facadePath, HostEnvironment seedHost, Assembly facade, IAssembly contract, String pdbLocation) 11:29:16 at GenFacades.Program.Main(String[] args) 11:29:16 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00144\lib\partialfacades.targets(101,5): error MSB3073: The command """"d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\bin/obj/AnyOS.AnyCPU.Debug\ToolRuntime\CoreRun.exe"" ""d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00144/lib/GenFacades.exe"" -partialFacadeAssemblyPath:""d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\bin/obj/AnyOS.AnyCPU.Debug\System.Runtime\PreGenFacades\System.Runtime.dll"" -contracts:""d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\bin\ref\System.Runtime\4.0.21.0\System.Runtime.dll"" -seeds:""d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\packages/Microsoft.TargetingPack.Private.CoreCLR\1.0.0-rc2-23520\ref\dnxcore50\mscorlib.dll;d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\bin\Windows_NT.AnyCPU.Debug\System.Private.Uri\System.Private.Uri.dll"" -facadePath:""d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\bin/obj/AnyOS.AnyCPU.Debug\System.Runtime"""" exited with code -532462766. [d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Runtime\src\System.Runtime.csproj] ``` " 5238 area-System.Net Significantly reduce release logging overhead in System.Net.Sockets Logging work that's happening in System.Net.Sockets in release builds and even when logging is disabled is resulting in significant impact on both memory allocated and on throughput. This set of commits adjusts how the logging is done so that work which happens at the call site only occurs if logging is enabled, if an assertion's condition fails, etc. This includes lots of string allocation, array allocation, array copies, hashing, etc. @pgavlin shared with me a simple set of tests that just have a client connect up to a server and receive a bunch of data. Prior to these changes, running this test with 4096 clients receiving 128 bytes each, the test client allocated ~45MB. After these changes, the client allocated only ~15MB. Throughput on the client also improved by ~20% on my machine. (This is on Windows with a release build of System.Net.Sockets.dll and with logging disabled.) cc: @pgavlin, @CIPop, @davidsh, @ericeil, @josguil Example before: ![image](https://cloud.githubusercontent.com/assets/2642209/12184632/620b0a1e-b564-11e5-9d48-b45e9884809b.png) Example after: ![image](https://cloud.githubusercontent.com/assets/2642209/12184576/0b3dce42-b564-11e5-9e3c-99871f89631c.png) 5241 area-System.Security WindowsIdentity ctor doesn't support WindowsAccountType and isAuthenticated The ctor was used by NegotiateStream to create an authenticated WindowsIdentity (in NegoState.Windows.cs:333). The lack of the ctor causes a difference in the behavior of NegotiateStream on .Net Desktop vs CoreFX. 5244 area-System.Linq Should Expression.TypeIs allow void as a type argument? "Currently any expression will compare with `void` with `TypeIs` as `false`: ``` C# Expression.Lambda>( Expression.TypeIs(Expression.Empty(), typeof(void)) ).Compile()() // false ``` This is at odds with `TypeEqual`: ``` C# Expression.Lambda>( Expression.TypeEqual(Expression.Empty(), typeof(void)) ).Compile()() // true ``` The decision happens at `AnalyzeTypeIs()` which is commented as saying: ``` C# // Oddly, we allow void operands // This is LinqV1 behavior of TypeIs ``` Arguably, its not that odd to allow void operands, considering that expressions of void type are allowed, or more reasonaly that dynamic use could mean passing something an expression of type `void` one time and a different type another. This also makes it a logical exception to the comment saying the result should match the result of `isinst` since there's no way to pass a void expression's value to in CIL (obviously enough as it doesn't have one). The differences between expression trees and CIL (and C#, VB.NET, etc.) are such that what is meaningless in CIL is meaningful, though constant, in trees. As such it seems to me that the value of `Expression.TypeIs(Expression.Empty(), typeof(void))` should be true, rather than false. In the other direction, we allow `Expression.TypeIs(Expression.Constant(""hello""), typeof(void))` but: ``` C# Expression.Lambda>(Expression.TypeIs(Expression.Constant(""hello""), typeof(void))).Compile()() ``` Throws `InvalidProgramException`. By the same reasoning as above it would make sense for this to return false. This would also make it match `IsInstanceOf()` (but not `isinst` but again that isn't as meaningful in CIL as it is in trees). " 5246 area-System.Net SendReceive.SendRecvAsync_TcpListener_TcpClient_IPv4 failed in CI on CentOS http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/centos7.1_debug_tst_prtest/608/console ``` 05:24:14 System.Net.Sockets.Tests.SendReceive.SendRecvAsync_TcpListener_TcpClient_IPv4 [FAIL] 05:24:14 Assert.True() Failure 05:24:14 Expected: True 05:24:14 Actual: False 05:24:14 Stack Trace: 05:24:14 at System.Net.Sockets.Tests.SendReceive.SendRecvAsync_TcpListener_TcpClient(IPAddress listenAt) 05:24:14 at System.Net.Sockets.Tests.SendReceive.SendRecvAsync_TcpListener_TcpClient_IPv4() 05:24:15 05:24:15 Unhandled Exception: Xunit.Sdk.TrueException: Assert.True() Failure 05:24:15 Expected: True 05:24:15 Actual: False 05:24:15 at Xunit.Assert.True(Nullable`1 condition, String userMessage) 05:24:15 at System.Net.Sockets.Tests.SendReceive.<>c__DisplayClass2_0.b__1(Int32 sent) 05:24:15 at System.Net.Sockets.Tests.SocketAsyncExtensions.<>c__DisplayClass7_0.b__0(Object _, SocketAsyncEventArgs args) 05:24:15 at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e) 05:24:15 at System.Net.Sockets.SocketAsyncEventArgs.ExecutionCallback(Object ignored) 05:24:15 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 05:24:15 at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags) 05:24:15 at System.Net.Sockets.SocketAsyncEventArgs.CompletionCallback(Int32 bytesTransferred, SocketError socketError) 05:24:15 at System.Net.Sockets.SocketAsyncEventArgs.TransferCompletionCallback(Int32 bytesTransferred, Byte[] socketAddress, Int32 socketAddressSize, SocketFlags receivedFlags, SocketError socketError) 05:24:15 at System.Net.Sockets.SocketAsyncContext.<>c.b__48_0(Object args) 05:24:15 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 05:24:15 at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() 05:24:15 at System.Threading.ThreadPoolWorkQueue.Dispatch() ``` cc: @pgavlin, @ericeil, @cipop 5247 area-System.Linq Expression.TypeEquals throws on void-typed operand in Interpreter These work fine with the compiler: ``` C# Expression.Lambda>( Expression.TypeEqual(Expression.Empty(), typeof(void)) ).Compile(false)(); // true Expression.Lambda>( Expression.TypeEqual(Expression.Empty(), typeof(int)) ).Compile(false)(); // false ``` These throw `IndexOutOfRangeException` (or hit an assert in debug): ``` C# Expression.Lambda>( Expression.TypeEqual(Expression.Empty(), typeof(void)) ).Compile(true)(); Expression.Lambda>( Expression.TypeEqual(Expression.Empty(), typeof(int)) ).Compile(true)(); ``` CC: @bartdesmet @VSadov 5248 area-System.IO Cross-platform way of getting HOME directory Right now there doesn't seem to be any simple cross-platform way of getting the current home directory. This would seem to be a common-enough need, especially as .NET Core begins to be used outside of web apps. One complication as to why this is non-trivial is that the environment variable to this location is different on different OS's. Developers should not need to be aware of this just to get a home directory. It seems like there is some code to do this internally and it's even more complicated than I initially thought: https://github.com/dotnet/corefx/blob/d8508b20caa5fe523f1552cde174cb9ba5c31730/src/Common/src/System/IO/PersistedFiles.Unix.cs#L100 I wouldn't expect anyone to get that right if they had to do that on their own. I don't have any specific proposals but something might fit into the Environment class to return that. 5250 area-System.Net Guard logging usage behind IsEnabled checks in the rest of System.Net.* Same treatment as in #5238, but for the rest of System.Net. I may have missed a call site here or there, but those can be fixed as one-offs. Contributes to #5144 cc: @ericeil, @pgavlin, @davidsh, @cipop, @josguil 5251 area-System.Net Unix SslStream may be reporting ECDH exchanges as ECDSA There may be no bug here. I merely saw some code that confused me while fixing another issue, and feel that it warrants investigation. If it's correct, it probably warrants a comment :smile:. https://github.com/dotnet/corefx/blob/71544a4ea55406740b1d3a00667b3ef0b816c9a2/src/Native/System.Security.Cryptography.Native/pal_ssl.cpp#L426-L433 ``` c++ case SSL_KeyExchangeAlgorithm::SSL_kECDHr: return ExchangeAlgorithmType::SSL_ECDH; case SSL_KeyExchangeAlgorithm::SSL_kECDHe: return ExchangeAlgorithmType::SSL_ECDSA; case SSL_KeyExchangeAlgorithm::SSL_kEECDH: return ExchangeAlgorithmType::SSL_ECDSA; ``` Note that ECDHr says ECDH, while ECDHe and EECDH say ECDSA. Based on comparison against what might be a trace helper in OpenSsl (https://github.com/openssl/openssl/blob/bc71f91064a3eec10310fa4cc14fe2a3fd9bc7bb/ssl/t1_trce.c#L909) I can understand why ECDHe and EECDH say ECDSA, but then I'd expect ECDHr to say RSA. Really these need to be validated against what we say in Windows for the same session types. 5252 area-System.Data SQL Client: Unable to load sni.dll (DllNotFoundException) Several customers have reported errors loading sni.dll. This is not the same as https://github.com/dotnet/corefx/issues/3760 because installing the Microsoft Visual C++ 2012 Redistributable does not resolve the issue. Examples of the customer reports are on https://github.com/aspnet/EntityFramework/issues/4162. Many of those are seeing the error when using EF7 but have confirmed that the error reproduces when using SQL Client directly. Several people have reported that the error occurs under the following environment > coreclr-x64-rc1-update1 with IIS 7.5 on Windows Server 2008 R2 with C++ redistributable installed (x64 & x86). Full details of the exception... ``` The type initializer for 'System.Data.SqlClient.TdsParser' threw an exception.Exception caught: The type initializer for 'System.Data.SqlClient.SNILoadHandle' threw an exception.Exception caught: Unable to load DLL 'C:\Users\ddragan\.dnx\packages\runtime.win7-x64.System.Data.SqlClient.sni\4.0.0-beta-23616\runtimes\win7-x64\native\sni.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)Exception thrown: 'System.TypeInitializationException' in Platform.Authentication Exception thrown: 'System.TypeInitializationException' in mscorlib.ni.dll Microsoft.AspNet.Diagnostics.ExceptionHandlerMiddleware:Error: An unhandled exception has occurred: The type initializer for 'System.Data.SqlClient.TdsParser' threw an exception. System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.TdsParser' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SNILoadHandle' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'C:\Users\ddragan\.dnx\packages\runtime.win7-x64.System.Data.SqlClient.sni\4.0.0-beta-23616\runtimes\win7-x64\native\sni.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) at System.Runtime.Loader.AssemblyLoadContext.InternalLoadUnmanagedDllFromPath(String unmanagedDllPath) at Microsoft.Dnx.Runtime.Loader.PackageAssemblyLoader.LoadUnmanagedLibrary(String name) at Microsoft.Dnx.Host.LoaderContainer.LoadUnmanagedLibrary(String name) at Microsoft.Dnx.Runtime.Loader.LoadContext.LoadUnmanagedDll(String unmanagedDllName) at System.Runtime.Loader.AssemblyLoadContext.ResolveUnmanagedDll(String unmanagedDllName, IntPtr gchManagedAssemblyLoadContext) at System.Data.SqlClient.SNINativeMethodWrapper.SNIInitialize(IntPtr pmo) at System.Data.SqlClient.SNILoadHandle..ctor() at System.Data.SqlClient.SNILoadHandle..cctor() --- End of inner exception stack trace --- at System.Data.SqlClient.TdsParser..cctor() --- End of inner exception stack trace --- at ExternalDataAccessor.GetFirm(String firmName) ``` 5253 area-System.Net Unix SslStream: SSL_KeyExchangeAlgorithm values may no longer match OpenSSL "While looking into the background for #5251 I ran across a commit in OpenSSL that looks like it'll break assumptions made in `pal_ssl.cpp`. Namely https://github.com/openssl/openssl/commit/bc71f91064a3eec10310fa4cc14fe2a3fd9bc7bb: ``` diff /* tmp DH key no DH cert */ -# define SSL_kDHE 0x00000008U +# define SSL_kDHE 0x00000002U /* synonym */ # define SSL_kEDH SSL_kDHE /* ECDH cert, RSA CA cert */ -# define SSL_kECDHr 0x00000020U +# define SSL_kECDHr 0x00000004U /* ECDH cert, ECDSA CA cert */ -# define SSL_kECDHe 0x00000040U +# define SSL_kECDHe 0x00000008U /* ephemeral ECDH */ -# define SSL_kECDHE 0x00000080U +# define SSL_kECDHE 0x00000010U /* synonym */ # define SSL_kEECDH SSL_kECDHE ``` These values come from a non-public header (ssl_locl.h). We very likely need a new mechanism for determining these values. The most public way that I see is to use the `SSL_CIPHER->name` value, and compare it against the public identifiers (e.g. `SSL_TXT_kECDHr`); but that's not from in-depth investigation. ``` jbarton@jsb-ubuntu2:/usr/include/openssl$ grep -i ecdhr * ssl.h:#define SSL_TXT_kECDHr ""kECDHr"" jbarton@jsb-ubuntu2:/usr/include/openssl$ ``` " 5255 area-System.Drawing Implement IEquatable interface on System.Drawing structs This requires changes to the .NET Full Framework code as well, changes to .NET Core to be made after following up with the desktop release cycles to ensure no breaks happen. Follow up from PR #1563 # Motivation These structures all have equality operators, they should also implement the IEquatable interface. # Proposed API ``` C# namespace System.Drawing { public struct Color : IEquatable { public bool Equals(Color other); } public struct Point : IEquatable { public bool Equals(Point other); } public struct PointF : IEquatable { public bool Equals(PointF other); } public struct Rectangle : IEquatable { public bool Equals(Rectangle other); } public struct RectangleF : IEquatable { public bool Equals(RectangleF other); } public struct Size : IEquatable { public bool Equals(Size other); } public struct SizeF : IEquatable { public bool Equals(SizeF other); } } ``` 5256 area-System.Drawing Write alternate implementations for GetHashCode System.Drawing float types. PR: #5223, [comment](https://github.com/dotnet/corefx/pull/5223#discussion_r49156587) This also requires changes to .NET Full Framework desktop code. 5258 area-System.Net SendToRecvFromAsync_Single_Datagram_UDP_IPv4 failed in CI on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_release_prtest/731/ ``` 13:26:44 System.Net.Sockets.Tests.SendReceive.SendToRecvFromAsync_Single_Datagram_UDP_IPv4 [FAIL] 13:26:44 Assert.Equal() Failure 13:26:44 Expected: 0 13:26:44 Actual: 2413092642 13:26:44 Stack Trace: 13:26:44 d:\j\workspace\dotnet_corefx\windows_nt_release_prtest\src\System.Net.Sockets\tests\FunctionalTests\SendReceive.cs(121,0): at System.Net.Sockets.Tests.SendReceive.SendToRecvFromAsync_Datagram_UDP(IPAddress leftAddress, IPAddress rightAddress) ``` 5260 area-Infrastructure Find a way to Mock function calls for Unit Testing Some functions have branches that are dependent on conditions that cannot be hit during normal Unit Test conditions, such as relying on System.Diagnostics.Debugger.IsAttached. Being able to mock function calls / return values would benefit the testing framework 5262 area-System.IO System.IO.Compression: Modify path validation to be based on ZipArchive source OS This commit resolves #4991 by adding explicit path validation based on the OS that a ZipArchive was written on instead of just using CheckInvalidPathChars for all cases. This PR will fail until a new corefx-testdata package is published that contains the test assets for the new tests added. @stephentoub 5265 area-System.Net System.Net GlobalLog.Assert* must call Debug.Assert even if nothing is listening for the ETW events The original GlobalLog code was calling `Debug.Assert`: http://referencesource.microsoft.com/#System/net/System/Net/_LoggingObject.cs,978 We need to fix the `GlobalLog.Assert*` as well as ensuring that the Assert is not conditioned by `GlobalLog.IsEnabled` when being called. 5266 area-System.Net System.Net.Http.HttpRequestException does not have a deserialization constructor Nor it is marked with `Serializable` attribute. Is it by design? It seems that full .NET Framework has this type marked with `ISerializable` but a deserialization constructor is also missing there. 5267 area-System.Globalization EnUsPosixIsNotATurkishCasingLocale running on Windows sometimes EnUsPosixIsNotATurkishCasingLocale is marked with [PlatformSpecific(PlatformID.AnyUnix)] but as of #5242 seems to be getting picked up on Windows as well. I have added some code to the test to workaround this issue, but we need to fix it for real. One problematic issue is that you may not see the test fail on Windows 10, since it allows more cultures that 8.1 5272 area-System.Linq Expression.TypeEquals throws on Nullable parameter. ``` C# Expression value = Expression.Constant(DateTime.MaxValue, typeof(DateTime?)); var param = Expression.Parameter(value.Type); Func func = Expression.Lambda>( Expression.Block( new[] { param }, Expression.Assign(param, value), Expression.TypeEqual(param, typeof(object)) ) ).Compile(); ``` The above throws `InvalidOperationException` on the `Compile()` with both compilation options. This happens for any type for the `type` parameter except for the actual nullable type of the parameter which correctly returns `false` if the value of `value` is null and `true` otherwise. This includes the related non-nullable type (should return the same as with the nullable type). 5281 area-System.Net Native assert failed in NetworkInformation on Ubuntu in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/ubuntu_debug_tst/213/console ``` 00:04:32 corerun: /mnt/j/workspace/dotnet_corefx/nativecomp_ubuntu_debug/src/Native/System.Native/pal_networkchange.cpp:66: NetworkChangeKind SystemNative_ReadSingleEvent(int32_t): Assertion `(hdr->nlmsg_flags & 2) == 0' failed. ``` 5283 area-System.Net NegotiateStream tests: timeout http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_debug_prtest/770/consoleFull ``` 05:38:51 System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.NegotiateStream_StreamToStream_Successive_ClientWrite_Sync_Success [FAIL] 05:38:51 Starting: System.ObjectModel.Tests 05:38:51 Handshake completed in the allotted time 05:38:51 Expected: True 05:38:51 Actual: False 05:38:51 Stack Trace: 05:38:51 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs(207,0): at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.NegotiateStream_StreamToStream_Successive_ClientWrite_Sync_Success() ``` 5284 area-System.Net NegotiateStream tests: Unable to read data from the transport connection: Queue empty http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_debug_prtest/772/consoleFull ``` 06:00:09 System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.NegotiateStream_StreamToStream_Successive_ClientWrite_Async_Success [FAIL] 06:00:09 System.AggregateException : One or more errors occurred. 06:00:09 ---- System.IO.IOException : Unable to read data from the transport connection: Queue empty.. 06:00:09 -------- System.InvalidOperationException : Queue empty. 06:00:09 Stack Trace: 06:00:09 at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) 06:00:09 at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout) 06:00:09 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs(240,0): at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.NegotiateStream_StreamToStream_Successive_ClientWrite_Async_Success() 06:00:09 ----- Inner Stack Trace ----- 06:00:09 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Security\src\System\Net\SecureProtocols\NegoState.Windows.cs(447,0): at System.Net.Security.NegoState.EndProcessAuthentication(IAsyncResult result) 06:00:09 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Security\src\System\Net\SecureProtocols\NegotiateStream.cs(114,0): at System.Net.Security.NegotiateStream.EndAuthenticateAsClient(IAsyncResult asyncResult) 06:00:09 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 06:00:09 ----- Inner Stack Trace ----- 06:00:09 at System.Collections.Generic.Queue`1.Dequeue() 06:00:09 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Security\tests\FunctionalTests\MockNetwork.cs(34,0): at System.Net.Security.Tests.MockNetwork.ReadFrame(Boolean server, Byte[]& buffer) 06:00:09 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Security\tests\FunctionalTests\FakeNetworkStream.cs(102,0): at System.Net.Security.Tests.FakeNetworkStream.UpdateReadStream() 06:00:09 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Security\tests\FunctionalTests\FakeNetworkStream.cs(82,0): at System.Net.Security.Tests.FakeNetworkStream.Read(Byte[] buffer, Int32 offset, Int32 count) 06:00:09 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\Common\src\System\IO\StreamAsyncHelper.cs(74,0): at System.IO.StreamAsyncHelper.<>c.b__7_0(Object obj) 06:00:09 at System.Threading.Tasks.Task`1.InnerInvoke() 06:00:09 System.Numerics.Vectors.Tests -> d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\bin\Windows_NT.AnyCPU.Debug\System.Numerics.Vectors.Tests\System.Numerics.Vectors.Tests.dll 06:00:09 at System.Threading.Tasks.Task.Execute() 06:00:09 --- End of stack trace from previous location where exception was thrown --- 06:00:09 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 06:00:09 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 06:00:09 at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() 06:00:09 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\Common\src\System\IO\StreamAsyncHelper.cs(133,0): at System.IO.StreamAsyncHelper.EndRead(IAsyncResult asyncResult) 06:00:09 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Security\src\System\Net\StreamFramer.cs(205,0): at System.Net.StreamFramer.ReadFrameComplete(IAsyncResult transportResult) 06:00:09 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Security\src\System\Net\StreamFramer.cs(169,0): at System.Net.StreamFramer.ReadFrameCallback(IAsyncResult transportResult) ``` 5285 area-System.Net Mop up more System.Net logging guards Some more GlobalLog.IsEnabled guards. I noticed a few while doing some other profiling, and so did another set of searches across the whole codebase. Many of these came from the System.Net.Security PRs that were in-progress at the same time I was doing the previous logging changes. cc: @davidsh, @cipop, @ericeil, @pgavlin, @josguil (@cipop, there's no rush on merging this... if it's going to cause conflicts elsewhere, we can delay merging this until those other PRs are in and then I can handle fixing up any conflicts... just let me know.) 5286 area-System.Reflection Method exposing the Initblk opcode Hello! I'm looking at some optimizations in some unsafe code and i ran into an opcode called Initblk, http://stackoverflow.com/questions/1897555/what-is-the-equivalent-of-memset-in-c#_=_ and https://msdn.microsoft.com/en-us/library/system.reflection.emit.opcodes.initblk(v=vs.110).aspx Is this now exposed somewhere in the core fx? if not, i'd love to help add it but i'm not sure what the best way to do it would be. The folks in the SO thread does it via emitting but i would be great to have built in, especially for --native down the line. Any thoughts on this are welcome! 5291 area-System.Net ConnectAsyncV6IPEndPointToV6Host_Success failed in CI on Ubuntu http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/ubuntu_release_tst_prtest/655/console ``` 13:35:12 System.Net.Sockets.Tests.DualMode.ConnectAsyncV6IPEndPointToV6Host_Success [FAIL] 13:35:12 System.Net.Sockets.SocketException : Unknown error 10054 13:35:12 Stack Trace: 13:35:13 at System.Net.Sockets.Tests.DualMode.DualModeConnectAsync_IPEndPointToHost_Helper(IPAddress connectTo, IPAddress listenOn, Boolean dualModeServer) ``` Likely the same cause as: https://github.com/dotnet/corefx/issues/3748 https://github.com/dotnet/corefx/issues/3744 https://github.com/dotnet/corefx/issues/3682 https://github.com/dotnet/corefx/issues/3494 5293 area-System.Collections Incorrect ArgumentNullException In List.ForEach "It looks like the `ArgumentNullException` in [System.Collections.Generic.List](https://github.com/dotnet/corefx/blob/master/src/System.Collections/src/System/Collections/Generic/List.cs#L603) is passing in ""match"" as the null param instead of ""action"". " 5296 area-System.Data Use the Azure Sql database benchmark infrastructure to stress test System.Data "While System.Net.Sockets provides the same ""completion port"" interface for both Windows and Linux The underlying implementation for Linux is radically different and is implemented using an epoll event loop. This is important to keep in mind since SqlClient or any other DB driver are the most important consumers of this Api. I suggest using Azure Sql database benchmark infrastructure to do the stress test, preferably inside azure first, so timeout handling behavior can be observed. https://azure.microsoft.com/en-us/documentation/articles/sql-database-benchmark-overview/#schema " 5297 area-System.Net CertificateValidationRemoteServer_EndToEnd_Ok failed in CI on Windows A bunch of occurrences of this over the past day: ``` 04:09:01 System.Net.Security.Tests.CertificateValidationRemoteServer.CertificateValidationRemoteServer_EndToEnd_Ok [FAIL] 04:09:01 System.Net.Internals.InternalSocketException : No such host is known 04:09:01 Stack Trace: 04:09:01 at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) 04:09:01 at System.Net.Sockets.TcpClient.EndConnect(IAsyncResult asyncResult) 04:09:01 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 04:09:01 --- End of stack trace from previous location where exception was thrown --- 04:09:01 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 04:09:01 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 04:09:01 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() 04:09:01 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Security\tests\FunctionalTests\CertificateValidationRemoteServer.cs(19,0): at System.Net.Security.Tests.CertificateValidationRemoteServer.d__0.MoveNext() 04:09:01 --- End of stack trace from previous location where exception was thrown --- 04:09:01 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 04:09:01 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 04:09:01 --- End of stack trace from previous location where exception was thrown --- 04:09:01 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 04:09:01 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 04:09:01 --- End of stack trace from previous location where exception was thrown --- 04:09:01 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 04:09:01 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_debug_prtest/791/consoleFull http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_debug_prtest/787/consoleFull http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_release_prtest/790/consoleFull 5302 area-System.Net Fix URL used in System.Net.Security tests An incorrect URL was causing the CertificateValidationRemoteServer_EndToEnd_Ok test to fail. Fixes #5297 cc: @cipop, @davidsh, @ericeil, @weshaggard 5304 area-System.Net Switch System.Net.Security test to use shared HttpTestServers cc: @davidsh 5306 area-System.IO FileSystemWatcher_Moved_NestedDirectoryRootWithoutSubdirectoriesFlag failed with UnauthorizedAccessException on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_release/222/consoleFull ``` 08:50:59 RenamedTests.FileSystemWatcher_Moved_NestedDirectoryRootWithoutSubdirectoriesFlag [FAIL] 08:50:59 System.UnauthorizedAccessException : Access to the path '\\?\d:\j\workspace\dotnet_corefx\windows_nt_release\bin\tests\Windows_NT.AnyCPU.Release\System.IO.FileSystem.Watcher.Tests\dnxcore50\FileSystemWatcher_Moved_NestedDirectoryRootWithoutSubdirectoriesFlag\test_root' is denied. 08:50:59 Stack Trace: 08:51:00 d:\j\workspace\dotnet_corefx\windows_nt_release\src\System.IO.FileSystem\src\System\IO\Win32FileSystem.cs(627,0): at System.IO.Win32FileSystem.RemoveDirectoryHelper(String fullPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound) 08:51:00 d:\j\workspace\dotnet_corefx\windows_nt_release\src\System.IO.FileSystem\src\System\IO\Win32FileSystem.cs(493,0): at System.IO.Win32FileSystem.RemoveDirectory(String fullPath, Boolean recursive) 08:51:00 d:\j\workspace\dotnet_corefx\windows_nt_release\src\System.IO.FileSystem.Watcher\tests\Utility\TemporaryTestDirectory.cs(32,0): at TemporaryTestDirectory.Dispose() 08:51:00 d:\j\workspace\dotnet_corefx\windows_nt_release\src\System.IO.FileSystem.Watcher\tests\FileSystemWatcher.Renamed.cs(166,0): at RenamedTests.FileSystemWatcher_Moved_NestedDirectoryRootWithoutSubdirectoriesFlag() ``` 5311 area-Infrastructure Build.cmd: Add arg to enable/disable native Windows build "Currently the native Windows build will run whenever build.cmd is called. We should add an arg check to enable/disable it like in build.sh where ""build.sh native"" builds native code only, ""build.sh managed"" builds managed code only, and ""build.sh"" builds both. " 5312 area-System.Collections Cleanup and complete System.Collections.NonGeneric tests Completely revamped the System.Collections.NonGeneric test project - Rewrote every single test in the project - Converted tests to modern xunit testing - Split individual tests into multiple tests - Deobfuscate loads of tests - Remove unnecessary (already covered) tests - Test uncovered areas of the library - Removed dead code from the library itself 5314 area-System.Security Add ExportParameters/ImportParameters to ECDsa We have ExportParameters/ImportParameters for RSA (and DSA on Desktop), but don't have them for the EC types (ECDsa, ECDiffieHellman). While RSA and DSA parameters are always fixed (modulo the public/private distinction) ECParameters are polymorphic in the spec. Snippets from [SEC-1 v2 (2009)](http://www.secg.org/sec1-v2.pdf): ``` asn ECDomainParameters{ECDOMAIN:IOSet} ::= CHOICE { specified SpecifiedECDomain, named ECDOMAIN.&id({IOSet}), implicitCA NULL } SpecifiedECDomain ::= SEQUENCE { version SpecifiedECDomainVersion(ecdpVer1 | ecdpVer2 | ecdpVer3, ...), fieldID FieldID {{FieldTypes}}, curve Curve, base ECPoint, order INTEGER, cofactor INTEGER OPTIONAL, hash HashAlgorithm OPTIONAL, ... } FieldID { FIELD-ID:IOSet } ::= SEQUENCE { -- Finite field fieldType FIELD-ID.&id({IOSet}), parameters FIELD-ID.&Type({IOSet}{@fieldType}) } FieldTypes FIELD-ID ::= { { Prime-p IDENTIFIED BY prime-field } | { Characteristic-two IDENTIFIED BY characteristic-two-field } } BasisTypes CHARACTERISTIC-TWO ::= { { NULL IDENTIFIED BY gnBasis } | { Trinomial IDENTIFIED BY tpBasis } | { Pentanomial IDENTIFIED BY ppBasis }, ... } ``` This is probably something like ``` C# public abstract class ECParameters { public byte[] Qx { get; set; } public byte[] Qy { get; set; } public byte[] D { get; set; } } public class NamedCurveECParameters : ECParameters { public Oid CurveId { get; set; } } public abstract class ExplicitECParameters : ECParameters { public byte[] Order { get; set; } public byte[] Cofactor { get; set; } } ... ``` Do we want any of them to be BigInteger instead of byte[]? Etc. Should we have an API that accepts a NamedCurve and returns it as an explicit one? Or should that be a tuning parameter on Export? Do we need public API to describe the limitations of an implementation? (Windows doesn't do Char-2 curves, etc). Do we want to allow an explicit curve to be mapped back to a named one? Lots of questions to be answered :smile:. 5315 area-Meta Rename constant NET_NATIVE to netcore50 This is a tracking issue to rename this constant to follow our naming conventions. 5320 area-Infrastructure Corefxlab nuget package version scheme is broken "Currently, we use .dMMDDYY-N versioning scheme for packages. This does not work as nuget (and VS) use linguistic sort order of the "".d..."" part to determine which version order and so: .d010116 is considered to be older than .d123015 " 5322 area-System.Net Add net46 and netcore50 configurations for System.Net.NetworkInformation All of the source code is already here, just adding the project configurations and appropriate project.json entries. @davidsh , @CIPop , @weshaggard 5325 area-System.Threading AsyncInfoToTaskBridge may leak when in debug mode. In debug mode, AsyncInfoToTaskBridge is adding tasks to the Active Task list on it's constructor. However it is never removing them due to some line missing when ported from previous implementation. The solution would be to remove the task from the Active tasks list when completing. https://github.com/dotnet/corefx/blob/cf17ff1d110b9984e63a1825b3d012c8002a8a3b/src/System.Runtime.WindowsRuntime/src/System/Threading/Tasks/AsyncInfoToTaskBridge.cs#L128 I'm submitting the P.R. after creating the issue. 5326 area-System.Net NegotiateStream_StreamToStream_Authentication_Success failed in CI on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_release_prtest/854/consoleFull ``` 19:42:31 System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.NegotiateStream_StreamToStream_Authentication_Success [FAIL] 19:42:31 System.AggregateException : One or more errors occurred. 19:42:31 ---- System.IO.IOException : Unable to read data from the transport connection: Queue empty.. 19:42:31 -------- System.InvalidOperationException : Queue empty. 19:42:31 Stack Trace: 19:42:31 at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) 19:42:31 d:\j\workspace\dotnet_corefx\windows_nt_release_prtest\src\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs(36,0): at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.NegotiateStream_StreamToStream_Authentication_Success() 19:42:31 ----- Inner Stack Trace ----- 19:42:31 d:\j\workspace\dotnet_corefx\windows_nt_release_prtest\src\System.Net.Security\src\System\Net\SecureProtocols\NegoState.Windows.cs(445,0): at System.Net.Security.NegoState.EndProcessAuthentication(IAsyncResult result) 19:42:31 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 19:42:31 ----- Inner Stack Trace ----- 19:42:31 at System.Collections.Generic.Queue`1.Dequeue() 19:42:31 d:\j\workspace\dotnet_corefx\windows_nt_release_prtest\src\System.Net.Security\tests\FunctionalTests\MockNetwork.cs(34,0): at System.Net.Security.Tests.MockNetwork.ReadFrame(Boolean server, Byte[]& buffer) 19:42:31 d:\j\workspace\dotnet_corefx\windows_nt_release_prtest\src\System.Net.Security\tests\FunctionalTests\FakeNetworkStream.cs(103,0): at System.Net.Security.Tests.FakeNetworkStream.UpdateReadStream() 19:42:31 d:\j\workspace\dotnet_corefx\windows_nt_release_prtest\src\System.Net.Security\tests\FunctionalTests\FakeNetworkStream.cs(83,0): at System.Net.Security.Tests.FakeNetworkStream.Read(Byte[] buffer, Int32 offset, Int32 count) 19:42:31 at System.Threading.Tasks.Task`1.InnerInvoke() 19:42:31 at System.Threading.Tasks.Task.Execute() 19:42:31 --- End of stack trace from previous location where exception was thrown --- 19:42:31 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 19:42:31 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 19:42:31 d:\j\workspace\dotnet_corefx\windows_nt_release_prtest\src\Common\src\System\IO\StreamAsyncHelper.cs(105,0): at System.IO.StreamAsyncHelper.EndRead(IAsyncResult asyncResult) 19:42:31 d:\j\workspace\dotnet_corefx\windows_nt_release_prtest\src\System.Net.Security\src\System\Net\StreamFramer.cs(205,0): at System.Net.StreamFramer.ReadFrameComplete(IAsyncResult transportResult) 19:42:31 d:\j\workspace\dotnet_corefx\windows_nt_release_prtest\src\System.Net.Security\src\System\Net\StreamFramer.cs(169,0): at System.Net.StreamFramer.ReadFrameCallback(IAsyncResult transportResult) ``` 5330 area-System.Threading Missing System.Threading.ExecutionContext.IsFlowSuppressed() Hello, I am currently looking at porting a library to .NET Core and I have noticed there is no ExecutionContext.IsFlowSuppressed() method. Are there are any plans to implement this on .NET Core or are there any alternatives? 5331 area-Infrastructure CI broken? The web-view at dotnet-ci.cloudapp.net is unreachable, and the trigger phrases don't seem to be triggering new builds. Is CI down? 5332 area-Infrastructure Building with MSBuild or Visual Studio on Windows failing "Multiple projects, attempt to run MSBuild receive: > d:\dotnet\corefxTemp\dir.props(67,3): error MSB4019: The imported project ""d:\dotnet\corefxTemp\Tools\Build.Common.prop s"" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. [d:\d otnet\corefxTemp\src\System.Linq.Queryable\tests\System.Linq.Queryable.Tests.csproj] Attempt to build in Visual Studio receive: > The imported project ""D:\dotnet\corefx\packages\Microsoft.DotNet.BuildTools.1.0.25-prerelease-00144\lib\Build.Common.targets"" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. The problem seems to have been introduced with 3cbbca94331bd78f881903a2fd21edf2ebea4e31, particularly https://github.com/dotnet/corefx/commit/3cbbca94331bd78f881903a2fd21edf2ebea4e31#diff-0b192804a6349e8c26d2b027afbd89a2L52 " 5334 area-Infrastructure 6 warnings during clean build ``` C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [corefx\src\System.Net.Sockets.Legacy\tests\FunctionalTests\System.Net.Sockets.APMServer.Tests.csproj] C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [corefx\src\System.Net.Sockets.Legacy\tests\FunctionalTests\System.Net.Sockets.AsyncServer.Tests.csproj] C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [corefx\src\System.Net.Sockets.Legacy\tests\PerformanceTests\System.Net.Sockets.APM.Performance.Tests.csproj] C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [corefx\src\System.Net.Sockets\tests\FunctionalTests\System.Net.Sockets.Tests.csproj] C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [corefx\src\System.Net.Sockets\tests\PerformanceTests\System.Net.Sockets.Async.Performance.Tests.csproj] C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [corefx\src\System.Runtime.InteropServices.RuntimeInformation\tests\System.Runtime.InteropServices.RuntimeInformation.Tests.csproj] ``` 5335 area-Infrastructure Build fails with mulitple errors on Windows 10 (Jan-12) build /t:rebuild /property:Configuration=Debug /p:SkipTests=true System.Globalization -> C:\clrjunkie\corefx\bin\ref\System.Globalization\4.0.11.0\System.Globalization.dll C:\clrjunkie\corefx\src\Common\src\System\StringNormalizationExtensions.cs(17,20): error CS1501: No overload for method 'IsNormalized' takes 2 arguments [C:\clrjunkie\corefx\src\System.Globalization.Extensions\src\System.Globalization.Ext ensions.csproj] C:\clrjunkie\corefx\src\Common\src\System\StringNormalizationExtensions.cs(23,20): error CS1501: No overload for method 'Normalize' takes 2 arguments [C:\clrjunkie\corefx\src\System.Globalization.Extensions\src\System.Globalization.Extens ions.csproj] C:\clrjunkie\corefx\src\Common\src\System\IO\PathInternal.cs(24,30): error CS0117: 'PathInternal' does not contain a de finition for 'HasIllegalCharacters' [C:\clrjunkie\corefx\src\System.IO.Compression\src\System.IO.Compression.csproj] System\IO\Compression\ZipArchiveEntry.cs(115,38): error CS0103: The name 'CurrentZipPlatform' does not exist in the cur rent context [C:\clrjunkie\corefx\src\System.IO.Compression\src\System.IO.Compression.csproj] System\IO\Compression\ZipArchiveEntry.cs(256,24): error CS0103: The name 'ParseFileName' does not exist in the current context [C:\clrjunkie\corefx\src\System.IO.Compression\src\System.IO.Compression.csproj] System\IO\Compression\ZipArchiveEntry.cs(571,32): error CS0103: The name 'CurrentZipPlatform' does not exist in the cur rent context [C:\clrjunkie\corefx\src\System.IO.Compression\src\System.IO.Compression.csproj] C:\clrjunkie\corefx\src\Common\src\System\Diagnostics\Debug.cs(45,17): error CS0103: The name 's_logger' does not exist in the current context [C:\clrjunkie\corefx\src\System.Diagnostics.Debug\src\System.Diagnostics.Debug.csproj] C:\clrjunkie\corefx\src\Common\src\System\Diagnostics\Debug.cs(86,13): error CS0103: The name 's_logger' does not exist in the current context [C:\clrjunkie\corefx\src\System.Diagnostics.Debug\src\System.Diagnostics.Debug.csproj] C:\clrjunkie\corefx\Tools\Packaging.targets(460,5): error : File C:\clrjunkie\corefx\bin\Windows_NT.AnyCPU.Debug\System .Security.Cryptography.Algorithms\net46\System.Security.Cryptography.Algorithms.dll does not exist, ensure you have bui lt libraries before building the package. [C:\clrjunkie\corefx\src\System.Security.Cryptography.Algorithms\pkg\System.S ecurity.Cryptography.Algorithms.pkgproj] C:\clrjunkie\corefx\Tools\Packaging.targets(460,5): error : File C:\clrjunkie\corefx\bin\Windows_NT.AnyCPU.Debug\System .Security.Cryptography.Algorithms\net46\System.Security.Cryptography.Algorithms.dll does not exist, ensure you have bui lt libraries before building the package. [C:\clrjunkie\corefx\src\System.Security.Cryptography.Algorithms\pkg\System.S ecurity.Cryptography.Algorithms.pkgproj] C:\clrjunkie\corefx\Tools\Packaging.targets(897,5): error : Error when creating nuget package from C:\clrjunkie\corefx\ bin\pkg\specs\System.Security.Cryptography.Algorithms.nuspec. System.IO.DirectoryNotFoundException: Could not find a pa rt of the path 'C:\clrjunkie\corefx\bin\Windows_NT.AnyCPU.Debug\System.Security.Cryptography.Algorithms\net46'.\r [C:\c lrjunkie\corefx\src\System.Security.Cryptography.Algorithms\pkg\System.Security.Cryptography.Algorithms.pkgproj] C:\clrjunkie\corefx\Tools\Packaging.targets(897,5): error : at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)\r [C:\clrjunkie\corefx\src\System.Security.Cryptography.Algorithms\pkg\System.Security.Cryptography.Algo rithms.pkgproj] C:\clrjunkie\corefx\Tools\Packaging.targets(897,5): error : at System.IO.FileSystemEnumerableIterator`1.CommonInit() \r [C:\clrjunkie\corefx\src\System.Security.Cryptography.Algorithms\pkg\System.Security.Cryptography.Algorithms.pkgproj ] C:\clrjunkie\corefx\Tools\Packaging.targets(897,5): error : at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, B oolean checkHost)\r [C:\clrjunkie\corefx\src\System.Security.Cryptography.Algorithms\pkg\System.Security.Cryptography.A lgorithms.pkgproj] C:\clrjunkie\corefx\Tools\Packaging.targets(897,5): error : at System.IO.Directory.GetFiles(String path, String sear chPattern, SearchOption searchOption)\r [C:\clrjunkie\corefx\src\System.Security.Cryptography.Algorithms\pkg\System.Sec urity.Cryptography.Algorithms.pkgproj] C:\clrjunkie\corefx\Tools\Packaging.targets(897,5): error : at NuGet.PathResolver.PerformWildcardSearchInternal(Stri ng basePath, String searchPath, Boolean includeEmptyDirectories, String& normalizedBasePath)\r [C:\clrjunkie\corefx\src \System.Security.Cryptography.Algorithms\pkg\System.Security.Cryptography.Algorithms.pkgproj] C:\clrjunkie\corefx\Tools\Packaging.targets(897,5): error : at NuGet.PathResolver.ResolveSearchPattern(String basePa th, String searchPath, String targetPath, Boolean includeEmptyDirectories)\r [C:\clrjunkie\corefx\src\System.Security.C ryptography.Algorithms\pkg\System.Security.Cryptography.Algorithms.pkgproj] C:\clrjunkie\corefx\Tools\Packaging.targets(897,5): error : at NuGet.PackageBuilder.AddFiles(String basePath, String source, String destination, String exclude)\r [C:\clrjunkie\corefx\src\System.Security.Cryptography.Algorithms\pkg\Sys tem.Security.Cryptography.Algorithms.pkgproj] C:\clrjunkie\corefx\Tools\Packaging.targets(897,5): error : at NuGet.PackageBuilder.PopulateFiles(String basePath, I Enumerable`1 files)\r [C:\clrjunkie\corefx\src\System.Security.Cryptography.Algorithms\pkg\System.Security.Cryptography .Algorithms.pkgproj] C:\clrjunkie\corefx\Tools\Packaging.targets(897,5): error : at NuGet.PackageBuilder.ReadManifest(Stream stream, Stri ng basePath, IPropertyProvider propertyProvider)\r [C:\clrjunkie\corefx\src\System.Security.Cryptography.Algorithms\pkg \System.Security.Cryptography.Algorithms.pkgproj] C:\clrjunkie\corefx\Tools\Packaging.targets(897,5): error : at NuGet.PackageBuilder..ctor(String path, String basePa th, IPropertyProvider propertyProvider, Boolean includeEmptyDirectories)\r [C:\clrjunkie\corefx\src\System.Security.Cry ptography.Algorithms\pkg\System.Security.Cryptography.Algorithms.pkgproj] C:\clrjunkie\corefx\Tools\Packaging.targets(897,5): error : at Microsoft.DotNet.Build.Tasks.Packaging.NuGetPack.Exec ute() [C:\clrjunkie\corefx\src\System.Security.Cryptography.Algorithms\pkg\System.Security.Cryptography.Algorithms.pkgp roj] ``` 6 Warning(s) 11 Error(s) ``` Time Elapsed 00:33:47.81 Build Exit Code = 1 5336 area-System.Net Move failing DNS test to OuterLoop For a long time now I've been unable to get a clean local build because of this test. On the networks I'm usually on, the DNS server serves up a descriptive page for an invalid address, which causes this test to fail, as the test is expecting an error. I'm moving the test to OuterLoop so that at least normal builds/test runs can pass on such networks. cc: @davidsh, @cipop 5337 area-System.ComponentModel TypeConverter lookup does uncached reflection on CoreCLR We're making fairly frequent use of `TypeConverter` in ASP.NET MVC. Traditionally, it's been a point of extensibility in our system for enabling serialization of your types to and from strings in query string and form data. We also rely on the built in converters for commonly used built-in types like `DateTime`. On CoreCLR the lookup of a `TypeConverter` is doing a bunch of attribute work up and down the inheritance hierarchy before falling back to a lookup table. On Desktop CLR this is cached in the common case. The performance effect on MVC of all of this attribute lookup is quite large. This is sampling data from an app doing model binding on 3 fields and then displaying them in an HTML form. Two of these fields use `TypeConverter` as shown here in the profile. Percentages here reflect % of CPU time inside of routing/MVC: ![image](https://cloud.githubusercontent.com/assets/1430011/12270760/8902d09c-b90c-11e5-84f3-749c02cc57a6.png) **Is this something we could work to address inside CoreFx?** **Or should we implement our own cache?** This is caching we've never had a need to do on Desktop. 5339 area-System.Console CancelKeyPress not firing on coreclr on ubuntu "Code: ``` using System; using System.IO; namespace HelloMvc { public class Program { public static void Main(string[] args) { System.Console.CancelKeyPress += (s,e) => System.Console.WriteLine(""BBB""); Console.ReadLine(); } } } ``` project.json: ``` { ""version"": ""1.0.1-*"", ""compilationOptions"": { ""emitEntryPoint"": true }, ""dependencies"" : { ""NETStandard.Library"": ""1.0.0-*"" }, ""frameworks"": { ""dnxcore50"": { } } } ``` Steps: 1. Compile 2. Run 3. Press Ctrl+C Coreclr output: ``` ``` Mono output: ``` BBB ``` Environment: ``` > uname -a Linux pkrymets 3.19.0-31-generic #36-Ubuntu SMP Wed Oct 7 15:04:02 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux > cat /usr/local/share/dotnet/cli/.version ecda2a810615dda9f280fd8a87d23be2e2fcae45 1.0.0-dev-1452359345 ``` Packages: ``` Package references: Microsoft.NETCore.Platforms 1.0.1-rc2-23712 Microsoft.NETCore.Runtime 1.0.1-rc2-23712 Microsoft.NETCore.Runtime.CoreCLR 1.0.1-rc2-23712 Microsoft.NETCore.Runtime.Native 1.0.1-rc2-23712 Microsoft.NETCore.Targets 1.0.1-rc2-23712 Microsoft.NETCore.Targets.DNXCore 5.0.0-rc2-23712 Microsoft.NETCore.Windows.ApiSets 1.0.1-rc2-23712 Microsoft.Win32.Primitives 4.0.1-rc2-23712 * NETStandard.Library 1.0.0-rc2-23712 NETStandard.Platform 1.0.0-rc2-23712 System.AppContext 4.0.1-rc2-23712 System.Collections 4.0.11-rc2-23712 System.Collections.Concurrent 4.0.11-rc2-23712 System.Console 4.0.0-rc2-23712 System.Diagnostics.Debug 4.0.11-rc2-23712 System.Diagnostics.Process 4.1.0-rc2-23712 System.Diagnostics.Tools 4.0.1-rc2-23712 System.Diagnostics.Tracing 4.0.21-rc2-23712 System.Globalization 4.0.11-rc2-23712 System.Globalization.Calendars 4.0.1-rc2-23712 System.IO 4.1.0-rc2-23712 System.IO.FileSystem 4.0.1-rc2-23712 System.IO.FileSystem.Primitives 4.0.1-rc2-23712 System.Linq 4.0.1-rc2-23712 System.Net.Primitives 4.0.11-rc2-23712 System.Net.Sockets 4.1.0-rc2-23712 System.Private.Uri 4.0.1-rc2-23712 System.Reflection 4.1.0-rc2-23712 System.Reflection.Extensions 4.0.1-rc2-23712 System.Reflection.Primitives 4.0.1-rc2-23712 System.Reflection.TypeExtensions 4.1.0-rc2-23712 System.Resources.ResourceManager 4.0.0 System.Runtime 4.0.21-rc2-23712 System.Runtime.Extensions 4.0.11-rc2-23712 System.Runtime.Handles 4.0.1-rc2-23712 System.Runtime.InteropServices 4.0.21-rc2-23712 System.Runtime.InteropServices.RuntimeInformation 4.0.0-rc2-23712 System.Runtime.Numerics 4.0.1-rc2-23712 System.Text.Encoding 4.0.11-rc2-23712 System.Text.Encoding.Extensions 4.0.11-rc2-23712 System.Text.RegularExpressions 4.0.11-rc2-23712 System.Threading 4.0.11-rc2-23712 System.Threading.Tasks 4.0.11-rc2-23712 System.Threading.Timer 4.0.1-rc2-23712 ``` @muratg " 5343 area-Serialization Fix XmlDictionaryReaderQuotas so MaxDepth and MaxStringContentLength are honored MaxDepth and MaxStringContentLength settings in XmlDictionaryReaderQuotas are not effective due to missing the right handling in the implementation. This change adds the checks and throws exception when these two limit are exceeded. Fix #4651 @shmao @SGuyGe 5348 area-System.Diagnostics Process.Start isn't properly handling escape characters "e.g. the string `""\\"" ""\\\\""` is getting parsed as `\” \\\”` rather than as `\ \\` " 5349 area-Infrastructure Add Ubuntu 15.10 (Wily Werewolf) CI / Rolling Build In preparation for Ubuntu 16.04LTS shipping in April, we should start running on Ubuntu 15.10 as a temporary surrogate. We can then drop 15.10 when we add 16.04LTS later this year. https://wiki.ubuntu.com/Releases Related CI work items: https://github.com/dotnet/corefx/issues/4653 (2008 R2 ServerCore), https://github.com/dotnet/corefx/issues/4656 (Debian 8.2), https://github.com/dotnet/corefx/issues/4779 (2016 NanoServer) 5352 area-Serialization [Port] XmlReader.ReadValueChunk will throw ArgumentException when body contents contain double-wide chars encoded as UTF-8 This issue is to port a fix that was made on Desktop to corefx. Please see [Reference Source](http://referencesource.microsoft.com/#System.Runtime.Serialization/System/Xml/ValueHandle.cs,700) for the fix on Desktop. 5357 area-System.Net Port additional WebSocket tests "Port remaining websocket client tests dealing with close handshake semantics including ""server initiated"" close handshakes. Switch networking test servers to the newer Azure Cloud Service servers which work better with websocket close handshakes. " 5359 area-Infrastructure "System.Data.SqlClient tfms not aligned with ""runtime.unix.S.D.S""" "System.Data.SqlClient supports `dotnet5.4` but its `runtime.unix.System.Data.SqlClient` requires `dotnet5.5`. This leads to runtime errors due to missing dependencies on Linux/OSX. Example: ``` json { ""frameworks"": { ""dotnet5.4"": { ""dependencies"": { ""System.Data.SqlClient"": ""4.0.0-*"" } } } } ``` :white_check_mark: dotnet restore :x: dotnet run `Could not load file or assembly 'System.Net.Security'` Change to `dotnet5.5` :white_check_mark: dotnet restore :white_check_mark: dotnet run " 5360 area-System.Numerics Design initialization API for Vector that supports padding The size of `Vector` is hardware dependent. When constructing a vector, we either accept the value coming from an array or a raw pointer. However, the number of elements being read is always `Vector.Length`. In many cases, the number of inputs to be processed is extrinsically defined and might not be a multiplier of `Vector.Length`, i.e. it's likely that there is a remainder. It might be beneficial to support constructing a vector and if there are fewer values than `Vector.Length` we pad with, for instance, zeroes. @mellinoe @CarolEidt 5362 area-Serialization Add support for XmlElement for data contract serializers This change is porting the support for XmlElement from Desktop implementation to data contract serializers. @shmao @SGuyGe @zhenlan 5364 area-System.Threading AggregateException should report better error messages A common issue when not using await is the print out ex.Message or ex.ToString() In the case of `AggregateException` and perhaps also `TargetInvocationException` these messages are kinda useless: `One or more errors occurred.` it would be nice to print out a more detailed message by default: 1. Print out how many error where found. 2. Print out the actual inner exceptions 5373 area-System.Net Disable failing NegotiateStream test #5284, #5326 cc: @davidsh, @cipop 5374 area-System.Net Throw SocketException rather than PNSE for unsupported socket option on Unix Match Windows exception type when an unsupported socket option is provided. cc: @davidsh, @ericeil, @cipop, @pgavlin Fixes https://github.com/dotnet/corefx/issues/4897 5377 area-System.Reflection Consider adding TypeDefinition.IsNested { get; } I'm testing https://github.com/dotnet/corefx/pull/4809/files. DisassemblingTypeProvider, the sample implementation used for tests, calls TypeDefinition.Attributes.IsNested in GetTypeFromDefinition, which can't be done outside Roslyn. I'm guessing we'll want everything the reference implementation does be possible for public consumers to do. 5378 area-System.Diagnostics Process.Start() sometimes returns wrong ProcessName "If executing following code with NETStandard.Library of 1.0.0-rc2-23712: using System; using System.Diagnostics; namespace ConsoleApplication { public class Program { public static void Main(string[] args) { for (int i=0; i<100; i++) { ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.FileName = ""ping""; startInfo.Arguments = ""localhost -c 1""; ``` Process process = new Process(); process.StartInfo = startInfo; process.Start(); Console.WriteLine(""processName is: {0}"", process.ProcessName); } } } ``` } You will see that output ProcessName is usually correct (""ping"") the first time, but usually incorrect in subsequent iterations. If one extends the life of command (change argument to something like ""-c 3""), wait a second or so, and then do a ""GetProcessById"", you would see that the ProcessName has become correct. This indicates a race condition of some sort. " 5381 area-System.Reflection Add missing members for System.Reflection namespace This is a blanket issue to review gaps in System.Reflection namespace in .NetCore vs Desktop ### Proposed additions to .NET Core ``` diff ---.NET Core Currently +++.NET Core Proposed namespace System.Reflection { public sealed class AmbiguousMatchException : Exception { public AmbiguousMatchException(); public AmbiguousMatchException(string message); public AmbiguousMatchException(string message, Exception inner); } public abstract class Assembly { + public virtual string CodeBase { get; } public virtual IEnumerable CustomAttributes { get; } public abstract IEnumerable DefinedTypes { get; } public virtual MethodInfo EntryPoint { get; } + public virtual string EscapedCodeBase { get; } public virtual IEnumerable ExportedTypes { get; } public virtual string FullName { get; } public virtual bool IsDynamic { get; } public virtual string Location { get; } public virtual Module ManifestModule { get; } public abstract IEnumerable Modules { get; } public override bool Equals(object o); public static Assembly GetEntryAssembly(); public override int GetHashCode(); public virtual ManifestResourceInfo GetManifestResourceInfo(string resourceName); public virtual string[] GetManifestResourceNames(); public virtual Stream GetManifestResourceStream(string name); public virtual AssemblyName GetName(); public virtual Type GetType(string name); public virtual Type GetType(string name, bool throwOnError, bool ignoreCase); public static Assembly Load(AssemblyName assemblyRef); public override string ToString(); } public enum AssemblyContentType { Default = 0, WindowsRuntime = 1, } public sealed class AssemblyName { public AssemblyName(); public AssemblyName(string assemblyName); public AssemblyContentType ContentType { get; set; } public string CultureName { get; set; } public AssemblyNameFlags Flags { get; set; } public string FullName { get; } public string Name { get; set; } public ProcessorArchitecture ProcessorArchitecture { get; set; } public Version Version { get; set; } public byte[] GetPublicKey(); public byte[] GetPublicKeyToken(); public void SetPublicKey(byte[] publicKey); public void SetPublicKeyToken(byte[] publicKeyToken); public override string ToString(); } + public abstract class Binder { + protected Binder(); } + public enum BindingFlags { + CreateInstance = 512, + DeclaredOnly = 2, + Default = 0, + FlattenHierarchy = 64, + GetField = 1024, + GetProperty = 4096, + IgnoreCase = 1, + Instance = 4, + InvokeMethod = 256, + NonPublic = 32, + Public = 16, + SetField = 2048, + SetProperty = 8192, + Static = 8, } public abstract class ConstructorInfo : MethodBase { public static readonly string ConstructorName; public static readonly string TypeConstructorName; + public override MemberTypes MemberType { get; } public override bool Equals(object obj); public override int GetHashCode(); public virtual object Invoke(object[] parameters); } public class CustomAttributeData { public virtual Type AttributeType { get; } + public virtual ConstructorInfo Constructor { get; } public virtual IList ConstructorArguments { get; } public virtual IList NamedArguments { get; } + public static IList GetCustomAttributes(Assembly target); + public static IList GetCustomAttributes(MemberInfo target); + public static IList GetCustomAttributes(Module target); + public static IList GetCustomAttributes(ParameterInfo target); } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public struct CustomAttributeNamedArgument { public bool IsField { get; } + public MemberInfo MemberInfo { get; } public string MemberName { get; } public CustomAttributeTypedArgument TypedValue { get; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public struct CustomAttributeTypedArgument { public Type ArgumentType { get; } public object Value { get; } } public abstract class EventInfo : MemberInfo { public virtual MethodInfo AddMethod { get; } public abstract EventAttributes Attributes { get; } public virtual Type EventHandlerType { get; } + public virtual bool IsMulticast { get; } public bool IsSpecialName { get; } + public override MemberTypes MemberType { get; } public virtual MethodInfo RaiseMethod { get; } public virtual MethodInfo RemoveMethod { get; } public virtual void AddEventHandler(object target, Delegate handler); public override bool Equals(object obj); + public MethodInfo GetAddMethod(); + public virtual MethodInfo GetAddMethod(bool nonPublic); public override int GetHashCode(); + public MethodInfo GetRaiseMethod(); + public virtual MethodInfo GetRaiseMethod(bool nonPublic); + public MethodInfo GetRemoveMethod(); + public virtual MethodInfo GetRemoveMethod(bool nonPublic); public virtual void RemoveEventHandler(object target, Delegate handler); } public abstract class FieldInfo : MemberInfo { public abstract FieldAttributes Attributes { get; } + public virtual RuntimeFieldHandle FieldHandle { get; } public abstract Type FieldType { get; } public bool IsAssembly { get; } public bool IsFamily { get; } public bool IsFamilyAndAssembly { get; } public bool IsFamilyOrAssembly { get; } public bool IsInitOnly { get; } public bool IsLiteral { get; } public bool IsPrivate { get; } public bool IsPublic { get; } public bool IsSpecialName { get; } public bool IsStatic { get; } + public override MemberTypes MemberType { get; } public override bool Equals(object obj); public static FieldInfo GetFieldFromHandle(RuntimeFieldHandle handle); public static FieldInfo GetFieldFromHandle(RuntimeFieldHandle handle, RuntimeTypeHandle declaringType); public override int GetHashCode(); public abstract object GetValue(object obj); public virtual void SetValue(object obj, object value); } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public struct InterfaceMapping { + public MethodInfo[] InterfaceMethods; + public MethodInfo[] TargetMethods; + public Type InterfaceType; + public Type TargetType; } public static class IntrospectionExtensions { public static TypeInfo GetTypeInfo(this Type type); } + public class InvalidFilterCriteriaException : Exception { + public InvalidFilterCriteriaException(); + public InvalidFilterCriteriaException(string message); + public InvalidFilterCriteriaException(string message, Exception inner); } public interface IReflectableType { TypeInfo GetTypeInfo(); } public class LocalVariableInfo { protected LocalVariableInfo(); public virtual bool IsPinned { get; } public virtual int LocalIndex { get; } public virtual Type LocalType { get; } public override string ToString(); } public class ManifestResourceInfo { public ManifestResourceInfo(Assembly containingAssembly, string containingFileName, ResourceLocation resourceLocation); public virtual string FileName { get; } public virtual Assembly ReferencedAssembly { get; } public virtual ResourceLocation ResourceLocation { get; } } + public delegate bool MemberFilter(MemberInfo m, object filterCriteria); public abstract class MemberInfo { public virtual IEnumerable CustomAttributes { get; } public abstract Type DeclaringType { get; } + public virtual MemberTypes MemberType { get; } + public virtual int MetadataToken { get; } public virtual Module Module { get; } public abstract string Name { get; } + public virtual Type ReflectedType { get; } public override bool Equals(object obj); public override int GetHashCode(); } + public enum MemberTypes { + All = 191, + Constructor = 1, + Custom = 64, + Event = 2, + Field = 4, + Method = 8, + NestedType = 128, + Property = 16, + TypeInfo = 32, } public abstract class MethodBase : MemberInfo { public abstract MethodAttributes Attributes { get; } public virtual CallingConventions CallingConvention { get; } public virtual bool ContainsGenericParameters { get; } public bool IsAbstract { get; } public bool IsAssembly { get; } public bool IsConstructor { get; } public bool IsFamily { get; } public bool IsFamilyAndAssembly { get; } public bool IsFamilyOrAssembly { get; } public bool IsFinal { get; } public virtual bool IsGenericMethod { get; } public virtual bool IsGenericMethodDefinition { get; } public bool IsHideBySig { get; } public bool IsPrivate { get; } public bool IsPublic { get; } public bool IsSpecialName { get; } public bool IsStatic { get; } public bool IsVirtual { get; } + public virtual RuntimeMethodHandle MethodHandle { get; } public abstract MethodImplAttributes MethodImplementationFlags { get; } public override bool Equals(object obj); + public static MethodBase GetCurrentMethod(); public virtual Type[] GetGenericArguments(); public override int GetHashCode(); public static MethodBase GetMethodFromHandle(RuntimeMethodHandle handle); public static MethodBase GetMethodFromHandle(RuntimeMethodHandle handle, RuntimeTypeHandle declaringType); + public virtual MethodImplAttributes GetMethodImplementationFlags(); public abstract ParameterInfo[] GetParameters(); public virtual object Invoke(object obj, object[] parameters); } public abstract class MethodInfo : MethodBase { + public override MemberTypes MemberType { get; } public virtual ParameterInfo ReturnParameter { get; } public virtual Type ReturnType { get; } public virtual Delegate CreateDelegate(Type delegateType); public virtual Delegate CreateDelegate(Type delegateType, object target); public override bool Equals(object obj); + public virtual MethodInfo GetBaseDefinition(); public override Type[] GetGenericArguments(); public virtual MethodInfo GetGenericMethodDefinition(); public override int GetHashCode(); public virtual MethodInfo MakeGenericMethod(params Type[] typeArguments); } public abstract class Module { + public static readonly TypeFilter FilterTypeName; + public static readonly TypeFilter FilterTypeNameIgnoreCase; public virtual Assembly Assembly { get; } public virtual IEnumerable CustomAttributes { get; } public virtual string FullyQualifiedName { get; } + public virtual int MDStreamVersion { get; } + public virtual int MetadataToken { get; } + public virtual Guid ModuleVersionId { get; } public virtual string Name { get; } + public virtual string ScopeName { get; } public override bool Equals(object o); + public virtual Type[] FindTypes(TypeFilter filter, object filterCriteria); + public FieldInfo GetField(string name); + public virtual FieldInfo GetField(string name, BindingFlags bindingAttr); + public FieldInfo[] GetFields(); + public virtual FieldInfo[] GetFields(BindingFlags bindingFlags); public override int GetHashCode(); + public MethodInfo GetMethod(string name); + public MethodInfo GetMethod(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers); + public MethodInfo GetMethod(string name, Type[] types); + public MethodInfo[] GetMethods(); + public virtual MethodInfo[] GetMethods(BindingFlags bindingFlags); + public virtual Type GetType(string className); + public virtual Type GetType(string className, bool ignoreCase); public virtual Type GetType(string className, bool throwOnError, bool ignoreCase); + public virtual Type[] GetTypes(); + public FieldInfo ResolveField(int metadataToken); + public virtual FieldInfo ResolveField(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments); + public MemberInfo ResolveMember(int metadataToken); + public virtual MemberInfo ResolveMember(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments); + public MethodBase ResolveMethod(int metadataToken); + public virtual MethodBase ResolveMethod(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments); + public virtual byte[] ResolveSignature(int metadataToken); + public virtual string ResolveString(int metadataToken); + public Type ResolveType(int metadataToken); + public virtual Type ResolveType(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments); public override string ToString(); } public class ParameterInfo { public virtual ParameterAttributes Attributes { get; } public virtual IEnumerable CustomAttributes { get; } public virtual object DefaultValue { get; } public virtual bool HasDefaultValue { get; } public bool IsIn { get; } public bool IsOptional { get; } public bool IsOut { get; } public bool IsRetval { get; } public virtual MemberInfo Member { get; } + public virtual int MetadataToken { get; } public virtual string Name { get; } public virtual Type ParameterType { get; } public virtual int Position { get; } + public virtual object RawDefaultValue { get; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public struct ParameterModifier { + public ParameterModifier(int parameterCount); + public bool this[int index] { get; set; } } public abstract class PropertyInfo : MemberInfo { public abstract PropertyAttributes Attributes { get; } public abstract bool CanRead { get; } public abstract bool CanWrite { get; } public virtual MethodInfo GetMethod { get; } public bool IsSpecialName { get; } + public override MemberTypes MemberType { get; } public abstract Type PropertyType { get; } public virtual MethodInfo SetMethod { get; } public override bool Equals(object obj); + public MethodInfo[] GetAccessors(); + public virtual MethodInfo[] GetAccessors(bool nonPublic); public virtual object GetConstantValue(); + public MethodInfo GetGetMethod(); + public virtual MethodInfo GetGetMethod(bool nonPublic); public override int GetHashCode(); public abstract ParameterInfo[] GetIndexParameters(); + public MethodInfo GetSetMethod(); + public virtual MethodInfo GetSetMethod(bool nonPublic); public object GetValue(object obj); public virtual object GetValue(object obj, object[] index); public void SetValue(object obj, object value); public virtual void SetValue(object obj, object value, object[] index); } public abstract class ReflectionContext { protected ReflectionContext(); public virtual TypeInfo GetTypeForObject(object value); public abstract Assembly MapAssembly(Assembly assembly); public abstract TypeInfo MapType(TypeInfo type); } public sealed class ReflectionTypeLoadException : Exception { public ReflectionTypeLoadException(Type[] classes, Exception[] exceptions); public ReflectionTypeLoadException(Type[] classes, Exception[] exceptions, string message); public Exception[] LoaderExceptions { get; } public Type[] Types { get; } } public enum ResourceLocation { ContainedInAnotherAssembly = 2, ContainedInManifestFile = 4, Embedded = 1, } + public class TargetException : Exception { + public TargetException(); + public TargetException(string message); + public TargetException(string message, Exception inner); } public sealed class TargetInvocationException : Exception { public TargetInvocationException(Exception inner); public TargetInvocationException(string message, Exception inner); } public sealed class TargetParameterCountException : Exception { public TargetParameterCountException(); public TargetParameterCountException(string message); public TargetParameterCountException(string message, Exception inner); } + public delegate bool TypeFilter(Type m, object filterCriteria); public abstract class TypeInfo : MemberInfo, IReflectableType { public abstract Assembly Assembly { get; } public abstract string AssemblyQualifiedName { get; } public abstract TypeAttributes Attributes { get; } public abstract Type BaseType { get; } public abstract bool ContainsGenericParameters { get; } public virtual IEnumerable DeclaredConstructors { get; } public virtual IEnumerable DeclaredEvents { get; } public virtual IEnumerable DeclaredFields { get; } public virtual IEnumerable DeclaredMembers { get; } public virtual IEnumerable DeclaredMethods { get; } public virtual IEnumerable DeclaredNestedTypes { get; } public virtual IEnumerable DeclaredProperties { get; } public abstract MethodBase DeclaringMethod { get; } public abstract string FullName { get; } public abstract GenericParameterAttributes GenericParameterAttributes { get; } public abstract int GenericParameterPosition { get; } public abstract Type[] GenericTypeArguments { get; } public virtual Type[] GenericTypeParameters { get; } public abstract Guid GUID { get; } public bool HasElementType { get; } public virtual IEnumerable ImplementedInterfaces { get; } public bool IsAbstract { get; } public bool IsAnsiClass { get; } public bool IsArray { get; } public bool IsAutoClass { get; } public bool IsAutoLayout { get; } public bool IsByRef { get; } public bool IsClass { get; } public virtual bool IsCOMObject { get; } public abstract bool IsEnum { get; } public bool IsExplicitLayout { get; } public abstract bool IsGenericParameter { get; } public abstract bool IsGenericType { get; } public abstract bool IsGenericTypeDefinition { get; } public bool IsImport { get; } public bool IsInterface { get; } public bool IsLayoutSequential { get; } public bool IsMarshalByRef { get; } public bool IsNested { get; } public bool IsNestedAssembly { get; } public bool IsNestedFamANDAssem { get; } public bool IsNestedFamily { get; } public bool IsNestedFamORAssem { get; } public bool IsNestedPrivate { get; } public bool IsNestedPublic { get; } public bool IsNotPublic { get; } public bool IsPointer { get; } public virtual bool IsPrimitive { get; } public bool IsPublic { get; } public bool IsSealed { get; } public abstract bool IsSerializable { get; } public bool IsSpecialName { get; } public bool IsUnicodeClass { get; } public virtual bool IsValueType { get; } public bool IsVisible { get; } public abstract string Namespace { get; } + public virtual StructLayoutAttribute StructLayoutAttribute { get; } + public ConstructorInfo TypeInitializer { get; } + public abstract Type UnderlyingSystemType { get; } public virtual Type AsType(); + public virtual Type[] FindInterfaces(TypeFilter filter, object filterCriteria); + public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bindingAttr, MemberFilter filter, object filterCriteria); public abstract int GetArrayRank(); + public ConstructorInfo GetConstructor(Type[] types); + public ConstructorInfo[] GetConstructors(); + public abstract ConstructorInfo[] GetConstructors(BindingFlags bindingAttr); public virtual EventInfo GetDeclaredEvent(string name); public virtual FieldInfo GetDeclaredField(string name); public virtual MethodInfo GetDeclaredMethod(string name); public virtual IEnumerable GetDeclaredMethods(string name); public virtual TypeInfo GetDeclaredNestedType(string name); public virtual PropertyInfo GetDeclaredProperty(string name); + public virtual MemberInfo[] GetDefaultMembers(); public abstract Type GetElementType(); + public virtual string GetEnumName(object value); + public virtual string[] GetEnumNames(); + public virtual Type GetEnumUnderlyingType(); + public virtual Array GetEnumValues(); + public EventInfo GetEvent(string name); + public abstract EventInfo GetEvent(string name, BindingFlags bindingAttr); + public virtual EventInfo[] GetEvents(); + public abstract EventInfo[] GetEvents(BindingFlags bindingAttr); + public FieldInfo GetField(string name); + public abstract FieldInfo GetField(string name, BindingFlags bindingAttr); + public FieldInfo[] GetFields(); + public abstract FieldInfo[] GetFields(BindingFlags bindingAttr); + public virtual Type[] GetGenericArguments(); public abstract Type[] GetGenericParameterConstraints(); public abstract Type GetGenericTypeDefinition(); + public Type GetInterface(string name); + public abstract Type GetInterface(string name, bool ignoreCase); + public virtual InterfaceMapping GetInterfaceMap(Type interfaceType); + public abstract Type[] GetInterfaces(); + public MemberInfo[] GetMember(string name); + public virtual MemberInfo[] GetMember(string name, BindingFlags bindingAttr); + public virtual MemberInfo[] GetMember(string name, MemberTypes type, BindingFlags bindingAttr); + public MemberInfo[] GetMembers(); + public abstract MemberInfo[] GetMembers(BindingFlags bindingAttr); + public MethodInfo GetMethod(string name); + public MethodInfo GetMethod(string name, BindingFlags bindingAttr); + public MethodInfo GetMethod(string name, Type[] types); + public MethodInfo GetMethod(string name, Type[] types, ParameterModifier[] modifiers); + public MethodInfo[] GetMethods(); + public abstract MethodInfo[] GetMethods(BindingFlags bindingAttr); + public Type GetNestedType(string name); + public abstract Type GetNestedType(string name, BindingFlags bindingAttr); + public Type[] GetNestedTypes(); + public abstract Type[] GetNestedTypes(BindingFlags bindingAttr); + public PropertyInfo[] GetProperties(); + public abstract PropertyInfo[] GetProperties(BindingFlags bindingAttr); + public PropertyInfo GetProperty(string name); + public PropertyInfo GetProperty(string name, BindingFlags bindingAttr); + public PropertyInfo GetProperty(string name, Type returnType); + public PropertyInfo GetProperty(string name, Type returnType, Type[] types); + public PropertyInfo GetProperty(string name, Type returnType, Type[] types, ParameterModifier[] modifiers); + public PropertyInfo GetProperty(string name, Type[] types); public virtual bool IsAssignableFrom(TypeInfo typeInfo); + public virtual bool IsAssignableFrom(Type c); + public abstract bool IsDefined(Type attributeType, bool inherit); + public virtual bool IsEnumDefined(object value); public virtual bool IsEquivalentTo(Type other); + public virtual bool IsInstanceOfType(object o); public virtual bool IsSubclassOf(Type c); public abstract Type MakeArrayType(); public abstract Type MakeArrayType(int rank); public abstract Type MakeByRefType(); public abstract Type MakeGenericType(params Type[] typeArguments); public abstract Type MakePointerType(); TypeInfo System.Reflection.IReflectableType.GetTypeInfo(); } } ``` ### Notes ``` diff ---.NET Framework +++.NET Core namespace System { public abstract class Type : MemberInfo, _Type, IReflect { public static readonly char Delimiter; ^ Pallavi Taneja: Added on the Type. public static readonly object Missing; ^ Pallavi Taneja: Already present. - public static readonly MemberFilter FilterAttribute; ^ Pallavi Taneja: Filter* can't be added to TypeInfo in this contract revision. - public static readonly MemberFilter FilterName; - public static readonly MemberFilter FilterNameIgnoreCase; public static readonly Type[] EmptyTypes; ^ Pallavi Taneja: Already present. - protected Type(); - public abstract Assembly Assembly { get; } public abstract string AssemblyQualifiedName { get; } - public TypeAttributes Attributes { get; } - public abstract Type BaseType { get; } - public virtual bool ContainsGenericParameters { get; } - public virtual MethodBase DeclaringMethod { get; } public overrideabstract Type DeclaringType { get; } - public static Binder DefaultBinder { get; } ^ Pallavi Taneja: [Pending discussion] Whether Binder should be empty or exposed via a separate contract. public abstract string FullName { get; } - public virtual GenericParameterAttributes GenericParameterAttributes { get; } public virtualabstract int GenericParameterPosition { get; } public virtualabstract Type[] GenericTypeArguments { get; } - public abstract Guid GUID { get; } public bool HasElementType { get; } - public bool IsAbstract { get; } - public bool IsAnsiClass { get; } public virtual bool IsArray { get; } - public bool IsAutoClass { get; } - public bool IsAutoLayout { get; } public virtual bool IsByRef { get; } - public bool IsClass { get; } - public bool IsCOMObject { get; } public virtualabstract bool IsConstructedGenericType { get; } ^ Pallavi Taneja: Already exposed in Type. - public bool IsContextful { get; } ^ Pallavi Taneja: Used only in remoting. - public virtual bool IsEnum { get; } - public bool IsExplicitLayout { get; } public virtualabstract bool IsGenericParameter { get; } - public virtual bool IsGenericType { get; } - public virtual bool IsGenericTypeDefinition { get; } - public bool IsImport { get; } - public bool IsInterface { get; } - public bool IsLayoutSequential { get; } - public bool IsMarshalByRef { get; } public bool IsNested { get; } - public bool IsNestedAssembly { get; } - public bool IsNestedFamANDAssem { get; } - public bool IsNestedFamily { get; } - public bool IsNestedFamORAssem { get; } - public bool IsNestedPrivate { get; } - public bool IsNestedPublic { get; } - public bool IsNotPublic { get; } public virtual bool IsPointer { get; } - public bool IsPrimitive { get; } - public bool IsPublic { get; } - public bool IsSealed { get; } - public virtual bool IsSecurityCritical { get; } ^ Pallavi Taneja: Obsolete concept. - public virtual bool IsSecuritySafeCritical { get; } - public virtual bool IsSecurityTransparent { get; } - public virtual bool IsSerializable { get; } - public bool IsSpecialName { get; } - public bool IsUnicodeClass { get; } - public bool IsValueType { get; } - public bool IsVisible { get; } - public override MemberTypes MemberType { get; } - public abstract new Module Module { get; } + public abstract string Name { get; } public abstract string Namespace { get; } - public override Type ReflectedType { get; } - public virtual StructLayoutAttribute StructLayoutAttribute { get; } public virtual RuntimeTypeHandle TypeHandle { get; } ^ Pallavi Taneja: Already exposed in Type - public ConstructorInfo TypeInitializer { get; } - public abstract Type UnderlyingSystemType { get; } public override bool Equals(object o); public virtual bool Equals(Type o); - public virtual Type[] FindInterfaces(TypeFilter filter, object filterCriteria); - public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bindingAttr, MemberFilter filter, object filterCriteria); public virtualabstract int GetArrayRank(); - protected abstract TypeAttributes GetAttributeFlagsImpl(); - public ConstructorInfo GetConstructor(BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers); ^ Pallavi Taneja: Binder decision pending. - public ConstructorInfo GetConstructor(BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers); - public ConstructorInfo GetConstructor(Type[] types); - protected abstract ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers); - public ConstructorInfo[] GetConstructors(); - public abstract ConstructorInfo[] GetConstructors(BindingFlags bindingAttr); - public virtual MemberInfo[] GetDefaultMembers(); public abstract Type GetElementType(); - public virtual string GetEnumName(object value); - public virtual string[] GetEnumNames(); - public virtual Type GetEnumUnderlyingType(); - public virtual Array GetEnumValues(); - public EventInfo GetEvent(string name); - public abstract EventInfo GetEvent(string name, BindingFlags bindingAttr); - public virtual EventInfo[] GetEvents(); - public abstract EventInfo[] GetEvents(BindingFlags bindingAttr); - public FieldInfo GetField(string name); - public abstract FieldInfo GetField(string name, BindingFlags bindingAttr); - public FieldInfo[] GetFields(); - public abstract FieldInfo[] GetFields(BindingFlags bindingAttr); - public virtual Type[] GetGenericArguments(); - public virtual Type[] GetGenericParameterConstraints(); public virtualabstract Type GetGenericTypeDefinition(); public override int GetHashCode(); - public Type GetInterface(string name); - public abstract Type GetInterface(string name, bool ignoreCase); - public virtual InterfaceMapping GetInterfaceMap(Type interfaceType); - public abstract Type[] GetInterfaces(); - public MemberInfo[] GetMember(string name); - public virtual MemberInfo[] GetMember(string name, BindingFlags bindingAttr); - public virtual MemberInfo[] GetMember(string name, MemberTypes type, BindingFlags bindingAttr); - public MemberInfo[] GetMembers(); - public abstract MemberInfo[] GetMembers(BindingFlags bindingAttr); - public MethodInfo GetMethod(string name); - public MethodInfo GetMethod(string name, BindingFlags bindingAttr); - public MethodInfo GetMethod(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers); ^ Pallavi Taneja: Binder decision pending. - public MethodInfo GetMethod(string name, BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers); - public MethodInfo GetMethod(string name, Type[] types); - public MethodInfo GetMethod(string name, Type[] types, ParameterModifier[] modifiers); - protected abstract MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers); - public MethodInfo[] GetMethods(); - public abstract MethodInfo[] GetMethods(BindingFlags bindingAttr); - public Type GetNestedType(string name); - public abstract Type GetNestedType(string name, BindingFlags bindingAttr); - public Type[] GetNestedTypes(); - public abstract Type[] GetNestedTypes(BindingFlags bindingAttr); - public PropertyInfo[] GetProperties(); - public abstract PropertyInfo[] GetProperties(BindingFlags bindingAttr); - public PropertyInfo GetProperty(string name); - public PropertyInfo GetProperty(string name, BindingFlags bindingAttr); - public PropertyInfo GetProperty(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers); ^ Pallavi Taneja: Binder decision pending. - public PropertyInfo GetProperty(string name, Type returnType); - public PropertyInfo GetProperty(string name, Type returnType, Type[] types); - public PropertyInfo GetProperty(string name, Type returnType, Type[] types, ParameterModifier[] modifiers); - public PropertyInfo GetProperty(string name, Type[] types); - protected abstract PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers); - public new Type GetType(); - [MethodImpl(NoInlining)]public static Type GetType(string typeName); ^ Pallavi Taneja: GetType* can't be added to TypeInfo in the current contract version. - [MethodImpl(NoInlining)]public static Type GetType(string typeName, bool throwOnError); - [MethodImpl(NoInlining)]public static Type GetType(string typeName, bool throwOnError, bool ignoreCase); - [MethodImpl(NoInlining)]public static Type GetType(string typeName, Func assemblyResolver, Func typeResolver); - [MethodImpl(NoInlining)]public static Type GetType(string typeName, Func assemblyResolver, Func typeResolver, bool throwOnError); - [MethodImpl(NoInlining)]public static Type GetType(string typeName, Func assemblyResolver, Func typeResolver, bool throwOnError, bool ignoreCase); - public static Type[] GetTypeArray(object[] args); ^ Pallavi Taneja: Can't be added to TypeInfo in the current contract version. public static TypeCode GetTypeCode(Type type); - protected virtual TypeCode GetTypeCodeImpl(); - public static Type GetTypeFromCLSID(Guid clsid); ^ Pallavi Taneja: Interop concept - public static Type GetTypeFromCLSID(Guid clsid, bool throwOnError); - public static Type GetTypeFromCLSID(Guid clsid, string server); - public static Type GetTypeFromCLSID(Guid clsid, string server, bool throwOnError); - [MethodImpl(InternalCall)]public static Type GetTypeFromHandle(RuntimeTypeHandle handle); ^ Pallavi Taneja: Already implemented. - public static Type GetTypeFromProgID(string progID); ^ Pallavi Taneja: Interop concept - public static Type GetTypeFromProgID(string progID, bool throwOnError); - public static Type GetTypeFromProgID(string progID, string server); - public static Type GetTypeFromProgID(string progID, string server, bool throwOnError); - public static RuntimeTypeHandle GetTypeHandle(object o); ^ Pallavi Taneja: Decision pending. - protected abstract bool HasElementTypeImpl(); - public object InvokeMember(string name, BindingFlags invokeAttr, Binder binder, object target, object[] args); ^ Pallavi Taneja: Binder decision pending. - public object InvokeMember(string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, CultureInfo culture); - public abstract object InvokeMember(string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters); - protected abstract bool IsArrayImpl(); - public virtual bool IsAssignableFrom(Type c); - protected abstract bool IsByRefImpl(); - protected abstract bool IsCOMObjectImpl(); - protected virtual bool IsContextfulImpl(); - public virtual bool IsEnumDefined(object value); - public virtual bool IsEquivalentTo(Type other); - public virtual bool IsInstanceOfType(object o); - protected virtual bool IsMarshalByRefImpl(); - protected abstract bool IsPointerImpl(); - protected abstract bool IsPrimitiveImpl(); - public virtual bool IsSubclassOf(Type c); - protected virtual bool IsValueTypeImpl(); public virtualabstract Type MakeArrayType(); public virtualabstract Type MakeArrayType(int rank); public virtualabstract Type MakeByRefType(); public virtualabstract Type MakeGenericType(params Type[] typeArguments); public virtualabstract Type MakePointerType(); - [MethodImpl(InternalCall)]public static bool operator ==(Type left, Type right); - [MethodImpl(InternalCall)]public static bool operator !=(Type left, Type right); - [MethodImpl(NoInlining)]public static Type ReflectionOnlyGetType(string typeName, bool throwIfNotFound, bool ignoreCase); - void System.Runtime.InteropServices._Type.GetIDsOfNames(ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); - void System.Runtime.InteropServices._Type.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); - void System.Runtime.InteropServices._Type.GetTypeInfoCount(out uint pcTInfo); - void System.Runtime.InteropServices._Type.Invoke(uint dispIdMember, ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); public override string ToString(); } namespace System.Reflection { public abstract class Binder { ^ Pallavi Taneja: Expose as Empty in System.Reflection. Options added separately. protected Binder(); - public abstract FieldInfo BindToField(BindingFlags bindingAttr, FieldInfo[] match, object value, CultureInfo culture); - public abstract MethodBase BindToMethod(BindingFlags bindingAttr, MethodBase[] match, ref object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] names, out object state); - public abstract object ChangeType(object value, Type type, CultureInfo culture); - public abstract void ReorderArgumentArray(ref object[] args, object state); - public abstract MethodBase SelectMethod(BindingFlags bindingAttr, MethodBase[] match, Type[] types, ParameterModifier[] modifiers); - public abstract PropertyInfo SelectProperty(BindingFlags bindingAttr, PropertyInfo[] match, Type returnType, Type[] indexes, ParameterModifier[] modifiers); } public enum BindingFlags { CreateInstance = 512, DeclaredOnly = 2, Default = 0, - ExactBinding = 65536, ^ Pallavi Taneja: Used only in case Binder is extensible. FlattenHierarchy = 64, GetField = 1024, GetProperty = 4096, IgnoreCase = 1, - IgnoreReturn = 16777216, ^ Pallavi Taneja: Only used in Interop. Instance = 4, InvokeMethod = 256, NonPublic = 32, - OptionalParamBinding = 262144, ^ Pallavi Taneja: [Unsure] used most only in varArgs scenario. Public = 16, - PutDispProperty = 16384, ^ Pallavi Taneja: Interop scenario. - PutRefDispProperty = 32768, SetField = 2048, SetProperty = 8192, Static = 8, - SuppressChangeType = 131072, } public abstract class ConstructorInfo : MethodBase, _ConstructorInfo { public static readonly string ConstructorName; public static readonly string TypeConstructorName; - protected ConstructorInfo(); public override MemberTypes MemberType { get; } public override bool Equals(object obj); public override int GetHashCode(); public virtual object Invoke(object[] parameters); - public abstract object Invoke(BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture); ^ Pallavi Taneja: System.Globalization dependency. Usage < 2%. No reflection contract currently take glob dep not just S.R.dll - public static bool operator ==(ConstructorInfo left, ConstructorInfo right); - public static bool operator !=(ConstructorInfo left, ConstructorInfo right); - void System.Runtime.InteropServices._ConstructorInfo.GetIDsOfNames(ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); - Type System.Runtime.InteropServices._ConstructorInfo.GetType(); - void System.Runtime.InteropServices._ConstructorInfo.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); - void System.Runtime.InteropServices._ConstructorInfo.GetTypeInfoCount(out uint pcTInfo); - void System.Runtime.InteropServices._ConstructorInfo.Invoke(uint dispIdMember, ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); - object System.Runtime.InteropServices._ConstructorInfo.Invoke_2(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture); - object System.Runtime.InteropServices._ConstructorInfo.Invoke_3(object obj, object[] parameters); - object System.Runtime.InteropServices._ConstructorInfo.Invoke_4(BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture); - object System.Runtime.InteropServices._ConstructorInfo.Invoke_5(object[] parameters); } - public class CustomAttributeFormatException : FormatException { ^ Pallavi Taneja: [Not sure] Used mainly in case a tool formatted a custom attribute incorrectly. - public CustomAttributeFormatException(); - protected CustomAttributeFormatException(SerializationInfo info, StreamingContext context); - public CustomAttributeFormatException(string message); - public CustomAttributeFormatException(string message, Exception inner); } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public struct CustomAttributeNamedArgument { - public CustomAttributeNamedArgument(MemberInfo memberInfo, object value); - public CustomAttributeNamedArgument(MemberInfo memberInfo, CustomAttributeTypedArgument typedArgument); public bool IsField { get; } public MemberInfo MemberInfo { get; } public string MemberName { get; } public CustomAttributeTypedArgument TypedValue { get; } - public override bool Equals(object obj); - public override int GetHashCode(); - public static bool operator ==(CustomAttributeNamedArgument left, CustomAttributeNamedArgument right); ^ Pallavi Taneja: I have left out equality operators across reflection since, there were concerns earlier that its behavior might not be consistent with .Equals - public static bool operator !=(CustomAttributeNamedArgument left, CustomAttributeNamedArgument right); - public override string ToString(); } public abstract class EventInfo : MemberInfo, _EventInfo { - protected EventInfo(); public virtual MethodInfo AddMethod { get; } public abstract EventAttributes Attributes { get; } public virtual Type EventHandlerType { get; } public virtual bool IsMulticast { get; } public bool IsSpecialName { get; } public override MemberTypes MemberType { get; } public virtual MethodInfo RaiseMethod { get; } public virtual MethodInfo RemoveMethod { get; } public virtual void AddEventHandler(object target, Delegate handler); public override bool Equals(object obj); public MethodInfo GetAddMethod(); ^ Pallavi Taneja: Get*Method are exposed via S.R.TE. Consider removing from there. public abstractvirtual MethodInfo GetAddMethod(bool nonPublic); public override int GetHashCode(); - public MethodInfo[] GetOtherMethods(); ^ Pallavi Taneja: .other directive in events is not exposed in any language semantics we care about AFAIK and currently can be leveraged using ilasm only. - public virtual MethodInfo[] GetOtherMethods(bool nonPublic); public MethodInfo GetRaiseMethod(); public abstractvirtual MethodInfo GetRaiseMethod(bool nonPublic); public MethodInfo GetRemoveMethod(); public abstractvirtual MethodInfo GetRemoveMethod(bool nonPublic); - public static bool operator ==(EventInfo left, EventInfo right); - public static bool operator !=(EventInfo left, EventInfo right); public virtual void RemoveEventHandler(object target, Delegate handler); - void System.Runtime.InteropServices._EventInfo.GetIDsOfNames(ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); - Type System.Runtime.InteropServices._EventInfo.GetType(); - void System.Runtime.InteropServices._EventInfo.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); - void System.Runtime.InteropServices._EventInfo.GetTypeInfoCount(out uint pcTInfo); - void System.Runtime.InteropServices._EventInfo.Invoke(uint dispIdMember, ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); } - public class ExceptionHandlingClause { ^ Pallavi Taneja: Not sure if we would want to expose SEH inspection or IL inspection in general. - protected ExceptionHandlingClause(); - public virtual Type CatchType { get; } - public virtual int FilterOffset { get; } - public virtual ExceptionHandlingClauseOptions Flags { get; } - public virtual int HandlerLength { get; } - public virtual int HandlerOffset { get; } - public virtual int TryLength { get; } - public virtual int TryOffset { get; } - public override string ToString(); } - public enum ExceptionHandlingClauseOptions { ^ Pallavi Taneja: Same as above. - Clause = 0, - Fault = 4, - Filter = 1, - Finally = 2, } public abstract class FieldInfo : MemberInfo, _FieldInfo { - protected FieldInfo(); public abstract FieldAttributes Attributes { get; } public abstractvirtual RuntimeFieldHandle FieldHandle { get; } public abstract Type FieldType { get; } public bool IsAssembly { get; } public bool IsFamily { get; } public bool IsFamilyAndAssembly { get; } public bool IsFamilyOrAssembly { get; } public bool IsInitOnly { get; } public bool IsLiteral { get; } - public bool IsNotSerialized { get; } ^ Pallavi Taneja: We do not expose NotSerializedAttribute notion. - public bool IsPinvokeImpl { get; } public bool IsPrivate { get; } public bool IsPublic { get; } - public virtual bool IsSecurityCritical { get; } - public virtual bool IsSecuritySafeCritical { get; } - public virtual bool IsSecurityTransparent { get; } public bool IsSpecialName { get; } public bool IsStatic { get; } public override MemberTypes MemberType { get; } public override bool Equals(object obj); public static FieldInfo GetFieldFromHandle(RuntimeFieldHandle handle); public static FieldInfo GetFieldFromHandle(RuntimeFieldHandle handle, RuntimeTypeHandle declaringType); public override int GetHashCode(); - public virtual Type[] GetOptionalCustomModifiers(); ^ Pallavi Taneja: [Not sure] Used in Compiler only context. Usage < 1% except xamarin using GetRawConstantValue 10%. Should there not be an alternative in metadata instead? - public virtual object GetRawConstantValue(); - public virtual Type[] GetRequiredCustomModifiers(); public abstract object GetValue(object obj); - public virtual object GetValueDirect(TypedReference obj); ^ Pallavi Taneja: TypedReference is not exposed. - public static bool operator ==(FieldInfo left, FieldInfo right); - public static bool operator !=(FieldInfo left, FieldInfo right); public virtual void SetValue(object obj, object value); - public abstract void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture); - public virtual void SetValueDirect(TypedReference obj, object value); - void System.Runtime.InteropServices._FieldInfo.GetIDsOfNames(ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); - Type System.Runtime.InteropServices._FieldInfo.GetType(); - void System.Runtime.InteropServices._FieldInfo.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); - void System.Runtime.InteropServices._FieldInfo.GetTypeInfoCount(out uint pcTInfo); - void System.Runtime.InteropServices._FieldInfo.Invoke(uint dispIdMember, ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); } - public interface ICustomAttributeProvider { ^ Pallavi Taneja: We do not expose ICustomAttributeProvider, however we expose the members via extension methods via S.R.E. Hence, exposing this correctly will be difficult. - object[] GetCustomAttributes(bool inherit); - object[] GetCustomAttributes(Type attributeType, bool inherit); - bool IsDefined(Type attributeType, bool inherit); } - public enum ImageFileMachine { ^ Pallavi Taneja: Use S.R.I.RuntimeInformation instead - AMD64 = 34404, - ARM = 452, - I386 = 332, - IA64 = 512, } public class InvalidFilterCriteriaException : ApplicationExceptionException { ^ Pallavi Taneja: Used my Module and TYpe. Although Type.Filter* can't be exposed yet, we can expose Module.Filter* members. public InvalidFilterCriteriaException(); - protected InvalidFilterCriteriaException(SerializationInfo info, StreamingContext context); public InvalidFilterCriteriaException(string message); public InvalidFilterCriteriaException(string message, Exception inner); } - public interface IReflect { ^ Pallavi Taneja: Exposed in S.R.IS as used with IDispatch. - Type UnderlyingSystemType { get; } - FieldInfo GetField(string name, BindingFlags bindingAttr); - FieldInfo[] GetFields(BindingFlags bindingAttr); - MemberInfo[] GetMember(string name, BindingFlags bindingAttr); - MemberInfo[] GetMembers(BindingFlags bindingAttr); - MethodInfo GetMethod(string name, BindingFlags bindingAttr); - MethodInfo GetMethod(string name, BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers); - MethodInfo[] GetMethods(BindingFlags bindingAttr); - PropertyInfo[] GetProperties(BindingFlags bindingAttr); - PropertyInfo GetProperty(string name, BindingFlags bindingAttr); - PropertyInfo GetProperty(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers); - object InvokeMember(string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters); } public abstract class MemberInfo : _MemberInfo, ICustomAttributeProvider { - protected MemberInfo(); public virtual IEnumerable CustomAttributes { get; } public abstract Type DeclaringType { get; } public abstractvirtual MemberTypes MemberType { get; } public virtual int MetadataToken { get; } public virtual Module Module { get; } public abstract string Name { get; } public abstractvirtual Type ReflectedType { get; } ^ Pallavi Taneja: Some concerns around PN implementation. public override bool Equals(object obj); - public abstract object[] GetCustomAttributes(bool inherit); ^ Pallavi Taneja: Already exposed via extensions. - public abstract object[] GetCustomAttributes(Type attributeType, bool inherit); - public virtual IList GetCustomAttributesData(); public override int GetHashCode(); - public abstract bool IsDefined(Type attributeType, bool inherit); - public static bool operator ==(MemberInfo left, MemberInfo right); ^ Pallavi Taneja: Operator overloads behave different than .Equals(). - public static bool operator !=(MemberInfo left, MemberInfo right); - void System.Runtime.InteropServices._MemberInfo.GetIDsOfNames(ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); - Type System.Runtime.InteropServices._MemberInfo.GetType(); - void System.Runtime.InteropServices._MemberInfo.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); - void System.Runtime.InteropServices._MemberInfo.GetTypeInfoCount(out uint pcTInfo); - void System.Runtime.InteropServices._MemberInfo.Invoke(uint dispIdMember, ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); } public abstract class MethodBase : MemberInfo, _MethodBase { - protected MethodBase(); public abstract MethodAttributes Attributes { get; } public virtual CallingConventions CallingConvention { get; } public virtual bool ContainsGenericParameters { get; } public bool IsAbstract { get; } public bool IsAssembly { get; } public bool IsConstructor { get; } public bool IsFamily { get; } public bool IsFamilyAndAssembly { get; } public bool IsFamilyOrAssembly { get; } public bool IsFinal { get; } public virtual bool IsGenericMethod { get; } public virtual bool IsGenericMethodDefinition { get; } public bool IsHideBySig { get; } public bool IsPrivate { get; } public bool IsPublic { get; } - public virtual bool IsSecurityCritical { get; } - public virtual bool IsSecuritySafeCritical { get; } - public virtual bool IsSecurityTransparent { get; } public bool IsSpecialName { get; } public bool IsStatic { get; } public bool IsVirtual { get; } public abstractvirtual RuntimeMethodHandle MethodHandle { get; } public virtualabstract MethodImplAttributes MethodImplementationFlags { get; } - bool System.Runtime.InteropServices._MethodBase.IsAbstract { get; } - bool System.Runtime.InteropServices._MethodBase.IsAssembly { get; } - bool System.Runtime.InteropServices._MethodBase.IsConstructor { get; } - bool System.Runtime.InteropServices._MethodBase.IsFamily { get; } - bool System.Runtime.InteropServices._MethodBase.IsFamilyAndAssembly { get; } - bool System.Runtime.InteropServices._MethodBase.IsFamilyOrAssembly { get; } - bool System.Runtime.InteropServices._MethodBase.IsFinal { get; } - bool System.Runtime.InteropServices._MethodBase.IsHideBySig { get; } - bool System.Runtime.InteropServices._MethodBase.IsPrivate { get; } - bool System.Runtime.InteropServices._MethodBase.IsPublic { get; } - bool System.Runtime.InteropServices._MethodBase.IsSpecialName { get; } - bool System.Runtime.InteropServices._MethodBase.IsStatic { get; } - bool System.Runtime.InteropServices._MethodBase.IsVirtual { get; } public override bool Equals(object obj); - [MethodImpl(NoInlining)]public static MethodBase GetCurrentMethod(); public virtual Type[] GetGenericArguments(); public override int GetHashCode(); - public virtual MethodBody GetMethodBody(); ^ Pallavi Taneja: [Not sure] Used for IL inspection. Usage ~ 1% public static MethodBase GetMethodFromHandle(RuntimeMethodHandle handle); public static MethodBase GetMethodFromHandle(RuntimeMethodHandle handle, RuntimeTypeHandle declaringType); public abstractvirtual MethodImplAttributes GetMethodImplementationFlags(); public abstract ParameterInfo[] GetParameters(); public virtual object Invoke(object obj, object[] parameters); - public abstract object Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture); ^ Pallavi Taneja: Dependency on System.Glob - public static bool operator ==(MethodBase left, MethodBase right); - public static bool operator !=(MethodBase left, MethodBase right); - void System.Runtime.InteropServices._MethodBase.GetIDsOfNames(ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); - Type System.Runtime.InteropServices._MethodBase.GetType(); - void System.Runtime.InteropServices._MethodBase.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); - void System.Runtime.InteropServices._MethodBase.GetTypeInfoCount(out uint pcTInfo); - void System.Runtime.InteropServices._MethodBase.Invoke(uint dispIdMember, ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); } - public class MethodBody { ^ Pallavi Taneja: [Not sure] IL inspection - protected MethodBody(); - public virtual IList ExceptionHandlingClauses { get; } - public virtual bool InitLocals { get; } - public virtual int LocalSignatureMetadataToken { get; } - public virtual IList LocalVariables { get; } - public virtual int MaxStackSize { get; } - public virtual byte[] GetILAsByteArray(); } public abstract class MethodInfo : MethodBase, _MethodInfo { - protected MethodInfo(); public override MemberTypes MemberType { get; } public virtual ParameterInfo ReturnParameter { get; } public virtual Type ReturnType { get; } - public abstract ICustomAttributeProvider ReturnTypeCustomAttributes { get; } ^ Pallavi Taneja: Issues with exposing ICustomAttributeProvider public virtual Delegate CreateDelegate(Type delegateType); public virtual Delegate CreateDelegate(Type delegateType, object target); public override bool Equals(object obj); public abstractvirtual MethodInfo GetBaseDefinition(); public override Type[] GetGenericArguments(); public virtual MethodInfo GetGenericMethodDefinition(); public override int GetHashCode(); public virtual MethodInfo MakeGenericMethod(params Type[] typeArguments); - public static bool operator ==(MethodInfo left, MethodInfo right); - public static bool operator !=(MethodInfo left, MethodInfo right); - void System.Runtime.InteropServices._MethodInfo.GetIDsOfNames(ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); - Type System.Runtime.InteropServices._MethodInfo.GetType(); - void System.Runtime.InteropServices._MethodInfo.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); - void System.Runtime.InteropServices._MethodInfo.GetTypeInfoCount(out uint pcTInfo); - void System.Runtime.InteropServices._MethodInfo.Invoke(uint dispIdMember, ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); } - public sealed class Missing : ISerializable { ^ Pallavi Taneja: Interop sceanrio, used in IDispatch. - public static readonly Missing Value; - void System.Runtime.Serialization.ISerializable.GetObjectData(SerializationInfo info, StreamingContext context); } public abstract class Module : _Module, ICustomAttributeProvider, ISerializable { public static readonly TypeFilter FilterTypeName; public static readonly TypeFilter FilterTypeNameIgnoreCase; - protected Module(); public virtual Assembly Assembly { get; } public virtual IEnumerable CustomAttributes { get; } public virtual string FullyQualifiedName { get; } public virtual int MDStreamVersion { get; } public virtual int MetadataToken { get; } - public ModuleHandle ModuleHandle { get; } ^ Pallavi Taneja: ModuleHandle is not exposed. public virtual Guid ModuleVersionId { get; } public virtual string Name { get; } public virtual string ScopeName { get; } public override bool Equals(object o); public virtual Type[] FindTypes(TypeFilter filter, object filterCriteria); - public virtual object[] GetCustomAttributes(bool inherit); - public virtual object[] GetCustomAttributes(Type attributeType, bool inherit); - public virtual IList GetCustomAttributesData(); public FieldInfo GetField(string name); public virtual FieldInfo GetField(string name, BindingFlags bindingAttr); public FieldInfo[] GetFields(); public virtual FieldInfo[] GetFields(BindingFlags bindingFlags); public override int GetHashCode(); public MethodInfo GetMethod(string name); public MethodInfo GetMethod(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers); public MethodInfo GetMethod(string name, Type[] types); - protected virtual MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers); public MethodInfo[] GetMethods(); public virtual MethodInfo[] GetMethods(BindingFlags bindingFlags); - public virtual void GetObjectData(SerializationInfo info, StreamingContext context); - public virtual void GetPEKind(out PortableExecutableKinds peKind, out ImageFileMachine machine); - public virtual X509Certificate GetSignerCertificate(); public virtual Type GetType(string className); public virtual Type GetType(string className, bool ignoreCase); public virtual Type GetType(string className, bool throwOnError, bool ignoreCase); public virtual Type[] GetTypes(); - public virtual bool IsDefined(Type attributeType, bool inherit); - public virtual bool IsResource(); - public static bool operator ==(Module left, Module right); - public static bool operator !=(Module left, Module right); public FieldInfo ResolveField(int metadataToken); public virtual FieldInfo ResolveField(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments); public MemberInfo ResolveMember(int metadataToken); public virtual MemberInfo ResolveMember(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments); public MethodBase ResolveMethod(int metadataToken); public virtual MethodBase ResolveMethod(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments); public virtual byte[] ResolveSignature(int metadataToken); public virtual string ResolveString(int metadataToken); public Type ResolveType(int metadataToken); public virtual Type ResolveType(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments); - void System.Runtime.InteropServices._Module.GetIDsOfNames(ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); - void System.Runtime.InteropServices._Module.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); - void System.Runtime.InteropServices._Module.GetTypeInfoCount(out uint pcTInfo); - void System.Runtime.InteropServices._Module.Invoke(uint dispIdMember, ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); public override string ToString(); } - public sealed class ObfuscateAssemblyAttribute : Attribute { ^ Pallavi Taneja: Not a reflection concept. - public ObfuscateAssemblyAttribute(bool assemblyIsPrivate); - public bool AssemblyIsPrivate { get; } - public bool StripAfterObfuscation { get; set; } } - public sealed class ObfuscationAttribute : Attribute { ^ Pallavi Taneja: Same as above.s - public ObfuscationAttribute(); - public bool ApplyToMembers { get; set; } - public bool Exclude { get; set; } - public string Feature { get; set; } - public bool StripAfterObfuscation { get; set; } } public class ParameterInfo : _ParameterInfo, ICustomAttributeProvider, IObjectReference { - protected int PositionImpl; - protected object DefaultValueImpl; - protected MemberInfo MemberImpl; - protected ParameterAttributes AttrsImpl; - protected string NameImpl; - protected Type ClassImpl; - protected ParameterInfo(); public virtual ParameterAttributes Attributes { get; } public virtual IEnumerable CustomAttributes { get; } public virtual object DefaultValue { get; } public virtual bool HasDefaultValue { get; } public bool IsIn { get; } - public bool IsLcid { get; } public bool IsOptional { get; } public bool IsOut { get; } public bool IsRetval { get; } public virtual MemberInfo Member { get; } public virtual int MetadataToken { get; } public virtual string Name { get; } public virtual Type ParameterType { get; } public virtual int Position { get; } public virtual object RawDefaultValue { get; } - public virtual object[] GetCustomAttributes(bool inherit); - public virtual object[] GetCustomAttributes(Type attributeType, bool inherit); - public virtual IList GetCustomAttributesData(); - public virtual Type[] GetOptionalCustomModifiers(); - public object GetRealObject(StreamingContext context); - public virtual Type[] GetRequiredCustomModifiers(); ^ Pallavi Taneja: [Not sure] Compiler only scenario. - public virtual bool IsDefined(Type attributeType, bool inherit); - void System.Runtime.InteropServices._ParameterInfo.GetIDsOfNames(ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); - void System.Runtime.InteropServices._ParameterInfo.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); - void System.Runtime.InteropServices._ParameterInfo.GetTypeInfoCount(out uint pcTInfo); - void System.Runtime.InteropServices._ParameterInfo.Invoke(uint dispIdMember, ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); - public override string ToString(); } - public sealed class Pointer : ISerializable { ^ Pallavi Taneja: Interop scenario. - public unsafe static object Box(void* ptr, Type type); - void System.Runtime.Serialization.ISerializable.GetObjectData(SerializationInfo info, StreamingContext context); - public unsafe static void* Unbox(object ptr); } public abstract class PropertyInfo : MemberInfo, _PropertyInfo { - protected PropertyInfo(); public abstract PropertyAttributes Attributes { get; } public abstract bool CanRead { get; } public abstract bool CanWrite { get; } public virtual MethodInfo GetMethod { get; } public bool IsSpecialName { get; } public override MemberTypes MemberType { get; } public abstract Type PropertyType { get; } public virtual MethodInfo SetMethod { get; } public override bool Equals(object obj); public MethodInfo[] GetAccessors(); ^ Pallavi Taneja: Get* APIs exposed via TypeExtensions public abstractvirtual MethodInfo[] GetAccessors(bool nonPublic); public virtual object GetConstantValue(); public MethodInfo GetGetMethod(); public abstractvirtual MethodInfo GetGetMethod(bool nonPublic); public override int GetHashCode(); public abstract ParameterInfo[] GetIndexParameters(); - public virtual Type[] GetOptionalCustomModifiers(); ^ Pallavi Taneja: Compiler only scenario. - public virtual object GetRawConstantValue(); - public virtual Type[] GetRequiredCustomModifiers(); public MethodInfo GetSetMethod(); public abstractvirtual MethodInfo GetSetMethod(bool nonPublic); public object GetValue(object obj); public virtual object GetValue(object obj, object[] index); - public abstract object GetValue(object obj, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture); ^ Pallavi Taneja: CultureInfo dependency. - public static bool operator ==(PropertyInfo left, PropertyInfo right); - public static bool operator !=(PropertyInfo left, PropertyInfo right); public void SetValue(object obj, object value); public virtual void SetValue(object obj, object value, object[] index); - public abstract void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture); - void System.Runtime.InteropServices._PropertyInfo.GetIDsOfNames(ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); - Type System.Runtime.InteropServices._PropertyInfo.GetType(); - void System.Runtime.InteropServices._PropertyInfo.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); - void System.Runtime.InteropServices._PropertyInfo.GetTypeInfoCount(out uint pcTInfo); - void System.Runtime.InteropServices._PropertyInfo.Invoke(uint dispIdMember, ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); } - public class StrongNameKeyPair : IDeserializationCallback, ISerializable { ^ Pallavi Taneja: Is System.Reflection the right place for this? - public StrongNameKeyPair(byte[] keyPairArray); - public StrongNameKeyPair(FileStream keyPairFile); - protected StrongNameKeyPair(SerializationInfo info, StreamingContext context); - public StrongNameKeyPair(string keyPairContainer); - public byte[] PublicKey { get; } - void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender); - void System.Runtime.Serialization.ISerializable.GetObjectData(SerializationInfo info, StreamingContext context); } - public class TypeDelegator : TypeInfo { ^ Pallavi Taneja: Used in extension scenarios. - protected Type typeImpl; - protected TypeDelegator(); - public TypeDelegator(Type delegatingType); - public override Assembly Assembly { get; } - public override string AssemblyQualifiedName { get; } - public override Type BaseType { get; } - public override string FullName { get; } - public override Guid GUID { get; } - public override bool IsConstructedGenericType { get; } - public override int MetadataToken { get; } - public override Module Module { get; } - public override string Name { get; } - public override string Namespace { get; } - public override RuntimeTypeHandle TypeHandle { get; } - public override Type UnderlyingSystemType { get; } - protected override TypeAttributes GetAttributeFlagsImpl(); - protected override ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers); - public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr); - public override object[] GetCustomAttributes(bool inherit); - public override object[] GetCustomAttributes(Type attributeType, bool inherit); - public override Type GetElementType(); - public override EventInfo GetEvent(string name, BindingFlags bindingAttr); - public override EventInfo[] GetEvents(); - public override EventInfo[] GetEvents(BindingFlags bindingAttr); - public override FieldInfo GetField(string name, BindingFlags bindingAttr); - public override FieldInfo[] GetFields(BindingFlags bindingAttr); - public override Type GetInterface(string name, bool ignoreCase); - public override InterfaceMapping GetInterfaceMap(Type interfaceType); - public override Type[] GetInterfaces(); - public override MemberInfo[] GetMember(string name, MemberTypes type, BindingFlags bindingAttr); - public override MemberInfo[] GetMembers(BindingFlags bindingAttr); - protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers); - public override MethodInfo[] GetMethods(BindingFlags bindingAttr); - public override Type GetNestedType(string name, BindingFlags bindingAttr); - public override Type[] GetNestedTypes(BindingFlags bindingAttr); - public override PropertyInfo[] GetProperties(BindingFlags bindingAttr); - protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers); - protected override bool HasElementTypeImpl(); - public override object InvokeMember(string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters); - protected override bool IsArrayImpl(); - public override bool IsAssignableFrom(TypeInfo typeInfo); - protected override bool IsByRefImpl(); - protected override bool IsCOMObjectImpl(); - public override bool IsDefined(Type attributeType, bool inherit); - protected override bool IsPointerImpl(); - protected override bool IsPrimitiveImpl(); - protected override bool IsValueTypeImpl(); } } ``` 5386 area-System.Net Add netcore50 configuration to System.Net.Primitives Also consolidate the net46 project in the 'facade' directory down into the root project file. @davidsh , @CIPop , @weshaggard 5388 area-System.Net Disable two more NegotiateStream tests These have also been taking out multiple builds. I'm assuming it's the same cause as the other ones on this type and have as such associated it with the same issue. cc: @cipop, @davidsh 5389 area-Serialization Improve XmlSerializer.FromTypes Review comments in https://github.com/dotnet/corefx/pull/5384 and see if we need to make any changes. 5391 area-System.Net Add netcore50 and net46 configurations for System.Net.Sockets @davidsh , @CIPop , @weshaggard 5394 area-Serialization Fix serialization of _syncRoot field so behavior aligns with Desktop This is to revert back the change made a while ago regarding serializing of object property to make sure compatibility with Desktop for types with private _syncRoot field. Some types with private field _syncRoot of type object on Desktop prevent the serialization of this field by using [NonSerializable] attribute. Because this attribute doesn't exist in NetCore/NetNative, we skip the serialization of object type altogether to ensure consistent payload and serialization-deserialization among the platforms. Related issue #4595 @shmao @SGuyGe @zhenlan 5395 area-System.Net Add netcore50 support to System.Net.WebSockets.Client library cc @mellinoe @CIPop @davidsh 5396 area-System.Net Eliminate unnecessary GC handle allocations in Unix Sockets implementation Replaces GC handle allocation with a pinned local, in the cases where we are pinning a single buffer over a statically-scoped region. This should have significantly lower runtime overhead. @stephentoub, @pgavlin 5397 area-System.Net Test fails to verify client.ImpersonationLevel: System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.NegotiateStream_StreamToStream_Authentication_EmptyCredentials_Fails() MESSAGE: Assert.True() Failure\r\nExpected: True\r\nActual: False +++++++++++++++++++ STACK TRACE: at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.NegotiateStream_StreamToStream_Authentication_EmptyCredentials_Fails() in d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs:line 155 This is: Assert.Equal(TokenImpersonationLevel.Identification, client.ImpersonationLevel); 5398 area-Serialization Fix serialization of recursive collections in data contract serializers This is a port of a change-set from Desktop to fix the stack overflow issue when serializing recursive collections. The new behavior is to throw exception whenever they are recognized because serialization of them is not supported. @shmao @SGuyGe @zhenlan 5401 area-System.Net Test failure in NegotiateStream_StreamToStream_Authentication_TargetName_Success http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_debug_prtest/924/testReport/junit/System.Net.Security.Tests/NegotiateStreamStreamToStreamTest/NegotiateStream_StreamToStream_Authentication_TargetName_Success/ Appears that there was a timeout during the handshake. ``` Stacktrace MESSAGE: Handshake completed in the allotted time\r\nExpected: True\r\nActual: False +++++++++++++++++++ STACK TRACE: at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.NegotiateStream_StreamToStream_Authentication_TargetName_Success() in d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs:line 92 ``` 5404 area-Serialization Fix serialization of get-only IEnumerable to throw exception Porting a fix from Desktop. Deserialization of get-only IEnumerable collection is not supported. This change fixes the NRE by throwing exception earlier in the deserialization process. @shmao @SGuyGe @zhenlan 5405 area-System.Net Add netcore50 configuration for System.Net.NameResolution Also consolidated the existing net46 facade configuration into the root-level project file, and deleted the facade folder. @davidsh, @cipop, @weshaggard 5406 area-System.IO IsoStore: Packaging for libraries that only support a single platform Today if a package only targets a single platform our packaging infrastructure still requires a `dotnetX.Y` reference assembly. We should relax this requirement since it doesn't make sense, packages should only use `dotnetX.Y` if they need to be portable to more than one platform. Sample packages: System.IO.IsolatedStorage System.Runtime.Loader An alternate solution here would be to tweak these implementations to work on more than one platform and package them as dotnet implementations. 5410 area-Serialization XML reading issue with Binary Reader: certain string content lengths can't be read The issue has been fixed on Desktop. We should port the fix to corefx. 5411 area-System.Net UDP tests fail with timeout sending/receiving data over loopback http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_release_prtest/956/consoleFull ``` 17:49:39 System.Net.Sockets.Tests.SendReceive.SendToRecvFromAsync_UdpClient_Single_Datagram_UDP_IPv4 [FAIL] 17:49:39 Assert.True() Failure 17:49:39 Expected: True 17:49:39 Actual: False 17:49:39 Stack Trace: 17:49:39 d:\j\workspace\dotnet_corefx\windows_nt_release_prtest\src\System.Net.Sockets\tests\FunctionalTests\SendReceive.cs(192,0): at System.Net.Sockets.Tests.SendReceive.SendToRecvFromAsync_UdpClient_Datagram_UDP(IPAddress leftAddress, IPAddress rightAddress) ``` 5412 area-System.Net NegotiateStream_StreamToStream_Authentication_EmptyCredentials_Fails failed on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_release_prtest/942/consoleFull ``` 15:42:24 System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.NegotiateStream_StreamToStream_Authentication_EmptyCredentials_Fails [FAIL] 15:42:24 Assert.True() Failure 15:42:24 Expected: True 15:42:24 Actual: False 15:42:24 Stack Trace: 15:42:24 d:\j\workspace\dotnet_corefx\windows_nt_release_prtest\src\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs(156,0): at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.NegotiateStream_StreamToStream_Authentication_EmptyCredentials_Fails() ``` 5414 area-System.Data System.Data.ProviderBase.DbConnectionFactory.s_pendingOpenNonPooledNext careless manipulation System.Data.ProviderBase.DbConnectionFactory.s_pendingOpenNonPooledNext is declared as `static int` which means it is signed and retains its value for very long. Here's the only place where it's manipulated: ``` idx = s_pendingOpenNonPooledNext++ % s_pendingOpenNonPooled.Length; ``` If `pendingOpenNonPooledNext == Int32.MaxValue` then one of the following will happen. If code runs in unchecked context then the variable overflows. Then depending on `s_pendingOpenNonPooled.Length` value `%` may yield a negative value and later array access results in exception. If code runs in checked context then an exception is thrown immediately. This variable should be unsigned (`uint` would do). The `++` operation should be wrapped in `unchecked {}` so that it surely causes an overflow, not an exception. 5415 area-System.Data as used instead of cast in System.Data.SqlClient.SqlConnection.TryOpen() "System.Data.SqlClient.SqlConnection.TryOpen() goes like this: ``` var tdsInnerConnection = (InnerConnection as SqlInternalConnectionTds); Debug.Assert(tdsInnerConnection.Parser != null, ""Where's the parser?""); if (!tdsInnerConnection.ConnectionOptions.Pooling) ``` If for any stupid reason `InnerConnection` cannot be cast to `SqlInternalConnectionTds` then `as` yields a null reference and later code yields a NullReferenceException. This causes error hiding. A cast would be better - an InvalidCastException would be thrown which would be much clearer. " 5416 area-System.Linq EnumerableQuery stack-overflow on Block or Conditional that is not of queryable type E.g. ``` C# Enumerable.Empty().AsQueryable().Provider.Execute( Expression.Condition( Expression.Constant(true), Expression.Return(target, Expression.Constant(3)), Expression.Return(target, Expression.Constant(1)) ) ); Enumerable.Empty().AsQueryable().Provider.Execute( Expression.Block( Expression.Return(target, Expression.Constant(2)), Expression.Label(target, Expression.Default(typeof(int))) ) ); ``` Both go into infinite recursion and overflow the stack. While non-queryable-type expressions aren't likely in this context, they could still be used and of course could be sub-expressions of a queryable-type expression. 5419 area-System.Net Augment GlobalLog.Assert* call sites in System.Net "The ""temporary"" part 1 of https://github.com/dotnet/corefx/issues/5265 until a better logging solution can be put in place. 1. Removed the ""bool globalLogEnabled = GlobalLog.IsEnabled"" that had been used previously. 2. Added Debug.Fail calls at all GlobalLog.Assert\* call sites. cc: @cipop, @davidsh, @josguil " 5420 area-Infrastructure Builds files don't handle 'unix' bins correctly IL libraries in corefx tend to take one of 3 shapes. 1. Single cross-platform library. 2. Windows/Unix library. 3. Windows/Linux/OSX library. Right now we don't handle 2 correctly in the builds files. Instead of treating them as OSGroup=Unix and building on both Linux and OSX they use OSGroup=linux and only build on Linux. /cc @weshaggard @stephentoub 5422 area-Infrastructure [Bug] Portable Class Library compilation gets broken when a target is _removed_ "Filing on behalf of @dsaf from https://github.com/dotnet/coreclr/issues/2651: Steps to reproduce: 1) Create a new PCL project targeting .NET 4.5, Win 8 and SL 5 (Profile47) 2) Change `Class1.cs` to following code (notice it compiles): ``` csharp public class Class1 { private void Test() { IConvertible test; } } ``` 3) Disable SL 5 target in project settings, notice a message _""The following will be automatically targeted because they support the same set of portable APIs: ASP.NET Core 5.0""_. Project changes to Profile7 4) Compilation is now broken: _""CS0246 The type or namespace name 'IConvertible' could not be found (are you missing a using directive or an assembly reference?)""_ The code could be relying on value types inheriting `IConvertible` as well, so it needs the interface. There are likely to be other similar breaking changes around Reflection APIs. Effectively there seems to be a bug in some piece of code that tells that a set of portable APIs is common when in fact it is not. I don't know where it is: in PCL profile configuration, Visual Studio or .NET Framework. Removing a target should not be a breaking change. " 5423 area-System.IO [Performance] System.IO.Compression: Increase range of test scenarios As part of resolving https://github.com/dotnet/corefx/issues/4475 and https://github.com/dotnet/corefx/issues/3986 we should add more reusable test assets that cover scenarios other than random or semi-random files. One option would be to look into including the Canterbury/Calgary corpus in the Compression.Testdata nuget package. 5424 area-Infrastructure Enable the stack-protector compiler option for all corefx native code on Unix We need to make this change for corefx: https://github.com/dotnet/coreclr/pull/2616/files 5426 area-System.Net Ensure error handling is properly checking the last error in Sockets See https://github.com/dotnet/corefx/pull/5419#issuecomment-171752102. 5428 area-System.Runtime Add Environment.MachineName to .NET Core. In reference to #4306 The implementation is not provided for .NET Native, and will be documented in `AppCompatBaseLine.txt`. The win32 api `GetComputerName` is not available for Store profile, will be implementing this for .NET Native when there are relevant win32 apis that can be used. cc @joshfree 5430 area-System.Diagnostics DirectoryNotFoundException from TestGetProcessesByName in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/centos7.1_debug_tst_prtest/814/console ``` 13:02:00 System.Diagnostics.Tests.ProcessTests.TestGetProcessesByName [FAIL] 13:02:00 System.IO.DirectoryNotFoundException : Could not find a part of the path '/proc/49303/task/'. 13:02:00 Stack Trace: 13:02:00 at System.IO.UnixFileSystem.FileSystemEnumerable`1.OpenDirectory(String fullPath) 13:02:00 at System.IO.UnixFileSystem.FileSystemEnumerable`1.Enumerate() 13:02:00 at System.IO.UnixFileSystem.FileSystemEnumerable`1..ctor(String userPath, String searchPattern, SearchOption searchOption, SearchTarget searchTarget, Func`3 translateResult) 13:02:00 at System.IO.UnixFileSystem.EnumeratePaths(String path, String searchPattern, SearchOption searchOption, SearchTarget searchTarget) 13:02:00 at System.IO.Directory.EnumerateDirectories(String path) 13:02:00 at System.Diagnostics.ProcessManager.CreateProcessInfo(ParsedStat procFsStat, ReusableTextReader reusableReader) 13:02:00 at System.Diagnostics.Process.GetProcessesByName(String processName, String machineName) 13:02:00 at System.Diagnostics.Process.GetProcessesByName(String processName) 13:02:00 at System.Diagnostics.Tests.ProcessTests.TestGetProcessesByName() ``` 5432 area-Infrastructure ./init-tools.sh fails on OSX I am getting an error on OSX ``` ./init-tools.sh: line 39: wget: command not found ``` We should be using curl instead, since it is installed by default and we already need libcurl to build the native components in corefx. 5434 area-Infrastructure Installing dotnet cli during the build shows Windows dialog (with files being copied) As in the subject 5436 area-System.Net TcpClient Has some issues on Mac with coreclr here is a test app: https://github.com/zhili1208/coreclrMacTcpTest Server side just listens and print incoming string, client side just connect to server and send string. On Mac, when I start client, it just hang or the string from server is null. only happens with coreclr 1.0.0-rc1-update1, works well on mono. 5440 area-Serialization Add serialization negative tests for different collections of same type as KnownTypes Add serialization negative tests for scenario when different collection types are provided through KnowType attribute but they're seen as the same type within serialization. @shmao @SGuyGe @zhenlan 5441 area-System.Net Clean up Unix Domain Sockets example - Separate the type out into its own file, to make it easier for others to consume - Fix a bug that prohbited it from being used with Accept (removed min length validation in ctor) - Added a test that does Connect/Accept and Send/Receive - A few other cleanups in the existing tests As a follow-on to https://github.com/dotnet/corefx/pull/5051, fixes #4588. cc: @IlyaBiryukov, @pgavlin, @ericeil 5443 area-Infrastructure Capture the log files in failed CI runs https://github.com/dotnet/dotnet-ci/blob/8e3c2c86f3b9f6edcd1a1e0aafe8cc8ea5a1cad4/jobs/generation/Utilities.groovy#L379 We currently only capture the log file for jobs when the pass but there are a lot of time we really need to full log for failed jobs. We should see if we can conditionally always archive the log file or find another way to capture the log, even perhaps dumping to the console as part of the CI. cc @mmitche 5444 area-Infrastructure Switch to users wide package cache Today we scope our packages to the repo which gives us isolation but it causes things like CI jobs to always have to download these package every time, which cost time and add extra unnecessary reliability issues. For local devs it also costs in disk space because ever instance of this repo or our sister repo's has their own cache which causes a lot of duplication. We should find a good user wide cache directory, perhaps just use the default location that nuget/dnu use. 5445 area-Serialization Remove unnecessary access checks in data contract serializers Internal private member access doesn't require InternalsVisibleTo attribute anymore. In addition to that, implementation of DataConractSerializer and DataContractJsonSerializer have been consolidated into one assembly so there is no need to check for access visibility to System.ServiceModel.Web which no longer exists. This is porting a change from full Desktop to clean up the unnecessary checks for assembly by name patterns. @shmao @SGuyGe @zhenlan 5449 area-System.Linq ForRef and MapRef extension method for array It is an easy implement to let foreach for reference in array I want it to be included in official System.Linq library ```c# public delegate void RefAction(ref T item); public static T[] ForRef(this T[] array,RefAction action) { int i = 0; while(i < array.Length) { action(ref array[i]); i++; } return array; /// return self to chain with Linq } public delegate void RefFunction(ref T item,out R obj); public static R[] MapRef(this T[] array,RefFunction func) { int i = 0; var res = new R[array.Length]; while(i < array.Length) { func(ref array[i],out res[i]); i++; } return res; } ``` Also it could be great if this pattern also allowed in Dictionary and List I want to discus first then I may create a fork and pull request by myself 5450 area-System.Data System.Data.SqlClient.SqlCommand.Prepare() calls SqlStatistics.StopTimer() outside finally block All methods of `System.Data.SqlClient.SqlCommand` which call `SqlStatistics.StartTimer()` go like this: ``` SqlStatistics statistics = null; try { statistics = SqlStatistics.StartTimer(Statistics); doSomethingUseful(); } finally { SqlStatistics.StopTimer(statistics); } ``` but `SqlCommand.Prepare()` does not follow that pattern - it contains `StopTimer()` call outside `finally` so `StopTimer()` is not guaranteed to run should useful code throw an exception. 5452 area-System.Data System.Data.SqlClient.SqlConnection.Open()/OpenAsync() code duplication "Both `System.Data.SqlClient.SqlConnection.Open()` and `System.Data.SqlClient.SqlConnection.OpenAsync()` contain this code ``` if (StatisticsEnabled) { if (null == _statistics) { _statistics = new SqlStatistics(); } else { _statistics.ContinueOnNewConnection(); } } ``` which performs something non-trivial which looks like preparing the ""statistics"" object for the new session. I assume the two pieces of code must be in sync at all times yet these eleven lines of code are duplicated without any explanation. This should either be documented or just extracted into a separate method. " 5453 area-Meta Create a versioning document to clarify how we version assemblies and packages We have a doc internally. I need to update it and publish it. 5458 area-System.IO System.IO.Compression: Make the ZLib BestCompression 6 CompressionLevel 6 is what we used to use and we changed it in #4589 because we didn't see any perf regressions in doing so. With more testing, it has become clear that moving from 6 to 9 severely hurt perf in some scenarios so it's being reverted back to 6. resolves #4475 @stephentoub @eerhardt @bjjones Perf results coming in subsequent comments. 5459 area-System.IO "Three ""unicode"" System.IO.Compression.ZipFile tests are failing on Unix" "We currently have the following tests not running on Unix: https://github.com/dotnet/corefx/blob/master/src/System.IO.Compression.ZipFile/tests/ZipFileConvenienceMethods.cs#L17 https://github.com/dotnet/corefx/blob/master/src/System.IO.Compression.ZipFile/tests/ZipFileConvenienceMethods.cs#L69 https://github.com/dotnet/corefx/blob/master/src/System.IO.Compression.ZipFile/tests/ZipFileConvenienceMethods.cs#L165 with code like the following: ``` C# if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) // [ActiveIssue(846, PlatformID.AnyUnix)] { await TestCreateDirectory(zfolder(""unicode""), true); } ``` Since #846 has been closed, we need to investigate these tests and figure out why they aren't passing on Unix. " 5460 area-System.Collections Investigate and fix System.Collections tests marked with ActiveIssue #846 Currently there are 6 tests in System.Collections.Tests and System.Collections.NonGeneric.Tests that are marked with ActiveIssue #846, but #846 has been implemented and closed. We should investigate these tests and find out why they are failing. https://github.com/dotnet/corefx/blob/c02d33b18398199f6acc17d375dab154e9a1df66/src/System.Collections/tests/Generic/SortedList/Constructor_IDictionary_ComparisonType.cs#L309 https://github.com/dotnet/corefx/blob/c02d33b18398199f6acc17d375dab154e9a1df66/src/System.Collections/tests/Generic/SortedList/Constructor_IDictionary_IKeyComparer.cs#L204 https://github.com/dotnet/corefx/blob/c02d33b18398199f6acc17d375dab154e9a1df66/src/System.Collections/tests/Generic/SortedList/Constructor_IKeyComparer.cs#L178 https://github.com/dotnet/corefx/blob/c02d33b18398199f6acc17d375dab154e9a1df66/src/System.Collections/tests/Generic/SortedList/Constructor_int_ComparisonType.cs#L152 https://github.com/dotnet/corefx/blob/c02d33b18398199f6acc17d375dab154e9a1df66/src/System.Collections/tests/Generic/SortedList/Constructor_int_IKeyComparer.cs#L196 https://github.com/dotnet/corefx/blob/c02d33b18398199f6acc17d375dab154e9a1df66/src/System.Collections.NonGeneric/tests/Comparer/Comparer_CaseInsensitive.cs#L115 5461 area-System.Net Disabling System.Net intermittently failing tests - Disabling failing tests based on reported bugs. - Adding new tests that repro reported issues. - Fixing System.Net.Security.Tests.csproj. @davidsh @stephentoub @ericeil PTAL 5462 area-System.Xml System.Xml.Tests.XmlConvertTests.ToTypeTests failing on Unix The XmlConvertTests.ToTypeTests is currently failing on Unix https://github.com/dotnet/corefx/blob/c02d33b18398199f6acc17d375dab154e9a1df66/src/System.Xml.ReaderWriter/tests/XmlConvert/XmlConvertTests.cs#L57 We should investigate this test and figure out why it is failing. 5463 area-System.Globalization Investigate failing System.Globalization.Tests on Unix There are a number of tests under https://github.com/dotnet/corefx/tree/c02d33b18398199f6acc17d375dab154e9a1df66/src/System.Globalization/tests that are disabled against #846. However, #846 has been implemented and closed. We should investigate these tests and figure out why they are still failing on Unix. 5468 area-Serialization Revert the removed lines to fix build break in NetNative These were removed as part of https://github.com/dotnet/corefx/pull/5404. However they are needed for NetNative. So revert this change to fix NetNative build break. @shmao @SGuyGe 5469 area-System.Globalization TimeZoneInfo FindById behaves differently before and after calling GetSystemTimeZones on Unix "See the third issue listed here: https://github.com/dotnet/coreclr/issues/2185 > Zones usually in the ""backward"" file behave inconsistently. If you call GetSystemTimeZones() before requesting them by ID, only zone.tab is loaded and the old zone ID can't be used. If you call FindSystemTimeZoneById before calling GetSystemTimeZones() , the zone is loaded from its file, and a later call to GetSystemTimeZones() will include the ID. Sample zone for this behaviour: America/Atka . I can understand the zone either never being available, or being available through FindSystemTimeZoneById but never advertized by GetSystemTimeZones() , but the current behaviour is really unpleasant. Here is the code to illustrate the problem: ``` C# // Uncomment these lines to show False and then an exception... // var atkaPresent = TimeZoneInfo.GetSystemTimeZones().Select(zone => zone.Id).Contains(""America/Atka""); // Console.WriteLine(atkaPresent); var atka = TimeZoneInfo.FindSystemTimeZoneById(""America/Atka""); Console.WriteLine(atka.Id); ``` " 5471 area-Infrastructure Remove workaround from System.Runtime.Loader package Related: https://github.com/dotnet/corefx/issues/5406 I updated the generation mapping for DNXCore50 to 5.6 in NuGet. When our validation task picked up this change it saw that the minimum generation supported by all platforms is now 5.6. As a result it produced an error saying that we should update the reference assembly to 5.6 as well. The problem is that not everyone consuming this package is using the latest nuget. For now we will workaround this by duplicating the reference in the dncore50 folder. This issue is tracking removal of that workaround. 5472 area-System.Net Improve Unix synchronous socket perf "Synchronous operations on sockets are currently always emulated in terms of async/non-blocking operations. This has quite a lot of run-time overhead, due to extra system calls, context switches, etc. With this change we keep the socket in ""blocking"" mode until the user requests non-blocking mode _or_ initiates an asynchronous operation. The result is that a socket that only ever experiences synchronous operations will not have the overhead of emulating sync over async. " 5473 area-System.Net Fix GetHostByName_HostName_GetHostByAddr test I couldn't repro the original failure mentioned, and instead got a deterministic failure on every execution. I've fixed that, and was able to run the test 10,000 times on both Windows and Linux without failure. Fixes https://github.com/dotnet/corefx/issues/2894 (the remainder of the mentioned issues were already addressed). cc: @cipop, @ericeil 5474 area-System.Runtime Provide a generic API to read from and write to a pointer C# doesn't support pointer operations on generic types. We can, however, express them in IL. A prototype could like this: ``` C# public static class Unsafe { [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T Read(void * p) { // Can't be expressed in C#, thus in IL: ldarg.0 ldobj !!T ret } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void Write(void * p, T value) { // Can't be expressed in C#, thus in IL: ldarg.0 ldarg.1 stobj !!T ret } } ``` This would also solve issues like #5202 without any additional work. 5478 area-Serialization Fix serialization in NetNative to throw exception for get-only IEnumerable collection For IEnumerable get-only collection deserialization is not supported because there is no Add method to populate the collection. In this scenario, the NetNative sgen will not initialize the delegate to read them so we should throw meaningful exception when that happens. This change only affects NetNative. The fix for NetCore has been merged in https://github.com/dotnet/corefx/pull/5404 @shmao @SGuyGe @zhenlan 5479 area-System.IO GZipStream throws an exception on creation since 5.0.1-rc2-23614 "I cannot get any version past 5.0.1-rc2-23614 to work when calling the following code. ``` public Task CompressAsync(byte[] uncompressedData) { return Task.Run(() => { using (MemoryStream compressedMemoryStream = new MemoryStream()) { using (GZipStream zipStream = new GZipStream(compressedMemoryStream, CompressionMode.Compress, true)) { zipStream.Write(uncompressedData, 0, uncompressedData.Length); } return compressedMemoryStream.ToArray(); } }); } ``` Receives the following exception: ``` System.IO.Compression.ZLibException was unhandled by user code HResult=-2146232800 Message=The underlying compression routine could not be loaded correctly. Source=System.IO.Compression ZLibContext="""" ZLibErrorCode=0 ZLibErrorMessage="""" StackTrace: at System.IO.Compression.Deflater.DeflateInit(CompressionLevel compressionLevel, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy) at System.IO.Compression.Deflater..ctor(CompressionLevel compressionLevel, Int32 windowBits) at System.IO.Compression.DeflateStream.InitializeDeflater(Stream stream, Boolean leaveOpen, Int32 windowBits, CompressionLevel compressionLevel) at System.IO.Compression.DeflateStream..ctor(Stream stream, CompressionMode mode, Boolean leaveOpen, Int32 windowBits) at System.IO.Compression.GZipStream..ctor(Stream stream, CompressionMode mode, Boolean leaveOpen) at CCC.Core.Framework.Compression.GZipCompressor.<>c__DisplayClass1_0.b__0() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() InnerException: HResult=-2146233052 Message=Unable to load DLL 'clrcompression.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) Source=System.IO.Compression TypeName="""" StackTrace: at Interop.zlib.deflateInit2_(Byte* stream, Int32 level, Int32 method, Int32 windowBits, Int32 memLevel, Int32 strategy, Byte* version, Int32 stream_size) at Interop.zlib.DeflateInit2_(ZStream& stream, CompressionLevel level, CompressionMethod method, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy) at System.IO.Compression.ZLibNative.ZLibStreamHandle.DeflateInit2_(CompressionLevel level, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy) at System.IO.Compression.Deflater.DeflateInit(CompressionLevel compressionLevel, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy) InnerException: ``` " 5480 area-Meta Add documentation for porting, triage, and issue bar This also includes some boiler plate for the roadmap for post-RTM, but it's not fully done yet. However, I believe it's better to get the parts in we already have, then waiting for the complete set. @weshaggard @KrzysztofCwalina @richlander @bleroy 5481 area-System.IO Remove SecurityTransparentAttribute from the Open Compression [this TFS commit](https://github.com/dotnet/corefx/commit/15f47efe119b17032a661f752248ae1fcc172bf3) added an assembly tag to both the open and desktop builds that was previously only in the desktop build. The inclusion to the Open build is causing an upstream failure https://github.com/dotnet/corefx/issues/5380. This PR moves the Security tag inclusion to only be used on the net46 build. @weshaggard @stephentoub @troydai 5482 area-Serialization Port from desktop .NET: Performance improvement for XmlUTF8TextReader when reading invalid chars The desktop code can be found at: http://referencesource.microsoft.com/#System.Runtime.Serialization/System/Xml/XmlUTF8TextReader.cs,c4ce4aec957c3cd6 5484 area-System.Net Detect Keep-Alive failures In desktop CLR, it is fairly straightforward to detect a keep-alive failure using `WebExceptionStatus.KeepAliveFailure`. I have yet to find any equivalent in CoreCLR. It seems that even the PAL in System.Net.Requests only detects name resolution failures. I have specific processing for keep-alive failures in an application that I am porting to CoreCLR and I am not seeing how I can do that on CoreCLR. Is there a way? Or will there be a way? 5485 area-System.Net PostEmptyContentUsingChunkedEncoding_Success failed on Windows The server returned an invalid or unrecognized response... I assume this is just some sort of intermittent infrastructure issue, but opening an issue just in case. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_debug_prtest/1092/consoleFull ``` 09:59:40 System.Net.Http.Functional.Tests.PostScenarioTest.PostEmptyContentUsingChunkedEncoding_Success(serverUri: http://corefx-net.cloudapp.net/Echo.ashx) [FAIL] 09:59:40 System.Net.Http.HttpRequestException : An error occurred while sending the request. 09:59:40 ---- System.IO.IOException : The write operation failed, see inner exception. 09:59:41 -------- System.Net.Http.WinHttpException : The server returned an invalid or unrecognized response 09:59:41 Stack Trace: 09:59:41 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:59:41 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:59:41 at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() 09:59:41 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Http\tests\FunctionalTests\PostScenarioTest.cs(152,0): at System.Net.Http.Functional.Tests.PostScenarioTest.d__21.MoveNext() 09:59:41 --- End of stack trace from previous location where exception was thrown --- 09:59:41 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:59:41 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:59:41 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() 09:59:41 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Http\tests\FunctionalTests\PostScenarioTest.cs(62,0): at System.Net.Http.Functional.Tests.PostScenarioTest.d__11.MoveNext() 09:59:41 --- End of stack trace from previous location where exception was thrown --- 09:59:41 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:59:41 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:59:41 --- End of stack trace from previous location where exception was thrown --- 09:59:41 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:59:41 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:59:41 --- End of stack trace from previous location where exception was thrown --- 09:59:41 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:59:41 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:59:41 ----- Inner Stack Trace ----- 09:59:41 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:59:41 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:59:41 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() 09:59:41 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpRequestStream.cs(160,0): at System.Net.Http.WinHttpRequestStream.d__25.MoveNext() 09:59:41 --- End of stack trace from previous location where exception was thrown --- 09:59:41 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:59:41 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:59:41 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() 09:59:41 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs(1324,0): at System.Net.Http.WinHttpHandler.d__126.MoveNext() 09:59:41 --- End of stack trace from previous location where exception was thrown --- 09:59:41 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:59:41 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:59:41 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() 09:59:41 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs(835,0): at System.Net.Http.WinHttpHandler.d__101.MoveNext() ``` 5487 area-System.Threading TestOutputAvailableAsyncAfterTryReceiveAll failed in CI ``` 18:53:36 System.Threading.Tasks.Dataflow.Tests.BufferBlockTests.TestOutputAvailableAsyncAfterTryReceiveAll [FAIL] 18:53:36 Assert.True() Failure 18:53:36 Expected: True 18:53:36 Actual: False 18:53:36 Stack Trace: 18:53:36 d:\j\workspace\dotnet_corefx\outerloop_windows_nt_debug\src\System.Threading.Tasks.Dataflow\tests\Dataflow\BufferBlockTests.cs(338,0): at System.Threading.Tasks.Dataflow.Tests.BufferBlockTests.d__14.MoveNext() 18:53:36 --- End of stack trace from previous location where exception was thrown --- 18:53:36 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 18:53:36 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 18:53:36 --- End of stack trace from previous location where exception was thrown --- 18:53:36 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 18:53:36 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 18:53:36 --- End of stack trace from previous location where exception was thrown --- 18:53:36 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 18:53:36 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` 5488 area-System.Net SslStream ReadAsync/WriteAsync end up Sync Symptom: https://github.com/aspnet/KestrelHttpServer/issues/569 `SslStream` doesn't override `Stream`'s `ReadAsync`/`WriteAsync` methods which means they call the default implementation which is a wrapper on `Stream`'s `BeginRead` and `EndRead` etc. `BeginRead` eventually ends up calling the underlying stream's synchronous `Read` method. If the stream it wraps is completely async; then its sync read may wait on a `.GetAwaiter().GetResult()` of its async read/write. At which point you have Async->Sync->Async.Wait() and things go bad... First guess would be `SslStream` should additionally override ``` csharp public override Task ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) { return _sslState.SecureStream.ReadAsync(buffer, offset, count, cancellationToken); } public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken token) { return _sslState.SecureStream.WriteAsync(buffer, offset, count, token); } ``` but there may be more to it. 5491 area-System.Net SslStream override stream's async methods Rather than using Streams default implementation which end up calling the sync methods. Resolves #5488 5495 area-Infrastructure AssemblyLoadContext broken in build 23714 "Hello again, While upgrading to build 23715 from 23712, I encountered this error when building our project that implements the `AssemblyLoadContext`: ``` error CS1069: The type name 'AssemblyLoadContext' could not be found in the namespace 'System.Runtime.Loader'. This type has been forwarded to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' Consider adding a reference to that assembly. ``` 23712 and 23713 work, 23714 and 23715 do not. Relevant `project.json` excerpt: ``` json ""dependencies"": { ""NETStandard.Library"": ""1.0.0-rc2-23715"", ""System.Runtime.Loader"": ""4.0.0-rc2-23714"" }, ""frameworks"": { ""dnxcore50"": { } } ``` The code is implementing the abstract class `AssemblyLoadContext`, but I cannot provide it here due to the usual reasons, though I can give access now to MSFT employees if you ping me. Ubuntu 14.04 using `dotnet-cli`. Thanks, Andy " 5497 area-System.Data System.Data.SqlClient.SqlConnection.PermissionDemand() method name doesn't match what it does "There's `System.Data.SqlClient.SqlConnection.PermissionDemand()` method which actually checks whether the connection strings are proper set. That doesn't sound like ""permission demand"" at all. " 5498 area-System.Data "System.Data.SqlClient has code with variable name mistyped as ""outter""" `System.Data.SqlClient.SqlConnection.RegisterForConnectionCloseNotification()` has one parameter called `outter`. There're others which can be found with good old text search. 5500 area-System.Net Interop Layer for supporting xplat NegotiateStream Introducing native shims for libgssapi in order to support NegotiateStream 5501 area-System.Data Where is SqlCommandBuilder class ? Should be in System.Data.SqlClient assembly. If where no plans implementing it please give a hint how to retrieve stored procedure parameter information (SqlCommandBuilder.DeriveParameters) . Thanks 5502 area-System.Data System.Data.SqlClient.SqlInternalConnectionTds constructor purges original call stack when rethrowing an exception `System.Data.SqlClient.SqlInternalConnectionTds` currently goes like this: ``` try { OpenLoginEnlist(timeout, connectionOptions, redirectedUserInstance); break; } catch (SqlException sqlex) { if (something) { throw sqlex; } ``` `throw sqlex` causes original call stack of where the exception was thrown to be lost. If that's what it desired then it should be explained, otherwise just use `throw;` 5503 area-System.Data System.Data.SqlClient.SqlInternalConnectionTds.Login() unclear timeout manipulations "`System.Data.SqlClient.SqlInternalConnectionTds.Login()` goes like this: ``` if (!timeout.IsInfinite) { long t = timeout.MillisecondsRemaining / 1000; if ((long)Int32.MaxValue > t) { timeoutInSeconds = (int)t; } } ``` First, a better name could have been invented for `t`. Perhaps `secondsRemaining`? Second, why does it check `Max > t` instead of `t < Max`? Is that a yet another `5 == a` Yoda condition? Finally, if the value is ""too large"" the result is... zero, not ""maximum value"" and that's not explained. Is that desired behavior? That's not clear. I suspect this is a bug. " 5505 area-System.Net SslStream WriteAsync This is just the WriteAsync portion of https://github.com/dotnet/corefx/issues/5077 The ReadAsync looks a lot more complicated so I'm not even going to attempt (i.e. the Read wasn't immediately apparent to me) 5507 area-Infrastructure Restoring all packages is taking way too long Restoring all packages is taking a long time even when there is nothing to do when all the packages are in the cache and all the lock files already exist. @dagood I know you are looking into this but it is clear to me that we need a solution both internally and externally for this problem because it is currently killing productivity. It is also causing huge lang in our CI system. We are currently almost spawning 300 processes during this restore step. For reference on my machine this step is taking 20-30 minutes alone where the rest of the build is less then 10 minutes. From a recent CI run (http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_debug_prtest/1117/consoleFull) you can see: ``` 12:27:35 Restoring all packages... 12:50:01 Microsoft.CSharp -> ``` It is took more then 20 minutes. 5508 area-Infrastructure AV from GenFacades on Windows outer loop http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_windows_nt_release/61/consoleFull ``` 11:32:56 Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. 11:32:56 at Microsoft.Cci.ISymUnmanagedWriter2.Close() 11:32:56 at Microsoft.Cci.PdbWriter.Dispose() 11:32:56 at GenFacades.Program.OutputFacadeToFile(String facadePath, HostEnvironment seedHost, Assembly facade, IAssembly contract, String pdbLocation) 11:32:56 at GenFacades.Program.Main(String[] args) ``` 5511 area-System.Numerics Intermittent Numeric Tests Failures on OSX If you look a the history for the [OSX Release Test Job](http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_release_tst/) some of the matrix tests have been failing intermittently. I'm not sure if the failures are machine specific (one of the Matrix 4x4 tests has failed twice on -1 mac but passes elsewhere). 5520 area-System.IO Fix FileSystem related permissions failures. A number of tests involving ReadOnly files were failing on Unix and Linux when run with elevated user permissions (e.g. sudo). This commit modifies those Unix tests to accommodate either set of permissions and verify the result accordingly. This unfortunately means we can't verify if the behavior is 'right', only that it is executed correctly. Windows is unchanged. resolves #5039, #5041, #4605 5521 area-System.Data Opening SqlConnection results in DllNotFoundException (Unable to load sni.dll) in case of executing from Visual Studio "works fine from command line code ``` var connection = new SqlConnection(""valid connection string""); connection.Open(); ``` project.json: ``` { ""version"": ""1.0.0-*"", ""description"": ""ConsoleApp10 Console Application"", ""authors"": [ ""sady4850"" ], ""tags"": [ """" ], ""projectUrl"": """", ""licenseUrl"": """", ""compilationOptions"": { ""emitEntryPoint"": true }, ""dependencies"": { ""System.Data.SqlClient"": ""4.0.0-beta-23516"" }, ""commands"": { ""ConsoleApp10"": ""ConsoleApp10"" }, ""frameworks"": { ""dnxcore50"": { ""dependencies"": { ""Microsoft.CSharp"": ""4.0.1-beta-23516"", ""System.Collections"": ""4.0.11-beta-23516"", ""System.Console"": ""4.0.0-beta-23516"", ""System.Linq"": ""4.0.1-beta-23516"", ""System.Threading"": ""4.0.11-beta-23516"" } } } } ``` exception: ``` at System.Runtime.Loader.AssemblyLoadContext.InternalLoadUnmanagedDllFromPath(String unmanagedDllPath) at System.Runtime.Loader.AssemblyLoadContext.LoadUnmanagedDllFromPath(String unmanagedDllPath) at Microsoft.Dnx.Runtime.Loader.LoadContext.LoadUnmanagedLibraryFromPath(String path) at Microsoft.Dnx.Runtime.Loader.PackageAssemblyLoader.LoadUnmanagedLibrary(String name) at Microsoft.Dnx.Host.LoaderContainer.LoadUnmanagedLibrary(String name) at Microsoft.Dnx.Host.DefaultLoadContext.LoadUnmanagedLibrary(String name) at Microsoft.Dnx.Runtime.Loader.LoadContext.LoadUnmanagedDll(String unmanagedDllName) at System.Runtime.Loader.AssemblyLoadContext.ResolveUnmanagedDll(String unmanagedDllName, IntPtr gchManagedAssemblyLoadContext) at System.Data.SqlClient.SNINativeMethodWrapper.SNIInitialize(IntPtr pmo) at System.Data.SqlClient.SNILoadHandle..ctor() at System.Data.SqlClient.SNILoadHandle..cctor() SQL Client: Unable to load sni.dll (DllNotFoundException) ``` " 5523 area-System.Net 'Content-Length' header not always returned when enumerating HttpContentHeaders Duplicated from internal bug 122111. Creating this tracking issue here so that we can trace these through the markers in the code back to the original internal bug tracker discussions if necessary. 5525 area-System.Net Clean up new netcore50 code in System.Net.Http, and reconcile with existing code "See the list of files in the System.Net.Http project file under the netcore50 TargetGroup: ``` XML Common\System\NotImplemented.cs Common\System\Net\HttpVersion.cs Common\System\StringExtensions.cs ``` Additionally, the code could use a bit of cleanup in general. Things like field names, brace usage, comment formatting, etc. " 5526 area-System.Net Add netcore50 configuration to System.Net.Http This includes a bit of new platform-specific code for System.Net.Http, as this library is built on top of WinRT for .NET Native / UWP. I opened #5525 and #5523 as trackers for existing issues in the code/project files. NOTE: We still need to do some major cleanup of the code to bring it in line with the style guidelines. I would like to leave that as a separate work item. I did some very minor cleanup before bringing the code out from our internal repository. @davidsh , @CIPop , @weshaggard 5531 area-System.Threading System.Threading.Tasks' RunStackGuardTests AV "http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/ubuntu_debug_prtest/1120/ All I see is ""1 test(s) failed"" but I can't find which test failed. " 5535 area-Meta Add links to triage, road to RTM, and porting @weshaggard 5538 area-System.Net CurlHandler.EasyRequest.SetProxyOptions() throws ArgException when default credentials used "Issue moved from https://github.com/dotnet/coreclr/issues/2355 on behalf of @rtwede Data Point 1: When default credentials are used with the System.Net.Http.CurlHandler.Proxy as is the case in tools such as the DNX tools it results in ArgumentExceptions being thrown due to empty credentials/username. Data Point 2: System.Net.CredentialCache.DefaultCredentials is immutably set to a default SystemNetworkCredential (all empty strings for user, password, domain). Data Point 3: http://dotnet.github.io/getting-started/ Following the recommended steps to install .net core on Ubuntu Linux includes the step ""dotnet restore"" and exposes this failure whenever a simple proxy server is configured (e.g http_proxy=http://myserver.domain:8080/) DNX tools grab the default credendtials and the entire installation fails due to the exception in SetProxyOptions(). It's clear the intention is that the Curl library should detect the lack of credentials and not attempt to use them. Presently it only succeeds if creds are null, but not when username is an empty string as in the case of the default creds used by DNX tools. Conclusion: Fundamentally this is an incompatibility between the three implementations: DNX tools, the CurlHandler.SetproxyOptions() and DefaultCredentials. One of the three needs to be changed so that the three are compatible with one another. Arguably the DNX tools or the default credentials could be faulted, but SetProxyOptions seems the friendliest change to the contract between these three components because other clients might similarly use default empty credentials in the case where none are specified or present. " 5540 area-Meta CoreFx implementation assemblies contain duplicate definitions of public types "The public types listed below have multiple definitions in CoreFX assemblies. This causes issues when the assemblies are used in dynamic/runtime compilation scenarios such as C# scripting (see e.g. https://github.com/dotnet/cli/issues/320), dynamic languages, dynamic runtime binders, etc. and in VS Expression Evaluators. All these tools work with implementation assemblies since the reference assemblies are not available. These duplicate definitions should be made internal. Duplicate types in recent .NET Core build: ``` Microsoft.Win32.SafeHandles.SafeRegistryHandle: ""Microsoft.Win32.Registry, Version=4.0.0.0, PKT=b03f5f7f11d50a3a""; ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e"" Microsoft.Win32.SafeHandles.SafeFileHandle: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.IO.FileSystem, Version=4.0.1.0, PKT=b03f5f7f11d50a3a"" System.BitConverter: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Runtime.Extensions, Version=4.0.11.0, PKT=b03f5f7f11d50a3a"" System.Console: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Console, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.IO.Directory: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.IO.FileSystem, Version=4.0.1.0, PKT=b03f5f7f11d50a3a"" System.IO.DirectoryInfo: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.IO.FileSystem, Version=4.0.1.0, PKT=b03f5f7f11d50a3a"" System.IO.SearchOption: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.IO.FileSystem, Version=4.0.1.0, PKT=b03f5f7f11d50a3a"" System.IO.File: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.IO.FileSystem, Version=4.0.1.0, PKT=b03f5f7f11d50a3a"" System.IO.FileAccess: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.IO.FileSystem.Primitives, Version=4.0.1.0, PKT=b03f5f7f11d50a3a"" System.IO.FileInfo: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.IO.FileSystem, Version=4.0.1.0, PKT=b03f5f7f11d50a3a"" System.IO.FileMode: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.IO.FileSystem.Primitives, Version=4.0.1.0, PKT=b03f5f7f11d50a3a"" System.IO.FileShare: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.IO.FileSystem.Primitives, Version=4.0.1.0, PKT=b03f5f7f11d50a3a"" System.IO.FileStream: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.IO.FileSystem, Version=4.0.1.0, PKT=b03f5f7f11d50a3a"" System.IO.FileSystemInfo: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.IO.FileSystem, Version=4.0.1.0, PKT=b03f5f7f11d50a3a"" System.IO.FileAttributes: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.IO.FileSystem.Primitives, Version=4.0.1.0, PKT=b03f5f7f11d50a3a"" System.IO.Path: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Runtime.Extensions, Version=4.0.11.0, PKT=b03f5f7f11d50a3a"" System.Collections.CollectionBase: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Collections.NonGeneric, Version=4.0.1.0, PKT=b03f5f7f11d50a3a"" System.Collections.StructuralComparisons: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Collections, Version=4.0.11.0, PKT=b03f5f7f11d50a3a"" System.Collections.ObjectModel.ReadOnlyDictionary`2: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.ObjectModel, Version=4.0.11.0, PKT=b03f5f7f11d50a3a"" System.Collections.ObjectModel.KeyedCollection`2: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.ObjectModel, Version=4.0.11.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.CipherMode: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Primitives, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.PaddingMode: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Primitives, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.KeySizes: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Primitives, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.CryptographicException: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Primitives, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.ICryptoTransform: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Primitives, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.RandomNumberGenerator: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Algorithms, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.Aes: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Algorithms, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.AsymmetricAlgorithm: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Primitives, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.CspProviderFlags: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Csp, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.CspParameters: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Csp, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.CryptoStreamMode: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Primitives, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.CryptoStream: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Primitives, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.DeriveBytes: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Algorithms, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.HMAC: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Primitives, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.HMACSHA1: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Algorithms, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.HMACSHA256: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Algorithms, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.HMACSHA384: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Algorithms, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.HMACSHA512: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Algorithms, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.HashAlgorithm: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Primitives, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.KeyNumber: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Csp, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.CspKeyContainerInfo: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Csp, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.ICspAsymmetricAlgorithm: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Csp, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.KeyedHashAlgorithm: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Primitives, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.MD5: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Algorithms, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.Rfc2898DeriveBytes: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Algorithms, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.RSAParameters: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Algorithms, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.RSA: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Algorithms, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.RSACryptoServiceProvider: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Csp, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.SHA1: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Algorithms, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.SHA256: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Algorithms, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.SHA384: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Algorithms, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.SHA512: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Algorithms, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.SymmetricAlgorithm: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.Primitives, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.X509Certificates.X509ContentType: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.X509Certificates, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.X509Certificates.X509KeyStorageFlags: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.X509Certificates, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Cryptography.X509Certificates.X509Certificate: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Cryptography.X509Certificates, Version=4.0.0.0, PKT=b03f5f7f11d50a3a"" System.Security.Principal.IIdentity: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Principal, Version=4.0.1.0, PKT=b03f5f7f11d50a3a"" System.Security.Principal.IPrincipal: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Principal, Version=4.0.1.0, PKT=b03f5f7f11d50a3a"" System.Security.Principal.TokenImpersonationLevel: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Security.Principal, Version=4.0.1.0, PKT=b03f5f7f11d50a3a"" System.Threading.WaitHandleExtensions: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Runtime.Handles, Version=4.0.1.0, PKT=b03f5f7f11d50a3a"" System.Threading.CountdownEvent: ""mscorlib, Version=4.0.0.0, PKT=7cec85d7bea7798e""; ""System.Threading, Version=4.0.11.0, PKT=b03f5f7f11d50a3a"" ``` " 5541 area-System.Net Porting async implementation and adding TPL overrides for SslStream Read/WriteAsync - Porting APM functionality for SslStream's InnerStream - Adding TPL wrappers - Adding the test proposed by @xanather Fixes #5077 @stephentoub @davidsh @bartonjs @vijaykota PTAL /cc @xanather, @benaadams @leecow After review, I'll follow the internal process for RC2. 5545 area-Serialization System.Web.Script.Serialization.JavaScriptSerializer incompatible with ES6 (and V8) "A string with a quote (') is serialized as ""\'"" which departs from JSON.stringify() Number serialization is not aligned with ES6. Other reference: https://github.com/Microsoft/ChakraCore/issues/149 " 5546 area-System.Reflection Respond to PR code review comments for ported library System.Reflection.Extensions @weshaggard Who should this be assigned to? 5549 area-System.Linq Enumerable.Sum overloads that take selectors should perform the sum themselves "And should not `Select(selector).Sum()`. When summing large sequences, the overhead added by the extra iterator is noticeable. ``` csharp void Main() { int n = 10000; var origList = Enumerable.Range(0, n); var l = origList.Interleave(origList, origList, origList, origList).Select(i => new { k = i, val = i*i }).ToList().Take(n*4); Benchmark(() => { l.MySum(i => i.k); }, name: ""SumInline""); Benchmark(() => { l.MySum2(i => i.k); }, name: ""SumProjection""); } // Define other methods and classes here static class ext { public static int MySum(this IEnumerable src, Func val) { int sum = 0; checked { foreach(var d in src) { sum += val(d); } } return sum; } public static int MySum2(this IEnumerable src, Func val) { return MySum2(src.Select(val)); } public static int MySum2(this IEnumerable src) { int sum = 0; checked { foreach(var d in src) { sum += d; } } return sum; } } public static void Benchmark(Action block, int ntimes = 1000, string name = ""block"") { // Precompile method block(); var sw = new Stopwatch(); sw.Start(); for (int i=0; i < ntimes; i++) { block(); } sw.Stop(); var perLap = (double)sw.ElapsedMilliseconds/(double)ntimes; String.Format($""Time Taken: {sw.ElapsedMilliseconds:n}ms total, {perLap:0.000}ms p/i: {name}"", sw.ElapsedMilliseconds, name).Dump(); } ``` Output is: ``` Time Taken: 1,098.00ms total, 1.098ms p/i: SumInline Time Taken: 1,297.00ms total, 1.297ms p/i: SumProjection ``` Difference tends to move between 100 and 300 ms total (0.1-0.3ms per iteration). " 5551 area-System.Net Several System.Net.Security fixes "1. Windows and Unix. The ProcessAuthentication method sets a flag to indicate that an operation is in progress, then kicks off the operation, and then in a finally block potentially resets the flag. The intent of resetting it is to reset the flag iff the operation is no longer in progress, which would be the case if the operation was synchronous or if the initiation of the asynchronous operation resulted in an exception. As such, the finally block is checking whether the operation was synchronous or whether an exception has been captured. However, for the exceptional case, this leads to race conditions. The initiation of the asynchronous operaiton can lead to the operation running concurrently with the remainder of the ProcessAuthentication method, namely concurrently with the finally block. If the operation starts quickly and fails quickly, it'll store the exception, which will cause the finally block to see that an exception has been captured and mistakenly believe that the operation failed synchronously, thus resetting the flag. But the operation was actually asynchronous, and when EndAuthentication is called, it'll see that the flag has been reset and think that the EndAuthentication call is erroneous, thus throwing an exception. While it should throw an exception (the one that caused the operation to fail), it ends up throwing an InvalidOperationException instead to signal that EndAuthentication was used incorrectly. The fix is to move the check for the exceptional situation out of the finally and into a catch block. The catch block is then used to reset the flag only if an exception emerges synchronously, and the finally block is used to reset the flag only for synchronous operations. (It's possible that for synchronous operations that fail, the flag could be written as 0 twice... that's fine.) This fixes the failure on both Windows and Unix. The failure wasn't reproing on Windows but only because of differences in timing... adding a brief pause at the end of the try block would trigger the failure on Windows as well. 2. Unix. The design of AuthenticateAsServerAsync has a clientCertificatesRequired flag. On Unix we were mapping that to ""SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT"", which causes OpenSSL to fail the handshake if no cert is provided. But the Windows code actually still allows this through, instead setting a policy error to indicate that no certificate was required. I'm simply removing the SSL_VERIFY_FAIL_IF_NO_PEER_CERT flag to match that design. I've also updated the test to assert that the error is actually being set. 3. Unix. When SSL failures occur, there are multiple places to check for errors. One starts with SSL errors, then potentially examines general crypto errors, and then potentially examines errno values. Our code wasn't properly handling this, and even for situations where it was, it was potentially conflating all of the values together as the first category, making it more difficult to interpret and tell them apart. This updates the code to capture the appropriate exception information. There are still some issues around properly mapping and roundtripping error values between the Unix PAL implementation and the consuming shared code, but this at least makes it easier for a developer of the library to debug issues. 4. Linux. All of the System.Net.Security tests were disabled on Unix. I've re-enabled them on Linux now that the causes for the failures have been fixed. I've not yet verified the fixes on OS X, so I've left them disabled there for now. cc: @bartonjs, @ericeil, @cipop, @davidsh, @vijaykota Fixes https://github.com/dotnet/corefx/issues/4317, https://github.com/dotnet/corefx/issues/4606 " 5552 area-System.Runtime Add string.Join(char, ...) overloads "Moved from https://github.com/dotnet/coreclr/issues/2736#issuecomment-173295835 on behalf of @jasonwilliams200OK Current situation: ``` c# char separator = ':'; string joined = string.Join(separator.ToString(), ""one"", ""two"", ""three""); ``` With `char` overload, users will be able to join string without calling `ToString()` i.e. `string joined = string.Join(separator, ""one"", ""two"", ""three"");` This will reduce at least one string allocation per call: https://github.com/dotnet/coreclr/blob/80c2952/src/mscorlib/src/System/Char.cs#L145-L168. # Proposed API surface - @jasonwilliams200OK ``` csharp // in -> coreclr/src/mscorlib/src/System/String.cs public static string Join(char separator, params object[] value) public static string Join(char separator, IEnumerable values) public static string Join(char separator, params string[] value) public static string Join(char separator, string[] value, int startIndex, int count) // REJECTED: //public static string Join(char separator, IEnumerable values) // in -> coreclr/src/mscorlib/src/System/UnSafeCharBuffer.cs public void AppendString(char charToAppend) ``` " 5555 area-System.Net CertificateValidationRemoteServer_EndToEnd_Ok fails on OS X ``` 09:41:41 System.Net.Security.Tests.CertificateValidationRemoteServer.CertificateValidationRemoteServer_EndToEnd_Ok [FAIL] 09:41:41 Assert.Equal() Failure 09:41:41 Expected: None 09:41:41 Actual: RemoteCertificateChainErrors 09:41:41 Stack Trace: 09:41:42 at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) 09:41:42 at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) 09:41:42 at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) 09:41:42 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 09:41:42 --- End of stack trace from previous location where exception was thrown --- 09:41:42 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:41:42 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:41:42 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() 09:41:42 at System.Net.Security.Tests.CertificateValidationRemoteServer.d__0.MoveNext() 09:41:42 --- End of stack trace from previous location where exception was thrown --- 09:41:42 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:41:42 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:41:42 --- End of stack trace from previous location where exception was thrown --- 09:41:42 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:41:42 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:41:42 --- End of stack trace from previous location where exception was thrown --- 09:41:42 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:41:42 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` It passes on Ubuntu. 5557 area-System.Net "System.Net.Security ""no encryption"" tests failing on OpenSUSE" ``` 09:37:45 System.Net.Security.Tests.ServerAllowNoEncryptionTest.ServerAllowNoEncryption_ClientNoEncryption_ConnectWithNoEncryption [FAIL] 09:37:45 System.Security.Authentication.AuthenticationException : A call to SSPI failed, see inner exception. 09:37:45 ---- Interop+OpenSsl+SslException : Operation failed with error - 12. 09:37:45 Stack Trace: 09:37:46 at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) 09:37:46 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 09:37:46 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 09:37:46 at System.Net.Security.SslStream.BeginAuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 09:37:46 at System.Net.Security.SslStream.<>c__DisplayClass21_0.b__0(AsyncCallback callback, Object state) 09:37:46 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions) 09:37:46 at System.Net.Security.SslStream.AuthenticateAsClientAsync(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 09:37:46 at System.Net.Security.Tests.ServerAllowNoEncryptionTest.d__5.MoveNext() 09:37:46 --- End of stack trace from previous location where exception was thrown --- 09:37:46 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:37:46 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:37:46 --- End of stack trace from previous location where exception was thrown --- 09:37:46 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:37:46 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:37:46 --- End of stack trace from previous location where exception was thrown --- 09:37:46 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:37:46 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:37:46 ----- Inner Stack Trace ----- 09:37:46 09:37:47 System.Net.Security.Tests.ServerNoEncryptionTest.ServerNoEncryption_ClientAllowNoEncryption_ConnectWithNoEncryption [FAIL] 09:37:47 System.IO.IOException : Authentication failed because the remote party has closed the transport stream. 09:37:47 Stack Trace: 09:37:47 at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) 09:37:47 at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) 09:37:47 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 09:37:47 --- End of stack trace from previous location where exception was thrown --- 09:37:47 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:37:47 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:37:47 at System.Net.Security.Tests.ServerNoEncryptionTest.d__4.MoveNext() 09:37:47 --- End of stack trace from previous location where exception was thrown --- 09:37:47 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:37:47 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:37:47 --- End of stack trace from previous location where exception was thrown --- 09:37:47 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:37:47 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:37:47 --- End of stack trace from previous location where exception was thrown --- 09:37:47 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:37:47 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:37:48 Finished: System.Reflection.Metadata.Tests 09:37:48 09:37:48 === TEST EXECUTION SUMMARY === 09:37:48 System.Reflection.Metadata.Tests Total: 146, Errors: 0, Failed: 0, Skipped: 0, Time: 5.368s 09:37:48 System.Net.Security.Tests.ServerNoEncryptionTest.ServerNoEncryption_ClientNoEncryption_ConnectWithNoEncryption [FAIL] 09:37:48 System.Security.Authentication.AuthenticationException : A call to SSPI failed, see inner exception. 09:37:48 ---- Interop+OpenSsl+SslException : Operation failed with error - 12. 09:37:48 Stack Trace: 09:37:48 at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) 09:37:48 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 09:37:48 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 09:37:48 at System.Net.Security.SslStream.BeginAuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 09:37:48 at System.Net.Security.SslStream.<>c__DisplayClass21_0.b__0(AsyncCallback callback, Object state) 09:37:48 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions) 09:37:48 at System.Net.Security.SslStream.AuthenticateAsClientAsync(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) 09:37:48 at System.Net.Security.Tests.ServerNoEncryptionTest.d__5.MoveNext() 09:37:48 --- End of stack trace from previous location where exception was thrown --- 09:37:48 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:37:48 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:37:48 --- End of stack trace from previous location where exception was thrown --- 09:37:48 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:37:48 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:37:48 --- End of stack trace from previous location where exception was thrown --- 09:37:48 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 09:37:48 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 09:37:48 ----- Inner Stack Trace ----- 09:37:48 09:37:48 System.Net.Security.Tests.ServerRequireEncryptionTest.ServerRequireEncryption_ClientNoEncryption_NoConnect [FAIL] 09:37:48 Assert.Throws() Failure 09:37:48 Expected: typeof(System.IO.IOException) 09:37:48 Actual: typeof(System.Security.Authentication.AuthenticationException): A call to SSPI failed, see inner exception. 09:37:48 Stack Trace: 09:37:48 at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) 09:37:48 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) 09:37:48 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) 09:37:48 at System.Net.Security.SslStream.BeginAuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) 09:37:48 at System.Net.Security.SslStream.<>c__DisplayClass21_0.b__0(AsyncCallback callback, Object state) 09:37:48 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions) 09:37:48 at System.Net.Security.SslStream.AuthenticateAsClientAsync(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) ``` These pass on Windows, Ubuntu, and CentOS. 5558 area-System.Runtime EqualityComparerForDouble and EqualityComparerForSingle use the == operator but should use Equals The class should be calling the Equals(System.Double) method on System.Double because == has the wrong semantic for NaN. 5559 area-System.Net Add netcore50 configuration for System.Net.Http.Rtc This contract is only supported on .NET Native. NOTE: This contract type-forwards its only type to System.Net.Http, the implementation assembly. I have ported this as-is from our internal build, but we probably want to change this. The type, `RtcRequestFactory` is a static class with only one static method on it, so I don't see why it can't just be implemented in System.Net.Http.Rtc itself. At the very least, we can share the same source file with System.Net.Http if it still needs to live there. @davidsh Do you recall why these two assemblies were factored as such? @weshaggard , @CIPop 5560 area-System.Net WinHttpResponseStream.ReadAsync may never finish when canceled "This example code pattern can result in the awaited task never moving to a terminal state: ``` c# var tokenSource = new CancellationTokenSource(); CancellationToken token = tokenSource.Token; var client = new HttpClient(); HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, ""some uri""); HttpResponseMessage response = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).Result; Stream stream = response.Content.ReadAsStreamAsync().Result; byte[] buffer = new byte[1000000]; Task task = stream.ReadAsync(buffer, 0, buffer.Length, token); tokenSource.Cancel(); task.Wait(); // BUG - the Wait() never returns ``` " 5565 area-System.Net HttpWebRequest ignores Content-Type in Universal Windows (UWP) App "Filing this on behalf of @AmadeusW from https://github.com/dotnet/coreclr/issues/2680: I'm working on a UWP app that connects to a third party server and accesses their data via API. By default, they serve XML responses, and JSON when requested using `Content-Type` header. Despite calling `request.ContentType = ""application/json"";` the UWP App incorrectly makes a request without the desired `Content-Type` header. The same code works fine in regular windows Console Application. Furthermore, running the culprit method from a regular Win32 process (by loading the assembly via AppDomain) correctly sets `Content-Type`, which makes me assume that the problem lies within the UWP runtime. Below are traces collected with Fiddler and minimal repro code. Let me know if there is a better place to file this bug than this repo. Method `Go()` invoked from Win32 AppDomain, or pasted into a Win32 application: ``` GET http://github.com/ HTTP/1.1 Content-Type: application/json Host: github.com Connection: Keep-Alive ``` Method `Go()` invoked as a UWP unit test, or pasted into UWP app (non-test) ``` GET http://github.com/ HTTP/1.1 Host: github.com Connection: Keep-Alive ``` Code to reproduce the issue: ``` csharp using System; using Microsoft.VisualStudio.TestPlatform.UnitTestFramework; using System.Net; using System.IO; using System.Threading.Tasks; namespace UnitTestProject1 { [TestClass] public class UnitTest1 { [TestMethod] public void TestMethod1() { var x = Go().Result; } public static async Task Go() { var request = WebRequest.Create($""http://github.com/""); request.ContentType = ""application/json""; using (var response = await request.GetResponseAsync()) { using (var reader = new StreamReader(response.GetResponseStream())) { var test = request.Headers; var data = await reader.ReadToEndAsync(); return data; } // <- set breakpoint here } } } } ``` Observe that `test` contains the `Content-Type` header (so it didn't get ""lost"") Check in Fiddler that the request does _not_ have the `Content-Type` header My actual issue: I need to send & receive this: ``` GET http://api.translink.ca/RTTIAPI/V1/stops/61453/estimates?apiKey=XXX&routeNo=099 HTTP/1.1 Content-Type: application/json Host: api.translink.ca Connection: Keep-Alive HTTP/1.1 200 OK Cache-Control: private Content-Length: 1588 Content-Type: application/json; charset=utf-8 Server: Microsoft-IIS/8.5 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Date: Fri, 15 Jan 2016 06:04:48 GMT [{""RouteNo"":""099"",""RouteName"":""COMMERCIAL-BROADWAY\/UBC (B-LINE) ... ``` but instead the UWP app sends & receives this: ``` GET http://api.translink.ca/RTTIAPI/V1/stops/59997/estimates?apiKey=XXX&routeNo=099 HTTP/1.1 Host: api.translink.ca Connection: Keep-Alive HTTP/1.1 200 OK Cache-Control: private Content-Length: 4123 Content-Type: application/xml; charset=utf-8 Server: Microsoft-IIS/8.5 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Date: Fri, 15 Jan 2016 06:03:13 GMT 099COMMERCIAL-BROADWAY/UBC (B-LINE) ``` " 5566 area-Infrastructure Add Red Hat Enterprise Linux 7.2 CI / Rolling Build Add RHEL 7.2 to Jenkins outerloop build & test. https://access.redhat.com/downloads/content/69/ver=/rhel---7/7.2/x86_64/product-software Related CI work items: https://github.com/dotnet/corefx/issues/4653 (2008 R2 ServerCore), https://github.com/dotnet/corefx/issues/4656 (Debian 8.2), https://github.com/dotnet/corefx/issues/4779 (2016 NanoServer), https://github.com/dotnet/corefx/issues/5349 (Ubuntu 15.10) 5567 area-System.Collections Add List constructor size to ConcurrentCollections ToList and other similiar functions Many of the ConcurrentCollections create Lists of all the items but do not initialize the list to the size of the number of items in the collection. Most of the time the list will end up containing the exact Count of the number of items in the collection. Rather than continuously resize the List it makes sense to initialize it to the expected size. 5569 area-System.Net Obsoleting SSL2, 3 Includes fixes for the sln (currently broken) and one of the csproj files for Primitives. These files were automatically generated by Visual Studio. The csproj GUID has been updated to an unique value: currently the PAL project shares the same with the UnitTests project. @SidharthNabar @leecow @ericstj PTAL /cc @davidsh Fixes #4927 5572 area-Infrastructure GitHub build is unstable and takes longer than in RC1 timeframe "Build became unstable after the latest updates. Examples: 1. On clone 1: ``` git clean -xdf build Restoring BuildTools version 1.0.25-prerelease-00151... Initializing BuildTools ... Done initializing tools. [14:01:26.01] Building Native Libraries... [14:01:41.52] Building Managed Libraries... [14:01:44.30] Restoring all packages... [14:26:05.76] Restoring all packages...Done. <------------- note the 24 minute time to restore packages. S:\c1\Tools\publishtest.targets(116,5): error MSB3027: Could not copy ""S:\c1\bin\Windows_NT.AnyCPU.Debug\System.Threading.Overlap ped\System.Threading.Overlapped.dll"" to ""S:\c1\bin/tests/Windows_NT.AnyCPU.Debug\System.Threading.Overlapped.Tests\dnxcore50\Syst em.Threading.Overlapped.dll"". Exceeded retry count of 10. Failed. [S:\c1\src\System.Threading.Overlapped\tests\System.Threading.O verlapped.Tests.csproj] S:\c1\Tools\publishtest.targets(116,5): error MSB3021: Unable to copy file ""S:\c1\bin\Windows_NT.AnyCPU.Debug\System.Threading.Ov erlapped\System.Threading.Overlapped.dll"" to ""S:\c1\bin/tests/Windows_NT.AnyCPU.Debug\System.Threading.Overlapped.Tests\dnxcore50 \System.Threading.Overlapped.dll"". The process cannot access the file 'S:\c1\bin/tests/Windows_NT.AnyCPU.Debug\System.Threading.O verlapped.Tests\dnxcore50\System.Threading.Overlapped.dll' because it is being used by another process. [S:\c1\src\System.Threadi ng.Overlapped\tests\System.Threading.Overlapped.Tests.csproj] ``` 1. On clone 2 I didn't run clean: ``` build QueryOperators\OrderByThenByTests.cs(351,52): error CS0518: Predefined type 'System.Int32' is not defined or imported [S:\c2\src\ System.Linq.Parallel\tests\System.Linq.Parallel.Tests.csproj] QueryOperators\OrderByThenByTests.cs(351,65): error CS0518: Predefined type 'System.Int32' is not defined or imported [S:\c2\src\ System.Linq.Parallel\tests\System.Linq.Parallel.Tests.csproj] QueryOperators\OrderByThenByTests.cs(351,58): error CS0518: Predefined type 'System.Int32' is not defined or imported [S:\c2\src\ System.Linq.Parallel\tests\System.Linq.Parallel.Tests.csproj] QueryOperators\OrderByThenByTests.cs(351,40): error CS0518: Predefined type 'System.Int32' is not defined or imported [S:\c2\src\ System.Linq.Parallel\tests\System.Linq.Parallel.Tests.csproj] QueryOperators\OrderByThenByTests.cs(351,32): error CS0518: Predefined type 'System.Object' is not defined or imported [S:\c2\src \System.Linq.Parallel\tests\System.Linq.Parallel.Tests.csproj] QueryOperators\OrderByThenByTests.cs(351,72): error CS0246: The type or namespace name 'MemberType' could not be found (are you m issing a using directive or an assembly reference?) [S:\c2\src\System.Linq.Parallel\tests\System.Linq.Parallel.Tests.csproj] QueryOperators\OrderByThenByTests.cs(351,92): error CS0518: Predefined type 'System.Object' is not defined or imported [S:\c2\src \System.Linq.Parallel\tests\System.Linq.Parallel.Tests.csproj] QueryOperators\OrderByThenByTests.cs(351,85): error CS0518: Predefined type 'System.Type' is not defined or imported [S:\c2\src\S ystem.Linq.Parallel\tests\System.Linq.Parallel.Tests.csproj] QueryOperators\SkipSkipWhileTests.cs(246,10): error CS0518: Predefined type 'System.Object' is not defined or imported [S:\c2\src \System.Linq.Parallel\tests\System.Linq.Parallel.Tests.csproj] QueryOperators\SkipSkipWhileTests.cs(246,10): error CS0246: The type or namespace name 'Theory' could not be found (are you missi ng a using directive or an assembly reference?) [S:\c2\src\System.Linq.Parallel\tests\System.Linq.Parallel.Tests.csproj] QueryOperators\SkipSkipWhileTests.cs(247,10): error CS0518: Predefined type 'System.Object' is not defined or imported [S:\c2\src \System.Linq.Parallel\tests\System.Linq.Parallel.Tests.csproj] QueryOperators\SkipSkipWhileTests.cs(247,10): error CS0246: The type or namespace name 'OuterLoop' could not be found (are you mi ssing a using directive or an assembly reference?) [S:\c2\src\System.Linq.Parallel\tests\System.Linq.Parallel.Tests.csproj] QueryOperators\SkipSkipWhileTests.cs(248,10): error CS0518: Predefined type 'System.Object' is not defined or imported [S:\c2\src \System.Linq.Parallel\tests\System.Linq.Parallel.Tests.csproj] QueryOperators\SkipSkipWhileTests.cs(248,10): error CS0246: The type or namespace name 'MemberData' could not be found (are you m issing a using directive or an assembly reference?) [S:\c2\src\System.Linq.Parallel\tests\System.Linq.Parallel.Tests.csproj] ^CTerminate batch job (Y/N)? y ``` This was scrolling for a while so I've aborted the build. Could this warning be the cause? If yes, shouldn't it be transformed to an error? ``` 1>S:\c2\build.proj(40,5): warning MSB3073: The command """"S:\c2\Tools/dotnetcli/bin/dotnet.exe"" restore --packages ""S:\c2\packages"" --source https://www.myget.org/F/dotnet-core/ --source https://www.myget.org/F/dotnet-coreclr/ --source https://www.myget.org/F/dotnet-corefxtestdata/ --source https://www.myget.org/F/dotnet-buildtools/ --source https://www.nuget.org/api/v2/ ""S:\c2\src\System.Collections\src\project.json"""" exited with code 1. ``` Attached the full msbuild.log [msbuild.log.txt](https://github.com/dotnet/corefx/files/98238/msbuild.log.txt) " 5574 area-Meta Framework Design Guidelines Updates to Consider This list represents some guidelines that we often run into and feel like they should be updated: - [ ] Event design guidelines (should we use Func/Action? do we need sender, etc.) - [ ] Async pattern (task based async, cancellations) - [ ] Default parameters - [ ] Exceptions - [ ] Nested types 5575 area-Infrastructure System.AppContext cannot be found I don't know if this is CoreFX or CoreCLR or dotnet-cli, but I tried updating to build rc3-23720, and can no longer load `System.AppContext` on Ubuntu 14.04. ``` Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. ``` I thought perhaps I needed to reference it as a dependency explicitly (though it is depended on by [NETStandard.Platform](https://www.myget.org/feed/dotnet-core/package/nuget/NETStandard.Platform)), but that does not seem to be the case. I build with `dotnet publish --framework dnxcore50` using the dotnet-nightly package. Sure enough, `System.AppContext.dll` is not included in the output, but it shouldn't be looking in there anyway, as the type is in `mscorlib.dll`, which exists. @stephentoub any ideas? 5581 area-System.Net Refactoring the Windows specific code in NegotiateStream summary Renaming NegoState.Windows.cs to InternalNegoState.cs as it had much common code applicable for Unix. (commit1) Separating out the common code and windows specific code in InternalNegoState and NegoState.Windows.cs respectiviely. Adding NegotiateInfoClass.cs to be used by Unix impl. Tested locally both AuthenticateAsServer/Client on Windows. /cc: @SidharthNabar @stephentoub @davidsh @CIPop @vijaykota 5582 area-System.Linq Implement IReadOnlyList<> in Grouping<,> class from System.Linq "Hello! I talk about [class Grouping](https://github.com/dotnet/corefx/blob/a58f490274e286d844d277f2658f2c074a4d5350/src/System.Linq/src/System/Linq/Enumerable.cs#L3544) from System.Linq. Now it declared as # Proposed API ``` c# public class Grouping : // Existing interfaces IGrouping, IList // Proposed interfaces IReadOnlyList, IReadOnlyCollection { … ``` # Workaround In many scenarios I want to have a group (an instance of IGrouping<,>) as an instance of IReadOnlyCollection<> or IReadOnlyList<>. Now I have to wrap the group in a ReadOnlyCollection<> or copy it to the new List<>. ``` c# public static IReadOnlyCollection AsReadOnlyCollection(this IGrouping group) { if(group == null) { throw new ArgumentNullException(""group""); } var readOnly = group as IReadOnlyCollection; if(readOnly != null) { return readOnly; } var list = group as IList; if(list != null) { return new ReadOnlyCollection(list); } return new List(group); } ``` I know, that not any IGrouping<,> should implement list interfaces, but in many cases I can use a fast path. All I need is add IReadOnlyList to a list of interfaces, that Group implements." 5584 area-System.Security X509CertificateCollection.Remove() weird error checking X509CertificateCollection.Remove() disallows removing null objects but allows removing objects which are not in the collection (because it just forwards to `List.Remove()` and never checks the result). MSDN https://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.x509certificatecollection.remove%28v=vs.100%29.aspx says removing elements which are not in the collection is disallowed. If you want to allow removing elements that are not in the collection then you should also allow removing null objects - they are never in the collection. 5585 area-System.Runtime Indexing into a large stringbuilder is extremely innefficient "Run the following program (reverse a string in a string builder) Results: When i runs up to 100,000. About 1 : 13 elapsed time. When i runs up to 1,000,000: 1 : 5000 elapsed time. On 10,000,000 you give up. ``` c# using System; using System.Diagnostics; using System.Text; namespace ConsoleApplication32 { class Program { static void Main(string[] args) { StringBuilder builder = new StringBuilder(); for (int i = 0; i < 1000000; i++) { builder.Append(""ABCDEF""); } var input = builder.ToString().ToCharArray(); var last = input.Length - 1; var mid = last / 2; Stopwatch sw1 = new Stopwatch(); sw1.Start(); char temp; for (int i = 0; i <= mid; i++) { temp = input[i]; input[i] = input[last - i]; input[last - i] = temp; } sw1.Stop(); Console.WriteLine(sw1.ElapsedMilliseconds); Stopwatch sw2 = new Stopwatch(); sw2.Start(); for (int i = 0; i <= mid; i++) { temp = builder[i]; builder[i] = builder[last - i]; builder[last - i] = temp; } sw2.Stop(); Console.WriteLine(sw2.ElapsedMilliseconds); } } } ``` " 5590 area-System.Net Fix hang when WinHttpHandler response stream reads are canceled "The task from ReadAsync was never moving to a terminal state (i.e. ""hanging"") if the token was marked for cancellation after starting the task. The problem was that our task continuation wasn't being called if the token was cancelled before the continuation was scheduled. The fix is to avoid passing in the token during the .ContinueWith call. Instead, the token is checked inside the continuation. This puts all the logic in the same place for checking the final status of the ReadAsync operation (which has multiple inner operations) including whether it should fault due to an error or have a successful completion. Fixes #5560. " 5591 area-System.Reflection Remove System.Reflection.Extensions dependency on System.Reflection.TypeExtensions This is an issue based on comments from @ericstj on PR #5542 . It is not OK to reference public surface area that is only available in the implementation assembly. Can we either 1) share this source or 2) create a public API? 5593 area-System.Xml Add System.Xml.Xsl .NET Core currently doesn't support running XML transforms (XSLT). 5600 area-System.Net Disable HttpClient test sometimes failing in CI Ref: Issue #5485 5601 area-System.Data System.PlatformNotSupportedException being thrown in SQLClient on Windows machines When running ASP.NET tests on our CI machine (Windows), we are observing a System.PlatformNotSupportedException exception being thrown. The problem looks to be in: https://github.com/dotnet/corefx/blob/ceae1d38c93e3f53210ad91884dabc1bd6d30a90/src/System.Data.SqlClient/src/Interop/SNINativeMethodWrapper.cs#L420 ``` System.PlatformNotSupportedException The Win32NativeMethods.IsTokenRestrictedWrapper is not supported on non-Windows platform ``` 5606 area-System.Net "System.Net: Replace existing ""catch Exception / throw later"" patterns with ExceptionDispatchInfo " @stephentoub : > There are a bunch of places in the code where an Exception is caught and then later thrown. This kind of re-throwing ends up clobbering the original call stack and Watson bucket stored in the Exception, making it more difficult for someone looking at the exception to understand where it came from. To address this, ExceptionDispatchInfo was added in .NET 4.5, and is now used in places like Task that have this exact issue. I'd suggest we look at using ExceptionDispatchInfo in all of these places. Basically, instead of just storing an Exception, you'd store the result of ExceptionDispatchInfo.Capture(caughtException), and then instead of using throw _caughtException;, you'd do _caughtExceptionDispatchInfo.Throw();. ExceptionDispatchInfo will preserve the original information and append the new throw location's call stack rather than using it to overwrite the original. This was discussed in https://github.com/dotnet/corefx/pull/5541#discussion_r50399913. 5607 area-System.Data Fix INVALID_PROV references in Managed SNI Strings.resx in SqlClient doesn't have an entry for Invalid Provider (ID: SNI_PN10), which causes a Debug.Assert to be tripped in ProcessSniError when fetching that resource. So we should either add an Invalid Provider value in Strings.resx, or default to using another SniProvider value as the default provider in error messages. 5610 area-System.Linq dynamic usage causing live hangs after upgrading packages I'm trying to upgrade our packages to rc3-23721, and on Windows the System.Numerics.Vectors tests are hanging, pegging the CPU at the line doing the dynamic cast here: ``` C# public static T GenerateSingleValue(int min = 1, int max = 100) where T : struct { var randomRange = s_random.Next(min, max); T value = (T)(dynamic)randomRange; return value; } ``` 5611 area-System.Data Remove System.Data.Common.DbColumn's _customValues Per #5609 and @saurabh500, creating an issue here: I think the Dictionary on `DbColumn` should be protected so that implementers can access the structure more efficiently. Downstream people will want to iterate, bulk create, etc. The indexer being the only point of access internally will be a problem/bottleneck there. 5613 area-System.Net Port https://github.com/dotnet/corefx/pull/5590 to RC2 "The task from ReadAsync was never moving to a terminal state (i.e. ""hanging"") if the token was marked for cancellation after starting the task. The problem was that our task continuation wasn't being called if the token was cancelled before the continuation was scheduled. The fix is to avoid passing in the token during the .ContinueWith call. Instead, the token is checked inside the continuation. This puts all the logic in the same place for checking the final status of the ReadAsync operation (which has multiple inner operations) including whether it should fault due to an error or have a successful completion. " 5615 area-Serialization [Port to RC2] Fix serialization of recursive collections in data contract serializers Porting https://github.com/dotnet/corefx/pull/5398 to release/1.0.0-rc2 branch. 5617 area-System.Net Additional PR feedback for NegotiateStream porting "- [ ] End if / else if / else if /... waterfalls with one last ""if"" see detailed comment https://github.com/dotnet/corefx/pull/5581#discussion_r50420783 - [ ] https://github.com/dotnet/corefx/pull/5581#discussion_r50420982 - [ ] #5541 (comment) - [ ] https://github.com/dotnet/corefx/pull/5581#discussion_r50422362- [ ] fix comment ""// This is to not depend on GC&SafeHandle class if the context is not needed anymore"" - [ ] https://github.com/dotnet/corefx/pull/5581#discussion_r50426276 - [ ] use a variable instead of direct usage of number 4, 16 in the code. https://github.com/dotnet/corefx/pull/5581#discussion_r50431861 - [ ] https://github.com/dotnet/corefx/pull/5581#discussion-diff-50433441 https://github.com/dotnet/corefx/pull/5581#discussion_r50433347 - [ ] https://github.com/dotnet/corefx/pull/5581#discussion_r50423078 - [ ] https://github.com/dotnet/corefx/pull/5772#discussion_r51471912 - [ ] https://github.com/dotnet/corefx/pull/5772#discussion_r51472457 - [ ] https://github.com/dotnet/corefx/pull/5772#discussion_r51473319 - [ ] https://github.com/dotnet/corefx/pull/5772#discussion_r51472857 - [ ] https://github.com/dotnet/corefx/pull/5772#discussion_r51473345 - [ ] https://github.com/dotnet/corefx/pull/5772#discussion_r51472547 - [ ] https://github.com/dotnet/corefx/pull/5772#discussion_r51473799 - [ ] https://github.com/dotnet/corefx/pull/5772#discussion_r52743275 Need to throw more accurate exception in syn with other exception in code. " 5625 area-System.ComponentModel Expose DescriptionAtttribute Splitting this out from https://github.com/dotnet/corefx/issues/2065 since it has scenarios outside of System.Data. See https://github.com/aspnet/Home/issues/1251 5626 area-System.ComponentModel System.ComponentModel: Cache TypeConverter results Uses the IntrinsicTypes table and performs a check for existing entries in that table before doing anything else. Also adds performance tests for GetConverter. Works for types that declare a Converter through an attribute as well as built-in types. resolves #5337 @Tanya-Solyanik 5628 area-System.Net Assert from SystemNative_Accept on CentOS http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/centos7.1_debug_tst_prtest/1050/console ``` 08:44:21 corerun: /mnt/resource/j/workspace/dotnet_corefx/nativecomp_centos7.1_debug_prtest/src/Native/System.Native/pal_networking.cpp:1458: Error SystemNative_Accept(int32_t, uint8_t *, int32_t *, int32_t *): Assertion `addrLen <= static_cast(*socketAddressLen)' failed. 08:44:21 ./run-test.sh: line 130: 38134 Aborted ./corerun xunit.console.netcore.exe $testDllName -xml testResults.xml -notrait category=failing -notrait ``` 5630 area-System.IO DirectoryInfo.Exists on a symlink to a directory fails on Unix Due to https://github.com/dotnet/corefx/pull/5020, now a DirectoryInfo created for a symlink to a valid directory returns false for Exists. This is causing any HttpClient request to an https URL to fail on Ubuntu, as X509Certificates uses DirectoryInfo.Exists to determine whether it can enumerate the root store certs directory, and on Ubuntu, the default certs path is a symlink. cc: @mjrousos, @ianhays 5634 area-System.Data Add test to verify the correct bits for SqlClient SqlClient should have a test which verifies that the correct bits are being built for the respective platforms. 5639 area-System.IO Re-enable unicode zip tests for Unix I'm unable to repro any errors in the tests on my local Ubuntu machine. 5642 area-System.Net Fixing assert conditions for System.Net.Security. Fixing incorrectly converted Debug.Assert during NegotiateStream port (9a414b0af4230b59a06dd9e255a36400582f482e). These affect DBG builds, will render incorrect ETW in production builds and impact test execution. Tested locally by removing all ActiveIssues temporarily to ensure we get enough coverage. @davidsh @stephentoub @shrutigarg PTAL 5645 area-System.Runtime CharTests failing on Windows after upgrading to rc3-23722 http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_debug_prtest/1339/consoleFull ``` 17:59:44 Discovering: System.Runtime.Tests 17:59:45 Discovered: System.Runtime.Tests 17:59:45 Starting: System.Runtime.Tests 17:59:46 CharTests.TestIsLetterStrInt [FAIL] 17:59:46 Assert.False() Failure 17:59:46 Expected: False 17:59:46 Actual: True 17:59:46 Stack Trace: 17:59:46 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Runtime\tests\System\Char.cs(294,0): at CharTests.TestIsLetterStrInt() 17:59:46 CharTests.TestIsLower [FAIL] 17:59:46 Assert.False() Failure 17:59:46 Expected: False 17:59:46 Actual: True 17:59:46 Stack Trace: 17:59:46 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Runtime\tests\System\Char.cs(359,0): at CharTests.TestIsLower() 17:59:46 CharTests.TestIsNumber [FAIL] 17:59:46 Assert.False() Failure 17:59:46 Expected: False 17:59:46 Actual: True 17:59:46 Stack Trace: 17:59:46 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Runtime\tests\System\Char.cs(389,0): at CharTests.TestIsNumber() 17:59:46 CharTests.TestIsLetter [FAIL] 17:59:46 Assert.False() Failure 17:59:46 Expected: False 17:59:46 Actual: True 17:59:46 Stack Trace: 17:59:46 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Runtime\tests\System\Char.cs(275,0): at CharTests.TestIsLetter() 17:59:46 CharTests.TestIsDigit [FAIL] 17:59:46 Assert.False() Failure 17:59:46 Expected: False 17:59:46 Actual: True 17:59:46 Stack Trace: 17:59:46 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Runtime\tests\System\Char.cs(239,0): at CharTests.TestIsDigit() 17:59:46 CharTests.TestIsNumberStrInt [FAIL] 17:59:46 Assert.False() Failure 17:59:46 Expected: False 17:59:46 Actual: True 17:59:46 Stack Trace: 17:59:46 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Runtime\tests\System\Char.cs(402,0): at CharTests.TestIsNumberStrInt() 17:59:46 CharTests.TestIsLetterOrDigit [FAIL] 17:59:46 Assert.False() Failure 17:59:46 Expected: False 17:59:46 Actual: True 17:59:46 Stack Trace: 17:59:46 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Runtime\tests\System\Char.cs(321,0): at CharTests.TestIsLetterOrDigit() 17:59:46 CharTests.TestIsDigitStrInt [FAIL] 17:59:46 Assert.False() Failure 17:59:46 Expected: False 17:59:46 Actual: True 17:59:46 Stack Trace: 17:59:46 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Runtime\tests\System\Char.cs(250,0): at CharTests.TestIsDigitStrInt() 17:59:46 CharTests.TestIsLowerStrInt [FAIL] 17:59:46 Assert.False() Failure 17:59:46 Expected: False 17:59:46 Actual: True 17:59:46 Stack Trace: 17:59:46 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Runtime\tests\System\Char.cs(370,0): at CharTests.TestIsLowerStrInt() 17:59:46 CharTests.TestIsLetterOrDigitStrInt [FAIL] 17:59:46 Assert.False() Failure 17:59:46 Expected: False 17:59:46 Actual: True 17:59:46 Stack Trace: 17:59:46 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Runtime\tests\System\Char.cs(342,0): at CharTests.TestIsLetterOrDigitStrInt() ``` 5647 area-Serialization DataContractJsonSerializer incompatible with ES6 (and V8) Bug report with code: https://github.com/cyberphone/jsondotnet 5653 area-Infrastructure Win7 outer loop debug build broken It ends up with tons of warnings of the form: ``` 01:43:43 EXEC : warning : FindPackagesById: System.Console [d:\j\workspace\dotnet_corefx\outerloop_win7_debug\build.proj] ``` and then times out. 5655 area-System.Net Remove spinning from event instances in Unix socket operations We use ManualResetEventSlims to enable blocking waiting for non-blocking socket operations to complete when making calls to Socket's synchronous methods. By default, if an MRES isn't yet Set when it's waited on, MRES.Wait() does a bit of spinning before falling back to a true blocking wait. But in this situation, we expect that either the socket operation will complete synchronously or will take some non-trivial amount of time to complete asynchronously, in which case the spinning is generally unnecessary overhead. This commit simply disables that extra spinning. cc: @pgavlin, @ericeil, @vancem (Assuming https://github.com/dotnet/corefx/pull/5472 gets checked in after the issues it's facing are fixed, this change will still matter but only in the situation where sync and async calls are mixed on the same Socket instance, such that the socket is put into non-blocking mode and we hit these code paths.) 5657 area-System.Data RC2 - A connection was successfully established with the server, but then an error occurred during the pre-login handshake "Platform : Linux Ubuntu Runtime : 1.0.0-rc2-16357,coreclr,x64,linux System.Data.SqlClient : 4.0.0-rc2-23623 ConnectionString : Data Source=XXXXXXXX,60606;Initial Catalog=XXXXXXXX;Integrated Security=False;User ID=sa;Password=XXXX;Connect Timeout=10;Encrypt=False;Application Name=""vNEXT"" Works perfectly on Windows using same runtime as above. Perform a dnu restore --no-cache before running console application. First SqlClient.Open connection results in below stack trace **A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught) ---> System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> Interop+OpenSsl+SslException: Operation failed with error - 12** ``` fail: XXX.Ims.Common.Data.TenantDbConnectionStringBuilder[0] System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught) ---> System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> Interop+OpenSsl+SslException: Operation failed with error - 12. --- End of inner exception stack trace --- at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) at System.Net.Security.SslStream.BeginAuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) at System.Net.Security.SslStream.BeginAuthenticateAsClient(String targetHost, AsyncCallback asyncCallback, Object asyncState) at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl[TArg1](Func`4 beginMethod, Func`2 endFunction, Action`1 endAction, TArg1 arg1, Object state, TaskCreationOptions creationOptions) at System.Net.Security.SslStream.AuthenticateAsClientAsync(String targetHost) at System.Data.SqlClient.SNI.SNITCPHandle.EnableSsl(UInt32 options) --- End of inner exception stack trace --- at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at XXX.Ims.Common.Data.TenantDbConnectionStringBuilder.Build(Int32 tenantId) ClientConnectionId:c185aa23-7668-46f1-9a83-ad3018d65229 ``` " 5660 area-Infrastructure FileSystemWatcher tests fail intermittently on Unix due to too many open inotify instances http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/centos7.1_release_tst_prtest/1094/console ``` 19:32:38 FileSystemWatcherTests.FileSystemWatcher_EnableRaisingEvents [FAIL] 19:32:38 System.IO.IOException : The configured user limit (128) on the number of inotify instances has been reached. 19:32:38 Stack Trace: 19:32:38 at System.IO.FileSystemWatcher.StartRaisingEvents() 19:32:38 at FileSystemWatcherTests.FileSystemWatcher_EnableRaisingEvents() 19:32:38 Finished: System.IO.FileSystem.Watcher.Tests ``` 5662 area-System.Linq InterpreterTests.CompileInterpretCrossCheck_OrAssign failed in CI on OS X http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_debug_tst/272/console ``` 18:30:18 System.Linq.Expressions.Tests.InterpreterTests.CompileInterpretCrossCheck_OrAssign [FAIL] 18:30:18 System.NullReferenceException : Object reference not set to an instance of an object. 18:30:18 Stack Trace: 18:30:18 at System.Linq.Expressions.Tests.InterpreterTests.Verify(Expression expr) 18:30:18 at System.Linq.Expressions.Tests.InterpreterTests.CompileInterpretCrossCheck_OrAssign() ``` cc: @bartdesmet, @VSadov 5663 area-System.Net Two System.Net.Security tests timing out on Windows I've seen this happen a couple of times now: ``` 05:07:44 System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_ServerNoEncryption_NoConnect [FAIL] 05:07:44 Assert.Throws() Failure 05:07:44 Expected: typeof(System.IO.IOException) 05:07:44 Actual: typeof(Xunit.Sdk.TrueException): Timed Out 05:07:44 Expected: True 05:07:44 Actual: False 05:07:45 Stack Trace: 05:07:45 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Security\tests\FunctionalTests\ClientAsyncAuthenticateTest.cs(172,0): at System.Net.Security.Tests.ClientAsyncAuthenticateTest.d__18.MoveNext() 05:07:45 --- End of stack trace from previous location where exception was thrown --- 05:07:45 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 05:07:45 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` and ``` 05:07:45 System.Net.Security.Tests.SslStreamStreamToStreamTest.SslStream_StreamToStream_Successive_ClientWrite_Sync_Success [FAIL] 05:07:45 Handshake completed. 05:07:45 Expected: True 05:07:45 Actual: False 05:07:45 Stack Trace: 05:07:45 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Security\tests\FunctionalTests\SslStreamStreamToStreamTest.cs(76,0): at System.Net.Security.Tests.SslStreamStreamToStreamTest.SslStream_StreamToStream_Successive_ClientWrite_Sync_Success() ``` http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_debug_prtest/1381/consoleFull 5667 area-System.Net Linux - SslStream.AuthenticateAsClient is not presenting client certificates to server _This issue exists on Linux only_ When establishing a connection to a TCP server where a client certificate is required, the client certificate does not get passed to the server side. The connection then gets aborted by the server, resulting in an exception as below. Using NetMon, we can observe during that handshake that the server successfully sends its certificate to the client, but the client never presents the client certificate to the server. At this point, the server will send an RST and the connection is killed. I've isolated the repro to using just a TcpClient and TcpServer + SslStream - see https://gist.github.com/iamjasonp/27cd1ebce287f8b51d0e for the rudimentary repro. Platforms tested - .NET Desktop - :white_check_mark: - .NET Core - Windows: :white_check_mark: - .NET Core - Linux: :x: First chance exception caught: ``` 'System.Security.Authentication.AuthenticationException' in System.dll Additional information: The remote certificate is invalid according to the validation procedure. ``` Server call stack: ``` System.dll!System.Net.Security.SslState.ForceAuthentication(bool receiveFirst, byte[] buffer, System.Net.AsyncProtocolRequest asyncRequest) System.dll!System.Net.Security.SslState.ProcessAuthentication(System.Net.LazyAsyncResult lazyResult) System.dll!System.Net.Security.SslStream.AuthenticateAsServer(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation) TcpRepro-Server.exe!Examples.System.Net.SslTcpServer.ProcessClient(System.Net.Sockets.TcpClient client) TcpRepro-Server.exe!Examples.System.Net.SslTcpServer.RunServer() TcpRepro-Server.exe!Examples.System.Net.SslTcpServer.Main(string[] args) ``` This also looks to be the root cause of the issue in https://github.com/dotnet/wcf/issues/619#issuecomment-173177433 5671 area-System.IO Add Canterbury Corpus perf tests to Compression Our System.IO.Compression tests were using deterministically generated random data to test compression/decompression time. While the results were useful, they missed a scope of tests that is required for good compression testing. This commit adds perf tests for GZipStream that make use of the popular Canterbury Corpus testing suite. resolves #5423. Requires https://github.com/dotnet/corefx-testdata/pull/7 @stephentoub @bjjones 5678 area-System.Net Enable System.Net.Security tests on OS X 5681 area-System.IO Add async ZipFile APIs All ZipFile APIs are currently synchronous. This means manipulations to zip files will always block a thread. We should investigate using an async file and calling async IO APIs (ReadAsync/WriteAsync) to free up the thread while IO is happening. https://github.com/dotnet/corefx/pull/5680 5683 area-System.Net Allow the remote cert validation test to pass for an UntrustedRoot SInce it's not practical to require particular trust on individual machines, allow the tests to pass when the root cert is untrusted. Fixes #5555. cc: @stephentoub @CIPop @eerhardt 5685 area-System.Security CentOS: X509Store(Root, LocalMachine) doesn't contain all the system certs "Ubuntu uses a hybrid model of ""one giant file"" and ""one cert per file"", which led to the initial implementation of X509Store being what it is. CentOS just uses the ""one giant file"" approach, so we only read the first cert out of it and call it a day. When reading the system cert files we should read until the file is drained. " 5688 area-System.Net Enable System.Net.Security tests on OS X Fixes #4606 cc: @bartonjs, @vijaykota, @cipop, @davidsh 5689 area-System.Data Will DbConnection be abstracted behind an interface? I've started building out a little ORM project for .Net Core and noticed that the DbConnection did not have any interfaces that I can wrap my providers behind. Is this something in the roadmap? If not, what is the expectation for unit testing, fakes by inheritance and what was the reasoning behind making this change from how .Net worked? Would this mean I have to build an abstraction layer over IDbConnection/DbConnection so I can support a .Net 4.5 implementation & a .Net Core implementation? I tried looking for some documentation or issues related to this to help understand the direction you are going with DbConnection; came up empty. 5690 area-System.Net RC2: Porting System.Net.Primitives contract change Porting the fix for #4927 (PR: #5569) The code changes also include small fixes for the sln and csproj files that will allow developers to run the tests in Visual Studio (mostly VS generated changes, ensuring that the GUIDs are unique and the SLN matches the csproj information). @leecow @ellismg PTAL /cc: @davidsh @stephentoub 5691 area-System.Net RC2: Porting SslStream Async overrides and regression fix Porting the fixes for #5077: #5541 #5642 The second commit is fixing a regression that was introduced during a merge/pattern change made concurrently with the initial port development. @leecow @ellismg PTAL /cc: @davidsh @stephentoub 5694 area-System.Net System.Security.Principal.Windows missing runtime assembly on Linux Or incorrectly referenced? Not sure, not directly referenced It restores fine `Installing System.Security.Principal.Windows.4.0.0-rc2-23722` Then errors in use ``` Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Security.Principal.Windows, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load the specified file. at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) --- End of inner exception stack trace --- at System.Net.ContextAwareResult.Cleanup() at System.Net.LazyAsyncResult.Complete(IntPtr userToken) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Net.ContextAwareResult.Complete(IntPtr userToken) at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken) at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionCallback(Int32 numBytes, SocketError errorCode) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() bash: line 1: 13883 Aborted (core dumped) dnx test fail: Exit code 134 from /usr/bin/env fail: Stack trace: ``` No issues on Windows 5700 area-System.IO "RC2 Test failed: DeletedTests.FileSystemWatcher_Deleted_Negative: ""Should not observe a deleted event within 500ms""" In #5690: http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_debug_tst_prtest/151/consoleFull#-21371504001f1a4601-6aec-4fd5-b678-78d4389fd5e8 @stephentoub @nguerrera PTAL ``` 00:16:53 === TEST EXECUTION SUMMARY === 00:16:53 System.IO.MemoryMappedFiles.Tests Total: 342, Errors: 0, Failed: 0, Skipped: 0, Time: 7.944s 00:16:56 DeletedTests.FileSystemWatcher_Deleted_Negative [FAIL] 00:16:56 Should not observe a deleted event within 500ms 00:16:56 Expected: False 00:16:56 Actual: True 00:16:56 Stack Trace: 00:16:57 at Utility.ExpectNoEvent(WaitHandle eventOccurred, String eventName, Int32 timeout) 00:16:57 at DeletedTests.FileSystemWatcher_Deleted_Negative() 00:16:59 Finished: System.IO.FileSystem.Tests 00:16:59 00:16:59 === TEST EXECUTION SUMMARY === 00:16:59 System.IO.FileSystem.Tests Total: 2029, Errors: 0, Failed: 0, Skipped: 0, Time: 7.687s 00:17:03 Finished: System.IO.FileSystem.Watcher.Tests 00:17:03 00:17:03 === TEST EXECUTION SUMMARY === 00:17:03 System.IO.FileSystem.Watcher.Tests Total: 58, Errors: 0, Failed: 1, Skipped: 0, Time: 17.725s 00:17:04 error: One or more tests failed while running tests from 'System.IO.FileSystem.Watcher.Tests'. Exit code 1. ``` 5701 area-System.Xml "Unix test: System.Xml.XDocument: ""Mismatch : expected: ?>""" Failed in #5690 Some Console.WriteLine race condition is hiding the test execution summary for the test that failed: http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_release_tst_prtest/146/consoleFull#-21371504001f1a4601-6aec-4fd5-b678-78d4389fd5e8 @krwq, @sepidehMS PTAL ``` 23:53:19 === TEST EXECUTION SUMMARY === 23:53:19 System.Xml.XDocument.TreeManipulation.Tests Total: 2, Errors: 0, Failed: 0, Skipped: 0, Time: 0.988s 23:53:19 Mismatch : expected: test]]> 23:53:19 actual: test]]> 23:53:19 Mismatch : expected: 23:53:19 actual: 23:53:19 23:53:19 23:53:19 Mismatch : expected: ?> 23:53:19 actual: 23:53:19 ?> 23:53:19 23:53:19 Finished: System.Xml.XDocument.xNodeBuilder.Tests 23:53:19 23:53:19 === TEST EXECUTION SUMMARY === 23:53:20 System.Xml.XDocument.xNodeBuilder.Tests Total: 19, Errors: 0, Failed: 0, Skipped: 0, Time: 1.178s 23:53:20 Finished: System.Xml.XDocument.SDMSample.Tests ``` 5706 area-System.Diagnostics System.Diagnostics.Tracing should be updated to 4.1.0 https://github.com/dotnet/corefx/commit/aa42148a3ef85bf767a6a14124cfb0492d45bccc added surface area over the last stable version and should have updated the minor version of this assembly. /cc @cshung 5708 area-System.Net SslProtocols obsolete warnings-as-errors while trying to upgrade to newest packages e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_release_prtest/1441/ ``` d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\Common\tests\System\Net\SslProtocolSupport.cs(21,15): error CS0618: 'SslProtocols.Ssl3' is obsolete: 'This value has been deprecated. It is no longer supported. http://go.microsoft.com/fwlink/?linkid=14202' [d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Http.WinHttpHandler\tests\UnitTests\System.Net.Http.WinHttpHandler.Unit.Tests.csproj] ``` cc: @davidsh, @CIPop, @SidharthNabar 5710 area-System.Net TLS 1.0 in Windows Client may still vulnerable to Beast This is a followup issue raised on https://github.com/dotnet/corefx/issues/5187#issuecomment-175138937 Based on this security vulnerability. http://blogs.msdn.com/b/kaushal/archive/2012/01/21/fixing-the-beast.aspx **_The BEAST vulnerability is addressed by splitting (or fragmenting) the application data in to SSL records in the fashion 1/(n-1). This is explained in RFC2246 (section 6.2.1 Fragmentation).**_ In Unix, we get these split bytes which is the fix for Beast Vulnerability ![image](https://cloud.githubusercontent.com/assets/698547/12596701/0263bd3c-c436-11e5-9f02-c6c8661dedb2.png) But In Windows, we don't get this split bytes. ![image](https://cloud.githubusercontent.com/assets/698547/12596711/11c30742-c436-11e5-8f21-aaac7faad199.png) I just want to make sure that TLS 1.0 in Windows Client does not vulnerable to this BEAST Security issue. References : http://blogs.msdn.com/b/kaushal/archive/2012/01/21/fixing-the-beast.aspx http://blogs.msdn.com/b/kaushal/archive/2011/10/03/taming-the-beast-browser-exploit-against-ssl-tls.aspx http://vnhacker.blogspot.com/2011/09/beast.html Sql Server 2008 Patch - https://support.microsoft.com/en-us/kb/2653857 5714 area-System.Net Allowing Ssl2,3 within tests. Fixes #5708. @Priya91 @stephentoub @davidsh PTAL We can either merge or just cherry-pick this from my private branch to the original PR (#5703). 5715 area-System.Net Reorganize System.Net.Http and remove the Internal folder. Reogranize System.Net.Http by removing the Internal folder and changing the csproj. 5716 area-System.Net Ensure that System.Net tests are executing against the checked-in implementations /cc: @davidsh Several System.Net test assemblies are referencing externally downloaded packages for System.Net dependencies.This makes it harder to discover issues early in development (see #5708 for an example). We should change the test csproj files to directly reference other System.Net implementations (see NameResolution, Sockets for examples). 5717 area-System.Net Removing/updating TODOs from System.Net CSProj files System.Private.Networking is now removed but we want to keep the tests executing against locally built binaries. Added a TODO tracking issue for System.Net.Http. @stephentoub @davidsh PTAL (related: #5708) 5726 area-System.Net Implementing NegoState.Unix.cs It includes the implementation on NegoState.Unix pal on top of the common refactoring changes( https://github.com/dotnet/corefx/pull/5581) Please refer to the Commit 4 of this PR for reviewing. Includes: Implementation of NegoState.Unix.cs Methods. Implementaion of SafeHandles to be used. Tested locally as Linux client with windows server. cc: @stephentoub , @bartonjs @vijaykota 5727 area-Infrastructure Ubuntu Debug Build and Test CI out of space E.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/ubuntu_debug_prtest/1464/console > fatal: cannot create directory at 'src/System.Text.RegularExpressions': No space left on device 5730 area-System.Numerics Add Matrix3x3 I am working on a project involving graphics & Win2D and I would welcome to have an invertible Matrix3x3 type, mainly for transformations between color spaces. Anyone else? 5733 area-Infrastructure Enable building and publishing of portable PDBs for x-plat libraries For our x-plat builds we need to start producing portable PDBs. Once we do that we need to also ensure they are getting published like our windows PDBs. 5737 area-System.Security RSACryptoServiceProvider throws System.DllNotFoundException: Unable to load DLL 'Advapi32.dll' on Linux Opened on behalf of @YEVHENO from https://github.com/dotnet/coreclr/issues/2876 Running ASP.NET 5 application on the coreclr on Linux fails when using the RSACryptoServiceProvider DNX version: 1.0.0-rc1-final ``` System.DllNotFoundException: Unable to load DLL 'Advapi32.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) at Internal.NativeCrypto.CapiHelper.Interop.CryptGetDefaultProvider(Int32 dwProvType, IntPtr pdwReserved, Int32 dwFlags, StringBuilder pszProvName, Int32& IntPtrProvName) at Internal.NativeCrypto.CapiHelper.GetDefaultProvider(Int32 dwType) at Internal.NativeCrypto.CapiHelper.OpenCSP(CspParameters cspParameters, UInt32 flags, SafeProvHandle& safeProvHandle) at Internal.NativeCrypto.CapiHelper.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer) at System.Security.Cryptography.RSACryptoServiceProvider.ImportCspBlob(Byte[] keyBlob) ``` 5739 area-System.Net SendRecvAPM_Single_Stream_TCP_IPv4 failed in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_debug_tst_prtest/208/console ``` 12:33:50 System.Net.Sockets.Tests.SendReceive.SendRecvAPM_Single_Stream_TCP_IPv4 [FAIL] 12:33:50 Assert.True() Failure 12:33:50 Expected: True 12:33:50 Actual: False 12:33:50 Stack Trace: 12:33:50 at System.Net.Sockets.Tests.SendReceive.SendRecvAPM_Stream_TCP(IPAddress listenAt, Boolean useMultipleBuffers) 12:33:50 at System.Net.Sockets.Tests.SendReceive.SendRecvAPM_Single_Stream_TCP_IPv4() ``` 5740 area-System.IO Consider adding an EventSource for System.IO.FileSystem We should consider adding an EventSource to System.IO.FileSystem. Events could include files being opened/closed, interesting places where we fall off a fast-path (e.g. allocating extra buffers), etc. 5741 area-System.Runtime TimeZoneInfo DisplayName is always set to StandardName on Unix "In order to read the localized standard and daylight display names of time zones on Unix, we are using ICU. There doesn't appear to be a ""C"" api for the generic name. There is an ICU C++ api to get the 'generic' name. However, we can only use the ""C"" apis and not the C++ apis. See [Remove OSX Homebrew ICU dependency](https://github.com/dotnet/coreclr/pull/1851). I can think of 2 ways to fix this: 1. Use the C++ apis on platforms that allow it (not OSX) 2. Read the CLDR data directly. Some background from @mj1856, if we decide to take the second approach: part of the reason generic names are challenging is because there are three different patterns in the raw data. Examples of each: Pattern 1 – Generic name differs from both standard and daylight names: Generic Name: “Pacific Time” Standard Name: “Pacific Standard Time” Daylight Name: “Pacific Daylight Time” Pattern 2 – Generic name matches the standard name: Generic Name: “Central European Time” Standard Name: “Central European Time” Daylight Name: “Central European Summer Time” Pattern 3 – No generic name exists, so revert to the location based form: Generic Name: none, so use “UK Time” Standard Name: “Greenwich Mean Time” Daylight Name: “British Summer Time” I’m not sure exactly why, but I can confirm in these [docs](http://userguide.icu-project.org/datetime/timezone): > Generic name, such as ""Pacific Time"". Currently, this is not supported by ICU. Not sure why they chose not to implement, but might have something to do with the above. Also worth mentioning, CLDR Generic Name is not quite a one-to-one match with our idea of a Display Name. Consider that many build time zone pickers by iterating over all time zones given by TimeZoneInfo.GetSystemTimeZones, then putting them in a dropdown with Id for the value and DisplayName for the text shown to the user. This works because Display Names are unique within the results. It doesn’t quite work with Generic Name, as multiple different time zones will use the same Generic Name. For example, both Europe/Paris and Europe/Berlin will have “Central European Time” as their generic name, because they’re both in the same CLDR metazone. To build a picker for IANA zones that doesn’t actually show the Id to the user requires also asking the user for a country. If we use Generic Name as a Display Name, we might want to concatenate a country name or code, such as “Central European Time (France)” / “Central European Time (Germany)”. " 5743 area-Infrastructure Clean up build.sh and mono.targets Once we move to using .Net Core MSBuild for x-plat build, we should clean up build.sh script since it has a lot of code that downloaded msbuild plus it had some checks for prerequisites. We should also stop using mono.targets, since they shouldn't be required anymore. 5744 area-System.Reflection Allow reflection to identify substituted generic types "For overload resolution tie breakers Roslyn needs a way to differentiate between a substituted generic and actual type, e.g: ``` C# class Foo { void Bar(T v); void Bar(int v); } ``` Consider this code: ``` C# dynamic foo = new Foo(); foo.Bar(2); ``` Notice the use of `dynamic`. This forces the overload resolution to happen at runtime, with reflection being the provider for the type information the C# binder uses. The goal is to have overload resolution pick the second method, instead of failing. They currently use `MetadataToken` to compare the original definitions. Given this API throws in certain cases now (e.g. CoreRT), it would be better if we could introduce a new APIs. ### Repro ``` C# class Program { static void Main(string[] args) { dynamic foo = new Foo(); foo.Bar(2); } class Foo { public void Bar(T v) { System.Console.WriteLine(""generic""); } public void Bar(int v) { System.Console.WriteLine(""not generic""); } } } ``` - Works on .NET Framework and prints ""not generic"", - On .NET Core the behavior is not guaranteed. The late binder will try to get to `MetadataToken` through private reflection and use that, but if that fails - it is not there or throws -- it will will just pick one of the overloads at random. @VSadov @weshaggard @pallavit " 5745 area-System.Data Add Default Configuration Option in System.Data.Common.csproj The csproj should include a default Windows_Debug Configuration to prevent potential packaging issues on Windows 5749 area-System.Net Add a clean way to cancel a long-running Socket operation (e.g. accept or connect) The normal pattern to listen for incoming connections is: ```c# using (var s = new Socket(...)) { s.Bind(...); s.Listen(...); while (true) { var connectionSocket = s.Accept(); Task.Run(() => ProcessConnection(connectionSocket)); } } ``` The only way to reliably cancel that loop is to close the socket. This works, but it causes an `ObjectDisposedException` which is usually one of the reserved exception types that always indicate a bug such as `NRE` and `ArgumentNullException`. Catching that exception might hide real bugs. You might confuse the intended `ObjectDisposedException` with one that is not supposed to happen but did (bug). Also, this seems to be racy. What if the handle is closed right before `Accept` passes it to the native `accept` function? Is that even thread-safe?! Could be a use of an invalid/unintended handle. Note sure if the BCL has a way to prevent that scenario. Some people suggest to break the loop by connecting to that socket. That might not be possible depending on what interface you are listening on. There are no guarantees to be able to connect anywhere at all. Also, this feels like such a dirty hack. There are ideas of using `IAsyncResult.WaitHandle` with a timeout or in combination with another wait handle but that's quite nasty code and much slower than not using a wait handle. It's much faster to let the kernel wait as part of a synchronous call than to execute an asynchronous call, then create an event object, wait for it and then dispose of all of this. Also, in case you do a `WaitHandle.WaitAny(ioHandle, cancelHandle)` and you find yourself in the cancellation case you _still_ need to abort the IO using `Socket.Close` which is the same dirtiness. It does not matter for this issue whether you're using sync or async IO. Please add a way to cancel any long-running socket operation such as accept, connect, read, write, shutdown in a clean way. This could take the form of a `CancellationToken` or a method `Socket.AbortPendingOperations()`. A cancelled operation should throw an exception that allows to identify the situation so that it can be caught reliably. Cancelling is not just important for breaking the accept loop but it's useful for all other long-running operations as well. Sometimes you need to be able to shut down processing. 5750 area-System.Net SendRecvAsync_Stream_TCP test failed on OS X http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_debug_tst/306/console ``` 09:48:08 Unhandled Exception: Xunit.Sdk.EqualException: Assert.Equal() Failure 09:48:08 Expected: Success 09:48:08 Actual: OperationAborted 09:48:08 at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) 09:48:08 at System.Net.Sockets.Tests.SocketAsyncExtensions.<>c__DisplayClass3_0.b__0(Object _, SocketAsyncEventArgs args) 09:48:08 at System.Net.Sockets.Tests.SocketAsyncExtensions.ReceiveAsync(Socket socket, SocketAsyncEventArgs eventArgs, IList`1 buffers, SocketFlags flags, Action`1 handler) 09:48:08 at System.Net.Sockets.Tests.SendReceive.<>c__DisplayClass4_3.b__2(Int32 received) 09:48:08 at System.Net.Sockets.Tests.SocketAsyncExtensions.<>c__DisplayClass3_0.b__0(Object _, SocketAsyncEventArgs args) 09:48:08 at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e) 09:48:08 at System.Net.Sockets.SocketAsyncEventArgs.ExecutionCallback(Object state) 09:48:08 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 09:48:08 at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags) 09:48:08 at System.Net.Sockets.SocketAsyncEventArgs.CompletionCallback(Int32 bytesTransferred, SocketError socketError) 09:48:08 at System.Net.Sockets.SocketAsyncEventArgs.TransferCompletionCallback(Int32 bytesTransferred, Byte[] socketAddress, Int32 socketAddressSize, SocketFlags receivedFlags, SocketError socketError) 09:48:08 at System.Net.Sockets.SocketAsyncContext.<>c.b__42_0(Object args) 09:48:08 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 09:48:08 at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() 09:48:08 at System.Threading.ThreadPoolWorkQueue.Dispatch() ``` 5754 area-System.Net Linux workaround for multiple connect attempts per socket does not work "On Linux, we attempt to re-use a socket for multiple connection attempts by ""connecting"" the socket to an invalid address between each ""real"" connect attempt. See [PrimeForNextConnectAttempt](https://github.com/dotnet/corefx/blob/ac67ffac987d0c27236c4a6cf1255c2bcbc7fe7d/src/System.Net.Sockets/src/System/Net/Sockets/SocketPal.Unix.cs#L525). This does not work as intended. In the current implementation, the raw call to `connect()` cases any pending call to `epoll_wait()` to wake up and mark the socket as connected; any subsequent connect attempt on a non-blocking socket (or an Async connect attempt) then appears to succeed immediately, whether it did in fact or not. This is causing some tests (e.g., `System.Net.Sockets.Tests.DualMode.ConnectV4V6IPAddressListToV6Host_Success`) to appear to succeed, even though the connection is never successfully established. Once #5472 is merged, this test will hang, as the non-blocking connect will now be blocking, and this bug will no longer mask the underlying issue. I tried fixing this in the blocking case, by adding a call to `PrimeForNextConnectAttempt` after a blocking `connect` fails, and discovered that this also does not work. The subsequent connect attempt simply blocks until it times out. If I disable this feature entirely, forcing Socket methods that connect to address lists to use multiple sockets instead, then the test passes. " 5755 area-System.Net System.Net EventSources conflict, reducing total logging "Given: ``` C# internal class ConsoleEventListener : EventListener { private static string[] s_optOut = { ""System.Threading.Tasks.TplEventSource"", ""System.Diagnostics.Eventing.FrameworkEventSource"", }; public ConsoleEventListener() { foreach (EventSource source in EventSource.GetSources()) { if (Array.IndexOf(s_optOut, source.Name) == -1) { EnableEvents(source, EventLevel.LogAlways); } } } protected override void OnEventSourceCreated(EventSource eventSource) { base.OnEventSourceCreated(eventSource); if (Array.IndexOf(s_optOut, eventSource.Name) == -1) { EnableEvents(eventSource, EventLevel.LogAlways, EventKeywords.All); } } protected override void OnEventWritten(EventWrittenEventArgs eventData) { Console.Write(""Event ""); Console.Write(eventData.EventSource.Name); Console.Write('-'); Console.Write(eventData.EventId); Console.Write("" (""); if (eventData.Payload != null) { bool writeComma = false; foreach (object value in eventData.Payload) { if (writeComma) { Console.Write("", ""); } Console.Write(value); writeComma = true; } } Console.WriteLine("").""); } } ``` Open an instance of the logger, then proceed to open a TcpListener and a (client) SslStream. Notice that many of the logs appear to be missing, which is likely due to: ``` ... Event Microsoft-System-Net-Debug-1 (Dns.GetHostName). Event Microsoft-System-Net-Debug-0 (ERROR: Exception in Command Processing for EventSource Microsoft-System-Net-Debug: An instance of EventSource with Guid 99e4576b-9d7e-585f-8b32-0ac3082f2282 already exists.). ... Event Microsoft-System-Net-1 (System.Net.Sockets.Socket, 55915408, BeginConnect, localhost, 0, 0). Event Microsoft-System-Net-0 (ERROR: Exception in Command Processing for EventSource Microsoft-System-Net: An instance of EventSource with Guid 501a994a-eb63-5415-9af1-1b031260f16c already exists.). ... Event Microsoft-System-Net-2 (System.Net.Sockets.TcpClient, 43495525, GetStream, System.Net.Sockets.NetworkStream, 2606490, 0). Event Microsoft-System-Net-Debug-0 (ERROR: Exception in Command Processing for EventSource Microsoft-System-Net-Debug: An instance of EventSource with Guid 99e4576b-9d7e-585f-8b32-0ac3082f2282 already exists.). ... ``` Each of the event 0 events seems to be a place where the next System.Net library woke up and tried logging something, and then that event source never gets activated due to a duplicate registration. Looks to be true for both Windows and Linux. " 5756 area-Serialization Update serialization to use metadata writer to support persistence of generated code to disk Related issue: #4561 5757 area-System.Net Sockets logging emits an argument/parameter count mismatch error Given the ConsoleEventLogger from #5755, lots of errors seem to be emitted from Sockets logging: ``` Event Microsoft-System-Net-2 (System.Net.Sockets.Socket, 55915408, Receive, System.Int32, 5, 0). Event Microsoft-System-Net-1 (System.Net.Sockets.Socket, 55915408, Receive, , 0, 0). Event Microsoft-System-Net-Sockets-0 (Event 5 was called with 3 argument(s), but it is defined with 2 parameter(s).). Event Microsoft-System-Net-Sockets-5 (System.Byte[], Receive). ``` 5758 area-System.Net Enable Client Auth Certs for Unix SslStream. 1) Pass the handle The Windows SslStream flow is to start a TLS session as server auth, then process a CredentialsRequired during the handshake, add credentials to the existing session, and continue. It's hard to maintain symmetry on that flow for the Unix pathway, due to the API differences in OpenSSL and SChannel. So, the Unix session will always pass down to native the provided client auth credentials, and OpenSSL can use them when it sees appropriate. 2) Untrusted certificates should still complete handshake The Unix SslStream implementation had two different places that a client authentication certificate was validated. The first one was from an OpenSSL callback, and reporting an error will interrupt the TLS handshake. The second was from after the handshake, and presents the results to the user validation callback to determine if data should be sent after the handshake. In the ideal case the first version is redundant, in a user-handled case it caused a failure when success was expected; so it should just be removed. 3) Enable the end-to-end client authentication cert test for Unix Also asserts that the IsMutuallyAuthenticated property gets set, the certificates used were the correct ones, and that both forward and callback versions of providing the certificate function. Fixes #5667. cc: @CIPop @davidsh 5760 area-Meta Add documentation around platform naming Given the widespread use of .NET, there is some room for confusion what certain platforms names mean, for instance here: https://github.com/dotnet/corefx/issues/2394#issuecomment-175933165 I've added this doc to help clarify a bit what we mean by X and that we sometimes say Y instead. Kudos to @mellinoe for providing me with a head start :smile: @richlander @blackdwarf @weshaggard 5763 area-System.Data ObjectDisposedException on OpenSSL when connecting to SQLAzure on Unix I notice SSLStream (OpenSSL) on Unix throws ObjectDisposedException after finish connecting on SqlAzure on Unix. (There is no exception on Prem). This may be related with issue on Mac as well. On Mac, it throws RemoteCertificateNameMismatch. https://github.com/dotnet/corefx/issues/5173 ![image](https://cloud.githubusercontent.com/assets/698547/12663551/fe2abc94-c5dd-11e5-9f22-be1775c8df01.png) ``` Unhandled Exception: System.ObjectDisposedException: Safe handle has been closed at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean& success) at System.StubHelpers.StubHelpers.SafeHandleAddRef(SafeHandle pHandle, Boolean& success) at Interop.Ssl.SslShutdown(SafeSslHandle ssl) at Interop.OpenSsl.Disconnect(SafeSslHandle context) at System.Net.Security.SafeDeleteContext.ReleaseHandle() at System.Runtime.InteropServices.SafeHandle.InternalFinalize() at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing) at System.Runtime.InteropServices.SafeHandle.Finalize() [1] 24788 abort (core dumped) ./corerun xunit.console.netcore.exe System.Data.SqlClient.Tests.dll -class ``` 5764 area-System.Collections Simplify and Modernize System.Collections tests The tests for System.Collections were ported from an old framework and filled with Drivers and unnecessary obfuscations. I simplified them and consolidated code wherever possible. - refactored the tests to maximize code reuse and achieve a higher coverage rate. - Interface-specific tests were added for interface-specific behavior e.g. ICollection_Generic_tests. I added these tests to Common/tests alongside the existing IEnumerableTest, ICollectionTests, etc. - Note that these new classes encompass all of the coverage that the existing IEnumerableTest/IDictionaryTest/etc do. However, those classes are being used in System.ObjectModel and may not be deleted until that library is modified to use the new structures. I am going to do that at a later date. - removed some lines of code form System.Collections that weren't being hit. - Added generic scenarios for every collections for at least one value type (int) and one reference type (string). Some collections (e.g. HashSet) have many more test sets Improvements: 16547 additions, 44866 deletions => 28319 lines removed | | before | after | | --- | --- | --- | | line coverage | 74.5% | 96.2% | | branch coverage | 70.4% | 92.8% | | execution time | 49.388 s | 41.496 s | | number of tests | 1604 | 36140 | *coverage doesn't include Dictionary or List since those are in mscorlib. For those libraries (particularly Dictionary) I mostly just added new tests and didn't remove old ones. resolves #754, #4964 cc: people who have been active in the Collections space recently: @stephentoub @hughbe @Clockwork-Muse 5765 area-System.Net Reenable cert validation test on Linux cc: @bartonjs 5766 area-Meta Port System.Xaml to .NET Core Filed as a result of the discussion in #2394. **Note**: this doesn't represent a commitment from us to open source System.Xaml or to even port it to .NET Core -- it's simply capturing the community request to do so. ------------------------------------------------------------------------------------- ### Scenarios 1. WF (Workflow Foundation) - #2394 * However, note that [CoreWF](https://github.com/dmetzgar/corewf) is also trying to abstract serialization from Xaml (as it was originally intended). That said, all existing Desktop serialziations are in Xaml and we need it for transition path at minimum (having converters would be another option). 1. Prereq for WPF * Note: WPF / GUI frameworks are a big step for .NET Core (which targets server and console apps scenarios today) - it needs full end-to-end plan & commitment first. 1. Prereq for UI frameworks * https://github.com/AvaloniaUI/Avalonia - @grokys (see https://github.com/dotnet/corefx/issues/5766#issuecomment-275260663) * [Eto.Forms](https://github.com/picoe/Eto) - @cwensley (see https://github.com/dotnet/corefx/issues/5766#issuecomment-275282292) 1. ... more scenarios will be added based on the discussion * @Mike-EEE's [*devops* scenario](https://github.com/dotnet/corefx/issues/5766#issuecomment-275164640) - waiting on more details * @Kation's [non-UI framework scenarios](https://github.com/dotnet/corefx/issues/5766#issuecomment-275310753) - waiting on more details 5768 area-System.Data RemoteCertificateNameMismatch on OSX SSLStream.ClientAuthenticate to SQL Azure In Mac OS when using SSLStream to AuthenticateAsClient to SQL Azure, we get RemoteCertificateNameMismatch Policy error during validation. Here is how we init the stream https://github.com/dotnet/corefx/blob/ac67ffac987d0c27236c4a6cf1255c2bcbc7fe7d/src/System.Data.SqlClient/src/System/Data/SqlClient/SNI/SNITcpHandle.cs#L151 When we authenticate as Client https://github.com/dotnet/corefx/blob/ac67ffac987d0c27236c4a6cf1255c2bcbc7fe7d/src/System.Data.SqlClient/src/System/Data/SqlClient/SNI/SNITcpHandle.cs#L177 It give us policy error : RemoteCertificateNameMismatch https://github.com/dotnet/corefx/blob/ac67ffac987d0c27236c4a6cf1255c2bcbc7fe7d/src/System.Data.SqlClient/src/System/Data/SqlClient/SNI/SNITcpHandle.cs#L221 This issue is the root cause of https://github.com/dotnet/corefx/issues/5173 5770 area-System.Net Adding fallback logic to NTLM This includes implementing the NTLM logic for OSX/Linux. fallback logic to ntlm if Kerberos fails. tested locally as linux client against windows server. ongoing testing with OSX client , will update here once testing is done. Please refer to commit 5 for the changes.. other commits are maintained and reviewed separately in separate PRs. cc @stephentoub @bartonjs @vijaykota 5772 area-System.Net Refactoring the Windows specific code in NegotiateStream summary Renaming NegoState.Windows.cs to InternalNegoState.cs as it had much common code applicable for Unix. (commit1) Separating out the common code and windows specific code in InternalNegoState and NegoState.Windows.cs respectiviely. Adding NegotiateInfoClass.cs to be used by Unix impl. Tested locally both AuthenticateAsServer/Client on Windows. /cc:@stephentoub @bartonjs @CIPop @vijaykota 5773 area-System.Net Implementing NegoState.Unix.cs It includes the implementation on NegoState.Unix pal on top of the common refactoring changes( #5581) Please refer to the Commit 4 of this PR for reviewing. Includes: Implementation of NegoState.Unix.cs Methods. Implementaion of SafeHandles to be used. Tested locally as Linux client with windows server. cc: @stephentoub , @bartonjs @vijaykota 5774 area-System.Net Introducing native shims for libgssapi in order to support NegotiateStream Introducing native shims for libgssapi in order to support NegotiateStream 5782 area-System.Data Where is DbProviderFactories??? Hi... in NET451 we have this class called DbProviderFactories that has a method called GetFactory that allows clients to obtain a DbProviderFactory given a connection... I am trying to port to NETCORE50 and I don't see DbProviderFactories although I do see DbProviderFactory... are there plans to include DbProviderFactories in NETCORE50? or is there another generic way in NETCORE50 to obtain a connection's DbProviderFactory? thank you // // Summary: // Returns an instance of a System.Data.Common.DbProviderFactory. // // Parameters: // connection: // The connection used. // // Returns: // An instance of a System.Data.Common.DbProviderFactory for a specified connection. public static DbProviderFactory GetFactory(DbConnection connection); 5788 area-Meta Update platform-names.md Clarifications and corrections 5789 area-Infrastructure Have dotnet-bot automatically submit PRs for package updates We should have @dotnet-bot automatically do https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/project-nuget-dependencies.md#upgrading-a-package-dependency when new packages are available and submit a PR. /cc @stephentoub @dagood @markwilkie 5790 area-System.Net Disable multiple connect attempts per socket on Linux. The Linux implementation of multiple connect attempts per socket does not work correctly, per #5754. This change disables multiple connect attempts on all Unix platforms (since Linux was the only one that claimed to support it). Fixes #5754 @pgavlin , @stephentoub 5792 area-Infrastructure Add build.cmd property to toggle native build "Currently the native Windows build will run whenever build.cmd is called. This commit adds a toggle through msbuild Property syntax to enable/disable the native or managed build. By default both are built. To build just the native components: ./build.cmd /p:buildspec=native To build just the managed components: ./build.cmd /p:buildspec=managed To build both: ./build.cmd or ./build.cmd /p:buildspec=both I opted to use syntax of the msbuild format so that the args can then be passed as %\* to msbuild without causing errors. I originally used ""native"" or ""managed"" but it felt jarring against the other args to build.cmd and required passing a cloned args array to msbuild. Using a property seemed cleaner. resolves #5311 @weshaggard @stephentoub " 5800 area-System.Xml System.Xml.XmlNodeReader is not Available in .Net Core This API is not available in .Net Core. https://github.com/dotnet/wcf/issues/702 is being blocked by this issue. 5811 area-System.Net What's the recommended approach for reusing/disposing new HttpClient handlers? It's been recommended to reuse the full framework's `HttpClientHandler` across multiple requests instead of disposing it every time (because disposing it means the performance hit of closing and re-opening the underlying connection). Does this advice stands true for the brand new world of `CurlHandler` and `WinHttpHandler`? 5814 area-System.Net Fix HttpWebRequest to allow content-related headers without content HttpWebRequest, part of the System.Net.Requests contract, has historically allowed any request header to be sent. However, in CoreFx it is built on top of System.Net.Http. And System.Net.Http has a stricter object model where it requires headers to be added only to specific collections. The bug was trying to add a content-related header without any content being sent. This worked in .NET Framework (Desktop). While we encourage developers to migrate to the newer System.Net.Http library, we try to maintain app-compat where possible for HttpWebRequest. The fix is to internally create an empty HttpContent object when calling into System.Net.Http and place the content-related headers into that collection. Fixes #5565. 5819 area-System.Net HttpClient doesnt expose the correct method as virtual I want to extend HttpClient class to create a wrapper over it. The problem is that it doesnt have the right method exposed as virtual. The following method should be virtual. ``` public Task SendAsync( HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken) ``` Moreover, the following method should be new because it actually hides the implementation of the base method. ``` public override Task SendAsync( HttpRequestMessage request, CancellationToken cancellationToken) ``` 5822 area-System.Text Use XML comments in System.Text.Encodings.Web As a new library in corefx, System.Text.Encodings.Web should use XML comments to document the APIs, and should have `$(OutputPath)$(AssemblyName).xml` in the .csproj so that the XML comments are validated by the compiler, a documentation XML file is produced, and that documentation file is included in the NuGet package. 5824 area-Meta Add table of terms The document uses many terms that aren't defined. In order to avoid breaking the flow of the document, it's best if those are defined at the top of the file. This addresses much of the feedback raised in #5760. 5826 area-System.Net Remove SystemNative_PlatformSupportsMultipleConnectAttempts #5790 removed the uses of this shim. We need to remove the shim itself, once we have a new build of System.Threading.Socket that no longer needs it. This should be a matter of reverting 7000023f729abe20337ed91816c019744b6a6a5c. 5828 area-System.Data Investigate if named pipe path parsing can use URI utilities 5829 area-System.Net Socket.Connect methods that connect to multiple endpoints are broken on Unix "Unlike Windows, the sockets API on Linux and OSX does not allow a single socket to attempt more than one connection. We had attempted to do this on Linux, but it did not work (see #5754). `Socket` has multiple methods that depend on being able to try connections to multiple endpoints on a single socket: ``` csharp public void Connect(IPAddress[] addresses, int port) ``` ...attempts to connect to each of `addresses`, returning when one of them is successful. ``` csharp public void Connect(string host, int port) ``` ...does a DNS lookup, which may return multiple addresses, then attempts to connect to each of them until successful. ``` csharp public void Connect(EndPoint remoteEP) ``` If this is passed a `DnsEndPoint`, then this behaves the same as `Connect(string, int)`, trying all resolved addresses. Additionally, we support async variants of all of these. On Unix we currently ""fake"" this by creating multiple temporary sockets behind the scenes, trying to connect each of them to a different address. If one succeeds, we immediately disconnect it and connect the ""real"" socket to that address. This workaround has some possibly unacceptable implications: 1) Whichever endpoint we finally choose, we will end up connecting to it _twice_, once for the ""probe"" connection, to see if it will work, and again for the ""real"" connection. This will cause issues for servers that do not expect more than one connection, for load balancers that try to distribute connections, etc. It's also a lot of undesired network overhead. 2) Even though the first connection attempt succeeded, the second will not necessarily succeed. This is especially true in scenarios like DNS-based load balancing. So we have a functional issue here, where we may fail to connect the ""real"" socket in cases where we would have succeeded. I do not think we should leave this as-is, as it will create too many unexpected strange behaviors in code that uses these, expecting them to behave the same way as they do on Windows. So I propose doing one of the following: a) Remove the `Connect` overloads that take multiple endpoints, and the `DnsEndpoint` type, from the public contracts. -- or -- b) Change these Connect overloads to throw `PlatformNotSupportedException` on Unix, Also, change `Connect(EndPoint, int)` to throw `PlatformNotSupportedException` if passed a `DnsEndPoint`. In either case, we should provide sample code for how to code equivalent behavior using the remaining APIs. @stephentoub, @pgavlin, @CIPop, @davidsh, @SidharthNabar, please provide feedback. " 5831 area-Serialization XmlElementAttributes.Remove doesn't throw on missing element On Desktop this method is provided by CollectionBase, which throws when it can't find the element to remove: http://referencesource.microsoft.com/#mscorlib/system/collections/collectionbase.cs,147. The implementation in CoreFx defers to ArrayList, which does not exhibit the same exception pattern on Remove. 5832 area-System.Net System.Net.Sockets.Tests.DualMode.AcceptV6BoundToSpecificV4_CantConnect hangs on Unix With PR #5472, System.Net.Sockets.Tests.DualMode.AcceptV6BoundToSpecificV4_CantConnect hangs because it expects `Socket.Dispose` to unblock a synchronous call to `Socket.Accept`. Closing a socket does not cancel a blocking operation on Unix OSs. 5835 area-System.Net Override ReadByte on SslStream In an application that's using the Redis client library, a significant portion of the allocations are coming from calls to ReadByte on an SslStream. Since SslStream doesn't override ReadByte, the base Stream.ReadByte is used, and it ends up allocating a temporary array to use in a call to Read. This commit adds an override of ReadByte on SslStream that returns data from the stream's internal buffer if any is available, otherwise falling back to the old behavior. On a test that repeatedly writes 1000 bytes and then reads each of those with ReadByte, allocations are reduced by 10x and throughput is doubled. (Note that removing the Interlocked.Exchange in ReadByte yields another 20% improvement in throughput, but I've left it in so as not to impact guarantees of the type.) cc: @cipop, @davidsh, @vancem 5840 area-System.Data System.Data.ProviderBase.DbConnectionFactory.TryGetConnection() has a misleading comment for use of Sleep() "`System.Data.ProviderBase.DbConnectionFactory.TryGetConnection()` has these lines: ``` // Yield time slice to allow shut down activities to complete and a new, running pool to be instantiated // before retrying. Threading.Thread.Sleep(timeBetweenRetriesMilliseconds); timeBetweenRetriesMilliseconds *= 2; // double the wait time for next iteration ``` `timeBetweenRetriesMilliseconds` starts with a value of `1` and is doubled on each iteration. ""yield time slice"" is the idiom for passing zero into `Sleep()` to mean ""I don't want to wait for long, but if there's anyone else wanting CPU time then I'll let them have that time"". When any other value is passed that actual wait, not ""yielding time slice"". " 5841 area-System.Data System.Data.SqlClient.SqlConnection.TryOpen() registers an object without finalizer for finalization System.Data.SqlClient.SqlConnection.TryOpen() has this code ``` if (!tdsInnerConnection.ConnectionOptions.Pooling) { // For non-pooled connections, we need to make sure that the finalizer does actually run to avoid leaking SNI handles GC.ReRegisterForFinalize(this); } ``` but `SqlConnection` has no finalizer and neither does its base class. This code does nothing useful. If some magic must be run then this won't help. 5844 area-System.Reflection Implement CustomReflectionContext I was just browsing through the source here and I noticed that `System.Reflection.Context.CustomReflectionContext` is not implemented. One of the projects I work on (RobotDotNet) uses this in our library for some additional nice features. 5846 area-System.Net Fix HttpClientHandler UseDefaultCredentials=false HttpClientHandler (on Windows) was attempting to use default credentials against a server that needed auth even when the property .UseDefaultCredentials was set to false. In order to map the different HttpClientHandler properties to the WinHttpHandler properties, the HttpClientHandler .UseDefaultCredentials. needs to turn on/off two credentials related properties of WinHttpHandler, .ServerCredentials and .DefaultProxyCredentials. However, it was only toggling the single .ServerCredentials property. The fix is to update both properties accordingly. Fixes #5045. 5847 area-System.Net Leaking System.Net.WebSockets.WinHttpWebSocketState in WCF stress We see a fast memory leak on WCF stress using web sockets binding for duplex streaming. The leaked objects are all rooted by strong GC handles: ``` 0:011> !gcroot 000000e90c1162b8 HandleTable: 000000e58bc85250 (strong handle) -> 000000e90c116170 System.Net.WebSockets.WinHttpWebSocketState -> 000000e90c1162b8 System.Threading.Tasks.TaskCompletionSource`1[[System.Boolean, mscorlib]] ``` And their state indicates that they were disposed: ``` !do 000000e90c116170 Name: System.Net.WebSockets.WinHttpWebSocketState MethodTable: 00007fff0fd7cd58 EEClass: 00007fff0fd83ed8 Size: 120(0x78) bytes File: C:\Users\kkhurin\.dnx\packages\runtime.win7.System.Net.WebSockets.Client\4.0.0-rc2-23617\runtimes\win7\lib\dotnet5.4\System.Net.WebSockets.Client.dll Fields: MT Field Offset Type VT Attr Value Name 00007fff678f15e8 400002e 8 System.Object 0 instance 000000e90c1161e8 _lock 00007fff0fd7d468 400002f 10 ...SafeWinHttpHandle 0 instance 0000000000000000 _sessionHandle 00007fff0fd7d468 4000030 18 ...SafeWinHttpHandle 0 instance 0000000000000000 _connectionHandle 00007fff0fd7d580 4000031 20 ...andleWithCallback 0 instance 0000000000000000 _requestHandle 00007fff0fd7d580 4000032 28 ...andleWithCallback 0 instance 0000000000000000 _webSocketHandle 00007fff678f3628 4000033 68 ...Services.GCHandle 1 instance 000000e90c1161d8 _operationHandle 00007fff0fd77078 4000034 58 System.Int32 1 instance 5 _state 00007fff678f5d90 4000035 64 System.Boolean 1 instance 0 _pendingReadOperation 00007fff678f5d90 4000036 65 System.Boolean 1 instance 0 _pendingWriteOperation 00007fff678f5d90 4000037 66 System.Boolean 1 instance 1 _disposed 00007fff0fb9d278 4000038 30 ...olean, mscorlib]] 0 instance 0000000000000000 k__BackingField 00007fff0fb9d278 4000039 38 ...olean, mscorlib]] 0 instance 000000e88c115ed8 k__BackingField 00007fff0fb9d278 400003a 40 ...olean, mscorlib]] 0 instance 000000e90c1162b8 k__BackingField 00007fff0fb9d278 400003b 48 ...olean, mscorlib]] 0 instance 000000e80c138b70 k__BackingField 00007fff0fb9d278 400003c 50 ...olean, mscorlib]] 0 instance 000000e90c116320 k__BackingField 00007fff0fd7cc00 400003d 5c System.Int32 1 instance 4 k__BackingField 00007fff67919930 400003e 60 System.UInt32 1 instance 0 k__BackingField ``` A repro app is available upon request. 5848 area-System.Data DbEnumerator is included in both System.Data.Common and System.Data.SqlClient SqlClient shares some code with System.Data.Common by including source files in https://github.com/dotnet/corefx/blob/master/src/System.Data.SqlClient/src/System.Data.SqlClient.csproj#L49-L59. Of all code shared at least `DbEnumerator` is a public type, so when you depend on both libraries the type is duplicated. I don't think this has a huge impact but I was wondering if it is just an oversight. cc @saurabh500 5849 area-System.Net Sockets error messages are incorrect on non-Windows platforms. We need to map the SocketError values back to their native equivalents before using them to fetch descriptive error messages. 5852 area-System.Net Test fixes for System.Net.Security - Renaming/moving the `VirtualNetwork/Stream` classes. - A few concurrency fixes for the `VirtualNetwork/Stream` classes. - Adding VirtualNetwork/Stream tests. - Adding the TaskTimeoutExtensions and correcting the timeout pattern within one of the S.N.Security tests. - Moving all common test code within the System.Net.Test.Common namespace. @davidsh @stephentoub @shrutigarg PTAL 5853 area-System.Data Add default SQL path to NP path parsing if only server name is provided 5854 area-System.IO Native ClrCompression.dll for win7-x64 package depends on MSVCR110.dll @ianhays : Much like issue #3760 for SqlClient, the 64-bit specific version of clrcompression.dll takes a dependency on MSVCR110.dll. The issue appears to be specific to the x64 version currently. 5858 area-System.Net System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Security ...' ocurring in Windows using rc1-final and OSX using rc1-update1 ### TLDR; I'm getting a runtime error only when building in **OSX** with `dnx-coreclr-x64-1.0.0-rc1-update1` or building in **Windows** with `dnx-coreclr-win-x64.1.0.0-rc1-final` but if I build in **Windows** with `dnx-coreclr-win-x64.1.0.0-rc1-update1` the error doesn't happen. Isn't it supposed that if you use the same version number for both platforms is because both of them are the same and have the same features and fixes? If so, is it possible there was a build mistake and the **OSX** version released is not really `rc1-update1` **(CoreClr-x64-1.0.0-rc1-16231)** but `rc1-final` **(CoreClr-x64-1.0.0-rc1-16202)**. Here's is the error trace: ``` An unhandled exception has occurred: Could not load file or assembly 'System.Net.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'System.Net.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ---> System.IO.FileNotFoundException: Could not load the specified file. File name: 'System.Net.Security' at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) at MailKit.Net.Smtp.SmtpClient.Connect(String host, Int32 port, SecureSocketOptions options, CancellationToken cancellationToken) at MailKit.MailService.Connect(String host, Int32 port, Boolean useSsl, CancellationToken cancellationToken) at GReembolsos.Controllers.GastosController.EnviarEmail() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.AspNet.Mvc.Controllers.ControllerActionExecutor.ExecuteAsync(MethodInfo actionMethodInfo, Object instance, Object[] orderedActionArguments) at Microsoft.AspNet.Mvc.Controllers.ControllerActionInvoker.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.d__53.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.d__44.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Mvc.Infrastructure.MvcRouteHandler.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at Microsoft.AspNet.Mvc.Routing.InnerAttributeRoute.d__10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at Microsoft.AspNet.Routing.RouteCollection.d__9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Builder.RouterMiddleware.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.IISPlatformHandler.IISPlatformHandlerMiddleware.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Diagnostics.ExceptionHandlerMiddleware.d__6.MoveNext() ``` ### Update I've just found issue #2483 and certainly appears to be the reason of my error but I'm not an expert on the subject and if it is the case then my questions / doubts are still valid I think. Thank you in advance for any help. ### Long Story I'm working on a prototype using **Mac OSX** and **Visual Studio Code** with `dnxcore50` using `coreclr-rc1-update1` but I'm getting the runtime error when trying to send email using **MailKit** lib. @jstedfast, the lib developer said the lib was working perfectly fine when things ran on windows so the problem could be in **the CLR version** for non Windows environments. I setup a **Windows 10** VM to verify if the problem was indeed not present. The test was successful. No runtime error was thrown. I tried to deploy as an **Azure Web Site**, and after a few hours of troubleshooting trying to make **coreclr** and not **clr** the runtime target I finally got the app built. But the test failed with the same error I was getting in **Mac OSX** even though it was a Windows Environment! I made more research and found this: - In my local **Windows 10** when I built the project the **DNU** starting message was `Microsoft .NET Development Utility CoreClr-x64-1.0.0-rc1-16231` - In the **Azure** building log stream the **DNU** starting message was `Microsoft .NET Development Utility CoreClr-x64-1.0.0-rc1-16202` Looking at the `deploy.cmd` that I had previously modified to target **coreclr** and not **clr** I noticed that the targeted runtime was `dnx-coreclr-win-x64.1.0.0-rc1-final` In my **Windows 10** local the target runtime was `dnx-coreclr-win-x64.1.0.0-rc1-update1` So I changed the target runtime in `deploy.cmd` to `dnx-coreclr-win-x64.1.0.0-rc1-update1`, pushed to **Azure** and now in the building log stream the **DNU** starting message was `Microsoft .NET Development Utility CoreClr-x64-1.0.0-rc1-16231`, the same as my **Windows 10** local. I ran my test again and the error was gone!! After that I concluded that whatever the root cause of the exception I was getting, the problem appears to be fixed in `rc1-update1`, BUT... it turns out that in **OSX** the error is triggering even though the **DNU** starting message is `Microsoft .NET Development Utility CoreClr-x64-1.0.0-rc1-16231` when I build the project. So it makes me think it could be that the **OSX** version is not really `rc1-update1` **(CoreClr-x64-1.0.0-rc1-16231)** but `rc1-final` **(CoreClr-x64-1.0.0-rc1-16202)**. It's just a though as I don't know if it's possible or correct/normal that the same version on both platforms can have different features / fixes. That's why I'm submitting this issue. 5861 area-System.Data DbConnection and DbCommand should have a finaliser Originally `DbConnection` and `DbCommand` classes were derived from `System.ComponentModel.Component`. From that they inherited a finaliser that called `Dispose(false)`. Their descendants sometimes depend on this, in particular `SqlConnection` has finaliser-only code. They should have finalisers directly added. ~~`DbTransaction` and `DbDataReader` were never derived from `Component` but do both follow the `Dispose(bool)` pattern, as such suggesting that a finaliser exists which would call `Dispose(false)`. While not used within the corefx assemblies a third party derived class could erroneously depend on this.~~ ~~As such they should have finalisers added, and then suppressed in the existing derived classes.~~ (Moved this part to #5865) 5864 area-Infrastructure CI jobs failing with WS-CLEANUP errors Lots of legs failing with errors like this, e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_release_bld_prtest/495/console ``` ERROR: [WS-CLEANUP] Cannot delete workspace: remote file operation failed: d:\j\workspace\dotnet_corefx\osx_release_bld_prtest at hudson.remoting.Channel@270f3ae7:dci-win-tbld-6: java.nio.file.AccessDeniedException: d:\j\workspace\dotnet_corefx\osx_release_bld_prtest\Tools\dotnetcli\bin\coreclr.dll ``` 5868 area-System.Diagnostics Debugger.NotifyOfCrossThreadDependency missing from System.Diagnostics.Debug contract NotifyOfCrossThreadDependency is used in code any time a debugger accessing that property would potentially cause deadlocks, race conditions, or other behavior changes, e.g. if the debugger has frozen all threads in the process (which it does at a breakpoint), and a property getting evaluated blocks waiting for another thread to perform some operation. We should expose this in the contract. If the runtime is built for a platform that doesn't support it, it can simply be a nop. 5871 area-System.Net Throw PNSE from Socket.Connect on *nix iff a previous connect attempt has failed See https://github.com/dotnet/corefx/pull/5867 and https://github.com/dotnet/corefx/issues/5829 for details on the problems with multiple connection attempts using the same socket on platforms that follow BSD/POSIX semantics for sockets. 5873 area-System.Reflection DynamicILGenerator does not support BeginFaultBlock and BeginExceptFilterBlock #1764 dotnet/coreclr#1764 has more information on the issue. Based on the conversation with Jan, this is only an artificial limitation and can be removed from both Desktop and CoreCLR. 5874 area-System.Security Crypto contracts desktop support I believe the current version of the crypto contracts require desktop 4.6.1 but are representing themselves in the packages as requiring 4.6. We need to clean this up, but before we do we need to a) look upstack in CoreFx and b) reach out to partner teams to find out if anyone is expecting support on 4.6. If so, then we probably need to look into a pre-version of the contracts to support 4.6. 5875 area-System.Console Console support for NETCore Since Console was added to NETStandard.Library we need to suppoort it on netcore50. To do this and still pass the WACK we should either: 1. Get the APIs we call added to the modern SDK. 2. Build a version of the contract specific to netcore that only calls supported APIs. For example, by just using readfile/writefile on the console handles or directing the output to something more appropriate for UWP (EG: debug or etw). /cc @pallavit @weshaggard 5877 area-Meta [WIP] Frameworks Section "We talk about lots of frameworks, and I'm sure more come up, so I though it be a good idea to add a section on them. I've done a ""demo"" of what I was thinking with Windows Forms. I was thinking of including: WPF, ASP.NET, ASP.NET Core, ASP.NET MVC, Signalr, DirectX (and maybe some of the sub libraries), and WCF. @terrajobst " 5878 area-Infrastructure Modify the windows native build to be razzle friendly Internally we are using an existing vcproj to build the native windows binaries. This commit modifies the CMake build script in the open to allow more fine grained control of the build environment. The result of this is that we can specify the necessary environment args from the caller, enabling us to run the build-native script from fxcore/src in a Razzle environment via a wrapper project. resolves #5854 when accompanying TFS commit goes through @weshaggard @ericstj 5881 area-System.Net Http request/response DiagnosticSource logging. - Added logging to WinHttpHandler, CurlHandler, and HttpHandlerToFilter for HTTP request/response. - Added functional tests for HttpClient and WinHttpHandler. @davidsh @cipop @stephentoub 5884 area-System.Reflection Portable mechanism needed to determine if two MemberInfos are backed by the same metadata definition "Currently, there is a hole in reflection whereby there's no straight-forward way to determine if: ### 1. MemberInfos differ only by ReflectedType (i.e. they are the same member, but one of them was obtained from a derived type.) ``` C# public class C { public int F; } public class D : C {} static class Program { static void Main(string[] args) { var f1 = typeof(C).GetField(""F""); var f2 = typeof(D).GetField(""F""); System.Console.WriteLine(f1.Equals(f2)); // False } } ``` ### 2. One MemberInfo is a generic instantiation of another. ``` C# static class Program { static void Main(string[] args) { var m1 = typeof(List<>).GetMethod(""Add""); var m2 = typeof(List).GetMethod(""Add""); // how to determine that m2 is instantiated from m1? } } ``` On platforms that support the MetadataToken, this can be worked around by comparing the tokens, but without them, one has to resort to error-prone comparisons of the declaring type, name, and signature. There should be a first-class portable way to address both. ### Proposal for New API: HasSameMetadataDefinitionAs Add a new API that determines if a member is backed/instantiated from the same metadata definition. In ECMA-335 terms, this is a member/type from the same module that has the same metadata def token. Platforms like .NET Native that do not keep around metadata tokens should still preserve enough information to answer this query portably. ``` C# public class MemberInfo { public virtual bool HasSameMetadataDefinitionAs(MemberInfo other); ... } ``` A mostly correct implementation is: ``` C# return Module.Equals(other.Module) && MetadataToken == other.MetadataToken; ``` But that ignores edge cases such as TypeInfo instances for array, byref, pointer, and type parameters types, which we'd need to spec and test. " 5886 area-System.Net Process and Ping should have finaliser In the wake of #5861 I decided to examine other classes in CoreFX that were originally derived from `Component` to see if there was a risk that classes derived from them in turn could depend upon their having a finaliser. The following need no action, but I list them in case someone can spot one I missed or a flaw in my reasoning that they are okay as-is: `ProcessThread`. No longer disposable, functionally sealed (can't be derived as there are no public or protected constructors). `ProcessModule`. No longer disposable, functionally sealed. `FileSystemWatcher`. Already has a finaliser. `PerformanceCounter`. ref only. This leaves `Process` and `Ping` as two classes that can be derived from, would originally have had a finalizer calling `Dispose(false)` via `Component`, and which do not currently have this. For compatibility with 4.6 and earlier they should have a finalizer. Further, `ProcessModule` no longer needs one, but still calls `SuppressFinalize` which should be removed as unnecessary. 5887 area-System.Net Add finalizers to Process and Ping Have them call `Dispose(false)`. `SuppressFinalize(this)` in constructors if they are not a derived type to lessen the possible negative impact on collection. Remove unnecessary `SuppressFinalize(this)` from `ProcessModule`. Fixes #5886 5888 area-System.Net WebUtility.UrlDecode to take StringBuilder `WebUtility.UrlDecode` could take a string builder; `UrlDecoder` could be a struct and use `System.Buffers` for its arrays for reduced allocations. 5889 area-System.Net Identify exceptions that should cause NTLM fallback in xplat NegotiateStream This is with reference to this [PR comment](https://github.com/dotnet/corefx/pull/5770#commitcomment-15854837). Currently, for any exceptions in the SPNEGO codepath, the xplat implementation falls back to NTLM. We need to check if there are specific exceptions we should target. 5890 area-System.Net Return more error information for SslStream and NegotiateStream from *Pal.Unix.cs Please see [PR comment](https://github.com/dotnet/corefx/pull/5773#commitcomment-15855088). We need to figure a way of passing the extended error information returned by the shim layer to the platform-agnostic code. Currently any exception is translated to SecurityStatusPal.InternalError 5892 area-System.Net Add a large write/read test for SslStream cc: @davidsh, @CIPop 5894 area-System.Net BeginSendToV4IPEndPointToDualHost_Success failed on Windows in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_debug_prtest/1768/consoleFull ``` 05:13:45 System.Net.Sockets.Tests.DualMode.BeginSendToV4IPEndPointToDualHost_Success [FAIL] 05:13:45 System.Net.Sockets.SocketException : An address incompatible with the requested protocol was used 05:13:45 Stack Trace: 05:13:45 xUnit.net console test runner (64-bit .NET Core) 05:13:45 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs(3077,0): at System.Net.Sockets.Socket.DoBeginSendTo(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint endPointSnapshot, SocketAddress socketAddress, OverlappedAsyncResult asyncResult) 05:13:45 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs(3015,0): at System.Net.Sockets.Socket.BeginSendTo(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint remoteEP, AsyncCallback callback, Object state) 05:13:45 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Sockets\src\System\Net\Sockets\SocketTaskExtensions.cs(235,0): at System.Net.Sockets.SocketTaskExtensions.<>c.b__12_0(ArraySegment`1 targetBuffer, SocketFlags flags, EndPoint endPoint, AsyncCallback callback, Object state) 05:13:45 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl[TArg1,TArg2,TArg3](Func`6 beginMethod, Func`2 endFunction, Action`1 endAction, TArg1 arg1, TArg2 arg2, TArg3 arg3, Object state, TaskCreationOptions creationOptions) 05:13:45 at System.Threading.Tasks.TaskFactory`1.FromAsync[TArg1,TArg2,TArg3](Func`6 beginMethod, Func`2 endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, Object state) 05:13:45 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Sockets\src\System\Net\Sockets\SocketTaskExtensions.cs(234,0): at System.Net.Sockets.SocketTaskExtensions.SendToAsync(Socket socket, ArraySegment`1 buffer, SocketFlags socketFlags, EndPoint remoteEndPoint) 05:13:45 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\Common\src\System\Net\Sockets\SocketAPMExtensions.cs(565,0): at System.Net.Sockets.SocketAPMExtensions.BeginSendTo(Socket socket, Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint remoteEP, AsyncCallback callback, Object state) 05:13:45 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Sockets.Legacy\tests\FunctionalTests\DualModeSocketTest.cs(1393,0): at System.Net.Sockets.Tests.DualMode.DualModeBeginSendTo_EndPointToHost_Helper(IPAddress connectTo, IPAddress listenOn, Boolean dualModeServer, Boolean expectedToTimeout) 05:13:45 d:\j\workspace\dotnet_corefx\windows_nt_debug_prtest\src\System.Net.Sockets.Legacy\tests\FunctionalTests\DualModeSocketTest.cs(1378,0): at System.Net.Sockets.Tests.DualMode.BeginSendToV4IPEndPointToDualHost_Success() ``` 5896 area-System.Net Writing to SslStream fails on OS X when count is larger than SslStream's internal buffer size See SslStream_StreamToStream_Successive_ClientWrite_Sync_Success. This consistently passes on Windows and other Unix environments, but consistently fails on OS X. 5898 area-System.Linq Expression interpreter can neither catch nor throw non–Exception-derived exceptions Using the interpreter it is impossible to either throw or catch an exception that isn't derived from `Exception`. This differs from the compiler, which allows both. Possibly this should just be documented as a limitation. Possibly something could be done by manipulating `RuntimeWrappedException`. Possibly something could be done for catching, but not for throwing, which both seems easier on first blush, and may have more use (throwing such an object is a bad idea after all, catching one might be needed due to someone else's bad idea). cc: @VSadov @bartdesmet 5899 area-Meta Documentation Duplication Between .NET Projects As I'm working on #5877, I started thinking that between CoreCLR and CoreFX there's going to be lots of things that need to be explain in both contexts. The Terms section alone in [glossary](../Documentation/project-docs/glossary.md) would probably be useful for both projects. Would it make sense to move this kind of stuff to the [core-docs](https://github.com/dotnet/core-docs) repo? /CC: @terrajobst @jasonwilliams200OK 5902 area-System.Console echo TTY mode disabled for launched processes Similar to #5109, if `Console.ReadKey()` has been used by a .NET program, the `echo` TTY mode is disabled. To resolve the prior issues, dotnet/coreclr#2561 re-enabled the `echo` mode on program shutdown. However, we've run into a different scenario: launching a process from the .NET program inherits the TTY modes. So if you launch Bash from the .NET program, you can't type in it until you've explicitly re-enabled `echo`. 5907 area-System.Net Keep accepted sockets open until the tests are done with them. Prior to this change, a GC triggered at the wrong time could cause a newly-accepted Socket to be collected and finalized, closing the connection before the other end of the socket was done. To avoid this, we keep a reference to the new socket until the test is done with the connection. Fixes #5291, #3748, #3744, #3682, #3494. @stephentoub, @pgavlin, @CIPop 5908 area-System.Linq Interpretter incorrectly handles void TryExpression with non-void parts "It is not necessary for the body and/or catch blocks of a `TryExpression` to match the type of the expression if that type is void (or to look at it another way, all types can be ""assigned"" to void). As such the following is valid: ``` C# Expression.MakeTry( typeof(void), Expression.Throw(Expression.Constant(new InvalidOperationException()), typeof(int)), null, null, new[] { Expression.Catch(typeof(InvalidCastException), Expression.Constant(""hello"")), Expression.Catch(typeof(Exception), Expression.Constant(2.2)) } ) ``` This works fine with the compiler. With the interpreter it unbalances the stack, leaking a value and throwing several asserts in Debug. " 5910 area-Infrastructure TFS build should update BuildValues.props Now that we have packages in CoreFx it'd be great if those packages had consistent versions with the ones built in TFS. Can we have the TFS build update https://github.com/dotnet/corefx/blob/master/src/BuildValues.props? 5912 area-Serialization [Port Fix from Desktop] Stress issue in Serialization ObjectToIdCache There was a stress issue with System.Runtime.Serialization.ObjectToIdCache. The bug had been fixed on desktop. We should port the fix to .Net Core. 5915 area-System.Data API for retrieving Columns Metadata from DbDataReader # API for GetColumnSchema ## Problem DbDataReader on .Net Framework, provides an API called `DataTable GetSchemaTable()` which was returns the metadata of the columns being read using the DbDataReader object. Because of the removal of DataTable in .Net Core this API had to be removed. `DbDataReader.GetSchemaTable()` needs a replacement in .Net core. ## Progress The data structure DbColumn along with the necessary attributes which should be present for the various ADO.Net providers to effectively provide the metadata for the columns is provided in the issue. ``` C# namespace System.Data.Common { // DbColumn contains the base attributes that are common to most Database columns. An indexer // has been provided in case a property added by a provider needs to be accessed without a dependency on the provider implementation. public class DbColumn { public bool? AllowDBNull { get; protected set; } public string BaseCatalogName { get; protected set; } public string BaseColumnName { get; protected set; } public string BaseSchemaName { get; protected set; } public string BaseServerName { get; protected set; } public string BaseTableName { get; protected set; } public string ColumnName { get; protected set; } public int? ColumnOrdinal { get; protected set; } public int? ColumnSize { get; protected set; } public bool? IsAliased { get; protected set; } public bool? IsAutoIncrement { get; protected set; } public bool? IsExpression { get; protected set; } public bool? IsHidden { get; protected set; } public bool? IsIdentity { get; protected set; } public bool? IsKey { get; protected set; } public bool? IsLong { get; protected set; } public bool? IsReadOnly { get; protected set; } public bool? IsUnique { get; protected set; } public int? NumericPrecision { get; protected set; } public int? NumericScale { get; protected set; } public string UdtAssemblyQualifiedName { get; protected set; } public Type DataType { get; protected set; } public string DataTypeName { get; protected set; } public virtual object this[string property] { get; } } } ``` The next part of the API is to expose a ReadOnlyCollection from the DbDataReader The right way of exposing the API would be to add an API in the DbDataReader class called `ReadOnlyCollection DbDataReader.GetColumnSchema()` This is however not possible in .Net Core current version as it would hinder portability of apps created on .Net core with .Net framework. https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/breaking-change-rules.md Based on the contents of the link above, the following rule is allowed `Adding an abstract member to a public type when there are no accessible (public or protected) constructors, or the type is sealed` The restriction is due to type forwarding, which needs the calls to DbDataReader to be forwarded to the .Net framework's DbDataReader. ## Proposal We introduce an interface called IDbColumnSchemaGenerator, in .Net core which can be implemented by a type which can provide the Column Metadata. For DbDataReader, this interface needs to be implemented by the subclasses of the `DbDataReader` to provide the Column metadata provided by the `DbDataReader` ``` C# namespace System.Data.Common { public interface IDbColumnSchemaGenerator { System.Collections.ObjectModel.ReadOnlyCollection GetColumnSchema(); } } ``` The subclasses of DbDataReader in the ADO.Net providers implement this interface. ``` C# public class SqlDataReader : DbDataReader, IDbColumnSchemaGenerator { public ReadOnlyCollection GetColumnSchema(){ return ... ; } } ``` In .Net core, to allow the Column Metadata to be exposed from the DbDataReader, an extension to the DbDataReader will be provided. This extension has the same signature as the interface method. ``` C# using System.Collections.ObjectModel; namespace System.Data.Common { public static class DbDataReaderExtension { public static System.Collections.ObjectModel.ReadOnlyCollection GetColumnSchema(this DbDataReader reader) { if(reader is IDbColumnSchemaGenerator) { return ((IDbColumnSchemaGenerator)reader).GetColumnSchema(); } throw new NotImplementedException()); } } } ``` It is recommended that the extension be used by consumers, for compatibility with .Net Framework. The details are mentioned in the compatibility section below. ## Producer The ADO.Net providers are the producers of the Column Schema. The interface will be implemented by the sub-classes of `DbDataReader` in the ADO.Net providers. E.g. ``` C# class SqlDataReader : DbDataReader, IDbColumnSchemaGenerator { ... public ReadOnlyCollection GetDbColumnSchema() { ReadOnlyCollection metadata = ... ; // Build the list of columns metadata. Each columns metadata is represented by the DbColumn return metadata; // } ... } ``` ## Consumer The consumers can retrieve the column metadata using an extension method on the DbDataReader. This extension will be provided in System.Data.Common For a library consuming the `DbDataReader` the code will look like the following: ``` C# using System.Data.Common; namespace org.example.my { ... public void ProcessMetadata(DbDataReader reader) { ICollection columnMetadata = reader.GetColumnSchema(); } ... } ``` ## Compatibility of libraries written on .Net Core with .Net Framework The extension method will have a different implementation in the **_partial facade_** to get the Schema. The implementation will use the DbDataReader.GetSchemaTable() api which returns the schema as a Datatable. This Datatable will be mapped to a ReadOnlyCollection and returned by the implementation of the extension in the partial facade. # vNext In the next version of .Net we add a Interface to .Net desktop and the the consumers continue to access the schema using the Interface ## Reference Github issue https://github.com/dotnet/corefx/issues/3423 5919 area-System.Net Native shims for libheimntlm inorder to support NTLM Introducing native shims for libheimntlm inorder to support NTLM This PR overwrites #5728 5920 area-System.Threading Configure ThreadPool Hello, There is some way to configure the threadPool and the ConnectionLimit in DNX Core 50? We use this configure in dnx 451: ThreadPool.SetMinThreads(50, 50); ThreadPool.SetMaxThreads(10000, 10000); System.Net.ServicePointManager.DefaultConnectionLimit = int.MaxValue; How can I put this parameters in core? Thank you 5921 area-System.Drawing Proposal for minimalistic imaging platform ## Proposal for minimalistic imaging platform .NET does not provide a truly portable image format nor portable image IO operations. For example System.Drawing.Bitmap nor WPF's BitmapSource and does not provide generic interface which imposes compile-time constraints. EmguCV's generic image provides the generic interface but is heavily coupled with OpenCV. All mentioned image types do not provide a unified interoperability needed when mixing image-processing algorithms from different libraries. ### Goals: - [ ] to create a portable module for image reading/writing - [x] to create a portable, slim image format such as [DotImaging](https://github.com/dajuric/dot-imaging) has (native array Bgr<byte>[,]) - [x] to create system drawing primitives - such as in [DotImaging.Primitives2D](https://www.nuget.org/packages/DotImaging.Primitives2D/) - [ ] _optionally to create portable video reading and web-camera access module_ ### Proposal To leverage existing structure and components of [DotImaging](https://github.com/dajuric/dot-imaging) framework, but to replace the backing OpenCV part needed for image IO. The first step would be to create a portable image reading/writing module with the most simplistic API (e.g. ImageIO.LoadColor(), LoadGray()...). Options: - a wrapper arround LibGD (@ #2020) - trim down and reuse the existing platform specific module of: [Eto.Forms](https://github.com/picoe/Eto) - includes drawing capabilities as well, or [Splat](https://github.com/paulcbetts/splat). ### Related issues [Proposal for Cross-plat Server-side Image Manipulation Library](https://github.com/dotnet/corefx/issues/2020) - proposal of much broader scale - this proposal resolves the core issue and levaes out separates image processing part managed by other libraries [Accord.NET](http://accord-framework.net/), [Accord.NET Extensions](https://github.com/dajuric/accord-net-extensions), [EmguCV](http://www.emgu.com/wiki/index.php/Main_Page). [.NET core should have primitive drawing types](https://github.com/dotnet/corefx/issues/1563) - already done in [DotImaging.Primitives2D](https://www.nuget.org/packages/DotImaging.Primitives2D/) 5924 area-System.Net Use OpenSSL for cert chain verification in CurlHandler Our certificate chain verification includes the ability to check user store certificates in addition to the root store, but it's more expensive than the default verification provided by OpenSSL, which only includes the system store. This commit modifies our CurlHandler's VerifyCertChain implementation to first use the OpenSSL implementation, and only fall back to ours if it fails, resulting in much faster processing in https cases. (It'll be easiest to look at the whitespace-free diff view: https://github.com/dotnet/corefx/pull/5924/files?w=1 ) cc: @bartonjs 5925 area-Meta Add suggestions/samples for dealing with common missing desktop APIs Customers coming from a .NET desktop background are frequently running into issues with a few common feature areas that are missing/changed in .NET Core (in ways too general to be thoroughly covered by API catalog recommendations). It would be great to have a page (maybe linked from [here](https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/support-dotnet-core-instructions.md) that listed the commonly missed areas and how to deal with them in .NET Core. Some areas that should be covered include: - Serialization (moving to DCS from binary serialization) - Xml (some high level changes to which APIs are available, like XmlTextReader vs. XmlReader - Managed security.(CAS is gone; Transparency still exists, but usually isn't needed) 5927 area-System.Net Leaking System.Net.Http.WinHttpRequestState in WCF Streaming over Http This is really fast - ~1GB per 1minute. To repro: ``` dnx --configuration RETAIL run . Program2Run:Perf Binding:Http Async:true Test:Streaming ``` Here are some details: ``` 0:012> !gcroot 000000859f603ab8 HandleTable: 00000086a7c81668 (strong handle) -> 000000859e5f5780 System.Net.Http.WinHttpRequestState -> 000000859e5f5718 System.Threading.Tasks.TaskCompletionSource`1[[System.Net.Http.HttpResponseMessage, System.Net.Http]] -> 000000859e5f5730 System.Threading.Tasks.Task`1[[System.Net.Http.HttpResponseMessage, System.Net.Http]] -> 000000841e3aa2a8 System.Net.Http.HttpResponseMessage -> 000000859e5f4ab0 System.Net.Http.HttpRequestMessage -> 000000859e5f4af8 System.Net.Http.Headers.HttpRequestHeaders -> 000000859e5f4c30 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.Net.Http.Headers.HttpHeaders+HeaderStoreItemInfo, System.Net.Http]] -> 000000859e5f4ca8 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[System.Net.Http.Headers.HttpHeaders+HeaderStoreItemInfo, System.Net.Http]][] -> 000000859f603ab8 System.Net.Http.Headers.HttpHeaders+HeaderStoreItemInfo Found 1 unique roots (run '!GCRoot -all' to see all roots). 0:012> !do 000000859e5f5780 Name: System.Net.Http.WinHttpRequestState MethodTable: 00007fff0f29a520 EEClass: 00007fff0f28fc98 Size: 184(0xb8) bytes File: C:\Users\kkhurin\.dnx\packages\System.Net.Http.WinHttpHandler\4.0.0-rc3-23720\lib\DNXCore50\System.Net.Http.WinHttpHandler.dll Fields: MT Field Offset Type VT Attr Value Name 00007fff696e15e8 4000044 8 System.Object 0 instance 000000859e5f5838 _lock 00007fff696e3628 4000045 a0 ...Services.GCHandle 1 instance 000000859e5f5820 _operationHandle 00007fff696e5d90 4000046 98 System.Boolean 1 instance 0 _disposed 00007fff6fbf5c58 4000047 10 ...System.Net.Http]] 0 instance 000000859e5f5718 k__BackingField 00007fff696ef250 4000048 a8 ...CancellationToken 1 instance 000000859e5f5828 k__BackingField 00007fff6fbf7f90 4000049 18 ...ttpRequestMessage 0 instance 000000859e5f4ab0 k__BackingField 00007fff0f292580 400004a 20 ...tp.WinHttpHandler 0 instance 000000839dd16e30 k__BackingField 00007fff0f29b288 400004b 28 ...SafeWinHttpHandle 0 instance 000000831e798458 k__BackingField 00007fff696e1330 400004c 30 System.Exception 0 instance 0000000000000000 k__BackingField 00007fff696e5d90 400004d 99 System.Boolean 1 instance 0 k__BackingField 00007fff6fbf3738 400004e 38 ...olean, mscorlib]] 0 instance 0000000000000000 k__BackingField 00007fff0f29a900 400004f 40 ...pTransportContext 0 instance 000000859e5f5850 k__BackingField 00007fff0f292428 4000050 90 System.Int32 1 instance 2 k__BackingField 00007fff69f7fd18 4000051 48 System.Net.IWebProxy 0 instance 0000000000000000 k__BackingField 00007fff69f7fc78 4000052 50 ....Net.ICredentials 0 instance 0000000000000000 k__BackingField 00007fff69f7fc78 4000053 58 ....Net.ICredentials 0 instance 000000839dcaed18 k__BackingField 00007fff696e5d90 4000054 9a System.Boolean 1 instance 1 k__BackingField 00007fff69f7fc18 4000055 94 System.Int32 1 instance 0 k__BackingField 00007fff696e5d90 4000056 9b System.Boolean 1 instance 0 k__BackingField 00007fff0f11cde8 4000057 60 ...olean, mscorlib]] 0 instance 000000831e79a068 k__BackingField 00007fff0f11cde8 4000058 68 ...olean, mscorlib]] 0 instance 0000000000000000 k__BackingField 00007fff0f11cde8 4000059 70 ...olean, mscorlib]] 0 instance 000000831e79a430 k__BackingField 00007fff0f11cde8 400005a 78 ...olean, mscorlib]] 0 instance 000000831e79a498 k__BackingField 00007fff0eda9d10 400005b 80 ...Int32, mscorlib]] 0 instance 000000859e5f8428 k__BackingField 00007fff0eda9d10 400005c 88 ...Int32, mscorlib]] 0 instance 000000859e5f83c0 k__BackingField 0:012> !do 000000841e3aa2a8 ; !do 000000859e5f4ab0 Name: System.Net.Http.HttpResponseMessage MethodTable: 00007fff6fbf8120 EEClass: 00007fff6fb5b240 Size: 64(0x40) bytes File: C:\Users\kkhurin\.dnx\runtimes\dnx-coreclr-win-x64.1.0.0-rc1-update1\bin\System.Net.Http.dll Fields: MT Field Offset Type VT Attr Value Name 00007fff69f7fc18 40000b6 30 System.Int32 1 instance 200 _statusCode 00007fff6fbf6f20 40000b7 8 ...tpResponseHeaders 0 instance 000000841e3aa3e8 _headers 00007fff696dfc28 40000b8 10 System.String 0 instance 000000841e3aa2e8 _reasonPhrase 00007fff6fbf7f90 40000b9 18 ...ttpRequestMessage 0 instance 000000859e5f4ab0 _requestMessage 00007fff696ec228 40000ba 20 System.Version 0 instance 000000831daf5a88 _version 00007fff6fbf6a60 40000bb 28 ....Http.HttpContent 0 instance 000000841e3aa340 _content 00007fff696e5d90 40000bc 34 System.Boolean 1 instance 0 _disposed Name: System.Net.Http.HttpRequestMessage MethodTable: 00007fff6fbf7f90 EEClass: 00007fff6fb5b138 Size: 72(0x48) bytes File: C:\Users\kkhurin\.dnx\runtimes\dnx-coreclr-win-x64.1.0.0-rc1-update1\bin\System.Net.Http.dll Fields: MT Field Offset Type VT Attr Value Name 00007fff696f7db8 40000ad 38 System.Int32 1 instance 1 _sendStatus 00007fff6fbf8cf8 40000ae 8 ...t.Http.HttpMethod 0 instance 000000839dcaf910 _method 00007fff7cf55c38 40000af 10 System.Uri 0 instance 000000839dd11a08 _requestUri 00007fff6fbf6e98 40000b0 18 ...ttpRequestHeaders 0 instance 000000859e5f4af8 _headers 00007fff696ec228 40000b1 20 System.Version 0 instance 000000839dcafa40 _version 00007fff6fbf6a60 40000b2 28 ....Http.HttpContent 0 instance 000000859e5f51f0 _content 00007fff696e5d90 40000b3 3c System.Boolean 1 instance 1 _disposed 00007fff68db3b78 40000b4 30 ...bject, mscorlib]] 0 instance 0000000000000000 _properties ``` 5928 area-System.Net Fix gchandle leak in WebSockets.Client The Windows implementation of WebSockets.Client leaks the WinHttpWebSocketState object. This object was being pinned by `GCHandle.Alloc(this)` in the contructor. And it was never freed. This object needs to be pinned during the WebSocket lifecycle because the address of the object is passed to native WinHTTP and used as the context value during callbacks. However, it needs to be manually freed at the proper time after all WinHTTP callbacks are done via closing down the handles. This fix adds Pin() and Unpin() methods to WinHttpWebSocketState and calls them at appropriate times. While fixing this I discovered other places where the object might be left as pinned. The current logic relies on WinHTTP calling the callback with HANDLE_CLOSING before the object would get unpinned. But since the object is pinned very early on, it's possible due to unexpected errors, that the wiring of the WinHTTP callback never gets done. And thus, the object would never have been unpinned. This fix delays the pinning of the object until the right time where it is assured that the WinHTTP callback wiring has been completed. This logic is now similar to the state handling in WinHttpHandler. There is still a work item #2501 to merge these design implementations and share code in the future. Fixes #3256. 5930 area-Infrastructure Generalize story for building multiple package versions See discussion on PR #5916. Right now, there's some custom path adjustment in metadata, but there should be a general way to cross-compile multiple versions as needed for all projects. 5939 area-System.Net Can't locate TcpClient and TcpListener from Socket.Net.Sockets Hi .NET Core, I like the direction of this project. It's fun to watch and see everything evolve.. Trying to upgrade an existing 4.5.1 project to .NET core on windows 10 and VS2015. It uses lots of TcpClient and TcpListener. From searching github repo, it appears like it's in the System.Web.Sockets package. However, these classes aren't visible to me on public nuget. Including the package: ![image](https://cloud.githubusercontent.com/assets/120773/12864092/a24c8eee-ccd5-11e5-8cbd-e453380e8a56.png) Checking object browser: ![image](https://cloud.githubusercontent.com/assets/120773/12864096/c54c5cc6-ccd5-11e5-9a29-c5a3a699cf08.png) What am I doing wrong? Where can I find TcpClient and TcpListener? Many thanks 5940 area-System.Runtime MulticastDelegate, BeginInvoke throws NotSupportedException Invoking the BeginInvoke method of a MulticastDelegate derived delegate compiles fine with .NET Core, but throws a NotSupportedException. Should this really be the case? Sample code is here, .NET 4.6 runs ok, but .NET Core fails with the mentioned exception: https://github.com/ProfessionalCSharp/ProfessionalCSharp6/tree/master/Synchronization/SynchronizationSamples/AsyncDelegate Thanks, Christian 5941 area-System.IO Using System.IO.Compression cannot resolve System.Buffers with .NET 4.6 "Using System.IO.Compression, 4.1.0-rc3-23805 cannot resolve System.Buffers compiling with .NET 4.6. It's ok with .NET Core. Compiling with ""dotnet build"". Sample code: https://github.com/ProfessionalCSharp/ProfessionalCSharp6/tree/master/FilesAndStreams/FilesAndStreamsSamples/CompressFileSample " 5942 area-Infrastructure System.Net.Http.Native.so in package linked to libcurl-gnutls.so.4 It should instead be linked to libcurl.so.4 (as is the one that gets built in Jenkins). cc: @bartonjs, @chcosta 5945 area-System.Linq ListInitExpression with non-void Add method fails with interpreter An expression of the form `() => new HashSet{ 1, 2, 3}` works fine with the compiler, but fails with the interpreter with a `TargetException` (or an assertion failure in debug), or possibly some other bad things with variants of this. The interpreter is assuming that `Add()` methods return void, so doesn't deal with the value pushed to the stack by a method like `HashSet.Add()` that returns `bool` cc @VSadov @bartdesmet . 5946 area-System.Linq ListInitExpression from Expression list fails with multiple expression types. "Consider: ``` C# private class MixedAddable : IEnumerable { private readonly List _strings = new List(); private readonly List _ints = new List(); public void Add(string value) { _strings.Add(value); } public void Add(int value) { _ints.Add(value); } public IEnumerator GetEnumerator() { return _strings.Concat(_ints.Select(i => i.ToString())).GetEnumerator(); } } ``` The likes of `() => new MixedAddable { 1, ""a"", 2, ""b"" }` works fine, but the following fails: ``` C# Expression.ListInit( Expression.New(typeof(MixedAddable)), Expression.Constant(0), Expression.Constant(""a"") ) ``` It's assumed that the correct `Add` method for the first expression is also correct for the rest, though this doesn't necessarily hold. " 5950 area-System.Xml System.Xml.XDocument.TreeManipulation.Tests failing for OSX Release in CI Looks like something whitespace or end-of-line related from the error message. 5951 area-System.Linq Incorrect argument name for null initializer to Expression.ListInit "If an initializer to `ListInit` is null the exception should give the argument name as ""initializers[0]"", etc. Instead it can be ""argument"", ""arguments"" or ""initializers"" depending on the overload used. " 5953 area-System.Net Remove Client property from TcpClient and UdpClient The property leaks through the abstraction. It's rarely used. And it complicates things on Unix due to exposing the underlying socket instance combined with difficulties with multiple connect calls on a single socket instance. Until we have good reason to expose it in the contract, we're removing it from the contract before it's stable. cc: @davidsh, @cipop, @SidharthNabar, @terrajobst, @weshaggard, @saurabh500 Closes #4968 Closes #5411 5963 area-System.Linq MemberInit will write to readonly fields on interpreter "Given: ``` C# private class PropertyAndFields { public readonly string ReadonlyStringField; } ``` Then `Expression> exp = () => new PropertyAndFields{ReadonlyStringField = ""Hello Readonly Field""}` won't compile (CS0191). However, this is accepted: ``` C# Func func = Expression.Lambda>( Expression.MemberInit( Expression.New(typeof(PropertyAndFields)), Expression.Bind( typeof(PropertyAndFields).GetMember(""ReadonlyStringField"")[0], Expression.Constant(""Hello Readonly Field"") ) ) ).Compile(); ``` If compiled with the compiler then attempting to invoke the delegate throws a `VerificationException`. If compiled with the interpreter then invoking the delegate returns a `PropertyAndFields` object with the readonly field set as requested. With an attempt to initialise a constant, the compiler will throw `NotSupportedException`, the interpreter return a delegate that throws `FieldAccessException` (or hit an assert in debug). With an attempt to initialise a static property the compiler will return a delegate that throws a `VerificationException` on invocation, the interpreter one that writes to the property (or hit an assert in debug, it unbalances the stack). Attempts to write initialise static fields will work for either, but again unbalances the stack for the interpreted version. The ideal solution would be to throw on the call to `Expression.Bind` which could be easily done by adding more checks to `ValidateSettableFieldOrPropertyMember`. If the backwards compatibility impact was considered too great, the interpreter could be change to throw the same exceptions as the compiler, in those cases where it throws. cc @VSadov @bartdesmet " 5964 area-System.IO Expose existing FileStream.Lock() and FileStream.Unlock() APIs on MacOS/Unix Dear Team, As the subject line states we seek the consideration to add Lock() and Unlock() for FileStream in the contract. The implementation should be straight forward at least for Windows platform. Current .NET 4.61 calls Win32 LockFile underneath: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365202(v=vs.85).aspx Although we don't have access to LockFile for UWP, we do luckily have the brother of it LockFileEx, which also supports async, which is good news. I believe for Linux/BSD/Mac there should be easy equivalent to find as locking on file is very common in old days. Will find all the details if the team is willing to consider the proposal. We could do our own P/Invoke to call the LockFileEx, but it would be much elegant if corefx support that out of box, unless there is significant reason to reject it. 5965 area-System.Linq Expression.ListBind accepts non-addable properties if element list is empty. "`Expression.ListBind` will accept a property or field that is not of a type with an `Add` method, though it should require such. The validation only passes fully if the element list is empty, as otherwise an attempt to create an `ElementInit` for such a type will fail. Example: ``` C# public class TypeWithEnumerable { public IEnumerable Numbers; } Expression.ListBind(typeof(TypeWithEnumerable).GetProperty(""Numbers"")); // Should throw. ``` " 5966 area-System.Net Allow libcurl to use CURLAUTH_NTLM We already have Negotiate, Digest, and Basic... adding NTLM. @kapilash, @vijaykota, why wasn't this done initially? Is there something important I'm missing? I just tested it, and it appears to work fine (using libcurl4-openssl-dev), and the docs for CURLAUTH_NTLM state it should work with multiple backends. Seems like worst case is there's some platform where it's simply not available but the other auth protocols continue to work as they would...? cc: @kapilash, @vijaykota, @ericeil 5969 area-Infrastructure Ubuntu 14.04.3 Corefx Build Error "Following instructions here https://github.com/dotnet/coreclr/blob/master/Documentation/building/linux-instructions.md CoreCLR builds ok. Corefx gets following error ~/git/corefx$ ./build.sh Setting up directories for build MSBUILD : error MSB1025: An internal failure occurred while running MSBuild. System.EntryPointNotFoundException: Unable to find an entry point named 'SetConsoleCtrlHandler' in DLL 'libcoreclr'. at Interop.libcoreclr.SetConsoleCtrlHandler(ConsoleCtrlHandlerRoutine handler, Boolean addOrRemove) at System.ConsolePal.ControlCHandlerRegistrar.RegisterOrUnregister(Boolean register) at System.Console.add_CancelKeyPress(ConsoleCancelEventHandler value) at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine) Unhandled Exception: System.EntryPointNotFoundException: Unable to find an entry point named 'SetConsoleCtrlHandler' in DLL 'libcoreclr'. at Interop.libcoreclr.SetConsoleCtrlHandler(ConsoleCtrlHandlerRoutine handler, Boolean addOrRemove) at System.ConsolePal.ControlCHandlerRegistrar.RegisterOrUnregister(Boolean register) at System.Console.add_CancelKeyPress(ConsoleCancelEventHandler value) at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine) at Microsoft.Build.CommandLine.MSBuildApp.Main(String[] args) ./build.sh: line 132: 31021 Aborted (core dumped) ReferenceAssemblyRoot=$__referenceassemblyroot $__scriptpath/Tools/corerun $__scriptpath/Tools/MSBuild.exe ""$__buildproj"" /nologo /verbosity:minimal ""/fileloggerparameters:Verbosity=normal;LogFile=$__buildlog"" /t:Build /p:OSGroup=$__BuildOS /p:COMPUTERNAME=$(hostname) /p:USERNAME=$(id -un) /p:TestNugetRuntimeId=$__TestNugetRuntimeId /p:ToolNugetRuntimeId=$__TestNugetRuntimeId $__UnprocessedBuildArgs tail: cannot open ‘/home/tonyh/git/corefx/msbuild.log’ for reading: No such file or directory Build Exit Code = 134 " 5971 area-System.Net Remove SystemNative_PlatformSupportsMultipleConnectAttempts #5790 removed the uses of this shim. Now we should be able to remove the shim itself. Fixes #5826. @stephentoub, @pgavlin 5972 area-Meta Add documentation around porting to .NET Framework @AlexGhiondea @weshaggard @leecow 5974 area-System.Numerics Cleanup Complex - Format the source file - Combine tests into one source file - Rewrite tests to make advantage of xunit 5975 area-System.Net Change socket test to stop sending data only when we've sent all the data, or an error occurs. If send returns zero, that does not necessarily mean we are done. Fixes #5739 Fixes #4817 @stephentoub, @pgavlin , @CIPop 5976 area-System.Data Change the DbColumn Indexer to use nameof(property) The issue https://github.com/dotnet/corefx/pull/5968 allows the access of attributes of DbColumn using the name of the properties. For better maintainability, the implementation of the indexer should use the nameof(property) instead of the names as strings. This can be done with upgrade of CoreFX repo to C# 6.0 being tracked by #1316 Refer pull request for further details https://github.com/dotnet/corefx/pull/5968 5980 area-Meta Consider exposing the WinRT targeting pack on NuGet "Hi, I'm trying to write a DNX-based library that will compile on both WPF and Windows 10. This is what my project.json looks like: ``` json ""frameworks"": { ""net46"": { ""frameworkAssemblies"": { ""WindowsBase"": ""4.0.0.0"" } }, ""netcore50"": { ""dependencies"": { ""Microsoft.NETCore.UniversalWindowsPlatform"": ""5.0.0"" } } } ``` And this is what my C# code looks like: ``` csharp #if NET46 using System.Windows; #elif NETCORE50 using Windows.UI.Xaml; #endif public class Dependency { public static DependencyProperty Register(/*...*/) where TOwner : DependencyObject { // ... } } ``` While I have no trouble compiling the code for WPF, the compiler isn't recognizing types like `DependencyProperty` for UWP. I eventually narrowed it down to the fact that it was missing the reference to `Windows.winmd` (or the universal API contract for Windows 10) that contained the types. So suddenly I remembered you guys had WinRT-specific libraries, and I looked into your `project.json` to see how you do it. I eventually figured out you're doing this using some kind of ['targeting pack'](https://github.com/dotnet/corefx/blob/ac67ffac987d0c27236c4a6cf1255c2bcbc7fe7d/src/System.Runtime.WindowsRuntime/src/project.json#L12) package, hosted privately on MyGet. Would it be possible for you guys to upload the package officially to NuGet, so others could use WinRT-specific types in .NET Core libraries? I'm assuming it shouldn't be too much of a trouble, since it only contains the `.winmd` file, right? " 5981 area-System.Net Remove the stale ActiveIssue(5555) tag for OSX Since the default root store should have trust for this cert now, consider this scenario to be Generally Regarded As Safe, like it is for the other platforms. Fixes #5555 (well, it was fixed a while ago, but the test-runtimes lagged) 5982 area-System.Diagnostics TraceSource: Will support load setting from App.config file? The original System.Diagnostic.TraceSource support define tracesource/sourceswitch/tracelistener in app.config xml. Will that be support in the near future for dotnet core? Thanks, Ting 5987 area-System.Diagnostics Process start doesn't resolve environment variables in the executable path. "If you use Process.Start(ProcessStartInfo) method on OSX (or any Unix OS) and a path to executable contains environment variables in it (this environment variables are passed to ProcessStartInfo.Environment). This variables will not be resolved and ""System.ComponentModel.Win32Exception: No such file or directory"" exception will be thrown. This behavior is inconsistent with the Windows version. Note: path looks like ""%EnvVar%\test.exe " 5990 area-Infrastructure Add Fedora 23 to CI / RID Graph / Packages https://getfedora.org/en/cloud/download/docker.html https://fedoraproject.org/wiki/Releases 5991 area-System.Net Address issues in PR #5852 Address issues with Virtualnetwork found in PR#5852. Postponing the fixes for later given the CI system instabilities with *NIX in the last week. - VirtualNetworkStream.cs:112 Nit: I think you said this will never be canceled at this time, so this can wait until later, but if this does have cancellation requested, it'll end up throwing a cancellation exception that's then caught by the catch block, which will return a task in the Faulted state. Technically it'd be better for the task to be in the Canceled state. In reality, for your testing purposes, it's unlikely to matter, as if the operation is immediately awaited, the caller won't be able to tell the difference. If, however, a caller were to inspect the Status of the returned task once it completed (as they might if they were using ContinueWith), they could tell the difference. - VirtualNetworkStreamTest.cs:110 Random isn't thread-safe, so this call should be protected (or you should use RandomNumberGenerator, which is thread-safe). Random has a nasty habit when it's used concurrently of getting into a corrupted state where it then only ever produces zeros. 5993 area-Infrastructure init-tools.sh output should mimic the cmd equivalent where the output is logged out to a file. 5994 area-System.IO Cleanup and reformat System.IO.Packaging Fixes #2699 5998 area-System.Net Eliminate CallbackHandle in CurlHandler For each request, we end up allocating a native CallbackHandle and wrapping it on the managed side with a SafeCallbackHandle. Then each P/Invoke to register a callback passes a delegate and a GCHandle, stores both in the CallbackHandle, and passes to libcurl a shim function and the CallbackHandle as the user pointer. The shim when invoked then pulls the relevant function out of the CallbackHandle and invokes it. But, we always use the same functions, for which delegates are cached in statics, both for perf and to keep them from being collected. If we instead had a single P/Invoke we called to store pointers to all of these delegates, then we would no longer need to store the delegates in the CallbackHandle, and we'd only have a single piece of state (the GCHandle) to pass for each invocation, which means we could just pass that as the user pointer and get rid of the CallbackHandle altogether. 5999 area-System.Net System.Net.Http.CurlHandler and Unix Sockets "I previously opened #3153 asking about exposing Unix Socket functionality in the CurlHandler, and @stephentoub closed the issue with [an excellent explanation](https://github.com/dotnet/corefx/issues/3153#issuecomment-139289555). However, as things in .NET Core Land have progressed, I'm wondering again about this. Basically, the **dotnet/corert** project is looking to enable native compilation, which means that C# can potentially be used to create useful, native cross-platform tools, much like Go. It's very common for these command-line applications or services on Linux to need to communicate over Unix Sockets; for example, `/var/run/docker.sock` is used to talk to the local Docker daemon. I had a quick look at the `HttpClient` and `HttpRequestMessage` APIs, and the internal handling of `HttpRequestMessage` by `CurlHandler`. There is a potential opportunity to introduce this functionality in an obscure but workable way without breaking or even changing the public API, by using the `Properties` dictionary on `HttpRequestMessage` (which is a `Dictionary`). One could set a property in here, perhaps like: ``` csharp var message = new HttpRequestMessage(HttpMethod.Get, ""http://localhost/api/list""); message.Properties[""Curl.UnixSocketPath""] = ""/var/run/docker.sock""; ``` `CurlHandler` could then check for this property and set `CURLOPT_UNIX_SOCKET_PATH` using `Interop.Http.EasySetOptionString`. An application or library developer using this feature could easily create extension methods on `HttpClient` to give themselves a nicer syntax. If that API would be acceptable, I'd be happy to have a go at implementing it. Thoughts? " 6001 area-System.Net Enable EventSource logging in CurlHandler We currently have a bunch of tracing in CurlHandler, but it's all guarded behind compile-time flags, making it difficult to use to diagnose issues. This converts that to all be EventSource-based logging. It also enables libcurl to provide its debug info via a callback, which is then routed to the EventSource as well, and mapped to the easy handles with which the info is associated. cc: @kapilash, @davidsh, @josguil, @eerhardt 6006 area-System.Net Failed assert in socket tests in ToFileDescriptor on OS X http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_debug_tst/412/console ``` 23:16:04 Assertion failed: (0 <= fd && fd <= OPEN_MAX), function ToFileDescriptor, file /Users/dotnet-bot/j/workspace/dotnet_corefx/nativecomp_osx_debug/src/Native/Common/pal_utilities.h, line 127. 23:16:04 ./run-test.sh: line 130: 70671 Abort trap: 6 ./corerun xunit.console.netcore.exe $testDllName -xml testResults.xml -notrait category=failing -notrait category=OuterLoop -notrait category=$xunitOSCategory -notrait Benchmark=true 23:16:04 error: One or more tests failed while running tests from 'System.Net.Sockets.APMServer.Tests'. Exit code 134. ``` 6007 area-System.IO Win32FileStream turns async reads into sync reads When filling the internal buffer, Win32FileStream does this as part of ReadAsync: ``` C# Task readTask = ReadInternalCoreAsync(_buffer, 0, _bufferSize, 0, cancellationToken); _readLen = readTask.GetAwaiter().GetResult(); ``` Ugh! There's a large comment about how this is done to avoid concurrent use of the buffer when concurrent read operations are issued, but we should be able to work around that using something similar to what I previously did for WriteAsync and FlushAsync, with the HasActiveBufferOperation mechanism (https://github.com/dotnet/corefx/pull/2929). As it currently stands, it appears that when async reads are performed against a Win32FileStream and those reads are smaller than the file stream's buffer, all such reads will be made synchronous, either because they're pulling from the buffer or because they're blocking waiting for the buffer to be filled. cc: @ericstj, @ianhays, @JeremyKuhne 6008 area-System.Net System.Net.Cache whole namespace is not in corefx? Was porting something that is doing: ``` if (u) request.CachePolicy = new System.Net.Cache.RequestCachePolicy (System.Net.Cache.RequestCacheLevel.Default); else request.CachePolicy = new System.Net.Cache.RequestCachePolicy (System.Net.Cache.RequestCacheLevel.BypassCache); ``` Then discovered that this namespace doesn't exist in the corefx, not even asked or mentioned in issues/code. 1, Is there better practices cancelling the need of this? 2, Is the function absorbed into somewhere else? 3, Or simply missing? 6009 area-Infrastructure prerelease build Microsoft.NETCore.UniversalWindowsPlatform 5.2.0-rc3-23809 can't install in vs 2015 It gives this error msg: ``` All packages are compatible with UAP,Version=v10.0. System.AppContext 4.1.0-rc3-23809 provides a compile-time reference assembly for System.AppContext on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm. Some packages are not compatible with UAP,Version=v10.0 (win10-arm). System.AppContext 4.1.0-rc3-23809 provides a compile-time reference assembly for System.AppContext on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm-aot. Some packages are not compatible with UAP,Version=v10.0 (win10-arm-aot). System.AppContext 4.1.0-rc3-23809 provides a compile-time reference assembly for System.AppContext on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86. Some packages are not compatible with UAP,Version=v10.0 (win10-x86). System.AppContext 4.1.0-rc3-23809 provides a compile-time reference assembly for System.AppContext on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86-aot. Some packages are not compatible with UAP,Version=v10.0 (win10-x86-aot). System.AppContext 4.1.0-rc3-23809 provides a compile-time reference assembly for System.AppContext on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64. Some packages are not compatible with UAP,Version=v10.0 (win10-x64). System.AppContext 4.1.0-rc3-23809 provides a compile-time reference assembly for System.AppContext on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64-aot. Some packages are not compatible with UAP,Version=v10.0 (win10-x64-aot). Package restore failed for 'myproject'. Package restore failed. Rolling back package changes for 'myproject'. ``` I tried one earlier build 23808, same error. 6010 area-System.Security Investigate RSACng handle usage When splitting out a thinner RSA implementation from RSACng (https://github.com/dotnet/corefx/commit/58d7b85d3b8a9632d1614716b966381e6d6b4efb) it seemed that RSACng does a lot of accessing of the Key.Handle property. This property returns a distinct disposable/finalizable resource each call, and RSACng does not appear to dispose it when done. Perhaps a single handle can be extracted from the key and cached until the key gets changed. 6011 area-System.Net HttpClient does not support proxy PAC file with file:// scheme "I have a vanilla ASP.net vnext project, and when switching from `dnx451`to `dnxcore50`, `HttpClient`stops working assuming an URI with an invalid protocol. The code itself is trivial: ``` public IActionResult Get() { string baseUrl = ""http://someserver.com/foo/""; using (var client = new HttpClient() { BaseAddress = new Uri(baseUrl) }) { var result = client.GetAsync(""items"").Result; ... } } ``` I tried importing different versions of `System.Net.Http` (e.g. _""System.Net.Http"": ""4.0.1-beta-23409""_), including the latest stable and latest beta, but they are all the same when running under the CoreClr. I didn't find another implementation of HttpClient for the CoreClr, but then, I have a hard time believing that something as elementary would be missing or broken. Am I missing something or using the wrong library? Thanks, Philipp System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.WinHttpException: The URL does not use a recognized protocol at System.Net.Http.WinInetProxyHelper.GetProxyForUrl(SafeWinHttpHandle sessionHandle, Uri uri, WINHTTP_PROXY_INFO& proxyInfo) at System.Net.Http.WinHttpHandler.SetRequestHandleProxyOptions(WinHttpRequestState state) at System.Net.Http.WinHttpHandler.SetRequestHandleOptions(WinHttpRequestState state) at System.Net.Http.WinHttpHandler.d__103.MoveNext() --- End of inner exception stack trace --- --- End of inner exception stack trace --- at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task`1.get_Result() at OrderManager.Controllers.JobsController.Get() ---> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.WinHttpException: The URL does not use a recognized protocol at System.Net.Http.WinInetProxyHelper.GetProxyForUrl(SafeWinHttpHandle sessionHandle, Uri uri, WINHTTP_PROXY_INFO& proxyInfo) at System.Net.Http.WinHttpHandler.SetRequestHandleProxyOptions(WinHttpRequestState state) at System.Net.Http.WinHttpHandler.SetRequestHandleOptions(WinHttpRequestState state) at System.Net.Http.WinHttpHandler.d__103.MoveNext() --- End of inner exception stack trace -- " 6013 area-System.Linq Refactor System.Linq Move classes into separate files. Split Enumerable among several files. Remove redundant references to generic types or namespaces. Fixes #1149 @stephentoub since you suggested to @VSadov that splitting this file might be useful at https://github.com/dotnet/corefx/pull/5820#discussion_r52452253 6017 area-System.Linq System.Linq needs to support 4.1.0.0 on desktop or increase the generation I've added a baseline for our internal build to permit the missing members for now, but you either need to add these APIs to desktop or create an API surface that is OOB-able to desktop. An example of an OOB-able design would be to put the new members on a new type. If you can OOB the new APIs then you can make 4.1.0 dotnet5.4/netstandard1.3. It will work on .NET 4.6 and later. If you cannot OOB the new APIs (or do not want to ) and you add the APIs to .NET 4.6.2/4.7 then you can make 4.0 dotnet5.6/netstandard1.5. If you cannot OOB the new APIs and you cannot add the APIs to .NET 4.6.2/4.7 then we must create a new generation and put the APIs there: dotnet5.7/netstandard1.6. Future versions of desktop must implement the new API in order to claim support for the new generation. /cc @weshaggard @stephentoub 6022 area-System.Numerics Inconsistent results for Math.Cos(double.MaxValue) on Windows and non-Windows platforms ## Problem - `Math.Cos(double.MaxValue)` has inconsistent results on Windows and non-Windows platforms. - Windows: returns `double.MaxValue` - Non-Windows: returns `-0.99998768942656` ## Symptom Whilst working on #5974, I noticed that I broke the Ubuntu, Mac OSX and CentOS builds by causing test failures. Interesting Windows did not break, and the tests ran as expected. Consider the following code: ``` var complex = new Complex(double.MaxValue, 0); Complex result = Complex.Exp(complex); ``` On Windows: `result == new Complex(double.PositiveInfinity, double.NaN)` On Ubuntu etc: `result == new Complex(double.NegativeInfinity, double.NaN)` In the [build logs](http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/centos7.1_debug_tst_prtest/1595/consoleFull#-21371504001f1a4601-6aec-4fd5-b678-78d4389fd5e8), this test failure occurs at 8:39:16. The code for Complex.Exp(Complex) is as follows: ``` double expReal = Math.Exp(value._real); double cosImaginary = expReal * Math.Cos(value._imaginary); double sinImaginary = expReal * Math.Sin(value._imaginary); return new Complex(cosImaginary, sinImaginary); ``` This may be a bug, as there are inconsistent implementations of these `System.Math` functions, leading to unexpected/undefined behaviour. I've added a test for this behaviour marked with ActiveIssue in #5974. 6023 area-Serialization Remove System.ServiceModel.Dispatcher namespace to fix reflection block issue in Wcf Type 'System.ServiceModel.Dispatcher.FaultFormatter.OperationFault' is blocked from reflection in NetNative by the toolchain. Reflection on System.Xml.XmlSerializer is blocked which causes overzealous blocking for the System.ServiceModel.Dispatcher namespace as well. Since serialization doesn't use this namespace, this change removes it together with XmlSchema.cs. cc: @hongdai @morganbr @AlexGhiondea @SGuyGe @zhenlan @shmao 6026 area-System.Net HttpWebRequest.UserAgent is not available in corefx? any particular reason why? 6027 area-System.Net Throw PNSE from Socket.Connect on *nix iff a previous connect attempt has failed See #5867 and #5829 for details on the problems with multiple connection attempts using the same socket on platforms that follow BSD/POSIX semantics for sockets. Fixes #5871. @pgavlin, @stephentoub, @davidsh 6028 area-System.Net Modify Outerloop job in groovy to run on Ubuntu and Windows. cc @mmitche @joshfree @rahulkotecha @vijaykota 6035 area-Infrastructure Building and running tests with the latest pre-release packages I would like to enable the scenario for developers to build the tests against the latest packages to be restored from myget. At the moment the current test projects utilize the project.json which are static and have project references to the product being built with the tests. This new scenario would allow for the test project.json to have a reference to the latest version of the product dependency it is testing and the latest versions of their sub dependencies. Your thoughts on this scenario? @weshaggard @ericstj CC: @joshfree @ianhays 6037 area-Infrastructure OpenSUSE PR jobs passing all tests but then failing the job e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/opensuse13.2_debug_tst_prtest/1125/console ``` 02:58:37 All tests passed. 02:58:37 [xUnit] [INFO] - Starting to record. 02:58:37 [xUnit] [INFO] - Processing xUnit.Net-v2 (default) 02:58:38 [xUnit] [INFO] - [xUnit.Net-v2 (default)] - 143 test report file(s) were found with the pattern '**/testResults.xml' relative to '/mnt/resource/j/workspace/dotnet_corefx/opensuse13.2_debug_tst_prtest' for the testing framework 'xUnit.Net-v2 (default)'. 02:58:38 [xUnit] [ERROR] - Test reports were found but not all of them are new. Did all the tests run? ``` 6038 area-System.Net Allow CurlHandler to opt-in to NTLM via CredentialCache "libcurl supports four auth types (Negotiate, NTLM, Digest, and Basic), but today our CurlHandler implementation only enables three (Negotiate, Digest, and Basic), with NTLM explicitly disabled to match what was done in WinHttpHandler in corefx (the full framework enables it). However, there are a few key differences that need to be taken into account for CurlHandler. For example, popular implementations of gssapi and Negotiate on Unix do not include implementations for fallback to NTLM. So whereas including “Negotiate” in WinHttpHandler often allows code on Windows to use NTLM if Kerberos is not available, the current state of CurlHandler often does not. And although NTLM has some known issues, if it's the only option for a scenario where a Unix front-end needs to communicate with a Windows back-end (say because the front-end doesn't have Kerberos infrastructure available and the back-end only has Windows authentication enabled), we still want it to be possible for a developer to write an app that communicates with that back-end: the underlying platform supports it, so if the developer explicitly wants it, CurlHandler sitting in the middle shouldn't get in the way. As such, this commit enables NTLM to be used, essentially removing the blocking of it that was previously done. However, it's not enabled by default for arbitrary credentials; rather, it's only enabled when a credential added to a CredentialCache explicitly specifies ""NTLM"". That way, it's available for a dev to opt-in to if desired, but just providing a NetworkCredential to CurlHandler will not use NTLM. cc: @bartonjs, @davidsh, @cipop, @kapilash, @chrisrpatterson, @ericeil " 6039 area-System.IO Win32FileStream will issue a seek on every ReadAsync call Full description is here: https://ayende.com/blog/173345/the-cost-of-async-i-o?key=227b21e219594be48ca03bc8312b08b9 But the gist of it is that we are trying to call ReadAsync on a file that is located on a remote share. Using ReadAsync, we saw a really horrible performance degradation. We tracked it down to this issue: ![image](https://cloud.githubusercontent.com/assets/116915/12979633/159bc0ae-d0e1-11e5-85f8-ba055fa313fb.png) And here is the problematic code: https://github.com/dotnet/corefx/blob/master/src/System.IO.FileSystem/src/System/IO/Win32FileStream.cs#L1201 Given that all async calls are always passing the position they use in the overlap, and how expensive this call is, it make for a very bad combination. 6041 area-System.Net Exception Format Bug A bug in the exception formatter results in format exception, there by giving wrong message in case of exceptions. This PR attempts to fix the issue. cc @stephentoub , @vijaykota @shrutigarg 6042 area-System.Net Native PkgProj for System.Net.Security Introducing package proj for gssapi native libraries. 6045 area-System.Reflection [SRM] Mark assembly as [CLSCompliant(true)] and mark individual APIs as [CLSCompliant(false)] Some APIs use pointers (e.g. MetadataReader constructor). Provide an alternative CLS compliant API. Such APIs could also improve usability in C# when the caller has byte[] or ImmutableArray and no interest in dealing with pointers. 6046 area-System.Security Restore the S.S.C.OpenSsl package to Unix-only PR #5880 made the OpenSsl package claim to be cross-platform to allow consumers of a particular form of lack-of-RSA.Create-workaround to continue having their code function after improved package validation came online. Now that RSA.Create exists, we should undo that workaround and go back to being honest that the package doesn't work on Windows. 6049 area-System.Net Allow IPv4 Loopback for DualModeConnect_AcceptAsync sockets tests Some sockets tests were connecting with the IPv4 loopback address and asserting that the connected IPv6 address was equivalent to the IPv4 loopback mapped to IPv6 (ffff:127.0.0.1). However, a non-mapped IPv4 loopback (127.0.01) is still supported on some platforms so the test needs to accommodate that case as it is still a valid loopback address. resolves #4829 @ericeil 6058 area-System.Net Modify NetworkInformation tests to search deeper for test files. "Helix builds for the Open tests for System.Net.NetworkInformation.FunctionalTests are failing because the testdata is being binplaced differently from in the open. The Helix build is placing the testdata into a ""NetworkFiles"" subdirectory like it is in the project structure, whereas it is binplaced to the dnxcore50 directory when running them normally. Rather than add complicated special-casing for Helix for this particular test project, I instead modified the only place we use that testdata to check both possible places before performing the file read. @CIPop @MattGal @joshfree @davidsh " 6059 area-Infrastructure Remove validation suppression from System.Runtime.Serialization.Primitives We're suppressing validation in System.Runtime.Serialization.Primitives until we can oob it to desktop. 6063 area-System.Net fixing comment check if we need to fix the comment https://github.com/shrutigarg/corefx/commit/f047a7d53ae699e51b8ee631e80d72cde4b6139b#commitcomment-16019127 6064 area-System.Net Merge master to dev/negotiatestream 6070 area-System.Globalization OpenSUSE CI builds with lots of test failures "Most (all) of these look globalization related: ``` CaseInsensitiveComparer_ctor.ExecuteCaseInsensitiveComparer_ctor CaseInsensitiveComparer_Default.ExecuteCaseInsensitiveComparer_Default CaseInsensitiveComparer_Object.ExecuteCaseInsensitiveComparer_Object CollectionsUtilTests.ExecuteCollectionsUtilTests StringTests.TestEndsWith(comparisonType: CurrentCultureIgnoreCase, text: ""Hello"", value: ""LLO"", expected: True) StringTests.TestCompare(strA: ""HELLO"", strB: ""hello"", comparisonType: CurrentCultureIgnoreCase, expected: 0) StringTests.TestStartsWith(comparisonType: CurrentCultureIgnoreCase, text: ""Hello"", value: ""HEL"", expected: True) StringTests.TestCompareIndexed(strA: ""HELLO"", indexA: 2, strB: ""hello"", indexB: 2, length: 3, comparisonType: CurrentCultureIgnoreCase, expected: 0) StringTests.TestCompareIndexed(strA: ""HELLO"", indexA: 2, strB: ""hello"", indexB: 2, length: 3, comparisonType: CurrentCulture, expected: 1) StringTests.TestCompareIndexed(strA: ""hello"", indexA: 2, strB: ""HELLO"", indexB: 2, length: 3, comparisonType: CurrentCulture, expected: -1) StringTests.TestIndexOf_AllSubstrings(source: ""abcde"", substring: ""abcde"", i: 0, comparison: CurrentCultureIgnoreCase) StringTests.TestIndexOf_AllSubstrings(source: ""abcde"", substring: ""abcd"", i: 0, comparison: CurrentCultureIgnoreCase) StringTests.TestIndexOf_AllSubstrings(source: ""abcde"", substring: ""abc"", i: 0, comparison: CurrentCultureIgnoreCase) StringTests.TestIndexOf_AllSubstrings(source: ""abcde"", substring: ""ab"", i: 0, comparison: CurrentCultureIgnoreCase) StringTests.TestIndexOf_AllSubstrings(source: ""abcde"", substring: ""a"", i: 0, comparison: CurrentCultureIgnoreCase) StringTests.TestIndexOf_AllSubstrings(source: ""abcde"", substring: ""bcde"", i: 1, comparison: CurrentCultureIgnoreCase) StringTests.TestIndexOf_AllSubstrings(source: ""abcde"", substring: ""bcd"", i: 1, comparison: CurrentCultureIgnoreCase) StringTests.TestIndexOf_AllSubstrings(source: ""abcde"", substring: ""bc"", i: 1, comparison: CurrentCultureIgnoreCase) StringTests.TestIndexOf_AllSubstrings(source: ""abcde"", substring: ""b"", i: 1, comparison: CurrentCultureIgnoreCase) StringTests.TestIndexOf_AllSubstrings(source: ""abcde"", substring: ""cde"", i: 2, comparison: CurrentCultureIgnoreCase) StringTests.TestIndexOf_AllSubstrings(source: ""abcde"", substring: ""cd"", i: 2, comparison: CurrentCultureIgnoreCase) StringTests.TestIndexOf_AllSubstrings(source: ""abcde"", substring: ""c"", i: 2, comparison: CurrentCultureIgnoreCase) StringTests.TestIndexOf_AllSubstrings(source: ""abcde"", substring: ""de"", i: 3, comparison: CurrentCultureIgnoreCase) StringTests.TestIndexOf_AllSubstrings(source: ""abcde"", substring: ""d"", i: 3, comparison: CurrentCultureIgnoreCase) StringTests.TestIndexOf_AllSubstrings(source: ""abcde"", substring: ""e"", i: 4, comparison: CurrentCultureIgnoreCase) StringTests.TestLastIndexOf_AllSubstrings(source: ""abcde"", substring: ""abcde"", i: 0, comparison: CurrentCultureIgnoreCase) StringTests.TestLastIndexOf_AllSubstrings(source: ""abcde"", substring: ""abcd"", i: 0, comparison: CurrentCultureIgnoreCase) StringTests.TestLastIndexOf_AllSubstrings(source: ""abcde"", substring: ""abc"", i: 0, comparison: CurrentCultureIgnoreCase) StringTests.TestLastIndexOf_AllSubstrings(source: ""abcde"", substring: ""ab"", i: 0, comparison: CurrentCultureIgnoreCase) StringTests.TestLastIndexOf_AllSubstrings(source: ""abcde"", substring: ""a"", i: 0, comparison: CurrentCultureIgnoreCase) StringTests.TestLastIndexOf_AllSubstrings(source: ""abcde"", substring: ""bcde"", i: 1, comparison: CurrentCultureIgnoreCase) StringTests.TestLastIndexOf_AllSubstrings(source: ""abcde"", substring: ""bcd"", i: 1, comparison: CurrentCultureIgnoreCase) StringTests.TestLastIndexOf_AllSubstrings(source: ""abcde"", substring: ""bc"", i: 1, comparison: CurrentCultureIgnoreCase) StringTests.TestLastIndexOf_AllSubstrings(source: ""abcde"", substring: ""b"", i: 1, comparison: CurrentCultureIgnoreCase) StringTests.TestLastIndexOf_AllSubstrings(source: ""abcde"", substring: ""cde"", i: 2, comparison: CurrentCultureIgnoreCase) StringTests.TestLastIndexOf_AllSubstrings(source: ""abcde"", substring: ""cd"", i: 2, comparison: CurrentCultureIgnoreCase) StringTests.TestLastIndexOf_AllSubstrings(source: ""abcde"", substring: ""c"", i: 2, comparison: CurrentCultureIgnoreCase) StringTests.TestLastIndexOf_AllSubstrings(source: ""abcde"", substring: ""de"", i: 3, comparison: CurrentCultureIgnoreCase) StringTests.TestLastIndexOf_AllSubstrings(source: ""abcde"", substring: ""d"", i: 3, comparison: CurrentCultureIgnoreCase) StringTests.TestLastIndexOf_AllSubstrings(source: ""abcde"", substring: ""e"", i: 4, comparison: CurrentCultureIgnoreCase) TupleTests.TestCompareTo System.Reflection.Tests.MethodInfoPropertyTests.TestReturnType2 System.Reflection.Tests.MethodInfoPropertyTests.TestReturnType4 System.Reflection.Tests.ParameterInfoNameTests.TestMethodParams1 System.Collections.Specialized.Tests.OrderedDictionaryTests.PassingEqualityComparers System.Linq.Expressions.Tests.Expression_Tests.TestCallInstanceMethodsByName StringComparerTests.TestCurrent RegexReplaceStringTests.RegexReplaceStringTestCase0 ``` " 6072 area-System.Net Disable Linux specific testcase for Plateform not supprted exception This testcase is no longer valid after the move of Platform specific content from NegoState.csl to NegoStreamPal. 6073 area-System.Linq Add TrySingle(IEnumerable, out TSource) "## Motivation In LINQ we have the `Single` and `SingleOrDefault` methods, but they don't tell you if it succeeded or not. The problem with these methods is that if there is more than one element in `source` (or more than one matching element in case of `predicate`) they all throw a `System.InvalidOperationException`. That is fine if more than one element is an error or very rare. If more than one element is common or expected then this will cause major slow downs. Additionaly, in cases of (example: int collections), default(int) is 0, which wouldn't tell the caller whether the operation succeeded (returning the item 0) or not (returning the default 0). ## Proposal ``` diff namespace System.Linq { public static class Enumerable { public static TSource Single(this IEnumerable source); public static TSource Single(this IEnumerable source, Func predicate); public static TSource SingleOrDefault(this IEnumerable source); public static TSource SingleOrDefault(this IEnumerable source, Func predicate); + public static bool TrySingle(this IEnumerable source, out TSource element); + public static bool TrySingle(this IEnumerable source, Func predicate, out TSource element); public static TSource First(this IEnumerable source); public static TSource First(this IEnumerable source, Func predicate); public static TSource FirstOrDefault(this IEnumerable source); public static TSource FirstOrDefault(this IEnumerable source, Func predicate); + public static bool TryFirst(this IEnumerable source, out TSource element); + public static bool TryFirst(this IEnumerable source, Func predicate, out TSource element); public static TSource Last(this IEnumerable source); public static TSource Last(this IEnumerable source, Func predicate); public static TSource LastOrDefault(this IEnumerable source); public static TSource LastOrDefault(this IEnumerable source, Func predicate); + public static bool TryLast(this IEnumerable source, out TSource element); + public static bool TryLast(this IEnumerable source, Func predicate, out TSource element); public static TSource ElementAt(this IEnumerable source, int index); public static TSource ElementAtOrDefault(this IEnumerable source, int index); + public static bool TryElementAt(this IEnumerable source, int index, out TSource element); } public static class Queryable { public static TSource Single(this IQueryable source); public static TSource Single(this IQueryable source, Expression> predicate); public static TSource SingleOrDefault(this IQueryable source); public static TSource SingleOrDefault(this IQueryable source, Expression> predicate); + public static (bool success, T value) TrySingle(this IQueryable source); + public static (bool success, T value) TrySingle(this IQueryable source, Expression> predicate); + public static bool TrySingle(this IQueryable source, out TSource element); + public static bool TrySingle(this IQueryable source, Expression> predicate, out TSource element); public static TSource First(this IQueryable source); public static TSource First(this IQueryable source, Expression> predicate); public static TSource FirstOrDefault(this IQueryable source); public static TSource FirstOrDefault(this IQueryable source, Expression> predicate); + public static (bool success, T value) TryFirst(this IQueryable source); + public static (bool success, T value) TryFirst(this IQueryable source, Expression> predicate); + public static bool TryFirst(this IQueryable source, out TSource element); + public static bool TryFirst(this IQueryable source, Expression> predicate, out TSource element); public static TSource Last(this IQueryable source); public static TSource Last(this IQueryable source, Expression> predicate); public static TSource LastOrDefault(this IQueryable source); public static TSource LastOrDefault(this IQueryable source, Expression> predicate); + public static (bool success, T value) TryLast(this IQueryable source); + public static (bool success, T value) TryLast(this IQueryable source, Expression> predicate); + public static bool TryLast(this IQueryable source, out TSource element); + public static bool TryLast(this IQueryable source, Expression> predicate, out TSource element); public static TSource ElementAt(this IQueryable source, int index); public static TSource ElementAtOrDefault(this IQueryable source, int index); + public static (bool success, T value) TryElementAt(this IQueryable source, int index); + public static bool TryElementAt(this IQueryable source, int index, out TSource element); } } ``` ## Original I'd like to propose a new LINQ method: `TrySingle`. The idea is pretty much the same as the existing `Single` method except it does not throw an exception when there is not only a single item in the sequence. To do this I made to modifications to the `Single` contract: 1. First the method returns `bool`. `true` if the sequence contains exactly one item, `false` otherwise. 2. I added an out parameter of type `TSource`. This will ""hold"" the single element on success. On failure it is filled with `default(TSource)`. I have found this method very useful in my own code and if accepted can quickly put together a pull request. " 6075 area-System.Net InnerSafeCloseSocket.SetNonBlocking should access the AsyncContext property InnerSafeCloseSocket.SetNonBlocking should access the AsyncContext property, rather than using _asyncContext directly. _asyncContext might not be initialized yet. This causes a NullReferenceException if setting the socket to non-blocking before some other operation has initialized the AsyncContext. 6076 area-Serialization [Port] System.Text.EncoderFallbackException: Unable to translate Unicode character We fixed the issue on desktop. We need to port the fix to .Net Core. ``` Discovering: System.Runtime.Serialization.Xml.Tests Discovered: System.Runtime.Serialization.Xml.Tests Starting: System.Runtime.Serialization.Xml.Tests XmlDictionaryWriterTest.XmlDictionaryWriter_InvalidUnicodeChar [FAIL] System.Text.EncoderFallbackException : Unable to translate Unicode character \uDB1B at index 0 to specified code page. Stack Trace: at System.Text.EncoderExceptionFallbackBuffer.Fallback(Char charUnknown, Int32 index) at System.Text.EncoderFallbackBuffer.InternalFallback(Char ch, Char*& chars) at System.Text.UTF8Encoding.GetByteCount(Char* chars, Int32 count, EncoderNLS baseEncoder) at System.Text.UTF8Encoding.GetByteCount(String chars) at System.Text.Encoding.GetBytes(String s) D:\OSS\corefx\src\System.Private.DataContractSerialization\src\System\Xml\XmlStreamNodeWriter.cs(468,0): atSystem.Xml.XmlStreamNodeWriter.UnsafeGetUTF8Chars(Char* chars, Int32 charCount, Byte[] buffer, Int32 offset) D:\OSS\corefx\src\System.Private.DataContractSerialization\src\System\Xml\XmlStreamNodeWriter.cs(354,0): atSystem.Xml.XmlStreamNodeWriter.UnsafeWriteUTF8Chars(Char* chars, Int32 charCount) D:\OSS\corefx\src\System.Private.DataContractSerialization\src\System\Xml\XmlUTF8TextWriter.cs(480,0): at System.Xml.XmlUTF8NodeWriter.UnsafeWriteEscapedText(Char* chars, Int32 count) D:\OSS\corefx\src\System.Private.DataContractSerialization\src\System\Xml\XmlUTF8TextWriter.cs(447,0): at System.Xml.XmlUTF8NodeWriter.WriteEscapedText(String s) D:\OSS\corefx\src\System.Private.DataContractSerialization\src\System\Xml\XmlBaseWriter.cs(1019,0): at System.Xml.XmlBaseWriter.WriteString(String value) D:\OSS\corefx\src\System.Private.DataContractSerialization\src\System\Xml\XmlDictionaryAsyncCheckWriter.cs(381,0): at System.Xml.XmlDictionaryAsyncCheckWriter.WriteString(String text) D:\OSS\corefx\src\System.Runtime.Serialization.Xml\tests\XmlDictionaryWriterTest.cs(127,0): at XmlDictionaryWriterTest.XmlDictionaryWriter_InvalidUnicodeChar() Finished: System.Runtime.Serialization.Xml.Tests ``` 6078 area-System.Reflection CustomAttributeExtensions.GetCustomAttribute does not return inherited attributes for indexer argument "System.Reflection.CustomAttributeExtensions.GetCustomAttribute(this ParameterInfo element, Type attributeType, bool inherit) - which is located in the **System.Reflection.Extensions** assembly - does not returned inherited attributes for indexer arguments. It does work fine for method arguments though (for example). To reproduce, compile and run the following code snippet: ``` c# using System; using System.Reflection; namespace ConsoleApp1 { public class Program { static void Main() { var indexerParam = typeof(Sub).GetProperty(""Item"").GetIndexParameters()[0]; var indexerParamAttr = indexerParam.GetCustomAttribute(typeof(MyAttribute), true); Console.WriteLine($""Indexer: {indexerParamAttr != null}""); var methodParam = typeof(Sub).GetMethod(""Run"").GetParameters()[0]; var methodParamAttr = methodParam.GetCustomAttribute(typeof(MyAttribute), true); Console.WriteLine($""Method: {methodParamAttr != null}""); } } [AttributeUsage(AttributeTargets.All)] public class MyAttribute : Attribute { } public abstract class Base { public abstract string Run([MyAttribute] int[] args); public abstract object this[[MyAttribute] int[] args] { get; set; } } public class Sub : Base { public override string Run(int[] args) { return null; } public override object this[int[] args] { get { return null; } set { } } } } ``` Expected result: ``` text Indexer: True Method: True ``` Actual result: ``` text Indexer: False Method: True ``` " 6079 area-System.Net CurlException during 'dotnet restore' in Ubuntu when redirected to certain CDN servers "Ubuntu 14.04 LTS. Reproduced in the Performance repository for ASP.NET. **The exact same scenario succeeds in Windows**. Repro code: ``` C# using System; using System.Diagnostics; using System.IO; using System.Net.Http; namespace ConsoleApplication { public class Program { public static void Main(string[] args) { var url1 = @""https://dotnet.myget.org/F/dotnet-core/api/v3/flatcontainer/runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography/1.0.1-rc2-23805/runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.1.0.1-rc2-23805.nupkg""; var url2 = @""https://www.myget.org/F/aspnetcidev/api/v3/flatcontainer/microsoft.aspnetcore.server.kestrel/1.0.0-rc2-16391/microsoft.aspnetcore.server.kestrel.1.0.0-rc2-16391.nupkg""; //this one succeeds always Test(url1); //this one fails in Linux, succeeds in Windows Test(url2); } public static void Test(string url) { Console.WriteLine(url); var client = new HttpClient(); var webstask = client.GetAsync(url); var result = webstask.Result; if(result.IsSuccessStatusCode) { Console.WriteLine(""Success""); var readtask = result.Content.ReadAsByteArrayAsync(); var bytes = readtask.Result; Console.WriteLine(""Read {0} bytes"", bytes.Length); } else { Console.Write(""Failed with status code {0}"", result.StatusCode); } } } } ``` This program will succeed to run in Windows but fail in Linux with the following exception: ``` Unhandled Exception: System.AggregateException: One or more errors occurred. (An error occurred while sending the request.) ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.CurlException: Peer certificate cannot be authenticated with given CA certificates at System.Net.Http.CurlHandler.MultiAgent.FinishRequest(EasyRequest completedOperation, CURLcode messageResult) --- End of inner exception stack trace --- --- End of inner exception stack trace --- at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at ConsoleApplication.Program.Test(String url) at ConsoleApplication.Program.Main(String[] args) ``` We found this by getting [HelloWorldMvc](https://github.com/aspnet/Performance/tree/dev/testapp/HelloWorldMvc) and trying to `dotnet restore -s https://myget.org/f/dotnet-core -s https://myget.org/f/aspnetcidev -s https://api.nuget.org/v3/index.json`. The result is a number of messages indicating `An error occurred while sending the request.` and failure to load one or multiple packages. Note however that some packages will actually succeed. We identified that when requesting for nuget packages we get 302 redirected to CDN nodes. In the repro code above, the first URL will 302 redirect to a blob file under a `windows.net` domain. The second URL 302 redirects to a `kxcdn.com`. The certificate for this CDN node was issued by COMODO RSA Domain Validation Secure Server CA. I took Fiddler traces on Windows to see if anything was suspicious about the requests or responses, but so far I haven't identified anything. Here's a copy of the response headers I saw. Success case: ``` GET https://dotnet.myget.org/F/dotnet-core/api/v3/flatcontainer/runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography/1.0.1-rc2-23805/runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.1.0.1-rc2-23805.nupkg HTTP/1.1 302 Found Cache-Control: private, s-maxage=0 Content-Type: text/html; charset=utf-8 Location: https://dotnetmyget.blob.core.windows.net/privatefeeddotnet0core/runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography-1.0.1-rc2-23805?sv=2014-02-14&sr=b&sig=hTjHAsbpKJ2DujU2qrQH%2FNYlRRV4suZQLwi4A6RFHXI%3D&st=2016-02-12T18:55:00Z&se=2016-02-12T20:05:00Z&sp=r&rscc=max-age%3D3600&rsct=binary%2Foctet-stream&rscd=filename%3Druntime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.1.0.1-rc2-23805.nupkg Server: Microsoft-IIS/8.5 X-Frame-Options: deny X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Date: Fri, 12 Feb 2016 19:20:50 GMT Content-Length: 577 -----------> GET https://dotnetmyget.blob.core.windows.net/privatefeeddotnet0core/runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography-1.0.1-rc2-23805?sv=2014-02-14&sr=b&sig=hTjHAsbpKJ2DujU2qrQH%2FNYlRRV4suZQLwi4A6RFHXI%3D&st=2016-02-12T18:55:00Z&se=2016-02-12T20:05:00Z&sp=r&rscc=max-age%3D3600&rsct=binary%2Foctet-stream&rscd=filename%3Druntime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.1.0.1-rc2-23805.nupkg HTTP/1.1 200 OK Cache-Control: max-age=3600 Content-Length: 37506 Content-Type: binary/octet-stream Content-MD5: AqSICrowLpVQZrsGBsbipQ== Last-Modified: Fri, 05 Feb 2016 07:22:40 GMT Accept-Ranges: bytes ETag: ""0x8D32DFD220326C7"" Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-request-id: 065fa41c-0001-000a-37ca-657f0c000000 x-ms-version: 2014-02-14 x-ms-lease-status: unlocked x-ms-lease-state: available x-ms-blob-type: BlockBlob Content-Disposition: filename=runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.1.0.1-rc2-23805.nupkg Date: Fri, 12 Feb 2016 19:20:52 GMT ``` Fail case: ``` GET https://www.myget.org/F/aspnetcidev/api/v3/flatcontainer/microsoft.aspnetcore.server.kestrel/1.0.0-rc2-16391/microsoft.aspnetcore.server.kestrel.1.0.0-rc2-16391.nupkg HTTP/1.1 302 Found Cache-Control: private, s-maxage=0 Content-Type: text/html; charset=utf-8 Location: https://myget-2e16.kxcdn.com/privatefeedaspnetcidev/Microsoft.AspNetCore.Server.Kestrel-1.0.0-rc2-16391?sv=2014-02-14&sr=b&sig=OfWatRJb4qdl29OJDx9PmotBAeNZeyhx3nqHqqJ0260%3D&st=2016-02-12T18%3A55%3A00Z&se=2016-02-12T20%3A05%3A00Z&sp=r&rscc=max-age%3D3600&rsct=binary%2Foctet-stream&rscd=filename%3DMicrosoft.AspNetCore.Server.Kestrel.1.0.0-rc2-16391.nupkg Server: Microsoft-IIS/8.5 X-Frame-Options: deny X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Date: Fri, 12 Feb 2016 19:21:01 GMT Content-Length: 504 -----------> GET https://myget-2e16.kxcdn.com/privatefeedaspnetcidev/Microsoft.AspNetCore.Server.Kestrel-1.0.0-rc2-16391?sv=2014-02-14&sr=b&sig=OfWatRJb4qdl29OJDx9PmotBAeNZeyhx3nqHqqJ0260%3D&st=2016-02-12T18%3A55%3A00Z&se=2016-02-12T20%3A05%3A00Z&sp=r&rscc=max-age%3D3600&rsct=binary%2Foctet-stream&rscd=filename%3DMicrosoft.AspNetCore.Server.Kestrel.1.0.0-rc2-16391.nupkg HTTP/1.1 200 OK Server: keycdn-engine Date: Fri, 12 Feb 2016 19:21:01 GMT Content-Type: binary/octet-stream Content-Length: 698348 Connection: keep-alive Cache-Control: max-age=3600 Content-MD5: IOWe07QD6QTPyvhA0dSGpQ== Last-Modified: Tue, 09 Feb 2016 07:00:20 GMT ETag: ""0x8D3311EACA7E862"" x-ms-request-id: f4df10d2-0001-0010-1cc9-65c4fc000000 x-ms-version: 2014-02-14 x-ms-lease-status: unlocked x-ms-lease-state: available x-ms-blob-type: BlockBlob Content-Disposition: filename=Microsoft.AspNetCore.Server.Kestrel.1.0.0-rc2-16391.nupkg X-Cache: HIT X-Edge-Location: usse Access-Control-Allow-Origin: * Accept-Ranges: bytes ``` **Note** we can still restore the packages by using `dnu restore` instead. For some reason `dnu` isn't affected by this issue. " 6083 area-System.IO [System.IO]: File.Copy does not retain the timestamp of the original file Copied file has the current timestamp instead of the source file's timestamp. 6085 area-Infrastructure Use Roslyn toolset package for Windows builds Currently we are only using new Roslyn toolset packages in our x-plat builds since we are using .NetCore MSBuild in those platforms. On Windows, we are still using the Full VS MSBuild which doesn't have those roslyn tools. Once we move Windows to use them as well, we will be able to start using C#6 features on our repo. Steps for this to work: - [x] In BuildTools repo: restore the full framework roslyn compilers as part of the tool initialization. (PR dotnet/buildtools#453) - [x] In CoreFx repo: Update corefx to depend on this new version of BuildTools and change the dir.props to use the new roslyn compilers. (PR #6181) cc: @weshaggard FYI: @jaredpar @NickCraver 6087 area-Serialization Remove unused legacy data contract json serializer code We have switched to share data contract json serializer with NetNative instead of the implementation based on JavaScriptSerializer in https://github.com/dotnet/corefx/commit/06d51d6f49eb41a71810833c26c3eb4a89a73df7. This change is to remove the remaining unused code. cc: @mellinoe @SGuyGe @shmao @zhenlan 6090 area-Infrastructure ./build broken for Debian As of 8ca8c48 the `build.sh` script errors out on Debian 8.2: ``` ~/projects/dotnet/corefx$ ./build.sh Setting up directories for build ./build.sh: line 106: /home/projects/dotnet/corefx/Tools/corerun: No such file or directory tail: cannot open ‘/home/projects/dotnet/corefx/msbuild.log’ for reading: No such file or directory Build Exit Code = 127 ``` I regret that I don't have time to dig into this but mention it because the new and improved build tooling will be very appreciated. BTW, I see that the CI builds are still passing, so I'm guessing that Jenkins is not using the same tooling? 6092 area-System.IO MemoryMappedFile.CreateFromFile not able to open file for read "@stephentoub, my changes for ILC integration with CLI https://github.com/dotnet/cli/pull/1363 failed in the CI. Is the below by design? I narrowed it down to this scenario: XUnit runner process and the ILC's input project both refer to the same version of the NETStandard.Library. XUnit runner loads System.Console.dll from the shared packages cache location. ILC wants to compile an user's app using the same System.Console.dll specified in the project.json file and opens a `MemoryMappedFile` on it which errors out with: ``` The process cannot access the file 'C:\Users\schellap\.nuget\packages\runtime.win7.System.Console\4.0.0-rc2 -23811\runtimes\win7\lib\dotnet5.4\System.Console.dll' because it is being used by another process. ``` To repro, 1. Download [CLI](https://dotnetcli.blob.core.windows.net/dotnet/beta/Binaries/Latest/dotnet-win-x64.latest.zip) and unzip into c:\cli 2. `set DOTNET=c:\cli` 3. Unzip this zip file [temp2.zip](https://github.com/dotnet/corefx/files/128969/temp2.zip) or use below code. 4. Run repro.bat from the zip file. 5. Unexpected result. ``` public static int Main(string[] args) { MemoryMappedFile mappedFile = null; while (true) try { mappedFile = MemoryMappedFile.CreateFromFile(args[0], FileMode.Open, null, 0, MemoryMappedFileAccess.Read); Console.WriteLine(""Expected""); return 100; } catch (IOException e) { Console.WriteLine(""Unexpected "" + e.Message); } finally { if (mappedFile != null) mappedFile.Dispose(); } return -1; } ``` ``` :: populate the shared location %DOTNET%\bin\dotnet.exe restore :: compile the app %DOTNET%\bin\dotnet.exe publish :: delete system.console so shared system.console will be used if exist ""bin\Debug\dnxcore50\win7-x64\System.Console.dll"" (del ""bin\Debug\dnxcore50\win7-x64\System.Console.dll"") :: run the process bin\Debug\dnxcore50\win7-x64\temp2.exe %USERPROFILE%\.nuget\packages\runtime.win7.System.Console\4.0.0-rc2-23811\runtimes\win7\lib\dotnet5.4\System.Console.dll ``` " 6104 area-System.Threading Expose cancellation due to exceptions and breaking with Parallel loops The `Parallel` loops break when an exception is thrown or when the loop is aborted using `ParallelLoopState` members. When that happens the existing work items that are still executing have no (built-in) way to find out. They cannot cancel themselves to speed up the failure/exit case. `ParallelLoopState` should expose a `CancellationToken` that becomes signaled when the loop aborts for any reason. There is a workaround for this available: Users can catch all exceptions, signal a custom token, then `throw;`. It would be nicer and possibly faster if this was built-in, though. 6107 area-System.Net Add LocalEndPoint and RemoteEndPoint properties to TcpClient Due to https://github.com/dotnet/corefx/pull/5953 it is not possible to get this information. This is a pretty important property and I think should be added to the contract before next RC release. Obtaining IP address information is essential for application-level IP blocking/banning etc among many other things... 6109 area-System.ComponentModel Remove sealed from Phone and EmailAddress data annotation attributes Can you remove sealed from [Phone], [EmailAddress] and [Url] data annotation attributes(classes). It would be great if developers can inherit their implementation and add their own improvements to the existing functionality. > ``` > public class PhoneAttribute : DataTypeAttribute > { > public PhoneAttribute(); > > public override bool IsValid(object value); > } > ``` **And I will use it as follows:** Example: > public class PhoneLocalized : PhoneAttribute > { > public PhoneLocalized() > { > base.ErrorMessageResourceType = typeof(WebPortalResource); > base.ErrorMessageResourceName = WebPortalResourceName.PhoneWrong; > } > } **How I use Phone attrbute now in my view model:** > public class RegViewModel > { > [Phone(ErrorMessageResourceType = typeof(WebPortalResource), ErrorMessageResourceName = WebPortalResourceName.PhoneWrong)] > public string Phone { get; set; } > } **How I would use it if I was able to inherit the [Phone] attribute** > public class RegViewModel > { > [PhoneLocalized] > public string Phone { get; set; } > } 6110 area-System.Data Suspicious, likely broken checks inside System.Data.SqlClient.SqlConnectionFactory.CreateConnection() `System.Data.SqlClient.SqlConnectionFactory.CreateConnection()` goes like this: ``` SqlConnection sqlOwningConnection = owningConnection as SqlConnection; // then later... else if (owningConnection != null) { userOpt = (SqlConnectionString)(((SqlConnection)owningConnection).UserConnectionOptions); } if (owningConnection != null) { recoverySessionData = ((SqlConnection)owningConnection)._recoverySessionData; } ``` why is `owningConnection` being cast to `SqlConnection` again and irrespective to what `as SqlConnection` returned? Technically it allows for cases when `owningConnection` is non-null but if of type other than `SqlConnection` - then casts will just fail with an exception. Is that intended? Should `sqlOwningConnection` be used instead? Maybe `as` should be replaced with a cast instead? 6111 area-System.Net Fix in SafeCredentialHandle when using default credentials This PR fixes the Null Reference Exception when default credentials are used. 6113 area-System.Net Merge master to dev/negotiatestream Some changes are necessary to pick up to unblock the build. 6114 area-System.Net Negotiate Stream on Unix does not fail with invalid target `NegotiateStream.AuthenticateAsClientAsync` does not fail for invalid target. 6115 area-System.Data Suspicious timeout computations in System.Data.SqlClient.SqlInternalConnectionTds `System.Data.SqlClient.SqlInternalConnectionTds` has `LoginNoFailover()` and `LoginWithFailover()` methods which differently compute `timeoutUnitInterval`. `LoginWithFailover()` does this: ``` if (timeout.IsInfinite) { timeoutUnitInterval = checked((long)ADP.FailoverTimeoutStep * ADP.TimerFromSeconds(ADP.DefaultConnectionTimeout)); } else { timeoutUnitInterval = checked((long)(ADP.FailoverTimeoutStep * timeout.MillisecondsRemaining)); } ``` and `LoginNoFailover()` does this: ``` if (timeout.IsInfinite) { timeoutUnitInterval = checked((long)(ADP.FailoverTimeoutStep * (1000L * ADP.DefaultConnectionTimeout))); } else { timeoutUnitInterval = checked((long)(ADP.FailoverTimeoutStep * timeout.MillisecondsRemaining)); } ``` `else`-branches are exactly the same. Yet one `if` branch uses `TimerFromSeconds()` which returns number of ticks for given number of seconds and another uses multiplication by one thousand. Why the difference? 6116 area-System.Data Suspicious comment on use of GC.KeepAlive() in System.Data.SqlClient.SqlConnection.TryOpen() `System.Data.SqlClient.SqlConnection.TryOpen()` has this comment ``` // does not require GC.KeepAlive(this) because of OnStateChange ``` I don't see an explicit call to `OnStateChange()` anywhere in that method. Even if there's a call chain which leads to `OnStateChange()` from that method it'd be more reliable to put `GC.KeepAlive()` call so that code isn't broken by later changes. It's worth remembering that failing to use `GC.KeepAlive()` can causes the subtlest race conditions. 6118 area-System.Data Suspicious comment about non-existing lock in System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() `System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()` has this warning: ``` // call OnError outside of _ErrorCollectionLock to avoid deadlock ``` there's nothing called `_ErrorCollectionLock` or similarly in the codebase. The comment is full of magic. 6119 area-System.Data System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() silently swallows error conditions `System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()` has a Debug.Assert check that the errors connection is not empty and also this excellent `if`: ``` SqlConnection exception = null; //later... if (temp != null && temp.Count > 0) //craft exception } //later ... if (exception != null ) { //do a lot of cool stuff } // else do nothing ``` which means that allowing to have this function called when there're no elements in `temp` leads to a logical error - no error indication is given and the connection is just silently closed. Those `Debug.Assert`s should instead throw something like `InvalidOperationException`. 6120 area-System.Data Suspicious error object creation in System.Data.SqlClient.TdsParserStateObject.OnTimeout() "`System.Data.SqlClient.TdsParserStateObject.OnTimeout()` goes like this: ``` _internalTimeout = true; // lock protects against Close and Cancel lock (this) { if (!_attentionSent) { AddError(new SqlError( WHATEVER )); ``` If you look through usage of `_internalTimeout` elsewhere in the same class you may notice that `ReadSniError()` also checks `_internalTimeout` and optionally sets `fail` local variable. It's unclear whether this may cause `ThrowExceptionAndWarning()` being called with empty ""errors"" collection which would cause https://github.com/dotnet/corefx/issues/6119 I guess that `OnTimeout()` should add a new `SqlError()` no matter if `_attentionSent` is set. " 6122 area-System.Net Cannot locate reference to type IPAddress "Hello, I've published a .NET Core library to nuget. Here is the project.json of this package: ``` ""frameworks"": { ""dnx451"": { ""frameworkAssemblies"": { ""System"": """", ""System.Net"": """" } }, ""dnxcore50"": { ""dependencies"": { ""System.Console"": ""4.0.0-beta-23516"", ""System.Collections"": ""4.0.11-beta-23516"", ""System.Linq"": ""4.0.1-beta-23516"", ""System.Net.Sockets"": ""4.1.0-beta-23516"", ""System.Runtime"": ""4.0.21-beta-23516"", ""System.Threading"": ""4.0.11-beta-23516"" } } ``` I've installed this package from nuget to the DNX451 console app and restored nuget packages. Unfortunately I have a problem with compiling. > Reference to type 'IPAddress' claims it is defined in 'System.Net.Primitives', but it could not be found ConsoleNet451Sample` What is wrong? In my .NET Core project i have no references to System.Net.Primitives " 6126 area-System.Net Use SafeHandles in *nix Sockets implementation "Most of the *nix Sockets code was dealing directly in file descriptors, without using SafeHandles to keep the file descriptors alive during pending operations. #5750 is an example of the kind of issue this can lead to; in that case, the Socket object was collected and finalized while a pending async I/O was in progress, effectively cancelling the I/O. On Windows, pending async I/O keeps the native socket alive (unless someone explicitly calls `Dispose` on the socket), so we need to have similar behavior on *nix. The ""meat"" of the change is to track the `SafeCloseSocket` instance in `SocketAsyncContext` (instead of the file descriptor), and to pass these as SafeHandles to the interop layer whenever possible. Unfortunately, System.Native.so's functions mostly take `int32_t` file descriptor arguments. Fixing this the ""pretty"" way would involve changing all of these to `intptr_t`, and then using the normal p/invoke `SafeHandle`->`IntPtr` marshaling. But updating all of the signatures in System.Native.so is quite a project, as we'd need to keep both the old _and_ new signatures for some time. For now, I've done manual `SafeHandle`->`int` marshaling, and will open an issue for cleaning this up further. We will need to think some more about how this interacts with `SocketAsyncEngine`; I believe there is a race there that will lead to problems, but I don't think this change makes it any worse. Fixes #5750 Probably fixes #4563 Might fix #4890, #5628. @stephentoub @pgavlin @CIPop " 6128 area-Infrastructure Cannot compile CoreFX on Linux anymore "There is a MSBuild failure when you build CoreFX on Ubuntu 14.04: ``` ./build.sh Setting up directories for build Restoring NuGet.exe... Installing dotnet cli... Restoring BuildTools version 1.0.25-prerelease-00167... Initializing BuildTools... Done initializing tools. MSBUILD : error MSB1025: An internal failure occurred while running MSBuild. System.EntryPointNotFoundException: Unable to find an entry point named 'Stat' in DLL 'System.Native'. at Interop.Sys.Stat(String path, FileStatus& output) at System.IO.UnixFileSystem.DirectoryExists(String fullPath) at System.IO.Directory.Exists(String path) at Microsoft.Build.Shared.FileUtilities.LooksLikeUnixFilePath(String value) at Microsoft.Build.CommandLine.MSBuildApp.GatherCommandLineSwitches(ArrayList commandLineArgs, CommandLineSwitches commandLineSwitches) at Microsoft.Build.CommandLine.MSBuildApp.GatherAllSwitches(String[] commandLine, CommandLineSwitches& switchesFromAutoResponseFile, CommandLineSwitches& switchesNotFromAutoResponseFile) at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine) Unhandled Exception: System.EntryPointNotFoundException: Unable to find an entry point named 'Stat' in DLL 'System.Native'. at Interop.Sys.Stat(String path, FileStatus& output) at System.IO.UnixFileSystem.DirectoryExists(String fullPath) at System.IO.Directory.Exists(String path) at Microsoft.Build.Shared.FileUtilities.LooksLikeUnixFilePath(String value) at Microsoft.Build.CommandLine.MSBuildApp.GatherCommandLineSwitches(ArrayList commandLineArgs, CommandLineSwitches commandLineSwitches) at Microsoft.Build.CommandLine.MSBuildApp.GatherAllSwitches(String[] commandLine, CommandLineSwitches& switchesFromAutoResponseFile, CommandLineSwitches& switchesNotFromAutoResponseFile) at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine) at Microsoft.Build.CommandLine.MSBuildApp.Main(String[] args) ./build.sh: line 100: 12558 Aborted (core dumped) ReferenceAssemblyRoot=$__referenceassemblyroot $__scriptpath/Tools/corerun $__scriptpath/Tools/MSBuild.exe ""$__buildproj"" /nologo /verbosity:minimal ""/fileloggerparameters:Verbosity=normal;LogFile=$__buildlog"" ""/l:BinClashLogger,$__binclashloggerdll;LogFile=$__binclashlog"" /t:Build /p:OSGroup=$__BuildOS /p:COMPUTERNAME=$(hostname) /p:USERNAME=$(id -un) /p:TestNugetRuntimeId=$__TestNugetRuntimeId $__UnprocessedBuildArgs ``` " 6132 area-System.Linq System.Dynamic.Utils.CollectionExtensions.ToReadOnly modifies ReadOnlyCollectionBuilder "`System.Dynamic.Utils.CollectionExtensions.ToReadOnly` contains the lines: ``` C# var builder = enumerable as ReadOnlyCollectionBuilder; if (builder != null) { return builder.ToReadOnlyCollection(); } ``` `ReadOnlyCollectionBuilder.ToReadOnlyCollection` basically does this: ``` C# val old = this._items; this._items = Array.Empty(); return old; ``` Meaning `CollectionExtensions.ToReadOnly` clears the `ReadOnlyCollectionBuilder` object passed in. As an example of the weirdness that ensues: ``` C# using System.Runtime.CompilerServices; using System.Linq.Expressions; public static class Weird { public static void Run() { var parameters = new ReadOnlyCollectionBuilder { Expression.Parameter(typeof(int), ""a""), Expression.Parameter(typeof(int), ""b"") }; var blah = Expression.Lambda(Expression.Empty(), parameters); if (parameters.Count == 0) { System.Console.WriteLine(""This line gets printed, which is strange""); } } } ``` I don't mind the weirdness of random methods being treated as a sink for `ReadOnlyCollectionBuilder` objects but it's not really clear from the documentation that this behavior is intentional. " 6134 area-System.Data System.Data.SqlClient.TdsParser contains but fails to properly own an AutoResetEvent `System.Data.SqlClient.TdsParser` has this member: ``` internal AutoResetEvent _resetConnectionEvent = null; // Used to serialize executes and call reset on first execute only. ``` `AutoResetEvent` _is_ `IDisposable`, yet nothing is done to have `Dispose()` called. 6135 area-System.Net Include NetSecurityNative for Native Build cc @vijaykota @stephentoub 6136 area-System.Threading System.Threading.ReaderWriterLockSlim.LazyCreateEvent() fails to properly own the just created event `System.Threading.ReaderWriterLockSlim.LazyCreateEvent()` goes like this: ``` EventWaitHandle newEvent; if (makeAutoResetEvent) newEvent = new AutoResetEvent(false); else newEvent = new ManualResetEvent(false); EnterMyLock(); if (waitEvent == null) // maybe someone snuck in. waitEvent = newEvent; else newEvent.Dispose(); ``` There's quite a lot of code between a new event is created _and_ its ownership is passed to the caller. If there's an exception in between the newly created event gets leaked. 6139 area-System.Net NegotiateStream Tests on Unix Introducing CI tests for NegotiateStream on Unix. This PR is introduced as two commits - 1) where the infrastructure setup (related to installing and configuring kdc) is done as a part of external script (that is run by the jenkins job). 2)where the setup is done via a test fixture. In order for the tests to run successfully, #5773 needs to be merged. cc: @stephentoub @vijaykota @shrutigarg 6142 area-System.Net ClientWebSocket Dispose AV's while operations still in-flight WCF stress hits an AV while inside an async call to SendAsync on a web socket that is already disposed. ``` 0:023> k 00 coreclr!MarshalNative::GCHandleInternalGet [f:\dd\ndp\clr\src\vm\marshalnative.cpp @ 731] 01 mscorlib_ni!System.Runtime.InteropServices.GCHandle.get_Target()+0x1e 02 System_Net_WebSockets_Client!System.Net.WebSockets.WinHttpWebSocket.SendAsync 03 System_Net_WebSockets_Client!System.Net.WebSockets.ClientWebSocket.SendAsync 04 System_Private_ServiceModel!System.ServiceModel.Channels.WebSocketTransportDuplexSessionChannel+WebSocketStream+ 05 mscorlib_ni!System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start 06 System_Private_ServiceModel!System.ServiceModel.Channels.WebSocketTransportDuplexSessionChannel+WebSocketStream.WriteAsync 07 System_Private_ServiceModel!System.ServiceModel.Channels.TimeoutStream+d__10.MoveNext() 08 mscorlib_ni!System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start 09 System_Private_ServiceModel!System.ServiceModel.Channels.TimeoutStream.WriteAsync 0a System_Private_ServiceModel!System.ServiceModel.Channels.TimeoutStream+ 0b mscorlib_ni!System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start 0c System_Private_ServiceModel!System.ServiceModel.Channels.TimeoutStream.WriteAsyncInternal 0d System_Private_ServiceModel!System.ServiceModel.Channels.TimeoutStream.Write 0e System_Private_DataContractSerialization_ni!System.Xml.XmlStreamNodeWriter.WriteBytes 0f System_Private_DataContractSerialization_ni!System.Xml.XmlBinaryNodeWriter.WriteBase64Text 10 System_Private_DataContractSerialization_ni!System.Xml.XmlBaseWriter.WriteBase64(Byte[], Int32, Int32)+0x18d 11 System_Private_ServiceModel!System.ServiceModel.Dispatcher.StreamFormatter+StreamFormatterHelper.WriteValue 12 System_Private_ServiceModel!System.ServiceModel.Dispatcher.StreamFormatter.Serialize 13 System_Private_ServiceModel!System.ServiceModel.Dispatcher.OperationFormatter.SerializeBodyContents 14 System_Private_ServiceModel!System.ServiceModel.Dispatcher.OperationFormatter+OperationFormatterMessage+OperationFormatterBodyWriter.OnWriteBodyContents 15 System_Private_ServiceModel!System.ServiceModel.Channels.BodyWriterMessage.OnWriteBodyContents 16 System_Private_ServiceModel!System.ServiceModel.Channels.Message.OnWriteMessage 17 System_Private_ServiceModel!System.ServiceModel.Channels.BinaryMessageEncoderFactory+BinaryMessageEncoder.WriteMessage 18 System_Private_ServiceModel!System.ServiceModel.Channels.WebSocketTransportDuplexSessionChannel.OnSendCore 19 System_Private_ServiceModel!System.ServiceModel.Channels.TransportDuplexSessionChannel.OnSend 1a System_Private_ServiceModel!System.ServiceModel.Channels.OutputChannel.Send 1b System_Private_ServiceModel!System.ServiceModel.Dispatcher.DuplexChannelBinder+DuplexRequestContext.OnReply 1c System_Private_ServiceModel!System.ServiceModel.Channels.RequestContextBase.Reply 1d System_Private_ServiceModel!System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.Reply 1e System_Private_ServiceModel!System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage9 1f System_Private_ServiceModel!System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage8 20 System_Private_ServiceModel!System.ServiceModel.Dispatcher.MessageRpc.Process 21 System_Private_ServiceModel!System.ServiceModel.Dispatcher.MessageRpc+Wrapper.Resume 22 System_Private_ServiceModel!System.ServiceModel.Dispatcher.ThreadBehavior.CleanThreadCallback 23 mscorlib_ni!System.Threading.Tasks.Task.Execute() ``` 6145 area-Infrastructure Re-enable unicode zip tests for Unix "Consumes the new xunit Trait ""IgnoreForCI"" for the System.IO.Compression unicode tests that are failing on Jenkins. We'll need to pass `-notrait Category=IgnoreForCI` to build.cmd in Jenkins, though I do not know the process for that. resolves #5096, #5459 @stephentoub @ellismg " 6147 area-System.Net Fix HttpClient diagnostic logging PR https://github.com/dotnet/corefx/pull/5881 Pulls the commit from https://github.com/dotnet/corefx/pull/5881, then adds one to fix it up to pass the builds and tests. cc: @nbilling Replaces https://github.com/dotnet/corefx/pull/5881 6149 area-System.Numerics Further work after #5974 Some remaining work needs to be done, brought up in #5974 - consolidate common test data - refactor test methods (I'm gonna need some more details on this one - it was mentioned but not very much expanded on in the PR) /cc @mellinoe 6150 area-System.Linq Make Linq, Dynamic and Expressions use the same coding style as the rest of corefx At least for consistency sake. It could be as simple as running the formatter tool, but could be a fairly big change. In particular for Linq. 6153 area-System.IO System.IO.Tests.FileStream_Dispose.DisposeVirtualBehavior failed on Ubuntu Release ``` System.IO.Tests.FileStream_Dispose.DisposeVirtualBehavior [FAIL] 17:42:30 Assert.True() Failure 17:42:30 Expected: True 17:42:30 Actual: False 17:42:30 Stack Trace: 17:42:31 at System.IO.Tests.FileStream_Dispose.DisposeVirtualBehavior() ``` http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/ubuntu_release_tst_prtest/1916/consoleFull#-21371504001f1a4601-6aec-4fd5-b678-78d4389fd5e8 6154 area-System.Net System.Net.Sockets.Tests.ConnectExTest.ConnectEx_Success failed on CentOS Release ``` System.Net.Sockets.Tests.ConnectExTest.ConnectEx_Success [FAIL] 17:43:39 System.Net.Sockets.SocketException : Unknown error 10048 17:43:39 Stack Trace: 17:43:39 at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress) 17:43:39 at System.Net.Sockets.Socket.Bind(EndPoint localEP) 17:43:39 at System.Net.Sockets.Tests.SocketTestServerAsync.Start(EndPoint localEndPoint) 17:43:39 at System.Net.Sockets.Tests.SocketTestServer.SocketTestServerFactory(SocketImplementationType type, Int32 numConnections, Int32 receiveBufferSize, EndPoint localEndPoint, ProtocolType protocolType) 17:43:39 at System.Net.Sockets.Tests.ConnectExTest.ConnectEx_Success() 17:43:39 Finished: System.Net.Sockets.Tests ``` 6156 area-System.IO Add System.IO.* tests missing from Open As part of disabling the ToF tests, we're raising coverage in Open where there are gaps that are covered by the ToF tests. This commit gets us to parity with ToF for: - System.IO.Compression - System.IO.Compression.ZipFile - System.IO.FileSystem.DriveInfo - System.IO.FileSystem.Watcher - System.IO.MemoryMappedFiles - System.IO.Pipes - System.IO.UnmanagedMemoryStream 6158 area-System.Net KDC setup for Linux cc: @stephentoub, @bartonjs, @Priya91 - Added KDC setup script and config files (tested on Ubuntu, Debian, CentOS and Red Hat) - Changes to System.Net.Security.Tests project file so as to copy the KDC setup script and related conf files to output directory 6161 area-System.Net Enable NegotiateStream tests on OSX The script used on Linux OSs (see #6158) does not work on OSX since the latter uses Heimdal KDC. So currently the tests are blocked on OSX. The script needs to be fixed and tests need to be enabled for OSX. 6162 area-System.Numerics New method to get permutations of items in 1D collections "Getting all the possible permutations (understood in its widest sense) of elements in a given 1D collection is a somehow common requirement. For example (C# version): ``` List items = new List() { 1, 2, 3 }; //All permutations of 2 //a) No repeated elements and order doesn't matter (1-2 = 2-1) //1-2, 1-3, 2-3 //b) No repeated elements and order matters (1-2 != 2-1) //1-2, 1-3, 2-1, 2-3, 3-1, 3-2 //c) Repeated elements and order doesn't matter //1-1, 1-2, 1-3, 2-3, 2-2, 3-3 //d) Repeated elements and order matters //1-1, 1-2, 1-3, 2-1, 2-3, 2-2, 3-1, 3-2, 3-3 //All permutations of 3, etc. ``` With a constant number of elements (e.g., 3, as proposed in the aforementioned example), implementing an algorithm to deliver this functionality is quite straightforward (i.e., as many nested loops as elements). On the other hand, with a variable number of elements (e.g., any number between 3 and 10), the complexity is notably increased. Even in the first simpler scenario, being able to just type `myPermutations = myCollection.Permutations(2);` would be certainly helpful. My proposal is to create a new method for 1D collections delivering all the possible permutations among its elements. It might be called ""Permutations"" and accept various arguments, like number of items per permutation or type of permutation (as shown in the example above). At least for the first version, I think that the best format for the output variable is a dictionary of integers (key) and collection of objects (value). By assuming that the first version will be included within the `System.Array` methods, I guess that the dictionary should be of type (C#) `Dictionary`. In case of deciding to go ahead with this proposal, I would like to implement it myself. " 6167 area-Meta Add a issue_template.md and pull_request_template.md Please see https://github.com/dear-github/dear-github/issues/125 and https://news.ycombinator.com/item?id=11119411 Maybe an idea for this repo? 6172 area-System.IO System.IO.Compression DeflateStream WriteAsync doesn't use underlying WriteAsync In DeflateStream WriteAsync and FlushAsync we're using the base Stream's async operations that wrap the underlying stream's Write/Flush in a Begin/End architecture to jury-rig an async operation. That doesn't make much sense imo when our underlying stream already implements Stream and possibly has its own specific asynchronous methods that it wants to be used. We should consider modifying the DeflateStream asynchronous Write and Flush methods to do like ReadAsync does and directly call the underlying stream's asynchronous methods. If the underlying stream doesn't override WriteAsync then there will be no change from the current behavior. @stephentoub 6173 area-System.Net Race conditions in SocketAsyncEngine "In [`SocketAsyncEngine.EventLoop`](https://github.com/dotnet/corefx/blob/master/src/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEngine.Unix.cs#L80), there is a window where `WaitForSocketEvents` has returned an event for a socket, but we have not yet deferenced the event's `GCHandle` to obtain the socket's `SocketAsyncContext`. In that window, another thread may close the socket and free the `GCHandle`. This can lead to some problems, depending on what _else_ happens in this window. The most egregious of these is probably as follows: If another `GCHandle` is allocated for another `SocketAsyncContext`, when we will misattribute the events to the new socket. For the most part this won't matter, as it will simply mean that we have to retry some operation again. But if the new socket has a pending ""connect"" operation, and we receive a ""write"" event, we'll think the new socket is connected, and there is likely no way we can recover from this. We need to find a way to synchronize the freeing of these handles with any pending calls to `WaitForSocketEvents` _or_ switch to a handle allocation mechanism that does not re-use handles. " 6174 area-System.Net Cleanup WebUtility tests - Use xunit InlineData 6180 area-System.Net HttpClient.GetAsync is slow in dnxcore50 compared to dnx461 When using GetAsync on HttpClient the request is taking considerably longer to return when running the same code targeting dnxcore50 compared to dnx461. This is from an ASP.NET 5 project, and happens when running within IIS Express and Kestrel. As an aside was hoping to debug against the core code, but even after cloning the repo, and adding the source folder to my global.json file I couldn't get VS2015 to pick up the local reference, so any help on that would be great. 6182 area-System.IO System.IO.Compression: Delegate to underlying stream async methods This commit modifies our DeflateStream FlushAsync and WriteAsync methods to delegate to the underlying stream instead of the base stream. resolves #6172 @stephentoub @ericstj 6185 area-Meta Reference assemblies need to include private struct fields Today the reference assemblies for .NET assemblies strip private fields from structs. This has an observable, and potentially dangerous, impact on project that consume them: - Allows pointers to be created for structs with fields of a reference type. - Prevents the compiler from catching cyclic struct layout problems. - Breaks C# definite assignment checking. - Allows structs using `[FieldOffset]` to verify when they should not. - Prevents developers from correctly planning for interop scenarios. More details are available [here](http://blog.paranoidcoding.com/2016/02/15/are-private-members-api-surface.html) and an example of the problems this can produce is [here](https://github.com/dotnet/roslyn/issues/8410). I understand part of the motivation for removing these fields is to keep the reference assemblies small. Keeping the fields necessitates keeping the type definitions for the types of the fields and this can cascade into many more types / members being included thus increasing size. Cutting private fields for classes is fine as it's unobservable. Unfortunately for structs fields are observable irrespective of their accessibility and must be maintained in reference assemblies. The only action I think that can be done to curtail the number of types a struct brings in is the following: > A reference assembly can represent an inaccessible struct field which is a reference type as `object`. Essentially `class`, `interface`, `delegate` and generic type parameters constrained to `class` can be transformed to object. ``` csharp // Implementation assembly private interface IBigInterface { ... } public struct S { private IBigInterface _field; } // Reference assembly public struct S { private object _field; } ``` This is unobservable to the compiler and can help limit the number of types brought it. 6186 area-System.Net Fix race in SocketAsyncEngine "In `SocketAsyncEngine.EventLoop`, there is a window where `WaitForSocketEvents` has returned an event for a socket, but we have not yet dereferenced the event's 'GCHandle' to obtain the socket's `SocketAsyncContext`. In that window, another thread may close the socket and free the `GCHandle`. This can lead to some problems, depending on what else happens in this window. The most egregious of these is probably as follows: If another `GCHandle` with the same value is allocated for another `SocketAsyncContext`, then we will misattribute the events to the new socket. For the most part this won't matter, as it will simply mean that we have to retry some operation again. But if the new socket has a pending ""connect"" operation, and we receive a ""write"" event, we'll think the new socket is connected, and there is likely no way we can recover from this. This change switches to a new handle allocation strategy that does not permit re-use of a given handle with a given event port. Handle values increase monotonically until we reach the handle's maximum size; at that point, we allocate a new event port, and start allocating handle values from zero. The old port will be freed once all of the handles associated with that port have been freed. On 64-bit platforms, the maximum handle value is `long.MaxValue`, which effectively means that we will never need to allocate a new event port. On 32-bit platforms, we top out at `int.MaxValue`, and so a long-running process may occasionally need to allocate a new port. Since this limit is reachable on 32-bit, but is in any case hard to reach, we artificially impose a very low limit in ""debug"" builds, so we can be sure to exercise the rollover to the new event port. Fixes #6173. @pgavlin, @stephentoub " 6187 area-System.Net Socket_ConnectAsyncDnsEndPoint_HostNotFound test failed with TryAgain error http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_release_prtest/2364/consoleFull ``` 16:18:38 System.Net.Sockets.Tests.DnsEndPointTest.Socket_ConnectAsyncDnsEndPoint_HostNotFound [FAIL] 16:18:38 SocketError: TryAgain 16:18:38 Expected: True 16:18:38 Actual: False 16:18:38 Stack Trace: 16:18:38 d:\j\workspace\windows_nt_re---5067c899\src\System.Net.Sockets.Legacy\tests\FunctionalTests\DnsEndPointTest.cs(348,0): at System.Net.Sockets.Tests.DnsEndPointTest.AssertHostNotFoundOrNoData(SocketAsyncEventArgs args) 16:18:38 d:\j\workspace\windows_nt_re---5067c899\src\System.Net.Sockets.Legacy\tests\FunctionalTests\DnsEndPointTest.cs(196,0): at System.Net.Sockets.Tests.DnsEndPointTest.Socket_ConnectAsyncDnsEndPoint_HostNotFound() ``` 6188 area-System.Xml ReadContentAsInt18 XML test failure on OS X http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_release_tst_prtest/946/console ``` 16:45:15 System.Xml.Tests.IntegerTests.ReadContentAsInt18 [FAIL] 16:45:15 Assert.Equal() Failure 16:45:15 ↓ (pos 25) 16:45:15 Expected: ···1 12:00:00 AM +00:00 16:45:15 Actual: ···1 12:00:00 AM +00:00 +00:00 16:45:15 ↑ (pos 25) 16:45:15 Stack Trace: 16:45:15 at System.Xml.Tests.IntegerTests.ReadContentAsInt18() ``` 6191 area-System.IO Add Path.CreateRelativePath method to calculate a relative path between two others "### Background Currently, there's no built-in way to recalculate a path relative to another directory in .NET. The [most popular SO answer](http://stackoverflow.com/a/340454/4077294) on the topic is over 10 lines, which is less than ideal. Also, it's pretty allocation-heavy since it instantiates 3 `Uri` objects and 3 strings. ## Proposal ### Signature The method would look like this: ``` csharp public static string CreateRelativePath(string @from, string to) ``` - **from** would be the directory path for which the newly returned path would be relative to. It could be absolute or relative. - **to** would be the path for which the returned path would point to. It could also be absolute or relative. If either paths are relative, they are resolved in relation to the process' current directory (e.g. via `Path.GetFullPath`). ### Example inputs/outputs ``` csharp Path.CreateRelativePath(@""C:\Users"", @""C:\Users\James""); // returns James Path.CreateRelativePath(""/usr/local/bin"", ""/usr/bin""); // returns ../../bin Path.CreateRelativePath(""lib"", ""../test""); // returns ../../test ``` What do you guys think? " 6195 area-Infrastructure Native code does not compile under arm64 I'm looking into it. 6196 area-System.Diagnostics Unable to register Trace Listener in CORE CLR I want to capture logs in Core CLR and want to register a trace listener for same. But I am unable to find a way to do so. This can be achieved in Full CLR in this way: ``` TextWriterTraceListener writer = new TextWriterTraceListener(System.Console.Out); Debug.Listeners.Add(writer); ``` I want to achieve same thing in Core CLR but TextWriterTraceListner is not available in core CLR. How can this be achieved? 6200 area-System.Net Implementing BidirectionDictionary and using it for statusCode mapping - Added BidirectionalDictionary implementation in Collections/Generic. - Updated the logic of mapping native status code to common status codeby using BidirectionalDictionary Tested locally. cc: @stephentoub @bartonjs @vijaykota 6201 area-System.Net Remove an aggressive assert Fix for #6199 cc @stephentoub @vijaykota 6204 area-Meta Add support for SystemMessaging and SOAP Web Services Is there planned support for Queueing through the System.Messaging namespace and Soap WebServices through some other namespace? Will there be support for MSMQ, AMQP, SOAP, etc? 6205 area-System.Security S.S.C.Csp SafeHandle types have an allocating+finalizing InvalidHandle property SafeProvHandle, SafeKeyHandle, SafeHashHandle all have allocating InvalidHandle properties, but all the usages assume a static object (at least, none of them dispose the value they get back) 6210 area-System.Security Investigate handle usage in S.S.C.Csp's CapiHelper class A lot of CapiHelper was a transliteration of the crypto VM QCall functions from C++ to C#. Unfortunately, some handle management got lost in transliteration: The VM held these handles in stack-allocated classes similar to SafeHandle, which means that the dtor fired on block exit. Since the VM never visibly called CryptDestroyKey (or the appropriate function for the handle type) this caused a lot of Disposes to be converted to Finalizes. And that exposed a handle-order-free problem. (The SafeKeyHandle has an underlying relationship with the SafeProvHandle that allocated it, if the SafeProvHandle is freed first, the SafeKeyHandle free returns false. And largely they're both being finalized). 6211 area-System.Security SafeKeyHandle depends on SafeProvHandle, and should track that A SafeKeyHandle is allocated from a SafeProvHandle. The SafeKeyHandle needs the SafeProvHandle to not be freed first. So the SafeKeyHandle should track its parent/child relationship similar to how SafeInteriorHandle does. 6218 area-System.Net Lots of timeouts on Unix in DualMode connect tests Some of the tests are hanging in EndConnect, e.g. ``` 00007F6A6C94B150 00007F6A6D897DF0 System.Net.Sockets.SocketAPMExtensions.EndConnect(System.Net.Sockets.Socket, System.IAsyncResult) 00007F6A6C94B170 00007F6A6D89784B System.Net.Sockets.Tests.DualMode.DualModeBeginConnect_IPEndPointToHost_Helper(System.Net.IPAddress, System.Net.IPAddress, Boolean) 00007F6A6C94B200 00007F6A6D897718 System.Net.Sockets.Tests.DualMode.b__45_0() 00007F6A6C94B220 00007F6A6D79D36E Xunit.Assert.RecordException(System.Action) 00007F6A6C94B250 00007F6A6D79D2FB Xunit.Assert.Throws[[System.__Canon, mscorlib]](System.Action) 00007F6A6C94B280 00007F6A6D8976AA System.Net.Sockets.Tests.DualMode.BeginConnectV6IPEndPointToV4Host_Fails() ``` Others are timing out, e.g. ``` 10:32:46 System.Net.Sockets.Tests.DualMode.ConnectAsyncV4IPEndPointToV4Host_Success [FAIL] 10:32:46 Timed out while waiting for connection 10:32:46 Expected: True 10:32:46 Actual: False 10:32:46 Stack Trace: 10:32:46 at System.Net.Sockets.Tests.DualMode.DualModeConnectAsync_IPEndPointToHost_Helper(IPAddress connectTo, IPAddress listenOn, Boolean dualModeServer) 10:32:46 at System.Net.Sockets.Tests.DualMode.ConnectAsyncV4IPEndPointToV4Host_Success() ``` 6220 area-Infrastructure Incremental build does not work outside Windows RIght now if you build a project twice in a row, the second build re-runs some targets that should be up-to-date already. When I build System.Private.Uri twice on Windows, almost all of the targets are skipped on the second try. On Linux, some targets are re-run. Namely, the CoreResGen and CoreCompile targets are both run again, and those are probably two of the most expensive targets, relatively speaking. This may be due to some difference in the x-plat MSBuild we are using. I have tried to use the CoreCLR version of MSBuild on Windows to see if this would reproduce, but there seems to be an issue with csc in that case (something about a COM interface cast failing). Notably, though, it DOES try to rerun the CoreResGen and CoreCompile steps like it does on Linux, and skips the same targets that it does on Linux. So I strongly suspect this is a bug in the CoreCLR-MSBuild we are using. @joperezr 6222 area-System.Net Make setup-kdc.sh executable. cc @kapilash @rahku @vijaykota Refer this [comment](https://github.com/dotnet/corefx/pull/6139#issuecomment-185936932) 6223 area-System.Console WindowAndCursorProps.Title_Set failed on Windows 10 http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_win10_debug/91/consoleFull ``` 10:33:10 WindowAndCursorProps.Title_Set [FAIL] 10:33:10 System.IO.IOException : No process is on the other end of the pipe 10:33:10 Stack Trace: 10:33:10 d:\j\workspace\outerloop_win---0cba2915\src\System.Console\src\System\ConsolePal.Windows.cs(539,0): at System.ConsolePal.set_Title(String value) 10:33:10 d:\j\workspace\outerloop_win---0cba2915\src\System.Console\src\System\Console.cs(265,0): at System.Console.set_Title(String value) 10:33:10 d:\j\workspace\outerloop_win---0cba2915\src\System.Console\tests\WindowAndCursorProps.cs(107,0): at WindowAndCursorProps.Title_Set() ``` 6224 area-Infrastructure Windows 7 outer loop test runs failing finding vcvarsall.bat "``` 05:45:09 d:\j\workspace\outerloop_win---627ab81b>call ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"" x86 && Build.cmd /p:ConfigurationGroup=Release /p:WithCategories=""InnerLoop;OuterLoop"" /p:TestWithLocalLibraries=true 05:45:09 '""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat""' is not recognized as an internal or external command, 05:45:09 operable program or batch file. ``` " 6226 area-System.IO DeletedTests.FileSystemWatcher_Deleted_Negative failed in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_release_tst_prtest/1011/console ``` 13:40:44 DeletedTests.FileSystemWatcher_Deleted_Negative [FAIL] 13:40:44 Should not observe a deleted event within 500ms 13:40:44 Expected: False 13:40:44 Actual: True 13:40:44 Stack Trace: 13:40:44 at Utility.ExpectNoEvent(WaitHandle eventOccurred, String eventName, Int32 timeout) 13:40:44 at DeletedTests.FileSystemWatcher_Deleted_Negative() ``` 6230 area-System.Runtime Add Arm64 support in RuntimeInformation Currently there is no Arm64 support in CoreFX. I've added support in the native part (see PR #6229), but the managed part needs to go through a review process which I'm opening here. The simple change requested is to add the Arm64 enum entry to the various enum types listing all the supported platforms. However this is not sufficient, the various platform/OS implementation of RuntimeInformation needs to be updated to take into account this new value. Here is the list of C# classes that will be most likely need to be updated (list is not exhaustive): ``` src/System.Runtime.InteropServices.RuntimeInformation/ref/System.Runtime.InteropServices.RuntimeInformation.cs src/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/Architecture.cs src/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/RuntimeInformation.Windows.cs src/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/RuntimeInformation.Unix.cs src/Common/src/Interop/Windows/mincore/Interop.SYSTEM_INFO.cs src/Common/src/Interop/Unix/System.Native/Interop.GetUnixArchitecture.cs src/System.Runtime/ref/System.Runtime.cs ``` 6231 area-System.Net HTTP response Stream.ReadAsync acts differently from .NET Framework When an HTTP server closes the connection before sending all of the content, `HttpClient` in the .NET Framework throws a `System.IO.IOException`. .NET Core treats this as an acceptable end of content and throws no exception. This occurs when the server sends `Content-Length`. When using `Transfer-Encoding: chunked`, both .NET Framework and .NET Core throw a `System.IO.IOException` but the inner exceptions seem like the error is being handled differently. Oddly, when using HTTP response `Stream.Read` (not `async`), `Content-Length` works just fine in both .NET Core and .NET Framework and `Transfer-Encoding: chunked` throws in both cases. I tested .NET Core with `dnx run` and `dotnet run` and tested .NET Framework with Visual Studio 2015's F5 experience in a .csproj as well as `dnx run`. I have not tested this on any other operating system. Library versions and a minimal repro are available in this project. [CloseTooEarly.zip](https://github.com/dotnet/corefx/files/137222/CloseTooEarly.zip) This is concerning because it seems that the .NET Core HTTP client is less strict about the `Content-Length` header, which is (as far as I know) is strong assertion by the server of how much it will sent and should therefore throw to not risk data corruption. Also, there seems to be inconsistency between the `async` and non-`async` cases. 6232 area-Serialization Move CoreCLR-only serialization tests to a separate file We have internal lab run of serialization tests on corefx for NetNative which involve these tests affecting other tests because of compilation failure so this is to move them out to a separate file until that issue is fixed. @SGuyGe @shmao @zhenlan 6235 area-System.Net On Ubuntu 14.04 CoreFX build hangs while Test Execution I have been trying to build CoreFX on Ubuntu but every time the build hangs while performing Test Execution for System.Net.Security.Unit.Tests with System.TimeOutException. Only way to come out of it is to kill the process. Any idea what could be the reason? System.Net.Sockets.APMServer.Tests-> /home/clrtestbld1/git/corefx/bin/Linux.AnyCPU.Debug/System.Net.Sockets.APMServer.Tests/System.Net.Sockets.APMServer.Tests.dll xUnit.net console test runner (64-bit .NET Core) Copyright (C) 2014 Outercurve Foundation. Discovering: System.Net.Sockets.APMServer.Tests Discovered: System.Net.Sockets.APMServer.Tests Starting: System.Net.Sockets.APMServer.Tests System.Net.Sockets.Tests.DualMode.ReceiveMessageFromAsyncV6BoundToSpecificV6_Success [FAIL] **System.TimeoutException : The operation has timed out.** Stack Trace: at System.Net.Sockets.Tests.DualMode.ReceiveMessageFromAsync_Helper(IPAddress listenOn, IPAddress connectTo, Boolean expectedToTimeout) at System.Net.Sockets.Tests.DualMode.ReceiveMessageFromAsyncV6BoundToSpecificV6_Success() System.Net.Sockets.Tests.DualMode.ConnectAsyncV4IPEndPointToV6Host_Fails [FAIL] Assert.Throws() Failure Expected: typeof(System.Net.Sockets.SocketException) Actual: typeof(Xunit.Sdk.TrueException): Timed out while waiting for connection Expected: True Actual: False Stack Trace: at System.Net.Sockets.Tests.DualMode.DualModeConnectAsync_IPEndPointToHost_Helper(IPAddress connectTo, IPAddress listenOn, Boolean dualModeServer) at System.Net.Sockets.Tests.DualMode.b__55_0() 6239 area-System.Net Commit edbd7ba / PR 6147 is causing test failures in internal TFS builds Regarding: https://github.com/dotnet/corefx/commit/edbd7ba720699bbe20753872ac430f0b3fdaf3a9 (PR #6147) This commit seems to be causing a lot of failures in the internal TFS runs with the exception of this sort: CoreCLR: ``` Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified. File name: 'System.Diagnostics.DiagnosticSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' at System.Net.Http.WinHttpHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.DelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) ``` Net Native: ``` but encountered exception net_http_client_execution_error ---> System.Net.Http.HttpRequestException: net_http_client_execution_error ---> System.TypeInitializationException: TypeInitialization_Type_NoTypeAvailable ---> System.Exception: Method 'DiagnosticListener..ctor(string)' was not included in compilation, but was referenced in HttpHandlerToFilter..cctor(). There may have been a missing assembly. at System.Net.Http.HttpHandlerToFilter..cctor() at System.Runtime.CompilerServices.ClassConstructorRunner.Call(IntPtr pfn) at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(Void* returnValue, StaticClassConstructionContext* pContext, IntPtr pfnCctor) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\ClassConstructorRunner.cs:line 72 Exception_EndOfInnerExceptionStack ``` These are failing from run numbers 23818.00 (ProjectK branch), and private runs (N from K) Exception in more detail: https://gist.github.com/iamjasonp/4f47c687c0a62ff16261 /cc: @davidsh @stephentoub 6240 area-Infrastructure CentOS PR jobs failing with TraceSource FileNotFoundExceptions http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/centos7.1_debug_tst_prtest/2057/consoleFull ``` 01:37:32 System.Diagnostics.TextWriterTraceListenerTests.CtorsDelimiterTests.TestDelimiterProperty [FAIL] 01:37:32 System.IO.FileNotFoundException : Could not load file or assembly 'System.Diagnostics.TraceSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. ``` Some kind of packaging issue? Machine configuration? We're only seeing this I believe on CentOS, and it seems to be happening on every run. cc: @chcosta, @mmitche 6241 area-System.IO FileSystemWatcher_Created_WatcherDoesntFollowSymLinkToFolder failed on OS X and Win10 http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_release_tst_prtest/1052/console ``` 23:01:41 CreatedTests.FileSystemWatcher_Created_WatcherDoesntFollowSymLinkToFolder [FAIL] 23:01:41 Didn't observe a symlink created event within 30000ms 23:01:41 Expected: True 23:01:41 Actual: False 23:01:41 Stack Trace: 23:01:42 at Utility.ExpectEvent(WaitHandle eventOccurred, String eventName, Int32 timeout) 23:01:42 at CreatedTests.FileSystemWatcher_Created_WatcherDoesntFollowSymLinkToFolder() ``` 6242 area-Infrastructure Ubuntu builds failing in CI (lack of diskspace?) e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/nativecomp_ubuntu_debug/628/console ``` 04:24:23 Building remotely on Azure0216060553 (auto-ubuntu1404-20160211) in workspace /mnt/j/workspace/dotnet_corefx/nativecomp_ubuntu_debug 04:24:23 [WS-CLEANUP] Deleting project workspace... 04:24:23 java.io.IOException: Failed to mkdirs: /mnt/j/workspace/dotnet_corefx/nativecomp_ubuntu_debug 04:24:23 at hudson.FilePath.mkdirs(FilePath.java:1163) 04:24:23 at hudson.model.AbstractProject.checkout(AbstractProject.java:1269) 04:24:23 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607) 04:24:23 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 04:24:23 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) 04:24:23 at hudson.model.Run.execute(Run.java:1738) 04:24:23 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 04:24:23 at hudson.model.ResourceController.execute(ResourceController.java:98) 04:24:23 at hudson.model.Executor.run(Executor.java:410) ``` cc: @mmitche, @Priya91 6247 area-System.Net Use nameof for a couple MemberData tests that were missed #3199 added two new `MemberData` tests and was merged after #6209 was opened. This PR simply switches the two new `MemberData` tests over to using `nameof`. 6250 area-System.Net Change CurlHandler to use IOExceptions for Stream failures As with WinHttpHandler, CurlHandler wraps exceptions in HttpRequestException. But WinHttpHandler switches to using IOException when sending exceptions out via Stream.Read/WriteAsync. This change does the same for CurlHandler. This also adds a test for #6231, which was correctly failing on Unix but with the wrong exception type (which is now the correct type with the previous commit). cc: @davidsh, @joelverhagen, @ericeil, @kapilash 6255 area-System.Net SendReceive_PartialMessage_Success failed on Windows in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_debug_prtest/2534/consoleFull ``` 13:13:19 System.Net.WebSockets.Client.Tests.ClientWebSocketTest.SendReceive_PartialMessage_Success(server: wss://corefx-net.cloudapp.net/WebSocket/EchoWebSocket.ashx) [FAIL] 13:13:19 System.Net.Http.WinHttpException : The server returned an invalid or unrecognized response 13:13:19 Stack Trace: 13:13:19 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 13:13:19 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 13:13:19 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() 13:13:19 d:\j\workspace\windows_nt_de---06b7984d\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WinHttpWebSocket.cs(475,0): at System.Net.WebSockets.WinHttpWebSocket.d__32.MoveNext() 13:13:19 --- End of stack trace from previous location where exception was thrown --- 13:13:19 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 13:13:19 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 13:13:19 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() 13:13:19 d:\j\workspace\windows_nt_de---06b7984d\src\System.Net.WebSockets.Client\tests\ClientWebSocketTest.cs(195,0): at System.Net.WebSockets.Client.Tests.ClientWebSocketTest.d__16.MoveNext() 13:13:19 --- End of stack trace from previous location where exception was thrown --- 13:13:19 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 13:13:19 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 13:13:19 --- End of stack trace from previous location where exception was thrown --- 13:13:19 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 13:13:19 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 13:13:19 --- End of stack trace from previous location where exception was thrown --- 13:13:19 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 13:13:19 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 13:13:19 Finished: System.Net.WebSockets.Client.Tests ``` 6258 area-System.Linq Infinite loop in dynamic dispatch code when calling through contravariant delegate When upgrading from 23803 to 23818 of System.Linq.Expression.dll we are now seeing an infinite loop in the dynamic dispatch code. I have not been able to come up with a minimal repro that I can attach to this bug, but I have a trivial one that I can email anyone who wants it. In the bug we are calling into a delegate of type Action<... my-class>, and the target of the delegate uses an interface for the last argument. If I change the delegate to also use an interface, the issue goes away. The infinite loop is in code labeled as 'Lightweight Function' by the managed debugger: `System.Dynamic.Runtime.dll!System.Runtime.CompilerServices.CallSiteBinder.BindCore, string, object, OpenDebug.DispatchResponder>>(System.Runtime.CompilerServices.CallSite, string, object, OpenDebug.DispatchResponder>> site, object[] args) Line 133` <-- This function is called infinately `[Lightweight Function]` **<-- Hang here** `OpenDebugAD7.dll!OpenDebug.DispatcherProtocol.Dispatch(string req)` <-- My code calling delegate.Invoke Looking at the stack in Windbg, I think Windbg gives the method this name: `26 00000027`ac5fec80 0000019d`bcc88cc8 DynamicClass.CallSite.Target(System.Runtime.CompilerServices.Closure, System.Runtime.CompilerServices.CallSite, System.Action'3, System.String, System.Object, OpenDebug.DispatchResponder)+0x2c2` This looks similar to #5610, but I should have the fix for that and I am still seeing the problem. 6262 area-System.Net Simplify locking / extend scope of _queueLock While investigating the test failures due to #6126, we noticed that there are accesses to the operation queues outside of _queueLock. This creates a race with TryBeginOperation, such that beginning a new operation while completing an existing one can corrupt the queue. After extending the scope of _queueLock in HandleEvents, I noticed that it became largely redundant with _closeLock. So we also remove _closeLock, and just use _queueLock for everything. As far as I can tell, the only scenario this will impact is when beginning operations while simultaneously closing the socket, which will have other problems anyway. @stephentoub @pgavlin 6268 area-System.Net PostNonRewindableContentUsingAuth_NoPreAuthenticate_ThrowsInvalidOperationException failed in CI See the failure [here](http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/ubuntu_debug_tst_prtest/2123/testReport/junit/System.Net.Http.Functional.Tests/PostScenarioTest/PostNonRewindableContentUsingAuth_NoPreAuthenticate_ThrowsInvalidOperationException_serverUri__http___corefx_net_cloudapp_net_Echo_ashx_auth_basic_user_user1_password_password1_/). Maybe this is due to a network hiccup? 6269 area-System.Net Improve several areas of CurlHandler error handling While tracking down an issue related to exception handling in CurlHandler, I fixed up a few issues: - On older libcurl's curl_multi_perform can return an error code that means to retry curl_multi_perform, but we were treating it as an actual error. - Several places we were creating an HttpRequestException with a null inner exception, even if we had additional information about the cause. I've fixed those call sites to include an appropriate inner exception. - Cleaned up a few error messages. - Fixed one place where I was overzealous in mapping exceptions to IOException cc: @ericeil, @kapilash Fixes https://github.com/dotnet/corefx/issues/6268 6277 area-System.Net Add more Http response stream tests Building on PR #6250, added more response stream tests dealing with invalid response body transfer semantics. I still plan to move the localhost server (recently added to these Http tests) to be Azure based.in the near future. 6281 area-System.Net Rewrite WebUtility.HtmlEntities to minimize array/substring allocations I was browsing the `WebUtility` source code recently and noticed there a huge static array allocation that was never actually used. In addition to that, all of the strings in the array were being `Substring`'d in a loop to initialize a dictionary, which added even more unnecessary allocations. I [rewrote](https://gist.github.com/jamesqo/dda32f6e7a4154053862) the code so it straight-up initializes the dictionary as a literal, using C# 6's new dictionary initializers feature. The new code also passes in a predefined capacity to the dictionary, so there's no resizing taking place when elements are added. 6285 area-System.Net Fix WinHttpHandler memory leaks The WinHttpHandler was leaking a lot of objects in cases where an explicit Dispose was not done for the various HttpResponseMessage related objects. It was leaking because there was a cycle between the strong GCHandle of WinHttpRequestState and the objects contained within it. To break the cycle, we now clear out object references within WinHttpRequestState that are no longer needed once the SendRequest phase is completed. There was also a leak of a pinned GCHandle and related memory in WinHttpResponseStream. The free'ing of that allocated GCHandle was done in the Dispose(bool disposing) method. However, it wasn't being called when disposing=false (i.e. a finalizer). Since it is a pinned GCHandle, it needed to be freed in all cases. Fixes #5927. 6291 area-System.Net Response stream reads should return error for insufficient data "WinHttpResponseStream was not tracking the amount of data read when the response used 'Content-Length' semantics. So, if the amount of bytes read from the server was less than expected, we did not return an error. This was different behavior than .NET Framework. Fixed WinHttpResponseStream so that it will track the total number of bytes read and compare it to the expected number of bytes if using 'Content-Length' semantics. Note that we don't do this checking if the HTTP request is a HEAD request. That is because the definition of that HTTP verb is to return headers ""as-if"" it was returning a real response body. So, the 'Content-Length' might be set but there is no response body for a HEAD request. For cases of using 'Transfer-Encoding: chunked' semantics for the response body, there is already error checking at the lower HTTP layer in WinHTTP. Fixes #6231. " 6302 area-System.Security PublicKeyTests.TestKey_RSA failure on Unix in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/centos7.1_release_tst_prtest/1959/console ``` 17:10:15 System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests.TestKey_RSA [FAIL] 17:10:15 Assert.Equal() Failure 17:10:15 Expected: Byte[] [232, 175, 92, 162, 32, ...] 17:10:15 Actual: Byte[] [0, 0, 0, 0, 0, ...] 17:10:15 Stack Trace: 17:10:16 at System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests.TestKey_RSA() ``` 6306 area-System.Net System.Net.Sockets.APMServer.Tests Hang on OSX in CI The [test run hung](http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_debug_tst_prtest/1251/console) and the job was aborted. > Build timed out (after 120 minutes). Marking the build as aborted. > 22:43:45 ./run-test.sh: line 131: 529 Terminated: 15 ./corerun xunit.console.netcore.exe $testDllName -xml testResults.xml -notrait category=failing -notrait category=OuterLoop -notrait category=$xunitOSCategory -notrait Benchmark=true > 22:43:45 error: One or more tests failed while running tests from 'System.Net.Sockets.APMServer.Tests'. Exit code 143. 6308 area-System.Numerics Additional overloads in some System.Math methods to support more types NOTE: I wrote a first ticket in CoreCLR (https://github.com/dotnet/coreclr/issues/3204), even did a PR for `int.Round` (https://github.com/dotnet/coreclr/pull/3232); but I have been suggested to move it here. For the time being, I will keep some additional comments in that CoreCLR issue, so you might want to take a look there. `Math.Round` can only deal with `decimal` and `double` arguments, what is quite arbitrary as far as these functionalities might also be used with integer types (e.g., `int` or `long`). There is no difference between removing all the digits after 6 in 1.5658 and in 15658, but .NET treats both situations differently. In the first case, it is possible to use `Math.Round` right away; in the second case, two additional steps would be required: either converting to a decimal type or to string and use `Substring`; and then back to the original integer type. Other function with restricted input types is `Math.Pow` which only accepts `double` type inputs. I have been in quite a few scenarios where I had to convert `decimal` variables to `double` (and then back to `decimal`) just to use this function. Equivalent ideas are applicable to other `System.Math` methods which only work with `double` variables. In case of deciding to go ahead and by assuming that such an option is possible, I would like to take care of the actual (in-principle-C#) implementation myself. 6309 area-System.Threading RunAsyncTaskAwaiterTests failed in OuterLoop CI on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_win10_debug/97/consoleFull ``` 22:53:45 System.Threading.Tasks.Tests.TaskAwaiterTests.RunAsyncTaskAwaiterTests [FAIL] 22:53:45 After completion, excepted all GetResult calls to completed successfully 22:53:45 Expected: True 22:53:45 Actual: False 22:53:45 Stack Trace: 22:53:52 d:\j\workspace\outerloop_win---0cba2915\src\System.Threading.Tasks\tests\System.Runtime.CompilerServices\TaskAwaiterTests.cs(204,0): at System.Threading.Tasks.Tests.TaskAwaiterTests.RunAsyncTaskAwaiterTests() ``` 6311 area-System.Net DnsEndPointTest.Socket_StaticConnectAsync_HostNotFound timed out in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/rhel7.2_debug_tst/38/console ``` 08:17:47 System.Net.Sockets.Tests.DnsEndPointTest.Socket_StaticConnectAsync_HostNotFound [FAIL] 08:17:47 Timed out while waiting for connection 08:17:47 Expected: True 08:17:47 Actual: False 08:17:47 Stack Trace: 08:17:47 at System.Net.Sockets.Tests.DnsEndPointTest.Socket_StaticConnectAsync_HostNotFound() ``` 6312 area-System.Net [Apline] Need a better approach to fix CMSG_NXTHDR on Alpine Linux (musl-libc) The current master ([`5b793bc`](https://github.com/dotnet/corefx/tree/5b793bc735d6a63b7f4be466df3351008b27a426)) breaks the native build (`corefx/build.sh native`) at 70% on Alpine Linux with the following error: ``` ash /root/corefx/src/Native/System.Native/pal_networking.cpp:1311:31: error: cast from 'unsigned char *' to 'struct cmsghdr *' increases required alignment from 1 to 4 [-Werror,-Wcast-align] controlMessage = CMSG_NXTHDR(&header, controlMessage)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/socket.h:267:10: note: expanded from macro 'CMSG_NXTHDR' ((struct cmsghdr *)__CMSG_NEXT(cmsg)))) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` Code comparison between glibc and musl-libc: - musl-libc: https://fossies.org/dox/musl-1.1.14/include_2sys_2socket_8h.html#a4f70853d9633fb80428189cd7bb292d0 (click on `__CMSG_NEXT` in that macro to see `unsigned char*` cast) - glibc: http://lxr.free-electrons.com/source/include/linux/socket.h#L89 (click on `__cmsg_nxthdr` in the called macro to notice that it returns `cmsghdr *`) https://github.com/dotnet/corefx/pull/6263 provides a workaround to turn that warning off inline for this particular call to macro and then restores it using Clang's `pragma`tic directives. The warning disabling only affects the musl-libc systems (enclosed by `#ifndef __GLIBC__`). This probably needs to be fixed upstream. cc @pgavlin, @benpye, @ncopa 6313 area-System.Globalization Is DateTimeFormatInfo.ReadOnly(readonlyDtfi) sameness guaranteed? "In reviewing the test refactoring for DateTimeFormatInfo, I was about to ask if the test for ReadOnly should be asserting NotSame, Same, or a contextual-version thereof. MSDN doesn't describe; I can certainly see what the implementation does; but the question is: ""is the sameness guaranteed?"" If so, we should test it. If we guarantee it's a copy when !IsReadOnly then we should assert NotSame, and then mutuate the original and see that it's not preserved. NotSame on !IsReadOnly => IsReadOnly seems like a pretty obvious guarantee to me (and that it's not receptive to mutation on the original), but since I wasn't sure about the already-is-read-only case I decided that a standalone issue was probably best. " 6315 area-System.Runtime new Guid(byte[]) should explicitly test byte ordering The only tests for the byte array ctor for Guid use Guid.ToByteArray and round-trip the value. While this is good (proving we read what we write), there is an order to that input byte array, and we should verify it against a static array / static GUID. 6316 area-System.Runtime Guid.TryParseExact throws FormatException for certain inputs "## TryParseExact with hex specifier ""X"" or TryParse - `Guid.TryParseExact(input, ""X"")` - `Guid.TryParse(input)` The following values of `input` throw a FormatException: - `{0xdddddddd, 0xdddd, 0xdddd,{0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd}}` - `{0xdddddddd, 0xdddd, 0xdddd,{0xdd0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd}}` - `{0xdddddddd, 0xdddd, 0xdddd,{0xdd,0xdd,0xdd0xdd,0xdd,0xdd,0xdd,0xdd}}` - `{0xdddddddd, 0xdddd, 0xdddd,{0xdd,0xdd,0xdd,0xdd0xdd,0xdd,0xdd,0xdd}}` - `{0xdddddddd, 0xdddd, 0xdddd,{0xdd,0xdd,0xdd,0xdd,0xdd0xdd,0xdd,0xdd}}` - `{0xdddddddd, 0xdddd, 0xdddd,{0xdd,0xdd,0xdd,0xdd,0xdd,0xdd0xdd,0xdd}}` Interestingly, `{0xdddddddd, 0xdddd, 0xdddd,{0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd0xdd}}` does NOT throw This seems to be due to incorrect parsing of `0xdd0xdd` These do not throw for any other specifiers " 6318 area-System.Collections What about adding a ConcurrentSet? The need for it comes up every now and then. To me it would make sense next to `ConcurrentDictionary` 6321 area-System.Runtime TaskAwaiterTests.OnCompleted_CompletesInAnotherTaskScheduler failed in CI It looks like a few of these new test cases hit some issue on an OSX release run: http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_release_tst_prtest/1222/ Four of the six test cases failed, but the other two passed. It looks like it's intermittent as other recent runs have succeeded. The assertion hit is on line 114, and indicates that the task wasn't run on the other scheduler, when it should have been. @stephentoub 6322 area-System.Net Reduce CurlHandler header parse allocations Use existing known header and reason phrase instances instead of always allocating new strings (similar to #3199 for WinHttpHandler) and avoid unnecessary intermediate string allocations. cc: @stephentoub, @kapilash, @davidsh (@stephentoub, is there a good way to profile the allocations for a before/after comparison on Unix?) Note: I only tested this on OS X as I didn't have a Linux environment readily available; relying on CI for the other *nixes. 6329 area-System.Net Use a random password for NegotiateStream Kerberos tests This is with reference to https://github.com/dotnet/corefx/pull/6158#discussion_r53619572 Instead of hardcoding the password in setup-kdc.sh a random password can be generated which can be shared with the test code. This would improve the security of a dev machine where the script is run 6331 area-System.Xml XmlWriterApi TCEOFHandling test failing on Unix It's not handling new lines properly. 6333 area-Infrastructure GenerateRuntimeDependencies failed in CI due to runtime.json file "http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_win10_debug/99/consoleFull ``` d:\j\workspace\outerloop_win---0cba2915\Tools\Packaging.targets(707,5): error MSB4018: The ""GenerateRuntimeDependencies"" task failed unexpectedly. [d:\j\workspace\outerloop_win---0cba2915\src\System.Net.Primitives\pkg\System.Net.Primitives.pkgproj] 07:11:23 d:\j\workspace\outerloop_win---0cba2915\Tools\Packaging.targets(707,5): error MSB4018: System.IO.IOException: The process cannot access the file 'd:\j\workspace\outerloop_win---0cba2915\bin\pkg\specs\System.Net.Primitives\runtime.json' because it is being used by another process. [d:\j\workspace\outerloop_win---0cba2915\src\System.Net.Primitives\pkg\System.Net.Primitives.pkgproj] 07:11:23 d:\j\workspace\outerloop_win---0cba2915\Tools\Packaging.targets(707,5): error MSB4018: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) [d:\j\workspace\outerloop_win---0cba2915\src\System.Net.Primitives\pkg\System.Net.Primitives.pkgproj] 07:11:23 d:\j\workspace\outerloop_win---0cba2915\Tools\Packaging.targets(707,5): error MSB4018: at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) [d:\j\workspace\outerloop_win---0cba2915\src\System.Net.Primitives\pkg\System.Net.Primitives.pkgproj] 07:11:23 d:\j\workspace\outerloop_win---0cba2915\Tools\Packaging.targets(707,5): error MSB4018: at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) [d:\j\workspace\outerloop_win---0cba2915\src\System.Net.Primitives\pkg\System.Net.Primitives.pkgproj] 07:11:23 d:\j\workspace\outerloop_win---0cba2915\Tools\Packaging.targets(707,5): error MSB4018: at System.IO.FileStream..ctor(String path, FileMode mode) [d:\j\workspace\outerloop_win---0cba2915\src\System.Net.Primitives\pkg\System.Net.Primitives.pkgproj] 07:11:23 d:\j\workspace\outerloop_win---0cba2915\Tools\Packaging.targets(707,5): error MSB4018: at Microsoft.DotNet.Build.Tasks.Packaging.RuntimeFileFormatter.WriteRuntimeFile(String filePath, RuntimeFile runtimeFile) [d:\j\workspace\outerloop_win---0cba2915\src\System.Net.Primitives\pkg\System.Net.Primitives.pkgproj] 07:11:23 d:\j\workspace\outerloop_win---0cba2915\Tools\Packaging.targets(707,5): error MSB4018: at Microsoft.DotNet.Build.Tasks.Packaging.GenerateRuntimeDependencies.Execute() [d:\j\workspace\outerloop_win---0cba2915\src\System.Net.Primitives\pkg\System.Net.Primitives.pkgproj] 07:11:23 d:\j\workspace\outerloop_win---0cba2915\Tools\Packaging.targets(707,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [d:\j\workspace\outerloop_win---0cba2915\src\System.Net.Primitives\pkg\System.Net.Primitives.pkgproj] 07:11:23 d:\j\workspace\outerloop_win---0cba2915\Tools\Packaging.targets(707,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() [d:\j\workspace\outerloop_win---0cba2915\src\System.Net.Primitives\pkg\System.Net.Primitives.pkgproj] ``` " 6338 area-System.Numerics Complex.Equals(object) and Complex.Equals(Complex) do not always return the same result ## Context Complex provides 3 main ways of testing equality of a complex: - `Complex.Equals(Complex)` - `Complex.Equals(object)` - `==(Complex, Complex)` ## Problem ``` public override bool Equals(object obj) { if (!(obj is Complex)) return false; return this == ((Complex)obj); // Problem is here. } public bool Equals(Complex value) { return _real.Equals(value._real) && _imaginary.Equals(value._imaginary); } public static bool operator ==(Complex left, Complex right) { return left._real == right._real && left._imaginary == right._imaginary; } ``` The problem is that `Equals(object)` calls the `==` operator instead of the `Equals(Complex)` method. Note that the `==` operator and `Equals(Complex)` method have different code, and this causes discrepancies. The problem mainly occurs with complex numbers containing `double.NaN`, as `double.NaN == double.NaN` returns `false`, but `double.NaN.Equals(double.NaN)` returns `true`. ## Example As such, we get a strange example where the following code doesn't work as expected: ``` Complex complex1 = new Complex(double.NaN, double.NaN); Complex complex2 = new Complex(double.NaN, double.NaN); complex1.Equals(complex2); // True as expected complex1.Equals((object)complex2); // False as unexpected complex1 == complex2; // False as expected ``` ## Solution Fix the implementation of `Equals(object)` to the following: ``` public override bool Equals(object obj) { if (!(obj is Complex)) return false; return Equals((Complex)obj); } ``` This may have breaking change implications, but IMO should be fixed. I would be happy to send in a PR fixing this. 6345 area-System.Net Stability improvements for *nix Sockets This PR contains the changes from #6126 and #6186, plus fixes for issues with both of those PRs. #6126 had to be reverted, so this undoes the revert and fixes the issues that were leading to tests crashing/hanging. #6186 turns out to fix one reason tests were crashing/hanging, so it needs to be folded into this PR prior to merging. @pgavlin @stephentoub Fixes #5750 Fixes #6173 Fixes #4563 Fixes #4890 Fixes #5628 Fixes #6311 Fixes #6306 Fixes #6154 6347 area-Meta Add template for issues and pull requests Fixes #6167. @weshaggard @stephentoub @GerjanOnline Follows GitHub's suggestion documented here: - [Issue Templates](https://help.github.com/articles/creating-an-issue-template-for-your-repository/) - [Pull Request Templates](https://help.github.com/articles/creating-a-pull-request-template-for-your-repository/) 6351 area-System.Net Bug setting host to partial IPV6 address in UriBuilder "## Problem This is the code for the setter of a host in UriBuilder: ```c# public string Host { get { return _host; } set { if (value == null) value = string.Empty; _host = value; //probable ipv6 address - Note: this is only supported for cases where the authority is inet-based. if (_host.IndexOf(':') >= 0) { //set brackets if (_host[0] != '[') _host = ""["" + _host + ""]""; } _changed = true; } } ``` The setter for `UriBuilder.Host` checks to see if an IPV6 address has been provided. It follows the following alogrithm - If the host is an IPV6 address and has does not start with a square bracket, add square brackets around the host. The problem occurs when the host already has a square bracket at the end, but not at the start. ## Example ``` UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = ""::1]""; uriBuilder.Host; // Expects ""[::1]"" but gets: ""[::1]]"" ``` ## Solution Change the code to: ``` if (_host[0] != '[') _host = ""["" + _host; if (_host[host.Length - 1] != ']') _host = _host + ""]"" ``` This does have breaking change implications, and may be considered an unnecessary change, as the input host string is invalid, so strange behavior could be expected. If fixing this seems like a good idea, I will submit a PR fixing it." 6352 area-System.Net Fix binclash in System.Net.Primitives cc @ericstj, @stephentoub 6353 area-System.Net UriBuilder needs some tests ## Problem UriBuilder currently does not have any tests in corefx. This means that changes to the class cannot be tested (especially if issues like #6351 and #3646 are fixed). Furthermore, it reduces the coverage report for System.Private.Uri. ## Solution I have sent a PR with a complete set of tests covering 100% of UriBuilder. This is PR #6354 6354 area-System.Net Add Uri Builder tests - Cleans up some dead code from UriBuilder. - Adds tests for all members of UriBuilder, bringing code coverage up to 100%. Fixes #6353 /cc @davidsh @stephentoub 6355 area-System.Data NullReferenceException in SmiMetaData.cs when running DataStreamTest System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_nwnd10SqlClient [FAIL] System.NullReferenceException : Object reference not set to an instance of an object. Stack Trace: D:\CoreFX\src\System.Data.SqlClient\src\Microsoft\SqlServer\Server\SmiMetaData.cs(294,0): at Microsoft.SqlServer.Server.SmiMetaData..ctor(SqlDbType dbType, Int64 maxLength, Byte precision, Byte scale, Int64 localeId, SqlCompareOptions compareOptions, String udtAssemblyQualifiedName, Boolean isMultiValued, IList`1 fieldTypes, SmiMetaDataPropertyCollection extendedProperties) D:\CoreFX\src\System.Data.SqlClient\src\Microsoft\SqlServer\Server\SmiMetaData.cs(568,0): at Microsoft.SqlServer.Server.SmiExtendedMetaData..ctor(SqlDbType dbType, Int64 maxLength, Byte precision, Byte scale, Int64 localeId, SqlCompareOptions compareOptions, String udtAssemblyQualifiedName, Boolean isMultiValued, IList`1 fieldMetaData, SmiMetaDataPropertyCollection extendedProperties, String name, String typeSpecificNamePart1, String typeSpecificNamePart2, String typeSpecificNamePart3) D:\CoreFX\src\System.Data.SqlClient\src\Microsoft\SqlServer\Server\SmiMetaData.cs(535,0): at Microsoft.SqlServer.Server.SmiExtendedMetaData..ctor(SqlDbType dbType, Int64 maxLength, Byte precision, Byte scale, Int64 localeId, SqlCompareOptions compareOptions, Boolean isMultiValued, IList`1 fieldMetaData, SmiMetaDataPropertyCollection extendedProperties, String name, String typeSpecificNamePart1, String typeSpecificNamePart2, String typeSpecificNamePart3) D:\CoreFX\src\System.Data.SqlClient\src\Microsoft\SqlServer\Server\SmiMetaData.cs(743,0): at Microsoft.SqlServer.Server.SmiStorageMetaData..ctor(SqlDbType dbType, Int64 maxLength, Byte precision, Byte scale, Int64 localeId, SqlCompareOptions compareOptions, Boolean isMultiValued, IList`1 fieldMetaData, SmiMetaDataPropertyCollection extendedProperties, String name, String typeSpecificNamePart1, String typeSpecificNamePart2, String typeSpecificNamePart3, SqlBoolean isKey) D:\CoreFX\src\System.Data.SqlClient\src\Microsoft\SqlServer\Server\SmiMetaData.cs(793,0): at Microsoft.SqlServer.Server.SmiQueryMetaData..ctor(SqlDbType dbType, Int64 maxLength, Byte precision, Byte scale, Int64 localeId, SqlCompareOptions compareOptions, Boolean isMultiValued, IList`1 fieldMetaData, SmiMetaDataPropertyCollection extendedProperties, String name, String typeSpecificNamePart1, String typeSpecificNamePart2, String typeSpecificNamePart3, SqlBoolean isKey) D:\CoreFX\src\System.Data.SqlClient\src\System\Data\SqlClient\SqlDataReader.cs(301,0): at System.Data.SqlClient.SqlDataReader.GetInternalSmiMetaData() D:\CoreFX\src\System.Data.SqlClient\src\System\Data\SqlClient\SqlCommand.cs(1259,0): at System.Data.SqlClient.SqlCommand.CompleteXmlReader(SqlDataReader ds, Boolean async) D:\CoreFX\src\System.Data.SqlClient\src\System\Data\SqlClient\SqlCommand.cs(1122,0): at System.Data.SqlClient.SqlCommand.ExecuteXmlReader() D:\CoreFX\src\System.Data.SqlClient\tests\ManualTests\SQL\DataStreamTest\DataStreamTest.cs(555,0): at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.ExecuteXmlReaderTest(String connectionString) D:\CoreFX\src\System.Data.SqlClient\tests\ManualTests\SQL\DataStreamTest\DataStreamTest.cs(60,0): at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer(String connectionString, Boolean usingNamePipes) D:\CoreFX\src\System.Data.SqlClient\tests\ManualTests\SQL\DataStreamTest\DataStreamTest.cs(44,0): at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_nwnd10SqlClient() 6361 area-Infrastructure BinClash logger doesn't detect clash if PkgProj doesn't set TargetPath BinClash logger doesn't catch a clash if PkgProj's don't set TargetPath. See https://github.com/dotnet/corefx/pull/6352 6370 area-System.Net Add Uri tests The tests for Uri were previously pretty poor, but I am aware that the internal tests are more comprehensive. Therefore, there is no harm in improving the tests in the open. This PR overhauls the existing test framework for System.Uri. Existing tests, albeit far and few between, were combined into the new, and should be easy to find. Old Coverage: 41% line, 35% branch New Coverge: 72.8% line, 67.3% branch **Increase: 77% line, 92% branch** This lets us achieve the following improvements: - Easier to add new tests, especially for the constructors and methods following the template I provided - Split between test data and test code - New tests across the board: creating both valid and invalid IPV4, IPV6, UNC, File, Relative, URN and Unknown uris was the main focus. This PR has no functional changes /cc @stephentoub @davidsh 6371 area-System.Threading Reset certain thread-local state after thread pool work item execution "It can sometimes happen by accident that a thread pool work item sets some thread-local state such as: - SynchronizationContext.Current - HostContext (used for HttpContext.Current) - Thread priority - Thread name - Thread culture - Thread principal - Others? Failing to reset that state causes non-deterministic ""leaks"" that are very hard to diagnose. This is especially relevant in ASP.NET and in unit testing scenarios. The thread pool is a global process resource. Generally, code should play nice with such resources but bugs should not be catastrophic. The .NET thread pool should reset all of these items (where practical) after the execution of each work item. I see no valid scenario why someone might want to set these values and have them persist because there is no way to make that deterministic. Regarding the above items I could not find documentation that specifies which one of them are reset or are not reset. This behavior should be documented and contractually guaranteed. Ideally, setting `Thread` properties should fail outright but that might not be possible for compatibility reasons. The behavior changes proposed here should work for the legacy thread pool API as well as for the TPL. I have not added the execution context and logical call context to the list because I lack the technical understanding to recommend anything about them. Maybe they should be reset as well. I have not added `ThreadStatic` and other forms of thread-static variables because those are often useful for caching scenarios. Resetting them would be a bad idea. " 6373 area-System.Security Followup on imported TODOs in CapiHelper CapiHelper.cs was migrated in with several TODOs. Many of them are being removed right now, but there are three that are going to survive immediate pending changes: CapiHelper.GetKeyParameter: > //ToDO : Check if we should use silent flag here as this might not run > //downlevel so we might want to use silent flag CapiHelper.ValidateCspFlags: > //TODO : I don't think we need following commented code. Leaving it now for confirming the same > // during code review. Reviewers please let me kn know? CapiHelper.DecryptKey: > Array.Reverse(dataTobeDecrypted); //ToDO: Check is this is really needed? To be confirmed with tests - [ ] GetKeyParameter - [ ] ValidateCspFlags - [ ] DecryptKey 6374 area-System.Globalization When does core clr throw CultureNotSupported exception? "On windows, `new CultureInfo(""zh-CHS"")` or `new CultureInfo(""Shared"")` (bogus name) throw a CultureNotFoundException. On OSX they don't. However, ""zh-CHS"" was obtained by calling `CultureInfo.GetCultures(CultureTypes.AllCultures)` on full framework. reading #1669 I get the understanding that any string is now fair game and should be supported. In light of this, when can one expect CultureNotFoundException and why is zh-CHS not recognized on windows, when the full framework API returns it as supported? " 6375 area-System.Data Failing test with Japanese characters in SqlTypeTest.SqlStringValidComparisonTest on Linux System.Data.SqlClient.ManualTesting.Tests.SqlTypeTest.SqlStringValidComparisonTest [FAIL] Error (Default Comparison Option with Operator): ファズ・ギター and ファズ・ギター should be equal Expected: True Actual: False Stack Trace: at System.Data.SqlClient.ManualTesting.Tests.SqlTypeTest.SqlStringDefaultCompareOptionTest(Int32 localeID) at System.Data.SqlClient.ManualTesting.Tests.SqlTypeTest.SqlStringValidComparisonTest() 6377 area-System.Console Delete key on OS X not interpreted as `Backspace` "> `Key` is a `ConsoleKey`, `^X` is a key code, 'key' is an `stty` special character, and ""key"" is a physical keyboard key On OS X, with `TERM=xterm256color` when the system Terminal is left to its defaults, the ""delete"" key (used as ""backspace"") sends `^?`, which according to `stty -a` ought to be interpreted as 'erase' (as in the backspace action, or `Backspace`), but instead gets interpreted by `Console.ReadKey()` as `Delete` (as in the forward delete action). Note that ""fn-delete"" is interpreted the same way (but _should_ be the only one interpreted this way). On Linux (over SSH and RDP), with the same `TERM`, the key code being sent by my MacBook's ""delete"" key still ends up as `^?`, but it is interpreted correctly as `Backspace`. `System.Console` is not the only place where I've seen OS X's Terminal defaults cause funny things with the ""delete"" key. In fact, it seems to be so much an issue that Terminal has a setting to have ""delete"" send `^H`, which is then interpreted as `Backspace`. However, it would be nice not to have to do this :smile: and I sure would like to know how to fix it. " 6381 area-System.Data Incorrect number of pools in ConnectionPool.ClearAllPoolsTest System.Data.SqlClient.ManualTesting.Tests.ConnectionPool.ConnectionPool_Nwnd9Mars [FAIL] Incorrect number of pools exist Expected: True Actual: False Stack Trace: at System.Data.SqlClient.ManualTesting.Tests.ConnectionPool.ClearAllPoolsTest(String connectionString) at System.Data.SqlClient.ManualTesting.Tests.ConnectionPool.RunDataTestForSingleConnString(String tcpConnectionString, String npConnectionString, Boolean serverIsKatmaiOrLater) at System.Data.SqlClient.ManualTesting.Tests.ConnectionPool.ConnectionPool_Nwnd9Mars() 6382 area-System.Data Exception caused by connection closed in DDAsyncTest on Linux System.Data.SqlClient.ManualTesting.Tests.DDAsyncTest.ExecuteCommand_WithSharedConnection_ShouldPerformAsyncByDefault [FAIL] System.AggregateException : One or more errors occurred. (Invalid operation. The connection is closed.) ---- System.InvalidOperationException : Invalid operation. The connection is closed. Stack Trace: at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout) at System.Threading.Tasks.Task.WaitAll(Task[] tasks) at System.Data.SqlClient.ManualTesting.Tests.DDAsyncTest.ExecuteCommand_WithSharedConnection_ShouldPerformAsyncByDefault() ----- Inner Stack Trace ----- at System.Data.SqlClient.SqlConnection.GetOpenTdsConnection() at System.Data.SqlClient.SqlCommand.WaitForAsyncResults(IAsyncResult asyncResult) at System.Data.SqlClient.SqlCommand.InternalEndExecuteReader(IAsyncResult asyncResult, String endMethod) at System.Data.SqlClient.SqlCommand.EndExecuteReaderInternal(IAsyncResult asyncResult) at System.Data.SqlClient.SqlCommand.EndExecuteReaderAsync(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 6383 area-System.Data StateObj still has outstanding writes in AsyncTest.FailureTest System.Data.SqlClient.ManualTesting.Tests.AsyncTest.FailureTest [FAIL] FAILED: Thrown exception for ExecuteReaderAsync was not an InvalidOperationException: System.Diagnostics.Debug+DebugAssertException: StateObj still has outstanding async writes ``` at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) at System.Data.SqlClient.TdsParserStateObject.AssertStateIsClean() at System.Data.SqlClient.TdsParser.PutSession(TdsParserStateObject session) at System.Data.SqlClient.TdsParserStateObject.CloseSession() at System.Data.SqlClient.SqlCommand.PutStateObject() at System.Data.SqlClient.SqlCommand.ReliablePutStateObject() at System.Data.SqlClient.SqlCommand.BeginExecuteReaderInternal(CommandBehavior behavior, AsyncCallback callback, Object stateObject, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.BeginExecuteReaderAsync(CommandBehavior behavior, AsyncCallback callback, Object stateObject) at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl[TArg1](Func`4 beginMethod, Func`2 endFunction, Action`1 endAction, TArg1 arg1, Object state, TaskCreationOptions creationOptions) at System.Threading.Tasks.TaskFactory`1.FromAsync[TArg1](Func`4 beginMethod, Func`2 endMethod, TArg1 arg1, Object state) at System.Data.SqlClient.SqlCommand.ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at System.Data.SqlClient.SqlCommand.ExecuteReaderAsync() at System.Data.SqlClient.ManualTesting.Tests.AsyncTest.FailureTest() ``` 6384 area-Infrastructure Lots of restore errors in various corefx builds "e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_debug_prtest/2746/consoleFull ``` 17:26:53 [01:26:53.91] Restoring all packages... 17:52:45 EXEC : error : Unable to resolve runtime.win7.System.Net.Requests (>= 4.0.11-rc3-23818) for DNXCore,Version=v5.0 (win7-x64). [d:\j\workspace\windows_nt_de---06b7984d\build.proj] 17:52:45 EXEC : error : Unable to resolve runtime.win7.System.Net.Requests (>= 4.0.11-rc3-23818) for DNXCore,Version=v5.0 (win7-x86). [d:\j\workspace\windows_nt_de---06b7984d\build.proj] 18:10:00 d:\j\workspace\windows_nt_de---06b7984d\build.proj(54,5): error MSB3073: The command """"d:\j\workspace\windows_nt_de---06b7984d\Tools/dotnetcli/bin/dotnet.exe"" restore --packages ""d:\j\workspace\windows_nt_de---06b7984d\packages"" --source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json --source https://dotnet.myget.org/F/dotnet-corefxtestdata/api/v3/index.json --source https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json --source https://www.nuget.org/api/v2/ ""d:\j\workspace\windows_nt_de---06b7984d\/src"" ""d:\j\workspace\windows_nt_de---06b7984d\/pkg"""" exited with code 1. 18:10:00 [02:10:01.03] Restoring all packages...Done. 18:10:08 Microsoft.CSharp -> d:\j\workspace\windows_nt_de ``` http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/ubuntu_debug_bld/654/consoleFull ``` 17:33:13 [01:33:12.87] Restoring all packages... 18:01:04 EXEC : error : Unable to resolve runtime.unix.System.Diagnostics.Debug (>= 4.0.11-rc3-23818) for DNXCore,Version=v5.0 (osx.10.10-x64). [d:\j\workspace\ubuntu_debug_bld736a750a\build.proj] 18:01:04 EXEC : error : Unable to resolve runtime.unix.System.Diagnostics.Debug (>= 4.0.11-rc3-23818) for DNXCore,Version=v5.0 (ubuntu.14.04-x64). [d:\j\workspace\ubuntu_debug_bld736a750a\build.proj] 18:06:29 d:\j\workspace\ubuntu_debug_bld736a750a\build.proj(54,5): error MSB3073: The command """"d:\j\workspace\ubuntu_debug_bld736a750a\Tools/dotnetcli/bin/dotnet.exe"" restore --packages ""d:\j\workspace\ubuntu_debug_bld736a750a\packages"" --source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json --source https://dotnet.myget.org/F/dotnet-corefxtestdata/api/v3/index.json --source https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json --source https://www.nuget.org/api/v2/ ""d:\j\workspace\ubuntu_debug_bld736a750a\/src"" ""d:\j\workspace\ubuntu_debug_bld736a750a\/pkg"""" exited with code 1. 18:06:29 [02:06:28.82] Restoring all packages...Done. ``` http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/ubuntu_debug_bld/654/consoleFull ``` 16:00:21 [00:00:20.19] Restoring all packages... 16:04:57 EXEC : error : Unable to resolve runtime.unix.System.IO.Pipes (>= 4.0.0-rc3-23818) for DNXCore,Version=v5.0 (centos.7-x64). [d:\j\workspace\outerloop_win---9c9e7d59\build.proj] 16:04:57 EXEC : error : Unable to resolve runtime.unix.System.IO.Pipes (>= 4.0.0-rc3-23818) for DNXCore,Version=v5.0 (debian.8.2-x64). [d:\j\workspace\outerloop_win---9c9e7d59\build.proj] 16:04:57 EXEC : error : Unable to resolve runtime.unix.System.IO.Pipes (>= 4.0.0-rc3-23818) for DNXCore,Version=v5.0 (osx.10.10-x64). [d:\j\workspace\outerloop_win---9c9e7d59\build.proj] 16:04:57 EXEC : error : Unable to resolve runtime.unix.System.IO.Pipes (>= 4.0.0-rc3-23818) for DNXCore,Version=v5.0 (rhel.7-x64). [d:\j\workspace\outerloop_win---9c9e7d59\build.proj] 16:04:57 EXEC : error : Unable to resolve runtime.unix.System.IO.Pipes (>= 4.0.0-rc3-23818) for DNXCore,Version=v5.0 (ubuntu.14.04-x64). [d:\j\workspace\outerloop_win---9c9e7d59\build.proj] 16:18:49 d:\j\workspace\outerloop_win---9c9e7d59\build.proj(54,5): error MSB3073: The command """"d:\j\workspace\outerloop_win---9c9e7d59\Tools/dotnetcli/bin/dotnet.exe"" restore --packages ""d:\j\workspace\outerloop_win---9c9e7d59\packages"" --source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json --source https://dotnet.myget.org/F/dotnet-corefxtestdata/api/v3/index.json --source https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json --source https://www.nuget.org/api/v2/ ""d:\j\workspace\outerloop_win---9c9e7d59\/src"" ""d:\j\workspace\outerloop_win---9c9e7d59\/pkg"""" exited with code 1. 16:18:49 [00:18:48.65] Restoring all packages...Done. ``` These are happening frequently but randomly and taking out a lot of runs. cc: @weshaggard, @chcosta, @ericstj " 6388 area-System.Runtime TickCountTest failed on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_release_prtest/2762/consoleFull ``` 05:28:29 System.Tests.EnvironmentTickCount.TickCountTest [FAIL] 05:28:29 Assert+WrapperXunitException : File path: d:\j\workspace\windows_nt_re---5067c899\src\System.Runtime.Extensions\tests\System\Environment.TickCount.cs. Line: 16 05:28:29 ---- Assert.True() Failure 05:28:29 Expected: True 05:28:29 Actual: False 05:28:29 Stack Trace: 05:28:29 d:\j\workspace\windows_nt_re---5067c899\src\Common\tests\System\Diagnostics\AssertWithCallerAttributes.cs(583,0): at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber) 05:28:29 d:\j\workspace\windows_nt_re---5067c899\src\Common\tests\System\Diagnostics\AssertWithCallerAttributes.cs(578,0): at Assert.True(Boolean condition, String userMessage, String path, Int32 line) 05:28:29 ----- Inner Stack Trace ----- 05:28:29 d:\j\workspace\windows_nt_re---5067c899\src\Common\tests\System\Diagnostics\AssertWithCallerAttributes.cs(571,0): at Assert.True(Boolean condition, String userMessage, String path, Int32 line) ``` 6392 area-System.Net Fix memory leak caused by cycle reference in WinHttpRequestState The fix made in PR #6285 for this memory leak turned out to be insufficient. The request handle object for the stream (SafeWinHttpHandle) was part of the strong root chain in WinHttpRequestState. And even when the WinHttpResponseStream object was finalized (implicit Dispose), the request handle was not finalized and thus leaks were happening. To address this, the request handle object reference is now cleared from the WinHttpRequestState object (along with other object references) once the WinHttpResponseStream is created. WinHttpResponseStream then gets passed the request handle reference. Then normal finalizer rules can apply to both WinHttpResponseStream and the request handle. Once the request handle gets disposed (via finalizing), native WinHTTP will send a final status callback (HANDLE_CLOSING) and that is how the state object will then get unrooted and freed. Tested this fix with WCF streaming scenarios and used WinDBG to verify the heaps. There are future plans to improve this code via refactoring as part of #2501. Fixes #5927. 6393 area-Infrastructure Reduce the number of feeds we use for restoring our repo "Currently have 4 feeds in our feed source list: https://github.com/dotnet/corefx/blob/master/dir.props#L101 ``` ``` We should eliminate corefxtestdata and buildtools from our normal source list to reduce the amount of network traffic we are doing when restoring. Note we should still keep the build-tools feed in our init-tools.cmd (https://github.com/dotnet/corefx/blob/master/init-tools.cmd#L12) but it shouildn't be needed for anything outside of the tool set initialization. " 6394 area-System.Net Increase linger time in SendRecvAsync tests These tests are failing with an OperationAborted status code on OSX, very rarely. I can't reproduce the problem locally, even if I try to artifically induce the failure. I'm guessing that the timing works out differently on the CI machines, making this (somewhat) more likely, and the only legitimate case I can see where this would happen is if the client closes the TCP connection before the server has finished reading all bytes. Increasing the linger time should help with that, so let's give it a try. Fixes #5750. @pgavlin, @stephentoub, @CIPop 6397 area-Infrastructure Consider making helper script flag syntax uniform "Just throwing this out there because it's a minor annoyance for me, nothing high priority or workflow-breaking. This is referring to the difference between `clean.cmd /b` and `clean.sh -b`. I know these were done to match the usual ""OS standard"" flag syntax, but I think it would be simpler if these were just the same across platforms (i.e. `clean -b` everywhere). I'm often typing the wrong flag after I've been working on one system for a while and then move to another. Additionally, `dotnet` has just made all systems use the ""hypen-flag"" syntax instead of allowing ""slash-syntax"" on Windows, and it seems to work fine there. Anyone else feel the same way? I'm happy to adjust to this if nobody else is having the same troubles :smile: . " 6398 area-System.Runtime Support global unhandled exception handler As outlined in https://github.com/dotnet/coreclr/issues/2999, we need a replacement for `AppDomain.UnhandledException`. Couple of requirements: - Should be a low-level API that isn't depending on other orthogonal features such as `AssemblyLoadContext`, `Task`, or `Thread` - Can't be on a type that is already exposed in .NET Framework (such as `Environment`) - Should be raised for all threads Thoughts? /cc @weshaggard @KrzysztofCwalina @stephentoub 6399 area-System.Threading RunSemaphoreSlimCurrentTests failed in Win10 outer loop http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_win10_debug/101/consoleFull ``` 07:07:24 System.Threading.Tests.SemaphoreSlimTests.RunSemaphoreSlimCurrentTests [FAIL] 07:07:24 Assert.Equal() Failure 07:07:24 Expected: 50 07:07:24 Actual: 46 07:07:24 Stack Trace: 07:07:24 d:\j\workspace\outerloop_win---0cba2915\src\System.Threading\tests\SemaphoreSlimTests.cs(586,0): at System.Threading.Tests.SemaphoreSlimTests.RunSemaphoreSlimTest8_ConcWaitAsyncAndRelease(Int32 initial, Int32 maximum, Int32 waitThreads, Int32 releaseThreads, Int32 succeededWait, Int32 failedWait, Int32 finalCount, Int32 timeout) 07:07:24 d:\j\workspace\outerloop_win---0cba2915\src\System.Threading\tests\SemaphoreSlimTests.cs(173,0): at System.Threading.Tests.SemaphoreSlimTests.RunSemaphoreSlimCurrentTests() 07:07:26 System.Xml.RW.CharCheckingReader.Tests -> d:\j\workspace\outerloop_win---0cba2915\bin\Windows_NT.AnyCPU.Debug\System.Xml.RW.CharCheckingReader.Tests\System.Xml.RW.CharCheckingReader.Tests.dll ``` 6402 area-System.Reflection CustomAttributeExtensions.GetCustomAttributes returns null when called on a DynamicMethod "It should return an empty collection. Repro: Create a desktop console app: ``` C# static void Main(string[] args) { var dm = new DynamicMethod(""M"", typeof(void), Type.EmptyTypes); var il = dm.GetILGenerator(); il.Emit(OpCodes.Ret); var z = dm.GetCustomAttributes(); Console.WriteLine(z?.ToString() ?? ""null""); } ``` " 6405 area-System.Runtime To Add an ES6 Compatible Way to ToString double "DataContractJsonSerializer converts a double value to a string by calling, ``` csharp value.ToString(""R"", NumberFormatInfo.InvariantInfo) ``` The string is not compatible with ECMAScript 6 (see the [specs](http://www.ecma-international.org/ecma-262/6.0/#sec-tostring-applied-to-the-number-type)). For example, > 5E-06 should be converted as 0.000005 > -3.3333333333333338E-28 should be converted as -3.3333333333333338e-28 > 4.94065645841247E-324 should be converted as 5e-324 An ES6 compatible way to ToString double and floats would be useful. " 6406 area-System.Data Remove System.Collection.NonGeneric from SqlClient contracts Based on a PR review comment https://github.com/dotnet/corefx/pull/6396#discussion_r54168394 we should try to remove the SqlClient's dependency on System.Collection.NonGeneric System.Collections.CollectionBase is being used in SqlBulkCopyColumnMappingCollection inheritance. 6414 area-System.Collections IntersectWithEnumerable function SortedSet does unnecessary rotations ![sortedset](https://cloud.githubusercontent.com/assets/4521425/13342870/d3f94fe8-dbfa-11e5-8402-99d70c58ac06.PNG) I believe the following change would cause the tree to perform fewer rotations and therefore should be faster. This also handles the case where the set contains all the elements and does not need to be cleared and rebuilt. 6415 area-System.Collections In SortedSet replace log2 function with Math.Log(x, 2) "I did a test and 1 + (int) Math.Log(x, 2) was slightly faster than the implementation of the private static int log2(int value) function. 1. Replaces all occurrences of log2 with Math.Log(x,2). 2. Remove the log2 function. Note: it's odd that to get the same results as log2 I had to use, ""1 + (int)Math.Log(value, 2)"". So after this change the way log2 is used might want to be looked over. " 6423 area-System.Data [ToFDisable] Port tests for: System.Data.SqlClient "As part of moving out of ToF and into the open, I've been going through the ""Tree of the future"" tests and calculating which of those tests provide coverage that we're missing in the open tests. The goal of this is to get the open tests universally better than the ToF tests so that we can turn the ToF tests off for ProjectK runs and save us all a lot of headache diagnosing test failures from potentially outdated tests. For System.Data.SqlClient, we're missing 7486 lines of coverage. Our total line coverage for Open vs. ToF is 78.1%. However, this includes some data points that might not be relevant to the library being tested so the real coverage is likely lower. To fulfill the uncovered lines we would need to either create new tests for them or port 1 ToF tests to the open. Those tests are: - [ ] System.Data.SqlClient\4.0.0.0\SystemDataSqlClientTest_FullRun.XML Coverage reports, coverage xml files, and detailed json lists of each piece of missing coverage and the corresponding ToF test that fills it are available on request. " 6445 area-System.Net [ToFDisable] Port tests for: System.Runtime.Extensions, "As part of moving out of ToF and into the open, I've been going through the ""Tree of the future"" tests and calculating which of those tests provide coverage that we're missing in the open tests. The goal of this is to get the open tests universally better than the ToF tests so that we can turn the ToF tests off for ProjectK runs and save us all a lot of headache diagnosing test failures from potentially outdated tests. For System.Runtime.Extensions, we're missing 37 lines of coverage. Our total line coverage for Open vs. ToF is 98.5%. However, this includes some data points that might not be relevant to the library being tested so the real coverage is likely lower. To fulfill the uncovered lines we would need to either create new tests for them or port 5 ToF tests to the open. Those tests are: - [ ] System.Runtime.Extensions\4.0.10.0\System.Runtime.Extensions.Tests\System.Runtime.Extensions.Tests\FrameworkNameTests.FrameworkNameCtor_Id.xml - [ ] System.Runtime.Extensions\4.0.10.0\System.Runtime.Extensions.Tests\System.Runtime.Extensions.Tests\HttpWebUtilityTests.WebUtilityTests.HtmlDecodeWithoutTextWriter.xml - [ ] System.Runtime.Extensions\4.0.10.0\System.Runtime.Extensions.Tests\System.Runtime.Extensions.Tests\HttpWebUtilityTests.WebUtilityTests.HtmlDefaultStrictSettingEncode.xml - [ ] System.Runtime.Extensions\4.0.10.0\System.Runtime.Extensions.Tests\System.Runtime.Extensions.Tests\HttpWebUtilityTests.WebUtilityTests.UrlEncodeFromStringNoEncoding.xml - [ ] System.Runtime.Extensions\4.0.10.0\System.Runtime.Extensions.Tests\System.Runtime.Extensions.Tests\PathCombineTests.ContainsInvalidCharWithoutRootedAfterArgumentNull.xml Coverage reports, coverage xml files, and detailed json lists of each piece of missing coverage and the corresponding ToF test that fills it are available on request. " 6448 area-System.Security [ToFDisable] Port tests for: System.Security.Claims "As part of moving out of ToF and into the open, I've been going through the ""Tree of the future"" tests and calculating which of those tests provide coverage that we're missing in the open tests. The goal of this is to get the open tests universally better than the ToF tests so that we can turn the ToF tests off for ProjectK runs and save us all a lot of headache diagnosing test failures from potentially outdated tests. For System.Security.Claims, we're missing 691 lines of coverage. To fulfill the uncovered lines we would need to either create new tests for them or port 15 ToF tests to the open. Those tests are: - [ ] System.Security.Claims\4.0.0.0\SystemSecurityClaimsTests\System.Security.Claims.Tests.ClaimsIdentityTests.AddRemoveClaims.xml - [ ] System.Security.Claims\4.0.0.0\SystemSecurityClaimsTests\System.Security.Claims.Tests.ClaimsIdentityTests.Serialization.xml - [ ] System.Security.Claims\4.0.0.0\SystemSecurityClaimsTests\System.Security.Claims.Tests.ClaimTests.Serialization.xml - [ ] System.Security.Claims\4.0.0.0\SystemSecurityClaimsTests\System.Security.Claims.Tests.ClaimsPrincipalTests.IsInRole.xml - [ ] System.Security.Claims\4.0.0.0\SystemSecurityClaimsTests\System.Security.Claims.Tests.ClaimTests.Claim_Constructor_NullTypeOrValue.xml - [ ] System.Security.Claims\4.0.0.0\SystemSecurityClaimsTests\System.Security.Claims.Tests.ClaimTests.Clone.xml - [ ] System.Security.Claims\4.0.0.0\SystemSecurityClaimsTests_FullRun.XML - [ ] System.Security.Claims\4.0.0.0\SystemSecurityClaimsTests\System.Security.Claims.Tests.CommonQueryTests.Query.xml - [ ] System.Security.Claims\4.0.0.0\SystemSecurityClaimsTests\System.Security.Claims.Tests.ClaimsIdentityTests.SetGet.xml - [ ] System.Security.Claims\4.0.0.0\SystemSecurityClaimsTests\System.Security.Claims.Tests.ClaimsIdentityTests.Clone.xml - [ ] System.Security.Claims\4.0.0.0\SystemSecurityClaimsTests\System.Security.Claims.Tests.ClaimsIdentityTests.Constructors.xml - [ ] System.Security.Claims\4.0.0.0\SystemSecurityClaimsTests\System.Security.Claims.Tests.ClaimsPrincipalTests.Serialization.xml - [ ] System.Security.Claims\4.0.0.0\SystemSecurityClaimsTests\System.Security.Claims.Tests.ClaimsPrincipalTests.AddIdentities.xml - [ ] System.Security.Claims\4.0.0.0\SystemSecurityClaimsTests\System.Security.Claims.Tests.ClaimsPrincipalTests.Clone.xml - [ ] System.Security.Claims\4.0.0.0\SystemSecurityClaimsTests\System.Security.Claims.Tests.ClaimsPrincipalTests.Constructors.xml Coverage reports, coverage xml files, and detailed json lists of each piece of missing coverage and the corresponding ToF test that fills it are available on request. " 6459 area-System.Threading [ToFDisable] Port Monitor tests for: System.Threading "As part of moving out of ToF and into the open, I've been going through the ""Tree of the future"" tests and calculating which of those tests provide coverage that we're missing in the open tests. The goal of this is to get the open tests universally better than the ToF tests so that we can turn the ToF tests off for ProjectK runs and save us all a lot of headache diagnosing test failures from potentially outdated tests. For System.Threading, we're missing the entire test suite for the [Monitor class](https://msdn.microsoft.com/en-us/library/system.threading.monitor%28v=vs.110%29.aspx) under QA/ToF/tests/FX/Threading/. " 6463 area-Serialization [ToFDisable] Port tests for: System.Xml.XmlSerializer "As part of moving out of ToF and into the open, I've been going through the ""Tree of the future"" tests and calculating which of those tests provide coverage that we're missing in the open tests. The goal of this is to get the open tests universally better than the ToF tests so that we can turn the ToF tests off for ProjectK runs and save us all a lot of headache diagnosing test failures from potentially outdated tests. For System.Xml.XmlSerializer, we're missing 1 lines of coverage. To fulfill the uncovered lines we would need to either create new tests for them or port 1 ToF tests to the open. Those tests are: - [ ] System.Xml.XmlSerializer\4.0.0.0\XmlSerializerTestsForWinMD_FullRun.XML Coverage reports, coverage xml files, and detailed json lists of each piece of missing coverage and the corresponding ToF test that fills it are available on request. " 6464 area-System.Xml [ToFDisable] Port tests for: System.Xml.XPath "As part of moving out of ToF and into the open, I've been going through the ""Tree of the future"" tests and calculating which of those tests provide coverage that we're missing in the open tests. The goal of this is to get the open tests universally better than the ToF tests so that we can turn the ToF tests off for ProjectK runs and save us all a lot of headache diagnosing test failures from potentially outdated tests. For System.Xml.XPath, we're missing 7 lines of coverage. To fulfill the uncovered lines we would need to either create new tests for them or port 1 ToF tests to the open. Those tests are: - [ ] System.Xml.XPath\4.0.0.0\XDocument\System.Xml.XPath.XDocument.Tests_FullRun.XML Coverage reports, coverage xml files, and detailed json lists of each piece of missing coverage and the corresponding ToF test that fills it are available on request. " 6465 area-System.Net "[System.Net .Security Tests for NTLM] Allow Unix Implementation to take ""Domain\User"" format as a user." Currently if we pass the credential having user in format Domain/User.. It fails ,, We should fix this to accept this. 6466 area-System.Net [System.Net .Security Tests for NTLM] Figure out a way to validate if ntlm is initialized or not. 6467 area-System.Data A connection was successfully established with the server, but then an error occurred during the login process dotnet 1.0.0-beta-001528 Runtime Environment: OS Name: ubuntu OS Version: 15.04 OS Platform: Linux Runtime Id: ubuntu.15.04-x64 System.Data.SqlClient 4.0.0-rc3-23823 ConnectionString : data source=server,port;Initial Catalog=XXXXXXXX;Integrated Security=False;User ID=sa;Password=XXXX;Connect Timeout=150;Encrypt=False The same console app works on Windows. Opening SqlConnection results in the following SqlException: **A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 35 - An internal exception was caught) ---> System.IO.IOException: Unable to read data from the transport connection: Unknown error 10054. ---> System.Net.Sockets.SocketException: Unknown error 10054** ``` at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) --- End of inner exception stack trace --- at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.Data.SqlClient.SNI.SNITCPHandle.Receive(SNIPacket& packet, Int32 timeoutInMilliseconds) --- End of inner exception stack trace --- at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at ConsoleApplication.Program.Main(String[] args) ``` 6468 area-Infrastructure Unable to upgrade packages due to Debian errors "cc: @dagood, @chcosta, @weshaggard https://github.com/dotnet/corefx/pull/6386 is still failing due to errors like the following. What else is necessary to let this work? There are some changes blocked on being able to upgrade to the newer packages. Do we need to wait for newer packages to be published to myget and upgrade to those instead? ``` [12:02:41.84] Building Managed Libraries... [12:02:43.73] Restoring all packages... EXEC : error : System.IO.Compression 4.1.0-rc3-23823 provides a compile-time reference assembly for System.IO.Compression on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : Microsoft.Win32.Primitives 4.0.1-rc3-23823 provides a compile-time reference assembly for Microsoft.Win32.Primitives on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Console 4.0.0-rc3-23823 provides a compile-time reference assembly for System.Console on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Data.SqlClient 4.0.0-rc3-23823 provides a compile-time reference assembly for System.Data.SqlClient on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Diagnostics.FileVersionInfo 4.0.0-rc3-23823 provides a compile-time reference assembly for System.Diagnostics.FileVersionInfo on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Diagnostics.Process 4.1.0-rc3-23823 provides a compile-time reference assembly for System.Diagnostics.Process on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.IO.FileSystem.DriveInfo 4.0.0-rc3-23823 provides a compile-time reference assembly for System.IO.FileSystem.DriveInfo on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.IO.FileSystem.Watcher 4.0.0-rc3-23823 provides a compile-time reference assembly for System.IO.FileSystem.Watcher on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.IO.MemoryMappedFiles 4.0.0-rc3-23823 provides a compile-time reference assembly for System.IO.MemoryMappedFiles on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.IO.Pipes 4.0.0-rc3-23823 provides a compile-time reference assembly for System.IO.Pipes on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Net.NameResolution 4.0.0-rc3-23823 provides a compile-time reference assembly for System.Net.NameResolution on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Net.NetworkInformation 4.1.0-rc3-23823 provides a compile-time reference assembly for System.Net.NetworkInformation on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Net.Ping 4.0.0-rc3-23823 provides a compile-time reference assembly for System.Net.Ping on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Net.Requests 4.0.11-rc3-23823 provides a compile-time reference assembly for System.Net.Requests on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Net.Security 4.0.0-rc3-23823 provides a compile-time reference assembly for System.Net.Security on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Net.Sockets 4.1.0-rc3-23823 provides a compile-time reference assembly for System.Net.Sockets on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Net.WebSockets.Client 4.0.0-rc3-23823 provides a compile-time reference assembly for System.Net.WebSockets.Client on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Runtime.InteropServices.RuntimeInformation 4.0.0-rc3-23823 provides a compile-time reference assembly for System.Runtime.InteropServices.RuntimeInformation on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Runtime.Serialization.Primitives 4.1.0-rc3-23823 provides a compile-time reference assembly for System.Runtime.Serialization.Primitives on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Security.Cryptography.Algorithms 4.0.0-rc3-23823 provides a compile-time reference assembly for System.Security.Cryptography.Algorithms on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Security.Cryptography.Encoding 4.0.0-rc3-23823 provides a compile-time reference assembly for System.Security.Cryptography.Encoding on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Security.Cryptography.X509Certificates 4.0.0-rc3-23823 provides a compile-time reference assembly for System.Security.Cryptography.X509Certificates on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Xml.XmlSerializer 4.0.11-rc3-23823 provides a compile-time reference assembly for System.Xml.XmlSerializer on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.AppContext 4.1.0-rc3-23823 provides a compile-time reference assembly for System.AppContext on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Collections 4.0.11-rc3-23823 provides a compile-time reference assembly for System.Collections on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Diagnostics.Debug 4.0.11-rc3-23823 provides a compile-time reference assembly for System.Diagnostics.Debug on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Diagnostics.Tools 4.0.1-rc3-23823 provides a compile-time reference assembly for System.Diagnostics.Tools on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Diagnostics.Tracing 4.1.0-rc3-23823 provides a compile-time reference assembly for System.Diagnostics.Tracing on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Globalization 4.0.11-rc3-23823 provides a compile-time reference assembly for System.Globalization on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Globalization.Calendars 4.0.1-rc3-23823 provides a compile-time reference assembly for System.Globalization.Calendars on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Globalization.Extensions 4.0.1-rc3-23823 provides a compile-time reference assembly for System.Globalization.Extensions on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.IO 4.1.0-rc3-23823 provides a compile-time reference assembly for System.IO on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.IO.FileSystem 4.0.1-rc3-23823 provides a compile-time reference assembly for System.IO.FileSystem on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Linq.Expressions 4.0.11-rc3-23823 provides a compile-time reference assembly for System.Linq.Expressions on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Net.Http 4.0.1-rc3-23823 provides a compile-time reference assembly for System.Net.Http on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Net.Primitives 4.0.11-rc3-23823 provides a compile-time reference assembly for System.Net.Primitives on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Reflection 4.1.0-rc3-23823 provides a compile-time reference assembly for System.Reflection on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Reflection.DispatchProxy 4.0.1-rc3-23823 provides a compile-time reference assembly for System.Reflection.DispatchProxy on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Reflection.Extensions 4.0.1-rc3-23823 provides a compile-time reference assembly for System.Reflection.Extensions on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Reflection.Primitives 4.0.1-rc3-23823 provides a compile-time reference assembly for System.Reflection.Primitives on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Reflection.TypeExtensions 4.1.0-rc3-23823 provides a compile-time reference assembly for System.Reflection.TypeExtensions on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Resources.ResourceManager 4.0.1-rc3-23823 provides a compile-time reference assembly for System.Resources.ResourceManager on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Runtime 4.1.0-rc3-23823 provides a compile-time reference assembly for System.Runtime on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Runtime.Extensions 4.1.0-rc3-23823 provides a compile-time reference assembly for System.Runtime.Extensions on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Runtime.Handles 4.0.1-rc3-23823 provides a compile-time reference assembly for System.Runtime.Handles on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Runtime.InteropServices 4.1.0-rc3-23823 provides a compile-time reference assembly for System.Runtime.InteropServices on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Text.Encoding 4.0.11-rc3-23823 provides a compile-time reference assembly for System.Text.Encoding on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Text.Encoding.Extensions 4.0.11-rc3-23823 provides a compile-time reference assembly for System.Text.Encoding.Extensions on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Threading.Tasks 4.0.11-rc3-23823 provides a compile-time reference assembly for System.Threading.Tasks on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : System.Threading.Timer 4.0.1-rc3-23823 provides a compile-time reference assembly for System.Threading.Timer on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : Some packages are not compatible with DNXCore,Version=v5.0 (debian.8.2-x64). [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : Failed to retrieve information from remote source 'https://dotnet.myget.org/F/dotnet-buildtools/api/v3/flatcontainer/system.linq.expressions/index.json'. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : Response status code does not indicate success: 503 (Service Unavailable). [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : Failed to retrieve information from remote source 'https://dotnet.myget.org/F/dotnet-corefxtestdata/api/v3/flatcontainer/system.runtime/index.json'. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : Response status code does not indicate success: 503 (Service Unavailable). [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : Failed to retrieve information from remote source 'https://dotnet.myget.org/F/dotnet-buildtools/api/v3/flatcontainer/system.runtime.interopservices.runtimeinformation/index.json'. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : Response status code does not indicate success: 503 (Service Unavailable). [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : Failed to retrieve information from remote source 'https://dotnet.myget.org/F/dotnet-buildtools/api/v3/flatcontainer/system.runtime.interopservices.runtimeinformation/index.json'. [d:\j\workspace\windows_nt_de---06b7984d\build.proj] EXEC : error : Response status code does not indicate success: 503 (Service Unavailable). [d:\j\workspace\windows_nt_de---06b7984d\build.proj] d:\j\workspace\windows_nt_de---06b7984d\build.proj(54,5): error MSB3073: The command """"d:\j\workspace\windows_nt_de---06b7984d\Tools/dotnetcli/bin/dotnet.exe"" restore --packages ""d:\j\workspace\windows_nt_de---06b7984d\packages"" --source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json --source https://dotnet.myget.org/F/dotnet-corefxtestdata/api/v3/index.json --source https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json --source https://www.nuget.org/api/v2/ ""d:\j\workspace\windows_nt_de---06b7984d\/src"" ""d:\j\workspace\windows_nt_de---06b7984d\/pkg"""" exited with code 1. [12:23:26.92] Restoring all packages...Done. ``` (Note as well there are some 503s at the end.) " 6469 area-System.Net Enable NegotiateStream For Unix # Problem Enabling `System.Net.Security.NegotiateStream` for Unix. # Solution This PR introduces the implementation of `NegotiateStream` based on native implementations of [gssapi](https://tools.ietf.org/html/rfc2743) The native implementations used are mit-krb5 on linux and the built-in GSS.Framework for OSX. Also included are scripts to configure and deploy KDC on the host machine so as to run the associated tests. cc: @stephentoub @bartonjs @CIPop @davidsh @vijaykota @shrutigarg 6471 area-Infrastructure Remove Issue and PR templates I know we just added them, but I'm already finding them to be problematic. There's a ton of text in them, so much that I end up just ignoring them, deleting everything, and writing my own message. Plus, for PRs with a single commit, it appears the template text takes precedence over the normal behavior on GitHub of using the commit's description, which means extra work to get the contents of the commit message into the PR description. My vote is to delete these, at least for now. 6476 area-System.Data API for Code based configuration for DBProviderFactories "# Problem DbProviderFactories in .NET Framework provides an API to manage DbProviderFactory which configured in machine.config and load that assembly from GAC via reflection In Corefx, there is no more GAC and machine.config. Community are asking to have a standard way to manage DbProviderFactory to write provider agnostic code in libraries. https://github.com/dotnet/corefx/issues/4571 https://github.com/dotnet/corefx/issues/5782 https://msdn.microsoft.com/en-us/library/ms971499.aspx # Proposal We will bring back DbProviderFactories in CoreFx. But instead of register/read the configuration from machine.config, we will provide a code based configuration. This will allow application writer to hook this with any configuration mechanism. ## Contract Changes We will bring back DbProviderFactories.GetFactory functions in V1 contract which will support .Net 4.6.2. And add ""RegisterFactory"" functions in V2 contract to support .Net vNext. (version after 4.6.2) For portability, we will bring ""RegisterFactory"" into .Net vNext and should work side by side with file config behavior. e.g code based config will override file based config). Portable library (such as ORM), can start using GetFactory and target it for .Net 4.6.2. If this library used in .NET 4.6.2 , GetFactory will return factory which defined in machine/app configs. Corefx application which used this portable library can register their factory using ""RegisterFactory"". Once we release ""RegisterFactory"" into .Net vNext, The behavior will be work seamless in both frameworks. ``` C# namespace System.Data.Common { public static class DbProviderFactories { // V1 -- Supported by .NET Framework 4.6.2 (the upcoming version) public static DbProviderFactory GetFactory(string providerInvariantName); public static DbProviderFactory GetFactory(DbConnection connection); // V2 -- Supported by .NET Core 1.0 and by .NET Framework vNext (version after 4.6.2) public static void RegisterFactory(string providerInvariantName, DbProviderFactory factory); public static IEnumerable GetFactoryProviderNames(); } } ``` ## DbProviderFactories CoreFx Implementation ``` C# public abstract class DbProviderFactories { internal static readonly Dictionary> _configs = new Dictionary>(); public static DbProviderFactory GetFactory(string providerInvariantName) { ADP.CheckArgumentLength(providerInvariantName, nameof(providerInvariantName)); if (_configs.ContainsKey(providerInvariantName)) { return _configs[providerInvariantName](); } throw ADP.ConfigProviderNotFound(); } public static DbProviderFactory GetFactory(DbConnection connection) { ADP.CheckArgumentNull(connection, nameof(connection)); return connection.ProviderFactory; } public static void RegisterFactory(string providerInvariantName, DbProviderFactory factory) { ADP.CheckArgumentNull(providerInvariantName, nameof(providerInvariantName)); ADP.CheckArgumentNull(constructorDelegate, nameof(constructorDelegate)); _configs[providerInvariantName] = factory; } public static IEnumerable GetFactoryProviderNames() { return _configs.Keys.toArray(); } } ``` ## Usage For CoreFX application, You need to register your provider factory during startup of your application. ``` C# public static void Startup() { //SqlClientFactory is a singleton factory DbProviderFactories.Add(""System.Data.SqlClient"", SqlClientFactory.Instance); //You can use other factory which not singleton. DbProviderFactories.Add(""System.Data.OtherProvider"", new OtherProviderFactory()); } ``` # Progress I have created initial commit on my branch to inspect what are the changes needed. https://github.com/kkurni/corefx/commit/68380b3451d3ba0ce9646119101e9b4309f09d68 " 6477 area-System.Linq Order of execution for Enumerable.Join differs between coreclr and net451 "Order of execution for Enumerable.Join differs between coreclr and net451. End results are correct for both cases, but if customers are depending on order of execution (should they?) they might run into trouble. Repro: ``` public class Program { public static void Main(string[] args) { var query = Enumerable.Join(new CustomerEnumerable(), new OrderEnumerable(), c => c.Id, o => o.Id, (c, o) => new { c, o }); var result = query.ToList(); } } public class Customer { public int Id { get; set; } public string Name { get; set; } } public class Order { public int Id { get; set; } public string OrderName { get; set; } } public class CustomerEnumerable : IEnumerable { public IEnumerator GetEnumerator() { return new CustomerEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { return new CustomerEnumerator(); } private class CustomerEnumerator : IEnumerator { private int state = 0; public Customer Current { get { Console.WriteLine(""CustomerEnumerator Current""); return new Customer { Id = 1, Name = ""1"" }; } } object IEnumerator.Current { get { Console.WriteLine(""CustomerEnumerator Current""); return new Customer { Id = 1, Name = ""1"" }; } } public void Dispose() { } public bool MoveNext() { Console.WriteLine(""CustomerEnumerator MoveNext""); if (state == 0) { state = 1; return true; } return false; } public void Reset() { } } } public class OrderEnumerable : IEnumerable { public IEnumerator GetEnumerator() { return new OrderEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { return new OrderEnumerator(); } private class OrderEnumerator : IEnumerator { private int state = 0; public Order Current { get { Console.WriteLine(""OrderEnumerator Current""); return new Order { Id = 1, OrderName = ""1"" }; } } object IEnumerator.Current { get { Console.WriteLine(""OrderEnumerator Current""); return new Order { Id = 1, OrderName = ""1"" }; } } public void Dispose() { } public bool MoveNext() { Console.WriteLine(""OrderEnumerator MoveNext""); if (state == 0) { state = 1; return true; } return false; } public void Reset() { } } } ``` Result on net451: OrderEnumerator MoveNext OrderEnumerator Current OrderEnumerator MoveNext CustomerEnumerator MoveNext CustomerEnumerator Current CustomerEnumerator MoveNext Result on coreclr: CustomerEnumerator MoveNext OrderEnumerator MoveNext OrderEnumerator Current OrderEnumerator MoveNext CustomerEnumerator Current CustomerEnumerator MoveNext " 6479 area-System.Net System.ObjectDisposedException thrown while trying to compose very large multipart form "I'm not sure if this is by-design, an actual issue, or something else. I'm trying to upload a **very large** file (or set of files) using a multipart form via a POST message, up to 4 GB total message size. The client that's going to send this very large message is not able to finish creating the data stream before I get a `System.ObjectDisposedException` indicating: `""Safe handle has been closed""`. The exception is thrown during the execution of the line that reads `stream.Write(buffer, 0, length);` in the repro below. It appears as if the safe handle to the stream has been disposed but I'm still writing to it. # Affected platforms I don't have access to OSX. I've repro'ed it under both Windows 10 and Ubuntu 14.04. # Repro steps Use this project.json ``` JSON { ""version"": ""1.0.0-*"", ""compilationOptions"": { ""emitEntryPoint"": true }, ""dependencies"": { ""Microsoft.AspNetCore.Mvc"": ""1.0.0-*"", ""NETStandard.Library"": ""1.0.0-*"", ""System.Net.Http"": ""4.0.1-*"", ""System.Console"": ""4.0.0-*"" }, ""frameworks"": { ""dnxcore50"": { ""imports"": ""portable-net451+win8"" } }, ""commands"": { ""run"": ""LargeFileUpload"" } } ``` Use this Program.cs ``` C# using System; using System.IO; using System.Net; using System.Net.Http; using System.Net.Http.Headers; using System.Threading.Tasks; namespace ConsoleApplication { public class RandomDataStreamContent : HttpContent { private const int DefaultBufferSize = 4096; private readonly int _bufferSize; private readonly long _desiredLength; private readonly Random _random = new Random(DateTime.UtcNow.Millisecond); private static long _globalWrittenBytes = 0; public RandomDataStreamContent(long desiredLength) : this(desiredLength, DefaultBufferSize) { } public RandomDataStreamContent(long desiredLength, int bufferSize) { if (bufferSize <= 0) { throw new ArgumentOutOfRangeException(nameof(bufferSize)); } _bufferSize = bufferSize; _desiredLength = desiredLength; } protected override Task SerializeToStreamAsync(Stream stream, TransportContext context) { return Task.Run(() => { var buffer = new byte[_bufferSize]; var uploaded = 0; while (uploaded < _desiredLength) { _random.NextBytes(buffer); var length = buffer.Length; uploaded += length; if (uploaded > _desiredLength) { var delta = (int)(uploaded - _desiredLength); uploaded -= delta; length -= delta; } try { _globalWrittenBytes += length; stream.Write(buffer, 0, length); } catch (Exception e) { Console.WriteLine($""Bytes written to buffer before exception: { _globalWrittenBytes }""); Console.WriteLine($""Exception thrown: { e.Message }""); throw; } } }); } protected override bool TryComputeLength(out long length) { length = _desiredLength; return true; } } public class Program { // this endpoint doesn't matter as we'll not make it to hit the actual endpoint with the payload, // we just need a URI that's valid so we can establish a connection private const string ApiEndpoint = ""http://www.httpbin.org/""; public static void Main(string[] args) { const long oneGigabyte = 1024 * 1024 * 1024; const int filesToAdd = 4; using (var client = new HttpClient()) { using (var form = new MultipartFormDataContent()) { form.Add(new StringContent(""{\""section\"" : \""This is a simple JSON content fragment\""}""), ""metadata""); for (var iter = 0; iter < filesToAdd; ++iter) { var fileName = Guid.NewGuid().ToString().ToLower(); var fileContent = GenerateFileContent(fileName, oneGigabyte); form.Add(fileContent, ""file"", fileName); } var response = client.PostAsync(ApiEndpoint + ""api/upload"", form).Result; if (!response.IsSuccessStatusCode) { var errorMessage = ""Upload failed: "" + (int)response.StatusCode + "" "" + response.ReasonPhrase; throw new Exception(errorMessage + Environment.NewLine + response.Content.ReadAsStringAsync().Result); } } } } private static RandomDataStreamContent GenerateFileContent(string fileName, long fileSize) { var fileContent = new RandomDataStreamContent(fileSize); fileContent.Headers.ContentDisposition = new ContentDispositionHeaderValue(""form-data"") { Name = ""\""files\"""", FileName = ""\"""" + fileName + ""\"""" }; fileContent.Headers.ContentType = new MediaTypeHeaderValue(""application/octet-stream""); return fileContent; } } } ``` # Expected behavior The code as it stands should 404 (Not Found) since we're trying to hit an endpoint that doesn't exist. In case you have a WebAPI endpoint where you can upload the large file, it should 200 (OK). # Actual behavior The console prints: ``` Bytes written to buffer before exception: 22691840 Exception thrown: A task was canceled. Unhandled Exception: System.AggregateException: One or more errors occurred. (A task was canceled.) ---> System.Threading.Tasks.TaskCanceledException: A task was canceled. --- End of inner exception stack trace --- at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at ConsoleApplication.Program.Main(String[] args) ``` And crashes. " 6485 area-System.Runtime Add parameterless overloads of TrimStart/TrimEnd I propose we add parameterless overloads of `TrimStart`/`TrimEnd` for the String class. # Rationale - We have a parameterless `Trim` [method](https://msdn.microsoft.com/en-us/library/t97s7bs3%28v=vs.110%29.aspx), so it's best to do this for symmetry. - We can avoid array allocations every time the method is called, e.g. `TrimStart()` would no longer transparently allocate an array. We can avoid this with `TrimStart(Array.Empty())`, but that's besides the point. - With the [current implmementation](https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/String.cs#L1366) in CoreCLR, it would be relatively trivial to implement. Just add this to the class: ``` csharp public string TrimStart() => TrimHelper(TrimHead); public string TrimEnd() => TrimHelper(TrimTail); ``` - Perhaps this is just me, but when I first came across the `TrimStart(params char[])` overload (as a beginner to C#), I wasn't even aware that you could leave a `params` method empty. I just assumed that the functionality I was looking for wasn't available, and ended up making my own helper method. # Proposed API ``` csharp namespace System { public class String { // New methods public string TrimStart(); public string TrimEnd(); } } ``` 6486 area-System.Net Support setting outgoing interface for multicast on Socket The desktop framework and mono support setting the interface used for outgoing multicast traffic by passing the interface index as a value for the MulticastInterface SocketOption. ``` socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastInterface, IPAddress.HostToNetworkOrder(interfaceIndex)) ``` On Windows this is an acceptable value for IP_MULTICAST_IF, see [msdn IPPROTO_IP](https://msdn.microsoft.com/en-us/library/windows/desktop/ms738586%28v=vs.85%29.aspx). On non-Windows platforms the request should be translated to pass an ip_mreqn as the IP_MULTICAST_IF value, see [man ip](http://man7.org/linux/man-pages/man7/ip.7.html). The mono implementation for translating the value on non-Windows platforms can be found here: https://github.com/mono/mono/blob/master/mono/metadata/socket-io.c#L2333-L2345 6487 area-System.Net HttpWebRequestTest.Abort_BeginGetRequestStreamThenAbort_EndGetRequestStreamThrowsWebException(remoteServer NullReferenceException http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_debug_tst_prtest/1405/console ``` 19:07:17 System.Net.Tests.HttpWebRequestTest.Abort_BeginGetRequestStreamThenAbort_EndGetRequestStreamThrowsWebException(remoteServer: http://corefx-net.cloudapp.net/Echo.ashx) [FAIL] 19:07:17 System.NullReferenceException : Object reference not set to an instance of an object. 19:07:17 Stack Trace: 19:07:18 at System.Net.Tests.HttpWebRequestTest.Abort_BeginGetRequestStreamThenAbort_EndGetRequestStreamThrowsWebException(Uri remoteServer) ``` 6489 area-System.Net Missing ObjectContent class in System.Net.Http "It appears `ObjectContent` didn't make it among the various subclasses of `HttpContent` (`StreamContent`, `StringContent`, etc.). Is this a bug or is there another way to use `HttpClient` to POST json somewhere? e.g. ``` cs var value = new MyType(); client.PostAsync(""http://example.com/"", new ObjectContent(value, new JsonMediaTypeFormatter())) ``` " 6493 area-Infrastructure Outer loop Win7 and Win10 builds failing consistently with various errors Outer loop builds are repeatedly failing with a variety of errors: http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_win7_debug/98/consoleText http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_win10_debug/104/consoleText http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_win7_release/94/consoleText ``` 09:17:15 Installing dotnet cli... 09:17:16 Add-Type : Cannot add type. The assembly 'System.IO.Compression.FileSystem' cou 09:17:16 ld not be found. 09:17:16 At line:1 char:250 09:17:16 + (New-Object Net.WebClient).DownloadFile('https://dotnetcli.blob.core.windows. 09:17:16 net/dotnet/beta/Binaries/1.0.0.001504/dotnet-win-x64.1.0.0.001504.zip', 'd:\j\w 09:17:16 orkspace\outerloop_win---9c9e7d59\Tools\dotnetcli\dotnet-win-x64.1.0.0.001504.z 09:17:16 ip'); Add-Type <<<< -Assembly 'System.IO.Compression.FileSystem' -ErrorVariabl 09:17:16 e AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFi 09:17:16 le]::ExtractToDirectory('d:\j\workspace\outerloop_win---9c9e7d59\Tools\dotnetcl 09:17:16 i\dotnet-win-x64.1.0.0.001504.zip', 'd:\j\workspace\outerloop_win---9c9e7d59\To 09:17:16 ols\dotnetcli\') } else { (New-Object -com shell.application).namespace('d:\j\w 09:17:16 orkspace\outerloop_win---9c9e7d59\Tools\dotnetcli\').CopyHere((new-object -com 09:17:16 shell.application).namespace('d:\j\workspace\outerloop_win---9c9e7d59\Tools\dot 09:17:16 netcli\dotnet-win-x64.1.0.0.001504.zip').Items(),16) } 09:17:16 + CategoryInfo : ObjectNotFound: (System.IO.Compression.FileSyste 09:17:16 m:String) [Add-Type], Exception 09:17:16 + FullyQualifiedErrorId : ASSEMBLY_NOT_FOUND,Microsoft.PowerShell.Commands 09:17:16 .AddTypeCommand 09:17:16 09:17:17 Add-Type : Cannot add type. One or more required assemblies are missing. 09:17:17 At line:1 char:250 09:17:17 + (New-Object Net.WebClient).DownloadFile('https://dotnetcli.blob.core.windows. 09:17:17 net/dotnet/beta/Binaries/1.0.0.001504/dotnet-win-x64.1.0.0.001504.zip', 'd:\j\w 09:17:17 orkspace\outerloop_win---9c9e7d59\Tools\dotnetcli\dotnet-win-x64.1.0.0.001504.z 09:17:17 ip'); Add-Type <<<< -Assembly 'System.IO.Compression.FileSystem' -ErrorVariabl 09:17:17 e AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFi 09:17:17 le]::ExtractToDirectory('d:\j\workspace\outerloop_win---9c9e7d59\Tools\dotnetcl 09:17:17 i\dotnet-win-x64.1.0.0.001504.zip', 'd:\j\workspace\outerloop_win---9c9e7d59\To 09:17:17 ols\dotnetcli\') } else { (New-Object -com shell.application).namespace('d:\j\w 09:17:17 orkspace\outerloop_win---9c9e7d59\Tools\dotnetcli\').CopyHere((new-object -com 09:17:17 shell.application).namespace('d:\j\workspace\outerloop_win---9c9e7d59\Tools\dot 09:17:17 netcli\dotnet-win-x64.1.0.0.001504.zip').Items(),16) } 09:17:17 + CategoryInfo : InvalidData: (:) [Add-Type], InvalidOperationExc 09:17:17 eption 09:17:17 + FullyQualifiedErrorId : ASSEMBLY_LOAD_ERRORS,Microsoft.PowerShell.Comman 09:17:17 ds.AddTypeCommand 09:17:17 09:17:19 Restoring BuildTools version 1.0.25-prerelease-00177... 09:17:24 Initializing BuildTools ... 09:17:37 Done initializing tools. 09:17:37 [17:17:45.06] Building Native Libraries... 09:17:38 CMake is a pre-requisite to build this repository but it was not found on the path. Please install CMake from http://www.cmake.org/download/ and ensure it is on your path. 09:17:38 Native component build failed see nativebuild.log for more details. 09:17:38 [17:17:45.81] Building Managed Libraries... 09:17:39 [17:17:46.59] Restoring all packages... 09:21:19 [17:21:26.71] Restoring all packages...Done. 09:21:20 C:\Program Files (x86)\MSBuild\Microsoft\Portable\Microsoft.Portable.Core.targets(22,9): error : The TargetFrameworkProfile property is not set for project 'Microsoft.CSharp.csproj'. Portable projects must specify a profile. [d:\j\workspace\outerloop_win---9c9e7d59\src\Microsoft.CSharp\ref\Microsoft.CSharp.csproj] 09:21:21 C:\Program Files (x86)\MSBuild\Microsoft\Portable\Microsoft.Portable.Core.targets(22,9): error : The TargetFrameworkProfile property is not set for project 'Microsoft.VisualBasic.csproj'. Portable projects must specify a profile. [d:\j\workspace\outerloop_win---9c9e7d59\src\Microsoft.VisualBasic\ref\Microsoft.VisualBasic.csproj] ``` 6494 area-Infrastructure Outer loop Ubuntu legs pass all tests but then fail with IOException http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_ubuntu14.04_release/8/consoleFull ``` [xUnit] [ERROR] - IO error scanning directory '/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/bin/tests' ERROR: Step ‘Publish xUnit test result report’ aborted due to exception: java.io.IOException: remote file operation failed: /mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug at hudson.remoting.Channel@79976537:Azure0227030641: hudson.util.IOException2: There are some problems during the conversion into JUnit reports: at hudson.FilePath.act(FilePath.java:986) at hudson.FilePath.act(FilePath.java:968) at org.jenkinsci.plugins.xunit.XUnitProcessor.performTests(XUnitProcessor.java:145) at org.jenkinsci.plugins.xunit.XUnitProcessor.performXUnit(XUnitProcessor.java:88) at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:142) at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:134) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668) at hudson.model.Run.execute(Run.java:1763) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: hudson.util.IOException2: There are some problems during the conversion into JUnit reports: at org.jenkinsci.plugins.xunit.service.XUnitTransformer.invoke(XUnitTransformer.java:183) at org.jenkinsci.plugins.xunit.service.XUnitTransformer.invoke(XUnitTransformer.java:44) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2719) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) at ......remote call to Azure0227030641(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416) at hudson.remoting.UserResponse.retrieve(UserRequest.java:220) at hudson.remoting.Channel.call(Channel.java:781) at hudson.FilePath.act(FilePath.java:979) ... 14 more Caused by: IO error scanning directory '/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/bin/tests' at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1207) at org.apache.tools.ant.DirectoryScanner.checkIncludePatterns(DirectoryScanner.java:1030) at org.apache.tools.ant.DirectoryScanner.scan(DirectoryScanner.java:909) at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:499) at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:460) at org.jenkinsci.plugins.xunit.service.XUnitReportProcessorService.findReports(XUnitReportProcessorService.java:73) at org.jenkinsci.plugins.xunit.service.XUnitTransformer.invoke(XUnitTransformer.java:92) at org.jenkinsci.plugins.xunit.service.XUnitTransformer.invoke(XUnitTransformer.java:44) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2719) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) [BFA] Scanning build for known causes... ..[BFA] Found failure cause(s): [BFA] Hung processs on target machine from category Infrastructure ``` Also, why after the tests are run is it then doing a native build? 6495 area-Infrastructure Outer loop runs aren't running inner loop tests! "`/p:WithCategories=""InnerLoop;OuterLoop""` is being passed to msbuild, causing `-trait category=InnerLoop -trait category=OuterLoop` to be passed to the xunit command line, but ""inner loop"" tests aren't attributed with an [InnerLoop] attribute, there is no ""InnerLoop"" trait, etc., and so the only tests that are getting run are the few outer loop ones. " 6500 area-System.Net Release pinned buffers correctly for WinHttpHandler, WinHttpWebSocket Both WinHttpHandler and WinHttpWebSocket use pinned buffers for receiving and sending data. The pinned GCHandle was being freed during the dispose of the WinHttpHandler or WinHttpWebSocket objects. The problem is that the buffer should not be unpinned until the async operation is done. It's possible for any async operation to be in flight (and where native code uses the buffer) when the object is explicitly or implicitly disposed. This fix moves the ownership of the pinned GCHandle to their respective state objects (WinHttRequestState, WinHttpWebSocketState). These objects are strongly rooted and are not released until all async operations are completed and the WinHTTP handles are fully closed. That makes these state objects a safe place to own and free the pinned buffers. Fixes #2508 and #6142 6503 area-System.Net System.Net.Primitives: Remove dependency on non-generic collections `System.Net.Primitives` depends on `System.Collections.NonGeneric` only for the non-generic `SortedList`. We can instead use the generic `SortedList` in `System.Collections`, allowing us to remove the dependency on the legacy collections. cc: @stephentoub, @davidsh 6506 area-System.Net SocketAsyncEngine event loop FailFast on OSX "http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_debug_tst_prtest/1447/console ``` 16:35:47 CLR: Managed code called FailFast, saying ""Exception thrown from SocketAsyncEngine event loop: System.Diagnostics.Debug+DebugAssertException: 16:35:47 16:35:47 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 16:35:47 at System.Environment.get_StackTrace() 16:35:47 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 16:35:47 at System.Net.Sockets.SocketAsyncContext.UnregisterRead() 16:35:47 at System.Net.Sockets.SocketAsyncContext.HandleEvents(SocketEvents events) 16:35:47 at System.Net.Sockets.SocketAsyncEngine.EventLoop() 16:35:47 at System.Threading.Tasks.Task.Execute() 16:35:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 16:35:47 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 16:35:47 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 16:35:47 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 16:35:47 at System.Diagnostics.Debug.UnixDebugLogger.ShowAssertDialog(String stackTrace, String message, String detailMessage) 16:35:47 at System.Net.Sockets.SocketAsyncContext.UnregisterRead() 16:35:47 at System.Net.Sockets.SocketAsyncContext.HandleEvents(SocketEvents events) 16:35:47 at System.Net.Sockets.SocketAsyncEngine.EventLoop()"" 16:35:47 ./run-test.sh: line 135: 55204 Abort trap: 6 ./corerun xunit.console.netcore.exe $testDllName -xml testResults.xml -notrait category=failing -notrait category=OuterLoop -notrait category=$xunitOSCategory -notrait Benchmark=true 16:35:47 error: One or more tests failed while running tests from 'System.Net.Sockets.Tests'. Exit code 134. ``` cc: @ericeil, @pgavlin " 6513 area-System.Net NullReferenceException when calling Socket.SetMulticastOption on ubuntu 14.04 "Calling Socket.SetMulticastOption throws a NullReferenceException on ubuntu 14.04. Example program: ``` using System; using System.Net; using System.Net.Sockets; namespace ConsoleApplication { public class Program { public static void Main(string[] args) { int interfaceIndex = 0; IPAddress ip = IPAddress.Parse(""239.1.2.3""); int port = 54321; Console.WriteLine(""Creating socket""); Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); Console.WriteLine(""Binding socket""); socket.Bind(new IPEndPoint(IPAddress.Any, 54321)); Console.WriteLine(""Adding membership""); socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership, new MulticastOption(ip, interfaceIndex)); Console.WriteLine(""Done!""); Console.Read(); } } } ``` ``` { ""version"": ""1.0.0-*"", ""compilationOptions"": { ""emitEntryPoint"": true }, ""dependencies"": { ""NETStandard.Library"": ""1.0.0-rc2-23728"" }, ""frameworks"": { ""dnxcore50"": { } } } ``` Output: ``` Creating socket Binding socket Adding membership Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at System.Net.Sockets.SocketPal.SetMulticastOption(SafeCloseSocket handle, SocketOptionName optionName, MulticastOption optionValue) at System.Net.Sockets.Socket.SetMulticastOption(SocketOptionName optionName, MulticastOption MR) at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Object optionValue) at ConsoleApplication.Program.Main(String[] args) ``` " 6514 area-System.Net Fix a NullReferenceException on Unix in SetMulticastOption The implementation was assuming that MulticastOption.LocalAddress is always set, but it'll be null if an interface index was provided. cc: @ericeil, @pgavlin, @davidsh, @tmds Fixes #6513 6516 area-System.Net SendToV4IPEndPointToDualHost_Success timeout on OS X http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_debug_tst_prtest/1458/console ``` 05:22:47 System.Net.Sockets.Tests.DualMode.SendToV4IPEndPointToDualHost_Success [FAIL] 05:22:47 System.TimeoutException : The operation has timed out. 05:22:47 Stack Trace: 05:22:47 at System.Net.Sockets.Tests.DualMode.DualModeSendTo_IPEndPointToHost_Helper(IPAddress connectTo, IPAddress listenOn, Boolean dualModeServer, Boolean expectedToTimeout) 05:22:47 at System.Net.Sockets.Tests.DualMode.SendToV4IPEndPointToDualHost_Success() ``` 6517 area-System.IO Feature request: Better low-level support for making use of streaming algorithms There is a class of algorithms that works against a sequential stream of data. Typically, the algorithm is initialized with some starting state. It's then presented with a sequential stream of identically-typed elements. For each arbitrarily-chosed block of elements, the algorithm may either modify the starting state or produce an incremental block as part of an output stream, or both, depending on the algorithm in question. Algorithms which follow this pattern include compression/decompression, encryption/decryption and hashing. In the BCL, these algorithms are typically modeled as wrappers of System.IO.Stream. For instance, you write normally to a file by using a FileStream. But if you wrap this FileStream with a GZipStream, then writing to the wrapper will cause the file to be compressed. This is incredibly convenient when your use case exactly matches the functionality in the BCL. Where it falls apart, though, is for non-matching use cases. For instance, let's say you want to compress a Stream while reading it. This simply isn't supported directly today. The only way to make use of GZipStream in this scenario is by creating two adapters -- one that reads from the original stream and writes to the GZipStream, and one that intercepts the writes out of the GZipStream and puts a pull interface back on top of it. If the GZip functionality in the BCL were also exposed in a more primitive form -- for instance, something like the [Compressor interface in Hadoop](http://hadoop.apache.org/docs/current/api/org/apache/hadoop/io/compress/Compressor.html), it would be much easier to implement custom scenarios on top of the base functionality. Given a sufficiently general abstraction for the initialize/process next block/finish set of operations, it might even be possible to reduce the amount of per-algorithm code that exists simply to interface with Stream. Unfortunately, the CoreCLR footprint appears to be going backwards in this regard. As an example, the HashAlgorithm class previously had methods for TransformBlock and TransformFinalBlock, but these have removed. The only way to make use of HashAlgorithm in a streaming fashion is to go through the pain of exposing the data as a (blocking) Stream, which can be extremely inconvenient. 6519 area-System.Net Fix SocketException error codes and messages on Unix "SocketException's public ctor takes an int, which it treats as both a SocketError and the native error code, passing it down to the base Win32Exception to get the platform-specific message for the error. However, SocketError is only the same as the native error code on Windows; on Unix, a translation is required, but that translation is missing. As a result, every SocketException thrown from System.Net.Sockets on Unix comes out with an unhelpful message ""Unknown error 12345"", where 12345 is the value for the SocketError, and the base native error code is set inappropriately as the SocketError's value rather than as the real errno value. This change puts a reverse mapping in place, such that the SocketError provided to SocketException is then translated back (as best as possible) into the underlying platform's native error code, which is then both stored on the base exception and used to get the appropriate platform-specific error message. So, for example, rather than getting an error like: ``` System.Net.Sockets.SocketException: Unknown error 10047 ``` you now get an error like: ``` System.Net.Sockets.SocketException: Address family not supported by protocol ``` Additionally, several SocketErrors map to errno values that weren't included in our Interop.Errors enum. I've added them. And, SocketException had dead code in the form of an ""internal SocketException(EndPoint endPoint)"" ctor that was never used. As a result, the private _endPoint field was always null, and the Message property would always just return base.Message. I've removed the constructor, the field, and the Message property override. SocketException also had an ErrorCode property in the implementation that wasn't in the ref contract; I've removed it from the implementation, too. cc: @davidsh, @pgavlin, @ericeil Fixes https://github.com/dotnet/corefx/issues/5849 " 6522 area-Infrastructure Update netci and run-test to use the IgnoreForCI trait in Jenkins Updates the netci.groovy and runtest.sh files to pass `-notrait Category=IgnoreForCI` to `build.cmd` and `run-test.sh` in Jenkins so that we can disable tests from running when they're being run in Jenkins. @dotnet-bot test ci please @Priya91 would you mind checking (or showing me how to check) that the generated jobs are correctly passing the -notrait / WithoutCategories? replaces part of #6145 6523 area-System.Net Support setting outgoing interface for multicast on Socket Fix https://github.com/dotnet/corefx/issues/6486 pal_networking: support specifying the network interface for outgoing multicast traffic via SocketOptionName.MulticastInterface on non-Windows platforms The interface for outgoing multicast traffic can be set as follows: socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastInterface, IPAddress.HostToNetworkOrder(interfaceIndex)) 6533 area-System.Reflection CustomAttributeDecoder should cache and reuse common arguments to avoid boxing Currently, in CustomAttributeDecoder.DecodeArgument, we'll re-box small integers, true and false every time they're encountered. The boxed values can be reused. 6534 area-System.Reflection Improve custom attribute decoding tests Currently, due to lack of time, some tests just check that we don't throw. A better approach would probably be to generically compare reflection CustomAttributeData to S.R.M CustomAttributeValue for every test attribute applied. Also, there needs to be test cases for malformed custom attributes. Test coverage is at ~70% now with only positive cases. 6535 area-System.Net HttpClient.GetAsync does not call virtual SendAsync can you confirm that this is NOT by design? All [Verb]Async methods except GetAsync end up in one particular SendAsync method ``` public override Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) ``` I think GetAsync should not be en exception. 6538 area-System.Net Reduce some allocations in WebUtility.UrlDecode This partially addresses issue #5888. It makes `UrlDecoder` a struct (and fixes the associated comments), and adds a dependency on `System.Buffers` so it can pool arrays. I'll go again and submit the `StringBuilder` changes in another PR, since from my understanding they seem to be an API change. 6541 area-System.Data SqlClient Tests: TdsParser::ThrowExceptionAndWarning called with no exceptions or warnings! Happens intermittently in various test cases. 6542 area-System.Net WebUtility.UrlEncode/Decode methods allocate even when unneeded "As it stands, the [current implementation](https://github.com/dotnet/corefx/blob/master/src/System.Runtime.Extensions/src/System/Net/WebUtility.cs#L360-L362) of `WebUtility`'s `UrlEncode`/`Decode` methods allocate even when there is nothing to change in the original string, e.g. `UrlDecode(""Foo"")`. We should probably change this (I may submit a PR) so that it just returns the original string if no changes are needed. " 6543 area-System.Net Short-circuit in UrlEncode/Decode for WebUtility Partially fixes #6542 by short-circuiting in `UrlEncode` if no encoding is required. It uses the already-existing `IsUrlSafeChar` helper method to do this. I think this may break in the case where a UTF-8 encoded string doesn't pass as 'safe' (and needs to be encoded), but its UTF-16 counterpart does. I'm not sure such a case could exist though, since all of the chars validated by `IsUrlSafeChar` should have the same representation when converted to UTF-8 and cast back to `char`. cc @stephentoub @davidsh **edit:** Added commits to deal with this for `UrlDecode` as well. 6544 area-System.Net Avoid a string allocation when parsing numeric HTML entities This change avoids an allocation by `Substring` when decoding numeric HTML entities, like `` for example. cc @stephentoub @davidsh 6546 area-Meta Tests failing on NetBSD I will track here progress on running managed code tests with CoreCLR/CoreFX on NetBSD. For now: 1. I disabled locally all tests failing on FreeBSD or Linux or OSX. 2. I added locally 'timeout 15m' call before each `corerun` execution to address hanging tests. Command: `./run-test.sh --coreclr-bins /usr/pkg/CoreCLR/ --mscorlib-bins /usr/pkg/CoreCLR/ --corefx-tests /public/bin/tests/FreeBSD.AnyCPU.Debug/ --corefx-native-bins ./bin/NetBSD.x64.Debug/Native/` 6550 area-System.Security System.Security.Cryptography.X509Certificates.X509Store hides errors when cert collection is obtained from a closed store "`System.Security.Cryptography.X509Certificates.X509Store` has ``` public X509Certificate2Collection Certificates { get { ``` which silently returns an empty collection if the store is not opened. The code to traverse a store looks something like this: ``` using( var store = new X509Store() ) { store.Open( OpenFlags.ReadOnly ); var allCerts = store.Certificates; //traverse allCerts } ``` if `Open()` call is omitted for any reason - ""no problem"", the code works, just looks at empty collection. This is error hiding. `Add()` and `Remove()` don't allow the store to be not opened in advanced. There's no way to check the store is opened. Something like this: ``` void traverseCerts( X509Store store ) { var allCerts = store.Certificates; //traverse allCerts } ``` cannot even check the store is opened - it gets a collection anyway, maybe empty and it's empty maybe because the store is not opened or because the store is indeed empty. The same behavior is on desktop. This is extremely inconvenient. A `IsOpened` property is surely needed. Also `Certificates` getter likely needs to throw an exception if the store is not opened in advance. " 6554 area-System.Net Disable failing networking tests on OS X These tests have been failing fairly regularly on OS X. I'm disabling them until we can figure out why. https://github.com/dotnet/corefx/issues/5750 cc: @eirceil 6555 area-System.Net cannot compile system.net.sockets "Hi all, trying to compile System.Net.Sockets. It fails with errors: ""System.Net.NameResolution 4.0.0-rc3-23829 is not compatible with DNXCore,Version=v5.0. System.Security.Principal.Windows 4.0.0-rc3-23829 is not compatible with DNXCore,Version=v5.0."" ..build output... Restoring NuGet packages... To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages during build.' Detected package downgrade: System.Collections from 4.0.10 to 4.0.0 System.Net.Sockets (≥ 1.0.0) -> System.IO.FileSystem (≥ 4.0.0) -> System.Collections (≥ 4.0.10) System.Net.Sockets (≥ 1.0.0) -> System.Collections (≥ 4.0.0) Detected package downgrade: System.Collections from 4.0.10 to 4.0.0 System.Net.Sockets (≥ 1.0.0) -> System.Net.Primitives (≥ 4.0.10) -> System.Private.Networking (≥ 4.0.0) -> System.Collections (≥ 4.0.10) System.Net.Sockets (≥ 1.0.0) -> System.Collections (≥ 4.0.0) Detected package downgrade: System.Globalization from 4.0.10 to 4.0.0 System.Net.Sockets (≥ 1.0.0) -> System.Net.Primitives (≥ 4.0.10) -> System.Private.Networking (≥ 4.0.0) -> System.Globalization (≥ 4.0.10) System.Net.Sockets (≥ 1.0.0) -> System.Globalization (≥ 4.0.0) System.Net.NameResolution 4.0.0-rc3-23829 is not compatible with DNXCore,Version=v5.0. System.Security.Principal.Windows 4.0.0-rc3-23829 is not compatible with DNXCore,Version=v5.0. Some packages are not compatible with DNXCore,Version=v5.0. The project 'System.Net.Sockets' does not specify any target frameworks in 'C:\tfs\git\corefx\src\System.Net.Sockets\ref\project.json'. NuGet package restore failed. 1>------ Rebuild All started: Project: System.Net.Sockets (src\System.Net.Sockets), Configuration: Windows_Debug Any CPU ------ 1> System.Net.Sockets -> C:\tfs\git\corefx\bin\Windows_NT.AnyCPU.Debug\System.Net.Sockets\System.Net.Sockets.dll Thanks Damir " 6559 area-System.Net Remove special EOF handling in SocketAsyncContext event loop This code makes the assumption that if the other end of a socket is closed, all reads that will ever be issued on this end are already pending, so it's ok to shut down the read queue. This is not necessarily true; we need to allow other threads to continue to issue reads until they've actually read all data. This is resulting in assert failures (#6506) and is a likely cause of erroneous OperationAborted failures (#5750). It's not clear to me what value the EOF handling is providing currently; currently, aside from erroneously shutting down the queue, the only difference from the normal read event logic is that we also unregister from read events. Since we no longer are able to free handles, etc., on unregistration, it's not clear that we get any benefit from unregistering an event we'll probably never receive again. This change therefore simply removes this logic. Fixes #6506. Fixes #5750. @stephentoub @pgavlin 6563 area-Serialization Improve test coverage xmlserializer Remove unused code and add some test cases. Test coverage gets from 66.2% to 67.7% cc @shmao @SGuyGe @zhenlan 6564 area-Serialization Question: Serialization support going forward from .Net Core 1.0 Hi all, I have heard about support for serialization being discontinued in .Net Core 1.0 as it is not viable for cross-platform. (Paraphrasing from memory) What does this mean in practical terms? Are my code-bases that use BinaryFormatter's Serialize and Deserialize methods going to be completely deprecated, and I'll have to convert my codebase over to say, protobuf-net? Or have I misunderstood? Thanks, -Sam 6570 area-System.Net Fix race in several Sockets tests "These tests were comparing against some checksum values without waiting until those values were actually generated/stored. This change adds synchronization to ensure that the ""sender"" side of the test is done before validating the received data. A nice side benefit of this is that any assertions and cleanup in the sender will also complete before we return from the test case, keeping it better isolated from other tests. Fixes #5234 @CIPop " 6571 area-System.Data Null Argument Exception in AsyncTest.FailureTest on Linux System.Data.SqlClient.ManualTesting.Tests.AsyncTest.FailureTest [FAIL] System.AggregateException : One or more errors occurred. (Value cannot be null.) ---- System.ArgumentNullException : Value cannot be null. Stack Trace: at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout) at System.Data.SqlClient.ManualTesting.Tests.AsyncTest.FailureTest() 6573 area-System.ComponentModel Add missing members of System.ComponentModel namespace `System.ComponentModel` is a common dependency of applications developed for the .NET Framework. Porting these would be easier if more of the namespace were available in .NET Core. This issue proposes to add `System.ComponentModel` members with no designer, UI, or other unavailable dependencies. ## Proposed additions ``` diff --- .NET Core current +++ .NET Core proposed namespace System.ComponentModel { public class ArrayConverter : CollectionConverter { public ArrayConverter(); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); + public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes); + public override bool GetPropertiesSupported(ITypeDescriptorContext context); } public class AsyncCompletedEventArgs : EventArgs { public AsyncCompletedEventArgs(Exception error, bool cancelled, object userState); public bool Cancelled { get; } public Exception Error { get; } public object UserState { get; } protected void RaiseExceptionIfNecessary(); } public delegate void AsyncCompletedEventHandler(object sender, AsyncCompletedEventArgs e); public sealed class AsyncOperation { public SynchronizationContext SynchronizationContext { get; } public object UserSuppliedState { get; } ~AsyncOperation(); public void OperationCompleted(); public void Post(SendOrPostCallback d, object arg); public void PostOperationCompleted(SendOrPostCallback d, object arg); } public static class AsyncOperationManager { public static SynchronizationContext SynchronizationContext { get; set; } public static AsyncOperation CreateOperation(object userSuppliedState); } + public class AttributeCollection : ICollection, IEnumerable { + public static readonly AttributeCollection Empty; + protected AttributeCollection(); + public AttributeCollection(params Attribute[] attributes); + protected virtual Attribute[] Attributes { get; } + public int Count { get; } + bool System.Collections.ICollection.IsSynchronized { get; } + object System.Collections.ICollection.SyncRoot { get; } + public virtual Attribute this[int index] { get; } + public virtual Attribute this[Type attributeType] { get; } + public bool Contains(Attribute attribute); + public bool Contains(Attribute[] attributes); + public void CopyTo(Array array, int index); + public static AttributeCollection FromExisting(AttributeCollection existing, params Attribute[] newAttributes); + protected Attribute GetDefaultAttribute(Type attributeType); + public IEnumerator GetEnumerator(); + public bool Matches(Attribute attribute); + public bool Matches(Attribute[] attributes); } + public class AttributeProviderAttribute : Attribute { + public AttributeProviderAttribute(string typeName); + public AttributeProviderAttribute(string typeName, string propertyName); + public AttributeProviderAttribute(Type type); + public string PropertyName { get; } + public string TypeName { get; } } public class BackgroundWorker : IDisposable { public BackgroundWorker(); public bool CancellationPending { get; } public bool IsBusy { get; } public bool WorkerReportsProgress { get; set; } public bool WorkerSupportsCancellation { get; set; } public event DoWorkEventHandler DoWork; public event ProgressChangedEventHandler ProgressChanged; public event RunWorkerCompletedEventHandler RunWorkerCompleted; public void CancelAsync(); public void Dispose(); protected virtual void Dispose(bool disposing); protected virtual void OnDoWork(DoWorkEventArgs e); protected virtual void OnProgressChanged(ProgressChangedEventArgs e); protected virtual void OnRunWorkerCompleted(RunWorkerCompletedEventArgs e); public void ReportProgress(int percentProgress); public void ReportProgress(int percentProgress, object userState); public void RunWorkerAsync(); public void RunWorkerAsync(object argument); } public abstract class BaseNumberConverter : TypeConverter { protected BaseNumberConverter(); public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override bool CanConvertTo(ITypeDescriptorContext context, Type tdestinationType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); } public class BooleanConverter : TypeConverter { public BooleanConverter(); public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); + public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context); + public override bool GetStandardValuesExclusive(ITypeDescriptorContext context); + public override bool GetStandardValuesSupported(ITypeDescriptorContext context); } + public sealed class BrowsableAttribute : Attribute { + public static readonly BrowsableAttribute Default; + public static readonly BrowsableAttribute No; + public static readonly BrowsableAttribute Yes; + public BrowsableAttribute(bool browsable); + public bool Browsable { get; } + public override bool Equals(object obj); + public override int GetHashCode(); } public class ByteConverter : BaseNumberConverter { public ByteConverter(); } public class CancelEventArgs : EventArgs { public CancelEventArgs(); public CancelEventArgs(bool cancel); public bool Cancel { get; set; } } + public delegate void CancelEventHandler(object sender, CancelEventArgs e); + public class CategoryAttribute : Attribute { + public CategoryAttribute(); + public CategoryAttribute(string category); + public static CategoryAttribute Action { get; } + public static CategoryAttribute Appearance { get; } + public static CategoryAttribute Asynchronous { get; } + public static CategoryAttribute Behavior { get; } + public string Category { get; } + public static CategoryAttribute Data { get; } + public static CategoryAttribute Default { get; } + public static CategoryAttribute Design { get; } + public static CategoryAttribute DragDrop { get; } + public static CategoryAttribute Focus { get; } + public static CategoryAttribute Format { get; } + public static CategoryAttribute Key { get; } + public static CategoryAttribute Layout { get; } + public static CategoryAttribute Mouse { get; } + public static CategoryAttribute WindowStyle { get; } + public override bool Equals(object obj); + public override int GetHashCode(); + protected virtual string GetLocalizedString(string value); } public class CharConverter : TypeConverter { public CharConverter(); public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); } + public enum CollectionChangeAction { + Add = 1, + Refresh = 3, + Remove = 2, } + public class CollectionChangeEventArgs : EventArgs { + public CollectionChangeEventArgs(CollectionChangeAction action, object element); + public virtual CollectionChangeAction Action { get; } + public virtual object Element { get; } } + public delegate void CollectionChangeEventHandler(object sender, CollectionChangeEventArgs e); public class CollectionConverter : TypeConverter { public CollectionConverter(); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); + public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes); + public override bool GetPropertiesSupported(ITypeDescriptorContext context); } public class ComponentCollection { } + public abstract class CustomTypeDescriptor : ICustomTypeDescriptor { + protected CustomTypeDescriptor(); + protected CustomTypeDescriptor(ICustomTypeDescriptor parent); + public virtual AttributeCollection GetAttributes(); + public virtual string GetClassName(); + public virtual string GetComponentName(); + public virtual TypeConverter GetConverter(); + public virtual EventDescriptor GetDefaultEvent(); + public virtual PropertyDescriptor GetDefaultProperty(); + public virtual object GetEditor(Type editorBaseType); + public virtual EventDescriptorCollection GetEvents(); + public virtual EventDescriptorCollection GetEvents(Attribute[] attributes); + public virtual PropertyDescriptorCollection GetProperties(); + public virtual PropertyDescriptorCollection GetProperties(Attribute[] attributes); + public virtual object GetPropertyOwner(PropertyDescriptor pd); } public class DataErrorsChangedEventArgs : EventArgs { public DataErrorsChangedEventArgs(string propertyName); public virtual string PropertyName { get; } } public class DateTimeConverter : TypeConverter { public DateTimeConverter(); public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); } public class DateTimeOffsetConverter : TypeConverter { public DateTimeOffsetConverter(); public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); } public class DecimalConverter : BaseNumberConverter { public DecimalConverter(); public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); } + public sealed class DefaultEventAttribute : Attribute { + public static readonly DefaultEventAttribute Default; + public DefaultEventAttribute(string name); + public string Name { get; } + public override bool Equals(object obj); + public override int GetHashCode(); } + public sealed class DefaultPropertyAttribute : Attribute { + public static readonly DefaultPropertyAttribute Default; + public DefaultPropertyAttribute(string name); + public string Name { get; } + public override bool Equals(object obj); + public override int GetHashCode(); } public class DefaultValueAttribute : Attribute { public DefaultValueAttribute(bool value); public DefaultValueAttribute(byte value); public DefaultValueAttribute(char value); public DefaultValueAttribute(double value); public DefaultValueAttribute(short value); public DefaultValueAttribute(int value); public DefaultValueAttribute(long value); public DefaultValueAttribute(object value); public DefaultValueAttribute(float value); public DefaultValueAttribute(string value); public DefaultValueAttribute(Type type, string value); public virtual object Value { get; } public override bool Equals(object obj); public override int GetHashCode(); } + public class DescriptionAttribute : Attribute { + public static readonly DescriptionAttribute Default; + public DescriptionAttribute(); + public DescriptionAttribute(string description); + public virtual string Description { get; } + protected string DescriptionValue { get; set; } + public override bool Equals(object obj); + public override int GetHashCode(); } + public sealed class DesignerCategoryAttribute : Attribute { + public static readonly DesignerCategoryAttribute Component; + public static readonly DesignerCategoryAttribute Default; + public static readonly DesignerCategoryAttribute Form; + public static readonly DesignerCategoryAttribute Generic; + public DesignerCategoryAttribute(); + public DesignerCategoryAttribute(string category); + public string Category { get; } + public override bool Equals(object obj); + public override int GetHashCode(); } + public enum DesignerSerializationVisibility { + Content = 2, + Hidden = 0, + Visible = 1, } + public sealed class DesignerSerializationVisibilityAttribute : Attribute { + public static readonly DesignerSerializationVisibilityAttribute Content; + public static readonly DesignerSerializationVisibilityAttribute Default; + public static readonly DesignerSerializationVisibilityAttribute Hidden; + public static readonly DesignerSerializationVisibilityAttribute Visible; + public DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility visibility); + public DesignerSerializationVisibility Visibility { get; } + public override bool Equals(object obj); + public override int GetHashCode(); } + public class DesignOnlyAttribute : Attribute { + public static readonly DesignOnlyAttribute Default; + public static readonly DesignOnlyAttribute No; + public static readonly DesignOnlyAttribute Yes; + public DesignOnlyAttribute(bool isDesignOnly); + public bool IsDesignOnly { get; } + public override bool Equals(object obj); + public override int GetHashCode(); } + public class DisplayNameAttribute : Attribute { + public static readonly DisplayNameAttribute Default; + public DisplayNameAttribute(); + public DisplayNameAttribute(string displayName); + public virtual string DisplayName { get; } + protected string DisplayNameValue { get; set; } + public override bool Equals(object obj); + public override int GetHashCode(); } public class DoubleConverter : BaseNumberConverter { public DoubleConverter(); } public class DoWorkEventArgs : EventArgs { public DoWorkEventArgs(object argument); public object Argument { get; } public bool Cancel { get; set; } public object Result { get; set; } } public delegate void DoWorkEventHandler(object sender, DoWorkEventArgs e); public sealed class EditorBrowsableAttribute : Attribute { public EditorBrowsableAttribute(EditorBrowsableState state); public EditorBrowsableState State { get; } public override bool Equals(object obj); public override int GetHashCode(); } public enum EditorBrowsableState { Advanced = 2, Always = 0, Never = 1, } public class EnumConverter : TypeConverter { public EnumConverter(Type type); + protected virtual IComparer Comparer { get; } protected Type EnumType { get; } + protected TypeConverter.StandardValuesCollection Values { get; set; } public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); + public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context); + public override bool GetStandardValuesExclusive(ITypeDescriptorContext context); + public override bool GetStandardValuesSupported(ITypeDescriptorContext context); + public override bool IsValid(ITypeDescriptorContext context, object value); } + public abstract class EventDescriptor : MemberDescriptor { + protected EventDescriptor(MemberDescriptor descr); + protected EventDescriptor(MemberDescriptor descr, Attribute[] attrs); + protected EventDescriptor(string name, Attribute[] attrs); + public abstract Type ComponentType { get; } + public abstract Type EventType { get; } + public abstract bool IsMulticast { get; } + public abstract void AddEventHandler(object component, Delegate value); + public abstract void RemoveEventHandler(object component, Delegate value); } + public class EventDescriptorCollection : ICollection, IEnumerable, IList { + public static readonly EventDescriptorCollection Empty; + public EventDescriptorCollection(EventDescriptor[] events); + public EventDescriptorCollection(EventDescriptor[] events, bool readOnly); + public int Count { get; } + bool System.Collections.ICollection.IsSynchronized { get; } + object System.Collections.ICollection.SyncRoot { get; } + bool System.Collections.IList.IsFixedSize { get; } + bool System.Collections.IList.IsReadOnly { get; } + object System.Collections.IList.this[int index] { get; set; } + public virtual EventDescriptor this[int index] { get; } + public virtual EventDescriptor this[string name] { get; } + public int Add(EventDescriptor value); + public void Clear(); + public bool Contains(EventDescriptor value); + public virtual EventDescriptor Find(string name, bool ignoreCase); + public IEnumerator GetEnumerator(); + public int IndexOf(EventDescriptor value); + public void Insert(int index, EventDescriptor value); + protected void InternalSort(IComparer sorter); + protected void InternalSort(string[] names); + public void Remove(EventDescriptor value); + public void RemoveAt(int index); + public virtual EventDescriptorCollection Sort(); + public virtual EventDescriptorCollection Sort(IComparer comparer); + public virtual EventDescriptorCollection Sort(string[] names); + public virtual EventDescriptorCollection Sort(string[] names, IComparer comparer); + void System.Collections.ICollection.CopyTo(Array array, int index); + int System.Collections.IList.Add(object value); + bool System.Collections.IList.Contains(object value); + int System.Collections.IList.IndexOf(object value); + void System.Collections.IList.Insert(int index, object value); + void System.Collections.IList.Remove(object value); } + public sealed class EventHandlerList : IDisposable { + public EventHandlerList(); + public Delegate this[object key] { get; set; } + public void AddHandler(object key, Delegate value); + public void AddHandlers(EventHandlerList listToAddFrom); + public void Dispose(); + public void RemoveHandler(object key, Delegate value); } + public sealed class ExtenderProvidedPropertyAttribute : Attribute { + public ExtenderProvidedPropertyAttribute(); + public PropertyDescriptor ExtenderProperty { get; } + public IExtenderProvider Provider { get; } + public Type ReceiverType { get; } + public override bool Equals(object obj); + public override int GetHashCode(); } public class GuidConverter : TypeConverter { public GuidConverter(); public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); } + public class HandledEventArgs : EventArgs { + public HandledEventArgs(); + public HandledEventArgs(bool defaultHandledValue); + public bool Handled { get; set; } } + public delegate void HandledEventHandler(object sender, HandledEventArgs e); public interface IChangeTracking { bool IsChanged { get; } void AcceptChanges(); } public interface IComponent : IDisposable { ISite Site { get; set; } event EventHandler Disposed; } public interface IContainer : IDisposable { ComponentCollection Components { get; } void Add(IComponent component); void Add(IComponent component, string name); void Remove(IComponent component); } + public interface ICustomTypeDescriptor { + AttributeCollection GetAttributes(); + string GetClassName(); + string GetComponentName(); + TypeConverter GetConverter(); + EventDescriptor GetDefaultEvent(); + PropertyDescriptor GetDefaultProperty(); + object GetEditor(Type editorBaseType); + EventDescriptorCollection GetEvents(); + EventDescriptorCollection GetEvents(Attribute[] attributes); + PropertyDescriptorCollection GetProperties(); + PropertyDescriptorCollection GetProperties(Attribute[] attributes); + object GetPropertyOwner(PropertyDescriptor pd); } public interface IEditableObject { void BeginEdit(); void CancelEdit(); void EndEdit(); } + public interface IExtenderProvider { + bool CanExtend(object extendee); } + public interface IListSource { + bool ContainsListCollection { get; } + IList GetList(); } + public sealed class ImmutableObjectAttribute : Attribute { + public static readonly ImmutableObjectAttribute Default; + public static readonly ImmutableObjectAttribute No; + public static readonly ImmutableObjectAttribute Yes; + public ImmutableObjectAttribute(bool immutable); + public bool Immutable { get; } + public override bool Equals(object obj); + public override int GetHashCode(); } + public sealed class InitializationEventAttribute : Attribute { + public InitializationEventAttribute(string eventName); + public string EventName { get; } } public interface INotifyDataErrorInfo { bool HasErrors { get; } event EventHandler ErrorsChanged; IEnumerable GetErrors(string propertyName); } public interface INotifyPropertyChanged { event PropertyChangedEventHandler PropertyChanged; } public interface INotifyPropertyChanging { event PropertyChangingEventHandler PropertyChanging; } public class Int16Converter : BaseNumberConverter { public Int16Converter(); } public class Int32Converter : BaseNumberConverter { public Int32Converter(); } public class Int64Converter : BaseNumberConverter { public Int64Converter(); } + public class InvalidAsynchronousStateException : ArgumentException { + public InvalidAsynchronousStateException(); + public InvalidAsynchronousStateException(string message); + public InvalidAsynchronousStateException(string message, Exception innerException); } public interface IRevertibleChangeTracking : IChangeTracking { void RejectChanges(); } public interface ISite : IServiceProvider { IComponent Component { get; } IContainer Container { get; } bool DesignMode { get; } string Name { get; set; } } public interface ITypeDescriptorContext : IServiceProvider { IContainer Container { get; } object Instance { get; } PropertyDescriptor PropertyDescriptor { get; } void OnComponentChanged(); bool OnComponentChanging(); } + public interface ITypedList { + PropertyDescriptorCollection GetItemProperties(PropertyDescriptor[] listAccessors); + string GetListName(PropertyDescriptor[] listAccessors); } + public sealed class LocalizableAttribute : Attribute { + public static readonly LocalizableAttribute Default; + public static readonly LocalizableAttribute No; + public static readonly LocalizableAttribute Yes; + public LocalizableAttribute(bool isLocalizable); + public bool IsLocalizable { get; } + public override bool Equals(object obj); + public override int GetHashCode(); } + public abstract class MemberDescriptor { + protected MemberDescriptor(MemberDescriptor descr); + protected MemberDescriptor(MemberDescriptor oldMemberDescriptor, Attribute[] newAttributes); + protected MemberDescriptor(string name); + protected MemberDescriptor(string name, Attribute[] attributes); + protected virtual Attribute[] AttributeArray { get; set; } + public virtual AttributeCollection Attributes { get; } + public virtual string Category { get; } + public virtual string Description { get; } + public virtual bool DesignTimeOnly { get; } + public virtual string DisplayName { get; } + public virtual bool IsBrowsable { get; } + public virtual string Name { get; } + protected virtual int NameHashCode { get; } + protected virtual AttributeCollection CreateAttributeCollection(); + public override bool Equals(object obj); + protected virtual void FillAttributes(IList attributeList); + protected static MethodInfo FindMethod(Type componentClass, string name, Type[] args, Type returnType); + protected static MethodInfo FindMethod(Type componentClass, string name, Type[] args, Type returnType, bool publicOnly); + public override int GetHashCode(); + protected virtual object GetInvocationTarget(Type type, object instance); + protected static ISite GetSite(object component); } + public sealed class MergablePropertyAttribute : Attribute { + public static readonly MergablePropertyAttribute Default; + public static readonly MergablePropertyAttribute No; + public static readonly MergablePropertyAttribute Yes; + public MergablePropertyAttribute(bool allowMerge); + public bool AllowMerge { get; } + public override bool Equals(object obj); + public override int GetHashCode(); } public class MultilineStringConverter : TypeConverter { public MultilineStringConverter(); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); + public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes); + public override bool GetPropertiesSupported(ITypeDescriptorContext context); } + public sealed class NotifyParentPropertyAttribute : Attribute { + public static readonly NotifyParentPropertyAttribute Default; + public static readonly NotifyParentPropertyAttribute No; + public static readonly NotifyParentPropertyAttribute Yes; + public NotifyParentPropertyAttribute(bool notifyParent); + public bool NotifyParent { get; } + public override bool Equals(object obj); + public override int GetHashCode(); } public class NullableConverter : TypeConverter { public NullableConverter(Type type); public Type NullableType { get; } public Type UnderlyingType { get; } public TypeConverter UnderlyingTypeConverter { get; } public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); + public override object CreateInstance(ITypeDescriptorContext context, IDictionary propertyValues); + public override bool GetCreateInstanceSupported(ITypeDescriptorContext context); + public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes); + public override bool GetPropertiesSupported(ITypeDescriptorContext context); + public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context); + public override bool GetStandardValuesExclusive(ITypeDescriptorContext context); + public override bool GetStandardValuesSupported(ITypeDescriptorContext context); + public override bool IsValid(ITypeDescriptorContext context, object value); } + public sealed class ParenthesizePropertyNameAttribute : Attribute { + public static readonly ParenthesizePropertyNameAttribute Default; + public ParenthesizePropertyNameAttribute(); + public ParenthesizePropertyNameAttribute(bool needParenthesis); + public bool NeedParenthesis { get; } + public override bool Equals(object o); + public override int GetHashCode(); } public class ProgressChangedEventArgs : EventArgs { public ProgressChangedEventArgs(int progressPercentage, object userState); public int ProgressPercentage { get; } public object UserState { get; } } public delegate void ProgressChangedEventHandler(object sender, ProgressChangedEventArgs e); public class PropertyChangedEventArgs : EventArgs { public PropertyChangedEventArgs(string propertyName); public virtual string PropertyName { get; } } public delegate void PropertyChangedEventHandler(object sender, PropertyChangedEventArgs e); public class PropertyChangingEventArgs : EventArgs { public PropertyChangingEventArgs(string propertyName); public virtual string PropertyName { get; } } public delegate void PropertyChangingEventHandler(object sender, PropertyChangingEventArgs e); public abstract class PropertyDescriptor : MemberDescriptor { + protected PropertyDescriptor(MemberDescriptor descr); + protected PropertyDescriptor(MemberDescriptor descr, Attribute[] attrs); + protected PropertyDescriptor(string name, Attribute[] attrs); + public abstract Type ComponentType { get; } + public virtual TypeConverter Converter { get; } + public virtual bool IsLocalizable { get; } + public abstract bool IsReadOnly { get; } + public abstract Type PropertyType { get; } + public DesignerSerializationVisibility SerializationVisibility { get; } + public virtual bool SupportsChangeEvents { get; } + public virtual void AddValueChanged(object component, EventHandler handler); + public abstract bool CanResetValue(object component); + protected object CreateInstance(Type type); + public override bool Equals(object obj); + protected override void FillAttributes(IList attributeList); + public PropertyDescriptorCollection GetChildProperties(); + public PropertyDescriptorCollection GetChildProperties(Attribute[] filter); + public PropertyDescriptorCollection GetChildProperties(object instance); + public virtual PropertyDescriptorCollection GetChildProperties(object instance, Attribute[] filter); + public virtual object GetEditor(Type editorBaseType); + public override int GetHashCode(); + protected override object GetInvocationTarget(Type type, object instance); + protected Type GetTypeFromName(string typeName); + public abstract object GetValue(object component); + protected internal EventHandler GetValueChangedHandler(object component); + protected virtual void OnValueChanged(object component, EventArgs e); + public virtual void RemoveValueChanged(object component, EventHandler handler); + public abstract void ResetValue(object component); + public abstract void SetValue(object component, object value); + public abstract bool ShouldSerializeValue(object component); } + public class PropertyDescriptorCollection : ICollection, IDictionary, IEnumerable, IList { + public static readonly PropertyDescriptorCollection Empty; + public PropertyDescriptorCollection(PropertyDescriptor[] properties); + public PropertyDescriptorCollection(PropertyDescriptor[] properties, bool readOnly); + public int Count { get; } + bool System.Collections.ICollection.IsSynchronized { get; } + object System.Collections.ICollection.SyncRoot { get; } + bool System.Collections.IDictionary.IsFixedSize { get; } + bool System.Collections.IDictionary.IsReadOnly { get; } + object System.Collections.IDictionary.this[object key] { get; set; } + ICollection System.Collections.IDictionary.Keys { get; } + ICollection System.Collections.IDictionary.Values { get; } + bool System.Collections.IList.IsFixedSize { get; } + bool System.Collections.IList.IsReadOnly { get; } + object System.Collections.IList.this[int index] { get; set; } + public virtual PropertyDescriptor this[int index] { get; } + public virtual PropertyDescriptor this[string name] { get; } + public int Add(PropertyDescriptor value); + public void Clear(); + public bool Contains(PropertyDescriptor value); + public void CopyTo(Array array, int index); + public virtual PropertyDescriptor Find(string name, bool ignoreCase); + public virtual IEnumerator GetEnumerator(); + public int IndexOf(PropertyDescriptor value); + public void Insert(int index, PropertyDescriptor value); + protected void InternalSort(IComparer sorter); + protected void InternalSort(string[] names); + public void Remove(PropertyDescriptor value); + public void RemoveAt(int index); + public virtual PropertyDescriptorCollection Sort(); + public virtual PropertyDescriptorCollection Sort(IComparer comparer); + public virtual PropertyDescriptorCollection Sort(string[] names); + public virtual PropertyDescriptorCollection Sort(string[] names, IComparer comparer); + void System.Collections.IDictionary.Add(object key, object value); + bool System.Collections.IDictionary.Contains(object key); + IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator(); + void System.Collections.IDictionary.Remove(object key); + int System.Collections.IList.Add(object value); + bool System.Collections.IList.Contains(object value); + int System.Collections.IList.IndexOf(object value); + void System.Collections.IList.Insert(int index, object value); + void System.Collections.IList.Remove(object value); } + public sealed class ProvidePropertyAttribute : Attribute { + public ProvidePropertyAttribute(string propertyName, string receiverTypeName); + public ProvidePropertyAttribute(string propertyName, Type receiverType); + public string PropertyName { get; } + public string ReceiverTypeName { get; } + public override bool Equals(object obj); + public override int GetHashCode(); } + public sealed class ReadOnlyAttribute : Attribute { + public static readonly ReadOnlyAttribute Default; + public static readonly ReadOnlyAttribute No; + public static readonly ReadOnlyAttribute Yes; + public ReadOnlyAttribute(bool isReadOnly); + public bool IsReadOnly { get; } + public override bool Equals(object value); + public override int GetHashCode(); } + public class RefreshEventArgs : EventArgs { + public RefreshEventArgs(object componentChanged); + public RefreshEventArgs(Type typeChanged); + public object ComponentChanged { get; } + public Type TypeChanged { get; } } + public delegate void RefreshEventHandler(RefreshEventArgs e); + public enum RefreshProperties { + All = 1, + None = 0, + Repaint = 2, } + public sealed class RefreshPropertiesAttribute : Attribute { + public static readonly RefreshPropertiesAttribute All; + public static readonly RefreshPropertiesAttribute Default; + public static readonly RefreshPropertiesAttribute Repaint; + public RefreshPropertiesAttribute(RefreshProperties refresh); + public RefreshProperties RefreshProperties { get; } + public override bool Equals(object value); + public override int GetHashCode(); } public class RunWorkerCompletedEventArgs : AsyncCompletedEventArgs { public RunWorkerCompletedEventArgs(object result, Exception error, bool cancelled); public object Result { get; } public new object UserState { get; } } public delegate void RunWorkerCompletedEventHandler(object sender, RunWorkerCompletedEventArgs e); public class SByteConverter : BaseNumberConverter { public SByteConverter(); } public class SingleConverter : BaseNumberConverter { public SingleConverter(); } public class StringConverter : TypeConverter { public StringConverter(); public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); } public class TimeSpanConverter : TypeConverter { public TimeSpanConverter(); public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); } public class TypeConverter { public TypeConverter(); public virtual bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public bool CanConvertFrom(Type sourceType); public virtual bool CanConvertTo(ITypeDescriptorContext context, Type destinationType); public bool CanConvertTo(Type destinationType); public virtual object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public object ConvertFrom(object value); + public object ConvertFromInvariantString(ITypeDescriptorContext context, string text); public object ConvertFromInvariantString(string text); public object ConvertFromString(ITypeDescriptorContext context, CultureInfo culture, string text); + public object ConvertFromString(ITypeDescriptorContext context, string text); public object ConvertFromString(string text); public virtual object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); public object ConvertTo(object value, Type destinationType); + public string ConvertToInvariantString(ITypeDescriptorContext context, object value); public string ConvertToInvariantString(object value); public string ConvertToString(ITypeDescriptorContext context, CultureInfo culture, object value); + public string ConvertToString(ITypeDescriptorContext context, object value); public string ConvertToString(object value); + public object CreateInstance(IDictionary propertyValues); + public virtual object CreateInstance(ITypeDescriptorContext context, IDictionary propertyValues); protected Exception GetConvertFromException(object value); protected Exception GetConvertToException(object value, Type destinationType); + public bool GetCreateInstanceSupported(); + public virtual bool GetCreateInstanceSupported(ITypeDescriptorContext context); + public PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value); + public virtual PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes); + public PropertyDescriptorCollection GetProperties(object value); + public bool GetPropertiesSupported(); + public virtual bool GetPropertiesSupported(ITypeDescriptorContext context); + public ICollection GetStandardValues(); + public virtual TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context); + public bool GetStandardValuesExclusive(); + public virtual bool GetStandardValuesExclusive(ITypeDescriptorContext context); + public bool GetStandardValuesSupported(); + public virtual bool GetStandardValuesSupported(ITypeDescriptorContext context); + public virtual bool IsValid(ITypeDescriptorContext context, object value); + public bool IsValid(object value); + protected PropertyDescriptorCollection SortProperties(PropertyDescriptorCollection props, string[] names); + protected abstract class SimplePropertyDescriptor : PropertyDescriptor { + protected SimplePropertyDescriptor(Type componentType, string name, Type propertyType); + protected SimplePropertyDescriptor(Type componentType, string name, Type propertyType, Attribute[] attributes); + public override Type ComponentType { get; } + public override bool IsReadOnly { get; } + public override Type PropertyType { get; } + public override bool CanResetValue(object component); + public override void ResetValue(object component); + public override bool ShouldSerializeValue(object component); } + public class StandardValuesCollection : ICollection, IEnumerable { + public StandardValuesCollection(ICollection values); + public int Count { get; } + bool System.Collections.ICollection.IsSynchronized { get; } + object System.Collections.ICollection.SyncRoot { get; } + public object this[int index] { get; } + public void CopyTo(Array array, int index); + public IEnumerator GetEnumerator(); } } public sealed class TypeConverterAttribute : Attribute { + public static readonly TypeConverterAttribute Default; + public TypeConverterAttribute(); public TypeConverterAttribute(string typeName); public TypeConverterAttribute(Type type); public string ConverterTypeName { get; } public override bool Equals(object obj); public override int GetHashCode(); } + public abstract class TypeDescriptionProvider { + protected TypeDescriptionProvider(); + protected TypeDescriptionProvider(TypeDescriptionProvider parent); + public virtual object CreateInstance(IServiceProvider provider, Type objectType, Type[] argTypes, object[] args); + public virtual IDictionary GetCache(object instance); + public virtual ICustomTypeDescriptor GetExtendedTypeDescriptor(object instance); + protected internal virtual IExtenderProvider[] GetExtenderProviders(object instance); + public virtual string GetFullComponentName(object component); + public Type GetReflectionType(object instance); + public Type GetReflectionType(Type objectType); + public virtual Type GetReflectionType(Type objectType, object instance); + public virtual Type GetRuntimeType(Type reflectionType); + public ICustomTypeDescriptor GetTypeDescriptor(object instance); + public ICustomTypeDescriptor GetTypeDescriptor(Type objectType); + public virtual ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object instance); + public virtual bool IsSupportedType(Type type); } + public sealed class TypeDescriptionProviderAttribute : Attribute { + public TypeDescriptionProviderAttribute(string typeName); + public TypeDescriptionProviderAttribute(Type type); + public string TypeName { get; } } public sealed class TypeDescriptor { + public static Type InterfaceType { get; } + public static event RefreshEventHandler Refreshed; + public static TypeDescriptionProvider AddAttributes(object instance, params Attribute[] attributes); + public static TypeDescriptionProvider AddAttributes(Type type, params Attribute[] attributes); + public static void AddEditorTable(Type editorBaseType, Hashtable table); + public static void AddProvider(TypeDescriptionProvider provider, object instance); + public static void AddProvider(TypeDescriptionProvider provider, Type type); + public static void AddProviderTransparent(TypeDescriptionProvider provider, object instance); + public static void AddProviderTransparent(TypeDescriptionProvider provider, Type type); + public static void CreateAssociation(object primary, object secondary); + public static EventDescriptor CreateEvent(Type componentType, EventDescriptor oldEventDescriptor, params Attribute[] attributes); + public static EventDescriptor CreateEvent(Type componentType, string name, Type type, params Attribute[] attributes); + public static object CreateInstance(IServiceProvider provider, Type objectType, Type[] argTypes, object[] args); + public static PropertyDescriptor CreateProperty(Type componentType, PropertyDescriptor oldPropertyDescriptor, params Attribute[] attributes); + public static PropertyDescriptor CreateProperty(Type componentType, string name, Type type, params Attribute[] attributes); + public static object GetAssociation(Type type, object primary); + public static AttributeCollection GetAttributes(object component); + public static AttributeCollection GetAttributes(object component, bool noCustomTypeDesc); + public static AttributeCollection GetAttributes(Type componentType); + public static string GetClassName(object component); + public static string GetClassName(object component, bool noCustomTypeDesc); + public static string GetClassName(Type componentType); + public static string GetComponentName(object component); + public static string GetComponentName(object component, bool noCustomTypeDesc); + public static TypeConverter GetConverter(object component); + public static TypeConverter GetConverter(object component, bool noCustomTypeDesc); public static TypeConverter GetConverter(Type type); + public static EventDescriptor GetDefaultEvent(object component); + public static EventDescriptor GetDefaultEvent(object component, bool noCustomTypeDesc); + public static EventDescriptor GetDefaultEvent(Type componentType); + public static PropertyDescriptor GetDefaultProperty(object component); + public static PropertyDescriptor GetDefaultProperty(object component, bool noCustomTypeDesc); + public static PropertyDescriptor GetDefaultProperty(Type componentType); + public static object GetEditor(object component, Type editorBaseType); + public static object GetEditor(object component, Type editorBaseType, bool noCustomTypeDesc); + public static object GetEditor(Type type, Type editorBaseType); + public static EventDescriptorCollection GetEvents(object component); + public static EventDescriptorCollection GetEvents(object component, Attribute[] attributes); + public static EventDescriptorCollection GetEvents(object component, Attribute[] attributes, bool noCustomTypeDesc); + public static EventDescriptorCollection GetEvents(object component, bool noCustomTypeDesc); + public static EventDescriptorCollection GetEvents(Type componentType); + public static EventDescriptorCollection GetEvents(Type componentType, Attribute[] attributes); + public static string GetFullComponentName(object component); + public static PropertyDescriptorCollection GetProperties(object component); + public static PropertyDescriptorCollection GetProperties(object component, Attribute[] attributes); + public static PropertyDescriptorCollection GetProperties(object component, Attribute[] attributes, bool noCustomTypeDesc); + public static PropertyDescriptorCollection GetProperties(object component, bool noCustomTypeDesc); + public static PropertyDescriptorCollection GetProperties(Type componentType); + public static PropertyDescriptorCollection GetProperties(Type componentType, Attribute[] attributes); + public static TypeDescriptionProvider GetProvider(object instance); + public static TypeDescriptionProvider GetProvider(Type type); + public static Type GetReflectionType(object instance); + public static Type GetReflectionType(Type type); + public static void Refresh(object component); + public static void Refresh(Assembly assembly); + public static void Refresh(Module module); + public static void Refresh(Type type); + public static void RemoveAssociation(object primary, object secondary); + public static void RemoveAssociations(object primary); + public static void RemoveProvider(TypeDescriptionProvider provider, object instance); + public static void RemoveProvider(TypeDescriptionProvider provider, Type type); + public static void RemoveProviderTransparent(TypeDescriptionProvider provider, object instance); + public static void RemoveProviderTransparent(TypeDescriptionProvider provider, Type type); + public static void SortDescriptorArray(IList infos); } public abstract class TypeListConverter : TypeConverter { protected TypeListConverter(Type[] types); public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); + public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context); + public override bool GetStandardValuesExclusive(ITypeDescriptorContext context); + public override bool GetStandardValuesSupported(ITypeDescriptorContext context); } public class UInt16Converter : BaseNumberConverter { public UInt16Converter(); } public class UInt32Converter : BaseNumberConverter { public UInt32Converter(); } public class UInt64Converter : BaseNumberConverter { public UInt64Converter(); } public class Win32Exception : Exception { public Win32Exception(); public Win32Exception(int error); public Win32Exception(int error, string message); public Win32Exception(string message); public Win32Exception(string message, Exception innerException); public int NativeErrorCode { get; } } } ``` ## .NET Framework vs .NET Core proposed ``` diff --- .NET Framework 4.6.1 +++ .NET Core proposed namespace System.ComponentModel { - public class AddingNewEventArgs : EventArgs { - public AddingNewEventArgs(); - public AddingNewEventArgs(object newObject); - public object NewObject { get; set; } } - public delegate void AddingNewEventHandler(object sender, AddingNewEventArgs e); - public sealed class AmbientValueAttribute : Attribute { - public AmbientValueAttribute(bool value); - public AmbientValueAttribute(byte value); - public AmbientValueAttribute(char value); - public AmbientValueAttribute(double value); - public AmbientValueAttribute(short value); - public AmbientValueAttribute(int value); - public AmbientValueAttribute(long value); - public AmbientValueAttribute(object value); - public AmbientValueAttribute(float value); - public AmbientValueAttribute(string value); - public AmbientValueAttribute(Type type, string value); - public object Value { get; } - public override bool Equals(object obj); - public override int GetHashCode(); } public class ArrayConverter : CollectionConverter { public ArrayConverter(); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes); public override bool GetPropertiesSupported(ITypeDescriptorContext context); } public class AsyncCompletedEventArgs : EventArgs { - public AsyncCompletedEventArgs(); public AsyncCompletedEventArgs(Exception error, bool cancelled, object userState); public bool Cancelled { get; } public Exception Error { get; } public object UserState { get; } protected void RaiseExceptionIfNecessary(); } public delegate void AsyncCompletedEventHandler(object sender, AsyncCompletedEventArgs e); public sealed class AsyncOperation { public SynchronizationContext SynchronizationContext { get; } public object UserSuppliedState { get; } ~AsyncOperation(); public void OperationCompleted(); public void Post(SendOrPostCallback d, object arg); public void PostOperationCompleted(SendOrPostCallback d, object arg); } public static class AsyncOperationManager { public static SynchronizationContext SynchronizationContext { get; set; } public static AsyncOperation CreateOperation(object userSuppliedState); } public class AttributeCollection : ICollection, IEnumerable { public static readonly AttributeCollection Empty; protected AttributeCollection(); public AttributeCollection(params Attribute[] attributes); protected virtual Attribute[] Attributes { get; } public int Count { get; } - int System.Collections.ICollection.Count { get; } bool System.Collections.ICollection.IsSynchronized { get; } object System.Collections.ICollection.SyncRoot { get; } public virtual Attribute this[int index] { get; } public virtual Attribute this[Type attributeType] { get; } public bool Contains(Attribute attribute); public bool Contains(Attribute[] attributes); public void CopyTo(Array array, int index); public static AttributeCollection FromExisting(AttributeCollection existing, params Attribute[] newAttributes); protected Attribute GetDefaultAttribute(Type attributeType); public IEnumerator GetEnumerator(); public bool Matches(Attribute attribute); public bool Matches(Attribute[] attributes); - IEnumerator System.Collections.IEnumerable.GetEnumerator(); } public class AttributeProviderAttribute : Attribute { public AttributeProviderAttribute(string typeName); public AttributeProviderAttribute(string typeName, string propertyName); public AttributeProviderAttribute(Type type); public string PropertyName { get; } public string TypeName { get; } } public class BackgroundWorker : ComponentIDisposable { public BackgroundWorker(); public bool CancellationPending { get; } public bool IsBusy { get; } public bool WorkerReportsProgress { get; set; } public bool WorkerSupportsCancellation { get; set; } public event DoWorkEventHandler DoWork; public event ProgressChangedEventHandler ProgressChanged; public event RunWorkerCompletedEventHandler RunWorkerCompleted; public void CancelAsync(); + public void Dispose(); + protected virtual void Dispose(bool disposing); protected virtual void OnDoWork(DoWorkEventArgs e); protected virtual void OnProgressChanged(ProgressChangedEventArgs e); protected virtual void OnRunWorkerCompleted(RunWorkerCompletedEventArgs e); public void ReportProgress(int percentProgress); public void ReportProgress(int percentProgress, object userState); public void RunWorkerAsync(); public void RunWorkerAsync(object argument); } public abstract class BaseNumberConverter : TypeConverter { protected BaseNumberConverter(); public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override bool CanConvertTo(ITypeDescriptorContext context, Type tdestinationType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); } - public sealed class BindableAttribute : Attribute { - public static readonly BindableAttribute Default; - public static readonly BindableAttribute No; - public static readonly BindableAttribute Yes; - public BindableAttribute(bool bindable); - public BindableAttribute(bool bindable, BindingDirection direction); - public BindableAttribute(BindableSupport flags); - public BindableAttribute(BindableSupport flags, BindingDirection direction); - public bool Bindable { get; } - public BindingDirection Direction { get; } - public override bool Equals(object obj); - public override int GetHashCode(); - public override bool IsDefaultAttribute(); } - public enum BindableSupport { - Default = 2, - No = 0, - Yes = 1, } - public enum BindingDirection { - OneWay = 0, - TwoWay = 1, } - public class BindingList : Collection, IBindingList, ICancelAddNew, ICollection, IEnumerable, IList, IRaiseItemChangedEvents { - public BindingList(); - public BindingList(IList list); - public bool AllowEdit { get; set; } - public bool AllowNew { get; set; } - public bool AllowRemove { get; set; } - protected virtual bool IsSortedCore { get; } - public bool RaiseListChangedEvents { get; set; } - protected virtual ListSortDirection SortDirectionCore { get; } - protected virtual PropertyDescriptor SortPropertyCore { get; } - protected virtual bool SupportsChangeNotificationCore { get; } - protected virtual bool SupportsSearchingCore { get; } - protected virtual bool SupportsSortingCore { get; } - bool System.ComponentModel.IBindingList.AllowEdit { get; } - bool System.ComponentModel.IBindingList.AllowNew { get; } - bool System.ComponentModel.IBindingList.AllowRemove { get; } - bool System.ComponentModel.IBindingList.IsSorted { get; } - ListSortDirection System.ComponentModel.IBindingList.SortDirection { get; } - PropertyDescriptor System.ComponentModel.IBindingList.SortProperty { get; } - bool System.ComponentModel.IBindingList.SupportsChangeNotification { get; } - bool System.ComponentModel.IBindingList.SupportsSearching { get; } - bool System.ComponentModel.IBindingList.SupportsSorting { get; } - bool System.ComponentModel.IRaiseItemChangedEvents.RaisesItemChangedEvents { get; } - public event AddingNewEventHandler AddingNew; - public event ListChangedEventHandler ListChanged; - public T AddNew(); - protected virtual object AddNewCore(); - protected virtual void ApplySortCore(PropertyDescriptor prop, ListSortDirection direction); - public virtual void CancelNew(int itemIndex); - protected override void ClearItems(); - public virtual void EndNew(int itemIndex); - protected virtual int FindCore(PropertyDescriptor prop, object key); - protected override void InsertItem(int index, T item); - protected virtual void OnAddingNew(AddingNewEventArgs e); - protected virtual void OnListChanged(ListChangedEventArgs e); - protected override void RemoveItem(int index); - protected virtual void RemoveSortCore(); - public void ResetBindings(); - public void ResetItem(int position); - protected override void SetItem(int index, T item); - void System.ComponentModel.IBindingList.AddIndex(PropertyDescriptor prop); - object System.ComponentModel.IBindingList.AddNew(); - void System.ComponentModel.IBindingList.ApplySort(PropertyDescriptor prop, ListSortDirection direction); - int System.ComponentModel.IBindingList.Find(PropertyDescriptor prop, object key); - void System.ComponentModel.IBindingList.RemoveIndex(PropertyDescriptor prop); - void System.ComponentModel.IBindingList.RemoveSort(); } public class BooleanConverter : TypeConverter { public BooleanConverter(); public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context); public override bool GetStandardValuesExclusive(ITypeDescriptorContext context); public override bool GetStandardValuesSupported(ITypeDescriptorContext context); } public sealed class BrowsableAttribute : Attribute { public static readonly BrowsableAttribute Default; public static readonly BrowsableAttribute No; public static readonly BrowsableAttribute Yes; public BrowsableAttribute(bool browsable); public bool Browsable { get; } public override bool Equals(object obj); public override int GetHashCode(); - public override bool IsDefaultAttribute(); } public class ByteConverter : BaseNumberConverter { public ByteConverter(); } public class CancelEventArgs : EventArgs { public CancelEventArgs(); public CancelEventArgs(bool cancel); public bool Cancel { get; set; } } public delegate void CancelEventHandler(object sender, CancelEventArgs e); public class CategoryAttribute : Attribute { public CategoryAttribute(); public CategoryAttribute(string category); public static CategoryAttribute Action { get; } public static CategoryAttribute Appearance { get; } public static CategoryAttribute Asynchronous { get; } public static CategoryAttribute Behavior { get; } public string Category { get; } public static CategoryAttribute Data { get; } public static CategoryAttribute Default { get; } public static CategoryAttribute Design { get; } public static CategoryAttribute DragDrop { get; } public static CategoryAttribute Focus { get; } public static CategoryAttribute Format { get; } public static CategoryAttribute Key { get; } public static CategoryAttribute Layout { get; } public static CategoryAttribute Mouse { get; } public static CategoryAttribute WindowStyle { get; } public override bool Equals(object obj); public override int GetHashCode(); protected virtual string GetLocalizedString(string value); - public override bool IsDefaultAttribute(); } public class CharConverter : TypeConverter { public CharConverter(); public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); } public enum CollectionChangeAction { Add = 1, Refresh = 3, Remove = 2, } public class CollectionChangeEventArgs : EventArgs { public CollectionChangeEventArgs(CollectionChangeAction action, object element); public virtual CollectionChangeAction Action { get; } public virtual object Element { get; } } public delegate void CollectionChangeEventHandler(object sender, CollectionChangeEventArgs e); public class CollectionConverter : TypeConverter { public CollectionConverter(); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes); public override bool GetPropertiesSupported(ITypeDescriptorContext context); } - public sealed class ComplexBindingPropertiesAttribute : Attribute { - public static readonly ComplexBindingPropertiesAttribute Default; - public ComplexBindingPropertiesAttribute(); - public ComplexBindingPropertiesAttribute(string dataSource); - public ComplexBindingPropertiesAttribute(string dataSource, string dataMember); - public string DataMember { get; } - public string DataSource { get; } - public override bool Equals(object obj); - public override int GetHashCode(); } - public class Component : MarshalByRefObject, IComponent, IDisposable { - public Component(); - protected virtual bool CanRaiseEvents { get; } - public IContainer Container { get; } - protected bool DesignMode { get; } - protected EventHandlerList Events { get; } - public virtual ISite Site { get; set; } - public event EventHandler Disposed; - public void Dispose(); - protected virtual void Dispose(bool disposing); - ~Component(); - protected virtual object GetService(Type service); - public override string ToString(); } public class ComponentCollection : ReadOnlyCollectionBase { - public ComponentCollection(IComponent[] components); - public virtual IComponent this[int index] { get; } - public virtual IComponent this[string name] { get; } - public void CopyTo(IComponent[] array, int index); } - public class ComponentConverter : ReferenceConverter { - public ComponentConverter(Type type); - public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes); - public override bool GetPropertiesSupported(ITypeDescriptorContext context); } - public abstract class ComponentEditor { - protected ComponentEditor(); - public abstract bool EditComponent(ITypeDescriptorContext context, object component); - public bool EditComponent(object component); } - public class ComponentResourceManager : ResourceManager { - public ComponentResourceManager(); - public ComponentResourceManager(Type t); - public void ApplyResources(object value, string objectName); - public virtual void ApplyResources(object value, string objectName, CultureInfo culture); } - public class Container : IContainer, IDisposable { - public Container(); - public virtual ComponentCollection Components { get; } - public virtual void Add(IComponent component); - public virtual void Add(IComponent component, string name); - protected virtual ISite CreateSite(IComponent component, string name); - public void Dispose(); - protected virtual void Dispose(bool disposing); - ~Container(); - protected virtual object GetService(Type service); - public virtual void Remove(IComponent component); - protected void RemoveWithoutUnsiting(IComponent component); - protected virtual void ValidateName(IComponent component, string name); } - public abstract class ContainerFilterService { - protected ContainerFilterService(); - public virtual ComponentCollection FilterComponents(ComponentCollection components); } - public class CultureInfoConverter : TypeConverter { - public CultureInfoConverter(); - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); - public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType); - public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); - public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); - protected virtual string GetCultureName(CultureInfo culture); - public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context); - public override bool GetStandardValuesExclusive(ITypeDescriptorContext context); - public override bool GetStandardValuesSupported(ITypeDescriptorContext context); } public abstract class CustomTypeDescriptor : ICustomTypeDescriptor { protected CustomTypeDescriptor(); protected CustomTypeDescriptor(ICustomTypeDescriptor parent); public virtual AttributeCollection GetAttributes(); public virtual string GetClassName(); public virtual string GetComponentName(); public virtual TypeConverter GetConverter(); public virtual EventDescriptor GetDefaultEvent(); public virtual PropertyDescriptor GetDefaultProperty(); public virtual object GetEditor(Type editorBaseType); public virtual EventDescriptorCollection GetEvents(); public virtual EventDescriptorCollection GetEvents(Attribute[] attributes); public virtual PropertyDescriptorCollection GetProperties(); public virtual PropertyDescriptorCollection GetProperties(Attribute[] attributes); public virtual object GetPropertyOwner(PropertyDescriptor pd); } public class DataErrorsChangedEventArgs : EventArgs { public DataErrorsChangedEventArgs(string propertyName); public virtual string PropertyName { get; } } - public sealed class DataObjectAttribute : Attribute { - public static readonly DataObjectAttribute DataObject; - public static readonly DataObjectAttribute Default; - public static readonly DataObjectAttribute NonDataObject; - public DataObjectAttribute(); - public DataObjectAttribute(bool isDataObject); - public bool IsDataObject { get; } - public override bool Equals(object obj); - public override int GetHashCode(); - public override bool IsDefaultAttribute(); } - public sealed class DataObjectFieldAttribute : Attribute { - public DataObjectFieldAttribute(bool primaryKey); - public DataObjectFieldAttribute(bool primaryKey, bool isIdentity); - public DataObjectFieldAttribute(bool primaryKey, bool isIdentity, bool isNullable); - public DataObjectFieldAttribute(bool primaryKey, bool isIdentity, bool isNullable, int length); - public bool IsIdentity { get; } - public bool IsNullable { get; } - public int Length { get; } - public bool PrimaryKey { get; } - public override bool Equals(object obj); - public override int GetHashCode(); } - public sealed class DataObjectMethodAttribute : Attribute { - public DataObjectMethodAttribute(DataObjectMethodType methodType); - public DataObjectMethodAttribute(DataObjectMethodType methodType, bool isDefault); - public bool IsDefault { get; } - public DataObjectMethodType MethodType { get; } - public override bool Equals(object obj); - public override int GetHashCode(); - public override bool Match(object obj); } - public enum DataObjectMethodType { - Delete = 4, - Fill = 0, - Insert = 3, - Select = 1, - Update = 2, } public class DateTimeConverter : TypeConverter { public DateTimeConverter(); public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); } public class DateTimeOffsetConverter : TypeConverter { public DateTimeOffsetConverter(); public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); } public class DecimalConverter : BaseNumberConverter { public DecimalConverter(); public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); } - public sealed class DefaultBindingPropertyAttribute : Attribute { - public static readonly DefaultBindingPropertyAttribute Default; - public DefaultBindingPropertyAttribute(); - public DefaultBindingPropertyAttribute(string name); - public string Name { get; } - public override bool Equals(object obj); - public override int GetHashCode(); } public sealed class DefaultEventAttribute : Attribute { public static readonly DefaultEventAttribute Default; public DefaultEventAttribute(string name); public string Name { get; } public override bool Equals(object obj); public override int GetHashCode(); } public sealed class DefaultPropertyAttribute : Attribute { public static readonly DefaultPropertyAttribute Default; public DefaultPropertyAttribute(string name); public string Name { get; } public override bool Equals(object obj); public override int GetHashCode(); } public class DefaultValueAttribute : Attribute { public DefaultValueAttribute(bool value); public DefaultValueAttribute(byte value); public DefaultValueAttribute(char value); public DefaultValueAttribute(double value); public DefaultValueAttribute(short value); public DefaultValueAttribute(int value); public DefaultValueAttribute(long value); public DefaultValueAttribute(object value); public DefaultValueAttribute(float value); public DefaultValueAttribute(string value); public DefaultValueAttribute(Type type, string value); public virtual object Value { get; } public override bool Equals(object obj); public override int GetHashCode(); - protected void SetValue(object value); } public class DescriptionAttribute : Attribute { public static readonly DescriptionAttribute Default; public DescriptionAttribute(); public DescriptionAttribute(string description); public virtual string Description { get; } protected string DescriptionValue { get; set; } public override bool Equals(object obj); public override int GetHashCode(); - public override bool IsDefaultAttribute(); } - public sealed class DesignerAttribute : Attribute { - public DesignerAttribute(string designerTypeName); - public DesignerAttribute(string designerTypeName, string designerBaseTypeName); - public DesignerAttribute(string designerTypeName, Type designerBaseType); - public DesignerAttribute(Type designerType); - public DesignerAttribute(Type designerType, Type designerBaseType); - public string DesignerBaseTypeName { get; } - public string DesignerTypeName { get; } - public override object TypeId { get; } - public override bool Equals(object obj); - public override int GetHashCode(); } public sealed class DesignerCategoryAttribute : Attribute { public static readonly DesignerCategoryAttribute Component; public static readonly DesignerCategoryAttribute Default; public static readonly DesignerCategoryAttribute Form; public static readonly DesignerCategoryAttribute Generic; public DesignerCategoryAttribute(); public DesignerCategoryAttribute(string category); public string Category { get; } - public override object TypeId { get; } public override bool Equals(object obj); public override int GetHashCode(); - public override bool IsDefaultAttribute(); } public enum DesignerSerializationVisibility { Content = 2, Hidden = 0, Visible = 1, } public sealed class DesignerSerializationVisibilityAttribute : Attribute { public static readonly DesignerSerializationVisibilityAttribute Content; public static readonly DesignerSerializationVisibilityAttribute Default; public static readonly DesignerSerializationVisibilityAttribute Hidden; public static readonly DesignerSerializationVisibilityAttribute Visible; public DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility visibility); public DesignerSerializationVisibility Visibility { get; } public override bool Equals(object obj); public override int GetHashCode(); - public override bool IsDefaultAttribute(); } public sealed class DesignOnlyAttribute : Attribute { public static readonly DesignOnlyAttribute Default; public static readonly DesignOnlyAttribute No; public static readonly DesignOnlyAttribute Yes; public DesignOnlyAttribute(bool isDesignOnly); public bool IsDesignOnly { get; } public override bool Equals(object obj); public override int GetHashCode(); - public override bool IsDefaultAttribute(); } - public sealed class DesignTimeVisibleAttribute : Attribute { - public static readonly DesignTimeVisibleAttribute Default; - public static readonly DesignTimeVisibleAttribute No; - public static readonly DesignTimeVisibleAttribute Yes; - public DesignTimeVisibleAttribute(); - public DesignTimeVisibleAttribute(bool visible); - public bool Visible { get; } - public override bool Equals(object obj); - public override int GetHashCode(); - public override bool IsDefaultAttribute(); } public class DisplayNameAttribute : Attribute { public static readonly DisplayNameAttribute Default; public DisplayNameAttribute(); public DisplayNameAttribute(string displayName); public virtual string DisplayName { get; } protected string DisplayNameValue { get; set; } public override bool Equals(object obj); public override int GetHashCode(); - public override bool IsDefaultAttribute(); } public class DoubleConverter : BaseNumberConverter { public DoubleConverter(); } public class DoWorkEventArgs : CancelEventArgsEventArgs { public DoWorkEventArgs(object argument); public object Argument { get; } + public bool Cancel { get; set; } public object Result { get; set; } } public delegate void DoWorkEventHandler(object sender, DoWorkEventArgs e); - public sealed class EditorAttribute : Attribute { - public EditorAttribute(); - public EditorAttribute(string typeName, string baseTypeName); - public EditorAttribute(string typeName, Type baseType); - public EditorAttribute(Type type, Type baseType); - public string EditorBaseTypeName { get; } - public string EditorTypeName { get; } - public override object TypeId { get; } - public override bool Equals(object obj); - public override int GetHashCode(); } public sealed class EditorBrowsableAttribute : Attribute { - public EditorBrowsableAttribute(); public EditorBrowsableAttribute(EditorBrowsableState state); public EditorBrowsableState State { get; } public override bool Equals(object obj); public override int GetHashCode(); } public enum EditorBrowsableState { Advanced = 2, Always = 0, Never = 1, } public class EnumConverter : TypeConverter { public EnumConverter(Type type); protected virtual IComparer Comparer { get; } protected Type EnumType { get; } protected TypeConverter.StandardValuesCollection Values { get; set; } public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context); public override bool GetStandardValuesExclusive(ITypeDescriptorContext context); public override bool GetStandardValuesSupported(ITypeDescriptorContext context); public override bool IsValid(ITypeDescriptorContext context, object value); } public abstract class EventDescriptor : MemberDescriptor { protected EventDescriptor(MemberDescriptor descr); protected EventDescriptor(MemberDescriptor descr, Attribute[] attrs); protected EventDescriptor(string name, Attribute[] attrs); public abstract Type ComponentType { get; } public abstract Type EventType { get; } public abstract bool IsMulticast { get; } public abstract void AddEventHandler(object component, Delegate value); public abstract void RemoveEventHandler(object component, Delegate value); } public class EventDescriptorCollection : ICollection, IEnumerable, IList { public static readonly EventDescriptorCollection Empty; public EventDescriptorCollection(EventDescriptor[] events); public EventDescriptorCollection(EventDescriptor[] events, bool readOnly); public int Count { get; } - int System.Collections.ICollection.Count { get; } bool System.Collections.ICollection.IsSynchronized { get; } object System.Collections.ICollection.SyncRoot { get; } bool System.Collections.IList.IsFixedSize { get; } bool System.Collections.IList.IsReadOnly { get; } object System.Collections.IList.this[int index] { get; set; } public virtual EventDescriptor this[int index] { get; } public virtual EventDescriptor this[string name] { get; } public int Add(EventDescriptor value); public void Clear(); public bool Contains(EventDescriptor value); public virtual EventDescriptor Find(string name, bool ignoreCase); public IEnumerator GetEnumerator(); public int IndexOf(EventDescriptor value); public void Insert(int index, EventDescriptor value); protected void InternalSort(IComparer sorter); protected void InternalSort(string[] names); public void Remove(EventDescriptor value); public void RemoveAt(int index); public virtual EventDescriptorCollection Sort(); public virtual EventDescriptorCollection Sort(IComparer comparer); public virtual EventDescriptorCollection Sort(string[] names); public virtual EventDescriptorCollection Sort(string[] names, IComparer comparer); void System.Collections.ICollection.CopyTo(Array array, int index); - IEnumerator System.Collections.IEnumerable.GetEnumerator(); int System.Collections.IList.Add(object value); - void System.Collections.IList.Clear(); bool System.Collections.IList.Contains(object value); int System.Collections.IList.IndexOf(object value); void System.Collections.IList.Insert(int index, object value); void System.Collections.IList.Remove(object value); - void System.Collections.IList.RemoveAt(int index); } public sealed class EventHandlerList : IDisposable { public EventHandlerList(); public Delegate this[object key] { get; set; } public void AddHandler(object key, Delegate value); public void AddHandlers(EventHandlerList listToAddFrom); public void Dispose(); public void RemoveHandler(object key, Delegate value); } - public class ExpandableObjectConverter : TypeConverter { - public ExpandableObjectConverter(); - public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes); - public override bool GetPropertiesSupported(ITypeDescriptorContext context); } public sealed class ExtenderProvidedPropertyAttribute : Attribute { public ExtenderProvidedPropertyAttribute(); public PropertyDescriptor ExtenderProperty { get; } public IExtenderProvider Provider { get; } public Type ReceiverType { get; } public override bool Equals(object obj); public override int GetHashCode(); - public override bool IsDefaultAttribute(); } public class GuidConverter : TypeConverter { public GuidConverter(); public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); } public class HandledEventArgs : EventArgs { public HandledEventArgs(); public HandledEventArgs(bool defaultHandledValue); public bool Handled { get; set; } } public delegate void HandledEventHandler(object sender, HandledEventArgs e); - public interface IBindingList : ICollection, IEnumerable, IList { - bool AllowEdit { get; } - bool AllowNew { get; } - bool AllowRemove { get; } - bool IsSorted { get; } - ListSortDirection SortDirection { get; } - PropertyDescriptor SortProperty { get; } - bool SupportsChangeNotification { get; } - bool SupportsSearching { get; } - bool SupportsSorting { get; } - event ListChangedEventHandler ListChanged; - void AddIndex(PropertyDescriptor property); - object AddNew(); - void ApplySort(PropertyDescriptor property, ListSortDirection direction); - int Find(PropertyDescriptor property, object key); - void RemoveIndex(PropertyDescriptor property); - void RemoveSort(); } - public interface IBindingListView : IBindingList, ICollection, IEnumerable, IList { - string Filter { get; set; } - ListSortDescriptionCollection SortDescriptions { get; } - bool SupportsAdvancedSorting { get; } - bool SupportsFiltering { get; } - void ApplySort(ListSortDescriptionCollection sorts); - void RemoveFilter(); } - public interface ICancelAddNew { - void CancelNew(int itemIndex); - void EndNew(int itemIndex); } public interface IChangeTracking { bool IsChanged { get; } void AcceptChanges(); } - public interface IComNativeDescriptorHandler { - AttributeCollection GetAttributes(object component); - string GetClassName(object component); - TypeConverter GetConverter(object component); - EventDescriptor GetDefaultEvent(object component); - PropertyDescriptor GetDefaultProperty(object component); - object GetEditor(object component, Type baseEditorType); - EventDescriptorCollection GetEvents(object component); - EventDescriptorCollection GetEvents(object component, Attribute[] attributes); - string GetName(object component); - PropertyDescriptorCollection GetProperties(object component, Attribute[] attributes); - object GetPropertyValue(object component, int dispid, ref bool success); - object GetPropertyValue(object component, string propertyName, ref bool success); } public interface IComponent : IDisposable { ISite Site { get; set; } event EventHandler Disposed; } public interface IContainer : IDisposable { ComponentCollection Components { get; } void Add(IComponent component); void Add(IComponent component, string name); void Remove(IComponent component); } public interface ICustomTypeDescriptor { AttributeCollection GetAttributes(); string GetClassName(); string GetComponentName(); TypeConverter GetConverter(); EventDescriptor GetDefaultEvent(); PropertyDescriptor GetDefaultProperty(); object GetEditor(Type editorBaseType); EventDescriptorCollection GetEvents(); EventDescriptorCollection GetEvents(Attribute[] attributes); PropertyDescriptorCollection GetProperties(); PropertyDescriptorCollection GetProperties(Attribute[] attributes); object GetPropertyOwner(PropertyDescriptor pd); } - public interface IDataErrorInfo { - string Error { get; } - string this[string columnName] { get; } } public interface IEditableObject { void BeginEdit(); void CancelEdit(); void EndEdit(); } public interface IExtenderProvider { bool CanExtend(object extendee); } - public interface IIntellisenseBuilder { - string Name { get; } - bool Show(string language, string value, ref string newValue); } public interface IListSource { bool ContainsListCollection { get; } IList GetList(); } public sealed class ImmutableObjectAttribute : Attribute { public static readonly ImmutableObjectAttribute Default; public static readonly ImmutableObjectAttribute No; public static readonly ImmutableObjectAttribute Yes; public ImmutableObjectAttribute(bool immutable); public bool Immutable { get; } public override bool Equals(object obj); public override int GetHashCode(); - public override bool IsDefaultAttribute(); } - public interface INestedContainer : IContainer, IDisposable { - IComponent Owner { get; } } - public interface INestedSite : IServiceProvider, ISite { - string FullName { get; } } - public sealed class InheritanceAttribute : Attribute { - public static readonly InheritanceAttribute Default; - public static readonly InheritanceAttribute Inherited; - public static readonly InheritanceAttribute InheritedReadOnly; - public static readonly InheritanceAttribute NotInherited; - public InheritanceAttribute(); - public InheritanceAttribute(InheritanceLevel inheritanceLevel); - public InheritanceLevel InheritanceLevel { get; } - public override bool Equals(object value); - public override int GetHashCode(); - public override bool IsDefaultAttribute(); - public override string ToString(); } - public enum InheritanceLevel { - Inherited = 1, - InheritedReadOnly = 2, - NotInherited = 3, } public sealed class InitializationEventAttribute : Attribute { public InitializationEventAttribute(string eventName); public string EventName { get; } } public interface INotifyDataErrorInfo { bool HasErrors { get; } event EventHandler ErrorsChanged; IEnumerable GetErrors(string propertyName); } public interface INotifyPropertyChanged { event PropertyChangedEventHandler PropertyChanged; } public interface INotifyPropertyChanging { event PropertyChangingEventHandler PropertyChanging; } - public class InstallerTypeAttribute : Attribute { - public InstallerTypeAttribute(string typeName); - public InstallerTypeAttribute(Type installerType); - public virtual Type InstallerType { get; } - public override bool Equals(object obj); - public override int GetHashCode(); } - public abstract class InstanceCreationEditor { - protected InstanceCreationEditor(); - public virtual string Text { get; } - public abstract object CreateInstance(ITypeDescriptorContext context, Type instanceType); } public class Int16Converter : BaseNumberConverter { public Int16Converter(); } public class Int32Converter : BaseNumberConverter { public Int32Converter(); } public class Int64Converter : BaseNumberConverter { public Int64Converter(); } public class InvalidAsynchronousStateException : ArgumentException { public InvalidAsynchronousStateException(); - protected InvalidAsynchronousStateException(SerializationInfo info, StreamingContext context); public InvalidAsynchronousStateException(string message); public InvalidAsynchronousStateException(string message, Exception innerException); } - public class InvalidEnumArgumentException : ArgumentException { - public InvalidEnumArgumentException(); - protected InvalidEnumArgumentException(SerializationInfo info, StreamingContext context); - public InvalidEnumArgumentException(string message); - public InvalidEnumArgumentException(string message, Exception innerException); - public InvalidEnumArgumentException(string argumentName, int invalidValue, Type enumClass); } - public interface IRaiseItemChangedEvents { - bool RaisesItemChangedEvents { get; } } public interface IRevertibleChangeTracking : IChangeTracking { void RejectChanges(); } public interface ISite : IServiceProvider { IComponent Component { get; } IContainer Container { get; } bool DesignMode { get; } string Name { get; set; } } - public interface ISupportInitialize { - void BeginInit(); - void EndInit(); } - public interface ISupportInitializeNotification : ISupportInitialize { - bool IsInitialized { get; } - event EventHandler Initialized; } - public interface ISynchronizeInvoke { - bool InvokeRequired { get; } - IAsyncResult BeginInvoke(Delegate method, object[] args); - object EndInvoke(IAsyncResult result); - object Invoke(Delegate method, object[] args); } public interface ITypeDescriptorContext : IServiceProvider { IContainer Container { get; } object Instance { get; } PropertyDescriptor PropertyDescriptor { get; } void OnComponentChanged(); bool OnComponentChanging(); } public interface ITypedList { PropertyDescriptorCollection GetItemProperties(PropertyDescriptor[] listAccessors); string GetListName(PropertyDescriptor[] listAccessors); } - public abstract class License : IDisposable { - protected License(); - public abstract string LicenseKey { get; } - public abstract void Dispose(); } - public class LicenseContext : IServiceProvider { - public LicenseContext(); - public virtual LicenseUsageMode UsageMode { get; } - public virtual string GetSavedLicenseKey(Type type, Assembly resourceAssembly); - public virtual object GetService(Type type); - public virtual void SetSavedLicenseKey(Type type, string key); } - public class LicenseException : SystemException { - protected LicenseException(SerializationInfo info, StreamingContext context); - public LicenseException(Type type); - public LicenseException(Type type, object instance); - public LicenseException(Type type, object instance, string message); - public LicenseException(Type type, object instance, string message, Exception innerException); - public Type LicensedType { get; } - public override void GetObjectData(SerializationInfo info, StreamingContext context); } - public sealed class LicenseManager { - public static LicenseContext CurrentContext { get; set; } - public static LicenseUsageMode UsageMode { get; } - public static object CreateWithContext(Type type, LicenseContext creationContext); - public static object CreateWithContext(Type type, LicenseContext creationContext, object[] args); - public static bool IsLicensed(Type type); - public static bool IsValid(Type type); - public static bool IsValid(Type type, object instance, out License license); - public static void LockContext(object contextUser); - public static void UnlockContext(object contextUser); - public static void Validate(Type type); - public static License Validate(Type type, object instance); } - public abstract class LicenseProvider { - protected LicenseProvider(); - public abstract License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions); } - public sealed class LicenseProviderAttribute : Attribute { - public static readonly LicenseProviderAttribute Default; - public LicenseProviderAttribute(); - public LicenseProviderAttribute(string typeName); - public LicenseProviderAttribute(Type type); - public Type LicenseProvider { get; } - public override object TypeId { get; } - public override bool Equals(object value); - public override int GetHashCode(); } - public enum LicenseUsageMode { - Designtime = 1, - Runtime = 0, } - public class LicFileLicenseProvider : LicenseProvider { - public LicFileLicenseProvider(); - protected virtual string GetKey(Type type); - public override License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions); - protected virtual bool IsKeyValid(string key, Type type); } - public sealed class ListBindableAttribute : Attribute { - public static readonly ListBindableAttribute Default; - public static readonly ListBindableAttribute No; - public static readonly ListBindableAttribute Yes; - public ListBindableAttribute(bool listBindable); - public ListBindableAttribute(BindableSupport flags); - public bool ListBindable { get; } - public override bool Equals(object obj); - public override int GetHashCode(); - public override bool IsDefaultAttribute(); } - public class ListChangedEventArgs : EventArgs { - public ListChangedEventArgs(ListChangedType listChangedType, PropertyDescriptor propDesc); - public ListChangedEventArgs(ListChangedType listChangedType, int newIndex); - public ListChangedEventArgs(ListChangedType listChangedType, int newIndex, PropertyDescriptor propDesc); - public ListChangedEventArgs(ListChangedType listChangedType, int newIndex, int oldIndex); - public ListChangedType ListChangedType { get; } - public int NewIndex { get; } - public int OldIndex { get; } - public PropertyDescriptor PropertyDescriptor { get; } } - public delegate void ListChangedEventHandler(object sender, ListChangedEventArgs e); - public enum ListChangedType { - ItemAdded = 1, - ItemChanged = 4, - ItemDeleted = 2, - ItemMoved = 3, - PropertyDescriptorAdded = 5, - PropertyDescriptorChanged = 7, - PropertyDescriptorDeleted = 6, - Reset = 0, } - public class ListSortDescription { - public ListSortDescription(PropertyDescriptor property, ListSortDirection direction); - public PropertyDescriptor PropertyDescriptor { get; set; } - public ListSortDirection SortDirection { get; set; } } - public class ListSortDescriptionCollection : ICollection, IEnumerable, IList { - public ListSortDescriptionCollection(); - public ListSortDescriptionCollection(ListSortDescription[] sorts); - public int Count { get; } - bool System.Collections.ICollection.IsSynchronized { get; } - object System.Collections.ICollection.SyncRoot { get; } - bool System.Collections.IList.IsFixedSize { get; } - bool System.Collections.IList.IsReadOnly { get; } - object System.Collections.IList.this[int index] { get; set; } - public ListSortDescription this[int index] { get; set; } - public bool Contains(object value); - public void CopyTo(Array array, int index); - public int IndexOf(object value); - IEnumerator System.Collections.IEnumerable.GetEnumerator(); - int System.Collections.IList.Add(object value); - void System.Collections.IList.Clear(); - void System.Collections.IList.Insert(int index, object value); - void System.Collections.IList.Remove(object value); - void System.Collections.IList.RemoveAt(int index); } - public enum ListSortDirection { - Ascending = 0, - Descending = 1, } public sealed class LocalizableAttribute : Attribute { public static readonly LocalizableAttribute Default; public static readonly LocalizableAttribute No; public static readonly LocalizableAttribute Yes; public LocalizableAttribute(bool isLocalizable); public bool IsLocalizable { get; } public override bool Equals(object obj); public override int GetHashCode(); - public override bool IsDefaultAttribute(); } - public sealed class LookupBindingPropertiesAttribute : Attribute { - public static readonly LookupBindingPropertiesAttribute Default; - public LookupBindingPropertiesAttribute(); - public LookupBindingPropertiesAttribute(string dataSource, string displayMember, string valueMember, string lookupMember); - public string DataSource { get; } - public string DisplayMember { get; } - public string LookupMember { get; } - public string ValueMember { get; } - public override bool Equals(object obj); - public override int GetHashCode(); } - public class MarshalByValueComponent : IComponent, IDisposable, IServiceProvider { - public MarshalByValueComponent(); - public virtual IContainer Container { get; } - public virtual bool DesignMode { get; } - protected EventHandlerList Events { get; } - public virtual ISite Site { get; set; } - public event EventHandler Disposed; - public void Dispose(); - protected virtual void Dispose(bool disposing); - ~MarshalByValueComponent(); - public virtual object GetService(Type service); - public override string ToString(); } - public class MaskedTextProvider : ICloneable { - public MaskedTextProvider(string mask); - public MaskedTextProvider(string mask, bool restrictToAscii); - public MaskedTextProvider(string mask, char passwordChar, bool allowPromptAsInput); - public MaskedTextProvider(string mask, CultureInfo culture); - public MaskedTextProvider(string mask, CultureInfo culture, bool restrictToAscii); - public MaskedTextProvider(string mask, CultureInfo culture, bool allowPromptAsInput, char promptChar, char passwordChar, bool restrictToAscii); - public MaskedTextProvider(string mask, CultureInfo culture, char passwordChar, bool allowPromptAsInput); - public bool AllowPromptAsInput { get; } - public bool AsciiOnly { get; } - public int AssignedEditPositionCount { get; } - public int AvailableEditPositionCount { get; } - public CultureInfo Culture { get; } - public static char DefaultPasswordChar { get; } - public int EditPositionCount { get; } - public IEnumerator EditPositions { get; } - public bool IncludeLiterals { get; set; } - public bool IncludePrompt { get; set; } - public static int InvalidIndex { get; } - public bool IsPassword { get; set; } - public int LastAssignedPosition { get; } - public int Length { get; } - public string Mask { get; } - public bool MaskCompleted { get; } - public bool MaskFull { get; } - public char PasswordChar { get; set; } - public char PromptChar { get; set; } - public bool ResetOnPrompt { get; set; } - public bool ResetOnSpace { get; set; } - public bool SkipLiterals { get; set; } - public char this[int index] { get; } - public bool Add(char input); - public bool Add(char input, out int testPosition, out MaskedTextResultHint resultHint); - public bool Add(string input); - public bool Add(string input, out int testPosition, out MaskedTextResultHint resultHint); - public void Clear(); - public void Clear(out MaskedTextResultHint resultHint); - public object Clone(); - public int FindAssignedEditPositionFrom(int position, bool direction); - public int FindAssignedEditPositionInRange(int startPosition, int endPosition, bool direction); - public int FindEditPositionFrom(int position, bool direction); - public int FindEditPositionInRange(int startPosition, int endPosition, bool direction); - public int FindNonEditPositionFrom(int position, bool direction); - public int FindNonEditPositionInRange(int startPosition, int endPosition, bool direction); - public int FindUnassignedEditPositionFrom(int position, bool direction); - public int FindUnassignedEditPositionInRange(int startPosition, int endPosition, bool direction); - public static bool GetOperationResultFromHint(MaskedTextResultHint hint); - public bool InsertAt(char input, int position); - public bool InsertAt(char input, int position, out int testPosition, out MaskedTextResultHint resultHint); - public bool InsertAt(string input, int position); - public bool InsertAt(string input, int position, out int testPosition, out MaskedTextResultHint resultHint); - public bool IsAvailablePosition(int position); - public bool IsEditPosition(int position); - public static bool IsValidInputChar(char c); - public static bool IsValidMaskChar(char c); - public static bool IsValidPasswordChar(char c); - public bool Remove(); - public bool Remove(out int testPosition, out MaskedTextResultHint resultHint); - public bool RemoveAt(int position); - public bool RemoveAt(int startPosition, int endPosition); - public bool RemoveAt(int startPosition, int endPosition, out int testPosition, out MaskedTextResultHint resultHint); - public bool Replace(char input, int position); - public bool Replace(char input, int position, out int testPosition, out MaskedTextResultHint resultHint); - public bool Replace(char input, int startPosition, int endPosition, out int testPosition, out MaskedTextResultHint resultHint); - public bool Replace(string input, int position); - public bool Replace(string input, int position, out int testPosition, out MaskedTextResultHint resultHint); - public bool Replace(string input, int startPosition, int endPosition, out int testPosition, out MaskedTextResultHint resultHint); - public bool Set(string input); - public bool Set(string input, out int testPosition, out MaskedTextResultHint resultHint); - public string ToDisplayString(); - public override string ToString(); - public string ToString(bool ignorePasswordChar); - public string ToString(bool includePrompt, bool includeLiterals); - public string ToString(bool ignorePasswordChar, bool includePrompt, bool includeLiterals, int startPosition, int length); - public string ToString(bool includePrompt, bool includeLiterals, int startPosition, int length); - public string ToString(bool ignorePasswordChar, int startPosition, int length); - public string ToString(int startPosition, int length); - public bool VerifyChar(char input, int position, out MaskedTextResultHint hint); - public bool VerifyEscapeChar(char input, int position); - public bool VerifyString(string input); - public bool VerifyString(string input, out int testPosition, out MaskedTextResultHint resultHint); } - public enum MaskedTextResultHint { - AlphanumericCharacterExpected = -2, - AsciiCharacterExpected = -1, - CharacterEscaped = 1, - DigitExpected = -3, - InvalidInput = -51, - LetterExpected = -4, - NoEffect = 2, - NonEditPosition = -54, - PositionOutOfRange = -55, - PromptCharNotAllowed = -52, - SideEffect = 3, - SignedDigitExpected = -5, - Success = 4, - UnavailableEditPosition = -53, - Unknown = 0, } public abstract class MemberDescriptor { protected MemberDescriptor(MemberDescriptor descr); protected MemberDescriptor(MemberDescriptor oldMemberDescriptor, Attribute[] newAttributes); protected MemberDescriptor(string name); protected MemberDescriptor(string name, Attribute[] attributes); protected virtual Attribute[] AttributeArray { get; set; } public virtual AttributeCollection Attributes { get; } public virtual string Category { get; } public virtual string Description { get; } public virtual bool DesignTimeOnly { get; } public virtual string DisplayName { get; } public virtual bool IsBrowsable { get; } public virtual string Name { get; } protected virtual int NameHashCode { get; } protected virtual AttributeCollection CreateAttributeCollection(); public override bool Equals(object obj); protected virtual void FillAttributes(IList attributeList); protected static MethodInfo FindMethod(Type componentClass, string name, Type[] args, Type returnType); protected static MethodInfo FindMethod(Type componentClass, string name, Type[] args, Type returnType, bool publicOnly); public override int GetHashCode(); protected virtual object GetInvocationTarget(Type type, object instance); - protected static object GetInvokee(Type componentClass, object component); protected static ISite GetSite(object component); } public sealed class MergablePropertyAttribute : Attribute { public static readonly MergablePropertyAttribute Default; public static readonly MergablePropertyAttribute No; public static readonly MergablePropertyAttribute Yes; public MergablePropertyAttribute(bool allowMerge); public bool AllowMerge { get; } public override bool Equals(object obj); public override int GetHashCode(); - public override bool IsDefaultAttribute(); } public class MultilineStringConverter : TypeConverter { public MultilineStringConverter(); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes); public override bool GetPropertiesSupported(ITypeDescriptorContext context); } - public class NestedContainer : Container, IContainer, IDisposable, INestedContainer { - public NestedContainer(IComponent owner); - public IComponent Owner { get; } - protected virtual string OwnerName { get; } - protected override ISite CreateSite(IComponent component, string name); - protected override void Dispose(bool disposing); - protected override object GetService(Type service); } public sealed class NotifyParentPropertyAttribute : Attribute { public static readonly NotifyParentPropertyAttribute Default; public static readonly NotifyParentPropertyAttribute No; public static readonly NotifyParentPropertyAttribute Yes; public NotifyParentPropertyAttribute(bool notifyParent); public bool NotifyParent { get; } public override bool Equals(object obj); public override int GetHashCode(); - public override bool IsDefaultAttribute(); } public class NullableConverter : TypeConverter { public NullableConverter(Type type); public Type NullableType { get; } public Type UnderlyingType { get; } public TypeConverter UnderlyingTypeConverter { get; } public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); public override object CreateInstance(ITypeDescriptorContext context, IDictionary propertyValues); public override bool GetCreateInstanceSupported(ITypeDescriptorContext context); public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes); public override bool GetPropertiesSupported(ITypeDescriptorContext context); public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context); public override bool GetStandardValuesExclusive(ITypeDescriptorContext context); public override bool GetStandardValuesSupported(ITypeDescriptorContext context); public override bool IsValid(ITypeDescriptorContext context, object value); } public sealed class ParenthesizePropertyNameAttribute : Attribute { public static readonly ParenthesizePropertyNameAttribute Default; public ParenthesizePropertyNameAttribute(); public ParenthesizePropertyNameAttribute(bool needParenthesis); public bool NeedParenthesis { get; } public override bool Equals(object o); public override int GetHashCode(); - public override bool IsDefaultAttribute(); } - public sealed class PasswordPropertyTextAttribute : Attribute { - public static readonly PasswordPropertyTextAttribute Default; - public static readonly PasswordPropertyTextAttribute No; - public static readonly PasswordPropertyTextAttribute Yes; - public PasswordPropertyTextAttribute(); - public PasswordPropertyTextAttribute(bool password); - public bool Password { get; } - public override bool Equals(object o); - public override int GetHashCode(); - public override bool IsDefaultAttribute(); } public class ProgressChangedEventArgs : EventArgs { public ProgressChangedEventArgs(int progressPercentage, object userState); public int ProgressPercentage { get; } public object UserState { get; } } public delegate void ProgressChangedEventHandler(object sender, ProgressChangedEventArgs e); public class PropertyChangedEventArgs : EventArgs { public PropertyChangedEventArgs(string propertyName); public virtual string PropertyName { get; } } public delegate void PropertyChangedEventHandler(object sender, PropertyChangedEventArgs e); public class PropertyChangingEventArgs : EventArgs { public PropertyChangingEventArgs(string propertyName); public virtual string PropertyName { get; } } public delegate void PropertyChangingEventHandler(object sender, PropertyChangingEventArgs e); public abstract class PropertyDescriptor : MemberDescriptor { protected PropertyDescriptor(MemberDescriptor descr); protected PropertyDescriptor(MemberDescriptor descr, Attribute[] attrs); protected PropertyDescriptor(string name, Attribute[] attrs); public abstract Type ComponentType { get; } public virtual TypeConverter Converter { get; } public virtual bool IsLocalizable { get; } public abstract bool IsReadOnly { get; } public abstract Type PropertyType { get; } public DesignerSerializationVisibility SerializationVisibility { get; } public virtual bool SupportsChangeEvents { get; } public virtual void AddValueChanged(object component, EventHandler handler); public abstract bool CanResetValue(object component); protected object CreateInstance(Type type); public override bool Equals(object obj); protected override void FillAttributes(IList attributeList); public PropertyDescriptorCollection GetChildProperties(); public PropertyDescriptorCollection GetChildProperties(Attribute[] filter); public PropertyDescriptorCollection GetChildProperties(object instance); public virtual PropertyDescriptorCollection GetChildProperties(object instance, Attribute[] filter); public virtual object GetEditor(Type editorBaseType); public override int GetHashCode(); protected override object GetInvocationTarget(Type type, object instance); protected Type GetTypeFromName(string typeName); public abstract object GetValue(object component); protected internal EventHandler GetValueChangedHandler(object component); protected virtual void OnValueChanged(object component, EventArgs e); public virtual void RemoveValueChanged(object component, EventHandler handler); public abstract void ResetValue(object component); public abstract void SetValue(object component, object value); public abstract bool ShouldSerializeValue(object component); } public class PropertyDescriptorCollection : ICollection, IDictionary, IEnumerable, IList { public static readonly PropertyDescriptorCollection Empty; public PropertyDescriptorCollection(PropertyDescriptor[] properties); public PropertyDescriptorCollection(PropertyDescriptor[] properties, bool readOnly); public int Count { get; } - int System.Collections.ICollection.Count { get; } bool System.Collections.ICollection.IsSynchronized { get; } object System.Collections.ICollection.SyncRoot { get; } bool System.Collections.IDictionary.IsFixedSize { get; } bool System.Collections.IDictionary.IsReadOnly { get; } object System.Collections.IDictionary.this[object key] { get; set; } ICollection System.Collections.IDictionary.Keys { get; } ICollection System.Collections.IDictionary.Values { get; } bool System.Collections.IList.IsFixedSize { get; } bool System.Collections.IList.IsReadOnly { get; } object System.Collections.IList.this[int index] { get; set; } public virtual PropertyDescriptor this[int index] { get; } public virtual PropertyDescriptor this[string name] { get; } public int Add(PropertyDescriptor value); public void Clear(); public bool Contains(PropertyDescriptor value); public void CopyTo(Array array, int index); public virtual PropertyDescriptor Find(string name, bool ignoreCase); public virtual IEnumerator GetEnumerator(); public int IndexOf(PropertyDescriptor value); public void Insert(int index, PropertyDescriptor value); protected void InternalSort(IComparer sorter); protected void InternalSort(string[] names); public void Remove(PropertyDescriptor value); public void RemoveAt(int index); public virtual PropertyDescriptorCollection Sort(); public virtual PropertyDescriptorCollection Sort(IComparer comparer); public virtual PropertyDescriptorCollection Sort(string[] names); public virtual PropertyDescriptorCollection Sort(string[] names, IComparer comparer); void System.Collections.IDictionary.Add(object key, object value); - void System.Collections.IDictionary.Clear(); bool System.Collections.IDictionary.Contains(object key); IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator(); void System.Collections.IDictionary.Remove(object key); - IEnumerator System.Collections.IEnumerable.GetEnumerator(); int System.Collections.IList.Add(object value); - void System.Collections.IList.Clear(); bool System.Collections.IList.Contains(object value); int System.Collections.IList.IndexOf(object value); void System.Collections.IList.Insert(int index, object value); void System.Collections.IList.Remove(object value); - void System.Collections.IList.RemoveAt(int index); } - public class PropertyTabAttribute : Attribute { - public PropertyTabAttribute(); - public PropertyTabAttribute(string tabClassName); - public PropertyTabAttribute(string tabClassName, PropertyTabScope tabScope); - public PropertyTabAttribute(Type tabClass); - public PropertyTabAttribute(Type tabClass, PropertyTabScope tabScope); - public Type[] TabClasses { get; } - protected string[] TabClassNames { get; } - public PropertyTabScope[] TabScopes { get; } - public bool Equals(PropertyTabAttribute other); - public override bool Equals(object other); - public override int GetHashCode(); - protected void InitializeArrays(string[] tabClassNames, PropertyTabScope[] tabScopes); - protected void InitializeArrays(Type[] tabClasses, PropertyTabScope[] tabScopes); } - public enum PropertyTabScope { - Component = 3, - Document = 2, - Global = 1, - Static = 0, } public sealed class ProvidePropertyAttribute : Attribute { public ProvidePropertyAttribute(string propertyName, string receiverTypeName); public ProvidePropertyAttribute(string propertyName, Type receiverType); public string PropertyName { get; } public string ReceiverTypeName { get; } - public override object TypeId { get; } public override bool Equals(object obj); public override int GetHashCode(); } public sealed class ReadOnlyAttribute : Attribute { public static readonly ReadOnlyAttribute Default; public static readonly ReadOnlyAttribute No; public static readonly ReadOnlyAttribute Yes; public ReadOnlyAttribute(bool isReadOnly); public bool IsReadOnly { get; } public override bool Equals(object value); public override int GetHashCode(); - public override bool IsDefaultAttribute(); } - public class RecommendedAsConfigurableAttribute : Attribute { - public static readonly RecommendedAsConfigurableAttribute Default; - public static readonly RecommendedAsConfigurableAttribute No; - public static readonly RecommendedAsConfigurableAttribute Yes; - public RecommendedAsConfigurableAttribute(bool recommendedAsConfigurable); - public bool RecommendedAsConfigurable { get; } - public override bool Equals(object obj); - public override int GetHashCode(); - public override bool IsDefaultAttribute(); } - public class ReferenceConverter : TypeConverter { - public ReferenceConverter(Type type); - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); - public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); - public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); - public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context); - public override bool GetStandardValuesExclusive(ITypeDescriptorContext context); - public override bool GetStandardValuesSupported(ITypeDescriptorContext context); - protected virtual bool IsValueAllowed(ITypeDescriptorContext context, object value); } public class RefreshEventArgs : EventArgs { public RefreshEventArgs(object componentChanged); public RefreshEventArgs(Type typeChanged); public object ComponentChanged { get; } public Type TypeChanged { get; } } public delegate void RefreshEventHandler(RefreshEventArgs e); public enum RefreshProperties { All = 1, None = 0, Repaint = 2, } public sealed class RefreshPropertiesAttribute : Attribute { public static readonly RefreshPropertiesAttribute All; public static readonly RefreshPropertiesAttribute Default; public static readonly RefreshPropertiesAttribute Repaint; public RefreshPropertiesAttribute(RefreshProperties refresh); public RefreshProperties RefreshProperties { get; } public override bool Equals(object value); public override int GetHashCode(); - public override bool IsDefaultAttribute(); } - public class RunInstallerAttribute : Attribute { - public static readonly RunInstallerAttribute Default; - public static readonly RunInstallerAttribute No; - public static readonly RunInstallerAttribute Yes; - public RunInstallerAttribute(bool runInstaller); - public bool RunInstaller { get; } - public override bool Equals(object obj); - public override int GetHashCode(); - public override bool IsDefaultAttribute(); } public class RunWorkerCompletedEventArgs : AsyncCompletedEventArgs { public RunWorkerCompletedEventArgs(object result, Exception error, bool cancelled); public object Result { get; } public new object UserState { get; } } public delegate void RunWorkerCompletedEventHandler(object sender, RunWorkerCompletedEventArgs e); public class SByteConverter : BaseNumberConverter { public SByteConverter(); } - public sealed class SettingsBindableAttribute : Attribute { - public static readonly SettingsBindableAttribute No; - public static readonly SettingsBindableAttribute Yes; - public SettingsBindableAttribute(bool bindable); - public bool Bindable { get; } - public override bool Equals(object obj); - public override int GetHashCode(); } public class SingleConverter : BaseNumberConverter { public SingleConverter(); } public class StringConverter : TypeConverter { public StringConverter(); public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); } - public static class SyntaxCheck { - public static bool CheckMachineName(string value); - public static bool CheckPath(string value); - public static bool CheckRootedPath(string value); } public class TimeSpanConverter : TypeConverter { public TimeSpanConverter(); public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); } - public class ToolboxItemAttribute : Attribute { - public static readonly ToolboxItemAttribute Default; - public static readonly ToolboxItemAttribute None; - public ToolboxItemAttribute(bool defaultType); - public ToolboxItemAttribute(string toolboxItemTypeName); - public ToolboxItemAttribute(Type toolboxItemType); - public Type ToolboxItemType { get; } - public string ToolboxItemTypeName { get; } - public override bool Equals(object obj); - public override int GetHashCode(); - public override bool IsDefaultAttribute(); } - public sealed class ToolboxItemFilterAttribute : Attribute { - public ToolboxItemFilterAttribute(string filterString); - public ToolboxItemFilterAttribute(string filterString, ToolboxItemFilterType filterType); - public string FilterString { get; } - public ToolboxItemFilterType FilterType { get; } - public override object TypeId { get; } - public override bool Equals(object obj); - public override int GetHashCode(); - public override bool Match(object obj); - public override string ToString(); } - public enum ToolboxItemFilterType { - Allow = 0, - Custom = 1, - Prevent = 2, - Require = 3, } public class TypeConverter { public TypeConverter(); public virtual bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public bool CanConvertFrom(Type sourceType); public virtual bool CanConvertTo(ITypeDescriptorContext context, Type destinationType); public bool CanConvertTo(Type destinationType); public virtual object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public object ConvertFrom(object value); public object ConvertFromInvariantString(ITypeDescriptorContext context, string text); public object ConvertFromInvariantString(string text); public object ConvertFromString(ITypeDescriptorContext context, CultureInfo culture, string text); public object ConvertFromString(ITypeDescriptorContext context, string text); public object ConvertFromString(string text); public virtual object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); public object ConvertTo(object value, Type destinationType); public string ConvertToInvariantString(ITypeDescriptorContext context, object value); public string ConvertToInvariantString(object value); public string ConvertToString(ITypeDescriptorContext context, CultureInfo culture, object value); public string ConvertToString(ITypeDescriptorContext context, object value); public string ConvertToString(object value); public object CreateInstance(IDictionary propertyValues); public virtual object CreateInstance(ITypeDescriptorContext context, IDictionary propertyValues); protected Exception GetConvertFromException(object value); protected Exception GetConvertToException(object value, Type destinationType); public bool GetCreateInstanceSupported(); public virtual bool GetCreateInstanceSupported(ITypeDescriptorContext context); public PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value); public virtual PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes); public PropertyDescriptorCollection GetProperties(object value); public bool GetPropertiesSupported(); public virtual bool GetPropertiesSupported(ITypeDescriptorContext context); public ICollection GetStandardValues(); public virtual TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context); public bool GetStandardValuesExclusive(); public virtual bool GetStandardValuesExclusive(ITypeDescriptorContext context); public bool GetStandardValuesSupported(); public virtual bool GetStandardValuesSupported(ITypeDescriptorContext context); public virtual bool IsValid(ITypeDescriptorContext context, object value); public bool IsValid(object value); protected PropertyDescriptorCollection SortProperties(PropertyDescriptorCollection props, string[] names); protected abstract class SimplePropertyDescriptor : PropertyDescriptor { protected SimplePropertyDescriptor(Type componentType, string name, Type propertyType); protected SimplePropertyDescriptor(Type componentType, string name, Type propertyType, Attribute[] attributes); public override Type ComponentType { get; } public override bool IsReadOnly { get; } public override Type PropertyType { get; } public override bool CanResetValue(object component); public override void ResetValue(object component); public override bool ShouldSerializeValue(object component); } public class StandardValuesCollection : ICollection, IEnumerable { public StandardValuesCollection(ICollection values); public int Count { get; } - int System.Collections.ICollection.Count { get; } bool System.Collections.ICollection.IsSynchronized { get; } object System.Collections.ICollection.SyncRoot { get; } public object this[int index] { get; } public void CopyTo(Array array, int index); public IEnumerator GetEnumerator(); - void System.Collections.ICollection.CopyTo(Array array, int index); - IEnumerator System.Collections.IEnumerable.GetEnumerator(); } } public sealed class TypeConverterAttribute : Attribute { public static readonly TypeConverterAttribute Default; public TypeConverterAttribute(); public TypeConverterAttribute(string typeName); public TypeConverterAttribute(Type type); public string ConverterTypeName { get; } public override bool Equals(object obj); public override int GetHashCode(); } public abstract class TypeDescriptionProvider { protected TypeDescriptionProvider(); protected TypeDescriptionProvider(TypeDescriptionProvider parent); public virtual object CreateInstance(IServiceProvider provider, Type objectType, Type[] argTypes, object[] args); public virtual IDictionary GetCache(object instance); public virtual ICustomTypeDescriptor GetExtendedTypeDescriptor(object instance); protected internal virtual IExtenderProvider[] GetExtenderProviders(object instance); public virtual string GetFullComponentName(object component); public Type GetReflectionType(object instance); public Type GetReflectionType(Type objectType); public virtual Type GetReflectionType(Type objectType, object instance); public virtual Type GetRuntimeType(Type reflectionType); public ICustomTypeDescriptor GetTypeDescriptor(object instance); public ICustomTypeDescriptor GetTypeDescriptor(Type objectType); public virtual ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object instance); public virtual bool IsSupportedType(Type type); } public sealed class TypeDescriptionProviderAttribute : Attribute { public TypeDescriptionProviderAttribute(string typeName); public TypeDescriptionProviderAttribute(Type type); public string TypeName { get; } } public sealed class TypeDescriptor { - public static IComNativeDescriptorHandler ComNativeDescriptorHandler { get; set; } - public static Type ComObjectType { get; } public static Type InterfaceType { get; } public static event RefreshEventHandler Refreshed; public static TypeDescriptionProvider AddAttributes(object instance, params Attribute[] attributes); public static TypeDescriptionProvider AddAttributes(Type type, params Attribute[] attributes); public static void AddEditorTable(Type editorBaseType, Hashtable table); public static void AddProvider(TypeDescriptionProvider provider, object instance); public static void AddProvider(TypeDescriptionProvider provider, Type type); public static void AddProviderTransparent(TypeDescriptionProvider provider, object instance); public static void AddProviderTransparent(TypeDescriptionProvider provider, Type type); public static void CreateAssociation(object primary, object secondary); - public static IDesigner CreateDesigner(IComponent component, Type designerBaseType); public static EventDescriptor CreateEvent(Type componentType, EventDescriptor oldEventDescriptor, params Attribute[] attributes); public static EventDescriptor CreateEvent(Type componentType, string name, Type type, params Attribute[] attributes); public static object CreateInstance(IServiceProvider provider, Type objectType, Type[] argTypes, object[] args); public static PropertyDescriptor CreateProperty(Type componentType, PropertyDescriptor oldPropertyDescriptor, params Attribute[] attributes); public static PropertyDescriptor CreateProperty(Type componentType, string name, Type type, params Attribute[] attributes); public static object GetAssociation(Type type, object primary); public static AttributeCollection GetAttributes(object component); public static AttributeCollection GetAttributes(object component, bool noCustomTypeDesc); public static AttributeCollection GetAttributes(Type componentType); public static string GetClassName(object component); public static string GetClassName(object component, bool noCustomTypeDesc); public static string GetClassName(Type componentType); public static string GetComponentName(object component); public static string GetComponentName(object component, bool noCustomTypeDesc); public static TypeConverter GetConverter(object component); public static TypeConverter GetConverter(object component, bool noCustomTypeDesc); public static TypeConverter GetConverter(Type type); public static EventDescriptor GetDefaultEvent(object component); public static EventDescriptor GetDefaultEvent(object component, bool noCustomTypeDesc); public static EventDescriptor GetDefaultEvent(Type componentType); public static PropertyDescriptor GetDefaultProperty(object component); public static PropertyDescriptor GetDefaultProperty(object component, bool noCustomTypeDesc); public static PropertyDescriptor GetDefaultProperty(Type componentType); public static object GetEditor(object component, Type editorBaseType); public static object GetEditor(object component, Type editorBaseType, bool noCustomTypeDesc); public static object GetEditor(Type type, Type editorBaseType); public static EventDescriptorCollection GetEvents(object component); public static EventDescriptorCollection GetEvents(object component, Attribute[] attributes); public static EventDescriptorCollection GetEvents(object component, Attribute[] attributes, bool noCustomTypeDesc); public static EventDescriptorCollection GetEvents(object component, bool noCustomTypeDesc); public static EventDescriptorCollection GetEvents(Type componentType); public static EventDescriptorCollection GetEvents(Type componentType, Attribute[] attributes); public static string GetFullComponentName(object component); public static PropertyDescriptorCollection GetProperties(object component); public static PropertyDescriptorCollection GetProperties(object component, Attribute[] attributes); public static PropertyDescriptorCollection GetProperties(object component, Attribute[] attributes, bool noCustomTypeDesc); public static PropertyDescriptorCollection GetProperties(object component, bool noCustomTypeDesc); public static PropertyDescriptorCollection GetProperties(Type componentType); public static PropertyDescriptorCollection GetProperties(Type componentType, Attribute[] attributes); public static TypeDescriptionProvider GetProvider(object instance); public static TypeDescriptionProvider GetProvider(Type type); public static Type GetReflectionType(object instance); public static Type GetReflectionType(Type type); public static void Refresh(object component); public static void Refresh(Assembly assembly); public static void Refresh(Module module); public static void Refresh(Type type); public static void RemoveAssociation(object primary, object secondary); public static void RemoveAssociations(object primary); public static void RemoveProvider(TypeDescriptionProvider provider, object instance); public static void RemoveProvider(TypeDescriptionProvider provider, Type type); public static void RemoveProviderTransparent(TypeDescriptionProvider provider, object instance); public static void RemoveProviderTransparent(TypeDescriptionProvider provider, Type type); public static void SortDescriptorArray(IList infos); } public abstract class TypeListConverter : TypeConverter { protected TypeListConverter(Type[] types); public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType); public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType); public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value); public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType); public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context); public override bool GetStandardValuesExclusive(ITypeDescriptorContext context); public override bool GetStandardValuesSupported(ITypeDescriptorContext context); } public class UInt16Converter : BaseNumberConverter { public UInt16Converter(); } public class UInt32Converter : BaseNumberConverter { public UInt32Converter(); } public class UInt64Converter : BaseNumberConverter { public UInt64Converter(); } - public class WarningException : SystemException { - public WarningException(); - protected WarningException(SerializationInfo info, StreamingContext context); - public WarningException(string message); - public WarningException(string message, Exception innerException); - public WarningException(string message, string helpUrl); - public WarningException(string message, string helpUrl, string helpTopic); - public string HelpTopic { get; } - public string HelpUrl { get; } - public override void GetObjectData(SerializationInfo info, StreamingContext context); } public class Win32Exception : ExternalExceptionException, ISerializable { public Win32Exception(); public Win32Exception(int error); public Win32Exception(int error, string message); - protected Win32Exception(SerializationInfo info, StreamingContext context); public Win32Exception(string message); public Win32Exception(string message, Exception innerException); public int NativeErrorCode { get; } - public override void GetObjectData(SerializationInfo info, StreamingContext context); } } ``` 6580 area-System.Net [ToFDisable] Port URI tests "As part of moving out of ToF and into the open, I've been going through the ""Tree of the future"" tests and calculating which of those tests provide coverage that we're missing in the open tests. The goal of this is to get the open tests universally better than the ToF tests so that we can turn the ToF tests off for ProjectK runs and save us all a lot of headache diagnosing test failures from potentially outdated tests. For System.Runtime, we're missing 2020 lines of coverage. Our total line coverage for Open vs. ToF is 69.7%. However, this includes some data points that might not be relevant to the library being tested so the real coverage is likely lower. To fulfill the uncovered lines we would need to either create new tests for them or port 56 ToF tests to the open. Those tests are: - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IdnDnsSafeHostTest.IdnDnsSafeHost_IdnOffWithBuiltInScheme_Success.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IriTest.Iri_IncompleteSurrogate.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriEscapingTest.UriFile_ImplicitUncFile_FragmentNotAllowed.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IriTest.Iri_ReservedCharacters.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.AppxUriValues.SupportStringsOfForm_MsApp.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriMailToTest.UriMailTo_SchemeUserAt_Throws.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IriRelativeFileResolutionTest.IriRelativeResolution_CompareImplcitAndExplicitUncForwardSlashesWithNoUnicode_AllPropertiesTheSame.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IriRelativeFileResolutionTest.IriRelativeResolution_CompareRelativeAndOriginalHttpWithNoUnicodeAndReservedChar_AllPropertiesTheSame.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IriTest.Iri_EscapedAscii.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriGetComponentsTest.GetComponents_ASCIIHost_LowerCaseResult.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriGetComponentsTest.GetComponents_UnknownScheme_ComponentsUnaffected.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IdnHostNameValidationTest.IdnHost_FileFqdn_Success.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriGetComponentsTest.GetComponents_UnknownScheme_LocalHostAndPort_Success.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IdnDnsSafeHostTest.IdnDnsSafeHost_IPv6Host_ScopeIdButNoBrackets.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriEscapingTest.UriAbsoluteEscaping_FullIPv6Uri_NothingEscaped.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IriRelativeFileResolutionTest.IriRelativeResolution_CompareRelativeAndOriginalHttpWithUnicodeAndReservedCharIriOff_AllPropertiesTheSame.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IriTest.Iri_804110_TryCreateUri_ShouldNotThrowIndexOutOfRange.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests_FullRun.XML - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IdnDnsSafeHostTest.IdnDnsSafeHost_SingleLabelAllExceptIntranet_Unicode.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IriRelativeFileResolutionTest.IriRelativeResolution_CompareImplcitAndExplicitFileWithNoUnicode_AllPropertiesTheSame.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriRelativeResolutionTest.Uri_Relative_BaseVsAbsolute_ReturnsFullAbsolute.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriEscapingTest.UriAbsoluteEscaping_EscapeBufferRealloc.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriIsWellFormedUriStringTest.UriIsWellFormed_NewRelativeWithKnownSchemeAndQuery_SuccessButNotWellFormed.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IriTest.Iri_UnicodePlane0.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriRelativeResolutionTest.Uri_Relative_BaseVsFileLikeUri_MissingRootSlash_ThrowsUriFormatException.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriIsWellFormedUriStringTest.UriIsWellFormed_NewAbsoluteUnregisteredAsRelative_Throws.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IriRelativeFileResolutionTest.IriRelativeResolution_CompareImplcitAndExplicitFileWithReservedChar_AllPropertiesTheSame.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IriRelativeFileResolutionTest.IriRelativeResolution_CompareImplcitAndExplicitUncWithUnicodeIriOn_AllPropertiesTheSame.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IriRelativeFileResolutionTest.IriRelativeResolution_CompareImplcitAndExplicitFileWithUnicodeAndReservedCharIriOn_AllPropertiesTheSame.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriIsWellFormedUriStringTest.UriMakeRelative_DifferentHost_ReturnsSecondUri.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriIsWellFormedUriStringTest.UriIsWellFormed_AbsoluteWithColonToRelative_AppendsDotSlash.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriIsWellFormedUriStringTest.UriIsWellFormed_NewRelativeWithUnknownSchemeAndQuery_Throws.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriRelativeResolutionTest.Uri_Relative_BaseVsDoubleCharColinChar_ReturnsCharColinChar.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriMailToTest.UriMailTo_SchemeAndBackslash_Throws.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriIsWellFormedUriStringTest.UriMakeRelative_ExplicitDosFileVsUncFile_ReturnsSecondUri.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriMailToTest.UriMailTo_EAI_SomeEscaping.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IdnHostNameValidationTest.IdnHost_GopherFqdn_Success.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriRelativeResolutionTest.Uri_Relative_BaseMadeRelativeToLastSlash_ReturnsDotSlash.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IdnHostNameValidationTest.IdnHost_Internal_Call_ThrowsException.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriIsWellFormedUriStringTest.UriIsWellFormed_RelativeWithPercentAndColon_Failure.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriEscapingTest.UriFile_ImplicitDosFile_QueryNotAllowed.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriEscapingTest.UriFile_ImplicitDosFile_FragmentNotAllowed.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IriTest.Iri_EscapedReservedCharacters.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IriRelativeFileResolutionTest.IriRelativeResolution_CompareImplcitAndOriginalFileWithNoUnicode_AllPropertiesTheSame.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriRelativeResolutionTest.Uri_Relative_BaseVsAuthority_ReturnsBaseSchemePlusAuthority.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriIsWellFormedUriStringTest.UriIsWellFormed_AbsoluteWellFormed_Success.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriEscapingTest.UriUnescapeInvalid_AsciiIncompleteUtf8AsciiIriOn_InvalidUtf8LeftAlone.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IriTest.Iri_ValidateVeryLongInputString_EscapeUriString.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IriTest.Iri_ValidateVeryLongInputString_EscapeDataString.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriRelativeResolutionTest.Uri_Relative_BaseVsFragment_ReturnsBasePlusFragment.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriRelativeResolutionTest.Uri_Relative_BaseVsQueryAndFragment_ReturnsBaseAuthorityAndPathPlusQueryAndFragment.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriIsWellFormedUriStringTest.UriMakeRelative_ImplicitFileDifferentBaseWithColon_ReturnsSecondUri.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.UriIsWellFormedUriStringTest.UriMakeRelative_DifferentPort_ReturnsSecondUri.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IriTest.Iri_829158_IncorrectNormalization.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IriTest.Iri_IncompleteEscapedCharacter.xml - [ ] System.Runtime\4.0.0.0\Uri\UriTests\NCLFunctional.UriTest.IdnHostNameValidationTest.IdnHost_UnknownFqdn_Success.xml Coverage reports, coverage xml files, and detailed json lists of each piece of missing coverage and the corresponding ToF test that fills it are available on request. " 6584 area-System.Net Make WebUtility.UrlDecoder a struct Follow-up from #6538: basically the same changes except for the `System.Buffers`-related ones, since we wanted to avoid a dependency on that for the package `WebUtility` lives in. cc @stephentoub 6589 area-System.Diagnostics Add a production assert facility It is possible to use `Debug.Assert` in `DEBUG` builds to assert runtime conditions. The Base Class Library currently has no way to assert something in non-debug builds. That's a pity because in many applications it is a prudent choice to leave (cheap) assertions enabled in production. Many projects do not wish to make use of Code Contracts. It seems heavy-weight to pull in Code Contracts just to have an assert method. Please add a release build assert to the BCL. Here are some naming proposals: ``` Debug.ReleaseAssert(...) Assert.Debug.IsTrue(...); Assert.Release.IsTrue(...); ``` Another thing that makes `Debug.Assert` unusable in production is that it pops up a dialog box or crashes the process. This is inappropriate with ASP.NET where you normally want to simply abort the current HTTP request and let the process live. It's also inappropriate in any form of client-side GUI app. Frankly, the Abort-Retry-Cancel dialog that pops up is ... not very nice. Most apps are not overly concerned with state corruption. A `FailFast`-like approach is not desirable. Therefore, the new assert functions should merely throw an `AssertFailedException`. If the developer chooses to add a catch-all top-level handler to his request processing then so be it. The assertion failure exception will contain the stack trace pointing to the location of the error. It will be fairly easy to debug the assertion failure from logging output. The new assertion facility should _not_ be configurable to do something else (e.g. log and `FailFast`). Developers should be able to rely on the exact exception throwing behavior outlined above. When I see a production assert in foreign code I want to know what it does. I don't want the possibility that some developer-provided hook is called. Another benefit is that the whole ecosystem can standardize on this `AssertFailedException` class. All tools and testing frameworks can learn to understand it. The `AssertFailedException` is useful by itself, for example to signify unreachable code: ``` switch (...) { case: return 1; default: throw new AssertFailedException(); } ``` This would _not_ be possible with `Assert(false)` because the compiler must know that all paths return a value or throw. To help with this scenario, we could as a `class UnreachableException : AssertFailedException`. Now, tools can standardize on that one as well. When Resharper generates a `switch` it can use this exception type, for example. In this issue I have outlined the approach that I have used over 5 years in a 100 kLOC codebase. I found it to work very well. 6591 area-System.IO Fix System.IO.FileSystem handling of symlinks "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. To help highlight the behavior, consider this set up: - TargetDir - normal directory - LinkDir - a symlink to TargetDir - BrokenLinkDir - a symlink for a directory that's been deleted - TargetFile.txt - normal file - LinkFile.txt - a symlink to TargetFile.txt - BrokenLinkFile.txt - a symlink to a file that's been deleted - ReadonlyTargetFile.txt - a file attributed as readonly - LinkReadonlyFile.txt - a link to ReadonlyTargetFile With that, this program: ``` C# using System; using System.IO; using System.Linq; using static System.Console; class Program { static void Main() { WritePathDetails( ""TargetDir"", ""LinkDir"", ""BrokenLinkDir"", ""TargetFile.txt"", ""LinkFile.txt"", ""BrokenLinkFile.txt"", ""ReadonlyTargetFile.txt"", ""LinkReadonlyFile.txt""); } static void WritePathDetails(params string[] paths) { foreach (string path in paths) { WriteLine($""Path : {Try(() => Path.GetFileName(path))}""); WriteLine($""File.Exists : {Try(() => File.Exists(path))}""); WriteLine($""FileInfo.Exists : {Try(() => new FileInfo(path).Exists)}""); WriteLine($""Dir.Exists : {Try(() => Directory.Exists(path))}""); WriteLine($""DirInfo.Exists : {Try(() => new DirectoryInfo(path).Exists)}""); WriteLine($""FileInfo.Length : {Try(() => new FileInfo(path).Length)}""); WriteLine($""FileStream.Length : {Try(() => { using (var fs = File.OpenRead(path)) return fs.Length; })}""); WriteLine($""FileInfo.Attributes : {Try(() => new FileInfo(path).Attributes)}""); WriteLine($""DirInfo.Attributes : {Try(() => new DirectoryInfo(path).Attributes)}""); WriteLine($""Dir.Enumerate : {Try(() => Directory.EnumerateFiles(path).Count())}""); WriteLine($""DirInfo.Enumerate : {Try(() => new DirectoryInfo(path).EnumerateFiles().Count())}""); WriteLine(); } } static object Try(Func func) { try { return func(); } catch (Exception e) { return $""{e.GetType().Name}: {e.Message}""; } } } ``` now outputs the following:
WindowsUnix
Path                : TargetDir File.Exists         : False FileInfo.Exists     : False Dir.Exists          : True DirInfo.Exists      : True FileInfo.Length     : FileNotFoundException FileStream.Length   : UnauthorizedAccessException FileInfo.Attributes : Directory DirInfo.Attributes  : Directory Dir.Enumerate       : 18 DirInfo.Enumerate   : 18  Path                : LinkDir File.Exists         : False FileInfo.Exists     : False Dir.Exists          : True DirInfo.Exists      : True FileInfo.Length     : FileNotFoundException FileStream.Length   : UnauthorizedAccessException FileInfo.Attributes : Directory, ReparsePoint DirInfo.Attributes  : Directory, ReparsePoint Dir.Enumerate       : 18 DirInfo.Enumerate   : 18  Path                : BrokenLinkDir File.Exists         : False FileInfo.Exists     : False Dir.Exists          : True DirInfo.Exists      : True FileInfo.Length     : FileNotFoundException FileStream.Length   : UnauthorizedAccessException FileInfo.Attributes : Directory, ReparsePoint DirInfo.Attributes  : Directory, ReparsePoint Dir.Enumerate       : DirectoryNotFoundException DirInfo.Enumerate   : DirectoryNotFoundException  Path                : TargetFile.txt File.Exists         : True FileInfo.Exists     : True Dir.Exists          : False DirInfo.Exists      : False FileInfo.Length     : 70 FileStream.Length   : 70 FileInfo.Attributes : Archive DirInfo.Attributes  : Archive Dir.Enumerate       : IOException DirInfo.Enumerate   : IOException  Path                : LinkFile.txt File.Exists         : True FileInfo.Exists     : True Dir.Exists          : False DirInfo.Exists      : False FileInfo.Length     : 0 FileStream.Length   : 70 FileInfo.Attributes : Archive, ReparsePoint DirInfo.Attributes  : Archive, ReparsePoint Dir.Enumerate       : IOException DirInfo.Enumerate   : IOException  Path                : BrokenLinkFile.txt File.Exists         : True FileInfo.Exists     : True Dir.Exists          : False DirInfo.Exists      : False FileInfo.Length     : 0 FileStream.Length   : FileNotFoundException FileInfo.Attributes : Archive, ReparsePoint DirInfo.Attributes  : Archive, ReparsePoint Dir.Enumerate       : IOException DirInfo.Enumerate   : IOException  Path                : ReadonlyTargetFile.txt File.Exists         : True FileInfo.Exists     : True Dir.Exists          : False DirInfo.Exists      : False FileInfo.Length     : 70 FileStream.Length   : 70 FileInfo.Attributes : ReadOnly, Archive DirInfo.Attributes  : ReadOnly, Archive Dir.Enumerate       : IOException DirInfo.Enumerate   : IOException  Path                : LinkReadonlyFile.txt File.Exists         : True FileInfo.Exists     : True Dir.Exists          : False DirInfo.Exists      : False FileInfo.Length     : 0 FileStream.Length   : 70 FileInfo.Attributes : Archive, ReparsePoint DirInfo.Attributes  : Archive, ReparsePoint Dir.Enumerate       : IOException DirInfo.Enumerate   : IOException
Path                : TargetDir File.Exists         : False FileInfo.Exists     : False Dir.Exists          : True DirInfo.Exists      : True FileInfo.Length     : FileNotFoundException FileStream.Length   : UnauthorizedAccessException FileInfo.Attributes : Directory DirInfo.Attributes  : Directory Dir.Enumerate       : 18 DirInfo.Enumerate   : 18  Path                : LinkDir File.Exists         : False FileInfo.Exists     : False Dir.Exists          : True DirInfo.Exists      : True FileInfo.Length     : FileNotFoundException FileStream.Length   : UnauthorizedAccessException FileInfo.Attributes : Directory, ReparsePoint DirInfo.Attributes  : Directory, ReparsePoint Dir.Enumerate       : 18 DirInfo.Enumerate   : 18  Path                : BrokenLinkDir File.Exists         : True FileInfo.Exists     : True Dir.Exists          : False DirInfo.Exists      : False FileInfo.Length     : 6 FileStream.Length   : FileNotFoundException FileInfo.Attributes : ReparsePoint DirInfo.Attributes  : ReparsePoint Dir.Enumerate       : DirectoryNotFoundException DirInfo.Enumerate   : DirectoryNotFoundException  Path                : TargetFile.txt File.Exists         : True FileInfo.Exists     : True Dir.Exists          : False DirInfo.Exists      : False FileInfo.Length     : 70 FileStream.Length   : 70 FileInfo.Attributes : Normal DirInfo.Attributes  : Normal Dir.Enumerate       : IOException DirInfo.Enumerate   : IOException  Path                : LinkFile.txt File.Exists         : True FileInfo.Exists     : True Dir.Exists          : False DirInfo.Exists      : False FileInfo.Length     : 14 FileStream.Length   : 70 FileInfo.Attributes : ReparsePoint DirInfo.Attributes  : ReparsePoint Dir.Enumerate       : IOException DirInfo.Enumerate   : IOException  Path                : BrokenLinkFile.txt File.Exists         : True FileInfo.Exists     : True Dir.Exists          : False DirInfo.Exists      : False FileInfo.Length     : 7 FileStream.Length   : FileNotFoundException FileInfo.Attributes : ReparsePoint DirInfo.Attributes  : ReparsePoint Dir.Enumerate       : DirectoryNotFoundException DirInfo.Enumerate   : DirectoryNotFoundException  Path                : ReadonlyTargetFile.txt File.Exists         : True FileInfo.Exists     : True Dir.Exists          : False DirInfo.Exists      : False FileInfo.Length     : 70 FileStream.Length   : 70 FileInfo.Attributes : ReadOnly DirInfo.Attributes  : ReadOnly Dir.Enumerate       : IOException DirInfo.Enumerate   : IOException  Path                : LinkReadonlyFile.txt File.Exists         : True FileInfo.Exists     : True Dir.Exists          : False DirInfo.Exists      : False FileInfo.Length     : 22 FileStream.Length   : 70 FileInfo.Attributes : ReparsePoint DirInfo.Attributes  : ReparsePoint Dir.Enumerate       : IOException DirInfo.Enumerate   : IOException
Interesting things to notice: - The only meaningful differences are for the ""Broken"" cases. - On Windows, symlinks are empty files and thus have 0 length. On Unix, they contain a path and thus have a length proportional to that path. - On Windows, files sometimes include an Archive attribute. This is Windows-specific and we don't include that attribute on Unix. Fixes #6556 cc: @ianhays, @bartonjs, @joshfree, @palladia, @andschwa " 6592 area-System.Net HttpClient ctor failed on Mac due to Unable to load DLL 'System.Security.Cryptography.Native' Call stack: Unhandled exception of type 'System.TypeInitializationException': System.TypeInitializationException : The type initializer for 'System.Net.Http.CurlHandler' threw an exception.\n---- System.TypeInitializationException : The type initializer for 'Http' threw an exception.\n-------- System.TypeInitializationException : The type initializer for 'HttpInitializer' threw an exception.\n------------ System.TypeInitializationException : The type initializer for 'CryptoInitializer' threw an exception.\n---------------- System.DllNotFoundException : Unable to load DLL 'System.Security.Cryptography.Native': The specified module could not be found.\n (Exception from HRESULT: 0x8007007E) at System.Net.Http.CurlHandler..ctor() at System.Net.Http.HttpClient..ctor() 6598 area-Infrastructure System.Composition.* libraries do not produce a NuGet package "On top of this, the assemblies do not list an AssemblyVersion. These were ""special"" libraries in that they were already previously shipped as a [NuGet package](https://www.nuget.org/packages/Microsoft.Composition/1.0.30) before we moved them into corefx. We should come up with a story for them going forward. The previous version used was 1.0.30, so we should bump up from that at the very least. There is also the question of whether we want to use the old name (""Microsoft.Composition"") or switch to matching the assembly names (which might be difficult since there's 5 of them). " 6600 area-System.Net System.Net.CredentialCache: Avoid dictionary enumerator allocations Use `Dictionary`'s struct enumerator with `foreach` instead of using the enumerator as `IDictionaryEnumerator`, which boxes the struct. Test line & branch coverage over the changed lines is 100%. cc: @stephentoub @davidsh 6602 area-System.IO Add back managed implementation of System.IO.Compression We want to put System.IO.Compression into NetStandard.Library (not NetStandard.Platform) but in order to do that we need to have a fallback implementation that is pure IL that can be used on new platforms that may not have the native dependency supported. cc @ericstj @KrzysztofCwalina 6606 area-System.Net Kerberos ticket is not fetched when target is a user The xplat NegotiateStream implementation is able to successfully use Kerberos auth when the target of `AuthenticateAsClientAsync` is a service principal eg. HOST/machine, HTTP@machine etc. However, if the target is a user like foo@domainfqdn, the auth is failing. Perhaps in this case, the `gss_import_name` needs to be called with some OID other than `GSS_KRB5_NT_PRINCIPAL_NAME` 6607 area-System.Net Add HttpClientHandler test for proxies We don't currently have any functional tests in the repo for using HTTP proxies. This commit adds a very simple loopback GET request proxy server, just enough to verify that HttpClient does go through the specified proxy and pass credentials if requested. (When we get better infrastructure in place for this kind of thing, we can remove the proxy implementation and replace the test, but for now, this at least provides some automated verification cross-platform.) cc: @davidsh, @Petermarcu, @kapilash 6614 area-Infrastructure Produce package for System.Composition We currently don't produce packages for System.Composition.*. We should do so that we've a single tree for shipping fixes and features (it's currently only producing packages in our old internal Roxel tree). It's also worth pointing out that the Roslyn workspace layer has a dependency on the `Microsoft.Composition` package. 6615 area-Infrastructure Update clean.cmd to kill Roslyn compiler long running task. "@joperezr I synced your changes to dir.props for adding the Roslyn compiler to the build process. With that change we get a long running task (VBCSCompiler.exe) after we finish building that prevents us from then running ""git clean -xdf"" without first manually killing that task. (can't delete the tools dir) I'd like to request a change perhaps in the clean.cmd script to kill that task if it is still running. Making this change in the corefx repo would be ideal since we try to keep the scripts in the Wcf repo in sync with corefx. " 6617 area-Infrastructure OSX runs are run with elevated permissions by default on innerloop and outerloop OSX runs are launched by lauchdaemon, which runs as root, and runs all tests elevated. This might cause bugs in innerloop to be missed. cc @joshfree 6618 area-System.Security Break X509Certificates dependency on FileSystemWatcher I'm looking at our dependencies and noticed that the unix implementation of X509Certificates depends on FileSystemWatcher which we should try to break the dependency on. https://github.com/dotnet/corefx/commit/0522e19dc6c06bd80c1f80232fd9600862cdb70c#diff-9c28d44206dff30cadeb4ac3e316aabaR32 I don't know the reliability of FileSystemWatcher on unix but it is notoriously bad on windows and we shouldn't have a dependency on it from a low level library. 6621 area-System.Globalization System.Globalization.Tests.NormalizationAll.NormalizeTest fails with OOM on Windows Nano ``` Discovering: System.Globalization.Extensions.Tests 14:12:40 Discovered: System.Globalization.Extensions.Tests 14:12:40 Starting: System.Globalization.Extensions.Tests 14:12:40 System.Globalization.Tests.NormalizationAll.NormalizeTest [FAIL] 14:12:40 System.TypeInitializationException : The type initializer for 'System.Globalization.Tests.NormalizationAll' threw an exception. 14:12:40 ---- System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:12:40 Stack Trace: 14:12:40 at System.Globalization.Tests.NormalizationAll.NormalizeTest() 14:12:40 ----- Inner Stack Trace ----- 14:12:40 at System.Globalization.Tests.NormalizationAll..cctor() 14:12:40 Finished: System.Globalization.Extensions.Tests ``` Test result [here](http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_winnano_debug_tst/6/console) 6622 area-System.Diagnostics System.Diagnostics.Process failures on Windows Nano ``` Discovering: System.Diagnostics.Process.Tests 14:11:45 Discovered: System.Diagnostics.Process.Tests 14:11:45 Starting: System.Diagnostics.Process.Tests 14:11:46 **System.Diagnostics.Tests.ProcessStandardConsoleTests.TestChangesInConsoleEncoding** [FAIL] 14:11:46 Assert+WrapperXunitException : File path: d:\j\workspace\outerloop_win---ce410c48\src\System.Diagnostics.Process\tests\ProcessStandardConsoleTests.cs. Line: 26 14:11:46 ---- Assert.Equal() Failure 14:11:46 Expected: 65001 14:11:46 Actual: 437 14:11:46 Stack Trace: 14:11:46 TestUserCredentialsPropertiesOnWindows: NetUserAdd failed: The account already exists 14:11:46 at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber) 14:11:46 at Assert.Equal[T](T expected, T actual, String path, Int32 line) 14:11:46 at System.Diagnostics.Tests.ProcessStandardConsoleTests.b__1_0(Int32 expectedCodePage) 14:11:46 at System.Diagnostics.Tests.ProcessStandardConsoleTests.TestChangesInConsoleEncoding() 14:11:46 ----- Inner Stack Trace ----- 14:11:46 at Assert.Equal[T](T expected, T actual, String path, Int32 line) 14:11:48 ** System.Diagnostics.Tests.ProcessThreadTests.TestStartAddressProperty** [FAIL] 14:11:48 Assert+WrapperXunitException : File path: d:\j\workspace\outerloop_win---ce410c48\src\System.Diagnostics.Process\tests\ProcessThreadTests.cs. Line: 113 14:11:48 ---- Assert.Equal() Failure 14:11:48 Expected: False 14:11:48 Actual: True 14:11:48 Stack Trace: 14:11:48 at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber) 14:11:48 at Assert.Equal[T](T expected, T actual, String path, Int32 line) 14:11:48 at System.Diagnostics.Tests.ProcessThreadTests.TestStartAddressProperty() 14:11:48 ----- Inner Stack Trace ----- 14:11:48 at Assert.Equal[T](T expected, T actual, String path, Int32 line) 14:11:49 **System.Diagnostics.Tests.ProcessWaitingTests.MultipleProcesses_StartAllKillAllWaitAll **[FAIL] 14:11:49 System.ComponentModel.Win32Exception : Not enough quota is available to process this command 14:11:49 Stack Trace: 14:11:49 at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) 14:11:49 at System.Diagnostics.Process.Start() 14:11:49 at System.Diagnostics.Tests.ProcessWaitingTests.MultipleProcesses_StartAllKillAllWaitAll() ``` Test result [here](http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_winnano_debug_tst/6/console) 6623 area-System.Data System.Data.SqlClient.ManualTesting tests failing on Windows Nano ``` 14:11:38 Discovering: System.Data.SqlClient.ManualTesting.Tests 14:11:38 Discovered: System.Data.SqlClient.ManualTesting.Tests 14:11:38 Starting: System.Data.SqlClient.ManualTesting.Tests 14:11:38 System.Data.SqlClient.ManualTesting.Tests.ReaderTest.TestMain [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Pubs 14:11:38 Stack Trace: 14:11:38 Test Failed! 14:11:38 Please compare baseline : F:\j\workspace\outerloop_win---75965e55\bin\tests\Windows_NT.AnyCPU.Debug\System.Data.SqlClient.ManualTesting.Tests\dnxcore50\MultipleResultsTest.bsl with output :F:\j\workspace\outerloop_win---75965e55\bin\tests\Windows_NT.AnyCPU.Debug\System.Data.SqlClient.ManualTesting.Tests\dnxcore50\MultipleResultsTest.out 14:11:38 Comparison Results : 14:11:38 ** DIFF at line 0 14:11:38 A : System.Exception: Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 E : MultipleErrorHandling SqlConnection 14:11:38 ** DIFF at line 1 14:11:38 A : at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 E : **** ExecuteNonQuery ***** 14:11:38 ** DIFF at line 2 14:11:38 A : at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 E : SqlException: Error 1 14:11:38 ** DIFF at line 3 14:11:38 A : at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 E : Error 2 14:11:38 ** DIFF at line 4 14:11:38 A : at System.Data.SqlClient.ManualTesting.Tests.MultipleResultsTest.RunDataTest() 14:11:38 E : Error 3 14:11:38 ** DIFF at line 5 14:11:38 A : at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.RunTest() 14:11:38 E : Error 4 14:11:38 ** MISSING 14:11:38 5 : Error 46 : Error 57 : 08 : 19 : 310 : 411 : 512 : 613 : 714 : 815 : 916 : 1017 : 1118 : **** ExecuteScalar ****19 : *** SQL CONNECTION INFO MESSAGE : 0 ****20 : **** ExecuteReader ****21 : *** SQL CONNECTION INFO MESSAGE : 0 ****22 : NextResult23 : *** SQL CONNECTION INFO MESSAGE : 1 ****24 : SqlException: Error 125 : NextResult26 : *** SQL CONNECTION INFO MESSAGE : 3 ****27 : NextResult28 : *** SQL CONNECTION INFO MESSAGE : 4 ****29 : SqlException: Error 230 : NextResult31 : *** SQL CONNECTION INFO MESSAGE : 5 ****32 : NextResult33 : *** SQL CONNECTION INFO MESSAGE : 6 ****34 : SqlException: Error 335 : NextResult36 : *** SQL CONNECTION INFO MESSAGE : 7 ****37 : NextResult38 : *** SQL CONNECTION INFO MESSAGE : 8 ****39 : SqlException: Error 440 : NextResult41 : *** SQL CONNECTION INFO MESSAGE : 9 ****42 : NextResult43 : *** SQL CONNECTION INFO MESSAGE : 10 ****44 : SqlException: Error 545 : NextResult46 : *** SQL CONNECTION INFO MESSAGE : 11 **** 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Pubs() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.ReaderTest.TestMain() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.ExceptionTest.VariousExceptionTests [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2008_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2008_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.ExceptionTest.VariousExceptionTests() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.ParallelTransactionsTest.MultipleExecutesInSameTransactionTest_ShouldThrowsUnsupported_Katmai [FAIL] 14:11:38 System.NullReferenceException : Object reference not set to an instance of an object. 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.PopulateConnectionStrings() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2008_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.ParallelTransactionsTest.MultipleExecutesInSameTransactionTest_ShouldThrowsUnsupported_Katmai() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.ExceptionTest.ExceptionTests [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2008_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2008_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.ExceptionTest.ExceptionTests() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.ExceptionTest.WarningsBeforeRowsTest [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2008_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2008_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.ExceptionTest.WarningsBeforeRowsTest() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.ExceptionTest.IndependentConnectionExceptionTest [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2008_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2008_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.ExceptionTest.IndependentConnectionExceptionTest() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.ExceptionTest.WarningTest [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2008_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2008_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.ExceptionTest.WarningTest() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.DDAsyncTest.ExecuteCommand_WithNewConnection_ShouldPerformAsyncByDefault [FAIL] 14:11:38 System.AggregateException : One or more errors occurred. (Could not find a valid connection string for the key: SQL2005_Northwind) (Could not find a valid connection string for the key: SQL2005_Northwind) 14:11:38 ---- System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 ---- System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) 14:11:38 at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout) 14:11:38 at System.Threading.Tasks.Task.WaitAll(Task[] tasks) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DDAsyncTest.ExecuteCommand_WithNewConnection_ShouldPerformAsyncByDefault() 14:11:38 ----- Inner Stack Trace #1 (System.Exception) ----- 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DDAsyncTest.d__3.MoveNext() 14:11:38 ----- Inner Stack Trace #2 (System.Exception) ----- 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DDAsyncTest.d__3.MoveNext() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.DDAsyncTest.ExecuteCommand_WithSharedConnection_ShouldPerformAsyncByDefault [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DDAsyncTest.ExecuteCommand_WithSharedConnection_ShouldPerformAsyncByDefault() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.DDAsyncTest.OpenConnection_WithAsyncTrue_ThrowsNotSupportedException [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DDAsyncTest.OpenConnection_WithAsyncTrue_ThrowsNotSupportedException() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.DateTimeTest.TypeVersionKnobTest [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2008_Master 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2008_Master() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DateTimeTest.TypeVersionKnobTest() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.TransactionTest.TestKatmai [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2008_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2008_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.TransactionTest.TestKatmai() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.TransactionTest.TestYukon [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.TransactionTest.TestYukon() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.ConnectionPoolTest.ConnectionPool_Nwnd9 [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.ConnectionPoolTest..ctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.ConnectionPoolTest.ConnectionPool_Nwnd9Mars [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.ConnectionPoolTest..ctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.ConnectionPoolTest.ConnectionPool_Nwnd10Mars [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.ConnectionPoolTest..ctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.ConnectionPoolTest.ConnectionPool_Nwnd10 [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.ConnectionPoolTest..ctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.MultipleResultsTest.TestMain [FAIL] 14:11:38 Assert.True() Failure 14:11:38 Expected: True 14:11:38 Actual: False 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MultipleResultsTest.TestMain() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.MARSTest.MARSSyncTimeoutTest [FAIL] 14:11:38 System.TypeInitializationException : The type initializer for 'System.Data.SqlClient.ManualTesting.Tests.MARSTest' threw an exception. 14:11:38 ---- System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSTest.MARSSyncTimeoutTest() 14:11:38 ----- Inner Stack Trace ----- 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSTest..cctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.MARSTest.MARSSyncExecuteReaderTest4 [FAIL] 14:11:38 System.TypeInitializationException : The type initializer for 'System.Data.SqlClient.ManualTesting.Tests.MARSTest' threw an exception. 14:11:38 ---- System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSTest.MARSSyncExecuteReaderTest4() 14:11:38 ----- Inner Stack Trace ----- 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSTest..cctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.AsyncTest.FailureTest [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.AsyncTest.FailureTest() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.AsyncTest.ExecuteTest [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.AsyncTest.ExecuteTest() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.DateTimeTest.ReaderParameterTest [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2008_Master 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2008_Master() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DateTimeTest.ReaderParameterTest() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.MARSTest.MARSSyncExecuteReaderTest3 [FAIL] 14:11:38 System.TypeInitializationException : The type initializer for 'System.Data.SqlClient.ManualTesting.Tests.MARSTest' threw an exception. 14:11:38 ---- System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSTest.MARSSyncExecuteReaderTest3() 14:11:38 ----- Inner Stack Trace ----- 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSTest..cctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.WeakRefTest.TestReaderNonMars [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Pubs 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Pubs() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.WeakRefTest.TestReaderNonMars() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.WeakRefTest.TestTransactionSingle [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Pubs 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Pubs() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.WeakRefTest.TestTransactionSingle() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.MARSTest.MARSSyncExecuteNonQueryTest [FAIL] 14:11:38 System.TypeInitializationException : The type initializer for 'System.Data.SqlClient.ManualTesting.Tests.MARSTest' threw an exception. 14:11:38 ---- System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSTest.MARSSyncExecuteNonQueryTest() 14:11:38 ----- Inner Stack Trace ----- 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSTest..cctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.DateTimeTest.SQLBU503290Test [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2008_Master 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2008_Master() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DateTimeTest.SQLBU503290Test() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest.MarsExecuteNonQuery_AllFlavors [FAIL] 14:11:38 System.TypeInitializationException : The type initializer for 'System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest' threw an exception. 14:11:38 ---- System.Exception : Could not find a valid connection string for the key: SQL2005_Master 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest.MarsExecuteNonQuery_AllFlavors() 14:11:38 ----- Inner Stack Trace ----- 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Master() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest..cctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.MARSTest.MARSAsyncTimeoutTest [FAIL] 14:11:38 System.TypeInitializationException : The type initializer for 'System.Data.SqlClient.ManualTesting.Tests.MARSTest' threw an exception. 14:11:38 ---- System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSTest.MARSAsyncTimeoutTest() 14:11:38 ----- Inner Stack Trace ----- 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSTest..cctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest.MarsExecuteScalar_AllFlavors [FAIL] 14:11:38 System.TypeInitializationException : The type initializer for 'System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest' threw an exception. 14:11:38 ---- System.Exception : Could not find a valid connection string for the key: SQL2005_Master 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest.MarsExecuteScalar_AllFlavors() 14:11:38 ----- Inner Stack Trace ----- 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Master() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest..cctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest.MarsExecuteReader_RPC_NoGC [FAIL] 14:11:38 System.TypeInitializationException : The type initializer for 'System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest' threw an exception. 14:11:38 ---- System.Exception : Could not find a valid connection string for the key: SQL2005_Master 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest.MarsExecuteReader_RPC_NoGC() 14:11:38 ----- Inner Stack Trace ----- 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Master() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest..cctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest.MarsExecuteReader_StoredProcedure_WithGC [FAIL] 14:11:38 System.TypeInitializationException : The type initializer for 'System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest' threw an exception. 14:11:38 ---- System.Exception : Could not find a valid connection string for the key: SQL2005_Master 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest.MarsExecuteReader_StoredProcedure_WithGC() 14:11:38 ----- Inner Stack Trace ----- 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Master() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest..cctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.MARSTest.MARSSyncBusyReaderTest [FAIL] 14:11:38 System.TypeInitializationException : The type initializer for 'System.Data.SqlClient.ManualTesting.Tests.MARSTest' threw an exception. 14:11:38 ---- System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSTest.MARSSyncBusyReaderTest() 14:11:38 ----- Inner Stack Trace ----- 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSTest..cctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest.MarsExecuteReader_Text_WithGC [FAIL] 14:11:38 System.TypeInitializationException : The type initializer for 'System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest' threw an exception. 14:11:38 ---- System.Exception : Could not find a valid connection string for the key: SQL2005_Master 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest.MarsExecuteReader_Text_WithGC() 14:11:38 ----- Inner Stack Trace ----- 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Master() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest..cctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest.MarsExecuteReader_Text_NoGC [FAIL] 14:11:38 System.TypeInitializationException : The type initializer for 'System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest' threw an exception. 14:11:38 ---- System.Exception : Could not find a valid connection string for the key: SQL2005_Master 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest.MarsExecuteReader_Text_NoGC() 14:11:38 ----- Inner Stack Trace ----- 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Master() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSSessionPoolingTest..cctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.MARSTest.MARSSyncExecuteReaderTest1 [FAIL] 14:11:38 System.TypeInitializationException : The type initializer for 'System.Data.SqlClient.ManualTesting.Tests.MARSTest' threw an exception. 14:11:38 ---- System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSTest.MARSSyncExecuteReaderTest1() 14:11:38 ----- Inner Stack Trace ----- 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSTest..cctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.MARSTest.MARSSyncExecuteReaderTest2 [FAIL] 14:11:38 System.TypeInitializationException : The type initializer for 'System.Data.SqlClient.ManualTesting.Tests.MARSTest' threw an exception. 14:11:38 ---- System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSTest.MARSSyncExecuteReaderTest2() 14:11:38 ----- Inner Stack Trace ----- 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.MARSTest..cctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_nwnd9SqlClient_NP [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind_NamedPipes 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind_NamedPipes() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_nwnd9SqlClient_NP() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_nwnd11SqlClient_NP [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2012_Northwind_NamedPipes 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2012_Northwind_NamedPipes() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_nwnd11SqlClient_NP() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_nwnd10SqlClient [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2008_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2008_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_nwnd10SqlClient() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_nwnd10SqlClient_NP [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2008_Northwind_NamedPipes 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2008_Northwind_NamedPipes() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_nwnd10SqlClient_NP() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_nwnd9SqlClient [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_nwnd9SqlClient() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.SqlNamedPipesTest.InvalidConnStringTest [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2008_Northwind_NamedPipes 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2008_Northwind_NamedPipes() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.SqlNamedPipesTest.InvalidConnStringTest() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.SqlNamedPipesTest.ValidConnStringTest [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2008_Northwind_NamedPipes 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2008_Northwind_NamedPipes() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.SqlNamedPipesTest.ValidConnStringTest() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.DDMARSTest.TestMain [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DDMARSTest.TestMain() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.DataTypes.XmlTest [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Master 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Master() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTypes.XmlTest() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.ParallelTransactionsTest.BasicParallelTest_ShouldThrowsUnsupported_Yukon [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Pubs 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Pubs() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.ParallelTransactionsTest.BasicParallelTest_ShouldThrowsUnsupported_Yukon() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.ParallelTransactionsTest.MultipleExecutesInSameTransactionTest_ShouldThrowsUnsupported_Yukon [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Pubs 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Pubs() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.ParallelTransactionsTest.MultipleExecutesInSameTransactionTest_ShouldThrowsUnsupported_Yukon() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.ParallelTransactionsTest.BasicParallelTest_ShouldThrowsUnsupported_Katmai [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2008_Pubs 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2008_Pubs() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.ParallelTransactionsTest.BasicParallelTest_ShouldThrowsUnsupported_Katmai() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.WeakRefTestYukonSpecific.TestReaderMars [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.WeakRefTestYukonSpecific.TestReaderMars() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.DataTypes.MaxTypesTest [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Master 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Master() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTypes.MaxTypesTest() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.WeakRefTestYukonSpecific.TestTransactionSingle [FAIL] 14:11:38 System.Exception : Could not find a valid connection string for the key: SQL2005_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2005_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.WeakRefTestYukonSpecific.TestTransactionSingle() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.CommandCancelTest.TimeoutCancel [FAIL] 14:11:38 System.TypeInitializationException : The type initializer for 'System.Data.SqlClient.ManualTesting.Tests.CommandCancelTest' threw an exception. 14:11:38 ---- System.Exception : Could not find a valid connection string for the key: SQL2008_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.CommandCancelTest.TimeoutCancel() 14:11:38 ----- Inner Stack Trace ----- 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2008_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.CommandCancelTest..cctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.CommandCancelTest.CancelAndDisposePreparedCommand [FAIL] 14:11:38 System.TypeInitializationException : The type initializer for 'System.Data.SqlClient.ManualTesting.Tests.CommandCancelTest' threw an exception. 14:11:38 ---- System.Exception : Could not find a valid connection string for the key: SQL2008_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.CommandCancelTest.CancelAndDisposePreparedCommand() 14:11:38 ----- Inner Stack Trace ----- 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2008_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.CommandCancelTest..cctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.CommandCancelTest.MultiThreadedCancel_NonAsync [FAIL] 14:11:38 System.TypeInitializationException : The type initializer for 'System.Data.SqlClient.ManualTesting.Tests.CommandCancelTest' threw an exception. 14:11:38 ---- System.Exception : Could not find a valid connection string for the key: SQL2008_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.CommandCancelTest.MultiThreadedCancel_NonAsync() 14:11:38 ----- Inner Stack Trace ----- 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2008_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.CommandCancelTest..cctor() 14:11:38 System.Data.SqlClient.ManualTesting.Tests.CommandCancelTest.TimeOutDuringRead [FAIL] 14:11:38 System.TypeInitializationException : The type initializer for 'System.Data.SqlClient.ManualTesting.Tests.CommandCancelTest' threw an exception. 14:11:38 ---- System.Exception : Could not find a valid connection string for the key: SQL2008_Northwind 14:11:38 Stack Trace: 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.CommandCancelTest.TimeOutDuringRead() 14:11:38 ----- Inner Stack Trace ----- 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2008_Northwind() 14:11:38 at System.Data.SqlClient.ManualTesting.Tests.CommandCancelTest..cctor() 14:11:39 System.Data.SqlClient.ManualTesting.Tests.SqlRandomStress.TestMain [FAIL] 14:11:39 System.Exception : Could not find a valid connection string for the key: SQL2008_Master 14:11:39 Stack Trace: 14:11:39 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionStringFromXml(String key) 14:11:39 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.GetConnectionString(String connectionStringName) 14:11:39 at System.Data.SqlClient.ManualTesting.Tests.DataTestClass.get_SQL2008_Master() 14:11:39 at System.Data.SqlClient.ManualTesting.Tests.SqlRandomStress.TestMain() 14:11:39 Finished: System.Data.SqlClient.ManualTesting.Tests 14:11:39 14:11:39 === TEST EXECUTION SUMMARY === ``` **System.Data.SqlClient.ManualTesting.Tests Total: 66, Errors: 0, Failed: 58, Skipped: 0, Time: 0.947s** Test result [here](http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_winnano_debug_tst/6/console) 6624 area-System.Collections OOM exceptions from System.Collections Tests on Windows Nano ``` 14:10:54 Discovering: System.Collections.Tests 14:10:54 Discovered: System.Collections.Tests 14:10:55 Starting: System.Collections.Tests 14:10:58 System.Collections.Tests.InternalHashCodeTests.OutOfBoundsRegression [FAIL] 14:10:58 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:10:58 Stack Trace: 14:10:58 at System.Collections.Tests.TestData.d__0.MoveNext() 14:10:58 at System.Collections.Tests.InternalHashCodeTests.OutOfBoundsRegression() 14:11:30 System.Collections.Tests.Perf_List.Clear(size: 10000) [FAIL] 14:11:30 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:11:30 Stack Trace: 14:11:30 at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) 14:11:30 at System.Collections.Tests.Perf_List.Clear(Int32 size) 14:11:30 System.Collections.Tests.Perf_List.Clear(size: 100000) [FAIL] 14:11:30 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:11:30 Stack Trace: 14:11:30 at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) 14:11:30 at System.Collections.Tests.Perf_List.Clear(Int32 size) 14:11:30 Finished: System.Collections.Tests 14:11:30 14:11:30 === TEST EXECUTION SUMMARY === ``` **System.Collections.Tests Total: 36399, Errors: 0, Failed: 3, Skipped: 0, Time: 34.902s** 6625 area-System.Console System.Console test failure on Windows Nano ``` 14:11:37 WindowAndCursorProps.Title [FAIL] 14:11:37 Assert+WrapperXunitException : File path: d:\j\workspace\outerloop_win---ce410c48\src\System.Console\tests\WindowAndCursorProps.cs. Line: 124 14:11:37 ---- Assert.Equal() Failure 14:11:37 ↓ (pos 0) 14:11:37 Expected: Title set by unit test 14:11:37 Actual: 14:11:37 ↑ (pos 0) 14:11:37 Stack Trace: 14:11:37 at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber) 14:11:37 at Assert.Equal(String expected, String actual, String path, Int32 line) 14:11:37 at WindowAndCursorProps.Title() 14:11:37 ----- Inner Stack Trace ----- 14:11:37 at Assert.Equal(String expected, String actual, String path, Int32 line) 14:11:37 Finished: System.Console.Tests 14:11:37 14:11:37 === TEST EXECUTION SUMMARY === 14:11:37 System.Console.Tests Total: 80, Errors: 0, Failed: 1, Skipped: 0, Time: 0.892s ``` Test result [here](http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_winnano_debug_tst/6/console) 6626 area-System.IO System.IO.FileSystem.Tests throw OOM on windows nano ``` 14:13:21 Discovered: System.IO.FileSystem.Tests 14:13:22 Starting: System.IO.FileSystem.Tests 14:13:22 symbolic link created for C:\Users\dotnet-bot\AppData\Local\Temp\Directory_Exists_n14uv1wg.rru\SymlinkToNewDirectory_327 <<===>> C:\Users\dotnet-bot\AppData\Local\Temp\Directory_Exists_n14uv1wg.rru\SymlinkToNewDirectory_324 14:13:23 symbolic link created for C:\Users\dotnet-bot\AppData\Local\Temp\FileInfo_Exists_xtqquk01.5qz\SymLinksMayExistIndependentlyOfTarget_92 <<===>> C:\Users\dotnet-bot\AppData\Local\Temp\FileInfo_Exists_xtqquk01.5qz\SymLinksMayExistIndependentlyOfTarget_91 14:13:23 symbolic link created for C:\Users\dotnet-bot\AppData\Local\Temp\File_GetSetAttributes_pdlxjhto.k5i\SymLinksAreReparsePoints_114 <<===>> C:\Users\dotnet-bot\AppData\Local\Temp\File_GetSetAttributes_pdlxjhto.k5i\SymLinksAreReparsePoints_113 14:13:23 symbolic link created for C:\Users\dotnet-bot\AppData\Local\Temp\File_GetSetAttributes_tgxbi3ng.xuy\SymLinksReflectTargetAttributes_127 <<===>> C:\Users\dotnet-bot\AppData\Local\Temp\File_GetSetAttributes_tgxbi3ng.xuy\SymLinksReflectTargetAttributes_126 14:13:24 System.IO.Tests.Perf_FileStream.Read(useAsync: True, bufferSize: 512, totalSize: 10000000) [FAIL] 14:13:24 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:24 Stack Trace: 14:13:24 [FATAL] System.OutOfMemoryException 14:13:24 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:24 Stack Trace: 14:13:24 System.IO.Tests.Perf_FileStream.Read(useAsync: False, bufferSize: 512, totalSize: 10000000) [FAIL] 14:13:24 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:24 Stack Trace: 14:13:24 [FATAL] System.OutOfMemoryException 14:13:24 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:24 Stack Trace: 14:13:24 System.IO.Tests.File_ReadWriteAllBytes.ReadFileOver2GB [FAIL] 14:13:24 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:24 Stack Trace: 14:13:24 [FATAL] System.OutOfMemoryException 14:13:24 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:24 Stack Trace: 14:13:24 System.IO.Tests.File_Copy_str_str_b.CopyFileWithData_MemberData(data: ['ó', 'b', '´', 0x0011, 'L', ...], readOnly: True) [FAIL] 14:13:24 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:24 Stack Trace: 14:13:24 [FATAL] System.OutOfMemoryException 14:13:24 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:24 Stack Trace: 14:13:24 System.IO.Tests.FileInfo_CopyTo_str_b.CopyFileWithData_MemberData(data: ['Y', 0x0003, 0x0001, 'á', 'g', ...], readOnly: True) [FAIL] 14:13:24 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:24 Stack Trace: 14:13:24 [FATAL] System.OutOfMemoryException 14:13:24 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:24 Stack Trace: 14:13:24 System.IO.Tests.FileInfo_CopyTo_str.CopyFileWithData_MemberData(data: [0x0097, 'Ã�', 'Z', 0x0008, 0x0011, ...], readOnly: True) [FAIL] 14:13:24 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:24 Stack Trace: 14:13:24 [FATAL] System.OutOfMemoryException 14:13:24 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:24 Stack Trace: 14:13:25 System.IO.Tests.FileInfo_CopyTo_str_b.CopyFileWithData_MemberData(data: [0x0080, 'ø', '[', 'ú', 'ô', ...], readOnly: False) [FAIL] 14:13:25 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:25 Stack Trace: 14:13:26 [FATAL] System.OutOfMemoryException 14:13:26 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:26 Stack Trace: 14:13:26 System.IO.Tests.File_Copy_str_str_b.CopyFileWithData_MemberData(data: ['Q', ';', 'û', 'r', 0x008f, ...], readOnly: False) [FAIL] 14:13:26 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:26 Stack Trace: 14:13:26 [FATAL] System.OutOfMemoryException 14:13:26 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:26 Stack Trace: 14:13:26 System.IO.Tests.FileInfo_Length.SymLinkLength [FAIL] 14:13:26 System.ComponentModel.Win32Exception : The paging file is too small for this operation to complete 14:13:26 Stack Trace: 14:13:26 [FATAL] System.OutOfMemoryException 14:13:26 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:26 Stack Trace: 14:13:27 System.IO.Tests.File_Copy_str_str.CopyFileWithData_MemberData(data: [0x008b, '#', 'î', 'H', 'ì', ...], readOnly: True) [FAIL] 14:13:27 System.IO.IOException : Not enough storage is available to process this command 14:13:27 Stack Trace: 14:13:27 [FATAL] System.OutOfMemoryException 14:13:27 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:27 Stack Trace: 14:13:27 System.IO.Tests.File_Copy_str_str.CopyFileWithData_MemberData(data: ['s', 'j', '!', 'þ', '¿', ...], readOnly: False) [FAIL] 14:13:27 System.IO.IOException : Not enough storage is available to process this command 14:13:27 Stack Trace: 14:13:27 [FATAL] System.OutOfMemoryException 14:13:27 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:27 Stack Trace: 14:13:27 System.IO.Tests.FileStream_SafeFileHandle.ThrowWhenHandlePositionIsChanged [FAIL] 14:13:27 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:27 Stack Trace: 14:13:27 [FATAL] System.OutOfMemoryException 14:13:27 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:27 Stack Trace: 14:13:28 System.IO.Tests.FileStream_Position.PositionPastEnd [FAIL] 14:13:28 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:28 Stack Trace: 14:13:28 [FATAL] System.OutOfMemoryException 14:13:28 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:28 Stack Trace: 14:13:28 System.IO.Tests.DirectoryInfo_Exists.SymlinkToNewDirectoryInfo [FAIL] 14:13:28 System.ComponentModel.Win32Exception : The paging file is too small for this operation to complete 14:13:28 Stack Trace: 14:13:28 [FATAL] System.OutOfMemoryException 14:13:28 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:28 Stack Trace: 14:13:28 System.IO.Tests.Directory_GetSetTimes.NullPath_ThrowsArgumentNullException [FAIL] 14:13:28 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:28 Stack Trace: 14:13:28 [FATAL] System.OutOfMemoryException 14:13:28 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:28 Stack Trace: 14:13:28 System.IO.Tests.Directory_GetSetTimes.Windows_DirectoryDoesntExist_ReturnDefaultValues [FAIL] 14:13:28 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:28 Stack Trace: 14:13:28 [FATAL] System.OutOfMemoryException 14:13:28 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:28 Stack Trace: 14:13:28 System.IO.Tests.Directory_GetSetTimes.EmptyPath_ThrowsArgumentException [FAIL] 14:13:28 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:28 Stack Trace: 14:13:28 [FATAL] System.OutOfMemoryException 14:13:28 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:28 Stack Trace: 14:13:28 System.IO.Tests.Directory_GetSetTimes.SettingUpdatesProperties [FAIL] 14:13:28 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:28 Stack Trace: 14:13:28 [FATAL] System.OutOfMemoryException 14:13:28 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:28 Stack Trace: 14:13:28 System.IO.Tests.Directory_GetSetTimes.CreationSetsAllTimes [FAIL] 14:13:28 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:28 Stack Trace: 14:13:28 [FATAL] System.OutOfMemoryException 14:13:28 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:28 Stack Trace: 14:13:28 System.IO.Tests.DirectoryInfo_GetSetTimes.SettingUpdatesProperties [FAIL] 14:13:28 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:28 Stack Trace: 14:13:28 [FATAL] System.OutOfMemoryException 14:13:28 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:28 Stack Trace: 14:13:28 System.IO.Tests.DirectoryInfo_GetSetTimes.CreationSetsAllTimes [FAIL] 14:13:28 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:28 Stack Trace: 14:13:28 [FATAL] System.OutOfMemoryException 14:13:28 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:28 Stack Trace: 14:13:29 System.IO.Tests.File_GetSetTimes.EmptyPath_ThrowsArgumentException [FAIL] 14:13:29 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:29 Stack Trace: 14:13:29 [FATAL] System.OutOfMemoryException 14:13:29 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:29 Stack Trace: 14:13:29 System.IO.Tests.File_GetSetTimes.SettingUpdatesProperties [FAIL] 14:13:29 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:29 Stack Trace: 14:13:29 [FATAL] System.OutOfMemoryException 14:13:29 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:29 Stack Trace: 14:13:29 System.IO.Tests.File_GetSetTimes.Windows_FileDoesntExist_ReturnDefaultValues [FAIL] 14:13:29 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:29 Stack Trace: 14:13:29 [FATAL] System.OutOfMemoryException 14:13:29 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:29 Stack Trace: 14:13:29 System.IO.Tests.File_GetSetTimes.NullPath_ThrowsArgumentNullException [FAIL] 14:13:29 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:29 Stack Trace: 14:13:29 [FATAL] System.OutOfMemoryException 14:13:29 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:29 Stack Trace: 14:13:29 System.IO.Tests.File_GetSetTimes.CreationSetsAllTimes [FAIL] 14:13:29 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:29 Stack Trace: 14:13:29 [FATAL] System.OutOfMemoryException 14:13:29 System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. 14:13:29 Stack Trace: 14:13:31 14:13:31 Unhandled Exception: OutOfMemoryException. ``` Test result [here](http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_winnano_debug_tst/6/console) 6632 area-System.Net CredentialCache.Remove compat: Don't throw when key not found This PR changes `CredentialCache.Remove` to not throw in .NET Core to match the behavior of the full framework. In the full framework, `CredentialCache.Remove` does not throw when the key isn't found, which is consistent with the behavior described in the MSDN [documentation](https://msdn.microsoft.com/en-us/library/4zaz5c95%28v=vs.110%29.aspx): > If authType is null or uriPrefix is null, or no matching credential is found in the cache, this method does nothing. cc: @stephentoub @davidsh 6644 area-System.IO Add FileSystem.Watcher support for NetBSD There is need to make use of the libinotify port. 6645 area-System.Reflection Expose System.Reflection APIs on .Net Native #5381 has the list of the APIs that need to be exposed. 6659 area-System.Net remove assert on gss_buffer members Fix for #6199 Testing in downstream components revealed that the earlier fix #6201, is not sufficient. There are cases where the instance of `gss_buffer_t` returned from the api is not null and has a zero length, but its data field may point to a non-null pointer. This PR attempts removes assertions about relation between the length and the data pointer. cc: @stephentoub @vijaykota 6663 area-System.IO Provide a version of Stream.Read that reads as much as possible I believe one of the most common mistakes when using `Stream.Read()` is that the programmer doesn't realize that `Read()` may return less data than what is available in the `Stream`. And even for programmers who are aware of this, having to write the same loop every single time they want to read from a `Stream` is annoying. So, my proposal is to add the following methods to `Stream` (mirroring the existing `Read` methods): ``` c# public int ReadAll(byte[] buffer, int offset, int count) public Task ReadAllAsync(byte[] buffer, int offset, int count) public Task ReadAllAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) ``` Each `ReadAll` method would call the corresponding `Read` method in a loop, until the `buffer` was filled or until `Read` returned 0. Questions: - Is there a better name than `ReadAll`? - These methods would work as well if they were extension methods. Should they be? - Very similar functionality is already exposed through `BinaryReader.ReadBytes()`. Why doesn't it have `async` version? 6666 area-System.Net On OSX, throw PlatformNotSupportedException from Socket.ReceiveFrom, … …ReceiveMessageFrom, etc., if called on a dual-mode socket. OSX does not provide IPv4 packet information for dual-mode sockets, so these APIs cannot be made to behave consistently when used on dual-mode sockets. Rather than behave inconsistently, we will throw PlatformNotSupportedException with suggestions for getting consistent behavior. Fixes #4004. @pgavlin, @CIPop, @stephentoub 6668 area-System.Net SSLv3.0 is not supported on Windows but is supported on Linux This very well may be an environment issue (I am vaguely aware that curl is used on non-Windows platforms), but I wanted to report it just in case. I made a test app to demonstrate this: [SslProtocols.zip](https://github.com/dotnet/corefx/files/159292/SslProtocols.zip). Just use `dotnet restore` and `dotnet run` to try it. My CI test results indicated that Mac does not support SSLv3.0 just like Windows, but I was not able to log in and try my test app there. ### Test app output: #### Windows ``` SSLv2.0: not supported (exception: A connection with the server could not be established) SSLv3.0: not supported (exception: A security error occurred) TLSv1.0: supported (response: HTTP/1.1 200 OK) TLSv1.1: supported (response: HTTP/1.1 200 OK) TLSv1.2: supported (response: HTTP/1.1 200 OK) ``` #### Linux ``` SSLv2.0: not supported (exception: SSL connect error) SSLv3.0: supported (response: HTTP/1.1 200 OK) TLSv1.0: supported (response: HTTP/1.1 200 OK) TLSv1.1: supported (response: HTTP/1.1 200 OK) TLSv1.2: supported (response: HTTP/1.1 200 OK) ``` _(note that the inner exception message is different from Windows and Linux, not sure if that is an issue)_ ### `dotnet --version` output: #### Windows [Version 1.0.0.001598](https://dotnetcli.blob.core.windows.net/dotnet/beta/Binaries/1.0.0.001598/dotnet-win-x64.1.0.0.001598.zip) ``` .NET Command Line Tools (1.0.0) Runtime Environment: OS Name: Windows OS Version: 10.0.10586 OS Platform: Windows Runtime Id: win10-x64 ``` #### Linux ``` .NET Command Line Tools (1.0.0-beta-001598) Product Information: Version: 1.0.0-beta-001598 Commit Sha: N/A Runtime Environment: OS Name: ubuntu OS Version: 14.04 OS Platform: Linux Runtime Id: ubuntu.14.04-x64 ``` 6671 area-System.Net Delete unused OSXIPv6GlobalStatistics file This file was not being included in compilation, so it should be deleted. @stephentoub 6672 area-System.Net Disable SSLv2 and SSLv3 in CurlHandler Forces CurlHandler to not use SSLv2 or SSLv3 even if they're available. SSLv2 has been disabled by default in libcurl since 7.18.1, and SSLv3 since 7.39.0, but this ensures they're disabled even before those versions. Fixes https://github.com/dotnet/corefx/issues/6668 cc: @bartonjs, @cipop, @davidsh, @kapilash, @joelverhagen 6673 area-System.Security Verify the behavior of GetRSAPrivateKey with a 384-bit key "384 is chosen only as a ""value that RSACSP supports that RSACng doesn't"" representative sample. Early testing suggests that the key may load validly into a CngKey and then fail when loading it into the RSACng object. If it works (returns any valid RSA instance), great; add a test. If not, fix it and add a test :smile:. " 6675 area-System.IO FileSystemWatcher doesn't trigger in the temp folder on OSX "I found a very peculiar bug that happens only under certain conditions. So, you need: - To be running on OSX (ElCapitain in my case) - The watched folder must be in the temp folder returned by `Path.GetTempPath()` Here's the code to reproduce: ``` csharp // This works (update the username): // var folder = Path.Combine(""/Users/victorhurdugaci/temp"", Guid.NewGuid().ToString()); // This fails: var folder = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); Console.WriteLine(folder); Directory.CreateDirectory(folder); using (var watcher = new FileSystemWatcher(folder)) { watcher.Created += (s, e) => { Console.WriteLine(""### Triggered""); }; watcher.EnableRaisingEvents = true; File.WriteAllText(folder + ""/f2"", """"); Console.WriteLine(""waiting...""); System.Threading.Thread.Sleep(10000); } ``` With the temp folder, it only prints ``` waiting... ``` With the user folder, it prints: ``` ### Triggered waiting... ``` Not sure if it's something special about the path characters or length. On my machine, the generated temp folder looks like `/var/folders/x4/h490d6xs4mndqfg5sk231_mw0000gn/T/1cc8944d-b218-4f95-8dd0-ea208fb9b9b7` `System.IO.FileSystem.Watcher` version is `4.0.0-rc2-23826` " 6676 area-System.Net Need more tests for non-DualMode socket usage There is a lot of coverage of DualMode socket send/receive operations that does not have corresponding coverage for non-DualMode sockets. We should add that, particularly since #6666 renders the DualMode tests mostly useless on OSX. 6677 area-System.Diagnostics Process.Modules tests are hanging in CI on OS X Locally then run fine, and they made it through a couple of CI runs. But something about shelling out to vmmap is causing them to hang in CI. 6681 area-System.Net BeginAcceptV4BoundToAnyV6_Success failed in CI ``` 18:18:24 System.Net.Sockets.Tests.DualMode.BeginAcceptV4BoundToAnyV6_Success [FAIL] 18:18:24 Assert.Equal() Failure 18:18:24 Expected: ::ffff:127.0.0.1 18:18:24 Actual: ::127.0.0.1 18:18:24 Stack Trace: 18:18:24 at System.Net.Sockets.Tests.DualMode.DualModeConnect_BeginAccept_Helper(IPAddress listenOn, IPAddress connectTo) 18:18:24 at System.Net.Sockets.Tests.DualMode.BeginAcceptV4BoundToAnyV6_Success() ``` cc: @ericeil , @ianhays 6684 area-System.Runtime Bug in System.Runtime.InteropServices.WindowsRuntime packaging I noticed that the System.Runtime.InteropServices.WindowsRuntime package only has a runtime output for `win8`. Unfortunately that breaks code on CoreCLR that uses reflection. The issue is that a netstandard library can reference types in that assembly even if it’s not used at runtime. It’s part of PCL 259 as well. So if I have an app (or unit test in this case) that runs on CoreCLR and uses reflection against a type in that library, I get a FileNotFoundException and it cannot load the types. Here's an example from Rx.NET ``` ReactiveTests.Tests.ObservableEventsTest.FromEventPattern_Reflection_Instance_InvalidVariance [FAIL] Expected InvalidOperationException threw FileNotFoundException. Stack trace: at System.Reactive.ReflectionUtils.GetEventMethods[TSender,TEventArgs](Type targetType, Object target, String eventName, MethodInfo& addMethod, MethodInfo& removeMethod, Type& delegateType, Boolean& isWinRT) at System.Reactive.Linq.QueryLanguage.FromEventPattern_[TSender,TEventArgs,TResult](Type targetType, Object target, String eventName, Func`3 getResult, IScheduler scheduler) at System.Reactive.Linq.QueryLanguage.FromEventPattern_[TEventArgs](Object target, String eventName, IScheduler scheduler) at System.Reactive.Linq.QueryLanguage.FromEventPattern[TEventArgs](Object target, String eventName) at System.Reactive.Linq.Observable.FromEventPattern[TEventArgs](Object target, String eventName) at ReactiveTests.Tests.ObservableEventsTest.<>c.b__9_0() in C:\Users\oren\source\git\reactive-extensions-private\Rx.NET\Source\Tests.System.Reactive\Tests\Linq\ObservableEventsTest.cs:line 280 at Microsoft.Reactive.Testing.ReactiveAssert.Throws[TException](Action action) Expected: True Actual: False ``` The unit test is a `netstandardapp1.5` and the library under test is a `netstandard1.0` lib. It just so happens that the code references types in that `System.Runtime.InteropServices.WindowsRuntime` package. This worked (and the tests passed) in dnx. Note that I don't necessarily expect WinRT functionality to work, but it seems critical that the file exists and is copied to all runtimes. Xamarin had this issue at one point too as they didn't generate this façade assembly. They finally did even if it was mostly no-ops. 6685 area-System.Text Proposal: Regex Repetition Syntax Enhancement "# The Issue If we want to match a list of any kind in regex, we currently have to make certain compromises. For example, say we wanted to match a list of names, such as: `Anna,Bob,Charlie` (a more complex example would be a list of phone numbers, or url's, so imagine the regex is potentially long and complex). We could try: ``` ((Anna|Bob|Charlie),)+ ``` However that doesn't match our original text as it requires a final `,` to match. | Text | Should match | Matches | | --- | --- | --- | | `""Anna,Bob,Charlie""` | yes | no **(wrong)** | | `""AnnaBob,Charlie""` | no | no | We could try: ``` ((Anna|Bob|Charlie),?)+ ``` But this will wrongly match items without the separator, which is probably not what the user wants: | Text | Should match | Matches | | --- | --- | --- | | `""Anna,Bob,Charlie""` | yes | yes | | `""AnnaBob,Charlie""` | no | yes **(wrong)** | Currently the only way to achieve this is through the duplication of the list-item regex group: ``` (Anna|Bob|Charlie)(,(Anna|Bob|Charlie))* ``` Which is a pain when the match is long like a phone number or a url, and if you update one part you have to remember to copy the changes to the other one. It also gets tricky if say you wanted it to match from 0 to 20 items, you'd have to do it like this: ``` ((Anna|Bob|Charlie)(,(Anna|Bob|Charlie)){0,19})? ``` The only way to somewhat avoid this is to put that regex part into a variable and use the variable twice to construct the regex, but this relies on the host language, still creates a longer than necessary regex, and matches an extra redundant matching group which the user then has to manually group with the first in the host language. # Proposal A more useful approach could be to use some repetition separator syntax. Regex already has repetition quantifiers like `+`, `*`, `?` and also `{m,n}`. The last one could be enhanced to specify an optional third parameter as a repetition-separator group: ``` (Anna|Bob|Charlie){0,20,(,)} ``` Since it can contain any valid regex syntax, it should always be enclosed inside a group, and it behaves like any normal group. Just like in normal usage, the quantifier limit values can be missing entirely: ``` (Anna|Bob|Charlie){,,(,)} ``` And if we only wanted to specify the separator: ``` (Anna|Bob|Charlie){(,)} ``` This would allow infinite repetition, equivalent to using the `*` or `{,}` quantifiers. | Text | Should match | Matches | | --- | --- | --- | | `""Anna,Bob,Charlie""` | yes | yes | | `""AnnaBob,Charlie""` | no | no | We could then easily enhance it to, for example, allow spaces after each comma: ``` (Anna|Bob|Charlie){(, *)} ``` This is much shorter and more readable than any existing alternatives, and produces a match result with all the correct values in the same matching group. The flow would look like this: ![regex separator flow](https://cloud.githubusercontent.com/assets/785247/13548375/98ba6ba2-e2f7-11e5-8396-38e6d0a68265.png) # Other examples These examples have been kept short for readability reasons and could need fine-tuning to work in all cases. | Description | Regex | | --- | --- | | Phone number lists | `(\(?\d{3}\)?-? *\d{3}-? *-?\d{4}){(, *)}` | | Versions names (""3.7.15"") | `(\d){(\.)}` | | Html class attribute | `class=""\s*(?\S+){(\s+)}\s*""` | | Html class attribute (alternative) | `class=""(\s*){(?\S+)}""` | | Mathematical calculations (""7.5 \* 2 + 10"") | `(\d+(\.\d)?([Ee]\d)?){( *[+-*/] *)}` | | Name parts (""Johann Wolfgang von Goethe"") | `^(?\S+){( )}$` | | Natural language (notice the nested repetitions) | `winners are (?(?\S+){1,,( )}){( then )}` | | Time matching (""03:15"", ""23:59:59"") | `(\d\d):(\d\d){1,2,(:)}` | | Javascript object notation | `[{] *(?[a-zA-Z_]\w*) *: *(?""[^""]*""|\d+(\.\d*)?([Ee]\d*)?|...other.types..){( *, *)} *[}]` | # Special Case In certain use cases a final optional separator match is also desirable. For example, in C# the collection initializer syntax allows for an optional final `,`: ``` C# var names = new List { ""Anna Alyson"", ""Bob Borton"", ""Charlie Cob"", }; ``` For this we could further enhance the syntax so that if the separator-group has a `+` after it, it can have an optional final match (the separator-group would not allowed to have any other quantifiers, however sub-groups can). The regex would look like this: ``` [{]\s*(?""[^""]*""){(\s*,\s*)+}\s*[}] ``` The new flow would then look like this: ![regex separator flow 2](https://cloud.githubusercontent.com/assets/785247/13548546/8badb2b2-e2fb-11e5-9d74-3860cc64ec2a.png) " 6689 area-System.Reflection Type conflict with BindingFlags "Type/namespace conflict with BindingFlags and `System.Reflection.TypeExtensions` renders code unable to compile. Same issue discussed here: https://github.com/dotnet/corefx/pull/6636#issuecomment-192417128 ## Steps to reproduce **program.cs:** ``` using System; namespace ConsoleApplication { public class Program { public static void Main(string[] args) { var bf = System.Reflection.BindingFlags.CreateInstance; } } } ``` **project.json:** ``` { ""version"": ""1.0.0-*"", ""compilationOptions"": { ""emitEntryPoint"": true }, ""dependencies"": { ""System.Reflection.TypeExtensions"": ""4.1.0-rc3-23904"" }, ""frameworks"": { ""netstandardapp1.5"": { ""dependencies"": { ""NETStandard.Library"": ""1.0.0-rc3-23904"" }, ""imports"": [ ""dnxcore50"", ""portable-net451+win8"" ] } } } ``` **Nuget.config:** ``` ``` Full code to reproduce is also available here: https://github.com/joshcomley/BugSamples/tree/master/DotNetCore/BindingFlagsBug ## Expected behavior It should compile ## Actual behavior `error CS0433: The type 'BindingFlags' exists in both 'System.Reflection.TypeExtensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System.Reflection, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'` ## Environment data `dotnet --version` output: .NET Command Line Tools (1.0.0-beta-001494) Product Information: Version: 1.0.0-beta-001494 Commit Sha: c7a9d1d63a Runtime Environment: OS Name: Windows OS Version: 10.0.10586 OS Platform: Windows Runtime Id: win10-x64 " 6691 area-Infrastructure Outer loop Unix runs failing with package restore errors "e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_osx_debug/25/consoleFull ``` 20:25:17 [20:29:24.72] Restoring all packages... 20:25:31 EXEC : error : System.Threading.Overlapped 4.0.1-rc3-23901 provides a compile-time reference assembly for System.Threading.Overlapped on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:25:31 EXEC : error : Some packages are not compatible with DNXCore,Version=v5.0 (osx.10.11-x64). [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:25:33 EXEC : error : System.Security.AccessControl 4.0.0-rc3-23901 provides a compile-time reference assembly for System.Security.AccessControl on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:25:33 EXEC : error : Some packages are not compatible with DNXCore,Version=v5.0 (osx.10.11-x64). [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:25:35 EXEC : error : Microsoft.Win32.Registry 4.0.0-rc3-23901 provides a compile-time reference assembly for Microsoft.Win32.Registry on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:25:35 EXEC : error : Some packages are not compatible with DNXCore,Version=v5.0 (osx.10.11-x64). [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:25:35 EXEC : error : System.Security.Cryptography.Csp 4.0.0-rc3-23901 provides a compile-time reference assembly for System.Security.Cryptography.Csp on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:25:35 EXEC : error : Some packages are not compatible with DNXCore,Version=v5.0 (osx.10.11-x64). [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:25:49 EXEC : error : System.Threading.Overlapped 4.0.1-rc3-23901 provides a compile-time reference assembly for System.Threading.Overlapped on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:25:49 EXEC : error : Some packages are not compatible with DNXCore,Version=v5.0 (osx.10.11-x64). [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:25:58 EXEC : error : System.Threading.Overlapped 4.0.1-rc3-23901 provides a compile-time reference assembly for System.Threading.Overlapped on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:25:58 EXEC : error : Some packages are not compatible with DNXCore,Version=v5.0 (osx.10.11-x64). [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:25:58 EXEC : error : System.Threading.Overlapped 4.0.1-rc3-23901 provides a compile-time reference assembly for System.Threading.Overlapped on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:25:58 EXEC : error : Some packages are not compatible with DNXCore,Version=v5.0 (osx.10.11-x64). [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:25:59 EXEC : error : System.Threading.Overlapped 4.0.1-rc3-23901 provides a compile-time reference assembly for System.Threading.Overlapped on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:25:59 EXEC : error : Some packages are not compatible with DNXCore,Version=v5.0 (osx.10.11-x64). [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:00 EXEC : error : System.Threading.Overlapped 4.0.1-rc3-23901 provides a compile-time reference assembly for System.Threading.Overlapped on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:00 EXEC : error : Some packages are not compatible with DNXCore,Version=v5.0 (osx.10.11-x64). [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:00 EXEC : error : System.Security.AccessControl 4.0.0-rc3-23901 provides a compile-time reference assembly for System.Security.AccessControl on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:00 EXEC : error : Some packages are not compatible with DNXCore,Version=v5.0 (osx.10.11-x64). [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:04 EXEC : error : Microsoft.Win32.Registry 4.0.0-rc3-23901 provides a compile-time reference assembly for Microsoft.Win32.Registry on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:04 EXEC : error : Some packages are not compatible with DNXCore,Version=v5.0 (osx.10.11-x64). [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:13 EXEC : error : Microsoft.Win32.Registry 4.0.0-rc3-23901 provides a compile-time reference assembly for Microsoft.Win32.Registry on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:13 EXEC : error : System.Security.AccessControl 4.0.0-rc3-23901 provides a compile-time reference assembly for System.Security.AccessControl on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:13 EXEC : error : Some packages are not compatible with DNXCore,Version=v5.0 (osx.10.11-x64). [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:13 EXEC : error : Microsoft.Win32.Registry 4.0.0-rc3-23901 provides a compile-time reference assembly for Microsoft.Win32.Registry on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:13 EXEC : error : System.Security.AccessControl 4.0.0-rc3-23901 provides a compile-time reference assembly for System.Security.AccessControl on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:13 EXEC : error : Some packages are not compatible with DNXCore,Version=v5.0 (osx.10.11-x64). [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:14 EXEC : error : Microsoft.Win32.Registry 4.0.0-rc3-23901 provides a compile-time reference assembly for Microsoft.Win32.Registry on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:14 EXEC : error : Some packages are not compatible with DNXCore,Version=v5.0 (osx.10.11-x64). [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:15 EXEC : error : System.Runtime 4.0.0 provides a compile-time reference assembly for System.Runtime on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:15 EXEC : error : System.Reflection 4.0.0 provides a compile-time reference assembly for System.Reflection on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:15 EXEC : error : System.IO 4.0.0 provides a compile-time reference assembly for System.IO on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:15 EXEC : error : System.Text.Encoding 4.0.0 provides a compile-time reference assembly for System.Text.Encoding on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:15 EXEC : error : System.Threading.Tasks 4.0.0 provides a compile-time reference assembly for System.Threading.Tasks on DNXCore,Version=v5.0, but there is no run-time assembly compatible with osx.10.11-x64. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:15 EXEC : error : Some packages are not compatible with DNXCore,Version=v5.0 (osx.10.11-x64). [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:26:26 /Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj(54,5): error MSB3073: The command """"/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/Tools/dotnetcli/bin/dotnet"" restore --packages ""/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/packages"" --source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json --source https://www.nuget.org/api/v2/ ""/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/src"" ""/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/pkg"""" exited with code -1. ``` " 6693 area-System.Xml XDocument writer DateTime serialization difference between full framework and CoreCLR "Repro ``` using System; using System.Xml.Linq; public class Program { public static void Main() { var doc = new XDocument(); using (var w = doc.CreateWriter()) { w.WriteStartElement(""Root""); w.WriteValue(new DateTime(2002, 4, 3, 0, 0, 0)); w.WriteEndElement(); } Console.WriteLine(doc.ToString()); } } ``` Output on .NET 4.6.1: ``` 2002-04-03T00:00:00 ``` Output on .NET Core: ``` 2002-04-03T00:00:00-05:00 ``` Note the difference regarding the inclusion of the timezone offset. " 6695 area-System.Runtime Adding an Array.Fill method ## Background At the moment, there's no built-in way to fill an array with a particular value in .NET. You'd have to hand-roll your own extension method, like this: ``` csharp public static void Fill(this T[] array, T value) { for (int i = 0; i < array.Length; i++) array[i] = value; } ``` While this may be the most obvious way, it is not necessarily the most efficient. For example, we could specialize to `memset` if the array was a byte array, or use an algorithm where we fill the beginning of the array and [double the number of elements copied each time](http://stackoverflow.com/a/13806014/4077294). To increase the efficiency of code doing this and prevent people from reinventing the wheel, I propose we add a static `Fill` method to the `Array` class that does this. ## Proposed API ``` csharp public class Array { public static void Fill(T[] array, T value); public static void Fill(T[] array, int offset, int count, T value); } ``` 6698 area-System.Net Short-circuit for strings in WebUtility.UrlEncode This is a follow-up on #6543 for `UrlEncode`. It has separate implementations for making passes over the strings/byte arrays, so (I haven't tested this yet) there should be no performance loss. cc @stephentoub 6700 area-System.Net Add performance tests for WebUtility You asked for perf tests in #6698, so here they are. cc @davidsh **note:** I'm having trouble compiling the tests locally because of some error with `SafeProcessHandle` (probably unrelated), so I'll fix any errors if they pop up in CI. 6701 area-System.Reflection Propose, API change: DispatchProxy instantiation The current API for instancing the DispatchProxy is counter intuitive name- and usage-wise. Especially when injecting dependencies into the proxy. ``` cs public static T Create() where TProxy : DispatchProxy ``` Currently `Create` will return the proxied instance of T, which then oddly needs to be cast to the TProxy type in order to inject any dependencies into the proxy instance itself: ``` cs ISomeServiceInterface proxiedInstance = DispatchProxy.Create(); var actualProxy = proxiedInstance as MyProxy; actualProxy.MyDependency = dependency; ``` Instead consider returning the proxy instance itself, and add a property in order to retrieve the proxied instance to allow following usage: ``` cs MyProxy proxy = DispatchProxy.Create(); proxy.MyDependency = dependency; IServiceInterface proxiedInstance = actualProxy.ProxiedInstance; ``` 6702 area-Infrastructure Errors during cross-building NetBSD assemblies Crossbuilding on Ubuntu: ftp://ftp.netbsd.org/pub/NetBSD/misc/kamil/corefx-crossbuild-netbsd-assemblies-1.txt Summary: ``` 24 Warning(s) 66 Error(s) ``` ``` System/Diagnostics/ProcessManager.Unix.cs(40,20): error CS0103: The name 'CreateProcessInfo' does not exist in the current context [/home/kamil/corefx/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj] System/Diagnostics/ProcessThread.cs(92,38): error CS0103: The name 'PriorityLevelCore' does not exist in the current context [/home/kamil/corefx/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj] System/Diagnostics/ProcessThread.cs(98,17): error CS0103: The name 'PriorityLevelCore' does not exist in the current context [/home/kamil/corefx/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj] System/Diagnostics/ProcessManager.Unix.cs(49,20): error CS7036: There is no argument given that corresponds to the required formal parameter 'machineName' of 'ProcessManager.GetProcessIds(string)' [/home/kamil/corefx/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj] System/Diagnostics/Process.cs(293,63): error CS0117: 'ProcessManager' does not contain a definition for 'GetModuleInfos' [/home/kamil/corefx/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj] System/Diagnostics/Process.cs(452,42): error CS0103: The name 'ProcessorAffinityCore' does not exist in the current context [/home/kamil/corefx/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj] System/Diagnostics/Process.cs(459,17): error CS0103: The name 'ProcessorAffinityCore' does not exist in the current context [/home/kamil/corefx/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj] System/Diagnostics/Process.cs(856,17): error CS0103: The name 'GetWorkingSetLimits' does not exist in the current context [/home/kamil/corefx/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj] System/Diagnostics/Process.cs(867,13): error CS0103: The name 'SetWorkingSetLimitsCore' does not exist in the current context [/home/kamil/corefx/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj] System/Diagnostics/Process.cs(908,20): error CS1501: No overload for method 'GetProcessesByName' takes 2 arguments [/home/kamil/corefx/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj] System/Diagnostics/Process.cs(932,57): error CS0117: 'ProcessManager' does not contain a definition for 'GetProcessInfos' [/home/kamil/corefx/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj] System/Diagnostics/Process.Unix.cs(337,27): error CS0103: The name 'GetExePath' does not exist in the current context [/home/kamil/corefx/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj] System/Diagnostics/ThreadInfo.cs(16,24): error CS0649: Field 'ThreadInfo._threadId' is never assigned to, and will always have its default value 0 [/home/kamil/corefx/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj] System/Diagnostics/ThreadInfo.cs(22,35): error CS0649: Field 'ThreadInfo._threadWaitReason' is never assigned to, and will always have its default value [/home/kamil/corefx/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj] System/Diagnostics/ThreadInfo.cs(18,22): error CS0649: Field 'ThreadInfo._basePriority' is never assigned to, and will always have its default value 0 [/home/kamil/corefx/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj] System/Diagnostics/ThreadInfo.cs(21,30): error CS0649: Field 'ThreadInfo._threadState' is never assigned to, and will always have its default value [/home/kamil/corefx/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj] System/Diagnostics/ThreadInfo.cs(20,25): error CS0649: Field 'ThreadInfo._startAddress' is never assigned to, and will always have its default value [/home/kamil/corefx/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj] System/Diagnostics/ThreadInfo.cs(17,22): error CS0649: Field 'ThreadInfo._processId' is never assigned to, and will always have its default value 0 [/home/kamil/corefx/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj] System/Diagnostics/ThreadInfo.cs(19,22): error CS0649: Field 'ThreadInfo._currentPriority' is never assigned to, and will always have its default value 0 [/home/kamil/corefx/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj] System/IO/FileSystemWatcher.cs(158,21): error CS0103: The name 'StopRaisingEvents' does not exist in the current context [/home/kamil/corefx/src/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj] System/IO/FileSystemWatcher.cs(370,21): error CS0103: The name 'StopRaisingEvents' does not exist in the current context [/home/kamil/corefx/src/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj] System/IO/FileSystemWatcher.cs(381,21): error CS0103: The name 'FinalizeDispose' does not exist in the current context [/home/kamil/corefx/src/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj] System/IO/FileSystemWatcher.cs(533,17): error CS0103: The name 'StopRaisingEvents' does not exist in the current context [/home/kamil/corefx/src/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj] System/IO/FileSystemWatcher.cs(543,13): error CS0103: The name 'StartRaisingEvents' does not exist in the current context [/home/kamil/corefx/src/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj] System/Net/NetworkInformation/IPGlobalProperties.cs(17,20): error CS0103: The name 'IPGlobalPropertiesPal' does not exist in the current context [/home/kamil/corefx/src/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj] System/Net/NetworkInformation/NetworkInterface.cs(15,20): error CS0103: The name 'NetworkInterfacePal' does not exist in the current context [/home/kamil/corefx/src/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj] System/Net/NetworkInformation/NetworkInterface.cs(20,20): error CS0103: The name 'NetworkInterfacePal' does not exist in the current context [/home/kamil/corefx/src/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj] System/Net/NetworkInformation/NetworkInterface.cs(27,24): error CS0103: The name 'NetworkInterfacePal' does not exist in the current context [/home/kamil/corefx/src/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj] System/Net/NetworkInformation/NetworkInterface.cs(35,24): error CS0103: The name 'NetworkInterfacePal' does not exist in the current context [/home/kamil/corefx/src/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj ``` 6705 area-System.Net PostAsync coreclr send different request compare to PostAsync clr "When I send a PostAsync request in clr using (`GAC_MSIL\System.Net.Http\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.dll`) the request is accepted. But sending the same request in coreclr using (`System.Net.Http\4.0.1-beta-23516\ref\dotnet5.2\System.Net.Http.dll`) the request is not accepted Code used ``` var x = new HttpClient(); x.BaseAddress = new Uri(""https://leerlingen.trinitascollege.nl""); var content = new FormUrlEncodedContent(new[] { new KeyValuePair(""wu_loginname"",""name""), new KeyValuePair(""wu_password"",""password""), new KeyValuePair(""path"",""/"") }); var result = await x.PostAsync(""/login?passAction=login"", content); ``` Fiddler raw request coreclr request ``` POST https://leerlingen.trinitascollege.nl/login?passAction=login HTTP/1.1 Connection: Keep-Alive Content-Type: application/x-www-form-urlencoded Host: leerlingen.trinitascollege.nl Content-Length: 49 Accept-Encoding: gzip, deflate wu_loginname=name&wu_password=password&path=%2F ``` coreclr response ``` HTTP/1.1 302 Moved Temporarily Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=B25FE445133AF103021C6B9FD731FEC2; Path=/; Secure; HttpOnly Cache-control: no-cache Expires: Thu, 01 Dec 1994 16:00:00 GMT Pragma: no-cache Connection: close location: / Content-Type: text/html;charset=UTF-8 Content-Language: nl-NL Content-Length: 117 Date: Sun, 06 Mar 2016 16:02:23 GMT Document Moved

Object Moved

here ``` clr request ``` POST https://leerlingen.trinitascollege.nl/login?passAction=login HTTP/1.1 Connection: Keep-Alive Content-Type: application/x-www-form-urlencoded Host: leerlingen.trinitascollege.nl Content-Length: 49 Expect: 100-continue wu_loginname=name&wu_password=password&path=%2F ``` clr response ``` HTTP/1.1 302 Moved Temporarily Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=6CFCD4313BB8B24B1BC65F246C4346F1; Path=/; Secure; HttpOnly Cache-control: no-cache Expires: Thu, 01 Dec 1994 16:00:00 GMT Pragma: no-cache Connection: close location: / Content-Type: text/html;charset=UTF-8 Content-Language: nl-NL Content-Length: 117 Date: Sun, 06 Mar 2016 16:05:55 GMT Document Moved

Object Moved

here ``` " 6706 area-Meta Create Silverlight 5 targeting pack Please publish a targeting pack for building Silverlight 5 projects with CLI. Essentially something like this: https://gist.github.com/onovotny/93ecd8021c0f0cf7b4f4 There may be limitations for item types that require custom tasks/targets, but this handles the bulk of non-GUI libs useful in an xproj. The scenario is porting/maintaining projects that need to cross-compile to existing full frameworks. 6707 area-Meta Create Xamarin targeting packs "Similar to #6706, it would be extremely useful to have the Xamarin reference assemblies packaged into targeting packs for cross-compiling in xproj/CLI. There may be limitations in that certain item types that need custom tasks may not work, but this still opens up significant functionality in ""regular"" class libraries that are x-plat. I understand that this will likely need to wait until the acquisition closes and some dust settling, but wanted to file an issue to track it. " 6708 area-System.Net CookieContainer: Make internal PathList a struct Avoid the unnecessary wrapper object and lock object allocations. Test line & branch coverage of the changes is 100%. cc: @davidsh @stephentoub 6709 area-System.Data Should DataTable be sealed in the contract and implementation? `DataTable` is currently an empty class in .NET Core, included only to complete the `IDataReader` interface. As such, the constructor is `internal` ([ref](https://github.com/dotnet/corefx/blob/e2f0f429788f611b3d7ac35f0154c975011fd191/src/System.Data.Common/ref/System.Data.Common.cs#L52-L55), [src](https://github.com/dotnet/corefx/blob/e2f0f429788f611b3d7ac35f0154c975011fd191/src/System.Data.Common/src/System/Data/DataTable.cs)), preventing external callers from subclassing or creating an instance. Any reason why it shouldn't also be `sealed` in both the contract and implementation? cc: @saurabh500 6710 area-System.Runtime Proposal: Adding a Buffer.MemoryFill method equivalent to memset Separated out from #6695 since I made a false assumption that `initblk` could be used to fill non-byte arrays with a particular value; apparently not. ## Rationale There's no fast, convenient way at the moment to fill a byte array with a particular value; the fastest method on [StackOverflow](http://stackoverflow.com/a/13806014/4077294) currently involves filling the first few bytes with a for-loop, and then iteratively copying those over to the next few bytes via calls to `BlockCopy`. It would be nice if we could just provide a `MemoryFill` method that was equivalent to memset/the initblk opcode. ## Proposed API ``` csharp public static class Buffer { public unsafe static void MemoryFill(void* pointer, byte value, long count); public unsafe static void MemoryFill(void* pointer, byte value, ulong count); } ``` (revision: Changed the wording from `MemorySet` to `MemoryFill` since that sounds less awkward) 6718 area-System.Security Remove X509Certificates workaround after updating packages After we update to package version 23908 or later we need to remove the project reference workaround I added to address lack of support for netstandard1.3. See https://github.com/dotnet/corefx/pull/6717 & https://github.com/dotnet/corefx/pull/6713. I added a workaround to System.Net.Http.WinHttpHandler, System.Net.Security, and System.Net.WebSockets.Client. All of these assemblies were targeting NETStandard1.3 and using X509Certificates. I had to replace the package reference with a project reference to the reference assembly temporarily because the assembly was missing from the package. I temporarily added dependencies on other crypto contracts (required to make package validation see a full closure). Once we update packages, replace these with a single reference to the X509Certificates package and remove the project reference from the csprojs. 6720 area-System.IO Add better failure messages when trying to create a named pipe on non-Windows "Trying to create a cross-machine named pipe or a named pipe with a name that includes characters that aren't valid as a filename throws a `PlatformNotSupportedException`. Currently the default constructor for the exception is used, so there's no information about what specifically wasn't supported. The exception message should describe what wasn't supported (ie ""Cross-machine pipes are not supported on this operating system"" or ""The specified pipe name contained characters which are not supported in pipe names on this operating system""). Otherwise when people hit this issue they may conclude that named pipes aren't supported at all on non-Windows operating systems. Relevant code: https://github.com/dotnet/corefx/blob/61ff821f213cf323bd52aad3623f9204901311e7/src/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Unix.cs#L24-L42 cc @stephentoub " 6721 area-System.Net System.Net.Http.HttpResponseMessage.ReasonPhrase can return null on core There was a recent regression with WinHttpHandler where HttpResponseMessage.ReasonPhrase now returns `null` rather than `string.Empty` if no reason phrase was specified in the response message. This diverges from the HttpClientHandler/HttpWebRequest behavior in the full framework that always return `string.Emtpy`. @davidsh 6725 area-System.Net Break dependency on older collections in System.Net.Security ReadOnlyCollectionBase https://github.com/dotnet/corefx/blob/master/src/System.Net.Security/src/System/Security/Authentication/ExtendedProtection/ServiceNameCollection.cs#L12 In the contract it is only ICollection and IEnumerable so we should try to make the implementation more closely match. ArrayList https://github.com/dotnet/corefx/blob/master/src/System.Net.Security/src/System/Security/Authentication/ExtendedProtection/ServiceNameCollection.cs#L30 Hashtable https://github.com/dotnet/corefx/blob/master/src/System.Net.Security/src/System/Net/SslSessionsCache.cs#L15 cc @davidsh @CIPop @justinvp you broke some similar dependencies in other networking APIs are you interested in tackling this one? 6726 area-System.Net Break dependency on older collections in System.Net.WebHeaderCollection System.Net.WebHeaderCollection pulls in System.Collections.Specialized which pulls in System.Collections.NonGeneric which we are trying to break dependencies on. We should see if we can break the below dependency in a reasonable way. NameValueCollection https://github.com/dotnet/corefx/blob/master/src/System.Net.WebHeaderCollection/src/System/Net/WebHeaderCollection.cs#L33 cc @davidsh @CIPop 6727 area-System.Net HttpResponseMessage.ReasonPhrase should not be null Recent changes due to PR #3199 caused the `HttpResponseMessage.ReasonPhrase` property to be a null string if the HTTP server response only contained a statuscode but no description on the status line. The existing .NET Framwork behavior is to have empty string as the property value in that case. Added a new test to validate this change. Fixes #6721. 6728 area-System.Net HttpClientHandler does not store HttpOnly cookies by default In testing for ASP.NET, we found a curious behavior in System.Net.HttpClientHandler. This handler is not storing HttpOnly cookies in the cookie collection it creates. Should it store HttpOnly cookies by default as well? It appears this issue has a history. The comment in code (see [HttpClientHandler.cs 462-473)](https://github.com/dotnet/corefx/blob/master/src/System.Net.Http/src/netcore50/System/Net/HttpClientHandler.cs#L462-L473) explains the history of this quirk. Before you could turn off lower-level cookie handling in WinRT (before [HttpBaseProtocolFilter.CookieUsageBehavior](https://msdn.microsoft.com/en-us/library/windows/apps/windows.web.http.filters.httpbaseprotocolfilter.cookieusagebehavior.aspx)), storing httponly cookies could cause issues. But this clearly does not apply to all platforms (e.g. Linux). To play with the issue, see this example app: https://gist.github.com/natemcmaster/e51aa33cf77416772afc This creates a simple server that response with 2 cookies, on HttpOnly and the other not. HttpClientHandler only stores the HttpOnly=false cookie. 6729 area-System.Net Http/WebSocket stacks: Support further limiting of SSL protocols As noted in https://github.com/dotnet/corefx/issues/6668 & https://github.com/NuGet/Home/issues/390 The framwork is currently limiting SSL protocols, but customers might choose to be more restrictive, there is currently no way to specify it in code, and perhaps alternatively in an external configuration (local or machine level). 6732 area-System.IO ChangedTests.FileSystemWatcher_Changed_PreSeededNestedStructure(includeSubdirectories: False) fails on windows The ChangedTests.FileSystemWatcher_Changed_PreSeededNestedStructure(includeSubdirectories: False) test failed on Windows with System.UnauthorizedAccessException. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_release_prtest/3194/testReport/junit/(root)/ChangedTests/FileSystemWatcher_Changed_PreSeededNestedStructure_includeSubdirectories__False_/ 6734 area-System.Data System.Data.SqlClient reference assembly surface area doesn't match impl "When compiling our tests against the System.Data.SqlClient reference assembly, instead of the Windows implementation assembly, there are compilation issues... ``` ""E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj"" (BuildAndTest target) (78) -> (CoreCompile target) -> SqlBulkCopyColumnMappingCollectionTest.cs(78,62): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(79,62): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(102,32): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(105,32): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(232,56): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(325,32): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(326,32): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(327,32): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(372,32): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(373,32): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(374,32): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(390,32): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(391,32): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(392,32): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(400,32): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(401,32): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(405,32): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(406,32): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(407,32): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(450,32): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(487,32): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(488,32): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] SqlBulkCopyColumnMappingCollectionTest.cs(492,32): error CS0021: Cannot apply indexing with [] to an expression of type 'SqlBulkCopyColumnMappingCollection' [E:\gh\chcosta\corefx\src\System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj] ``` You can repro this by compiling System.Data.SqlClient\tests\FunctionalTests\System.Data.SqlClient.Tests.csproj and exchanging the reference to System.Data.SqlClient.dll, with a reference to the reference assembly. This blocks our ability to compile our tests against current packages. /cc @ericstj @karajas " 6735 area-System.Net Return correct SslStream.KeyExchangeValue when algorithm is ECDH "We needed to add another constant for the ECDH key exchange algorithm, to match the behavior on Windows. Also, the string comparisons used when parsing out the results for `CryptoNative_GetSslConnectionInfo` were not doing the right thing; they needed to compare the _lengths_ of the strings as well, to avoid, for example, ""ECDH"" matching ""ECDH/RSA"". Fixes #5251. @bartonjs, @eerhardt please have a look. " 6737 area-System.Net HttpClient is not sending cookies to server in some scenarios **Repro code solution:** https://github.com/kichalla/httpclientnotsendingcookie **Steps to run the repro code** - `dotnet restore` and `dotnet build` the `WebApplication1` app. This is a simple ASP.NET Core web app which has couple of middleware. - Now do `dotnet run` the web app and it should listen at the default address `http://localhost:5000` - Now for the client `dotnet restore`, `dotnet run` the project `coreclrhttpclient`. **Expected:** Postdata action received the following cookies: .AspNetCore.Session : RAExEmXpoCbueP_QYM, .AspNetCore.Antiforgery.Xam7_OeLcN4 : CfDJ8NGNxAt7CbdClq3UJ8_6w_4661wRQZT1aDtUOIUKshbcV4P0NdS8klCL5qGSN-PNBBV7w23G6MYpQ81t0PMmzIN4O04fqhZ0u1YPv66mixtkX3iTi291DgwT3o5kozfQhe08-RAExEmXpoCbueP_QYM **Actual:** Postdata action received the following cookies: .AspNetCore.Session : RAExEmXpoCbueP_QYM @natemcmaster @Tratcher @muratg 6740 area-System.IO API Proposal: Adding ArraySegment-based methods to the System.IO namespace ## Background To avoid unnecessary allocations, lots of code that works with Streams and I/O passes around a 'portion' of an array containing the relevant data instead of copying it to a new one. Since .NET does not yet support multiple return values, this is commonly represented as an `ArraySegment`, where T is the type of the element contained in the array. Unfortunately, the System.IO namespace does not have overly sophisticated support for `ArraySegments` (aside from the recently-added `TryGetBuffer` for `MemoryStream`), forcing people who use them to 'unravel' them like this: ``` csharp stream.Write(segment.Array, segment.Offset, segment.Count); ``` I propose adding convenience methods to the existing System.IO APIs that will make this less verbose, and prevent accidents like e.g. the programmer mixing up `Offset` and `Count`. ## Proposed API ``` csharp namespace System.IO { public class BinaryReader : IDisposable { public int Read(ArraySegment buffer); public int Read(ArraySegment buffer); } public class BinaryWriter : IDisposable { public void Write(ArraySegment buffer); public void Write(ArraySegment buffer); } public class MemoryStream : Stream { public MemoryStream(ArraySegment buffer); public MemoryStream(ArraySegment buffer, bool writable); public MemoryStream(ArraySegment buffer, bool writable, bool publiclyVisible); } public class Stream : IDisposable { public int Read(ArraySegment buffer); public Task ReadAsync(ArraySegment buffer); public Task ReadAsync(ArraySegment buffer, CancellationToken cancellationToken); public void Write(ArraySegment buffer); public Task WriteAsync(ArraySegment buffer); public Task WriteAsync(ArraySegment buffer, CancellationToken cancellationToken); } public abstract class TextReader : IDisposable { public int Read(ArraySegment buffer); public int ReadBlock(ArraySegment buffer); public Task ReadBlockAsync(ArraySegment buffer); } public abstract class TextWriter : IDisposable { public void Write(ArraySegment buffer); public Task WriteAsync(ArraySegment buffer); public void WriteLine(ArraySegment buffer); public Task WriteLineAsync(ArraySegment buffer); } } ``` 6742 area-Infrastructure Arch Linux: Build.sh Managed Is Broken With Wrong Paths "``` $ ./build.sh x64 release Unsupported Linux distribution 'arch' detected. Configuring as if for Ubuntu. Setting up directories for build Restoring NuGet.exe... Unsupported Linux distribution 'arch' detected. Downloading ubuntu-x64 tools. Installing dotnet cli... Restoring BuildTools version 1.0.25-prerelease-00190... Failed to initialize CoreCLR, HRESULT: 0x80131500 ERROR: Could not restore build tools correctly. See '/init-tools.log' for more details. Initializing BuildTools... /init-tools.sh: line 83: /packages/Microsoft.DotNet.BuildTools/1.0.25-prerelease-00190/lib/init-tools.sh: No such file or directory Done initializing tools. ./build.sh: line 108: /Tools/corerun: No such file or directory tail: cannot open '/msbuild.log' for reading: No such file or directory Build Exit Code = 127 ``` ""dotnet-ubuntu-x64.1.0.0.001504.tar.gz"" does not contain ANY .sh Files are extracted to ""./Tools/dotnetcli/bin/"", so corerun will not be found in ./Tools. " 6746 area-System.Security ProtectedData usage How can I use ProtectedData from https://github.com/dotnet/corefx/blob/master/src/System.Security.Cryptography.ProtectedData/ref/System.Security.Cryptography.ProtectedData.cs? I see no nuget package available or is it? Thank You 6750 area-System.Net Two error handling changes to SslStream "Commit (1). Pass Exception through SecurityStatusPal in SslStream. There isn't a good mapping between OpenSSL errors and most of the errors in SecurityStatusPal. As a result, with the current set up, important information about errors that occurred is getting lost and translated into meaningless information by the time it makes it out to the developer, making it difficult to diagnose the cause of a failure. This commit allows the original exception behind a failure to be passed through the PAL layer, such that when an exception is eventually thrown, the Unix implementation can choose to use the original exception rather than translating the error code. For example, instead of: ``` System.Security.Authentication.AuthenticationException : A call to SSPI failed, see inner exception. ---- Interop+OpenSsl+SslException : Operation failed with error - 12. ``` (where ""12"" is the number that ends up getting used for all failures, as the numerical value of SecurityStatusPal.InternalError), we now get: ``` System.Security.Authentication.AuthenticationException : A call to SSPI failed, see inner exception. ---- Interop+OpenSsl+SslException : SSL Handshake failed with OpenSSL error - SSL_ERROR_SSL. -------- Interop+Crypto+OpenSslCryptographicException : error:140740B5:SSL routines:SSL23_CLIENT_HELLO:no ciphers available ``` Commit (2). Use ExceptionDispatchInfo in SslStream. Currently in SslStream, exceptions get captured and then later thrown with ""throw exception;"". This causes their stack traces to get overwritten, losing information about where the exception actually came from. This commit changes these locations to use ExceptionDispatchInfo instead, enabling the stacks and Watson bucket information to be preserved. For example, instead of: ``` System.IO.IOException: Authentication failed because the remote party has closed the transport stream. at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) in corefx\src\System.Net.Security\src\System\Net\SecureProtocols\SslState.cs:line 752 at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) in corefx\src\System.Net.Security\src\System\Net\SecureProtocols\SslState.cs:line 722 at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) in corefx\src\System.Net.Security\src\System\Net\SecureProtocols\SslStream.cs:line 125 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Xunit.Assert.d__61.MoveNext() ``` we now get: ``` System.IO.IOException: Authentication failed because the remote party has closed the transport stream. at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) in corefx\src\System.Net.Security\src\System\Net\SecureProtocols\SslState.cs:line 882 at System.Net.Security.SslState.PartialFrameCallback(AsyncProtocolRequest asyncRequest) in corefx\src\System.Net.Security\src\System\Net\SecureProtocols\SslState.cs:line 1110 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) in corefx\src\System.Net.Security\src\System\Net\SecureProtocols\SslState.cs:line 752 at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) in corefx\src\System.Net.Security\src\System\Net\SecureProtocols\SslState.cs:line 722 at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) in corefx\src\System.Net.Security\src\System\Net\SecureProtocols\SslStream.cs:line 125 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Xunit.Assert.d__61.MoveNext() ``` Contributes to https://github.com/dotnet/corefx/issues/5606 and https://github.com/dotnet/corefx/issues/5890. For both this doesn't completely fix the issue: I've stayed away from touching NegotiateStream to avoid conflicts with the incoming PR from the NegotiateStream work on Unix. Commit (3). Fixes some warnings during the build for the System.Net.Security.Tests project when building for Unix. cc: @davidsh, @cipop, @ericeil, @bartonjs, @vijaykota, @kapilash " 6751 area-System.Data Will EF7 support UWP with SQL server when released? I originally posted this question to the entity framework github repo and they said it should work, but was dependent on the SqlClient (the ADO.NET provider for SQL Server). Can you tell me if there are plans to have SqlClient compatible with UWP? If so what is the estimated timeline. @YoungGah @saurabh500 Original question with EF team's answers https://github.com/aspnet/EntityFramework/issues/4692 Thanks, Jason 6752 area-System.Collections ImmutableArray should come with a Count property "When refactoring code it is not uncommon that you need to change types, e.g. ImmutableArray to IReadOnlyList due to its covariance. While it is common that certain members are not available in a supertype it certainly feels very strange that a property just get's renamed without any semantic change. You argued: ""We’ve decided to go with having a Length property instead of Count because we see ImmutableArray as a replacement for regular arrays. This makes it easier to port existing code. It also makes the design a bit more self-contained."" But since most other collections besides the array come with a Count property, the chances are very hight that with using the Length property you keep on switching between those properties on every larger refactoring. It would be nice if you could just add the Count property if possible. By that users that more likely switch between covariant access and direct access to the immutable array (instead of switching between mutable and immutable) can just stick with a property that doesn't break code. " 6753 area-Infrastructure Enable Ready2Run version of Microsoft.NETCore.App packages Packages comprising NEtCore.App meta package must have their assemblies compiled as R2R images prior to packaging. CC @davidfowl @weshaggard @piotrpMSFT @JohnChen0 @jkotas 6755 area-System.Diagnostics TraceListenerCollection is not thread-safe "Both CoreFx and the desktop implementations claim that TraceListenerCollection is thread-safe. But two threads executing **System.Diagnostics.Trace.Listeners.Remove(""Default"")** at the same time can run into each other. The problem is that several operations (like Remove(string)) are built on top of enumerating the collection, and enumerating the collection will neither lock it nor make a copy of it. It's possible to squint and say ""but it is thread-safe in that its internal state can't be corrupted via multiple simultaneous mutation"", but I don't think that's consistent with the way that most people think of thread-safety. If nothing else, the documentation should be updated. " 6757 area-System.Net "Re-enable System.Net.Security ""no encryption"" tests on Linux" We'd disabled these tests on Linux because they were failing on OpenSUSE. The reason turned out to be that the OpenSSL installed on OpenSUSE was built explicitly without null cipher support. This commit re-enables the tests, but as ConditionalFacts that check whether we're either on Windows or on a Unix with an OpenSSL that sports null ciphers. cc: @ericeil, @bartonjs, @davidsh, @CIPop, @vijaykota Fixes #5557 6759 area-Infrastructure Remove OpenSourceSign from Microsoft.DotNet.Build.Tasks Csc now supports OSS signing via /publicsign switch. The build task is not needed anymore and can be removed and CoreFX build simplified. 6760 area-Infrastructure Fork project.jsons for windows-only dependencies @Priya91 pointed out some restore errors to me on Ubuntu that seem to be because of auto-RID: http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_ubuntu14.04_debug/23/consoleText ``` EXEC : error : Microsoft.Win32.Registry 4.0.0-rc3-23908 provides a compile-time reference assembly for Microsoft.Win32.Registry on DNXCore,Version=v5.0, but there is no run-time assembly compatible with ubuntu.14.04-x64. [/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/build.proj] EXEC : error : Some packages are not compatible with DNXCore,Version=v5.0 (ubuntu.14.04-x64). [/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/build.proj] EXEC : error : System.Security.AccessControl 4.0.0-rc3-23908 provides a compile-time reference assembly for System.Security.AccessControl on DNXCore,Version=v5.0, but there is no run-time assembly compatible with ubuntu.14.04-x64. [/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/build.proj] EXEC : error : Some packages are not compatible with DNXCore,Version=v5.0 (ubuntu.14.04-x64). [/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/build.proj] EXEC : error : System.Threading.Overlapped 4.0.1-rc3-23908 provides a compile-time reference assembly for System.Threading.Overlapped on DNXCore,Version=v5.0, but there is no run-time assembly compatible with ubuntu.14.04-x64. [/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/build.proj] EXEC : error : Some packages are not compatible with DNXCore,Version=v5.0 (ubuntu.14.04-x64). [/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/build.proj] ... ``` It looks like these stopped working after upgrading from `23829` because no `dnxcore50` implementation is provided anymore. It seems to me that the right temporary fix is to fork any `project.json` using these dependencies. I can do this if it sounds right. I'm not sure how to see which configurations a project uses a dependency in except by compiling it. The long-term fix is to take up a version of CLI/nuget that got rid of auto-RID. (We can get rid of our RID-specific forks then too.) @ericstj Thoughts? Should this be happening? /cc @weshaggard 6761 area-Serialization "[Port] XmlSerializer incorrectly serializing Fields with [XmlText(DataType = ""time"")]" "XmlSerializer incorrectly serializes DateTime fields/properties marked with [XmlText(DataType = ""time"")] if the DateTime value is of UTC kind. " 6764 area-System.Net HttpClient should not miss Set-Cookie response headers Recent changes due to PR #3199 caused `HttpClient` on Windows to miss `Set-Cookie` response headers when one of the header values was large enough to cause `WinHttpQueryHeaders` to fail with `ERROR_INSUFFICIENT_BUFFER`. This commit addresses the regression. Added a new test to validate this change. Fixes #6737. cc: @davidsh @stephentoub @kichalla, FYI. 6770 area-Meta Add support for running dotnet core on Banana linux There are some pull requests on supporting specific well known distributions in this repository. I created this issue to improve documentation (and perhaps tooling) for the general issue. Banana Unix is the term used by @jasonwilliams200OK in https://github.com/dotnet/cli/issues/1532 for some platform that doesn't support coreclr yet. This could be the next version of Debian or it may just as well be a custom built linux system for an embedded device. Some concrete questions: What are the minimal parts that need to be built for supporting a new platform? In what repos are they? And with which commands can they be built? Can these bits be built on an existing supported platform? Or does the build have to be done on the new platform? If the latter, is there any bootstrapping needed (e.g. get a first-stage core runtime to build the one for the new platform)? How is this done? \cc @jasonwilliams200OK @ellismg @stephentoub 6771 area-System.Net .NET Core Http Support So I wrote some test apps in C against LibUV and Libcurl api to get a feel of what’s powering Kestrel and HttpClient and while I can say that both libraries provide a very elegant and straightforward callback API I can’t help but raise the question: Why do we need these in .NET Core? Sure, LibUV makes perfect sense for NodeJS as a cross-platform abstraction layer for sockets, files, timers, thread pool, mutex.. but in .NET Core all these services are already inherently offered cross-platform by CoreFX. Simply put what does uv_accept / uv_read_start provide that the Socket.AcceptAsync/Socket.ReceiveAsync lack? As for Libcurl, again great library for Native developers but what’s in it for Managed developers? Furthermore, from what I see we are not using the high performance event driven curl_multi_socket_action interface with timeout callback and in any case why not just port the full .NET HttpWebRequest to use .NET Core cross-platform async socket interface and have a consistent implementation across both Windows / *Unix down to the socket level? There is also a potential problem if someone wants to use a third-party native library (PInvoke) that depends on some version specific build of one of these; I mean how can you load multiple versions of LibUV or Libcurl in the same .NET process and why does the FW need to take part of any potential conflict that might occur? Lastly, I think it's very important to include an equivalent of HttpListener for both Windows and *inux in CoreFX Because: 1. There are probably existing applications that use HttpListener interface that now can’t be ported to .NET Core and run on both Windows and *inux as is. 2. Experience shows that web application framework’s (including ASP.NET) are highly opinionated. Some people need/like the “Application model” some just want access to an Http interface. In my opinion it would be a mistake not include a low-level http server in CoreFX as part of the standard library as the case in Go and NodeJS. Kestrel is great but it’s an ASP.NET server subsystem not a .NET CoreFX library. 6772 area-System.Net Fix IAsyncResult.AsyncState cast to ExceptionDispatchInfo I had this change locally but neglected to include it as part of my SslStream errors fix-up PR yesterday. In one place we were storing an exception into an AsyncState typed as object, and then were pulling it out and checking whether it was an exception... when I changed the storing location to use ExceptionDispatchInfo (https://github.com/stephentoub/corefx/blob/fix_edi_asyncstate/src/System.Net.Security/src/System/Net/SecureProtocols/SslState.cs#L989), the cast on the way out also needed to change. cc: @ericeil, @bartonjs, @davidsh 6774 area-System.Globalization Creating an UmAlQuraCalendar fails on Linux ## Problem In PR #6733 the following error occured when constructing an UmAlQuaraCalendar on Linux. The Windows build and test did not fail or throw any exceptions. They passed as expected. > 15:52:30 ---- System.NullReferenceException : Object reference not set to an instance of an object. > 15:52:30 Stack Trace: > 15:52:30 at System.Globalization.UmAlQuraCalendar.get_MaxSupportedDateTime() > 15:52:30 at System.Globalization.Tests.CalendarHelpers.MaxCalendarYearInEra(Calendar calendar, Int32 era) > 15:52:30 at System.Globalization.Tests.CalendarHelpers.ToDateTime_Invalid(Calendar calendar) > 15:52:30 ----- Inner Stack Trace ----- > 15:52:30 at System.Globalization.UmAlQuraCalendar.InitDateMapping() > 15:52:30 at System.Globalization.UmAlQuraCalendar..cctor() > 15:52:30 System.Globalization.Tests.CalendarHelpers.GetMonth_Invalid [FAIL] > 15:52:30 System.TypeInitializationException : The type initializer for 'System.Globalization.UmAlQuraCalendar' threw an exception. > 15:52:30 ---- System.NullReferenceException : Object reference not set to an instance of an object. > 15:52:30 Stack Trace: > 15:52:30 at System.Globalization.UmAlQuraCalendar.get_MinSupportedDateTime() > 15:52:30 at System.Globalization.Tests.CalendarHelpers.d__10.MoveNext() > 15:52:30 at System.Linq.Enumerable.SelectEnumerableIterator2.MoveNext() 15:52:30 ----- Inner Stack Trace ----- 15:52:30 at System.Globalization.UmAlQuraCalendar.InitDateMapping() 15:52:30 at System.Globalization.UmAlQuraCalendar..cctor() 15:52:30 System.Globalization.Tests.CalendarHelpers.IsLeapMonth_Invalid [FAIL] 15:52:30 System.TypeInitializationException : The type initializer for 'System.Globalization.UmAlQuraCalendar' threw an exception. 15:52:30 ---- System.NullReferenceException : Object reference not set to an instance of an object. 15:52:30 Stack Trace: 15:52:30 at System.Globalization.UmAlQuraCalendar.get_MaxSupportedDateTime() 15:52:30 at System.Globalization.Tests.CalendarHelpers.MaxCalendarYearInEra(Calendar calendar, Int32 era) 15:52:30 at System.Globalization.Tests.CalendarHelpers.d__9.MoveNext() 15:52:30 at System.Linq.Enumerable.SelectEnumerableIterator2.MoveNext() > 15:52:30 ----- Inner Stack Trace ----- > 15:52:30 at System.Globalization.UmAlQuraCalendar.InitDateMapping() > 15:52:30 at System.Globalization.UmAlQuraCalendar..cctor() > 15:52:30 Finished: System.Globalization.Calendars.Tests ## Investigation It seems like this exception is thrown in [this](https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/Globalization/UmAlQuraCalendar.cs#L42) method (`InitDateMapping`) There is a comment in the code: ``` //Direct inline initialization of DateMapping array would produce a lot of code bloat. // We take advantage of C# compiler compiles inline initialization of primitive type array into very compact code. // So we start with raw data stored in primitive type array, and initialize the DateMapping out of it ``` Maybe this behaviour cannot be guaranteed on roslyn on Linux? /cc @stephentoub @tarekgh 6775 area-System.Globalization Improve negative tests in System.Globalization.Calendars ### Context I have done work in #6733 for consolidating common negative tests for Calendars exposed in corefx. The implementation is generic, and should support all calendars. ### Todo There are some issues to be investigated: - [x] JapenseLunisolarCalendar is not supported. This is because the implementation calculates that the `MaximumCalendarYearInEra(new JapaneseLunisolarCalendar(), 3)` is 1, not as 64 (IIRC) expected. This can be fixed by changing the code from `return calendar.GetYear(calendar.ToDateTime(1, 1, 1, 0, 0, 0, 0, era + 1).AddDays(-1)) + 1;` to `return calendar.GetYear(calendar.ToDateTime(1, 1, 1, 0, 0, 0, 0, era + 1).AddMonths(-1)) + 1;`, but this reduces the versatility of existing tests. - [ ] `GetDayOfWeek_Invalid` should not be tested for Lunar and lunarsolar calendars, as the method doesn't throw on these calendars. There is no way in corefx to check if a calendar is lunarsolar - [ ] `GetEra_Invalid` throws an exception for most calendars, but not HebrewCalendar, TaiwanLunisolarCalendar and JapaneseLunisolarCalendar. Maybe this is a similar cause from the previous point ### Further ideas Some further ideas that are nice but not so important - Test each year, and invalid months outside the max and min month in each year - Test each month, and invalid days outside the max and min day in each month /cc @tarekgh 6778 area-System.Runtime [corert] Define and implement Marshal.GetLastWin32Error for Linux systems System.Private.Uri is using Marshal.GetLastWin32Error, when compiling it as aot (corert netstandard13aot) for Linux it complain about Marshal.GetLastWin32Error is not implemented. Temporary we are providing empty stub to work around the issue but we need a permanent solution either get it implemented in Linux or kill the dependency on that API in Linux code 6781 area-System.Security System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests.TestKey_RSA failed on CentOS http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/centos7.1_release_tst_prtest/2479/consoleFull#-21371504001f1a4601-6aec-4fd5-b678-78d4389fd5e8 ``` 11:16:56 System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests.TestKey_RSA [FAIL] 11:16:56 Assert.Equal() Failure 11:16:56 Expected: Byte[] [232, 175, 92, 162, 32, ...] 11:16:56 Actual: Byte[] [0, 0, 0, 0, 0, ...] 11:16:56 Stack Trace: 11:16:57 at System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests.TestKey_RSA() ``` 6782 area-System.Security Unable to find an entry point named 'GetMaxMdSize' on Linux "I'm getting this error trying to use the AWS Dotnet SDKv3. This is on Ubuntu 14.04 with openssl 1.0.1f ``` sh $ openssl version OpenSSL 1.0.1f 6 Jan 2014 ``` ``` Unhandled Exception: System.AggregateException: One or more errors occurred. (The type initializer for 'Crypto' threw an exception.) ---> System.TypeInitializationException: The type initializer for 'Crypto' threw an exception. ---> System.EntryPointNotFoundException: Unable to find an entry point named 'GetMaxMdSize' in DLL 'System.Security.Cryptography.Native'. at Interop.Crypto.GetMaxMdSize() at Interop.Crypto..cctor() --- End of inner exception stack trace --- at Interop.Crypto.EvpSha256() ``` ``` ""dependencies"": { ""NETStandard.Library"": ""1.0.0-rc2-23901"", ``` " 6783 area-System.IO System.IO.File.Close() missing; prevents writing idiomatic F# code "Although I realize that .NET Core is intentionally stripped down relative to the full .NET platform, this method is necessary for idiomatic (i.e. single-assignment) programming with F# on Windows. Without it, the only way to close a file is to delete the `File` object which requires coping with nulls, a thing F# tries very hard to avoid. Explicitly closing a file is often necessary on Windows due to its mandatory file locking semantics. For example, you cannot typically move or a file to another directory while a `File` object is open for writing on that file. Lacking a `Close()` method, single-assignment code such as this: ``` open System.IO let file = File.Create(""myfile"", ...) ... do stuff with file file.Close() ... do something with myfile on disk ``` must be rewritten to use a mutable `file` object: ``` open System.IO let mutable file = File.Create(""myfile"", ...) ... do stuff with file file <- null ... do something with myfile on disk ``` Although that looks like a simple fix, now all the F# code dealing with `file` has to check for `null` before using the value, a very un-F# style of coding. (Moved from [https://github.com/dotnet/cli/issues/1776]) " 6796 area-System.Net Different Behavior for Content-Encoding response header on HttpClient running on windows and Linux Hello, I'm experiencing different behavior on linux and windows for the response header Content-Encoding when AutomaticDecompression is enabled. On windows when the response has the header Content-Encoding:gzip the body is automatically decompressed and the header is stripped out. https://github.com/dotnet/corefx/blob/master/src/System.Net.Http/src/System/Net/Http/HttpClientHandler.Windows.cs#L219 https://github.com/dotnet/corefx/blob/2ba2083ec3da237ad2beabc2a361a2d9b1e1777b/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs#L865 https://github.com/dotnet/corefx/blob/2ba2083ec3da237ad2beabc2a361a2d9b1e1777b/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpResponseParser.cs#L81 On Linux the response body is automatically decompressed but the Content-Encoding header is NOT stripped out. https://github.com/dotnet/corefx/blob/ac67ffac987d0c27236c4a6cf1255c2bcbc7fe7d/src/System.Net.Http/src/System/Net/Http/HttpClientHandler.Unix.cs#L162 6798 area-Infrastructure "Clean-up: Is ""PortableNuGetMode"" required in dir.targets" https://github.com/dotnet/corefx/blob/master/dir.targets#L30 The question was raised in PR #6785, is PortableNuGetMode still required in dir.targets? Investigate whether this has been added to buildtools (perhaps add it), and clean up this code. 6799 area-System.Net Remove content headers in CurlHandler when automatically decompressed WinHttpHandler removes the Content-Length and Content-Encoding headers when the content was automatically decompressed. Do the same in CurlHandler. cc: @davidsh, @kapilash, @ericeil Fixes #6796 6802 area-System.Data System.Data.SqlClient FileNotFoundException (1.0.0-rc1-update1) "I run into the following error on Windows Server 2012, when running dnx or within Visual Studio 2015 (having all latest updates): dnx -p . web `Hosting environment: Production Now listening on: http://localhost:5000 Application started. Press Ctrl+C to shut down. info: Microsoft.AspNet.Hosting.Internal.HostingEngine[1] Request starting HTTP/1.1 GET http://localhost:5000/api/comm info: Microsoft.AspNet.Hosting.Internal.HostingEngine[3] Request finished in 0.0312ms 500 fail: Microsoft.AspNet.Server.Kestrel[13] An unhandled exception was thrown by the application. System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.SqlClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'System.Data.SqlClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at WebAPI.Service.DbSscaService..ctor() at WebAPI.Controllers.CommController..ctor() in D:\Data\Projects\WebApplication5\src\WebApplication5\Controllers\CommController.cs:line 20 at lambda_method(Closure , IServiceProvider , Object[] ) at Microsoft.AspNet.Mvc.Infrastructure.DefaultTypeActivatorCache.CreateInstance[TInstance](IServiceProvider serviceProvider, Type implementationType) at Microsoft.AspNet.Mvc.Controllers.DefaultControllerActivator.Create(ActionContext actionContext, Type controllerType) at Microsoft.AspNet.Mvc.Controllers.DefaultControllerFactory.CreateController(ActionContext actionContext) at Microsoft.AspNet.Mvc.Controllers.ControllerActionInvoker.CreateInstance() at Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.d__52.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.d__51.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.d__44.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Mvc.Infrastructure.MvcRouteHandler.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Mvc.Routing.InnerAttributeRoute.d__10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Routing.RouteCollection.d__9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Builder.RouterMiddleware.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.IISPlatformHandler.IISPlatformHandlerMiddleware.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Hosting.Internal.RequestServicesContainerMiddleware.d__3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Hosting.Internal.HostingEngine.<>c__DisplayClass32_0.<b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Server.Kestrel.Http.Frame.d__79.MoveNext() ``` = Pre-bind state information = LOG: DisplayName = System.Data.SqlClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ``` (Fully-specified) LOG: Appbase = file:///C:/Users/ps2-v000997/.dnx/runtimes/dnx-clr-win-x86.1.0.0-rc1-update1/bin/ LOG: Initial PrivatePath = NULL Calling assembly : (Unknown). === LOG: This bind starts in default load context. LOG: No application configuration file found. LOG: Using host configuration file: LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Post-policy reference: System.Data.SqlClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a LOG: Fusion is hosted. Check host about this assembly. LOG: Try host assembly store with assembly system.data.sqlclient, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=x86. LOG: Try host assembly store with assembly system.data.sqlclient, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil. LOG: Try host assembly store with assembly system.data.sqlclient, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a. WRN: Host assembly store does not contain this assembly. LOG: Attempting download of new URL file:///C:/Users/ps2-v000997/.dnx/runtimes/dnx-clr-win-x86.1.0.0-rc1-update1/bin/System.Data.SqlClient.DLL. LOG: Attempting download of new URL file:///C:/Users/ps2-v000997/.dnx/runtimes/dnx-clr-win-x86.1.0.0-rc1-update1/bin/System.Data.SqlClient/System.Data.SqlClient.DLL. LOG: Attempting download of new URL file:///C:/Users/ps2-v000997/.dnx/runtimes/dnx-clr-win-x86.1.0.0-rc1-update1/bin/System.Data.SqlClient.EXE. LOG: Attempting download of new URL file:///C:/Users/ps2-v000997/.dnx/runtimes/dnx-clr-win-x86.1.0.0-rc1-update1/bin/System.Data.SqlClient/System.Data.SqlClient.EXE.` project.json: `{ ""version"": ""1.0.0-*"", ""compilationOptions"": { ""emitEntryPoint"": true }, ""dependencies"": { ""Microsoft.AspNet.IISPlatformHandler"": ""1.0.0-rc1-final"", ""Microsoft.AspNet.Mvc"": ""6.0.0-rc1-final"", ""Microsoft.AspNet.Server.Kestrel"": ""1.0.0-rc1-final"", ""Microsoft.AspNet.StaticFiles"": ""1.0.0-rc1-final"", ""Microsoft.Extensions.Configuration.FileProviderExtensions"": ""1.0.0-rc1-final"", ""Microsoft.Extensions.Configuration.Json"": ""1.0.0-rc1-final"", ""Microsoft.Extensions.Logging"": ""1.0.0-rc1-final"", ""Microsoft.Extensions.Logging.Console"": ""1.0.0-rc1-final"", ""Microsoft.Extensions.Logging.Debug"": ""1.0.0-rc1-final"", ""System.Data.Common"": ""4.0.1-beta-23516"", ""System.Data.SqlClient"": ""4.0.0-beta-23516"" }, ""commands"": { ""web"": ""Microsoft.AspNet.Server.Kestrel"" }, ""frameworks"": { ""dnx451"": { } }, ""exclude"": [ ""wwwroot"", ""node_modules"" ], ""publishExclude"": [ ""**.user"", ""**.vspscc"" ] }` `Active Version Runtime Architecture OperatingSystem Alias 1.0.0-rc1-update1 clr x64 win - 1.0.0-rc1-update1 clr x86 win default 1.0.0-rc1-update1 coreclr x64 win 1.0.0-rc1-update1 coreclr x86 win ` Any fixes available? Any beta version eventually working? " 6803 area-System.Net Need more testing of multiple pending async Socket operations We don't have much coverage of scenarios involving multiple pending operations on a single Socket. For example, do operations maintain correct ordering? Do we deal correctly with a socket closing with multiple pending operations? Etc. 6804 area-System.Net Let the system allocate ports for the IPv6 sockets in ConnectExTest "This avoids an ""address in use"" error when running concurrently with other tests. Fixes #4628. @CIPop @stephentoub " 6806 area-System.Net Assert in TryCompleteOrAbortAsync with Unix domain sockets "The following assert: ``` Unexpected oldState: Complete at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) at System.Diagnostics.Debug.Assert(Boolean condition, String message) at System.Net.Sockets.SocketAsyncContext.AsyncOperation.TryCompleteOrAbortAsync(SocketAsyncContext context, Boolean abort) at System.Net.Sockets.SocketAsyncContext.AsyncOperation.TryCompleteAsync(SocketAsyncContext context) at System.Net.Sockets.SocketAsyncContext.OperationQueue`1.Complete(SocketAsyncContext context) at System.Net.Sockets.SocketAsyncContext.HandleEvents(SocketEvents events) at System.Net.Sockets.SocketAsyncEngine.EventLoop() at System.Threading.Tasks.Task.Execute() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)Aborted (core dumped) ``` gets triggers by this repro: ``` C# using System; using System.IO; using System.IO.Pipes; using System.Net.Http; using System.Diagnostics; using System.Threading.Tasks; using System.Text; using System.Net; using System.Net.Sockets; public class Program { public static void Main() { using (Socket server = new Socket(AddressFamily.Unix, SocketType.Stream, ProtocolType.Unspecified)) using (Socket client = new Socket(AddressFamily.Unix, SocketType.Stream, ProtocolType.Unspecified)) { const int Iters = 100; // Increase this value const int Chunk = 1024; byte[] sendData = new byte[Chunk * Iters]; byte[] receiveData = new byte[sendData.Length]; new Random().NextBytes(sendData); string path = ""./example.sock""; File.Delete(path); server.Bind(new UnixDomainSocketEndPoint(path)); server.Listen(1); Task acceptTask = server.AcceptAsync(); client.Connect(new UnixDomainSocketEndPoint(path)); acceptTask.Wait(); Socket accepted = acceptTask.Result; Task[] writes = new Task[Iters]; Task[] reads = new Task[Iters]; for (int i = 0; i < Iters; i++) writes[i] = client.SendAsync(new ArraySegment(sendData, i * Chunk, Chunk), SocketFlags.None); for (int i = 0; i < Iters; i++) reads[i] = accepted.ReceiveAsync(new ArraySegment(receiveData, i * Chunk, Chunk), SocketFlags.None); Task.WaitAll(writes); Task.WaitAll(reads); for (int i = 0; i < sendData.Length; i++) if (receiveData[i] != sendData[i]) throw new Exception($""Different at {i}""); Console.WriteLine(""Done""); } } } // Copied verbatim from https://github.com/dotnet/corefx/blob/master/src/Common/src/System/Net/Sockets/UnixDomainSocketEndPoint.cs namespace System.Net.Sockets { /// Represents a Unix Domain Socket endpoint as a path. public sealed class UnixDomainSocketEndPoint : EndPoint { private const int MaxPathLength = 92; // sockaddr_un.sun_path at http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_un.h.html private const int PathOffset = 2; // = offsetof(struct sockaddr_un, sun_path). It's the same on Linux and OSX private const int MaxSocketAddressSize = PathOffset + MaxPathLength; private const int MinSocketAddressSize = PathOffset + 2; // +1 for one character and +1 for \0 ending private const AddressFamily EndPointAddressFamily = AddressFamily.Unix; private static readonly Encoding s_pathEncoding = Encoding.UTF8; private readonly string _path; private readonly byte[] _encodedPath; public UnixDomainSocketEndPoint(string path) { if (path == null) { throw new ArgumentNullException(nameof(path)); } if (path.Length == 0 || s_pathEncoding.GetByteCount(path) >= MaxPathLength) { throw new ArgumentOutOfRangeException(nameof(path)); } _path = path; _encodedPath = s_pathEncoding.GetBytes(_path); } internal UnixDomainSocketEndPoint(SocketAddress socketAddress) { if (socketAddress == null) { throw new ArgumentNullException(nameof(socketAddress)); } if (socketAddress.Family != EndPointAddressFamily || socketAddress.Size > MaxSocketAddressSize) { throw new ArgumentOutOfRangeException(nameof(socketAddress)); } if (socketAddress.Size >= MinSocketAddressSize) { _encodedPath = new byte[socketAddress.Size - PathOffset]; for (int index = 0; index < socketAddress.Size - PathOffset; index++) { _encodedPath[index] = socketAddress[PathOffset + index]; } _path = s_pathEncoding.GetString(_encodedPath, 0, _encodedPath.Length); } else { // Empty path may be used by System.Net.Socket logging. _encodedPath = Array.Empty(); _path = string.Empty; } } public string Path { get { return _path; } } public override AddressFamily AddressFamily { get { return EndPointAddressFamily; } } public override SocketAddress Serialize() { var result = new SocketAddress(AddressFamily.Unix, MaxSocketAddressSize); // Ctor has already checked that PathOffset + _encodedPath.Length < MaxSocketAddressSize for (int index = 0; index < _encodedPath.Length; index++) { result[PathOffset + index] = _encodedPath[index]; } result[PathOffset + _encodedPath.Length] = 0; // The path must be ending with \0 return result; } public override EndPoint Create(SocketAddress socketAddress) { return new UnixDomainSocketEndPoint(socketAddress); } public override string ToString() { return Path; } } } ``` As you increase Iters to increase the number of concurrent operations, the change of hitting the assert gets much larger. " 6807 area-System.Net Consider exposing Socket.Handle / Socket.SafeHandle In the full framework, Socket provides an `IntPtr Handle { get; }` property that returns a representation of the underlying OS' socket. This enables using functionality not exposed via the Socket object model. In corefx, this property isn't available, and there's no IntPtr-based or SafeHandle-based replacement for it, preventing such use. 6812 area-System.ComponentModel Expose additional APIs in System.ComponentModel contracts This exposes the APIs tracked by #6573 in the contracts. Tests to come alongside implementation. cc: @terrajobst @twsouthwick @weshaggard 6814 area-System.Net "Fix SocketAsyncContext's ""requeue"" operation" `Requeue` is supposed to add an item back to the head of the queue. It was not implemented correctly, resulting in a corrupt queue in cases where an operation needed to be retried after an attempt to complete it on the event handler thread. This addresses part of #6806 (the assert). The test code in that issue still fails with a different problem, which I'll look into next. @stephentoub, @pgavlin 6819 area-System.Linq OrderBy-Take-Skip combination gives incorrect result "`OrderBy` followed by `Take(2).Skip(1)` gives empty list instead of list of size 1. Repro code: ``` c# using System; using System.Collections.Generic; using System.Linq; namespace ConsoleApplication { public class Program { public static void Main(string[] args) { var cs = new List { new Customer { CustomerID = ""ANATR"" }, new Customer { CustomerID = ""ANTON"" }, new Customer { CustomerID = ""AROUT"" }, new Customer { CustomerID = ""BERGS"" }, new Customer { CustomerID = ""BONAP"" }, new Customer { CustomerID = ""ALFKI"" }, }; // Only Skip Console.WriteLine(cs.Count()); Console.WriteLine(cs.Skip(1).Count()); // OrderBy & Skip Console.WriteLine(cs.OrderBy(c => c.CustomerID).Count()); Console.WriteLine(cs.OrderBy(c => c.CustomerID).Skip(1).Count()); // Take & Skip Console.WriteLine(cs.Take(2).Count()); Console.WriteLine(cs.Take(2).Skip(1).Count()); // OrderBy, Take & Skip Console.WriteLine(cs.OrderBy(c => c.CustomerID).Take(2).Count()); Console.WriteLine(cs.OrderBy(c => c.CustomerID).Take(2).Skip(1).Count()); Console.WriteLine(""Hello World!""); } } public class Customer { public string CustomerID {get; set;} } } ``` project.json ``` json { ""version"": ""1.0.0-*"", ""compilationOptions"": { ""emitEntryPoint"": true }, ""dependencies"": { ""NETStandard.Library"": ""1.0.0-rc2-23811"" }, ""frameworks"": { ""dnxcore50"": { } } } ``` Console Output: ``` D:\issue> dotnet run Project issue (DNXCore,Version=v5.0) was previously compiled. Skipping compilation. 6 5 6 5 2 1 2 0 // Should have been 1 Hello World! ``` " 6822 area-System.Net Fix WinHttpHandler when no proxy creds after 407 response We were getting an assert if we had an authenticating proxy but didn't have any credentials to send. After the initial 407 was received from the proxy, we then tried to set credentials for a retry. But since we didn't have any, we triggered an assert in SetWinHttpCredential. The fix is to check for null credentials after getting the 407 response. If there are no credentials, then we end the retry loop with the final 407 status code. 6826 area-Meta await Windows.ApplicationModel.Email.EmailManager.ShowComposeNewEmailAsync(emailMessage); launches Outlook email composer with incomplete content I have been having issues with launching the Windows Phone 10 Outlook email composer with a pre-populated body from a UWP app. On both emulator and device, I experience inconsistent results with the same piece of code. The core of the code is provided below: `public static async Task ComposeEmail()` `{` ` `var emailMessage = new Windows.ApplicationModel.Email.EmailMessage();` ``emailMessage.Body = GenerateMessageBody();` ` ``await Windows.ApplicationModel.Email.EmailManager.ShowComposeNewEmailAsync(emailMessage);` `}` `await Windows.ApplicationModel.Email.EmailManager.ShowComposeNewEmailAsync(emailMessage);` **_renders the body with incomplete content_** whose length before truncation is not consistent. I have crosschecked that `emailMessage.Body` contains the full content of the string passed to it. In the case of a string containing HTML tags, Outlook sometimes renders the body as processed html (just like a web browser should) or plaintext html. In either of these cases, it stops printing the string passed to the body at different points irrespective of whether it outputs it as processed html or plain text html. Please be aware that this has been tested with strings with different character length but the issue still persists irrespective. **I have attached a complete standalone troubleshooting zip containing:** • sample app which tries to launch the Outlook email composer whose body is prepopulated at the click of a button on the home screen. I’ll be pleased if you can look into this. [EmailComposer.zip](https://github.com/dotnet/corefx/files/168905/EmailComposer.zip) 6827 area-System.Data SqlClient hangs when loading in Docker "A simple client is create to talk to a remote Sql database - this works in all cases on Linux) A docker image is created based on aspnet/1.0.0-rc1-update1 but with 1.0.0-rc2-16595 installed A docker image is created based on the above with the test client inside it. DNX_TRACE=1 is enabled in the container When run, all is well until the runtime tries to load the SqlClient. The process then hangs indefinitely requiring it to be killed as in below image. Is this known and/or is there a workaround - can anyone suggest more diagnostics ? - thanks in advance.... ![image](https://cloud.githubusercontent.com/assets/4983720/13703128/7bbd432e-e78b-11e5-9151-c3524f21db0e.png) I've tried this on : 1.0.0-rc2-16357, 1.0.0-rc2-16551, 1.0.0-rc2-16595 and the result is the same Docker file for runtime base is created like this ``` FROM microsoft/aspnet:1.0.0-rc1-update1-coreclr ENV DNX_TRACE 1 RUN bash -c ""source $DNX_USER_HOME/dnvm/dnvm.sh \ && dnvm install 1.0.0-rc2-16595 -alias default -u -r coreclr \ && dnvm alias default | xargs -i ln -s $DNX_USER_HOME/runtimes/{} $DNX_USER_HOME/runtimes/default"" ``` Docker file for test client is create like this (FROM refers to the above) ``` FROM coreclr:1.0.0-rc2-16595 COPY ""./approot"" ""/approot"" WORKDIR /approot EXPOSE 5004 ENTRYPOINT [""./run""] ``` " 6828 area-System.Net SocketPal.Ioctl isn't implemented on Unix "There's currently a TODO in the code (""TODO: can this be supported in some reasonable fashion?""). We should either figure out the right design for this and implement it or remove the TODO. " 6830 area-System.ComponentModel ValidationAttribute _errorMessageResourceAccessor does not support UWP style Resw resources "The ValidationAttribute needs to be updated to include support for UWP style Resw resource files that do not generate a C# code file with static properties to represent the resources in the Resw file. It might need a new property to allow the developer to specify the `Windows.ApplicationModel.Resources.ResourceLoader` instance to use and then specify the ResourceKey. Then just add an if block in the ""private void SetupResourceAccessor(){...}"" method to setup the ""_errorMessageResourceAccessor"" delegate to use the new ResourceLoader class to get the resource using the specified ResourceKey. Something like: ``` _errorMessageResourceAccessor = delegate { return _theResourceLoaderToUse.GetString(_theResourceKey); }; ``` Where ""_theResourceLoaderToUse"" and ""_theResourceKey"" are internal properties set by the developer. And, instead of code like this: ``` [Required(ErrorMessageResourceType = typeof(Resources.Strings), ErrorMessageResourceName = ""EmailInvalidMessage"")] ``` We use code like this: ``` [Required(ErrorMessageResourceLoaderDelegate = delegate { return Windows.ApplicationModel.Resources.ResourceLoader.GetForCurrentView(); }, ErrorMessageResourceName = ""EmailInvalidMessage"")] ``` " 6831 area-System.Numerics New Magnitude class for System.Numerics "Supporting magnitudes (values + units) might be a good complement for the current vector functionalities of `System.Numerics`. It would allow .NET to deal with any Physics-based situation in an intuitive and easy way. What I am proposing here might also be adapted to other not-related-to-Physics requirements, like angles or computing units (e.g., bit/byte). The new `Magnitude` class is expected to be defined in such a way that all the operations and unit conversions might be easily performed. The idea is allowing programmers to interact with values+units as intuitively as they currently do with just values. For example: having 5 m/s and wanting to convert it to in/s or to add it to 3 ft/h. Rough sketch of what I have in mind: ``` C# public class Magnitude { public static Magnitude operator +(Magnitude first, Magnitude second) { //It is necessary to confirm whether ""type"" & ""measurement"" are compatible and eventually perform all the required conversions. return new Magnitude((decimal)first.value + (decimal)second.value, first.measurement.unit.ToString()); } //Further basic operator overloads. //Other methods performing basic operations among Magnitude instances. public readonly MagnitudeType type; //The type of the instance has to remain unaltered. public object value { get; set; } //The getter will be defined on account of the ""measurement"" properties. public Measurement measurement { get; set; } public Magnitude(decimal value, string unit) { this.value = value; //The ""unit"" value will be adequately parsed and analysed. //The version below is a simplistic version to show the idea. if (unit == ""m"") { this.type = MagnitudeType.Length; this.measurement = new Measurement(UnitSystem.InternationalSystem, LengthInternational.Meter); } else if (unit == ""ft"") { this.type = MagnitudeType.Length; this.measurement = new Measurement(UnitSystem.ImperialSystem, LengthImperial.Foot); } } //Other overloads accepting different arguments. } public class Measurement { public UnitSystem system { get; set; } public object unit { get; set; } public Measurement(UnitSystem system, object unit) { this.system = system; this.unit = unit; } } //Very simplified versions showing how the enums are expected to look like. public enum MagnitudeType { Length, Weight } public enum UnitSystem { InternationalSystem, ImperialSystem }; public enum LengthInternational { Millimeter, Centimeter, Meter }; public enum LengthImperial { Inch, Foot }; ``` Simple example showing how the aforementioned code is expected to be used: ``` C# Magnitude var1 = new Magnitude(1.234m, ""m""); Magnitude var2 = new Magnitude(5.678m, ""ft""); Magnitude var3 = var1 + var2; ``` I can only think of one drawback for the proposed approach: relying on enums in a situation like this (i.e., with many alternatives and classifications) implies hardcoding a relevant amount of different scenarios. In any case, I think that it would be worthy anyway. CLARIFICATION (from my previous contributions, I understand that this issue should be evident, but just in case...): I am expecting to take care of the proposed implementation completely by my own and also to deliver a comprehensive-enough first version. The initial lack of detail is exclusively motivated by the fact that I prefer to not spend too much time on this before confirming that the .NET community/team likes it. " 6832 area-System.Net Sockets on Unix don't maintain ordering of async operations "If the user initiates multiple concurrent async operations, the expectation (and guarantee, on Windows) is that these will operate on the underlying data stream in the order in which they were submitted. For example, if two asynchronous reads are started, the first read must be satisfied from the first bytes received from the remote peer, and the second read must receive the next bytes, etc. Without this guarantee, it is impossible to reconstruct a data stream received via concurrent read operations. The same ordering requirements apply to writes, for the same reasons. In the current Unix implementation of Sockets, we maintain ordering of operations enqueued to the `SocketAsyncContext`, but we do not actually enqueue operations there before first trying to complete the operation. This allows later operations to ""jump ahead"" of prior operations, in cases where the later operation is started just as data becomes available, but before the `SocketAsyncContext` event loop has had a chance to consume the data. It is important to have this initial attempt to complete the operation before waiting for the asynchronous event, because typically data _is_ available when the operation is initiated, and we don't want to pay the cost of multiple allocations, context switches, etc., for an operation that can complete synchronously. However, if prior operations are already enqueued, waiting for their turn, subsequent operations need to forego the initial attempt to complete synchronously, and wait in line behind the prior operations. See #6806 for an example of a test that fails due to this problem. " 6833 area-System.Net Implement NamedPipe*Stream on Unix domain sockets Today, NamedPipeServer/ClientStream on Unix are implemented on top of FIFOs, aka named pipes. There are some unfortunate limitations to this that are causing problems for typical usage of NamedPipeServer/ClientStream: - FIFOs can be constructed as both read and write (i.e. InOut), but a writer can then immediately read what was written. In other words, whereas one might expect there two be two data channels, one in each direction, there's only one that everyone can read and write from. - FIFOs can be connected to by any number of readers and writers, which has the effect of meaning a reader doesn't unblock when a writer disconnects, because there may be another writer in the future. To address these significant limitations, this commit moves NamedPipeServer/ClientStream to be built instead on top of Unix domain sockets. Unix domain sockets are an IPC mechanism for local communication using the sockets model, and we have support for it via System.Net.Sockets, thanks to #5051. Both of the aforementioned problems are addressed by this change. A few other positive outcomes: - The participants on each side of the connection can get the credentials of the other side, so GetImpersonatedUserName is now implemented. - Our Socket implementation has a good async implementation, so we can use it for all of the async operations exposed rather than queueing a work item that then blocks doing the synchronous operation. There are a few downsides, but they're worth the tradeoff: - FIFOs have the same general blocking behavior as anonymous pipes and as named pipes on Windows: a call to Write doesn't complete until an associated Read comes along. That's not the case with Unix domain sockets, where a Write typically just deposits the data into a buffer. Writes on a socket only block when the buffer is full. - Unix domain sockets are considered to be a bit slower than FIFOs. - Changing the buffer size of a FIFO impacts the whole FIFO, whereas changing the buffer size for a socket impacts just that end of the socket. - There's also a small hack that uses reflection to work around #6807, the lack of an exposed handle property on Socket. Hopefully that'll be fixed soon and then we can remove the hack. There continue to be several features that we don't support on Unix, e.g. message transmission, max number of servers, etc. (One oddity here is that this makes the Unix implementation of System.IO.Pipes.dll have a dependency on System.Net.Sockets.dll, but I spoke with @weshaggard and, other than it being odd, we couldn't come up with any strong reason not to. In the layering, Sockets is already considered lower-level.) cc: @ericeil, @ianhays, @bartonjs, @jaredpar, @AArnott, @cipop, @ericstj, @dsplaisted, @IlyaBiryukov, @bpschoch Fixes https://github.com/dotnet/corefx/issues/1849 6835 area-System.Net Don't get available bytes for the socket unless we actually need the result While reading through the code I noticed that we're making unnecessary `ioctl` calls in Receive calls, to get the count of available bytes. This turns out to only be used if the caller supplied a list of buffers, which is not the typical case. This change moves the `ioctl` call so that it happens only if needed, which should help with throughput in most scenarios. @stephentoub 6838 area-System.Net Ensure ordering of async Socket send/receive operations If the send/receive queue is not empty, don't attempt to synchronously send/receive. Instead, wait our turn behind prior pending operations. This has the unfortunate consequence of making `_queueLock` cover more code. This is solvable, but is a much larger change, which will have to wait for later. It's worth noting that this lock will only experience contention if there are actually concurrent operations, in which case we need _something_ to synchronize/serialize those operations in any case. For mainstream scenarios, I would not expect any noticeable perf impact due to this change. Fixes #6832. @stephentoub @pgavlin 6846 area-System.Net Implement SocketPal.Poll on Unix with poll instead of select SocketPal.Poll on Unix is currently implemented with select. This is causing problems due to limitations of select, which fails with file descriptors >= FD_SETSIZE. I've changed the implementation to use poll instead, which both fixes the problem and results in simpler code. I've also added a few tests, and in the process of doing so cleaned up some related tests to use theories. This is blocking #6833, which in CI is frequently getting file descriptors for sockets larger than FD_SETSIZE. cc: @ericeil, @pgavlin, @davidsh, @CIPop Contributes to #4728. 6847 area-System.Net HttpClient: Add comment to Set-Cookie test Add a comment explaining the header value lengths being tested per #6764 PR feedback ([comment](https://github.com/dotnet/corefx/pull/6764#discussion_r55526369)). cc: @stephentoub @davidsh 6849 area-System.Net Progress while downloading a large file with HttpClient Hi All, Googling around I found that Windows.Web.Http.HttpClient provides a way to get progress of a download. Is there an way to get some kind of progress information when downloading a large file using ASP.NET Core's HttpClient? Thanks, -Brian 6850 area-System.Reflection Unable to use Reflection to get StructLayoutAttribute for a type In .NET CoreCLR it is not possible to get the `System.Runtime.InteropServices.StructLayoutAttribute` for a given type via reflection. In usual .NET CLR the `System.Type` and `System.Reflection.TypeInfo` declare the `StructLayoutAttribute` member as the StructLayout cannot be retrieved by calls to `GetCustomAttribute()` or through the `CustomAttributes` property. The consequence of this is that it is impossible to use reflection to get the packing size, or the constant size of a StructLayout marked type. Ironically, The `LayoutKind` and `CharSet` values can be infrerred from the `TypeAttributes` of a type info. 6854 area-System.Net Merge master into dev/negotiatestream cc @stephentoub @vijaykota 6856 area-System.Net Implement SocketPal.Select on Unix with poll instead of with select (Ignore the first commit. It's copied from #6846 as it builds on some changes made there.) The second commit adds tests for Socket.Select, which didn't have any other than some tests for argument validation. The third commit changes Unix's SocketPal.Select to be implemented with poll instead of with select. select suffers from the limitation that it only works with file descriptors less than FD_SETSIZE; if the system assigns a file descriptor >= FD_SETSIZE, Socket.Select will fail. This commit changes the implementation to use poll instead of select. (I considered keeping the current Select implementation and falling back to the new one only if a file descriptor >= FD_SETSIZE was found, but after coding it and trying both, it didn't seem worth keeping all of the select code around.) Fixes #4728 cc: @ericeil, @pgavlin, @davidsh, @cipop 6858 area-System.Net Fix WinHttpHandler proxy discovery behavior "In order to support WindowsProxyUsePolicy.UseWinInetProxy, WinHTTP provides the WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY option. This allows for reading the per-user registry settings to determine how to find a proxy for a given url. This includes using WPAD protocol to find and execute a Javascript PAC file. The WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY only works on Windows 8.1 and above. For Windows 7 and Windows 8, we have to manually do the work and the WinInetProxyHelper class provides for that by calling various WinHTTP APIs. This fix is about having the AUTOMATIC_PROXY behaviors work the same whether done automatically by WinHTTP or manually using the WinInetProxyHelper class. In general, errors processing the auto discovery logic should be ignored and the proxy settings should fallback to manual settings if present in the registry. This is difficult to test in an Xunit test since registry settings need to be changed as well as recycling the ""WinHTTP Web Proxy Autodiscover Discovery Service"" since it caches PAC file processing. So, this was tested manually for now and additional traces were added to the WinInetProxyHelper class. Fixes #6011 " 6863 area-System.Net WebUtility.UrlDecode Not decoding %b6 "I am seeing an issue with %b6 being left as ""%b6"" instead of being converted to 0xb6. I don't know if there is any way I can debug it, but if you take the string ""%b6"" and pass it through the WebUtility.UrlDecode, and you will see that doing an Encoding.UTF8.GetBytes, you will see 0xef, 0xbf, 0xbd, instead of the expected 0xb6. Any help debugging this would be appreciated. " 6866 area-System.IO FileSystemWatcher.Rename clips FullPath and Name "- on OSX run the snippet below with a path to watch - in that path run `mv existing.file newName.file` - the rename event clips the first character of the new name ![screen shot 2016-03-14 at 16 07 39](https://cloud.githubusercontent.com/assets/1794099/13748859/ff9a6f1c-e9fe-11e5-9874-49194b4d05cd.png) ``` c# using System; using System.IO; using System.Threading.Tasks; namespace ConsoleApplication { public class Program { public static void Main(string[] args) { Watch(args[0]).Wait(); Console.WriteLine(""done""); } private static async Task Watch(string path) { FileSystemWatcher watcher = new FileSystemWatcher(path); var tcs = new TaskCompletionSource(); watcher.Renamed += (sender, arg) => { Console.WriteLine(arg.ChangeType); Console.WriteLine(arg.OldFullPath); Console.WriteLine(arg.FullPath); Console.WriteLine(arg.Name); }; watcher.EnableRaisingEvents = true; watcher.IncludeSubdirectories = true; Console.WriteLine(""Waiting for a file to change...""); var result = await tcs.Task; return result; } } } ``` " 6869 area-System.Runtime Add StringBuilder.AppendLine(char) StringBuilder.AppendLine does not have an overload that takes a char. It might be useful to add one. 6872 area-System.Diagnostics Investigate failures when DiagnosticSource tests are run concurrently Currently there are failures when we run allow the DiagnosticSource tests to run concurrently with one another. This suggests there may be bugs in the implementation. To repro remove the assembly directive in DiagnosticSourceEventSourceTests.cs Also see the TODO in the AllSubscriberStress test case. 6874 area-System.ComponentModel Add System.ComponentModel types to support TypeDescriptors This is an initial push that includes the original source of TypeDescriptors and necessary files to facillitate porting to core. The source has been formatted according to the repo standards, but the files have not been added into the projects beyond a placeholder comment for when the file is ready to build. This will make it easier to see what changes were done to enable support on .NET Core. 6877 area-System.Data NullRef Exceptions in Release DataStreamTest Starting: System.Data.SqlClient.ManualTesting.Tests System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_nwnd9SqlClient_NP [FAIL] System.NullReferenceException : Object reference not set to an instance of an object. Stack Trace: D:\CoreFX\src\System.Data.SqlClient\tests\ManualTests\SQL\DataStreamTest\DataStreamTest.cs(1162,0): at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.GetStream(String connectionString) D:\CoreFX\src\System.Data.SqlClient\tests\ManualTests\SQL\DataStreamTest\DataStreamTest.cs(88,0): at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer(String connectionString, Boolean usingNamePipes) D:\CoreFX\src\System.Data.SqlClient\tests\ManualTests\SQL\DataStreamTest\DataStreamTest.cs(29,0): at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_nwnd9SqlClient_NP() System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_nwnd11SqlClient_NP [FAIL] System.NullReferenceException : Object reference not set to an instance of an object. Stack Trace: D:\CoreFX\src\System.Data.SqlClient\tests\ManualTests\SQL\DataStreamTest\DataStreamTest.cs(1162,0): at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.GetStream(String connectionString) D:\CoreFX\src\System.Data.SqlClient\tests\ManualTests\SQL\DataStreamTest\DataStreamTest.cs(88,0): at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer(String connectionString, Boolean usingNamePipes) D:\CoreFX\src\System.Data.SqlClient\tests\ManualTests\SQL\DataStreamTest\DataStreamTest.cs(55,0): at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_nwnd11SqlClient_NP() System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_nwnd10SqlClient [FAIL] System.NullReferenceException : Object reference not set to an instance of an object. Stack Trace: D:\CoreFX\src\System.Data.SqlClient\tests\ManualTests\SQL\DataStreamTest\DataStreamTest.cs(1162,0): at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.GetStream(String connectionString) D:\CoreFX\src\System.Data.SqlClient\tests\ManualTests\SQL\DataStreamTest\DataStreamTest.cs(88,0): at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer(String connectionString, Boolean usingNamePipes) System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_nwnd10SqlClient_NP [FAIL] System.NullReferenceException : Object reference not set to an instance of an object. Stack Trace: D:\CoreFX\src\System.Data.SqlClient\tests\ManualTests\SQL\DataStreamTest\DataStreamTest.cs(1162,0): at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.GetStream(String connectionString) D:\CoreFX\src\System.Data.SqlClient\tests\ManualTests\SQL\DataStreamTest\DataStreamTest.cs(88,0): at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer(String connectionString, Boolean usingNamePipes) D:\CoreFX\src\System.Data.SqlClient\tests\ManualTests\SQL\DataStreamTest\DataStreamTest.cs(42,0): at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_nwnd10SqlClient_NP() System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_nwnd9SqlClient [FAIL] System.NullReferenceException : Object reference not set to an instance of an object. Stack Trace: D:\CoreFX\src\System.Data.SqlClient\tests\ManualTests\SQL\DataStreamTest\DataStreamTest.cs(1162,0): at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.GetStream(String connectionString) D:\CoreFX\src\System.Data.SqlClient\tests\ManualTests\SQL\DataStreamTest\DataStreamTest.cs(88,0): at System.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer(String connectionString, Boolean usingNamePipes) Finished: System.Data.SqlClient.ManualTesting.Tests === TEST EXECUTION SUMMARY === System.Data.SqlClient.ManualTesting.Tests Total: 5, Errors: 0, Failed: 5, Skipped: 0, Time: 7.038s 6880 area-System.Net Break dependency on older collections in System.Net.Security Removes `System.Net.Security`'s dependency on `System.Collections.NonGeneric` and `System.Collections.Specialized`. This PR is broken up into 3 commits: 1. Adds tests for `ServiceNameCollection`. 100% line and branch coverage, other than the `NormalizeServiceName` method. The tests pass on both the full framework and before/after these changes on .NET Core ~~(other than one behavior difference in `CopyTo` noted below)~~. 2. Removes the dependency on `System.Collections.NonGeneric` and `System.Collections.Specialized`. - `SpnDictionary`: Removed. It's the only thing that depends on the Specialized collections and isn't currently being used anywhere in CoreFX. In the full framework, it's only used in [a few places](http://referencesource.microsoft.com/#System/net/System/Net/_SpnDictionary.cs,3c13c3eec03ce802,references) related to `HttpWebRequest`'s implementation that I don't think is relevant in CoreFX. I also verified it isn't currently used in dev/negotiatestream branch. - `ServiceNameCollection`: No longer inherits from `ReadOnlyCollectionBase` and uses `List` instead of `ArrayList`. - `SslSessionsCache`: Uses of `Hashtable` replaced with `ConcurrentDictionary`. - `SecureChannel`: Uses of `ArrayList` replaced with `List`. 3. `ServiceNameCollection`: Minor perf optimizations and cleanup, while making changes here. ~~Behavior change: In the full framework, `ServiceNameCollection.CopyTo(Array, int)` throws `InvalidCastException` when the destination array is not of a compatible type, but now it throws `ArgumentException` because we now use `List`'s implementation of the non-generic `CopyTo`. Do we need to match the full framework and throw `InvalidCastException` here? (This could have implications for other collections in .NET Core that are now backed by `List` instead of `ArrayList`).~~ **Update**: I added a commit that makes the behavior of `CopyTo` match the full framework. Note: `SslSessionsCache` could use some test coverage around shrinking the cache, but I didn't have a chance to work on it. Not sure if I will anytime soon. Fixes #6725. cc: @weshaggard @davidsh 6881 area-System.Net Remove unused internal Socket.IOControl overload While investigating #6828, I noticed that one `Socket.IOControl` overload does not appear to be used by anything on Windows _or_ Unix, and is not exposed to the public. I assume this is a vestige of the port from the full CLR codebase. @davidsh @CIPop @stephentoub 6884 area-System.Net Fix generation of Net.Security This was regressed by https://github.com/dotnet/corefx/commit/be08afd9701053f5f9369762db58b87c8ca9559f /cc @chcosta 6892 area-Meta Define .NETCoreApp SharedFramework redist 6893 area-System.Runtime (API proposal) Adding a StringBuffer class with a MoveToString method (Sorry for all the proposals I've been posting here lately, I promise this will be my last one for a while :smile:) ## Background It's a common scenario to have code where you want to perform a bunch of operations on a string, like replacing a character or overwriting part of the string, but don't want to allocate a bunch of substrings. What most developers end up doing is copying the string into a temporary `char[]` or `StringBuilder`, calling the mutable counterparts of the methods in question, and then calling `ToString` on the result. This is wasteful, since two allocations are required: one to copy the data into the mutable buffer, and one to construct a new immutable string. Each of these operations takes O(n) time. `ImmutableArray` solves this problem by having a `MoveToImmutable` method in its 'builder' class, which simply [transfers the array reference](https://github.com/dotnet/corefx/blob/master/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray%601+Builder.cs#L198-L201) to a new `ImmutableArray` and sets its own to an empty one. This takes O(1) constant time and does not require copying any data. ## Proposal I propose adding a `StringBuffer` class that represents a fixed-length, mutable string. Its closest counterpart would be a `char[]`, except that it would use a string as its backing store and thus could be 'moved' directly to a string. Here is a rough sketch of how it would look like: ``` csharp public class StringBuffer { private string value; public StringBuffer(int capacity) { this.value = string.FastAllocateString(capacity); } public StringBuffer(char[] value) { this.value = new string(value); } public StringBuffer(string value) { this.value = string.Copy(value); } public int Length => value.Length; public unsafe void Replace(char from, char to) { if (Length == 0) return; // Modify the string in-place fixed (char* pch = value) { for (int i = 0; i < value.Length; i++) { if (pch[i] == from) pch[i] = to; } } } // Other methods, like CopyTo or ToCharArray // No length-changing methods like Append, // since this is supposed to be a fixed-size buffer public string MoveToString() { // Just do a pointer swap and empty out our reference // No copying needed, so this takes constant time var result = this.value; this.value = string.Empty; return result; } } ``` ## Usage Existing code that looks like this: ``` csharp // Replace non-ASCII chars with question marks char[] buffer = input.ToCharArray(); for (int i = 0; i < buffer.Length; i++) { if (buffer[i] >= 128) buffer[i] = '?'; } var output = new string(buffer); ``` could be converted to look like this: ``` csharp var buffer = new StringBuffer(input); for (int i = 0; i < buffer.Length; i++) { if (buffer[i] >= 128) buffer[i] = '?'; } var output = buffer.MoveToString(); ``` ## Why not add MoveToString on top of StringBuilder? - At the moment, `StringBuilder` is implemented internally on top of a `char` array. If we wanted to add a `MoveToString` method, we would have to refactor it to use a string as its backing store instead. - The move would only be valid if the builder's capacity was equal to its count (see [here](https://github.com/dotnet/corefx/blob/master/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray%601+Builder.cs#L193-L196) for how `ImmutableArray` handles this); if not, the data would need to be copied to a new string anyway, since there would be trailing nulls left off the end of the string. What are your thoughts on this? 6897 area-System.Net [ToFDisable] Port tests for: System.Net* "As part of moving out of ToF and into the open, I've been going through the ""Tree of the future"" tests and calculating which of those tests provide coverage that we're missing in the open tests. The goal of this is to get the open tests universally better than the ToF tests so that we can turn the ToF tests off for ProjectK runs and save us all a lot of headache diagnosing test failures from potentially outdated tests. For System.Net.Requests, we're missing 0 lines of coverage. For System.Net.Security, we're missing 0 lines of coverage. For System.Net.Sockets, we're missing 1246 lines of coverage. For System.Net.WebHeaderCollection, we're missing 0 lines of coverage. For System.Net.WebSockets.Client, we're missing 19 lines of coverage. To fulfill the uncovered lines we would need to either create new tests for them or port 6 ToF tests to the open. Those tests are: - [ ] System.Net.Sockets\4.0.10.0\NetSocketsTestAsyncServer_FullRun.XML - [ ] System.Net.Sockets\4.0.10.0\NetSocketsPerformanceTest_FullRun.XML - [ ] System.Net.Sockets\4.0.10.0\NetSocketsTest_FullRun.XML - [ ] System.Net.Sockets\4.0.0.0\NetSocketsTest_FullRun.XML - [ ] System.Net.Sockets\4.0.0.0\NetSocketsPerformanceTest_FullRun.XML - [ ] System.Net.WebSockets.Client\4.0.0.0\NetWebSocketsClient_FullRun.XML Coverage reports, coverage xml files, and detailed json lists of each piece of missing coverage and the corresponding ToF test that fills it are available on request. " 6901 area-Infrastructure Integrate Arm64 test runs in Helix 6905 area-System.Net NTLM Implementation This includes the changes done for supporting NTLM by using gssntlmssp plugin. Tests are also included for the same. cc: @stephentoub @bartonjs @vijaykota 6907 area-System.Console System.Console: Add OutputStream empty write test resolves #6422 @stephentoub 6910 area-System.Net Optimize WinHTTP notification callbacks Modify WinHttpHandler and WinHttpWebSocket notification callbacks to only receive those notifications that are actually being used in the status callback. This will improve performance. Fixes #5036 6911 area-System.IO MemoryMappedFileTests_CreateOrOpen.ValidArgumentCombinations_NonExecute failed in CI on Windows "http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_debug_prtest/3493/testReport/junit/System.IO.MemoryMappedFiles.Tests/MemoryMappedFileTests_CreateOrOpen/ValidArgumentCombinations_NonExecute_mapName___8fdc2f7d02eb4cd283e0400af5ffa06b___capacity__1__access__Read__options__DelayAllocatePages__inheritability__Inheritable_/ ``` System.IO.MemoryMappedFiles.Tests.MemoryMappedFileTests_CreateOrOpen.ValidArgumentCombinations_NonExecute(mapName: ""8fdc2f7d02eb4cd283e0400af5ffa06b"", capacity: 1, access: Read, options: DelayAllocatePages, inheritability: Inheritable) (from (empty)) System.IO.IOException : Cannot create a file when that file already exists +++++++++++++++++++ STACK TRACE: at System.IO.MemoryMappedFiles.MemoryMappedFile.CreateCore(FileStream fileStream, String mapName, HandleInheritability inheritability, MemoryMappedFileAccess access, MemoryMappedFileOptions options, Int64 capacity) in d:\j\workspace\windows_nt_de---06b7984d\src\System.IO.MemoryMappedFiles\src\System\IO\MemoryMappedFiles\MemoryMappedFile.Windows.cs:line 46 at System.IO.MemoryMappedFiles.MemoryMappedFile.CreateNew(String mapName, Int64 capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, HandleInheritability inheritability) in d:\j\workspace\windows_nt_de---06b7984d\src\System.IO.MemoryMappedFiles\src\System\IO\MemoryMappedFiles\MemoryMappedFile.cs:line 314 at System.IO.MemoryMappedFiles.MemoryMappedFile.CreateNew(String mapName, Int64 capacity) in d:\j\workspace\windows_nt_de---06b7984d\src\System.IO.MemoryMappedFiles\src\System\IO\MemoryMappedFiles\MemoryMappedFile.cs:line 263 at System.IO.MemoryMappedFiles.Tests.MemoryMappedFileTests_CreateOrOpen.ValidArgumentCombinations_NonExecute(String mapName, Int64 capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, HandleInheritability inheritability) in d:\j\workspace\windows_nt_de---06b7984d\src\System.IO.MemoryMappedFiles\tests\MemoryMappedFile.CreateOrOpen.Tests.cs:line 134 ``` " 6912 area-System.Net Restructure async operation queues in Unix Socket implementation "Currently we maintain the queue of pending operations chained off of the ""event port"" (epoll/kqueue). This has some unfortunate implications: 1) We maintain ordering only for the processing of these events. The actual I/O is still unordered, without some extra mechanism. #6838 is a stop-gap fix for this, using the queue lock to maintain ordering of the I/O, but this means that we may block some threads unnecessarily, waiting for other pending I/O to complete. 2) In the current implementation, once we receive the notification, we end up doing the actual I/O operation on the event handler thread itself. This effectively serializes all of the kernel calls involved in the I/O (which includes all of the actual buffer-copies to and from the socket stream data). This impacts scalability significantly, relative to the Windows implementation _and_ Mono on Linux/OSX. 3) Doing the queueing at this level leads to synchronization complexity, which has lead to numerous reliability issues over the last couple of months. I have some ideas for simplifying and improving this, which I'll write up shortly. " 6913 area-System.Diagnostics Port EventLog to .NET Core This includes `System.Diagnostics.EventLog` and friends. 6915 area-System.Reflection System.Reflection.Metadata: Review all exceptions thrown by new code in 1.3 - [x] Localize all messages. - [x] Move all Throw methods to a single place. - [x] Check arguments in new public APIs. - [x] Include exception info in doc comments. 6918 area-System.IO ArgumentOutOfRangeException when creating named pipes on OSX When I run `System.IO.NamedPipes.Tests` on my OSX machine, most tests fail with an `ArgumentOutOfRangeException` in `UnixDomainSocketEndPoint(string)`. It seems the socket path is too long. I am seeing path strings like this: ``` /var/folders/c7/vc_7ks111wqg4svm2dwq81yw0000gn/T/.dotnet/corefx/pipes/42900fc4-3df4-4a0f-bc93-85b9432ce8b3 ``` It looks like this is derived from `Environment.GetTempPath`. I haven't done anything to customize my temp path, so I assume others with stock configurations will hit this as well. 6920 area-Meta Port and update System.Addin Though not used massively there is a real use for it, and as far as I know nothing to replace it. UWP environment as it grows will want this functionality to support business apps. 6926 area-System.Net Make UriBuilder.Query setter idempotent This is a PR meant to replace dotnet/corefx#3647. That pull request should be closed. This fixes #3646. 6927 area-System.Net Remove the SocketPal.Ioctl TODO comment Remove the `SocketPal.Ioctl` TODO comment, rename the PAL methods to make it clear that they are for Windows-specific IOCTLs, and add a comment to that effect. For compat, I can imagine that we'll support some Windows-specific IOCTLs on Linux/OSX in the future (translating them to the appropriate platform-specific call). We should do this only if/when there is demand for specific control code support. Fixes #6828. @stephentoub @CIPop @davidsh 6928 area-System.Net Remove manual SafeHandle marshaling in Unix Socket interop code "#6345 plumbed SafeHandle usage throughout the Unix Socket interop layer, but had to do manual marshaling from SafeHandles to file descriptors in the native interop layer because most of the Socket-related methods in System.Native take ""int""-type file descriptor arguments, rather than IntPtr. If these are changed to IntPtr, we can remove the manual marshaling code. " 6929 area-System.IO Opening a fifo stream fails on OSX Attempting to create a FileStream with a fifo created via mkfifo fails on OSX in the UnixFileStream constructor. The failure is in the attempt to flock the file. Flock fails with ENOTSUP (operation not supported). Example call stack: LocalOsxTransport exited with exception: Operation not supported Stack: at System.IO.UnixFileStream.CheckFileCall(Int64 result, Boolean ignoreNotSupported) at System.IO.UnixFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) at System.IO.UnixFileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode) at MICore.LocalOsxTransport.InitStreams(LaunchOptions options, StreamReader& reader, StreamWriter& writer) 6930 area-System.Data System.Data.SqlClient.Tests.ExceptionTest fails with updated package On updating to latest package rc3-23915 this test fails ``` System.Data.SqlClient.Tests.ExceptionTest.IndependentConnectionExceptionTestOpenConnection [FAIL] Assert.Throws() Failure Expected: typeof(System.Data.SqlClient.SqlException) Actual: typeof(System.TypeInitializationException): The type initializer for 'System.Data.SqlClient.TdsParser' threw an exception. Stack Trace: E:\corefx\src\System.Data.SqlClient\src\System\Data\SqlClient\TdsParser.cs(54,0): at System.Data.SqlClient.TdsParser..ctor(Boolean MARS, Boolean fAsynchronous) E:\corefx\src\System.Data.SqlClient\src\System\Data\SqlClient\SqlInternalConnectionTds.cs(1100,0): at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, TimeoutTimer timeout) ``` ``` System.Data.SqlClient.Tests.ExceptionTest.ExceptionTests [FAIL] Assert.Throws() Failure Expected: typeof(System.Data.SqlClient.SqlException) Actual: typeof(System.TypeInitializationException): The type initializer for 'System.Data.SqlClient.TdsParser' threw an exception. Stack Trace: E:\corefx\src\System.Data.SqlClient\src\System\Data\SqlClient\TdsParser.cs(54,0): at System.Data.SqlClient.TdsParser..ctor(Boolean MARS, Boolean fAsynchronous) E:\corefx\src\System.Data.SqlClient\src\System\Data\SqlClient\SqlInternalConnectionTds.cs(1100,0): at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, Boolean redirectedUserInstance , SqlConnectionString connectionOptions, TimeoutTimer timeout) E:\corefx\src\System.Data.SqlClient\src\System\Data\SqlClient\SqlInternalConnectionTds.cs(1014,0): at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionO ptions, Boolean redirectedUserInstance) E:\corefx\src\System.Data.SqlClient\src\System\Data\SqlClient\SqlInternalConnectionTds.cs(358,0): at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectio nOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling) E:\corefx\src\System.Data.SqlClient\src\System\Data\SqlClient\SqlConnectionFactory.cs(133,0): at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Obj ect poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) E:\corefx\src\System.Data.SqlClient\src\System\Data\ProviderBase\DbConnectionFactory.cs(114,0): at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, D bConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) E:\corefx\src\System.Data.SqlClient\src\System\Data\ProviderBase\DbConnectionPool.cs(476,0): at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConne ctionInternal oldConnection) E:\corefx\src\System.Data.SqlClient\src\System\Data\ProviderBase\DbConnectionPool.cs(1187,0): at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, D bConnectionInternal oldConnection) E:\corefx\src\System.Data.SqlClient\src\System\Data\ProviderBase\DbConnectionPool.cs(792,0): at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout , Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) E:\corefx\src\System.Data.SqlClient\src\System\Data\ProviderBase\DbConnectionPool.cs(712,0): at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConn ectionOptions userOptions, DbConnectionInternal& connection) E:\corefx\src\System.Data.SqlClient\src\System\Data\ProviderBase\DbConnectionFactory.cs(287,0): at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 ret ry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) E:\corefx\src\System.Data.SqlClient\src\System\Data\ProviderBase\DbConnectionInternal.cs(452,0): at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFact ory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) E:\corefx\src\System.Data.SqlClient\src\System\Data\ProviderBase\DbConnectionClosed.cs(64,0): at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectio nFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) E:\corefx\src\System.Data.SqlClient\src\System\Data\SqlClient\SqlConnection.cs(911,0): at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) E:\corefx\src\System.Data.SqlClient\src\System\Data\SqlClient\SqlConnection.cs(541,0): at System.Data.SqlClient.SqlConnection.Open() E:\corefx\src\System.Data.SqlClient\tests\FunctionalTests\ExceptionTest.cs(81,0): at System.Data.SqlClient.Tests.ExceptionTest.GenerateConnectionException(String connectionString) E:\corefx\src\System.Data.SqlClient\tests\FunctionalTests\ExceptionTest.cs(28,0): at System.Data.SqlClient.Tests.ExceptionTest.<>c__DisplayClass5_0.b__0() ``` 6931 area-System.IO System.IO.Filesystem.Tests fail with package update to rc3-23915 ``` **System.IO.Tests.FileInfo_MoveTo.PathWithIllegalCharacters** [FAIL] Assert.All() Failure: 3 out of 44 items in the collection did not pass. [5]: Xunit.Sdk.ThrowsException: Assert.Throws() Failure Expected: typeof(System.ArgumentException) Actual: typeof(System.IO.IOException): The specified path is invalid at System.IO.Win32FileSystem.MoveFile(String sourceFullPath, String destFullPath) in E:\corefx\src\System.IO.FileSystem\src\System\IO\Win32FileSystem.cs:line 430 at System.IO.FileInfo.MoveTo(String destFileName) in E:\corefx\src\System.IO.FileSystem\src\System\IO\FileInfo.cs:line 284 at System.IO.Tests.FileInfo_MoveTo.Move(String sourceFile, String destFile) in E:\corefx\src\System.IO.FileSystem\tests\FileInfo\MoveTo.cs:line 13 at System.IO.Tests.File_Move.<>c__DisplayClass4_1.b__1() in E:\corefx\src\System.IO.FileSystem\tests\File\Move.cs:line 53 at Xunit.Assert.RecordException(Action testCode) ``` ``` **System.IO.Tests.Directory_CreateDirectory.PathWithInvalidCharactersAsPath_ThrowsArgumentException** [FAIL] Assert.All() Failure: 3 out of 44 items in the collection did not pass. [5]: Xunit.Sdk.ThrowsException: Assert.Throws() Failure Expected: typeof(System.ArgumentException) Actual: typeof(System.IO.DirectoryNotFoundException): Could not find a part of the path '\\?\UNC\LOCALHOST'. at System.IO.Win32FileSystem.CreateDirectory(String fullPath) in E:\corefx\src\System.IO.FileSystem\src\System\IO\Win32FileSystem.cs:line 147 at System.IO.Directory.CreateDirectory(String path) in E:\corefx\src\System.IO.FileSystem\src\System\IO\Directory.cs:line 50 at System.IO.Tests.Directory_CreateDirectory.Create(String path) in E:\corefx\src\System.IO.FileSystem\tests\Directory\CreateDirectory.cs:line 16 at System.IO.Tests.Directory_CreateDirectory.<>c__DisplayClass3_0.b__1() in E:\corefx\src\System.IO.FileSystem\tests\Directory\CreateDirectory.cs:line 41 at Xunit.Assert.RecordException(Func`1 testCode) ``` ``` **System.IO.Tests.File_Move.PathWithIllegalCharacters** [FAIL] Assert.All() Failure: 3 out of 44 items in the collection did not pass. [5]: Xunit.Sdk.ThrowsException: Assert.Throws() Failure Expected: typeof(System.ArgumentException) Actual: typeof(System.IO.IOException): The specified path is invalid at System.IO.Win32FileSystem.MoveFile(String sourceFullPath, String destFullPath) in E:\corefx\src\System.IO.FileSystem\src\System\IO\Win32FileSystem.cs:line 430 at System.IO.File.Move(String sourceFileName, String destFileName) in E:\corefx\src\System.IO.FileSystem\src\System\IO\File.cs:line 698 at System.IO.Tests.File_Move.Move(String sourceFile, String destFile) in E:\corefx\src\System.IO.FileSystem\tests\File\Move.cs:line 15 at System.IO.Tests.File_Move.<>c__DisplayClass4_1.b__1() in E:\corefx\src\System.IO.FileSystem\tests\File\Move.cs:line 53 at Xunit.Assert.RecordException(Action testCode) ``` ``` **System.IO.Tests.DirectoryInfo_Create.PathWithInvalidCharactersAsPath_ThrowsArgumentException** [FAIL] Assert.All() Failure: 3 out of 44 items in the collection did not pass. [5]: Xunit.Sdk.ThrowsException: Assert.Throws() Failure Expected: typeof(System.ArgumentException) Actual: typeof(System.IO.DirectoryNotFoundException): Could not find a part of the path '\\?\UNC\LOCALHOST'. at System.IO.Win32FileSystem.CreateDirectory(String fullPath) in E:\corefx\src\System.IO.FileSystem\src\System\IO\Win32FileSystem.cs:line 147 at System.IO.DirectoryInfo.Create() in E:\corefx\src\System.IO.FileSystem\src\System\IO\DirectoryInfo.cs:line 102 at System.IO.Tests.DirectoryInfo_Create.Create(String path) in E:\corefx\src\System.IO.FileSystem\tests\DirectoryInfo\Create.cs:line 16 at System.IO.Tests.Directory_CreateDirectory.<>c__DisplayClass3_0.b__1() in E:\corefx\src\System.IO.FileSystem\tests\Directory\CreateDirectory.cs:line 41 at Xunit.Assert.RecordException(Func`1 testCode) ``` 6932 area-System.Reflection System.Reflection.TypeExtensions test fails with package upgrade to rc3-23915 ``` System.Reflection.Tests.PropertyInfoGetAccessor1.NegTest1 [FAIL] Assert.Throws() Failure Expected: typeof(System.ArgumentNullException) Actual: typeof(System.NullReferenceException): Object reference not set to an instance of an object. Stack Trace: E:\corefx\src\System.Reflection.TypeExtensions\tests\PropertyInfo\PropertyInfoGetAccessors1.cs(77,0): at System.Reflection.Tests.PropertyInfoGetAccessor1.<>c__DisplayClass5_0.b__0() Finished: System.Reflection.TypeExtensions.Tests ``` 6937 area-System.Data Fix ApiCompat issues for System.Data.Common Remove ApiCompatBaseline.net45.txt once errors mentioned in it are resolved. 6939 area-System.Linq Fix ApiCompat issues for System.Linq.Expressions Remove ApiCompatBaseline.net46.txt once errors mentioned in it are resolved. 6942 area-System.Reflection System.Reflection.Metadata: Avoid allocations in custom attribute parser The custom attribute parser allocates an ImmutableArray for FixedArguments and NamedArguments. We should explore options to parse these lazily and avoid the array allocation. 6945 area-Infrastructure Need to remove Framework-specific assembly attributes from test assemblies "The test DLLs for CoreFX are getting created using the values from https://github.com/dotnet/corefx/blob/master/dir.props This leads to assembly metadata like this: [assembly: AssemblyVersion(""999.999.999.999"")] [assembly: OptimizeForBenchmarks] [assembly: AssemblyCompany(""Microsoft Corporation"")] [assembly: AssemblyCopyright(""© Microsoft Corporation. All rights reserved."")] [assembly: AssemblyDefaultAlias(""System.Collections.Tests"")] [assembly: AssemblyDescription(""System.Collections.Tests"")] [assembly: AssemblyFileVersion(""1.0.00001.0"")] [assembly: AssemblyInformationalVersion(""1.0.00001.0 built by: NETCORETSTBLD19-CORBVT"")] **[assembly: AssemblyMetadata("".NETFrameworkAssembly"", """")]** **[assembly: AssemblyMetadata(""Serviceable"", ""True"")]** **[assembly: AssemblyProduct(""Microsoft® .NET Framework"")]** [assembly: AssemblyTitle(""System.Collections.Tests"")] [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] As well as having the same public key token as the actual product dlls. This becomes a much bigger deal when trying to compile these tests for .NET Native, as .NET Native considers these DLLs to be part of the platform and doesn't include them as part of the test ""application"" to be compiled as native. Fixing this will entail either signing with a different key (perhaps just using the OpenKey ) or no key, and removing these attributes. " 6946 area-System.Net Uri percent-encoding inconsistency between .NET Framework and UWP "I am not sure this is the best place to notify Microsoft about the following problem but here we go : I have noticed an inconsistency of HttpClient.SendAsync between ""Console"" and W10 Universal App. The inconsistency can be detected via Fiddler when executing a query with special characters. Please note that I am using the `HttpClient` from a Portable Class Library. If I user `HttpClient.SendAsync` the following query : https://api.twitter.com/1.1/search/tweets.json?q=%D0%9F%D1%80%D0%B8%D0%B2%D0%B5%D1%82%21&result_type=mixed&count=100, the query executed by .NET is different if it is run in UAP and if it is run in a Console application. (query = **Привет!**) I have been able to identify this via Fiddler: **Console Application :** > GET https://api.twitter.com/1.1/search/tweets.json?q=%D0%9F%D1%80%D0%B8%D0%B2%D0%B5%D1%82!&result_type=mixed&count=100 HTTP/1.1 > > User-Agent: Tweetinvi/0.9.11.1 > > Cache-Control: no-cache > > Authorization: OAuth oauth_consumer_key=""jjMV4k3n9EswD9hlhRZqQCZrm"",oauth_nonce=""222222"",oauth_signature_method=""HMAC-SHA1"",oauth_timestamp=""1458086400"",oauth_token=""1693649419-BlEivyWIiOVrb22JjdzRipXWp4ltVdo4VLye1VW"",oauth_version=""1.0"",oauth_signature=""ODaUZNfxMbM7l0gtZ1GEFsjr%2BAA%3D"" > > Host: api.twitter.com > > Connection: Keep-Alive **Windows 10 Universal App :** > GET https://api.twitter.com/1.1/search/tweets.json?q=%D0%9F%D1%80%D0%B8%D0%B2%D0%B5%D1%82%21&result_type=mixed&count=100 HTTP/1.1 > > Cache-Control: no-cache > > User-Agent: Tweetinvi/0.9.11.1 > > Authorization: OAuth oauth_consumer_key=""jjMV4k3n9EswD9hlhRZqQCZrm"",oauth_nonce=""222222"",oauth_signature_method=""HMAC-SHA1"",oauth_timestamp=""1458086400"",oauth_token=""1693649419-BlEivyWIiOVrb22JjdzRipXWp4ltVdo4VLye1VW"",oauth_version=""1.0"",oauth_signature=""ODaUZNfxMbM7l0gtZ1GEFsjr%2BAA%3D"" > > Host: api.twitter.com > > Connection: Keep-Alive > > Cookie: guest_id=v1%3A145704170375190067 If you take attention, you will notice that on the console, the end of the query parameter is **%82!** (with a question mark). On the other side the W10 query parameter finishes by **%82%21**. Here the question mark has kept its HTML escaping. You can also notice that W10 is adding a cookie. Is it a bug of the .NET Framework/HttpClient library? I can assure that the query entered is the SAME in the `HttpClient.SendAsync` as both application uses the same binaries to create and execute the query (and I verified). Here is my code for reference: ``` c# public class HttpClientWebHelper : IHttpClientWebHelper { public async Task GetHttpResponse(ITwitterQuery twitterQuery, HttpContent httpContent = null, ITwitterClientHandler handler = null) { using (var client = GetHttpClient(twitterQuery, handler)) { client.Timeout = twitterQuery.Timeout; var httpMethod = new HttpMethod(twitterQuery.HttpMethod.ToString()); if (httpContent == null) { return await client.SendAsync(new HttpRequestMessage(httpMethod, twitterQuery.QueryURL)).ConfigureAwait(false); } else { if (httpMethod != HttpMethod.Post) { throw new ArgumentException(""Cannot send HttpContent in a WebRequest that is not POST.""); } return await client.PostAsync(twitterQuery.QueryURL, httpContent).ConfigureAwait(false); } } } public HttpClient GetHttpClient(ITwitterQuery twitterQuery, ITwitterClientHandler twitterHandler = null) { var handler = (twitterHandler as TwitterClientHandler) ?? new TwitterClientHandler(); handler.TwitterQuery = twitterQuery; var client = new HttpClient(handler) { Timeout = twitterQuery.Timeout, }; return client; } } ``` This post is a ""duplicate"" of this [StackOverflow question](http://stackoverflow.com/questions/36025004/httpclient-does-not-send-same-request-in-w10-uap). " 6947 area-System.Net WebUtility.UrlEncodeToBytes erroneously returns the full array if no encoding is needed This code prints `1 2 3`, when it should print `2 3`: ``` csharp byte[] input = { 49, 50, 51 }; byte[] output = WebUtility.UrlEncodeToBytes(input, offset: 1, count: 2); foreach (var item in output) Console.WriteLine((char)item); ``` The problem seems to be coming from [this](https://github.com/dotnet/corefx/blob/master/src/System.Runtime.Extensions/src/System/Net/WebUtility.cs#L319) line in the internal `UrlEncode` implementation, which returns the whole byte array disregarding the offset and the count. Luckily I've found out that I accidentally fixed this with #6698, so this can be closed soon enough when that is merged. cc @stephentoub @davidsh 6952 area-System.Net WebHeaderCollection: Remove dependency on older collections `System.Net.WebHeaderCollection` pulls in `System.Collections.Specialized` which pulls in `System.Collections.NonGeneric` which we are trying to break dependencies on. This PR removes the dependency, paring down `WebHeaderCollection`'s implementation to only what's needed to support the contract's public surface area ([ref](https://github.com/dotnet/corefx/blob/50c11108d65ed6b110ea125a6d072206ca227f4a/src/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.cs#L88-L96), [manual](https://github.com/dotnet/corefx/blob/50c11108d65ed6b110ea125a6d072206ca227f4a/src/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.Manual.cs#L10-L15)). Updated tests pass before/after these changes (100% line and branch coverage of the changes), and on the full framework. Fixes #6726. cc: @weshaggard @davidsh 6956 area-System.IO Unix_BufferSizeRoundtripping failing sporadically on OS X ``` 05:05:15 System.IO.Pipes.Tests.NamedPipeTest_Specific.Unix_BufferSizeRoundtripping(direction: Out) [FAIL] 05:05:15 Assert+WrapperXunitException : File path: d:\j\workspace\osx_debug_bld---2f4069d6\src\System.IO.Pipes\tests\NamedPipeTests\NamedPipeTest.Specific.cs. Line: 271 05:05:15 ---- Assert.InRange() Failure 05:05:15 Range: (16384 - 2147483647) 05:05:15 Actual: 0 05:05:15 Stack Trace: 05:05:15 Starting: System.Linq.Parallel.Tests 05:05:15 at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber) 05:05:15 at Assert.InRange[T](T actual, T low, T high, String path, Int32 line) 05:05:15 at System.IO.Pipes.Tests.NamedPipeTest_Specific.Unix_BufferSizeRoundtripping(PipeDirection direction) 05:05:15 ----- Inner Stack Trace ----- 05:05:15 at Assert.InRange[T](T actual, T low, T high, String path, Int32 line) ``` 6960 area-Infrastructure HttpClient and WinHttpHandler tests failing on Windows due to FileLoadException "e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_win10_debug/123/consoleFull http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_windows_nt_debug/117/console http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_win7_debug/120/consoleFull ``` 06:41:51 System.IO.FileLoadException: Could not load file or assembly 'System.Net.Primitives, Version=4.0.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) 06:41:51 d:\j\workspace\outerloop_win---0cba2915\Tools\tests.targets(130,5): warning MSB3073: The command ""d:\j\workspace\outerloop_win---0cba2915\bin/tests/Windows_NT.AnyCPU.Debug/System.Net.Http.WinHttpHandler.Functional.Tests/dnxcore50/CoreRun.exe xunit.console.netcore.exe System.Net.Http.WinHttpHandler.Functional.Tests.dll -xml testResults.xml -notrait category=nonwindowstests -notrait Benchmark=true -trait category=InnerLoop -trait category=OuterLoop -notrait category=failing "" exited with code 1. [d:\j\workspace\outerloop_win---0cba2915\src\System.Net.Http.WinHttpHandler\tests\FunctionalTests\System.Net.Http.WinHttpHandler.Functional.Tests.csproj] 06:41:51 d:\j\workspace\outerloop_win---0cba2915\Tools\tests.targets(137,5): error : One or more tests failed while running tests from 'System.Net.Http.WinHttpHandler.Functional.Tests' please check log for details! [d:\j\workspace\outerloop_win---0cba2915\src\System.Net.Http.WinHttpHandler\tests\FunctionalTests\System.Net.Http.WinHttpHandler.Functional.Tests.csproj] 06:41:53 System.Net.Http.WinHttpHandler.Unit.Tests -> d:\j\workspace\outerloop_win---0cba2915\bin\Windows_NT.AnyCPU.Debug\System.Net.Http.WinHttpHandler.Unit.Tests\System.Net.Http.WinHttpHandler.Unit.Tests.dll 06:41:54 xUnit.net console test runner (64-bit .NET Core) 06:41:54 Copyright (C) 2014 Outercurve Foundation. 06:41:54 06:41:54 Discovering: System.Net.Http.WinHttpHandler.Unit.Tests 06:41:54 System.IO.FileLoadException: Could not load file or assembly 'System.Net.Primitives, Version=4.0.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) 06:41:55 d:\j\workspace\outerloop_win---0cba2915\Tools\tests.targets(130,5): warning MSB3073: The command ""d:\j\workspace\outerloop_win---0cba2915\bin/tests/Windows_NT.AnyCPU.Debug/System.Net.Http.WinHttpHandler.Unit.Tests/dnxcore50/CoreRun.exe xunit.console.netcore.exe System.Net.Http.WinHttpHandler.Unit.Tests.dll -xml testResults.xml -notrait category=nonwindowstests -notrait Benchmark=true -trait category=InnerLoop -trait category=OuterLoop -notrait category=failing "" exited with code 1. [d:\j\workspace\outerloop_win---0cba2915\src\System.Net.Http.WinHttpHandler\tests\UnitTests\System.Net.Http.WinHttpHandler.Unit.Tests.csproj] 06:41:56 d:\j\workspace\outerloop_win---0cba2915\Tools\tests.targets(137,5): error : One or more tests failed while running tests from 'System.Net.Http.WinHttpHandler.Unit.Tests' please check log for details! [d:\j\workspace\outerloop_win---0cba2915\src\System.Net.Http.WinHttpHandler\tests\UnitTests\System.Net.Http.WinHttpHandler.Unit.Tests.csproj] 06:42:13 Finished: System.IO.FileSystem.Tests 06:42:13 06:42:13 === TEST EXECUTION SUMMARY === 06:42:13 System.IO.FileSystem.Tests Total: 89, Errors: 0, Failed: 0, Skipped: 0, Time: 61.993s 06:42:13 System.Net.Http -> d:\j\workspace\outerloop_win---0cba2915\bin\Windows_NT.AnyCPU.Debug\System.Net.Http\System.Net.Http.dll 06:42:15 xUnit.net console test runner (64-bit .NET Core) 06:42:15 Copyright (C) 2014 Outercurve Foundation. 06:42:15 06:42:15 Discovering: System.Composition.Tests 06:42:16 Discovered: System.Composition.Tests 06:42:16 Info: System.Composition.Tests has no tests to run 06:42:16 System.Net.Http.Functional.Tests -> d:\j\workspace\outerloop_win---0cba2915\bin\Windows_NT.AnyCPU.Debug\System.Net.Http.Functional.Tests\System.Net.Http.Functional.Tests.dll 06:42:16 xUnit.net console test runner (64-bit .NET Core) 06:42:16 Copyright (C) 2014 Outercurve Foundation. 06:42:16 06:42:16 Discovering: System.Net.Http.Functional.Tests 06:42:17 System.IO.FileLoadException: Could not load file or assembly 'System.Net.Primitives, Version=4.0.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) 06:42:17 d:\j\workspace\outerloop_win---0cba2915\Tools\tests.targets(130,5): warning MSB3073: The command ""d:\j\workspace\outerloop_win---0cba2915\bin/tests/Windows_NT.AnyCPU.Debug/System.Net.Http.Functional.Tests/dnxcore50/CoreRun.exe xunit.console.netcore.exe System.Net.Http.Functional.Tests.dll -xml testResults.xml -notrait category=nonwindowstests -notrait Benchmark=true -trait category=InnerLoop -trait category=OuterLoop -notrait category=failing "" exited with code 1. [d:\j\workspace\outerloop_win---0cba2915\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] 06:42:18 d:\j\workspace\outerloop_win---0cba2915\Tools\tests.targets(137,5): error : One or more tests failed while running tests from 'System.Net.Http.Functional.Tests' please check log for details! [d:\j\workspace\outerloop_win---0cba2915\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] ``` cc: @ericstj, @davidsh " 6962 area-System.ComponentModel Add custom collections used for TypeDescriptors This adds the AttributeCollection, PropertyDescriptorCollection, and EventDescriptorCollection that are needed in the TypeDescriptor methods. 6965 area-System.IO Add missing tests for System.IO Ports some ToF tests for System.IO and adds some new tests to cover gaps. resolves #6431 @stephentoub 6966 area-System.Collections Add missing tests for System.Collections Ports some ToF tests for System.Collections and adds some new tests to cover gaps. resolves #6809 @stephentoub 6973 area-Infrastructure "After correcting errors, clean.cmd still reports ""An error occured while cleaning""" "I had a file open in ildasm when I ran clean. After closing this, subsequent calls to clean worked but showed the same error. Console output: C:\GIT\CoreFX>clean.cmd Running init-tools.cmd Tools are already initialized. Running msbuild clean targets ""Clean"" ... C:\GIT\CoreFX\build.proj(98,5): error MSB3231: Unable to remove directory ""C:\GIT\CoreFX\bin/"". The process cannot access the file 'System.Xml.XDocument.Streaming.Tests.dll' because it is b eing used by another process. An error occured while cleaning; see C:\GIT\CoreFX\clean.log for more details. C:\GIT\CoreFX>clean.cmd Running init-tools.cmd Tools are already initialized. Running msbuild clean targets ""Clean"" ... An error occured while cleaning; see C:\GIT\CoreFX\clean.log for more details. " 6978 area-System.ComponentModel Add attribute types to System.ComponentModel This adds the types deriving from Attribute proposed in #6573. This also addresses #1053 and #5625. 6983 area-System.Net Make Unix domain socket path handling in Pipes more robust - Rather than hardcoding offsets and lengths related to the size of the native struct sockaddr_un's, get it from the native shim. This will help with future platform support. - With that info, allow the path to be as long as the platform will support, rather than capping it at a hardcoded value. - Throw a meaningful exception when too long a length is specified cc: @ianhays, @ericeil Related to https://github.com/dotnet/corefx/issues/6918 6989 area-System.Net Kerberos sign only interop issue When kerberos is negotiated with Sign Only protection level from *nix client against a windows server, *nix client interprets the session flags as supported and hence always set CONFIDENTIALITY flag irrespective of the requested flags/protection level. This, in windows server which interprets the flags as required, causes the windows server to expect all further communication to be encrypted, which is not the case and hence server side processing fails. To override this behavior, starting MIT Kerberos 1.14 and heimdal implementation, we need to call gss_set_cred_option with GSS_KRB5_CRED_NO_CI_FLAGS_X. When not available, the windows server should fail in negotiating Sign Only. @stephentoub @bartonjs @vijaykota @kapilash @shrutigarg 6991 area-System.Net fixing bug in contextflag mapping Since ContextFlagsPal enum has AcceptIntegrity flag and InitIdentify flag with same value.. mapping of that to Native flag returns some invalid flag for a context. Values being same is not an issue as these flags are used in independent contexts. we will have to limit the mapping by reading whether it is server or client context. 6992 area-System.Net Query for the right proxy creds in HttpClient Both the WinHttp and libcurl implementations are using the target Uri to lookup the right proxy credentials rather than using the proxy's Uri. cc: @davidsh, @alpaix, @ericeil, @cipop, @kapilash 6994 area-Infrastructure All Unix test legs are stalling They appear to be hanging while in the Discovering phase of looking for xunit tests. 6997 area-System.Net WinHttpHandler needs to better handle proxy url when DefaultProxyCredentials used See discussion here: https://github.com/dotnet/corefx/pull/6992/files#r56524599 6998 area-Meta Q: The legacy .NET System.Configuration.Provider namespace & system I'm not familiar with the new configuration system, but can it be used to perform the same functions that this legacy system does? I've been heavily using this system for 14 years now, and it works really well, but most people don't even know it exists, or how to use it. I have created several provider systems, with abstracted interfaces, creating a plug-n-play system for consumers. I've mostly used it for persistence where one consumer may use SQL Server, another may use Oracle, and another may use web services, etc., but it can be used for anything. It also works great for versioning support, where you may be required to support clients that require new data using an old data format. If the new configuration system doesn't support something like this, is there a way to do this in .NET Core? 6999 area-System.Net Where is httplistener? Is it renamed? Hi, I was checking dotnet and didn't find System.net.httplistener. Is it implemented? Is it renamed? Is it going to be implemented? -XDVarpunen 7002 area-System.IO FileSystemWatcher_Changed_PreSeededNestedStructure failed in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_debug_prtest/3639/consoleFull ``` 13:15:04 ChangedTests.FileSystemWatcher_Changed_PreSeededNestedStructure(includeSubdirectories: False) [FAIL] 13:15:05 System.UnauthorizedAccessException : Access to the path '\\?\d:\j\workspace\windows_nt_de---06b7984d\bin\tests\Windows_NT.AnyCPU.Debug\System.IO.FileSystem.Watcher.Tests\dnxcore50\FileSystemWatcher_Changed_PreSeededNestedStructure' is denied. 13:15:05 Stack Trace: 13:15:05 at System.IO.Win32FileSystem.RemoveDirectoryHelper(String fullPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound) 13:15:05 at System.IO.Win32FileSystem.RemoveDirectory(String fullPath, Boolean recursive) 13:15:05 d:\j\workspace\windows_nt_de---06b7984d\src\System.IO.FileSystem.Watcher\tests\Utility\Utility.cs(60,0): at Utility.EnsureDelete(String path) 13:15:05 d:\j\workspace\windows_nt_de---06b7984d\src\System.IO.FileSystem.Watcher\tests\Utility\TemporaryTestDirectory.cs(40,0): at TemporaryTestDirectory.Dispose(Boolean disposing) 13:15:05 d:\j\workspace\windows_nt_de---06b7984d\src\System.IO.FileSystem.Watcher\tests\Utility\TemporaryTestDirectory.cs(32,0): at TemporaryTestDirectory.Dispose() 13:15:05 d:\j\workspace\windows_nt_de---06b7984d\src\System.IO.FileSystem.Watcher\tests\FileSystemWatcher.Changed.cs(192,0): at ChangedTests.FileSystemWatcher_Changed_PreSeededNestedStructure(Boolean includeSubdirectories) ``` 7010 area-Infrastructure Update tool-runtime project.json to reflect debian.8 RID When we are ready to update the tool-runtime, ensure the project.json RID is updated debian.8.2 => debian.8 7011 area-Infrastructure Build packages outside of build.cmd/sh - [x] Build packages as a separate task of build.cmd with an build-packages.cmd script - [x] Build packages as a separate task of build.sh with an build-packages.sh script 7012 area-System.Runtime DateTimeOffset.ToString Returns Different Value between Desktop and CoreFx "Please see the following example, ``` csharp string format = ""HH:mm:ss.fffffffzzzzzz""; DateTime time = new DateTime(549269870000L, DateTimeKind.Local); DateTimeOffset offset = DateTime.MinValue + time.TimeOfDay; string offsetString = offset.ToString(format, DateTimeFormatInfo.InvariantInfo); string timeString = time.ToString(format); Assert.Equal(timeString, offsetString); ``` On desktop, timeString equals offsetString; but on CoreFx, they are not equal. Note that this issue seems related to Daylight Save Time change. The assert succeeded last week before the DST change. The issue is blocking https://github.com/dotnet/corefx/pull/6762. " 7021 area-System.IO AnonymousPipeTest_Specific.ClonedServer_ActsAsOriginalServer sporadically failing in CI ``` 06:02:14 System.IO.Pipes.Tests.AnonymousPipeTest_Specific.ClonedServer_ActsAsOriginalServer [FAIL] 06:02:14 Assert+WrapperXunitException : File path: d:\j\workspace\debian8.2_deb---3bf9911c\src\System.IO.Pipes\tests\AnonymousPipeTests\AnonymousPipeTest.Specific.cs. Line: 54 06:02:14 ---- Assert.Throws() Failure 06:02:14 Expected: typeof(System.IO.IOException) 06:02:14 Actual: (No exception was thrown) 06:02:14 Stack Trace: 06:02:15 at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber) 06:02:15 at Assert.Throws[T](Action testCode, String path, Int32 line) 06:02:15 at System.IO.Pipes.Tests.AnonymousPipeTest_Specific.ClonedServer_ActsAsOriginalServer() 06:02:15 ----- Inner Stack Trace ----- 06:02:15 at Assert.Throws[T](Action testCode, String path, Int32 line) ``` 7023 area-System.Security Support AES-GCM Currently I am using AuthenticatedAesCng in [Security.Cryptography.dll](https://clrsecurity.codeplex.com/) for AES-GCM encryption and decryption in a .NET application. I would like to have it added to CoreFX. 7026 area-System.Security Easier CngKey extraction from X509Certificate/X509Certificate2 Please provide methods in X509Certificate/X509Certificate2 or extension methods for easier CngKey extraction from X509Certificate/X509Certificate2.There should be at least 2 methods -- one for public key and another for private key. 7027 area-System.Net Make UriBuilder.Fragment setter idempotent Similar to #6926, but for UriBuilder.Fragment. This is a breaking change, but I noticed that if the PR above was merged, this made sense /cc @stephentoub 7031 area-System.Net Incorporate PR Feedback - Code Cleanup in NegotiateStream "The following comments were made in #6469 and need to be incorporated into negotiatestream ~~_1_. [One to one mapping with native calls and Interop.*.cs files](https://github.com/dotnet/corefx/pull/6469#discussion_r56656680)~~ This is a lot of code being added to the Interop.*.cs files. Typically we've kept these as close to 1:1 with the underlying operation being wrapped as possible, typiclaly just the P/Invoke signature or maybe a 1-2 line wrapper if necessary, and then all of this additional logic ends up living in the consuming code. ~~_2_. [Split up safefreecredentials](https://github.com/dotnet/corefx/pull/6469#discussion_r56659315) As post-merge cleanup this file should probably be split up (now that this base class applies to two different libraries' interop). And since libssl is the last lib\* directory left in Interop, that could be cleaned up at the same time.~~ ~~_3_. [Fix up boiler plate code in KerberosTest.cs](https://github.com/dotnet/corefx/pull/6469#discussion_r56673383) I honestly can't figure out how each of these tests is different... it'd be great to factor out boilerplate and leave each test showing the kernel of what it's testing.~~ (fixed in #7317) ~~_4_. [Non-SafeHandle SafeHandles to be refactored out](https://github.com/dotnet/corefx/pull/6469#discussion_r56658414) Some of the safehandles in PAL are not really safe handles. These need to reworked.~~ > Not today, but one day it would give me a warm and fuzzy feeling if the PAL was reworked to not require non-SafeHandle SafeHandles be created. ~~_5_. [A compile time constant for the size of OID lengths](https://github.com/dotnet/corefx/pull/6469#discussion_r56660671)~~ The following code has /magic/ value of 6. ``` gss_OID_desc gss_mech_spnego_OID_desc = {.length = 6, .elements = static_cast(gss_spnego_oid_value)}; ``` ~~_6_. [Debug only constructor with an assert for size](https://github.com/dotnet/corefx/pull/6469#discussion_r56661993)~~ (fixed in #7317) ``` private const int StatusDictionarySize = 39; #if DEBUG static SecurityStatusAdapterPal() { Debug.Assert(s_statusDictionary.Count == StatusDictionarySize, $""Expected size {StatusDictionarySize}, got size {s_statusDictionary.Count}""); } #endif private static readonly ... = new BidirectionDictionary<...>(StatusDictionarySize); ``` " 7034 area-System.ComponentModel Expose MemberDescriptor in ComponentModel This exposes all the members in MemberDescriptor and updates PropertyDescriptor and EventDescriptor to derive from it. This also exposes a few methods in TypeDescriptor that are necessary for these types, but leaves the implementation empty (or throw NotImplementedException). @chlowell 7035 area-Infrastructure Outerloop Ubuntu build failing with GenAPI errors "``` /mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/Tools/notsupported.targets(50,5): error MSB3073: The command """"/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/Tools/corerun"" ""/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/Tools/GenAPI.exe"" ""/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/bin/ref/Microsoft.Win32.Registry.AccessControl/4.0.0.0/Microsoft.Win32.Registry.AccessControl.dll"" -libPath:""/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/packages/Microsoft.Win32.Registry/4.0.0-rc3-23910/ref/netstandard1.3/;/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/packages/System.Globalization/4.0.11-rc3-23910/ref/netstandard1.3/;/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/packages/System.IO/4.0.10/ref/dotnet/;/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/packages/System.Reflection/4.1.0-rc3-23910/ref/netstandard1.3/;/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/packages/System.Reflection.Primitives/4.0.1-rc3-23910/ref/netstandard1.0/;/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/packages/System.Resources.ResourceManager/4.0.0/ref/dotnet/;/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/packages/System.Runtime/4.0.20/ref/dotnet/;/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/packages/System.Runtime.Handles/4.0.0/ref/dotnet/;/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/packages/System.Runtime.InteropServices/4.0.20/ref/dotnet/;/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/packages/System.Security.AccessControl/4.0.0-rc3-23910/ref/netstandard1.3/;/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/packages/System.Security.Claims/4.0.1-rc3-23910/ref/netstandard1.3/;/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/packages/System.Security.Principal/4.0.1-rc3-23910/ref/netstandard1.0/;/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/packages/System.Security.Principal.Windows/4.0.0-rc3-23910/ref/netstandard1.3/;/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/packages/System.Text.Encoding/4.0.11-rc3-23910/ref/netstandard1.3/;/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/packages/System.Threading.Tasks/4.0.11-rc3-23910/ref/netstandard1.3/"" -out:""/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/bin/obj/Unix.AnyCPU.Debug/Microsoft.Win32.Registry.AccessControl/Microsoft.Win32.Registry.AccessControl.notsupported.cs"" -throw"" exited with code -1. [/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/src/Microsoft.Win32.Registry.AccessControl/src/Microsoft.Win32.Registry.AccessControl.csproj] ``` " 7036 area-System.Net WebUtility.UrlDecode fails to make a round-trip for surrogate characters "Discovered this while adding some tests for `WebUtility`. This prints `False`: ``` csharp string value = ""\uD800""; string input = WebUtility.UrlEncode(value); string output = WebUtility.UrlDecode(input); Console.WriteLine(output == value); ``` Here's a console program on [.NET Fiddle](https://dotnetfiddle.net/DRBu6a) to demonstrate this so you can see it for yourself. cc @davidsh @stephentoub " 7037 area-System.Net WebRequest.DefaultWebProxy not compatible with HttpClient "If I have the following HttpClient: ``` var handler = new HttpClientHandler(); handler.UseDefaultCredentials = true; handler.Proxy = WebRequest.DefaultWebProxy; var client = new HttpClient(handler); client.DefaultRequestHeaders.TryAddWithoutValidation(""User-Agent"", ""Mozilla/5.0 Bla"") ``` The first time I use this client (with `client.GetAsync(""http://www.nuget.org/api/v2"")`), I will get back the correct result. However, if I reuse the client, I will get an exception: ``` System.PlatformNotSupportedException: Operation is not supported on this platform. at System.Net.SystemWebProxy.IsBypassed(Uri host) at System.Net.Http.WinHttpHandler.SetRequestHandleProxyOptions(RequestState state) at System.Net.Http.WinHttpHandler.SetRequestHandleOptions(RequestState state) at System.Net.Http.WinHttpHandler.d__1.MoveNext() ``` Is this a bug on CoreClr? Do I have to create new instance of HttpClient everytime? " 7038 area-Infrastructure System.IO.FileLoadException: Could not load file or assembly 'System.Collections.Concurrent, Version=4.0.12.0 Trying to use the rc2-23918 libraries, when I try to run `dotnet test`, I get the following: ``` C:\users\oren\source\git\reactive-extensions-private\Rx.NET\Source\Tests.System.Reactive [dotnet-cli ≡ +0 ~9 -0 !]> dotnet test Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'System.Collections.Concurrent, Version=4.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) at Xunit.Runner.DotNet.Program..ctor() at Xunit.Runner.DotNet.Program.Main(String[] args) ``` Here's the project.lock.json for it: https://gist.github.com/onovotny/8fe9a08ed4d8d7f7f0fb 7042 area-System.Net Cleanup and add extensive WebUtility tests This follows up on #6698 by adding extensive testing based on the failures encountered in that PR. Primarily, it adds tests for surrogate characters, and makes sure spaces are properly en/decoded in the `ToBytes` methods. Additional changes: - Test data sharing between regular `UrlEncode`/`Decode` and the `byte[]`-based methods - Replace magic string usage in `MemberData` with `nameof` - Added comments to the code to separate it into different regions - Added tests to make sure the `ToBytes` methods always return a new array - Added, but commented out regression tests for #6947 (uncomment once that issue is resolved) cc @davidsh @stephentoub @JonHanna 7043 area-Serialization System.Runtime.Serialization.Xml broken "I can't seem to use System.Runtime.Serialization.Xml and NETStandard.Library. (This was really hard to track down.) When combined with NETStandard.Library 1.5.0-rc3-23918 like so: ``` json { ""name"": ""repro"", ""compilationOptions"": { ""emitEntryPoint"": true }, ""frameworks"": { ""netstandardapp1.5"": { ""dependencies"": { ""System.Runtime.Serialization.Xml"": ""4.1.1-rc3-23918"", ""NETStandard.Library"": ""1.5.0-rc3-23918"" } } }, ""runtimes"": { ""ubuntu.14.04-x64"": { }, ""centos.7.1-x64"": { }, ""win7-x64"": { }, ""win10-x64"": { }, ""osx.10.10-x64"": { }, ""osx.10.11-x64"": { } } } ``` A very confusing error about System.Reflection.TypeExtensions occurs: ``` sh $ dotnet restore log : Restoring packages for /home/andrew/src/scratch/project.json... error: System.Reflection.TypeExtensions 4.1.0-rc3-23918 provides a compile-time reference assembly for System.Reflection.TypeExtensions on .NETStandardApp,Version=v1.5, but there is no run$ error: Some packages are not compatible with .NETStandardApp,Version=v1.5 (centos.7.1-x64). error: System.Reflection.TypeExtensions 4.1.0-rc3-23918 provides a compile-time reference assembly for System.Reflection.TypeExtensions on .NETStandardApp,Version=v1.5, but there is no run$ error: Some packages are not compatible with .NETStandardApp,Version=v1.5 (osx.10.10-x64). error: System.Reflection.TypeExtensions 4.1.0-rc3-23918 provides a compile-time reference assembly for System.Reflection.TypeExtensions on .NETStandardApp,Version=v1.5, but there is no run$ error: Some packages are not compatible with .NETStandardApp,Version=v1.5 (osx.10.11-x64). error: System.Reflection.TypeExtensions 4.1.0-rc3-23918 provides a compile-time reference assembly for System.Reflection.TypeExtensions on .NETStandardApp,Version=v1.5, but there is no run$ error: Some packages are not compatible with .NETStandardApp,Version=v1.5 (ubuntu.14.04-x64). error: System.Reflection.TypeExtensions 4.1.0-rc3-23918 provides a compile-time reference assembly for System.Reflection.TypeExtensions on .NETStandardApp,Version=v1.5, but there is no run$ error: Some packages are not compatible with .NETStandardApp,Version=v1.5 (win10-x64). error: System.Reflection.TypeExtensions 4.1.0-rc3-23918 provides a compile-time reference assembly for System.Reflection.TypeExtensions on .NETStandardApp,Version=v1.5, but there is no run$ error: Some packages are not compatible with .NETStandardApp,Version=v1.5 (win7-x64). info : Committing restore... log : /home/andrew/src/scratch/project.json log : Restore failed in 767ms. Errors in /home/andrew/src/scratch/project.json System.Reflection.TypeExtensions 4.1.0-rc3-23918 provides a compile-time reference assembly for System.Reflection.TypeExtensions on .NETStandardApp,Version=v1.5, but there is no run-ti$ Some packages are not compatible with .NETStandardApp,Version=v1.5 (centos.7.1-x64). System.Reflection.TypeExtensions 4.1.0-rc3-23918 provides a compile-time reference assembly for System.Reflection.TypeExtensions on .NETStandardApp,Version=v1.5, but there is no run-ti$ Some packages are not compatible with .NETStandardApp,Version=v1.5 (osx.10.10-x64). System.Reflection.TypeExtensions 4.1.0-rc3-23918 provides a compile-time reference assembly for System.Reflection.TypeExtensions on .NETStandardApp,Version=v1.5, but there is no run-ti$ Some packages are not compatible with .NETStandardApp,Version=v1.5 (osx.10.11-x64). System.Reflection.TypeExtensions 4.1.0-rc3-23918 provides a compile-time reference assembly for System.Reflection.TypeExtensions on .NETStandardApp,Version=v1.5, but there is no run-ti$ Some packages are not compatible with .NETStandardApp,Version=v1.5 (ubuntu.14.04-x64). System.Reflection.TypeExtensions 4.1.0-rc3-23918 provides a compile-time reference assembly for System.Reflection.TypeExtensions on .NETStandardApp,Version=v1.5, but there is no run-ti$ Some packages are not compatible with .NETStandardApp,Version=v1.5 (win10-x64). System.Reflection.TypeExtensions 4.1.0-rc3-23918 provides a compile-time reference assembly for System.Reflection.TypeExtensions on .NETStandardApp,Version=v1.5, but there is no run-ti$ Some packages are not compatible with .NETStandardApp,Version=v1.5 (win7-x64). NuGet Config files used: /home/andrew/src/scratch/nuget.config /home/andrew/.nuget/NuGet/NuGet.Config Feeds used: https://www.myget.org/F/dotnet-core/api/v3/index.json https://dotnet.myget.org/F/cli-deps/api/v3/index.json https://api.nuget.org/v3/index.json /home/andrew/src/scratch/./src/windows-build/nuget-feed ``` " 7047 area-System.Security Cannot build System.Cryptography.(Cng|Csp).Tests projects I can't build projects System.Security.Cryptography.Cng.Tests and System.Security.Cryptography.Csp.Tests in msbuild or VS. In System.Security.Cryptography.Cng.Tests, I get these errors: > TestData.cs(35,32): error CS0246: The type or namespace name 'CngKey' could not be found (are you missing a using directive or an assembly reference?) > TestData.cs(41,32): error CS0246: The type or namespace name 'CngKey' could not be found (are you missing a using directive or an assembly reference?) > TestData.cs(55,32): error CS0246: The type or namespace name 'CngKey' could not be found (are you missing a using directive or an assembly reference?) In System.Security.Cryptography.Csp.Tests, the errors are similar: > RSACryptoServiceProviderTests.cs(275,30): error CS0246: The type or namespace name 'CspParameters' could not be found (are you missing a using directive or an assembly reference?) > RSACryptoServiceProviderTests.cs(277,37): error CS0246: The type or namespace name 'CspParameters' could not be found (are you missing a using directive or an assembly reference?) In both cases, it looks like some issue with referencing the tested project. 7058 area-System.IO FileSystem tests broken with recent Path changes /cc @JeremyKuhne your change https://github.com/dotnet/corefx/commit/b37b8035c1d693f491545a53b701fe7a01df312e has caused a number of failures in the FileSystem tests. I hit these when upgrading the packages and was able to isolate it to System.Runtime.Extensions.dll by patching the assembly back to the old version to fix the errors: ``` System.IO.Tests.DirectoryInfo_Create.PathWithInvalidCharactersAsPath_ThrowsArgumentException [FAIL] Assert.All() Failure: 3 out of 44 items in the collection did not pass. [5]: Xunit.Sdk.ThrowsException: Assert.Throws() Failure Expected: typeof(System.ArgumentException) Actual: typeof(System.IO.DirectoryNotFoundException): Could not find a part of the path '\\?\UNC\LOCALHOST'. at System.IO.Win32FileSystem.CreateDirectory(String fullPath) in E:\corefx\src\System.IO.FileSystem\src\System\IO\Win32FileSystem.cs:line 147 at System.IO.DirectoryInfo.Create() in E:\corefx\src\System.IO.FileSystem\src\System\IO\DirectoryInfo.cs:line 102 at System.IO.Tests.DirectoryInfo_Create.Create(String path) in E:\corefx\src\System.IO.FileSystem\tests\DirectoryInfo\Create.cs:line 16 at System.IO.Tests.Directory_CreateDirectory.<>c__DisplayClass3_0.b__1() in E:\corefx\src\System.IO.FileSystem\tests\Directory\CreateDirectory.cs:line 41 at Xunit.Assert.RecordException(Func`1 testCode) [4]: Xunit.Sdk.ThrowsException: Assert.Throws() Failure Expected: typeof(System.ArgumentException) Actual: typeof(System.IO.DirectoryNotFoundException): Could not find a part of the path '\\?\UNC\'. at System.IO.Win32FileSystem.CreateDirectory(String fullPath) in E:\corefx\src\System.IO.FileSystem\src\System\IO\Win32FileSystem.cs:line 147 at System.IO.DirectoryInfo.Create() in E:\corefx\src\System.IO.FileSystem\src\System\IO\DirectoryInfo.cs:line 102 at System.IO.Tests.DirectoryInfo_Create.Create(String path) in E:\corefx\src\System.IO.FileSystem\tests\DirectoryInfo\Create.cs:line 16 at System.IO.Tests.Directory_CreateDirectory.<>c__DisplayClass3_0.b__1() in E:\corefx\src\System.IO.FileSystem\tests\Directory\CreateDirectory.cs:line 41 at Xunit.Assert.RecordException(Func`1 testCode) [3]: Xunit.Sdk.ThrowsException: Assert.Throws() Failure Expected: typeof(System.ArgumentException) Actual: typeof(System.IO.IOException): The specified path is invalid at System.IO.Win32FileSystem.CreateDirectory(String fullPath) in E:\corefx\src\System.IO.FileSystem\src\System\IO\Win32FileSystem.cs:line 154 at System.IO.DirectoryInfo.Create() in E:\corefx\src\System.IO.FileSystem\src\System\IO\DirectoryInfo.cs:line 102 at System.IO.Tests.DirectoryInfo_Create.Create(String path) in E:\corefx\src\System.IO.FileSystem\tests\DirectoryInfo\Create.cs:line 16 at System.IO.Tests.Directory_CreateDirectory.<>c__DisplayClass3_0.b__1() in E:\corefx\src\System.IO.FileSystem\tests\Directory\CreateDirectory.cs:line 41 at Xunit.Assert.RecordException(Func`1 testCode) Stack Trace: E:\corefx\src\System.IO.FileSystem\tests\Directory\CreateDirectory.cs(39,0): at System.IO.Tests.Directory_CreateDirectory.PathWithInvalidCharactersAsPath_ThrowsArgumentException() System.IO.Tests.FileInfo_MoveTo.PathWithIllegalCharacters [FAIL] Assert.All() Failure: 3 out of 44 items in the collection did not pass. [5]: Xunit.Sdk.ThrowsException: Assert.Throws() Failure Expected: typeof(System.ArgumentException) Actual: typeof(System.IO.IOException): The specified path is invalid at System.IO.Win32FileSystem.MoveFile(String sourceFullPath, String destFullPath) in E:\corefx\src\System.IO.FileSystem\src\System\IO\Win32FileSystem.cs:line 430 at System.IO.FileInfo.MoveTo(String destFileName) in E:\corefx\src\System.IO.FileSystem\src\System\IO\FileInfo.cs:line 284 at System.IO.Tests.FileInfo_MoveTo.Move(String sourceFile, String destFile) in E:\corefx\src\System.IO.FileSystem\tests\FileInfo\MoveTo.cs:line 13 at System.IO.Tests.File_Move.<>c__DisplayClass4_1.b__1() in E:\corefx\src\System.IO.FileSystem\tests\File\Move.cs:line 53 at Xunit.Assert.RecordException(Action testCode) [4]: Xunit.Sdk.ThrowsException: Assert.Throws() Failure Expected: typeof(System.ArgumentException) Actual: typeof(System.IO.IOException): The filename, directory name, or volume label syntax is incorrect at System.IO.Win32FileSystem.MoveFile(String sourceFullPath, String destFullPath) in E:\corefx\src\System.IO.FileSystem\src\System\IO\Win32FileSystem.cs:line 430 at System.IO.FileInfo.MoveTo(String destFileName) in E:\corefx\src\System.IO.FileSystem\src\System\IO\FileInfo.cs:line 284 at System.IO.Tests.FileInfo_MoveTo.Move(String sourceFile, String destFile) in E:\corefx\src\System.IO.FileSystem\tests\FileInfo\MoveTo.cs:line 13 at System.IO.Tests.File_Move.<>c__DisplayClass4_1.b__1() in E:\corefx\src\System.IO.FileSystem\tests\File\Move.cs:line 53 at Xunit.Assert.RecordException(Action testCode) [3]: Xunit.Sdk.ThrowsException: Assert.Throws() Failure Expected: typeof(System.ArgumentException) Actual: typeof(System.IO.IOException): The filename, directory name, or volume label syntax is incorrect at System.IO.Win32FileSystem.MoveFile(String sourceFullPath, String destFullPath) in E:\corefx\src\System.IO.FileSystem\src\System\IO\Win32FileSystem.cs:line 430 at System.IO.FileInfo.MoveTo(String destFileName) in E:\corefx\src\System.IO.FileSystem\src\System\IO\FileInfo.cs:line 284 at System.IO.Tests.FileInfo_MoveTo.Move(String sourceFile, String destFile) in E:\corefx\src\System.IO.FileSystem\tests\FileInfo\MoveTo.cs:line 13 at System.IO.Tests.File_Move.<>c__DisplayClass4_1.b__1() in E:\corefx\src\System.IO.FileSystem\tests\File\Move.cs:line 53 at Xunit.Assert.RecordException(Action testCode) Stack Trace: E:\corefx\src\System.IO.FileSystem\tests\File\Move.cs(51,0): at System.IO.Tests.File_Move.PathWithIllegalCharacters() System.IO.Tests.File_Move.PathWithIllegalCharacters [FAIL] Assert.All() Failure: 3 out of 44 items in the collection did not pass. [5]: Xunit.Sdk.ThrowsException: Assert.Throws() Failure Expected: typeof(System.ArgumentException) Actual: typeof(System.IO.IOException): The specified path is invalid at System.IO.Win32FileSystem.MoveFile(String sourceFullPath, String destFullPath) in E:\corefx\src\System.IO.FileSystem\src\System\IO\Win32FileSystem.cs:line 430 at System.IO.File.Move(String sourceFileName, String destFileName) in E:\corefx\src\System.IO.FileSystem\src\System\IO\File.cs:line 698 at System.IO.Tests.File_Move.Move(String sourceFile, String destFile) in E:\corefx\src\System.IO.FileSystem\tests\File\Move.cs:line 15 at System.IO.Tests.File_Move.<>c__DisplayClass4_1.b__1() in E:\corefx\src\System.IO.FileSystem\tests\File\Move.cs:line 53 at Xunit.Assert.RecordException(Action testCode) [4]: Xunit.Sdk.ThrowsException: Assert.Throws() Failure Expected: typeof(System.ArgumentException) Actual: typeof(System.IO.IOException): The filename, directory name, or volume label syntax is incorrect at System.IO.Win32FileSystem.MoveFile(String sourceFullPath, String destFullPath) in E:\corefx\src\System.IO.FileSystem\src\System\IO\Win32FileSystem.cs:line 430 at System.IO.File.Move(String sourceFileName, String destFileName) in E:\corefx\src\System.IO.FileSystem\src\System\IO\File.cs:line 698 at System.IO.Tests.File_Move.Move(String sourceFile, String destFile) in E:\corefx\src\System.IO.FileSystem\tests\File\Move.cs:line 15 at System.IO.Tests.File_Move.<>c__DisplayClass4_1.b__1() in E:\corefx\src\System.IO.FileSystem\tests\File\Move.cs:line 53 at Xunit.Assert.RecordException(Action testCode) [3]: Xunit.Sdk.ThrowsException: Assert.Throws() Failure Expected: typeof(System.ArgumentException) Actual: typeof(System.IO.IOException): The filename, directory name, or volume label syntax is incorrect at System.IO.Win32FileSystem.MoveFile(String sourceFullPath, String destFullPath) in E:\corefx\src\System.IO.FileSystem\src\System\IO\Win32FileSystem.cs:line 430 at System.IO.File.Move(String sourceFileName, String destFileName) in E:\corefx\src\System.IO.FileSystem\src\System\IO\File.cs:line 698 at System.IO.Tests.File_Move.Move(String sourceFile, String destFile) in E:\corefx\src\System.IO.FileSystem\tests\File\Move.cs:line 15 at System.IO.Tests.File_Move.<>c__DisplayClass4_1.b__1() in E:\corefx\src\System.IO.FileSystem\tests\File\Move.cs:line 53 at Xunit.Assert.RecordException(Action testCode) Stack Trace: E:\corefx\src\System.IO.FileSystem\tests\File\Move.cs(51,0): at System.IO.Tests.File_Move.PathWithIllegalCharacters() System.IO.Tests.Directory_CreateDirectory.PathWithInvalidCharactersAsPath_ThrowsArgumentException [FAIL] Assert.All() Failure: 3 out of 44 items in the collection did not pass. [5]: Xunit.Sdk.ThrowsException: Assert.Throws() Failure Expected: typeof(System.ArgumentException) Actual: typeof(System.IO.DirectoryNotFoundException): Could not find a part of the path '\\?\UNC\LOCALHOST'. at System.IO.Win32FileSystem.CreateDirectory(String fullPath) in E:\corefx\src\System.IO.FileSystem\src\System\IO\Win32FileSystem.cs:line 147 at System.IO.Directory.CreateDirectory(String path) in E:\corefx\src\System.IO.FileSystem\src\System\IO\Directory.cs:line 50 at System.IO.Tests.Directory_CreateDirectory.Create(String path) in E:\corefx\src\System.IO.FileSystem\tests\Directory\CreateDirectory.cs:line 16 at System.IO.Tests.Directory_CreateDirectory.<>c__DisplayClass3_0.b__1() in E:\corefx\src\System.IO.FileSystem\tests\Directory\CreateDirectory.cs:line 41 at Xunit.Assert.RecordException(Func`1 testCode) [4]: Xunit.Sdk.ThrowsException: Assert.Throws() Failure Expected: typeof(System.ArgumentException) Actual: typeof(System.IO.DirectoryNotFoundException): Could not find a part of the path '\\?\UNC\'. at System.IO.Win32FileSystem.CreateDirectory(String fullPath) in E:\corefx\src\System.IO.FileSystem\src\System\IO\Win32FileSystem.cs:line 147 at System.IO.Directory.CreateDirectory(String path) in E:\corefx\src\System.IO.FileSystem\src\System\IO\Directory.cs:line 50 at System.IO.Tests.Directory_CreateDirectory.Create(String path) in E:\corefx\src\System.IO.FileSystem\tests\Directory\CreateDirectory.cs:line 16 at System.IO.Tests.Directory_CreateDirectory.<>c__DisplayClass3_0.b__1() in E:\corefx\src\System.IO.FileSystem\tests\Directory\CreateDirectory.cs:line 41 at Xunit.Assert.RecordException(Func`1 testCode) [3]: Xunit.Sdk.ThrowsException: Assert.Throws() Failure Expected: typeof(System.ArgumentException) Actual: typeof(System.IO.IOException): The specified path is invalid at System.IO.Win32FileSystem.CreateDirectory(String fullPath) in E:\corefx\src\System.IO.FileSystem\src\System\IO\Win32FileSystem.cs:line 154 at System.IO.Directory.CreateDirectory(String path) in E:\corefx\src\System.IO.FileSystem\src\System\IO\Directory.cs:line 50 at System.IO.Tests.Directory_CreateDirectory.Create(String path) in E:\corefx\src\System.IO.FileSystem\tests\Directory\CreateDirectory.cs:line 16 at System.IO.Tests.Directory_CreateDirectory.<>c__DisplayClass3_0.b__1() in E:\corefx\src\System.IO.FileSystem\tests\Directory\CreateDirectory.cs:line 41 at Xunit.Assert.RecordException(Func`1 testCode) Stack Trace: E:\corefx\src\System.IO.FileSystem\tests\Directory\CreateDirectory.cs(39,0): at System.IO.Tests.Directory_CreateDirectory.PathWithInvalidCharactersAsPath_ThrowsArgumentException() ``` 7060 area-System.Net Implement several certificate properties on CurlHandler Adds implementations to CurlHandler for: - ClientCertificates - ServerCertificateValidationCallback - CheckCertificateRevocationList I've explicitly not added these to the contract, as we're not ready for that yet on other platforms, and I've not added tests (though I've done some testing manually, such as verifying that I could run tweaked versions of the WinHttp server callback tests against this successfully). This is about being able to easy expose them in the contract for HttpClientHandler, hopefully in the near future. cc: @bartonjs, @ericeil, @davidsh, @SidharthNabar, @joshfree, @kapilash Related to https://github.com/dotnet/corefx/issues/4476, https://github.com/dotnet/corefx/issues/4120, and https://github.com/dotnet/corefx/issues/4479 7061 area-Infrastructure LoadInDefaultContext failing in CI on Windows outerloop http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_win10_debug/128/consoleFull ``` 12:24:22 System.Runtime.Loader.Tests.DefaultLoadContextTests.LoadInDefaultContext [FAIL] 12:24:22 System.IO.FileNotFoundException : Could not load file or assembly 'System.Runtime.Loader.Noop.Assembly, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. 12:24:22 Stack Trace: 12:24:22 at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 12:24:22 at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 12:24:22 at System.Reflection.Assembly.Load(AssemblyName assemblyRef) 12:24:22 d:\j\workspace\outerloop_win---0cba2915\src\System.Runtime.Loader\tests\DefaultContext\DefaultLoadContextTest.cs(73,0): at System.Runtime.Loader.Tests.DefaultLoadContextTests.LoadInDefaultContext() 12:24:22 Finished: System.Runtime.Loader.DefaultContext.Tests 12:24:22 12:24:22 === TEST EXECUTION SUMMARY === 12:24:22 System.Runtime.Loader.DefaultContext.Tests Total: 2, Errors: 0, Failed: 1, Skipped: 0, Time: 0.439s ``` 7062 area-Infrastructure Package restore failures in outerloop on Ubuntu "http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_ubuntu14.04_debug/38/consoleFull ``` 11:03:57 [18:04:10.16] Restoring all packages... 11:04:39 EXEC : error : System.Threading.Overlapped 4.0.1-rc3-23918 provides a compile-time reference assembly for System.Threading.Overlapped on DNXCore,Version=v5.0, but there is no run-time assembly compatible with ubuntu.14.04-x64. [/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/build.proj] 11:04:39 EXEC : error : Some packages are not compatible with DNXCore,Version=v5.0 (ubuntu.14.04-x64). [/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/build.proj] 11:04:48 EXEC : error : System.Runtime.Extensions 4.0.0 provides a compile-time reference assembly for System.Runtime.Extensions on .NETCore,Version=v5.0, but there is no run-time assembly compatible with ubuntu.14.04-x64. [/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/build.proj] 11:04:48 EXEC : error : Some packages are not compatible with .NETCore,Version=v5.0 (ubuntu.14.04-x64). [/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/build.proj] 11:05:01 EXEC : error : System.Runtime.Extensions 4.0.0 provides a compile-time reference assembly for System.Runtime.Extensions on .NETCore,Version=v5.0, but there is no run-time assembly compatible with ubuntu.14.04-x64. [/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/build.proj] 11:05:01 EXEC : error : Some packages are not compatible with .NETCore,Version=v5.0 (ubuntu.14.04-x64). [/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/build.proj] 11:05:38 /mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/build.proj(60,5): error MSB3073: The command """"/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/Tools/dotnetcli/bin/dotnet"" restore --packages ""/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/packages"" --source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json --source https://www.nuget.org/api/v2/ ""/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/src"" ""/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/pkg"""" exited with code -1. 11:05:38 [18:05:51.34] Restoring all packages...Done. ``` " 7063 area-System.Net NegotiateStream_EchoServer_ClientWriteRead_Successive_Async_Success failed in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_rhel7.2_debug_tst/19/consoleFull ``` 11:42:15 System.Net.Security.Tests.KerberosTest.NegotiateStream_EchoServer_ClientWriteRead_Successive_Async_Success [FAIL] 11:42:15 The second message received is as expected 11:42:15 Expected: True 11:42:15 Actual: False 11:42:15 Stack Trace: 11:42:15 at System.Net.Security.Tests.KerberosTest.NegotiateStream_EchoServer_ClientWriteRead_Successive_Async_Success() 11:42:19 Finished: System.Net.Security.Tests 11:42:19 11:42:19 === TEST EXECUTION SUMMARY === 11:42:19 System.Net.Security.Tests Total: 106, Errors: 0, Failed: 1, Skipped: 0, Time: 9.625s ``` 7064 area-System.Net Ping tests failing in outerloop on Unix In several outer loop runs, e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_rhel7.2_release_tst/19/console many of the ping tests are failing with errors like: ``` 11:53:26 System.Net.NetworkInformation.Tests.PingTest.SendPingAsyncWithIPAddressAndTimeoutAndBufferAndPingOptions_Unix [FAIL] 11:53:26 System.Net.Sockets.SocketException : Invalid argument 11:53:26 Stack Trace: 11:53:26 at System.Net.Sockets.Socket..ctor(AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType) 11:53:26 at System.Net.NetworkInformation.Ping.d__34.MoveNext() 11:53:26 --- End of stack trace from previous location where exception was thrown --- 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 11:53:26 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() 11:53:26 at System.Net.NetworkInformation.Ping.d__33.MoveNext() 11:53:26 --- End of stack trace from previous location where exception was thrown --- 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() 11:53:26 at System.Net.NetworkInformation.Tests.PingTest.d__21.MoveNext() 11:53:26 --- End of stack trace from previous location where exception was thrown --- 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() 11:53:26 at System.Net.NetworkInformation.Tests.PingTest.d__8.MoveNext() 11:53:26 --- End of stack trace from previous location where exception was thrown --- 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 11:53:26 --- End of stack trace from previous location where exception was thrown --- 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 11:53:26 --- End of stack trace from previous location where exception was thrown --- 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 11:53:26 System.Net.NetworkInformation.Tests.PingTest.Ping_DisposeAfterSend_Success [FAIL] 11:53:26 System.Diagnostics.Debug+DebugAssertException : Invalid status: 0 11:53:26 11:53:26 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) 11:53:26 at System.Environment.get_StackTrace() 11:53:26 at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) 11:53:26 at System.Net.NetworkInformation.Ping.Finish() 11:53:26 at System.Net.NetworkInformation.Ping.d__25.MoveNext() 11:53:26 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 11:53:26 at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() 11:53:26 at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, Boolean allowInlining, Task& currentTask) 11:53:26 at System.Threading.Tasks.Task.FinishContinuations() 11:53:26 at System.Threading.Tasks.Task`1.TrySetResult(TResult result) 11:53:26 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 11:53:26 at System.Net.LazyAsyncResult.Complete(IntPtr userToken) 11:53:26 at System.Net.ContextAwareResult.CompleteCallback() 11:53:26 at System.Net.ContextAwareResult.<>c.b__17_0(Object s) 11:53:26 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 11:53:26 at System.Net.ContextAwareResult.Complete(IntPtr userToken) 11:53:26 at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken) 11:53:26 at System.Net.LazyAsyncResult.InvokeCallback(Object result) 11:53:26 at System.Net.Dns.ResolveCallback(Object context) 11:53:26 at System.Net.Dns.<>c.b__6_0(Object s) 11:53:26 at System.Threading.Tasks.Task.Execute() 11:53:26 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 11:53:26 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) 11:53:26 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) 11:53:26 at System.Threading.ThreadPoolWorkQueue.Dispatch() 11:53:26 Stack Trace: 11:53:26 at System.Diagnostics.Debug.UnixDebugLogger.ShowAssertDialog(String stackTrace, String message, String detailMessage) 11:53:26 at System.Net.NetworkInformation.Ping.Finish() 11:53:26 at System.Net.NetworkInformation.Ping.d__25.MoveNext() 11:53:26 --- End of stack trace from previous location where exception was thrown --- 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() 11:53:26 at System.Net.NetworkInformation.Tests.PingTest.d__16.MoveNext() 11:53:26 --- End of stack trace from previous location where exception was thrown --- 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 11:53:26 --- End of stack trace from previous location where exception was thrown --- 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 11:53:26 --- End of stack trace from previous location where exception was thrown --- 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 11:53:26 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` 7072 area-System.Collections Add performance tests for all collections I see performance tests for only List and SortedDictionary at the moment in the System.Collections solution.. Given that the collections are probably one of the most exercised body of code in the entire .Net Framework I expect that it be treated as a performance critical body of code and therefore have a complete suite of performance tests. 7077 area-System.IO Remove work around from pipes tests Once we upgrade packages we can remove the workaround from https://github.com/dotnet/corefx/pull/7074 7079 area-Infrastructure Dependency conflict warning from buildtools on clean build ``` corefx>git clean -xdf corefx>build.cmd Installing dotnet cli... Restoring BuildTools version 1.0.25-prerelease-00208... Initializing BuildTools ... c:\Users\stoub\Source\repos\corefx\packages\Microsoft.DotNet.BuildTools\1.0.25-prerelease-00208\lib\tool-runtime\project.json(37,37): warning NU1012: Dependency conflict. Microsoft.Build 0.1.0-preview-00017 expected System.Diagnostics.Contracts >= 4.0.1-rc2-23712 but got 4.0.0 c:\Users\stoub\Source\repos\corefx\packages\Microsoft.DotNet.BuildTools\1.0.25-prerelease-00208\lib\tool-runtime\project.json(37,37): warning NU1012: Dependency conflict. Microsoft.NETCore.Console 1.0.0-rc2-23907 expected System.Diagnostics.Contracts >= 4.0.1-rc2-23907 but got 4.0.0 ``` cc: @weshaggard, @ericstj 7080 area-Infrastructure Lots of packaging build warnings on clean build Clean build on Windows produces the following warnings: ``` c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.rhel.7-x64.runtime.native.System.IO.Compression.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\System.IO.C ompression.Native.so [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.IO.Compression\rhel\runtime.native.System.IO.Compression.pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.debian.8-x64.runtime.native.System.IO.Compression.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\System.IO .Compression.Native.so [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.IO.Compression\debian\runtime.native.System.IO.Compression.pkgp roj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.ubuntu.14.04-x64.runtime.native.System.IO.Compression.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\Syste m.IO.Compression.Native.so [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.IO.Compression\ubuntu\runtime.native.System.IO.Compression. pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.osx.10.10-x64.runtime.native.System.IO.Compression.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\System.I O.Compression.Native.dylib [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.IO.Compression\osx\runtime.native.System.IO.Compression.pkg proj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.win7-x86.runtime.native.System.IO.Compression.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\\clrcompressi on.dll [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.IO.Compression\win7\runtime.native.System.IO.Compression.pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.win7-x64.runtime.native.System.IO.Compression.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\\clrcompressi on.dll [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.IO.Compression\win7\runtime.native.System.IO.Compression.pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.win7-arm.runtime.native.System.IO.Compression.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\\clrcompressi on.dll [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.IO.Compression\win7\runtime.native.System.IO.Compression.pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.win10-x86.runtime.native.System.IO.Compression.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\..\..\NetCor eForCoreCLR\native\clrcompression.dll [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.IO.Compression\win10\runtime.native.System.IO.Co mpression.pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.win10-x64.runtime.native.System.IO.Compression.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\..\..\NetCor eForCoreCLR\native\clrcompression.dll [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.IO.Compression\win10\runtime.native.System.IO.Co mpression.pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.win10-arm.runtime.native.System.IO.Compression.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\..\..\NetCor eForCoreCLR\native\clrcompression.dll [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.IO.Compression\win10\runtime.native.System.IO.Co mpression.pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.rhel.7-x64.runtime.native.System.Net.Http.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\System.Net.Http.N ative.so [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.Net.Http\rhel\runtime.native.System.Net.Http.pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.debian.8-x64.runtime.native.System.Net.Http.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\System.Net.Http .Native.so [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.Net.Http\debian\runtime.native.System.Net.Http.pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.ubuntu.14.04-x64.runtime.native.System.Net.Http.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\System.Net. Http.Native.so [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.Net.Http\ubuntu\runtime.native.System.Net.Http.pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.osx.10.10-x64.runtime.native.System.Net.Http.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\System.Net.Htt p.Native.dylib [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.Net.Http\osx\runtime.native.System.Net.Http.pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.rhel.7-x64.runtime.native.System.Net.Security.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\\System.Net.S ecurity.Native.so [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.Net.Security\rhel\runtime.native.System.Net.Security.pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.win7-x64.runtime.native.System.Data.SqlClient.sni.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\sni.dll [ c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.Data.SqlClient.sni\win\runtime.native.System.Data.SqlClient.sni.pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.debian.8-x64.runtime.native.System.Net.Security.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\\System.Net .Security.Native.so [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.Net.Security\debian\runtime.native.System.Net.Security.pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.ubuntu.14.04-x64.runtime.native.System.Net.Security.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\\System .Net.Security.Native.so [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.Net.Security\ubuntu\runtime.native.System.Net.Security.pkgproj ] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.osx.10.10-x64.runtime.native.System.Net.Security.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\\System.Ne t.Security.Native.dylib [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.Net.Security\osx\runtime.native.System.Net.Security.pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.rhel.7-x64.runtime.native.System.Security.Cryptography.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\Syst em.Security.Cryptography.Native.so [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.Security.Cryptography\rhel\runtime.native.System.Se curity.Cryptography.pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.debian.8-x64.runtime.native.System.Security.Cryptography.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\Sy stem.Security.Cryptography.Native.so [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.Security.Cryptography\debian\runtime.native.Syste m.Security.Cryptography.pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/nativ e\System.Security.Cryptography.Native.so [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.Security.Cryptography\ubuntu\runtime.native.S ystem.Security.Cryptography.pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.osx.10.10-x64.runtime.native.System.Security.Cryptography.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\S ystem.Security.Cryptography.Native.dylib [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System.Security.Cryptography\osx\runtime.native.Syst em.Security.Cryptography.pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.rhel.7-x64.runtime.native.System.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\System.Native.so;c:\Users\ stoub\Source\repos\corefx\bin/native\System.Native.a [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System\rhel\runtime.native.System.pkgpro j] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.ubuntu.14.04-x64.runtime.native.System.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\System.Native.so;c:\ Users\stoub\Source\repos\corefx\bin/native\System.Native.a [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System\ubuntu\runtime.native.Syste m.pkgproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.debian.8-x64.runtime.native.System.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\System.Native.so;c:\User s\stoub\Source\repos\corefx\bin/native\System.Native.a [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System\debian\runtime.native.System.pk gproj] c:\Users\stoub\Source\repos\corefx\Tools\Packaging.targets(893,5): warning : Skipping package creation for c:\Users\stoub\Source\repos\corefx\bin/pkg/specs/run time.osx.10.10-x64.runtime.native.System.nuspec because the following files do not exist: c:\Users\stoub\Source\repos\corefx\bin/native\System.Native.dylib;c:\ Users\stoub\Source\repos\corefx\bin/native\System.Native.a [c:\Users\stoub\Source\repos\corefx\src\Native\pkg\runtime.native.System\osx\runtime.native.System.p kgproj] ``` cc: @chcosta, @ericstj, @weshaggard 7081 area-Infrastructure Outerloop Unix runs using stale native shims Outerloop runs are currently failing on Unix with hundreds of failures due to System.Native.so missing some entrypoints that were added at the same time consumers of those entrypoints were added to the managed assemblies, e.g. System.IO.Pipes.dll consuming SystemNative_GetDomainSocketSizes. 7082 area-System.Console WindowAndCursorProps.Title test fails on Win7 ``` 14:19:45 WindowAndCursorProps.Title [FAIL] 14:19:45 Assert+WrapperXunitException : File path: d:\j\workspace\outerloop_win---9c9e7d59\src\System.Console\tests\WindowAndCursorProps.cs. Line: 121 14:19:45 ---- Assert.Equal() Failure 14:19:45  (pos 511) 14:19:45 Expected: úúúaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaúúú 14:19:45 Actual: úúúaaaaaaaaaaaaaaaaaaaa 14:19:45  (pos 511) 14:19:45 Stack Trace: 14:19:45 at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber) 14:19:45 at Assert.Equal(String expected, String actual, String path, Int32 line) 14:19:45 at WindowAndCursorProps.Title() 14:19:45 ----- Inner Stack Trace ----- 14:19:45 at Assert.Equal(String expected, String actual, String path, Int32 line) ``` 7083 area-System.Diagnostics ProcessTests.TestSessionId fails on Win 7 ``` 14:19:57 System.Diagnostics.Tests.ProcessTests.TestSessionId [FAIL] 14:19:57 System.EntryPointNotFoundException : Unable to find an entry point named 'ProcessIdToSessionId' in DLL 'api-ms-win-core-processthreads-l1-1-2.dll'. 14:19:57 Stack Trace: 14:19:57 at System.Diagnostics.Tests.Interop.ProcessIdToSessionId(UInt32 dwProcessId, UInt32& pSessionId) 14:19:57 at System.Diagnostics.Tests.ProcessTests.TestSessionId() ``` 7084 area-System.Globalization 11 globalization tests failing on Win 7 "``` 14:20:11 Starting: System.Globalization.Tests 14:20:12 System.Globalization.Tests.DateTimeFormatInfoCalendarWeekRule.CalendarWeekRuleTest(format: DateTimeFormatInfo { AbbreviatedDayNames = [""Sul"", ""Lun"", ""Meu."", ""Mer."", ""Yaou"", ...], AbbreviatedMonthGenitiveNames = [""Gen."", ""C'hwe."", ""Meur."", ""Ebr."", ""Mae"", ...], AbbreviatedMonthNames = [""Gen."", ""C'hwe."", ""Meur."", ""Ebr."", ""Mae"", ...], AMDesignator = """", Calendar = GregorianCalendar { AlgorithmType = SolarCalendar, CalendarType = Localized, Eras = [...], IsReadOnly = False, MaxSupportedDateTime = 9999-12-31T23:59:59.9999999, ... }, ... }, expected: FirstFullWeek) [FAIL] 14:20:13 Assert.Equal() Failure 14:20:13 Expected: FirstFullWeek 14:20:13 Actual: FirstDay 14:20:13 Stack Trace: 14:20:13 at System.Globalization.Tests.DateTimeFormatInfoCalendarWeekRule.CalendarWeekRuleTest(DateTimeFormatInfo format, CalendarWeekRule expected) 14:20:13 TextInfoTests.ToUpper(localeName: """") [FAIL] 14:20:14 System.Globalization.Extensions.Tests -> d:\j\workspace\outerloop_win---9c9e7d59\bin\Windows_NT.AnyCPU.Debug\System.Globalization.Extensions.Tests\System.Globalization.Extensions.Tests.dll 14:20:14 Assert.Equal() Failure 14:20:14  (pos 1) 14:20:14 Expected: ?? 14:20:14 Actual: ?? 14:20:14  (pos 1) 14:20:14 Stack Trace: 14:20:14 at TextInfoTests.ToUpper(String localeName) 14:20:14 TextInfoTests.ToUpper(localeName: ""en-US"") [FAIL] 14:20:14 Assert.Equal() Failure 14:20:14  (pos 1) 14:20:14 Expected: ?? 14:20:14 Actual: ?? 14:20:14  (pos 1) 14:20:14 Stack Trace: 14:20:14 at TextInfoTests.ToUpper(String localeName) 14:20:14 TextInfoTests.ToUpper(localeName: ""fr"") [FAIL] 14:20:14 Assert.Equal() Failure 14:20:14  (pos 1) 14:20:14 Expected: ?? 14:20:14 Actual: ?? 14:20:14  (pos 1) 14:20:14 Stack Trace: 14:20:14 at TextInfoTests.ToUpper(String localeName) 14:20:14 TextInfoTests.ToLower(localeName: """") [FAIL] 14:20:14 Assert.Equal() Failure 14:20:14  (pos 1) 14:20:14 Expected: ?? 14:20:14 Actual: ?? 14:20:14  (pos 1) 14:20:14 Stack Trace: 14:20:14 at TextInfoTests.ToLower(String localeName) 14:20:14 TextInfoTests.ToLower(localeName: ""en-US"") [FAIL] 14:20:14 Assert.Equal() Failure 14:20:14  (pos 1) 14:20:14 Expected: ?? 14:20:14 Actual: ?? 14:20:14  (pos 1) 14:20:14 Stack Trace: 14:20:14 at TextInfoTests.ToLower(String localeName) 14:20:14 TextInfoTests.ToLower(localeName: ""fr"") [FAIL] 14:20:14 Assert.Equal() Failure 14:20:14  (pos 1) 14:20:14 Expected: ?? 14:20:14 Actual: ?? 14:20:14  (pos 1) 14:20:14 Stack Trace: 14:20:14 at TextInfoTests.ToLower(String localeName) 14:20:14 System.Globalization.Tests.NumberFormatInfoCurrencyGroupSizes.TestCurrencyGroupSizesLocale(locale: ""ur-IN"", primaryGroupSize: 3, secondaryGroupSize: 2) [FAIL] 14:20:14 System.Globalization.CultureNotFoundException : Culture is not supported. 14:20:14 Parameter name: name 14:20:14 ur-IN is an invalid culture identifier. 14:20:14 Stack Trace: 14:20:14 at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride) 14:20:14 at System.Globalization.Tests.NumberFormatInfoCurrencyGroupSizes.TestCurrencyGroupSizesLocale(String locale, Int32 primaryGroupSize, Int32 secondaryGroupSize) 14:20:14 System.Globalization.Tests.NumberFormatInfoNumberGroupSizes.TestNumberGroupSizesLocale(locale: ""ur-IN"") [FAIL] 14:20:14 System.Globalization.CultureNotFoundException : Culture is not supported. 14:20:14 Parameter name: name 14:20:14 ur-IN is an invalid culture identifier. 14:20:14 Stack Trace: 14:20:14 at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride) 14:20:14 at System.Globalization.Tests.NumberFormatInfoNumberGroupSizes.TestNumberGroupSizesLocale(String locale) 14:20:14 System.Globalization.Tests.NumberFormatInfoCurrencyNegativePattern.TestCurrencyNegativePatternLocale(locale: ""fr-CD"") [FAIL] 14:20:14 System.Globalization.CultureNotFoundException : Culture is not supported. 14:20:14 Parameter name: name 14:20:14 fr-CD is an invalid culture identifier. 14:20:14 Stack Trace: 14:20:14 at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride) 14:20:14 at System.Globalization.Tests.NumberFormatInfoCurrencyNegativePattern.TestCurrencyNegativePatternLocale(String locale) 14:20:14 CompareInfoTests.Compare(localeName: """", left: ""ABCDE"", right: ""aBCDE"", expected: -1, options: None) [FAIL] 14:20:14 Assert.Equal() Failure 14:20:14 Expected: -1 14:20:14 Actual: 1 14:20:14 Stack Trace: 14:20:14 at CompareInfoTests.Compare(String localeName, String left, String right, Int32 expected, CompareOptions options) 14:20:14 Finished: System.Globalization.Tests 14:20:14 14:20:14 === TEST EXECUTION SUMMARY === 14:20:14 System.Globalization.Tests Total: 5520, Errors: 0, Failed: 11, Skipped: 0, Time: 2.953s ``` " 7085 area-System.Net GetAsync_ResponseHeadersRead_ReadFromEachIterativelyDoesntDeadlock HTTP test failed on Win 7 http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_win7_debug/127/consoleFull ``` 14:23:38 System.Net.Http.Functional.Tests.HttpClientHandlerTest.GetAsync_ResponseHeadersRead_ReadFromEachIterativelyDoesntDeadlock [FAIL] 14:23:38 System.Net.Http.HttpRequestException : An error occurred while sending the request. 14:23:38 ---- System.Net.Http.WinHttpException : The supplied handle is the wrong type for the requested operation 14:23:38 Stack Trace: 14:23:38 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:23:38 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:23:38 at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() 14:23:38 at System.Net.Http.Functional.Tests.HttpClientHandlerTest.d__41.MoveNext() 14:23:38 --- End of stack trace from previous location where exception was thrown --- 14:23:38 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:23:38 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:23:38 --- End of stack trace from previous location where exception was thrown --- 14:23:38 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:23:38 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:23:38 --- End of stack trace from previous location where exception was thrown --- 14:23:38 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:23:38 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:23:38 ----- Inner Stack Trace ----- 14:23:38 at System.Net.Http.WinHttpException.ThrowExceptionUsingLastError() 14:23:38 at System.Net.Http.WinHttpHandler.SetWinHttpOption(SafeWinHttpHandle handle, UInt32 option, UInt32& optionData) 14:23:38 at System.Net.Http.WinHttpHandler.SetSessionHandleConnectionOptions() 14:23:38 at System.Net.Http.WinHttpHandler.SetSessionHandleOptions() 14:23:38 at System.Net.Http.WinHttpHandler.d__102.MoveNext() ``` 7086 area-System.Security CNG tests failing on Win 7 Lots of failures, and then it looks like they hang until killed by Jenkins. ``` Discovering: System.Security.Cryptography.Cng.Tests Discovered: System.Security.Cryptography.Cng.Tests Starting: System.Security.Cryptography.Cng.Tests System.Security.Cryptography.Encryption.Aes.Tests.AesModeTests.SupportsECB [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor() at System.Security.Cryptography.Encryption.Aes.Tests.AesModeTests.SupportsMode(CipherMode mode) System.Security.Cryptography.Encryption.Aes.Tests.AesModeTests.SupportsCBC [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor() at System.Security.Cryptography.Encryption.Aes.Tests.AesModeTests.SupportsMode(CipherMode mode) System.Security.Cryptography.Encryption.Aes.Tests.DecryptorReusabilty.TestDecryptorReusability [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateDecryptor() at System.Security.Cryptography.Encryption.Aes.Tests.DecryptorReusabilty.TestDecryptorReusability() System.Security.Cryptography.Encryption.TripleDes.Tests.TripleDESReusabilityTests.TripleDESReuseEncryptorDecryptor [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.TripleDESCng.CreateEncryptor() at System.Security.Cryptography.Encryption.TripleDes.Tests.TripleDESReusabilityTests.TripleDESReuseEncryptorDecryptor() System.Security.Cryptography.Encryption.Aes.Tests.AesContractTests.ValidateEncryptorProperties [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor() at System.Security.Cryptography.Encryption.Aes.Tests.AesContractTests.ValidateEncryptorProperties() System.Security.Cryptography.Encryption.Aes.Tests.AesContractTests.CreateTransformExceptions [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor(Byte[] rgbKey, Byte[] rgbIV) at System.Security.Cryptography.Encryption.Aes.Tests.AesContractTests.CreateTransformExceptions() System.Security.Cryptography.Encryption.Aes.Tests.AesContractTests.ValidateOffsetAndCount [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor() at System.Security.Cryptography.Encryption.Aes.Tests.AesContractTests.ValidateOffsetAndCount() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.StableEncryptDecrypt [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor() at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.StableEncryptDecrypt() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.RandomKeyRoundtrip_128 [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor() at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.RandomKeyRoundtrip(Aes aes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.RandomKeyRoundtrip_128() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_CBC128_NoPadding_3 [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor(Byte[] rgbKey, Byte[] rgbIV) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.AesEncryptDirectKey(Aes aes, Byte[] key, Byte[] iv, Byte[] plainBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.TestAesTransformDirectKey(CipherMode cipherMode, PaddingMode paddingMode, Byte[] key, Byte[] iv, Byte[] plainBytes, Byte[] cipherBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_CBC128_NoPadding_3() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_ECB192_NoPadding [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor(Byte[] rgbKey, Byte[] rgbIV) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.AesEncryptDirectKey(Aes aes, Byte[] key, Byte[] iv, Byte[] plainBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.TestAesTransformDirectKey(CipherMode cipherMode, PaddingMode paddingMode, Byte[] key, Byte[] iv, Byte[] plainBytes, Byte[] cipherBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_ECB192_NoPadding() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_CBC128_NoPadding_2 [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor(Byte[] rgbKey, Byte[] rgbIV) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.AesEncryptDirectKey(Aes aes, Byte[] key, Byte[] iv, Byte[] plainBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.TestAesTransformDirectKey(CipherMode cipherMode, PaddingMode paddingMode, Byte[] key, Byte[] iv, Byte[] plainBytes, Byte[] cipherBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_CBC128_NoPadding_2() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.DecryptKnownCBC256 [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateDecryptor() at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.TestAesDecrypt(CipherMode mode, Byte[] key, Byte[] iv, Byte[] encryptedBytes, Byte[] expectedAnswer) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.DecryptKnownCBC256() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.AesZeroPad [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor() at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.AesZeroPad() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_ECB128_NoPadding [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor(Byte[] rgbKey, Byte[] rgbIV) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.AesEncryptDirectKey(Aes aes, Byte[] key, Byte[] iv, Byte[] plainBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.TestAesTransformDirectKey(CipherMode cipherMode, PaddingMode paddingMode, Byte[] key, Byte[] iv, Byte[] plainBytes, Byte[] cipherBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_ECB128_NoPadding() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_ECB192_NoPadding_2 [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor(Byte[] rgbKey, Byte[] rgbIV) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.AesEncryptDirectKey(Aes aes, Byte[] key, Byte[] iv, Byte[] plainBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.TestAesTransformDirectKey(CipherMode cipherMode, PaddingMode paddingMode, Byte[] key, Byte[] iv, Byte[] plainBytes, Byte[] cipherBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_ECB192_NoPadding_2() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyInPlaceEncryption [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor() at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyInPlaceEncryption() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.RandomKeyRoundtrip_192 [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor() at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.RandomKeyRoundtrip(Aes aes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.RandomKeyRoundtrip_192() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_CBC256_NoPadding [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor(Byte[] rgbKey, Byte[] rgbIV) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.AesEncryptDirectKey(Aes aes, Byte[] key, Byte[] iv, Byte[] plainBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.TestAesTransformDirectKey(CipherMode cipherMode, PaddingMode paddingMode, Byte[] key, Byte[] iv, Byte[] plainBytes, Byte[] cipherBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_CBC256_NoPadding() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.WrongKeyFailDecrypt_2 [FAIL] Assert.Throws() Failure Expected: typeof(System.Security.Cryptography.CryptographicException) Actual: typeof(Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException): The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateDecryptor() at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.<>c__DisplayClass28_1.b__0() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_ECB128_NoPadding_2 [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor(Byte[] rgbKey, Byte[] rgbIV) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.AesEncryptDirectKey(Aes aes, Byte[] key, Byte[] iv, Byte[] plainBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.TestAesTransformDirectKey(CipherMode cipherMode, PaddingMode paddingMode, Byte[] key, Byte[] iv, Byte[] plainBytes, Byte[] cipherBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_ECB128_NoPadding_2() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_ECB128_NoPadding_3 [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor(Byte[] rgbKey, Byte[] rgbIV) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.AesEncryptDirectKey(Aes aes, Byte[] key, Byte[] iv, Byte[] plainBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.TestAesTransformDirectKey(CipherMode cipherMode, PaddingMode paddingMode, Byte[] key, Byte[] iv, Byte[] plainBytes, Byte[] cipherBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_ECB128_NoPadding_3() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_CBC192_NoPadding_2 [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor(Byte[] rgbKey, Byte[] rgbIV) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.AesEncryptDirectKey(Aes aes, Byte[] key, Byte[] iv, Byte[] plainBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.TestAesTransformDirectKey(CipherMode cipherMode, PaddingMode paddingMode, Byte[] key, Byte[] iv, Byte[] plainBytes, Byte[] cipherBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_CBC192_NoPadding_2() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.WrongKeyFailDecrypt [FAIL] Assert.Throws() Failure Expected: typeof(System.Security.Cryptography.CryptographicException) Actual: typeof(Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException): The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateDecryptor() at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.<>c__DisplayClass27_1.b__0() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.RandomKeyRoundtrip_256 [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor() at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.RandomKeyRoundtrip(Aes aes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.RandomKeyRoundtrip_256() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_CBC192_NoPadding [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor(Byte[] rgbKey, Byte[] rgbIV) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.AesEncryptDirectKey(Aes aes, Byte[] key, Byte[] iv, Byte[] plainBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.TestAesTransformDirectKey(CipherMode cipherMode, PaddingMode paddingMode, Byte[] key, Byte[] iv, Byte[] plainBytes, Byte[] cipherBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_CBC192_NoPadding() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_ECB256_NoPadding [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor(Byte[] rgbKey, Byte[] rgbIV) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.AesEncryptDirectKey(Aes aes, Byte[] key, Byte[] iv, Byte[] plainBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.TestAesTransformDirectKey(CipherMode cipherMode, PaddingMode paddingMode, Byte[] key, Byte[] iv, Byte[] plainBytes, Byte[] cipherBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_ECB256_NoPadding() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.DecryptKnownECB192 [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateDecryptor() at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.TestAesDecrypt(CipherMode mode, Byte[] key, Byte[] iv, Byte[] encryptedBytes, Byte[] expectedAnswer) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.DecryptKnownECB192() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.RandomKeyRoundtrip_Default [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor() at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.RandomKeyRoundtrip(Aes aes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.RandomKeyRoundtrip_Default() System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_CBC128_NoPadding [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateEncryptor(Byte[] rgbKey, Byte[] rgbIV) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.AesEncryptDirectKey(Aes aes, Byte[] key, Byte[] iv, Byte[] plainBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.TestAesTransformDirectKey(CipherMode cipherMode, PaddingMode paddingMode, Byte[] key, Byte[] iv, Byte[] plainBytes, Byte[] cipherBytes) at System.Security.Cryptography.Encryption.Aes.Tests.AesCipherTests.VerifyKnownTransform_CBC128_NoPadding() System.Security.Cryptography.Encryption.Aes.Tests.AesContractTests.ValidateDecryptorProperties [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.AesCng.CreateDecryptor() at System.Security.Cryptography.Encryption.Aes.Tests.AesContractTests.ValidateDecryptorProperties() System.Security.Cryptography.Cng.Tests.RsaCngTests.RSACng_Ctor_UnusualKeysize_384 [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at System.Security.Cryptography.Cng.Tests.RsaCngTests.RSACng_Ctor_UnusualKeysize(Int32 expectedKeySize, Byte[] keyBlob, RSAParameters expectedParameters) at System.Security.Cryptography.Cng.Tests.RsaCngTests.RSACng_Ctor_UnusualKeysize_384() System.Security.Cryptography.Encryption.TripleDes.Tests.TripleDESCipherTests.TripleDESRoundTrip192BitsPKCS7CBC [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.TripleDESCng.CreateEncryptor() at Test.Cryptography.CryptoUtils.Encrypt(SymmetricAlgorithm alg, Byte[] plainText, Int32 blockSizeMultipler) at System.Security.Cryptography.Encryption.TripleDes.Tests.TripleDESCipherTests.TripleDESRoundTrip192BitsPKCS7CBC() System.Security.Cryptography.Encryption.TripleDes.Tests.TripleDESCipherTests.TripleDESRoundTrip192BitsNoneCBC [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.TripleDESCng.CreateEncryptor() at Test.Cryptography.CryptoUtils.Encrypt(SymmetricAlgorithm alg, Byte[] plainText, Int32 blockSizeMultipler) at System.Security.Cryptography.Encryption.TripleDes.Tests.TripleDESCipherTests.TripleDESRoundTrip192BitsNoneCBC() System.Security.Cryptography.Encryption.TripleDes.Tests.TripleDESCipherTests.TripleDESRoundTrip192BitsZerosCBC [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.TripleDESCng.CreateEncryptor() at Test.Cryptography.CryptoUtils.Encrypt(SymmetricAlgorithm alg, Byte[] plainText, Int32 blockSizeMultipler) at System.Security.Cryptography.Encryption.TripleDes.Tests.TripleDESCipherTests.TripleDESRoundTrip192BitsZerosCBC() System.Security.Cryptography.Encryption.TripleDes.Tests.TripleDESCipherTests.TripleDESRoundTrip192BitsPKCS7ECB [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.TripleDESCng.CreateEncryptor() at Test.Cryptography.CryptoUtils.Encrypt(SymmetricAlgorithm alg, Byte[] plainText, Int32 blockSizeMultipler) at System.Security.Cryptography.Encryption.TripleDes.Tests.TripleDESCipherTests.TripleDESRoundTrip192BitsPKCS7ECB() System.Security.Cryptography.Encryption.TripleDes.Tests.TripleDESCipherTests.TripleDESRoundTrip192BitsZerosECB [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.TripleDESCng.CreateEncryptor() at Test.Cryptography.CryptoUtils.Encrypt(SymmetricAlgorithm alg, Byte[] plainText, Int32 blockSizeMultipler) at System.Security.Cryptography.Encryption.TripleDes.Tests.TripleDESCipherTests.TripleDESRoundTrip192BitsZerosECB() System.Security.Cryptography.Encryption.TripleDes.Tests.TripleDESCipherTests.TripleDESRoundTrip192BitsNoneECB [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at Internal.Cryptography.SymmetricImportExportExtensions.ToCngKey(Byte[] key, String algorithm) at Internal.Cryptography.BasicSymmetricCipherCng..ctor(Func`1 cngKeyFactory, CipherMode cipherMode, Int32 blockSizeInBytes, Byte[] iv, Boolean encrypting) at Internal.Cryptography.CngSymmetricAlgorithmCore.CreateCryptoTransformCore(Func`1 cngKeyFactory, Byte[] iv, Boolean encrypting) at System.Security.Cryptography.TripleDESCng.CreateEncryptor() at Test.Cryptography.CryptoUtils.Encrypt(SymmetricAlgorithm alg, Byte[] plainText, Int32 blockSizeMultipler) at System.Security.Cryptography.Encryption.TripleDes.Tests.TripleDESCipherTests.TripleDESRoundTrip192BitsNoneECB() System.Security.Cryptography.Rsa.Tests.SignVerify.ExpectedSignature_SHA1_384 [FAIL] Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The requested operation is not supported Stack Trace: at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) at System.Security.Cryptography.RSACng.ImportKeyBlob(Byte[] rsaBlob, Boolean includePrivate) at System.Security.Cryptography.RSACng.ImportParameters(RSAParameters parameters) at System.Security.Cryptography.Rsa.Tests.SignVerify.ExpectSignature(Byte[] expectedSignature, Byte[] data, String hashAlgorithmName, RSAParameters rsaParameters) at System.Security.Cryptography.Rsa.Tests.SignVerify.ExpectedSignature_SHA1_384() ``` 7087 area-System.Globalization Four System.Globalization.Extensions tests failing on Win 7 "``` 14:20:15 System.Globalization.Tests.IdnMappingIdnaConformanceTests.GetAscii_Success [FAIL] 14:20:15 System.ArgumentException : Decoded string is not a valid IDN name. 14:20:15 Parameter name: unicode 14:20:15 Stack Trace: 14:20:15 at System.Globalization.IdnMapping.ThrowForZeroLength(String paramName, String invalidNameString, String otherString) 14:20:15 at System.Globalization.IdnMapping.GetAsciiCore(String unicode) 14:20:15 at System.Globalization.IdnMapping.GetAscii(String unicode, Int32 index, Int32 count) 14:20:15 at System.Globalization.IdnMapping.GetAscii(String unicode, Int32 index) 14:20:15 at System.Globalization.IdnMapping.GetAscii(String unicode) 14:20:15 at System.Globalization.Tests.IdnMappingIdnaConformanceTests.GetAscii_Success() 14:20:15 System.Globalization.Tests.IdnMappingIdnaConformanceTests.GetUnicode_Succes [FAIL] 14:20:15 Assert.Equal() Failure 14:20:15 Expected: ….?"" 14:20:15 Actual: xn--0ca.xn--ssa73l 14:20:15 Stack Trace: 14:20:15 at System.Globalization.Tests.IdnMappingIdnaConformanceTests.GetUnicode_Succes() 14:20:15 System.Globalization.Tests.IdnMappingIdnaConformanceTests.GetAscii_Invalid [FAIL] 14:20:15 Assert.Throws() Failure 14:20:15 Expected: typeof(System.ArgumentException) 14:20:15 Actual: (No exception was thrown) 14:20:15 Stack Trace: 14:20:15 at System.Globalization.Tests.IdnMappingIdnaConformanceTests.GetAscii_Invalid() 14:20:18 System.Globalization.Tests.StringNormalizationAllTests.Normalize [FAIL] 14:20:18 '\x0068' is not matched with the normalized form '\x2095 with ? normalization 14:20:18 Expected: True 14:20:18 Actual: False 14:20:18 Stack Trace: 14:20:18 at System.Globalization.Tests.StringNormalizationAllTests.AssertEqualsForm(String c, String cForm) 14:20:18 at System.Globalization.Tests.StringNormalizationAllTests.VerifyConformanceInvariant(NormalizationForm normForm, String c1, String c2, String c3, String c4, String c5) 14:20:18 at System.Globalization.Tests.StringNormalizationAllTests.Normalize() ``` " 7089 area-System.Net Distinguish raw IPv4 from IPv6 in unix Ping implementation Some systems enable raw sockets to be opened for ICMP but not ICMPv6, but our current test in Ping for whether to open a raw socket directly is based only on ICMP, which then causes run-time failures when an IPv6 address is used. This commit augments the current check to distinguish between the two. cc: @mellinoe, @ericeil Fixes #7064 7091 area-System.IO System.IO.UnixFileSystem.MoveFile throwing `Access to the path is denied.` in Docker on Mac I created a docker image, so this should be easy to create, but the docker host needs to be OS X. When the docker host is Linux, this error does not occur, which leads me to believe it is something wrong with [System.IO.UnixFileSystem.MoveFile](https://github.com/dotnet/corefx/blob/master/src/System.IO.FileSystem/src/System/IO/UnixFileSystem.cs). It is being called from the latest `dotnet` 1.0.0-dev-001806 executable [from here I believe](https://github.com/dotnet/cli/blob/rel/1.0.0/src/dotnet/commands/dotnet-compile-fsc/Program.cs). cc @enricosada Steps to reproduce on Mac OS X: ``` git clone https://github.com/ctaggart/visualfsharp-docker.git cd visualfsharp-docker docker run --rm -ti -v $PWD/template:/root/template ctaggart/visualfsharp:1.0.0-alpha-160318 cd template ./build.sh ``` It will fail with: ``` Unhandled Exception: System.UnauthorizedAccessException: Access to the path is denied. at System.IO.UnixFileSystem.MoveFile(String sourceFullPath, String destFullPath) at Microsoft.DotNet.Tools.Compiler.Fsc.CompileFscCommand.Run(Stringrgs) at Microsoft.DotNet.Cli.Program.ProcessArgs(Stringrgs) at Microsoft.DotNet.Cli.Program.Main(Stringrgs) /usr/share/dotnet/bin/dotnet compile-fsc @/root/template/obj/Debug/dnxcore50/dotnet-compile.rsp returned Exit Code 134 Compilation failed. ``` The compilation actually succeeds and then `dotnet` tries to move the files because `fsc` didn't used to support compiling executables with a `dll` extension like `dotnet` wants. That hack can probably be removed, but I think there is still a bug dealing with `MoveFile`. 7095 area-System.Net Dispose of X509Certificate used in WinHttpHandler server callback cc: @davidsh, @bartonjs 7096 area-Infrastructure The plugin hasn't been performed correctly: Problem on deletion failures in CI tests "@mmitche, I've seen this error now several times in the last 24 hours. All tests pass, but then at the very end of processing the xunit results, we get an error ""The plugin hasn't been performed correctly: Problem on deletion"", e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_release_tst_prtest/2140/console ``` 06:33:54 All tests passed. 06:34:11 [xUnit] [INFO] - Starting to record. 06:34:11 [xUnit] [INFO] - Processing xUnit.Net-v2 (default) 06:34:16 [xUnit] [INFO] - [xUnit.Net-v2 (default)] - 143 test report file(s) were found with the pattern '**/testResults.xml' relative to '/Users/dotnet-bot/j/workspace/dotnet_corefx/osx_release_tst_prtest' for the testing framework 'xUnit.Net-v2 (default)'. 06:34:16 [xUnit] [INFO] - Converting '/Users/dotnet-bot/j/workspace/dotnet_corefx/osx_release_tst_prtest/bin/tests/OSX.AnyCPU.Release/Common.Tests/dnxcore50/testResults.xml' . ... 06:44:24 [xUnit] [ERROR] - The plugin hasn't been performed correctly: Problem on deletion 06:44:24 Build step 'Publish xUnit test result report' changed build result to FAILURE 06:44:24 [BFA] Scanning build for known causes... 06:44:25 .[BFA] Found failure cause(s): 06:44:26 [BFA] There are errors when processing test results from category Test 06:44:26 [BFA] Done. 1s 06:44:26 [WS-CLEANUP] Deleting project workspace...[WS-CLEANUP] done 06:44:26 Finished: FAILURE ``` " 7097 area-System.Net Fix NegotiateStream_EchoServer_ClientWriteRead_Successive_Async_Success test Two issues: 1. It's calling ReadAsync and expecting that all bytes requested will be read, even though it's valid for ReadAsync to return fewer than the number requested. 2. It's expecting ContinueWith to automatically unwrap the inner task, and as a result it's not actually waiting for the second write or the second read to complete. This is causing many of our outer loop Unix runs to fail. Fixes https://github.com/dotnet/corefx/issues/7063 cc: @kapilash, @ericeil 7103 area-System.Net Port to RC2: Fix NegotiateStream_EchoServer_ClientWriteRead_Successive_Async_Success test #7097 7104 area-Infrastructure Outerloop OSX fails with nuget package restore "``` 20:27:39 [20:32:06.64] Restoring all packages... 20:27:58 EXEC : error : Could not find file '/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/tempHome/.local/share/NuGet/v3-cache/0b99e17097bea891c4215989667b88d90c9f7540$_F_dotnet-core_api_v3_index.json/nupkg_runtime.any.System.IO.4.1.0-rc3-23918.dat'. [/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj] 20:27:58 /Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/build.proj(60,5): error MSB3073: The command """"/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/Tools/dotnetcli/bin/dotnet"" restore --packages ""/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/packages"" --source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json --source https://www.nuget.org/api/v2/ ""/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/src"" ""/Users/dotnet-bot/j/workspace/dotnet_corefx/outerloop_osx_debug/pkg"""" exited with code -1. 20:27:58 [20:32:19.04] Restoring all packages...Done. ``` " 7105 area-System.Diagnostics ProcessTests.TestExitTime failed on OSX http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_debug_tst_prtest/2237/console ``` 11:35:29 System.Diagnostics.Tests.ProcessTests.TestExitTime [FAIL] 11:35:29 Assert+WrapperXunitException : File path: d:\j\workspace\osx_debug_bld---2f4069d6\src\System.Diagnostics.Process\tests\ProcessTests.cs. Line: 164 11:35:29 ---- Assert.True() Failure 11:35:29 Expected: True 11:35:29 Actual: False 11:35:29 Stack Trace: 11:35:29 at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber) 11:35:29 at Assert.True(Boolean condition, String userMessage, String path, Int32 line) 11:35:29 at System.Diagnostics.Tests.ProcessTests.TestExitTime() 11:35:29 ----- Inner Stack Trace ----- 11:35:29 at Assert.True(Boolean condition, String userMessage, String path, Int32 line) ``` 7112 area-System.Net Improve UDP test reliability Harden the UDP Sockets tests against packet loss. Whenever we expect to receive a UDP packet, we'll send 10 packets; hopefully this will reduce the failure rate in these tests. There are three remaining tests that are a little trickier to harden; I've marked these with TODOs, and will address them separately. Fixes most of #5185 @stephentoub @cipop @davidsh 7115 area-System.ComponentModel Enable attributes in Member/PropertyDescriptor This exposes method implementations that use the new attributes in System.ComponentModel.Primitives. Once the reference assemblies for that are created, commit c4f2db0 can be reverted, but for now, project-to-project reference will allow the TypeDescriptor assembly to access the new attributes. 7119 area-Serialization Improve serialization performance tests - Refactor all serialization performance tests to remove duplicated code. Adding more perf tests for all serializers is also more straightforward. Update namespace so the tests show up properly in reports. - Add a flag in test project to enable running tests without project references, which helps us run against Desktop facades for comparison purpose - Add performance tests for Json.Net for comparison purpose cc: @SGuyGe @shmao @zhenlan 7121 area-System.Xml Create all emitted types at once after emit phase finishes This change is a prerequisite to moving Xml serialization over to metadata/pe writer from System.Reflection.Metadata. Types being emitted can't be loaded until the entire assembly is emitted. 7123 area-System.Xml Xml serializer: Custom Reflection, Reflection.Emit [Work in progress] An experimental PR. 7125 area-System.Reflection Several MetadataReaderTests failing with NullReferenceException on OSX http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_osx_debug/49/consoleFull ``` 12:42:12 System.Reflection.Metadata.Tests.MetadataReaderTests.ValidateMethodImplTable [FAIL] 12:42:12 System.TypeInitializationException : The type initializer for 'System.Reflection.Metadata.Tests.Interop' threw an exception. 12:42:12 ---- System.NullReferenceException : Object reference not set to an instance of an object. 12:42:12 Stack Trace: 12:42:12 at System.Reflection.Metadata.Tests.MetadataReaderTests.ValidateMethodImplTable() 12:42:12 ----- Inner Stack Trace ----- 12:42:12 at System.Reflection.Metadata.Tests.ResourceHelper.GetResource(String name) 12:42:12 at System.Reflection.Metadata.Tests.Interop..cctor() 12:42:12 System.Reflection.Metadata.Tests.MetadataReaderTests.ValidateSignature [FAIL] 12:42:12 System.TypeInitializationException : The type initializer for 'System.Reflection.Metadata.Tests.Interop' threw an exception. 12:42:12 ---- System.NullReferenceException : Object reference not set to an instance of an object. 12:42:12 Stack Trace: 12:42:12 at System.Reflection.Metadata.Tests.MetadataReaderTests.ValidateSignature() 12:42:12 ----- Inner Stack Trace ----- 12:42:12 at System.Reflection.Metadata.Tests.ResourceHelper.GetResource(String name) 12:42:12 at System.Reflection.Metadata.Tests.Interop..cctor() 12:42:12 System.Reflection.Metadata.Tests.MetadataReaderTests.ValidateInterfaceImplTable [FAIL] 12:42:12 System.TypeInitializationException : The type initializer for 'System.Reflection.Metadata.Tests.Interop' threw an exception. 12:42:12 ---- System.NullReferenceException : Object reference not set to an instance of an object. 12:42:12 Stack Trace: 12:42:12 at System.Reflection.Metadata.Tests.MetadataReaderTests.ValidateInterfaceImplTable() 12:42:12 ----- Inner Stack Trace ----- 12:42:12 at System.Reflection.Metadata.Tests.ResourceHelper.GetResource(String name) 12:42:12 at System.Reflection.Metadata.Tests.Interop..cctor() 12:42:12 System.Reflection.Metadata.Tests.MetadataReaderTests.ValidateFieldLayoutTable [FAIL] 12:42:12 System.TypeInitializationException : The type initializer for 'System.Reflection.Metadata.Tests.Interop' threw an exception. 12:42:12 ---- System.NullReferenceException : Object reference not set to an instance of an object. 12:42:12 Stack Trace: 12:42:12 at System.Reflection.Metadata.Tests.MetadataReaderTests.ValidateFieldLayoutTable() 12:42:12 ----- Inner Stack Trace ----- 12:42:12 at System.Reflection.Metadata.Tests.ResourceHelper.GetResource(String name) 12:42:12 at System.Reflection.Metadata.Tests.Interop..cctor() 12:42:12 System.Reflection.Metadata.Tests.MetadataReaderTests.ValidateCustomAttribute [FAIL] 12:42:12 System.TypeInitializationException : The type initializer for 'System.Reflection.Metadata.Tests.Interop' threw an exception. 12:42:12 ---- System.NullReferenceException : Object reference not set to an instance of an object. 12:42:12 Stack Trace: 12:42:12 at System.Reflection.Metadata.Tests.MetadataReaderTests.ValidateCustomAttribute() 12:42:12 ----- Inner Stack Trace ----- 12:42:12 at System.Reflection.Metadata.Tests.ResourceHelper.GetResource(String name) 12:42:12 at System.Reflection.Metadata.Tests.Interop..cctor() 12:42:12 System.Reflection.Metadata.Tests.MetadataReaderTests.ValidateFieldMarshal [FAIL] 12:42:12 System.TypeInitializationException : The type initializer for 'System.Reflection.Metadata.Tests.Interop' threw an exception. 12:42:12 ---- System.NullReferenceException : Object reference not set to an instance of an object. 12:42:12 Stack Trace: 12:42:12 at System.Reflection.Metadata.Tests.MetadataReaderTests.ValidateFieldMarshal() 12:42:12 ----- Inner Stack Trace ----- 12:42:12 at System.Reflection.Metadata.Tests.ResourceHelper.GetResource(String name) 12:42:12 at System.Reflection.Metadata.Tests.Interop..cctor() 12:42:12 System.Reflection.Metadata.Tests.MetadataReaderTests.ValidateClassLayoutTable [FAIL] 12:42:12 System.TypeInitializationException : The type initializer for 'System.Reflection.Metadata.Tests.Interop' threw an exception. 12:42:12 ---- System.NullReferenceException : Object reference not set to an instance of an object. 12:42:12 Stack Trace: 12:42:12 at System.Reflection.Metadata.Tests.MetadataReaderTests.ValidateClassLayoutTable() 12:42:12 ----- Inner Stack Trace ----- 12:42:12 at System.Reflection.Metadata.Tests.ResourceHelper.GetResource(String name) 12:42:12 at System.Reflection.Metadata.Tests.Interop..cctor() 12:42:12 Finished: System.Reflection.Metadata.Tests 12:42:12 12:42:12 === TEST EXECUTION SUMMARY === 12:42:12 System.Reflection.Metadata.Tests Total: 153, Errors: 0, Failed: 7, Skipped: 0, Time: 0.512s ``` 7126 area-System.Text 96 System.Text.Encodings.Web.Tests failing in outerloop on OSX and Ubuntu14.04 e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_osx_release/46/consoleText http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_osx_debug/49/consoleText Mostly due to NullReferenceExceptions, e.g. ``` Microsoft.Framework.WebEncoders.UnicodeEncoderBaseTests.Encode_NullInput_ReturnsNull [FAIL] System.NullReferenceException : Object reference not set to an instance of an object. Stack Trace: at System.Text.Unicode.UnicodeHelpers.CreateDefinedCharacterBitmap() at System.Text.Internal.AllowedCharactersBitmap.ForbidUndefinedCharacters() at Microsoft.Framework.WebEncoders.UnicodeEncoderBaseTests.Encode_NullInput_ReturnsNull() ``` The pages take a while to load, in part due to one of the tests incurring 65K NullReferenceExceptions, each of which is output in the log. 7127 area-System.Security New crypto API "The current cryptography APIs are badly designed. They provide neither authenticated encryption nor the current best-practice algorithms. According to ""Cryptography in the Web: The Case of Cryptographic Design Flaws in ASP.NET"", > Unauthenticated encryption should be considered harmful. > This is not just a theoretical problem; rather, unauthenti- > cated encryption has repeatedly led to devastating attacks > against real systems. Any cryptographic API should use > authenticated encryption whenever its users want to encrypt > data. The development and popularization of high-level > cryptographic toolkits that include authenticated encryption > such as Keyczar [25], Cryptlib [26], and NaCl [27] is > the first step to providing secure cryptographic software > libraries to the general public. The next step might be the > integration of these cryptographic toolkits into mainstream > web development frameworks. To solve this problem, two steps are required: 1. The existing API should be obsoleted. It uses CBC mode, which is unnecessarily slow, and does not provide authenticated encryption. 2. New, high-level APIs should be provided. A good choice would start with bindings to [libsodium](https://download.libsodium.org/doc/), which provides a high-level C API. Alternatively, similar high-level APIs should be provided. Here is my personal list of algorithms by category. It is based on various sources ([libsodium](https://download.libsodium.org/doc/), CAESAR, TLS), but I am not a cryptographer, so it needs review before it is actually used as the basis for implementation. - Authenticated encryption with associated data: - ChaCha20-Poly1305 - XChaCha20-Poly1305 or XSalsa20-Poly1305 - AES-GCM but possibly only on platforms that have hardware acceleration – it is vulnerable to side channel attacks otherwise. - The CAESAR winner, once that is decided - Nonce-misuse-resistant authenticated encryption - HS1-SIV - Public key cryptography - Ed25519 signatures - Curve25519 key exchange - Deterministic ECDSA signatures and ECDH key exchange, for backwards compatibility. Must use an implementation that is resistant to side-channel attacks. - Possibly RSA but only for backwards compatibility. Should use best known padding: RSA-PSS and RSA-OAEP - Hashing - Blake2b is preferred: very fast & immune to length extension. All options should be exposed, including key and personalization. - SHA2 (both standalone and HMAC) in 256- and 512- bit versions for backwards compatibility - Password hashing and password-based key derivation: - Argon2 - Non-password-based key derivation - Blake2b " 7129 area-System.Security API for manipulating certificates Will you plan to add the ability to create self-signed certificates, create a certificate signing requests - CSR, sign that CSR, and so on? 7131 area-System.Net Merge with master 7134 area-System.Net Fix UrlEncodeToBytes returning entire rather than partial array Port fix from .NET Framework. Fixes #6947 cc: @davidsh, @jamesqo 7140 area-System.Net Merge System.Net.Sockets.Legacy.Tests into System.Net.Sockets.Tests There is a lot of duplication between these two test collections, resulting in needing to make fixes in both places quite often. We should just merge these and eliminate any duplicate testing. 7141 area-Infrastructure Need to copy xunit.runner.utility.desktop.dll in order to run performance tests For some reasons, l have to copy xunit.runner.utility.desktop.dll to run the perf test on CoreClr. I have tried getting a new clone of corefx, do build.cmd and then run serialization performance tests, but I still see the complain that xunit.runner.utility.desktop.dll cannot be loaded. e.g. I ran: ``` msbuild src\System.Runtime.Serialization.Xml\tests\System.Runtime.Serialization.Xml.Tests.csproj /t:rebuildandtest /p:Performance=true /p:Configuration=Windows_Release ``` I saw this error: ``` Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'xunit.runner.utility.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c' or one of its dependencies. The system cannot f ind the file specified. at Microsoft.Xunit.Performance.ProgramCore.Run(String[] args) at Microsoft.Xunit.Performance.Program.Main(String[] args) ``` If I copy corefx\packages\Microsoft.DotNet.xunit.performance.runner.Windows\1.0.0-alpha-build0029\tools\xunit.runner.utility.desktop.dll to dnxcore50 directory and run the msbuild command again it works fine. I'm wondering if I'm missing anything here. 7146 area-Meta Allow a way to specify native shim dependencies for libs in build targets. **Repro:** Using build.sh without `TestWithLocalLibraries=true` will cause builds to fail, if the correct package version with the shim update is not used. Currently, we are copying all the native shim libs built locally to be used while running tests (when setting `TestWithLocalLibraries=true`). We need a way to just copy over just the required shims, so that, there is no need to keep updating the packages for every shim update. 7150 area-System.Net SendRecvPollSync_TcpListener_Socket failed on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_debug_prtest/3854/consoleFull ``` 12:13:24 System.Net.Sockets.Tests.SendReceive.SendRecvPollSync_TcpListener_Socket(listenAt: 127.0.0.1, pollBeforeOperation: False) [FAIL] 12:13:24 System.AggregateException : One or more errors occurred. (Read poll after completion should have succeeded 12:13:24 Expected: True 12:13:24 Actual: False) 12:13:24 ---- Read poll after completion should have succeeded 12:13:24 Expected: True 12:13:24 Actual: False 12:13:24 Stack Trace: 12:13:24 at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) 12:13:24 at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout) 12:13:24 d:\j\workspace\windows_nt_de---06b7984d\src\System.Net.Sockets\tests\FunctionalTests\SendReceive.cs(506,0): at System.Net.Sockets.Tests.SendReceive.SendRecvPollSync_TcpListener_Socket(IPAddress listenAt, Boolean pollBeforeOperation) ``` 7151 area-System.ComponentModel NullableConverterTests failed in CI due to enumerating modified collection http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_release_tst_prtest/2190/consoleFull ``` 12:30:09 System.ComponentModel.Tests.NullableConverterTests.CanConvertTo_WithContext [FAIL] 12:30:09 System.TypeInitializationException : The type initializer for 'System.ComponentModel.Tests.NullableConverterTests' threw an exception. 12:30:09 ---- System.InvalidOperationException : Collection was modified; enumeration operation may not execute. 12:30:09 Stack Trace: 12:30:09 at System.ComponentModel.Tests.NullableConverterTests.CanConvertTo_WithContext() 12:30:09 ----- Inner Stack Trace ----- 12:30:09 at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) 12:30:09 at System.Collections.Generic.Dictionary`2.KeyCollection.Enumerator.MoveNext() 12:30:09 at System.ComponentModel.ReflectTypeDescriptionProvider.SearchIntrinsicTable(Type callingType) 12:30:09 at System.ComponentModel.ReflectTypeDescriptionProvider.GetConverter(Type type) 12:30:09 at System.ComponentModel.NullableConverter..ctor(Type type) 12:30:09 at System.ComponentModel.Tests.NullableConverterTests..cctor() 12:30:09 System.ComponentModel.Tests.NullableConverterTests.ConvertTo_WithContext [FAIL] 12:30:09 System.TypeInitializationException : The type initializer for 'System.ComponentModel.Tests.NullableConverterTests' threw an exception. 12:30:09 ---- System.InvalidOperationException : Collection was modified; enumeration operation may not execute. 12:30:09 Stack Trace: 12:30:09 at System.ComponentModel.Tests.NullableConverterTests.ConvertTo_WithContext() 12:30:09 ----- Inner Stack Trace ----- 12:30:09 at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) 12:30:09 at System.Collections.Generic.Dictionary`2.KeyCollection.Enumerator.MoveNext() 12:30:09 at System.ComponentModel.ReflectTypeDescriptionProvider.SearchIntrinsicTable(Type callingType) 12:30:09 at System.ComponentModel.ReflectTypeDescriptionProvider.GetConverter(Type type) 12:30:09 at System.ComponentModel.NullableConverter..ctor(Type type) 12:30:09 at System.ComponentModel.Tests.NullableConverterTests..cctor() 12:30:09 System.ComponentModel.Tests.NullableConverterTests.Get_UnderlyingTypeConverter [FAIL] 12:30:09 System.TypeInitializationException : The type initializer for 'System.ComponentModel.Tests.NullableConverterTests' threw an exception. 12:30:09 ---- System.InvalidOperationException : Collection was modified; enumeration operation may not execute. 12:30:09 Stack Trace: 12:30:09 at System.ComponentModel.Tests.NullableConverterTests.Get_UnderlyingTypeConverter() 12:30:09 ----- Inner Stack Trace ----- 12:30:09 at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) 12:30:09 at System.Collections.Generic.Dictionary`2.KeyCollection.Enumerator.MoveNext() 12:30:09 at System.ComponentModel.ReflectTypeDescriptionProvider.SearchIntrinsicTable(Type callingType) 12:30:09 at System.ComponentModel.ReflectTypeDescriptionProvider.GetConverter(Type type) 12:30:09 at System.ComponentModel.NullableConverter..ctor(Type type) 12:30:09 at System.ComponentModel.Tests.NullableConverterTests..cctor() 12:30:09 System.ComponentModel.Tests.NullableConverterTests.Get_NullableType [FAIL] 12:30:09 System.TypeInitializationException : The type initializer for 'System.ComponentModel.Tests.NullableConverterTests' threw an exception. 12:30:09 ---- System.InvalidOperationException : Collection was modified; enumeration operation may not execute. 12:30:09 Stack Trace: 12:30:09 at System.ComponentModel.Tests.NullableConverterTests.Get_NullableType() 12:30:09 ----- Inner Stack Trace ----- 12:30:09 at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) 12:30:09 at System.Collections.Generic.Dictionary`2.KeyCollection.Enumerator.MoveNext() 12:30:09 at System.ComponentModel.ReflectTypeDescriptionProvider.SearchIntrinsicTable(Type callingType) 12:30:09 at System.ComponentModel.ReflectTypeDescriptionProvider.GetConverter(Type type) 12:30:09 at System.ComponentModel.NullableConverter..ctor(Type type) 12:30:09 at System.ComponentModel.Tests.NullableConverterTests..cctor() 12:30:09 System.ComponentModel.Tests.NullableConverterTests.ConvertFrom_WithContext [FAIL] 12:30:09 System.TypeInitializationException : The type initializer for 'System.ComponentModel.Tests.NullableConverterTests' threw an exception. 12:30:09 ---- System.InvalidOperationException : Collection was modified; enumeration operation may not execute. 12:30:09 Stack Trace: 12:30:09 at System.ComponentModel.Tests.NullableConverterTests.ConvertFrom_WithContext() 12:30:09 ----- Inner Stack Trace ----- 12:30:09 at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) 12:30:09 at System.Collections.Generic.Dictionary`2.KeyCollection.Enumerator.MoveNext() 12:30:09 at System.ComponentModel.ReflectTypeDescriptionProvider.SearchIntrinsicTable(Type callingType) 12:30:09 at System.ComponentModel.ReflectTypeDescriptionProvider.GetConverter(Type type) 12:30:09 at System.ComponentModel.NullableConverter..ctor(Type type) 12:30:09 at System.ComponentModel.Tests.NullableConverterTests..cctor() 12:30:09 System.ComponentModel.Tests.NullableConverterTests.CanConvertFrom_WithContext [FAIL] 12:30:09 System.TypeInitializationException : The type initializer for 'System.ComponentModel.Tests.NullableConverterTests' threw an exception. 12:30:09 ---- System.InvalidOperationException : Collection was modified; enumeration operation may not execute. 12:30:09 Stack Trace: 12:30:09 at System.ComponentModel.Tests.NullableConverterTests.CanConvertFrom_WithContext() 12:30:09 ----- Inner Stack Trace ----- 12:30:09 at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) 12:30:09 at System.Collections.Generic.Dictionary`2.KeyCollection.Enumerator.MoveNext() 12:30:09 at System.ComponentModel.ReflectTypeDescriptionProvider.SearchIntrinsicTable(Type callingType) 12:30:09 at System.ComponentModel.ReflectTypeDescriptionProvider.GetConverter(Type type) 12:30:09 at System.ComponentModel.NullableConverter..ctor(Type type) 12:30:09 at System.ComponentModel.Tests.NullableConverterTests..cctor() 12:30:09 System.ComponentModel.Tests.NullableConverterTests.Get_UnderlyingType [FAIL] 12:30:09 System.TypeInitializationException : The type initializer for 'System.ComponentModel.Tests.NullableConverterTests' threw an exception. 12:30:09 ---- System.InvalidOperationException : Collection was modified; enumeration operation may not execute. 12:30:09 Stack Trace: 12:30:09 at System.ComponentModel.Tests.NullableConverterTests.Get_UnderlyingType() 12:30:09 ----- Inner Stack Trace ----- 12:30:09 at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) 12:30:09 at System.Collections.Generic.Dictionary`2.KeyCollection.Enumerator.MoveNext() 12:30:09 at System.ComponentModel.ReflectTypeDescriptionProvider.SearchIntrinsicTable(Type callingType) 12:30:09 at System.ComponentModel.ReflectTypeDescriptionProvider.GetConverter(Type type) 12:30:09 at System.ComponentModel.NullableConverter..ctor(Type type) 12:30:09 at System.ComponentModel.Tests.NullableConverterTests..cctor() ``` 7154 area-System.Net Implicit windows or UNC uris doesn't parse query or fragment "## Reproduce ### Implicit windows file ``` Uri uri = new Uri(""C:/path?query#fragment""); uri.AbsolutePath; // ""C:/path%3Fquery%23fragment"" uri.Query; // """" Uri.Fragment; // """" ``` ### Explicit windows file ``` Uri uri = new Uri(""file:///C:/path?query#fragment""); uri.AbsolutePath; // ""C:/path"" uri.Query; // ""?query"" Uri.Fragment; // ""#fragment"" ``` ### Implicit UNC file ``` Uri uri = new Uri(@""\\host\path?query#fragment""); uri.AbsolutePath; // ""/path%3Fquery%23fragment"" uri.Query; // """" Uri.Fragment; // """" ``` ## Explicit UNC file ``` Uri uri = new Uri(@""file://\\host/path?query#fragment""); uri.AbsolutePath; // ""/path"" uri.Query; // ""?query"" Uri.Fragment; // ""#fragment"" ``` ## Problem description - Clearly, there is an inconsistency between parsing of implicit and explicit windows files. - The query and fragment are escaped in an implicit file, so are not parsed, unlike in explicit files ## Solution - This may be by design, but I don't see any mention of this in the MSDN docs. - Furthermore, it seems that this is a bug, as there certainly are many use cases for creating implicit Uris. This may actually deter the impetus for fixing, as this breaking change affects many consumers. - The solution, a breaking change, would be to correctly the query and fragment of implicit files in the same manner as explicit files. /cc @davidsh (sorry that I found another breaking change bug!) " 7155 area-System.Runtime TestCtor_CharPtr failing on Unix sporadically "This test has started failing randomly in the past day. I've seen it now on both CentOS and OpenSUSE. e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/centos7.1_debug_tst/999/console ``` 12:19:35 StringTests.TestCtor_CharPtr(valueArray: ['a', 'b', 'c', 'd', 'e', ...], expected: ""abcdefgh"") [FAIL] 12:19:35 Assert.Equal() Failure 12:19:35 ↓ (pos 8) 12:19:35 Expected: abcdefgh 12:19:35 Actual: abcdefgh 12:19:35 ↑ (pos 8) 12:19:35 Stack Trace: 12:19:35 at StringTests.TestCtor_CharPtr(Char[] valueArray, String expected) ``` https://github.com/dotnet/corefx/blob/master/src/System.Runtime/tests/System/String.cs#L24 " 7165 area-Serialization Improve DataContractJsonSerializer performance for dictionary In DCJS code path to serialize/de-serialize dictionary, there is one place where we always create new data contract for key-value type, while we can leverage on the data contract cache instead. This results in significant performance differences between CoreClr and Desktop. This change resolves that issue by getting data contract for key-value type with a method which utilizes the cache. With this change we'll see 10-20x perf improvement for dictionary scenarios. I'm confirming with NetNative to ensure no regression and will update. cc: @SGuyGe @zhenlan @shmao 7166 area-Infrastructure xUnit console runner crashes when writing invalid characters to the XML file "Separating this out from #7042 (where the bug was discovered) so we have a separate issue to keep track of it. Currently, the xUnit console runner will crash if certain invalid characters, like standalone surrogates, U+FFFE or U+FFFF are written to the XML file. For example, this would fail: ``` csharp public static IEnumerable Equal_TestData() { yield return new object[] { ""\uD800"", ""\uD800"" }; } [Theory] [MemberData(nameof(Equal_TestData))] public void Equal(string expected, string actual) { Assert.Equal(expected, actual); } ``` The fix is to alter [this](https://github.com/dotnet/buildtools/blob/37d1d57167d2d112b26f94135f3281fe2601ab65/src/common/XmlTestExecutionVisitor.cs#L269) method of `XmlTestExecutionVisitor` in the buildtools repo to handle these invalid chars, in addition to C0 controls. See the fix I've made upstream here: xunit/xunit#804 I'll be submitting a PR shortly to buildtools to fix this. " 7169 area-System.Linq Expression.Convert() incorrect in interpreter with enum types. "Given an enum type `E`, a long-backed enumtype `El` and a value of type `E` called `e` then `Expression.Convert()` will be treated differently in the compiler and the interpreter. ``` C# // comparable numerical value to e on all Expression.Convert(Expression.Constant(e, typeof(E)), typeof(El)) // InvalidCastException in compiler. // comparable numerical value to e in interpreter Expression.Convert(Expression.Constant(e, typeof(object)), typeof(El)) Expression.Convert(Expression.Constant(e, typeof(Enum)), typeof(El)) // InvalidCastException in compiler. // ArgumentException in interpreter. Expression.Convert(Expression.Constant(""hello""), typeof(El)) ``` Aside from the compiler winning on the grounds of precedence, it would appear to be correct on each count here, with the `ArgumentException` being plainly wrong. There is a bit of a risk to fixing the second case, as it could cause a throw in working code, though it's perhaps better to nip it in the bud. " 7171 area-System.Net Add HttpClientHandler tests for server certificates Based in part on the ones for WinHttpHandler. Right now these tests are only included for Unix. cc: @davidsh, @bartonjs 7172 area-System.Xml XElement Namespace Handling "I found a problem with the way XElement handles namespaces. If You look at the following code (executed with .Net Core 1.0.0-rc2-23811): ``` C# var x1 = new XElement(""{http://example.com}root""); Console.WriteLine(x1); var x2 = XElement.Parse(x1.ToString()); Console.WriteLine(x2); Console.WriteLine($""Attributes of x1: '{string.Join("", "", x1.Attributes())}'""); Console.WriteLine($""Attributes of x2: '{string.Join("", "", x2.Attributes())}'""); ``` The output is as follows: ``` xml Attributes of x1: '' Attributes of x2: 'xmlns=""http://example.com""' ``` To me this behaviour seems strange / **inconsistent**, as one **cannot rely** that the xmnls attribute is represented as **xmlns attribute in the memory model**. Some Frameworks (e.g. Json.NET) however require the xmlns attribute to exist in the memory model, which leads to strange results. My suggestion is: - Either always add the xmlns attribute when using the syntax I wrote above automatically. - Or never add the xmnls attribute (disallow adding it in the api) - also not during parsing xml, but make it implicit (accessible via Name.Namespace) So basically keep the Name.NamespaceName and the xmnls attribute in sync. " 7175 area-System.Runtime API Proposal: Support operators * / etc on type TimeSpan "## Background TimeSpan represents a time interval, which makes it a common candidate for ""mathematical"" processing, such as taking a 1-hour interval, and divide it by 2, resulting a 0.5-hour interval. Currently, the TimeSpan type support only a limited subset of operators (+ and -), and only with a TimeSpan operand. ## Proposed API - Approved Approved in * https://github.com/dotnet/corefx/issues/7175#issuecomment-262323805 * https://github.com/dotnet/corefx/issues/7175#issuecomment-274889934 ```C# namespace System { public struct TimeSpan { public static System.TimeSpan operator *(TimeSpan timeSpan, double factor); public static System.TimeSpan operator /(TimeSpan timeSpan, double divisor); public static TimeSpan operator *(double factor, TimeSpan timeSpan); public static double operator /(TimeSpan t1, TimeSpan t2); } } ``` **Motivation:** The extra 2 APIs proposal are mainly for supporting the commutative * and / operation (basically adding the same operation with flipped parameters order) and support / with time span. ## Naïve implementation ``` csharp namespace System { public struct TimeSpan { public static System.TimeSpan operator *(TimeSpan timeSpan, double factor) { return TimeSpan.FromTicks(timeSpan.Ticks * factor); } public static System.TimeSpan operator /(TimeSpan timeSpan, double divisor); { return TimeSpan.FromTicks(timeSpan.Ticks / divisor); } } } ``` " 7184 area-System.Net Split _queueLock into multiple locks #6838 introduced a new issue; with a single lock, it was impossible to have a Send proceed concurrently with a Receive, which should work. This caused a [hang in the .NET CLI tests](https://github.com/dotnet/cli/pull/1990#issuecomment-200500819). This change splits the lock into two, plus adds a third lock to cover event registration. (This used to be covered by _queueLock as well, but cannot be covered by the two new locks without lock ordering issues). This is admittedly a bit of a mess; I'll clean this up as part of #6912. Will add additional testing for this case separately, but we need to get this in ASAP to unblock the CLI. @stephentoub @eerhardt 7185 area-System.Net Fix WinHttpHandler session handle initialization "A test running on Windows 7 was doing multiple parallel requests using the same HttpClient but throwing an unexpected winHTTP error. The problem only occurred on Windows 7 because the proxy initialization code in WinHttpHandler is different for that platform. In general, there is only one session handle created per handler and it is shared with multiple requests. The ""init once"" logic was faulty because it was setting the `_sessionHandle` field too early before everything was init'd. In addition, this exposed another bug where the session handle options were repeatedly set for each request even though they should only have been set once. Fixed up the EnsureSessionHandleExists method to do the proper initialization. Also added more tracing. Fixes #7085 " 7187 area-System.IO FileInfo.Length on symbolic links should return the size of the target of the link. "FileInfo.Length on a symbolic link in Windows returns 0, not the length of the file referred to by the link. For a symbolic link, Windows’ FindFirstFile returns 0 bytes as the length. This may also be true with GetFileAttributesEx. So a pattern like this prints out 0 for the length of a file that happens to be a symbolic link: ``` DirectoryInfo dir = new DirectoryInfo("".""); foreach(var file in dir.GetFiles()) { Console.WriteLine(""File: {0} Size: {1}"", file.Name, file.Length); } ``` Fixing this will require opening the file then getting the length, which you can do with FileStream. Jeremy Kuhne points out it's best if we open then handle without requesting read or write permission (ie calling CreateFile with the right parameters). If you look at GetFileSizeEx, it's clear you need to specify FILE_READ_ATTRIBUTES when calling CreateFile (and we should use some appropriate sharing mode, like allowing reading and deleting. Maybe writing too - yes there's a race but for monotonically increasing log files the answer is not useless). https://msdn.microsoft.com/en-us/library/windows/desktop/aa364957(v=vs.85).aspx Repro by creating file.txt, then running ""mklink link.txt file.txt"" from an admin command prompt. Then use FileInfo.Length on link.txt. " 7189 area-System.ComponentModel Initial TypeDescriptor implementation This is an initial buildable implementation of TypeDescriptor. Some code remains behind feature flags. Several tests must be skipped because ReflectTypeDescriptionProvider is implemented with stubs. cc @twsouthwick 7191 area-Infrastructure [April 21, 2016] Add Ubuntu 16.04 LTS (Xenial Xerusis) to CI and the RID graph Ubuntu 16.04 LTS, codenamed Xenial Xerusis is set for release on April 21, 2016. Add 16.04LTS to the RID graph and replace 15.10 in Jenkins with 16.04LTS. https://wiki.ubuntu.com/Releases Related item tracking Fedora 23: https://github.com/dotnet/corefx/issues/5990 7193 area-System.Security WIF API is confusing when implementing CustomIdentity "I found implementing a CustomIdentity to be very confusing, and there's alot of things about the API that feel very ""spin in your chair three times and clap your hands and it'll work"". - IsAuthenticated used to be the premier way to signal to the framework that the user is successfully authenticated. This not sufficient, and is fact ignored by the framework which instead checks to see if AuthenticationType is set. - IIdentity has only three properties, one of which being IsAuthenticated. Even if you are unfamiliar with old approaches of implementing CustomIdentities, the first thing you would do is look at the default ClaimsIdentity and see what interfaces does it implement. IIdentity is the only one. So naturally you would conclude that your custom identity must simply implement this interface. This is not sufficient. - No interface describes the additional requirements needed to be a successfully functioning custom identity. - You must magically know that you must inherit from ClaimsIdentity - When using only a ClaimsIdentity directly, you can successfully authenticate the user. The framework automatically creates the necessary token so long as AuthenticationType is set. However, a custom identity implementing ClaimsIdentity for some reason does not get the same benefit from the framework. Having IsAuthenticated==true and AuthenticationType set means nothing to the framework if you are instead inheriting from ClaimsIdentity. As soon as you derive from ClaimsIdentity, you then have to set the token yourself. - Returning a principal from the ClaimsAuthenticationManager leads one to the think the framework will then pick that up and use that as the principal if IsAuthenticated==true. In fact, as demonstrate in the below, many other steps are needed to get the principal and identity to ""stick"". Why doesn't this method just have a void return type if it isn't going to respect the return? - If an Identity with IsAuthenticated==true and no AuthenticationType==null means the user is interpreted as not authenticated, then this should be an exception. Clearly if an identity is returning true for IsAuthenticated, the indication is the user should be authenticated. If you are going to have an obscure nuance that AuthenticationType must also be set, then an exception should be thrown so developers are not dealing with what is essentially a silent error as result of them failing to set the AuthenticationType. Really this type of lock step should be avoided when trying to represent a single concept in multiple properties. You're trying to represent the fact that a user is successfully authenticated, and if some other required information is missing to satisfy that discrete value, then throw an exception. - If IsAuthenticated==true is ignored for types which implement IIDentity, but are not a ClaimsIdentity then this should again be an exception. If you're going to let my IIdentity interface return an AuthenticationType and IsAuthenticated==true, and then completely ignore the information I've exposed through the one and only interface that is used by the Identity class hierarchy, then throw an exception that makes it clear that identities not inheriting ClaimsIdentity are not supported. -Other aspects of the framework require specific claims be present. There's no compile/design time safety or other measures to verify my implementation is correct until I stumble upon them later. AntiForgeryToken is an example that you will not reallize requires a specific claim until you stumble onto a page with it on there. I do not know what other things I will stumble upon that will bite me because it is a dirty stringly type dependency on a specifically named claim. Ideally these requirements should be represented as properties on an interface. If you so choose not to support the feature, you can opt not to implement the interface and suffer a lack of support for the feature. This allows you to compose interfaces into an identity that supports your needs. - Will I run into problems because my CustomIdentity does not implement all the many and varied signatures of the ClaimsIdentity construct? One would usually think no, but the fact that we're now doing things like requiring a specific concrete class, stringly typed claim values, and not communicating API requirements through interfaces means that I have to wonder if specific constructor signatures may be required by certain parts of the framework, and I will painfully discover later through a bug which is unlikely to throw an exception. - Will I run into problems that basically invalidate my entire approach down the road? - Now that I'm setting the token myself, is there potential for problems with stepping on the framework's own code for handling the token? - Do I need to do all the stuff to manage the sliding expiration of the token and all other related stuff? Will the framework still handle this for me? Not really looking for an answer, as much to point out the strangeness that I must take on setting the token when I'm still returning a derived ClaimsIdentity, which calls into question what else I must take on that was automatically handled by the framework. - This is one of those things where the combination of things to get it working doesn't really make any sense. One of my other developers figured out that the token needed to be set, and I was very doubtful of that. What is so different between returning a ClaimsIdentity and a derived custom ClaimsIdentity? That with the obscure nuances of what can break it, and the fact that I may find certain scenarios in the future that do not work with this crazy combination of settings. I am setting my expectation to have users complain of edge case scenarios where they have problems with authentication, and no amount of exception logging will help me identify the problem because clearly there's several scenarios where we are just silently failing to authenticate due to a failure to meet obscure requirements to set a certain property a certain way. So I can look forward to encountering these in the future and hunting through the reference source to try and guess at what obscure requirement I am missing that is causing certain users to have problems. Hopefully this doesn't sound to ranty. Here's the path I took. Actually the final combination of inheriting from a ClaimsIdentity AND setting the token was found by another developer. It actually involved a ~week of each of 3 developer's time before we found the right combination. Between all the identity factories, ApplicatonUser factories, UserStore's, and UserManager's(conceptually similar names that seem to represent the same purpose, but really server different role) we had alot to investigate. ``` public class KentorAuthenticationManager : ClaimsAuthenticationManager { public override ClaimsPrincipal Authenticate(string resourceName, ClaimsPrincipal incomingPrincipal) { // create our custom identity var customIdentity = new CustomIdentity(); customIdentity.IsAuthenticated = true; customIdentity.AuthenticationType = ""testtype""; customIdentity.Name = ""John Doe""; var newPrincipal = new ClaimsPrincipal(customIdentity); base.Authenticate("""", newPrincipal); HttpContext.Current.User = newPrincipal; System.Threading.Thread.CurrentPrincipal = newPrincipal; return newPrincipal; } } [Serializable] public class CustomIdentity : //System.Security.Claims.ClaimsIdentity, IIdentity, IIdentityContext { public CustomIdentity()//:base(""UnifiedEngagement"") { } public int UserId { get; set; } public string Name { get; set; } public string AuthenticationType { get; set; } public bool IsAuthenticated { get; set; } // other custom properties... } ``` The problem is the custom identity gets converted to a claims identity: [![enter image description here](http://i.stack.imgur.com/IFTzM.png)](http://i.stack.imgur.com/IFTzM.png) ## Generic Principal w/CustomIdentity If we use a GenericPrincipal, then within the CustomAuthenticationManager, the newPrincipal.Identity is my custom type: `var newPrincipal = new GenericPrincipal(customIdentity);` [![enter image description here](http://i.stack.imgur.com/h1VRa.png)](http://i.stack.imgur.com/h1VRa.png) [![enter image description here](http://i.stack.imgur.com/u3gCL.png)](http://i.stack.imgur.com/u3gCL.png) Looking good, until the roundtrip completes and accessing the current principal from anywhere else, it then shows a GenericIdentity with `IsAuthenticated==false`, which loses all the extra properties that were in my CustomIdentity: [![enter image description here](http://i.stack.imgur.com/igbYB.png)](http://i.stack.imgur.com/igbYB.png) Essentially it ignored the IsAuthenticated==true I set(I also set AuthenticationType since WIF depends on that to determine authentication). If I use a ClaimsIdentity, all I have to do is make sure it is instantiated with a AuthenticationType and it authenticates properly. ## GenericPrincipal w/CustomIdentity and setting SessionSecurityToken I shouldn't need to do this, because based on setting IsAuthenticated and the AuthenticationType, it should authenticate automatically and generate the token. So to force it to authenticate successfully, I explicitly set the session token. But my CustomIdentity is gone and is instead a ClaimsIdentity after the roundtrip, and so loses my custom properties(It does create claims representing the IIdentity properties for name, nameid, etc. but all other custom properties are lost): ``` var sessionSecurityToken = new SessionSecurityToken(newPrincipal, TimeSpan.FromHours(8)); FederatedAuthentication.SessionAuthenticationModule.WriteSessionTokenToCookie(sessionSecurityToken); ``` After roundtrip CustomIdentity is now a ClaimsIdentity: [![enter image description here](http://i.stack.imgur.com/GImlL.png)](http://i.stack.imgur.com/GImlL.png) ## Inheriting ClaimsIdentity If my CustomIdentity inherits from ClaimsIdentity: ``` [Serializable] public class CustomIdentity : System.Security.Claims.ClaimsIdentity, IIdentityContext { public CustomIdentity(IIdentity claimsIdentity) : base(claimsIdentity, null, ""TestAuthType"", null,null) { } //... ``` But I do **not** explicitly set SessionSecurityToken(no call to WriteSessionTokenToCookie), then it fails to authenticate and leaves me with a GenericIdentity with IsAuthenticated==false. ## Inheriting ClaimsIdentity w/setting SessionSecurityToken If I use the above identity that inherits from ClaimsIdentity **and** set SessionSecurityToken, then everything works fine. It was a long road to get here. 2 senior and 1 midlevel developer spent roughly a week each trying different variations. [![enter image description here](http://i.stack.imgur.com/FHavZ.png)](http://i.stack.imgur.com/FHavZ.png) ## Why do I not put custom info in claims? Note I have enough custom properties that I am not looking to stuff them in as claims. The recommendation I've seen on more than one occasion is that putting too much into claims is a poor design and can cause poor performance because they end up in the token. Additionally, some data is much easier to represent in a C# object model than within a flat list of claims. It is data specific to the user, minimal enough that the memory footprint in session is acceptable, and large enough that I wouldn't want it encrypted/decrypted and pushed across the wire: https://msdn.microsoft.com/en-us/library/azure/hh531494.aspx " 7196 area-System.Net Merge System.Net.Sockets.Legacy tests into System.Net.Sockets This reduces duplication in the Sockets tests, and reduces the innermost development loop for Sockets changes to a single test assembly. Fixes #7140. @CIPop, please have a look. 7198 area-System.Net Deadlock in ClientWebSocket when CancellationToken is cancelled during a call to ConnectAsync() In WinHttpWebSocket.ConnectAsync, there is a using block around the main implementation of the function which looks like this: ``` csharp using (CancellationTokenRegistration ctr = ThrowOrRegisterCancellation(cancellationToken)) ``` ThrowOrRegisterCancellation registers a callback which calls Abort() on the WinHttpWebSocket. The Abort() method immediately attempts to take a lock on `_operation.Lock`. Inside the using block of ConnectAsync, there are two inner blocks which take a lock on `_operation.Lock`. While in the second lock, if the CancellationToken is cancelled, a deadlock occurs. What happens is the callback is fired, which calls Abort() which then blocks waiting to obtain a lock on `_operation.Lock`. This lock can't be taken because ConnectAsync is holding the lock. At the end of the second lock block in ConnectAsync, a call to ctr.Dispose() is made. When calling Dispose() on a CancellationTokenRegistration, if the cancellation callback is currently in progress, it blocks waiting for the callback to complete. The callback won't complete because it's waiting for the lock to be released by ConnectAsync. ConnectAsync won't release the lock until the Dispose() call completes, which won't complete until the callback is complete. Here are the two deadlocked call stacks: ``` [HelperMethodFrame: 0000001d84e5e6b8] System.Threading.Thread.SleepInternal(Int32) System.Threading.Thread.Sleep(Int32) [f:\dd\ndp\clr\src\mscorlib\src\System\Threading\Thread.cs @ 708] System.Threading.SpinWait.SpinOnce() [f:\dd\ndp\clr\src\mscorlib\src\System\Threading\SpinWait.cs @ 147] System.Threading.CancellationTokenSource.WaitForCallbackToComplete(System.Threading.CancellationCallbackInfo) [f:\dd\ndp\clr\src\mscorlib\src\System\Threading\CancellationTokenSource.cs @ 890] System.Net.WebSockets.WinHttpWebSocket+d__18.MoveNext() ``` ``` [HelperMethodFrame_1OBJ: 0000001d8384e8d8] System.Threading.Monitor.Enter(System.Object) System.Net.WebSockets.WinHttpWebSocket.Abort() System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) [f:\dd\ndp\clr\src\mscorlib\src\System\Threading\ExecutionContext.cs @ 93] System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(Boolean) [f:\dd\ndp\clr\src\mscorlib\src\System\Threading\CancellationTokenSource.cs @ 785] System.Threading.CancellationTokenSource.TimerCallbackLogic(System.Object) [f:\dd\ndp\clr\src\mscorlib\src\System\Threading\CancellationTokenSource.cs @ 513] ``` This will use a lot of CPU as the code for waiting for the callback to complete looks like this: ``` csharp SpinWait sw = new SpinWait(); while (ExecutingCallback == callbackInfo) { sw.SpinOnce(); //spin as we assume callback execution is fast and that this situation is rare. } ``` 7201 area-System.Security Use BCrypt.dll for ephemeral symmetric operations The majority of tests failing in https://github.com/dotnet/corefx/issues/7086 are due to Windows 7 not having support for symmetric encryption through the Microsoft KSP (using NCrypt.dll). The guidance from the Windows Cryptography team is to use BCrypt when an ephemeral key is used, and only use NCrypt when a persisted key was explicitly requested. And that'll make Windows 7 have exactly the right support. 7203 area-System.Net Port to RC2: Fix WinHttpHandler session handle initialization #7185 7204 area-System.Net How can I add System.Net.Sockets 4.1.0 to my project's reference? "Hello, I'm trying to port my project using System.Net.Sockets.TcpClient class. So I tried to add latest System.Net.Sockets using NuGet. However it fails. Please help. ### PROBLEM Adding System.Net.Sockets 4.1.0 fails with incompatible errors like this: ``` System.Net.Sockets 4.1.0-rc3-23923 is not compatible with UAP,Version=v10.0. Some packages are not compatible with UAP,Version=v10.0. System.Net.Sockets 4.1.0-rc3-23923 is not compatible with UAP,Version=v10.0 (win10-arm). Some packages are not compatible with UAP,Version=v10.0 (win10-arm). System.Net.Sockets 4.1.0-rc3-23923 is not compatible with UAP,Version=v10.0 (win10-arm-aot). Some packages are not compatible with UAP,Version=v10.0 (win10-arm-aot). System.Net.Sockets 4.1.0-rc3-23923 is not compatible with UAP,Version=v10.0 (win10-x86). Some packages are not compatible with UAP,Version=v10.0 (win10-x86). System.Net.Sockets 4.1.0-rc3-23923 is not compatible with UAP,Version=v10.0 (win10-x86-aot). Some packages are not compatible with UAP,Version=v10.0 (win10-x86-aot). System.Net.Sockets 4.1.0-rc3-23923 is not compatible with UAP,Version=v10.0 (win10-x64). Some packages are not compatible with UAP,Version=v10.0 (win10-x64). System.Net.Sockets 4.1.0-rc3-23923 is not compatible with UAP,Version=v10.0 (win10-x64-aot). Some packages are not compatible with UAP,Version=v10.0 (win10-x64-aot). ``` ### NOTES I could add System.Net.Sockets 4.0.0 successfully. But it doesn't include TcpClient class so I need 4.1.0. I guess it would be solved by tweaking project.json but I don't know where/how to tweak. Adding System.Net.Sockets still fails for a newly-created Universal Windows (10) Blank App. ### STEPS - Create new Blank App (Universal Windows) with Visual Studio 2015 Update 1 - Locate Tools->Options->NuGet Package Manager->Package Sources and add .NET Core package source (*1). - Right click References in Solution Explorer and select Manage NuGet Packages... - Select newly-added Package Source and find latest System.Net.Sockets(*2). Don't forget to check ""Include prerelease"" - Install latest System.Net.Sockets. It fails. Errors are logged in Output window. - Double-click project.json in Solution Explorer. Original project.json is as follows: ``` { ""dependencies"": { ""Microsoft.NETCore.UniversalWindowsPlatform"": ""5.0.0"" }, ""frameworks"": { ""uap10.0"": {} }, ""runtimes"": { ""win10-arm"": {}, ""win10-arm-aot"": {}, ""win10-x86"": {}, ""win10-x86-aot"": {}, ""win10-x64"": {}, ""win10-x64-aot"": {} } } ``` **Tweak a.** Change ""dependencies"": {""Microsoft.NETCore.UniversalWindowsPlatform"": ""5.0.0""} -> ""5.4.0"" => Try to add System.Net.Sockets again. Fails. **Tweak b.** Add ""dotnet5.4"": {}, into ""frameworks"": { ""uap10.0"": {} }, => Try to add System.Net.Sockets again. Fails. **Tweak c.** Delete ""uap10.0"": {} after adding ""dotnet5.4"": {} into ""frameworks"". => Try to add System.Net.Sockets again. Fails. ### REFERENCE Can't locate TcpClient and TcpListener from Socket.Net.Sockets #5939 *) This page says you have to switch platform to ""dotnet5.4"". (*1) https://dotnet.myget.org/F/dotnet-core/api/v3/index.json (*2) Currently the latest is 4.1.0-rc3-23923 " 7206 area-System.Diagnostics Install fails for Microsoft.Diagnostics.Tracing.EventSource Trying to use this with my PCL, nit sure what's wrong. It's not a beta version of event source. Restoring packages for 'Symbiotic.Core'. Restoring packages for F:\Dev\FrozenElephant\SymbioticORM\Symbiotic\Symbiotic.Core\project.json... Installing Microsoft.Diagnostics.Tracing.EventSource.Redist 1.1.28. Installing Microsoft.Diagnostics.Tracing.EventSource 1.1.28. Installing Microsoft.Diagnostics.Tracing.EventRegister 1.1.28. Microsoft.Diagnostics.Tracing.EventSource.Redist 1.1.28 is not compatible with .NETPlatform,Version=v5.0. Some packages are not compatible with .NETPlatform,Version=v5.0. All packages are compatible with .NETFramework,Version=v4.6. All packages are compatible with UAP,Version=v10.0. Microsoft.Diagnostics.Tracing.EventSource 1.1.28 is not compatible with DNXCore,Version=v5.0. Microsoft.Diagnostics.Tracing.EventSource.Redist 1.1.28 is not compatible with DNXCore,Version=v5.0. Some packages are not compatible with DNXCore,Version=v5.0. All packages are compatible with .NETFramework,Version=v4.6 (win-x86). All packages are compatible with .NETFramework,Version=v4.6 (win-x64). All packages are compatible with UAP,Version=v10.0 (win10-x86). All packages are compatible with UAP,Version=v10.0 (win10-x86-aot). All packages are compatible with UAP,Version=v10.0 (win10-x64). All packages are compatible with UAP,Version=v10.0 (win10-x64-aot). All packages are compatible with UAP,Version=v10.0 (win10-arm). All packages are compatible with UAP,Version=v10.0 (win10-arm-aot). Microsoft.Diagnostics.Tracing.EventSource 1.1.28 is not compatible with DNXCore,Version=v5.0 (win7-x86). Microsoft.Diagnostics.Tracing.EventSource.Redist 1.1.28 is not compatible with DNXCore,Version=v5.0 (win7-x86). Some packages are not compatible with DNXCore,Version=v5.0 (win7-x86). Microsoft.Diagnostics.Tracing.EventSource 1.1.28 is not compatible with DNXCore,Version=v5.0 (win7-x64). Microsoft.Diagnostics.Tracing.EventSource.Redist 1.1.28 is not compatible with DNXCore,Version=v5.0 (win7-x64). Some packages are not compatible with DNXCore,Version=v5.0 (win7-x64). Package restore failed for 'Symbiotic.Core'. Package restore failed. Rolling back package changes for 'Symbiotic.Core'. ========== Finished ========== 7208 area-System.Runtime string.Join as Concat(separator) extension method on IEnumerable "I find myself reverting string.Join into an extension method in every project I write. Like so: ``` C# public static string Concat(this IEnumerable values, string separator = """") => string.Join(separator, values); ``` it's considerably more flexible and enjoyable to use especially when chaining together with Linq to objects queries: ``` C# intList.Where(n => n > 50).OrderBy(n => n).Concat("", "") ``` as oppose to: ``` C# string.Join("", "", intList.Where(n => n > 50).OrderBy(n => n)) ``` So if I'm not the only one using this method this way, maybe we can add it to the corefx. **Note:** I named it `Concat` because there already exists a standard query operator called `Join`. The name is as much up for discussion as the feature itself. " 7209 area-System.Data Extract duplicated code This resolves https://github.com/dotnet/corefx/issues/5452 7214 area-System.Net Need tests for full-duplex Sockets behavior #7184 fixes a problem we missed in the Sockets tests because we do not have tests which do concurrent sends _and_ receives on a single socket. This is a very common usage, and we should have test coverage for it. 7216 area-System.ComponentModel Use ReflectTypeDescriptor in TypeDescriptor @chlowell 7224 area-System.IO Seg faults on OSX in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_release_prtest/2884/ ``` ./run-test.sh: line 135: 85272 Segmentation fault: 11 ./corerun xunit.console.netcore.exe $testDllName -xml testResults.xml -notrait category=failing $OuterLoop -notrait category=$xunitOSCategory -notrait Benchmark=true error: One or more tests failed while running tests from 'System.IO.FileSystem.Watcher.Tests'. Exit code 139. ``` 7234 area-Infrastructure GetAsync_ResponseWithSetCookieHeaders_AllCookiesRead failed in CI See http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/ubuntu_release_tst_prtest/3294/consoleFull ``` 14:06:32 System.Net.Http.Functional.Tests.HttpClientHandlerTest.GetAsync_ResponseWithSetCookieHeaders_AllCookiesRead(cookie1: [foo, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]) [FAIL] 14:06:32 Assert.Equal() Failure 14:06:32 Expected: 3 14:06:32 Actual: 0 14:06:32 Stack Trace: 14:06:33 at System.Net.Http.Functional.Tests.HttpClientHandlerTest.d__40.MoveNext() 14:06:33 --- End of stack trace from previous location where exception was thrown --- 14:06:33 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:06:33 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:06:33 --- End of stack trace from previous location where exception was thrown --- 14:06:33 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:06:33 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:06:33 --- End of stack trace from previous location where exception was thrown --- 14:06:33 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:06:33 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:06:43 System.Net.Http.Functional.Tests.HttpClientHandlerTest.GetAsync_ResponseWithSetCookieHeaders_AllCookiesRead(cookie1: [foo, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]) [FAIL] 14:06:43 Assert.Equal() Failure 14:06:43 Expected: 3 14:06:43 Actual: 0 14:06:43 Stack Trace: 14:06:43 at System.Net.Http.Functional.Tests.HttpClientHandlerTest.d__40.MoveNext() 14:06:43 --- End of stack trace from previous location where exception was thrown --- 14:06:43 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:06:43 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:06:43 --- End of stack trace from previous location where exception was thrown --- 14:06:43 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:06:43 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:06:43 --- End of stack trace from previous location where exception was thrown --- 14:06:43 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:06:43 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:06:51 System.Net.Http.Functional.Tests.HttpClientHandlerTest.GetAsync_ResponseWithSetCookieHeaders_AllCookiesRead(cookie1: [foo, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]) [FAIL] 14:06:51 Assert.Equal() Failure 14:06:51 Expected: 3 14:06:51 Actual: 0 14:06:51 Stack Trace: 14:06:51 at System.Net.Http.Functional.Tests.HttpClientHandlerTest.d__40.MoveNext() 14:06:51 --- End of stack trace from previous location where exception was thrown --- 14:06:51 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:06:51 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:06:51 --- End of stack trace from previous location where exception was thrown --- 14:06:51 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:06:51 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:06:51 --- End of stack trace from previous location where exception was thrown --- 14:06:51 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:06:51 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` 7235 area-System.Net Add assert for status code to cookies test This test failed once, and I expect it was just due to a network blip that caused the request to fail, but since we're not currently checking the http status code, I can't be sure. As such, I'm just adding another assert for the expected status code, and if this repros again, we'll know whether that's the issue. Closes https://github.com/dotnet/corefx/issues/7234 7244 area-System.Threading TestSendAsync_DelayedConsume test failed in CI ``` 06:21:05 System.Threading.Tasks.Dataflow.Tests.DataflowBlockExtensionsTests.TestSendAsync_DelayedConsume [FAIL] 06:21:05 Assert.False() Failure 06:21:05 Expected: False 06:21:05 Actual: True 06:21:05 Stack Trace: 06:21:05 at System.Threading.Tasks.Dataflow.Tests.DataflowBlockExtensionsTests.d__28.MoveNext() 06:21:05 --- End of stack trace from previous location where exception was thrown --- 06:21:05 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 06:21:05 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 06:21:05 --- End of stack trace from previous location where exception was thrown --- 06:21:05 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 06:21:05 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 06:21:05 --- End of stack trace from previous location where exception was thrown --- 06:21:05 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 06:21:05 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` 7248 area-System.Net System.Net.Http is missing RID for Unix build "Looks like this was regressed with https://github.com/dotnet/corefx/commit/be08afd9701053f5f9369762db58b87c8ca9559f which changed the library to build as ""Unix"" instead of ""Linux"" but didn't update the PackageTargetRuntime conditions in the CSProj. " 7249 area-System.Net Update PTR to Unix for System.Net.HTTP Addresses https://github.com/dotnet/corefx/issues/7248 Validated updated nuspec has runtimes/unix target path [System.Net.Http.nuspec.txt](https://github.com/dotnet/corefx/files/189789/System.Net.Http.nuspec.txt) /cc @ericstj 7252 area-System.Runtime AssemblyLoadContextTest tests failing on Unix in outerloop I assume this is the same problem as with https://github.com/dotnet/corefx/issues/7125 and is due to https://github.com/Microsoft/msbuild/issues/541, but unless we're going to pick up a new msbuild imminently, we should temporarily change this to avoid breaking the outerloop runs. cc: @mellinoe, @gkhanna79 ``` 03:17:12 System.Runtime.Loader.Tests.AssemblyLoadContextTest.LoadAssemblyByPath_ValidUserAssembly [FAIL] 03:17:12 System.IO.FileNotFoundException : Could not load the specified file. 03:17:12 Stack Trace: 03:17:12 at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) 03:17:12 at System.Runtime.Loader.Tests.AssemblyLoadContextTest.LoadAssemblyByPath_ValidUserAssembly() 03:17:12 Finished: System.Runtime.Loader.Tests 03:17:12 03:17:12 === TEST EXECUTION SUMMARY === 03:17:12 System.Runtime.Loader.Tests Total: 10, Errors: 0, Failed: 3, Skipped: 0, Time: 0.265s 03:17:12 System.Runtime.Loader.Tests.AssemblyLoadContextTest.GetLoadContextTest_ValidUserAssembly [FAIL] 03:17:12 System.IO.FileNotFoundException : Could not load the specified file. 03:17:12 Stack Trace: 03:17:12 at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) 03:17:12 at System.Runtime.Loader.Tests.AssemblyLoadContextTest.GetLoadContextTest_ValidUserAssembly() 03:17:12 System.Runtime.Loader.Tests.AssemblyLoadContextTest.LoadAssemblyByStream_ValidUserAssembly [FAIL] 03:17:12 System.IO.FileNotFoundException : Could not load the specified file. 03:17:12 Stack Trace: 03:17:12 at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) 03:17:12 at System.Runtime.Loader.Tests.AssemblyLoadContextTest.LoadAssemblyByStream_ValidUserAssembly() ``` 7254 area-System.Net Shutting down a Socket should not set it to disconnected [Calling `Shutdown` on a `Socket` will cause it to become disconnected](https://github.com/dotnet/corefx/blob/master/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs#L4212) which is incorrect. This can cause, for example, `TcpClient.GetStream` to fail on a half-open socket. 7261 area-Infrastructure Make builds deterministic We need to enable `/deterministic` flag for the compiler and work through any other tools that cause the builds to not be deterministic. See https://github.com/dotnet/roslyn/blob/master/build/scripts/test-determinism.ps1 for how Roslyn tests this. 7266 area-System.Net Lazily allocate ChannelBinding in CurlHandler This SafeHandle is only used by HttpContent-derived types that care about TransportContext, which is not a common case, and it's only used by the implementation when doing something custom with certificates and when there is request content. Lazily allocate it. Just as an example, before this change, it was being allocated during ~50 tests. After this change, it's allocated just once, in the test explicitly verifying the binding. cc: @ericeil, @kapilash, @davidsh 7268 area-System.Net Avoid creating CurlChannelBinding.ToString() description until needed Today CurlChannelBinding creates the result of ToString when the token is set into it. Getting the description of the binding is rare compared to setting a token into the binding, so just create the string when it's requested. Also a bit of miscellaneous cleanup in related code. cc: @bartonjs, @ericeil, @davidsh, @kapilash 7270 area-Meta Archlinux 7 Failed Test Results "``` Running tests in ./bin/tests/Linux.AnyCPU.Release//System.Reflection.Metadata.Tests/dnxcore50 ./corerun xunit.console.netcore.exe System.Reflection.Metadata.Tests.dll -xml testResults.xml -notrait category=failing -notrait category=outerloop -notrait category=nonlinuxtests -notrait Benchmark=true xUnit.net console test runner (64-bit .NET Core) Copyright (C) 2014 Outercurve Foundation. xUnit.net console test runner (64-bit .NET Core) Copyright (C) 2014 Outercurve Foundation. Discovering: System.Xml.RW.RwFactory.Tests xUnit.net console test runner (64-bit .NET Core) Copyright (C) 2014 Outercurve Foundation. Discovering: System.IO.FileSystem.DriveInfo.Tests Discovered: System.Xml.RW.RwFactory.Tests Info: System.Xml.RW.RwFactory.Tests has no tests to run Discovering: System.Reflection.Metadata.Tests Discovered: System.IO.FileSystem.DriveInfo.Tests Starting: System.IO.FileSystem.DriveInfo.Tests Discovered: System.Reflection.Metadata.Tests Starting: System.Reflection.Metadata.Tests System.IO.FileSystem.DriveInfoTests.DriveInfoUnixTests.PropertiesOfValidDrive [FAIL] Assert.Equal() Failure Expected: Fixed Actual: Unknown Stack Trace: at System.IO.FileSystem.DriveInfoTests.DriveInfoUnixTests.PropertiesOfValidDrive() Finished: System.IO.FileSystem.DriveInfo.Tests === TEST EXECUTION SUMMARY === System.IO.FileSystem.DriveInfo.Tests Total: 5, Errors: 0, Failed: 1, Skipped: 0, Time: 1.927s Finished: System.Reflection.Metadata.Tests === TEST EXECUTION SUMMARY === System.Reflection.Metadata.Tests Total: 153, Errors: 0, Failed: 0, Skipped: 0, Time: 1.704s error: One or more tests failed while running tests from 'System.IO.FileSystem.DriveInfo.Tests'. Exit code 1. ``` ``` Running tests in ./bin/tests/Linux.AnyCPU.Release//System.Runtime.Serialization.Json.Tests/dnxcore50 ./corerun xunit.console.netcore.exe System.Runtime.Serialization.Json.Tests.dll -xml testResults.xml -notrait category=failing -notrait category=outerloop -notrait category=nonlinuxtests -notrait Benchmark=true Starting: System.Runtime.Tests CharTests.TestToUpper [FAIL] Assert.Equal() Failure Expected: 0xabbd Actual: 'Ꮽ' Stack Trace: xUnit.net console test runner (64-bit .NET Core) Copyright (C) 2014 Outercurve Foundation. Discovering: System.Runtime.Serialization.Json.Tests at CharTests.TestToUpper() CharTests.TestToUpperInvariant [FAIL] Assert.Equal() Failure Expected: 0xabbd Actual: 'Ꮽ' Stack Trace: at CharTests.TestToUpperInvariant() Discovered: System.Runtime.Serialization.Json.Tests Starting: System.Runtime.Serialization.Json.Tests Finished: System.Runtime.Tests === TEST EXECUTION SUMMARY === System.Runtime.Tests Total: 3786, Errors: 0, Failed: 2, Skipped: 0, Time: 8.102s error: One or more tests failed while running tests from 'System.Runtime.Tests'. Exit code 2. Finished: System.Runtime.Serialization.Json.Tests === TEST EXECUTION SUMMARY === System.Runtime.Serialization.Json.Tests Total: 110, Errors: 0, Failed: 0, Skipped: 0, Time: 6.415s System.Diagnostics.Tests.ProcessTests.TestGetProcesses [FAIL] System.IO.InvalidDataException : Found invalid data while decoding. Stack Trace: at System.IO.StringParser.ParseNextChar() at Interop.procfs.TryParseStatFile(String statFilePath, ParsedStat& result, ReusableTextReader reusableReader) at System.Diagnostics.ProcessManager.CreateProcessInfo(ParsedStat procFsStat, ReusableTextReader reusableReader) at System.Diagnostics.ProcessManager.CreateProcessInfo(Int32 pid, ReusableTextReader reusableReader) at System.Diagnostics.ProcessManager.GetProcessInfos(String machineName) at System.Diagnostics.Process.GetProcesses(String machineName) at System.Diagnostics.Tests.ProcessTests.TestGetProcesses() Finished: System.Diagnostics.Process.Tests === TEST EXECUTION SUMMARY === System.Diagnostics.Process.Tests Total: 87, Errors: 0, Failed: 1, Skipped: 0, Time: 31.505s error: One or more tests failed while running tests from 'System.Diagnostics.Process.Tests'. Exit code 1. ``` ``` Running tests in ./bin/tests/Linux.AnyCPU.Release//System.Runtime.Serialization.Json.Tests/dnxcore50 ./corerun xunit.console.netcore.exe System.Runtime.Serialization.Json.Tests.dll -xml testResults.xml -notrait category=failing -notrait category=outerloop -notrait category=nonlinuxtests -notrait Benchmark=true Starting: System.Runtime.Tests CharTests.TestToUpper [FAIL] Assert.Equal() Failure Expected: 0xabbd Actual: 'Ꮽ' Stack Trace: xUnit.net console test runner (64-bit .NET Core) Copyright (C) 2014 Outercurve Foundation. Discovering: System.Runtime.Serialization.Json.Tests at CharTests.TestToUpper() CharTests.TestToUpperInvariant [FAIL] Assert.Equal() Failure Expected: 0xabbd Actual: 'Ꮽ' Stack Trace: at CharTests.TestToUpperInvariant() Discovered: System.Runtime.Serialization.Json.Tests Starting: System.Runtime.Serialization.Json.Tests Finished: System.Runtime.Tests === TEST EXECUTION SUMMARY === System.Runtime.Tests Total: 3786, Errors: 0, Failed: 2, Skipped: 0, Time: 8.102s error: One or more tests failed while running tests from 'System.Runtime.Tests'. Exit code 2. Finished: System.Runtime.Serialization.Json.Tests === TEST EXECUTION SUMMARY === System.Runtime.Serialization.Json.Tests Total: 110, Errors: 0, Failed: 0, Skipped: 0, Time: 6.415s System.Diagnostics.Tests.ProcessTests.TestGetProcesses [FAIL] System.IO.InvalidDataException : Found invalid data while decoding. Stack Trace: at System.IO.StringParser.ParseNextChar() at Interop.procfs.TryParseStatFile(String statFilePath, ParsedStat& result, ReusableTextReader reusableReader) at System.Diagnostics.ProcessManager.CreateProcessInfo(ParsedStat procFsStat, ReusableTextReader reusableReader) at System.Diagnostics.ProcessManager.CreateProcessInfo(Int32 pid, ReusableTextReader reusableReader) at System.Diagnostics.ProcessManager.GetProcessInfos(String machineName) at System.Diagnostics.Process.GetProcesses(String machineName) at System.Diagnostics.Tests.ProcessTests.TestGetProcesses() Finished: System.Diagnostics.Process.Tests === TEST EXECUTION SUMMARY === System.Diagnostics.Process.Tests Total: 87, Errors: 0, Failed: 1, Skipped: 0, Time: 31.505s error: One or more tests failed while running tests from 'System.Diagnostics.Process.Tests'. Exit code 1. ``` ``` Running tests in ./bin/tests/Linux.AnyCPU.Release//System.Globalization.Calendars.Tests/dnxcore50 ./corerun xunit.console.netcore.exe System.Globalization.Calendars.Tests.dll -xml testResults.xml -notrait category=failing -notrait category=outerloop -notrait category=nonlinuxtests -notrait Benchmark=true xUnit.net console test runner (64-bit .NET Core) Copyright (C) 2014 Outercurve Foundation. Discovering: System.Globalization.Tests Discovered: System.Diagnostics.Tracing.Tests Starting: System.Diagnostics.Tracing.Tests Discovered: System.Globalization.Tests EventSource Error: ERROR: Exception in Command Processing for EventSource BadEventSource_Bad_Type_UserClass: Unsupported type UserClass in event source. Starting: System.Globalization.Tests Finished: System.Diagnostics.Tracing.Tests === TEST EXECUTION SUMMARY === System.Diagnostics.Tracing.Tests Total: 4, Errors: 0, Failed: 0, Skipped: 0, Time: 0.473s xUnit.net console test runner (64-bit .NET Core) Copyright (C) 2014 Outercurve Foundation. Discovering: System.Globalization.Calendars.Tests System.Globalization.Tests.NumberFormatInfoNumberGroupSizes.NumberGroupSizes_Get(format: NumberFormatInfo { CurrencyDecimalDigits = 2, CurrencyDecimalSeparator = ""."", CurrencyGroupSeparator = "","", CurrencyGroupSizes = [3, 2], CurrencyNegativePattern = 9, ... }, expected: [3, 2]) [FAIL] Assert.Equal() Failure Expected: Int32[] [3, 2] Actual: Int32[] [3] Stack Trace: at System.Globalization.Tests.NumberFormatInfoNumberGroupSizes.NumberGroupSizes_Get(NumberFormatInfo format, Int32[] expected) Finished: System.Globalization.Tests === TEST EXECUTION SUMMARY === Discovered: System.Globalization.Calendars.Tests System.Globalization.Tests Total: 984, Errors: 0, Failed: 1, Skipped: 0, Time: 1.548s Starting: System.Globalization.Calendars.Tests error: One or more tests failed while running tests from 'System.Globalization.Tests'. Exit code 1. Finished: System.Globalization.Calendars.Tests === TEST EXECUTION SUMMARY === System.Globalization.Calendars.Tests Total: 1850, Errors: 0, Failed: 0, Skipped: 0, Time: 1.065s ``` ``` Running tests in ./bin/tests/Linux.AnyCPU.Release//System.Net.NetworkInformation.WinRT.Unit.Tests/dnxcore50 ./corerun xunit.console.netcore.exe System.Net.NetworkInformation.WinRT.Unit.Tests.dll -xml testResults.xml -notrait category=failing -notrait category=outerloop -notrait category=nonlinuxtests -notrait Benchmark=true Discovering: System.Net.Ping.Functional.Tests xUnit.net console test runner (64-bit .NET Core) Copyright (C) 2014 Outercurve Foundation. Discovered: System.Net.Ping.Functional.Tests Starting: System.Net.Ping.Functional.Tests Discovering: System.Net.NetworkInformation.WinRT.Unit.Tests Discovered: System.Net.NetworkInformation.WinRT.Unit.Tests Starting: System.Net.NetworkInformation.WinRT.Unit.Tests System.Net.NetworkInformation.Tests.UnixPingUtilityTests.PacketSizeIsRespected(payloadSize: 0) [FAIL] System.InvalidOperationException : Cannot start process because a file name has not been provided. Stack Trace: at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at System.Net.NetworkInformation.Tests.UnixPingUtilityTests.d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Net.NetworkInformation.Tests.UnixPingUtilityTests.PacketSizeIsRespected(payloadSize: 1) [FAIL] System.InvalidOperationException : Cannot start process because a file name has not been provided. Stack Trace: at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at System.Net.NetworkInformation.Tests.UnixPingUtilityTests.d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Net.NetworkInformation.Tests.PingTest.SendPingAsyncWithHostAndTimeout [FAIL] System.Net.NetworkInformation.PingException : An exception occurred during a Ping request. ---- System.PlatformNotSupportedException : The system's ping utility could not be found. Stack Trace: at System.Net.NetworkInformation.Ping.d__25.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Tests.PingTest.d__21.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Tests.PingTest.d__10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at System.Net.NetworkInformation.Ping.d__35.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Ping.d__33.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Ping.d__25.MoveNext() System.Net.NetworkInformation.Tests.UnixPingUtilityTests.PacketSizeIsRespected(payloadSize: 50) [FAIL] System.InvalidOperationException : Cannot start process because a file name has not been provided. Stack Trace: at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at System.Net.NetworkInformation.Tests.UnixPingUtilityTests.d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Net.NetworkInformation.Tests.UnixPingUtilityTests.PacketSizeIsRespected(payloadSize: 1000) [FAIL] System.InvalidOperationException : Cannot start process because a file name has not been provided. Stack Trace: at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at System.Net.NetworkInformation.Tests.UnixPingUtilityTests.d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Net.NetworkInformation.Tests.PingTest.SendPingAsyncWithIPAddressAndTimeoutAndBufferAndPingOptions_Unix [FAIL] System.PlatformNotSupportedException : The system's ping utility could not be found. Stack Trace: at System.Net.NetworkInformation.Ping.d__35.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Ping.d__33.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Tests.PingTest.d__21.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Tests.PingTest.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Net.NetworkInformation.Tests.PingTest.SendPingAsyncWithHostAndTimeoutAndBufferAndPingOptions_Unix [FAIL] System.Net.NetworkInformation.PingException : An exception occurred during a Ping request. ---- System.PlatformNotSupportedException : The system's ping utility could not be found. Stack Trace: at System.Net.NetworkInformation.Ping.d__25.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Tests.PingTest.d__21.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Tests.PingTest.d__14.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at System.Net.NetworkInformation.Ping.d__35.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Ping.d__33.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Ping.d__25.MoveNext() System.Net.NetworkInformation.Tests.PingTest.SendPingAsyncWithIPAddressAndTimeout [FAIL] System.PlatformNotSupportedException : The system's ping utility could not be found. Stack Trace: at System.Net.NetworkInformation.Ping.d__35.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Ping.d__33.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Tests.PingTest.d__21.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Tests.PingTest.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Net.NetworkInformation.Tests.PingTest.SendPingAsyncWithHostAndTimeoutAndBuffer_Unix [FAIL] System.Net.NetworkInformation.PingException : An exception occurred during a Ping request. ---- System.PlatformNotSupportedException : The system's ping utility could not be found. Stack Trace: at System.Net.NetworkInformation.Ping.d__25.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Tests.PingTest.d__21.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Tests.PingTest.d__12.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at System.Net.NetworkInformation.Ping.d__35.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Ping.d__33.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Ping.d__25.MoveNext() System.Net.NetworkInformation.Tests.PingTest.SendPingAsyncWithHost [FAIL] System.Net.NetworkInformation.PingException : An exception occurred during a Ping request. ---- System.PlatformNotSupportedException : The system's ping utility could not be found. Stack Trace: at System.Net.NetworkInformation.Ping.d__25.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Tests.PingTest.d__21.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Tests.PingTest.d__9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at System.Net.NetworkInformation.Ping.d__35.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Ping.d__33.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Ping.d__25.MoveNext() System.Net.NetworkInformation.Tests.PingTest.SendPings_ReuseInstance_Hostname [FAIL] System.Net.NetworkInformation.PingException : An exception occurred during a Ping request. ---- System.PlatformNotSupportedException : The system's ping utility could not be found. Stack Trace: at System.Net.NetworkInformation.Ping.d__25.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Net.NetworkInformation.Tests.PingTest.d__15.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at System.Net.NetworkInformation.Ping.d__35.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Ping.d__33.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Ping.d__25.MoveNext() System.Net.NetworkInformation.Tests.PingTest.SendPingAsyncWithIPAddress_AddressAsString [FAIL] System.PlatformNotSupportedException : The system's ping utility could not be found. Stack Trace: at System.Net.NetworkInformation.Ping.d__35.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Ping.d__33.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Tests.PingTest.d__21.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Tests.PingTest.d__3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Net.NetworkInformation.Tests.PingTest.Ping_DisposeAfterSend_Success [FAIL] System.Net.NetworkInformation.PingException : An exception occurred during a Ping request. ---- System.PlatformNotSupportedException : The system's ping utility could not be found. Stack Trace: at System.Net.NetworkInformation.Ping.d__25.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Tests.PingTest.d__16.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at System.Net.NetworkInformation.Ping.d__35.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Ping.d__33.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Ping.d__25.MoveNext() System.Net.NetworkInformation.Tests.PingTest.SendPingAsyncWithIPAddressAndTimeoutAndBuffer_Unix [FAIL] System.PlatformNotSupportedException : The system's ping utility could not be found. Stack Trace: at System.Net.NetworkInformation.Ping.d__35.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Ping.d__33.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Tests.PingTest.d__21.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Tests.PingTest.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Net.NetworkInformation.Tests.PingTest.SendPingAsyncWithIPAddress [FAIL] System.PlatformNotSupportedException : The system's ping utility could not be found. Stack Trace: at System.Net.NetworkInformation.Ping.d__35.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Ping.d__33.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Tests.PingTest.d__21.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.NetworkInformation.Tests.PingTest.d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Finished: System.Net.Ping.Functional.Tests === TEST EXECUTION SUMMARY === System.Net.Ping.Functional.Tests Total: 28, Errors: 0, Failed: 15, Skipped: 0, Time: 1.257s error: One or more tests failed while running tests from 'System.Net.Ping.Functional.Tests'. Exit code 15. Finished: System.Net.NetworkInformation.WinRT.Unit.Tests === TEST EXECUTION SUMMARY === System.Net.NetworkInformation.WinRT.Unit.Tests Total: 5, Errors: 0, Failed: 0, Skipped: 0, Time: 0.693s ``` ``` Running tests in ./bin/tests/Linux.AnyCPU.Release//System.Runtime.Loader.DefaultContext.Tests/dnxcore50 ./corerun xunit.console.netcore.exe System.Runtime.Loader.DefaultContext.Tests.dll -xml testResults.xml -notrait category=failing -notrait category=outerloop -notrait category=nonlinuxtests -notrait Benchmark=true Discovering: System.Runtime.Loader.Tests Discovered: System.Runtime.Loader.Tests Starting: System.Runtime.Loader.Tests xUnit.net console test runner (64-bit .NET Core) Copyright (C) 2014 Outercurve Foundation. Discovering: System.Runtime.Loader.DefaultContext.Tests System.Runtime.Loader.Tests.AssemblyLoadContextTest.LoadAssemblyByPath_ValidUserAssembly [FAIL] System.IO.FileNotFoundException : Could not load the specified file. Stack Trace: at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) at System.Runtime.Loader.Tests.AssemblyLoadContextTest.LoadAssemblyByPath_ValidUserAssembly() System.Runtime.Loader.Tests.AssemblyLoadContextTest.GetLoadContextTest_ValidUserAssembly [FAIL] System.IO.FileNotFoundException : Could not load the specified file. Stack Trace: at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) at System.Runtime.Loader.Tests.AssemblyLoadContextTest.GetLoadContextTest_ValidUserAssembly() System.Runtime.Loader.Tests.AssemblyLoadContextTest.LoadAssemblyByStream_ValidUserAssembly [FAIL] System.IO.FileNotFoundException : Could not load the specified file. Stack Trace: at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) at System.Runtime.Loader.Tests.AssemblyLoadContextTest.LoadAssemblyByStream_ValidUserAssembly() Finished: System.Runtime.Loader.Tests === TEST EXECUTION SUMMARY === Discovered: System.Runtime.Loader.DefaultContext.Tests System.Runtime.Loader.Tests Total: 10, Errors: 0, Failed: 3, Skipped: 0, Time: 1.025s Starting: System.Runtime.Loader.DefaultContext.Tests error: One or more tests failed while running tests from 'System.Runtime.Loader.Tests'. Exit code 3. Finished: System.Runtime.Loader.DefaultContext.Tests === TEST EXECUTION SUMMARY === System.Runtime.Loader.DefaultContext.Tests Total: 2, Errors: 0, Failed: 0, Skipped: 0, Time: 1.039s Finished: System.Security.Cryptography.Algorithms.Tests === TEST EXECUTION SUMMARY === System.Security.Cryptography.Algorithms.Tests Total: 253, Errors: 0, Failed: 0, Skipped: 0, Time: 12.283s Test project file ./src/System.Security.Cryptography.ProtectedData/tests/System.Security.Cryptography.ProtectedData.Tests.csproj indicates this test is not supported on Linux, skipping Test project file ./src/System.Security.Cryptography.Csp/tests/System.Security.Cryptography.Csp.Tests.csproj indicates this test is not supported on Linux, skipping ``` ``` 7 test(s) failed ``` I only counted 6? Basically only grepping the sections between ""Running tests in"". " 7272 area-System.Net Remove unnecessary branches in UrlDecoder FlushBytes already checks for if _numBytes > 0 so we can remove this check at the call site I renamed FlushBytes to FlushBytesIfNeeded to convey this semantic at the call site /cc @stephentoub @jamesqo 7274 area-System.Runtime Type forwarding for same type defined in both System.Runtime.Interop and *.PInvoke assembly "Currently, type forwarding is defined for (for example, but not limited to) the **System.Runtime.InteropServices.GuidAttribute** type in both the **System.Runtime.InteropServices.PInvoke** and the **System.Runtime.InteropServices** assembly. The nuget packages for these assemblies are listed as dependencies of the **Microsoft.NETCore** package in the latest build (5.0.1-rc3-23925-00): ``` json ""Microsoft.NETCore/5.0.1-rc3-23925-00"": { ""type"": ""package"", ""dependencies"": { ""System.Runtime.InteropServices"": ""4.1.0-rc3-23925-00"", ""System.Runtime.InteropServices.PInvoke"": ""4.0.0-rc3-23925-00"", } ``` This means that if you reference the latest build of **Microsoft.NETCore.UniversalWindowsPlatform** (5.2.0-rc3-23925-00), you'll get the following compile error whenever you use one of the types that are forwarded in these two assemblies: _error CS0433: The type 'GuidAttribute' exists in both 'System.Runtime.InteropServices.PInvoke, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System.Runtime.InteropServices, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'_ Sorry if I'm missing the obvious here ... " 7277 area-System.Net #7276 Fix Socket.SendAsync calling NetEventSource.Enter twice 7280 area-System.Collections Inconsistent bounds checking for CopyTo operations (Standard collections, Generics and Specialized) "Consider the following example (trying to copy an empty dictionary to 1-sized buffer starting from index 1, 1 is out of bounds, no exceptions been thrown) ``` C# using System; using System.Collections; using System.Collections.Generic; using System.Linq; namespace TestX { class Program { static void Main(string[] args) { var dictionary = new Dictionary(); var dictionaryAsCollection = dictionary as ICollection; var buffer = new KeyValuePair[1]; dictionaryAsCollection.CopyTo(buffer, 1); // 1 is out of bounds for buffer Console.WriteLine(buffer.First()); } } } ``` Now we change CopyTo arguments (1 -> 2), this code will throw an exception (ArgumentOutOfRangeException) ``` C# using System; using System.Collections; using System.Collections.Generic; using System.Linq; namespace TestX { class Program { static void Main(string[] args) { var dictionary = new Dictionary(); var dictionaryAsCollection = dictionary as ICollection; var buffer = new KeyValuePair[1]; dictionaryAsCollection.CopyTo(buffer, 2); // 2 is out of bounds for buffer Console.WriteLine(buffer.First()); } } } ``` Now, instead of changing CopyTo arguments, add an element to the dictionary. We will receive an exception of type ArgumentException ``` C# using System.Collections; using System.Collections.Generic; using System.Linq; namespace TestX { class Program { static void Main(string[] args) { var dictionary = new Dictionary(); dictionary.Add(""Test"", ""Ok""); // new dictionary element var dictionaryAsCollection = dictionary as ICollection; var buffer = new KeyValuePair[1]; dictionaryAsCollection.CopyTo(buffer, 1); // 1 is out of bounds for buffer Console.WriteLine(buffer.First()); } } } ``` For (almost) all the standard collections there are an issue: when CopyTo starting index is equal to destination buffer length, no ArgumentOutOfRangeException is thrown. For me it seems inconsistent: CopyTo(buffer, 1) should throw ArgumentOutOfRangeException in all cases except CopyTo(buffer, 0), because this time it is only valid argument value. I've created a small project in order to demonstrate this issue: https://github.com/nettsundere/CollectionsCopyTo And the output is: ``` Trying to copy to buffer having size of 1 starting with index=1 -------------------------------------------------- Array No exceptions -------------------------------------------------- ArrayList No exceptions -------------------------------------------------- BitArray No exceptions -------------------------------------------------- ConcurrentBag No exceptions -------------------------------------------------- ConcurrentDictionary No exceptions -------------------------------------------------- ConcurrentQueue No exceptions -------------------------------------------------- ConcurrentStack No exceptions -------------------------------------------------- Dictionary No exceptions -------------------------------------------------- HashSet No exceptions -------------------------------------------------- Hashtable No exceptions -------------------------------------------------- HybridDictionary No exceptions -------------------------------------------------- List No exceptions -------------------------------------------------- LinkedList No exceptions -------------------------------------------------- ListDictionary No exceptions -------------------------------------------------- NameValueCollection No exceptions -------------------------------------------------- Queue No exceptions -------------------------------------------------- Queue (Generic) No exceptions -------------------------------------------------- Readonly collection No exceptions -------------------------------------------------- SortedDictionary No exceptions -------------------------------------------------- SortedList No exceptions -------------------------------------------------- SortedList (Generic) No exceptions -------------------------------------------------- Sorted set No exceptions -------------------------------------------------- Stack No exceptions -------------------------------------------------- Stack (Generic) No exceptions -------------------------------------------------- StringDictionary No exceptions - - - Trying to copy to buffer having size of 1 starting with index=2 -------------------------------------------------- Array System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds. at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Array.CopyTo(Array array, Int32 index) at CollectionsCopyTo.CopyToExample.ArrayCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 16 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__0() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 22 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- ArrayList System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds. at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Collections.ArrayList.CopyTo(Array array, Int32 arrayIndex) at CollectionsCopyTo.CopyToExample.ArrayListCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 28 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__1() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 23 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- BitArray System.ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection. at System.Collections.BitArray.CopyTo(Array array, Int32 index) at CollectionsCopyTo.CopyToExample.BitArrayCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 42 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__2() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 24 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- ConcurrentBag No exceptions -------------------------------------------------- ConcurrentDictionary System.ArgumentException: The index is equal to or greater than the length of the array, or the number of elements in the dictionary is greater than the available space from index to the end ination array. at System.Collections.Concurrent.ConcurrentDictionary`2.System.Collections.ICollection.CopyTo(Array array, Int32 index) at CollectionsCopyTo.CopyToExample.ConcurrentDictionaryCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 71 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__4() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 26 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- ConcurrentQueue System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds. at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Collections.Concurrent.ConcurrentQueue`1.CopyTo(T[] array, Int32 index) at CollectionsCopyTo.CopyToExample.ConcurrentQueueCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 99 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__5() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 27 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- ConcurrentStack System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds. at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Collections.Concurrent.ConcurrentStack`1.CopyTo(T[] array, Int32 index) at CollectionsCopyTo.CopyToExample.ConcurrentStackCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 85 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__6() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 28 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- Dictionary System.ArgumentOutOfRangeException: Non-negative number required. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at System.Collections.Generic.Dictionary`2.System.Collections.ICollection.CopyTo(Array array, Int32 index) at CollectionsCopyTo.CopyToExample.DictionaryCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 114 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__7() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 29 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- HashSet System.ArgumentException: Destination array is not long enough to copy all the items in the collection. Check array index and length. at System.Collections.Generic.HashSet`1.CopyTo(T[] array, Int32 arrayIndex, Int32 count) at CollectionsCopyTo.CopyToExample.HashSetCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 128 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__8() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 30 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- Hashtable System.ArgumentException: Destination array is not long enough to copy all the items in the collection. Check array index and length. at System.Collections.Hashtable.CopyTo(Array array, Int32 arrayIndex) at CollectionsCopyTo.CopyToExample.HashtableCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 143 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__9() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 31 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- HybridDictionary System.ArgumentException: Insufficient space in the target location to copy the information. at System.Collections.Specialized.ListDictionary.CopyTo(Array array, Int32 index) at CollectionsCopyTo.CopyToExample.HybridDictionaryCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 158 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__10() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 32 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- List System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds. at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Collections.Generic.List`1.CopyTo(T[] array, Int32 arrayIndex) at CollectionsCopyTo.CopyToExample.ListCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 172 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__11() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 33 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- LinkedList System.ArgumentOutOfRangeException: Must be less than or equal to the size of the collection. Parameter name: index Actual value was 2. at System.Collections.Generic.LinkedList`1.CopyTo(T[] array, Int32 index) at CollectionsCopyTo.CopyToExample.LinkedListCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 186 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__12() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 34 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- ListDictionary System.ArgumentException: Insufficient space in the target location to copy the information. at System.Collections.Specialized.ListDictionary.CopyTo(Array array, Int32 index) at CollectionsCopyTo.CopyToExample.ListDictionaryCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 200 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__13() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 35 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- NameValueCollection System.ArgumentException: Insufficient space in the target location to copy the information. at System.Collections.Specialized.NameValueCollection.CopyTo(Array dest, Int32 index) at CollectionsCopyTo.CopyToExample.NameValueCollectionCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 214 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__14() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 36 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- Queue System.ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection. at System.Collections.Queue.CopyTo(Array array, Int32 index) at CollectionsCopyTo.CopyToExample.QueueCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 242 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__15() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 37 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- Queue (Generic) System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: arrayIndex Actual value was 2. at System.Collections.Generic.Queue`1.CopyTo(T[] array, Int32 arrayIndex) at CollectionsCopyTo.CopyToExample.QueueGenericCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 228 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__16() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 38 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- Readonly collection System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds. at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Collections.Generic.List`1.CopyTo(T[] array, Int32 arrayIndex) at CollectionsCopyTo.CopyToExample.ReadOnlyCollectionCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 256 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__17() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 39 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- SortedDictionary System.ArgumentException: Destination array is not long enough to copy all the items in the collection. Check array index and length. at System.Collections.Generic.SortedSet`1.System.Collections.ICollection.CopyTo(Array array, Int32 index) at CollectionsCopyTo.CopyToExample.SortedDictionaryCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 271 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__18() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 40 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- SortedList System.ArgumentException: Destination array is not long enough to copy all the items in the collection. Check array index and length. at System.Collections.SortedList.CopyTo(Array array, Int32 arrayIndex) at CollectionsCopyTo.CopyToExample.SortedListCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 301 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__19() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 41 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- SortedList (Generic) System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index Actual value was 2. at System.Collections.Generic.SortedList`2.System.Collections.ICollection.CopyTo(Array array, Int32 index) at CollectionsCopyTo.CopyToExample.SortedListGenericCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 286 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__20() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 42 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- Sorted set System.ArgumentException: Destination array is not long enough to copy all the items in the collection. Check array index and length. at System.Collections.Generic.SortedSet`1.CopyTo(T[] array, Int32 index, Int32 count) at CollectionsCopyTo.CopyToExample.SortedSetCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 315 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__21() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 43 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- Stack System.ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection. at System.Collections.Stack.CopyTo(Array array, Int32 index) at CollectionsCopyTo.CopyToExample.StackCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 343 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__22() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 44 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- Stack (Generic) System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: arrayIndex Actual value was 2. at System.Collections.Generic.Stack`1.CopyTo(T[] array, Int32 arrayIndex) at CollectionsCopyTo.CopyToExample.StackGenericCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 329 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__23() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 45 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 -------------------------------------------------- StringDictionary System.ArgumentException: Destination array is not long enough to copy all the items in the collection. Check array index and length. at System.Collections.Hashtable.CopyTo(Array array, Int32 arrayIndex) at CollectionsCopyTo.CopyToExample.StringDictionaryCopyTo(Boolean greaterIndex) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\CopyToExample.cs:line 357 at CollectionsCopyTo.Program.<>c__DisplayClass1_0.b__24() in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 46 at CollectionsCopyTo.Program.FormatExceptionDetails(String header, Action exampleAction) in C:\Users\nettsundere\Documents\Visual Studio 2015\Projects\collectionsCopyTo\Program.cs:line 55 ``` upd: Fixed BitArray result upd2: Updated dependencies, new output This is obviously a breaking change, so I'm not changing anything, just trying to report / discuss an issue. " 7282 area-System.Net Ensure CurlHandler sets CBT even on fast verification path When we get called back by libcurl to verify the server's certificate, we try to take a fast path where we use OpenSSL's certificate verification rather than doing our own, which is more comprehensive but also slower. However, when we added that fast path, we inadvertently ended up not setting the Channel Binding Token in that case, only doing so in the fallback path. This fixes that, moving the configuring of the CBT up to before we ask OpenSSL to verify the cert. (I'd recommend reviewing the src changes with the whitespace-ignored view: https://github.com/dotnet/corefx/pull/7282/files?w=1) cc: @bartonjs, @kapilash, @davidsh 7284 area-System.Data Misleading ADP_OpenReaderExists exception message on MARS-disabled Sql Connection when incorrectly doing parallel requests "I've discovered the issue using ordinary .net4.5 on Windows but further investigating shows that it is related to code that now is in the .net Core While simultaneousely (incrorrcetly) using single SqlConnection with Multiple Active Result Sets (MARS) disabled an exception with text ``` There is already an open DataReader associated with this Command which must be closed first. ``` Note that text mentions same ""Command"" but in reality the resource taht is wrongly shared is not command but connection. The exception is raised from https://github.com/dotnet/corefx/blob/cf19c22be88b5ea31b5e2ea69ab3632f930b1e26/src/System.Data.SqlClient/src/System/Data/SqlClient/SqlInternalConnectionTds.cs#L587 The comment ``` // if MARS is on, then a datareader associated with the command exists // or if MARS is off, then a datareader exists ``` above raising the exception is absolutely correct - if MARS is on the exception text is correct - problem is in using multiple readers with single command. But if mars is off the checks above checking for any active datareaders for the same connection, not only for datareaders for the same command. So the problem is that information about what scope (Connection or Command) was checked is not passed to exception cinstructor and it incorrectly always says that there is another reader associated with the _command_ " 7285 area-System.Net Reduce allocations in CookieContainer.GetCookieHeader "HttpClient defaults to UseCookies=true, which means by default every request ends up asking the CookieContainer to get the cookie header that should be used. Today, even if there aren't any cookies for the given Uri, this ends up doing a lot of allocation. And if there are cookies for the Uri, the serialization of each cookie results in a handful of strings, char[]s, and string[] allocations. This commit tweaks the implementation to avoid a bunch of these, including taking advantage of StringBuilderCache. (There are still some more that could be cleaned up with further work, but it becomes much more invasive.) For this sample program: ``` C# CookieContainer cc = new CookieContainer(); Uri exists = new Uri(""http://example.com/exists""); Uri notExists = new Uri(""http://example.com/notExists""); cc.Add(exists, new Cookie(""test1"", ""value1"")); cc.Add(exists, new Cookie(""test2"", ""value2"")); for (int i = 0; i < 1000; i++) { cc.GetCookieHeader(exists); } ``` before these changes, I see the following allocations: ![image](https://cloud.githubusercontent.com/assets/2642209/14066895/e68b9854-f424-11e5-910e-a65caff8f4ce.png) and after thes changes: ![image](https://cloud.githubusercontent.com/assets/2642209/14066898/14d278ae-f425-11e5-8f07-82bb29139f59.png) If I then change the GetCookieHeader line to be: ``` C# cc.GetCookieHeader(notExists); ``` before these changes, I see the following allocations: ![image](https://cloud.githubusercontent.com/assets/2642209/14066925/ad052856-f425-11e5-9049-1e38d8432687.png) and after these changes: ![image](https://cloud.githubusercontent.com/assets/2642209/14066930/c066e6c8-f425-11e5-82ce-989b6692d0a8.png) cc: @davidsh, @cipop, @ericeil " 7289 area-System.Net WebHeaderCollection: Specify ArgumentException paramName Split `CheckBadChars` into separate `CheckBadHeaderValueChars` and `CheckBadHeaderNameChars` methods and use `nameof` to include the `paramName` when throwing `ArgumentException`. 7292 area-System.Net Remove unnecessary string allocations in MultipartContent "More low-hanging fruit. When building up its output, MultipartContent is already using a StringBuilder, but it's creating temporary intermediate strings which it then writes to the StringBuilder, rather than just adding the constituent pieces to the StringBuilder directly. And when computing the length of the output, it's again generating lots of intermediate strings, when it could instead just measure the size of each of the constituent pieces. For a little perf test: ``` C# var subContent = new ByteArrayContent(Encoding.UTF8.GetBytes(""This is a ByteArrayContent"")); subContent.Headers.Add(""header1"", ""value1""); subContent.Headers.Add(""header2"", new[] { ""value2"", ""value3"", ""value4"" }); for (int i = 0; i < 1000; i++) { var mc = new MultipartContent(); mc.Add(subContent); mc.ReadAsStringAsync().GetAwaiter().GetResult(); } ``` Before: ![image](https://cloud.githubusercontent.com/assets/2642209/14069816/ba661554-f46c-11e5-8e26-b9616922b493.png) After: ![image](https://cloud.githubusercontent.com/assets/2642209/14069820/c8400bf8-f46c-11e5-8540-8c2a5d942340.png) cc: @davidsh, @cipop, @ericeil " 7293 area-System.Net Replace HttpContent.CreateCompletedTask with Task.CompletedTask We can just use Task.CompletedTask, rather than creating a new TCS and its Task each time. cc: @davidsh, @cipop, @ericeil 7294 area-Infrastructure "Win7 builds failing with """"GetTargetMachineInfo"" task failed unexpectedly""" "e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_win7_debug/141/console ``` d:\j\workspace\outerloop_win---9c9e7d59\Tools\publishtest.targets(77,5): error MSB4018: The ""GetTargetMachineInfo"" task failed unexpectedly. [d:\j\workspace\outerloop_win---9c9e7d59\src\Common\tests\Common.Tests.csproj] 18:12:03 d:\j\workspace\outerloop_win---9c9e7d59\Tools\publishtest.targets(77,5): error MSB4018: System.DllNotFoundException: Unable to load DLL 'api-ms-win-core-sysinfo-l1-2-0.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) [d:\j\workspace\outerloop_win---9c9e7d59\src\Common\tests\Common.Tests.csproj] 18:12:03 d:\j\workspace\outerloop_win---9c9e7d59\Tools\publishtest.targets(77,5): error MSB4018: at Interop.mincore.GetNativeSystemInfo(SYSTEM_INFO& lpSystemInfo) [d:\j\workspace\outerloop_win---9c9e7d59\src\Common\tests\Common.Tests.csproj] 18:12:03 d:\j\workspace\outerloop_win---9c9e7d59\Tools\publishtest.targets(77,5): error MSB4018: at System.Runtime.InteropServices.RuntimeInformation.get_OSArchitecture() [d:\j\workspace\outerloop_win---9c9e7d59\src\Common\tests\Common.Tests.csproj] 18:12:03 d:\j\workspace\outerloop_win---9c9e7d59\Tools\publishtest.targets(77,5): error MSB4018: at Microsoft.DotNet.Build.Tasks.GetTargetMachineInfo.Execute() [d:\j\workspace\outerloop_win---9c9e7d59\src\Common\tests\Common.Tests.csproj] 18:12:03 d:\j\workspace\outerloop_win---9c9e7d59\Tools\publishtest.targets(77,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [d:\j\workspace\outerloop_win---9c9e7d59\src\Common\tests\Common.Tests.csproj] 18:12:03 d:\j\workspace\outerloop_win---9c9e7d59\Tools\publishtest.targets(77,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() [d:\j\workspace\outerloop_win---9c9e7d59\src\Common\tests\Common.Tests.csproj] ``` " 7295 area-System.Net [System.Net.Security]Disable direct Use of NTLM This is to track the changes to disable NTLM usage directly, 7298 area-Infrastructure "All builds failing with error ""Cannot delete workspace: remote file operation failed""" e.g. ``` 03:50:35 GitHub pull request #7297 of commit 8fcc99132a7a6f7781304fdb1321e4ad5ffb8ec7, no merge conflicts. 03:50:35 Setting status of 8fcc99132a7a6f7781304fdb1321e4ad5ffb8ec7 to PENDING with url http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_debug_prtest/4085/ and message: 'Build started sha1 is merged.' 03:50:35 Using context: Innerloop Windows_NT Debug Build and Test 03:50:35 Building remotely on dci-win-bld-15 (windows-roslyn windows) in workspace d:\j\workspace\windows_nt_de---06b7984d 03:50:35 [WS-CLEANUP] Deleting project workspace... 03:50:41 ERROR: [WS-CLEANUP] Cannot delete workspace: remote file operation failed: d:\j\workspace\windows_nt_de---06b7984d at hudson.remoting.Channel@728b6416:dci-win-bld-15: hudson.remoting.ChannelClosedException: channel is already closed 03:50:41 ERROR: Cannot delete workspace: remote file operation failed: d:\j\workspace\windows_nt_de---06b7984d at hudson.remoting.Channel@728b6416:dci-win-bld-15: hudson.remoting.ChannelClosedException: channel is already closed ``` 7299 area-Infrastructure System.Globalization.Tests.CompareInfoTests.GetHashCode_EmptyString failed on Ubuntu 14.04 outerloop http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_ubuntu14.04_debug/58/consoleFull ``` 02:40:21 Discovering: System.Globalization.Tests 02:40:21 Discovered: System.Globalization.Tests 02:40:21 Starting: System.Globalization.Tests 02:40:21 System.Globalization.Tests.CompareInfoTests.GetHashCode_EmptyString [FAIL] 02:40:22 Assert.Equal() Failure 02:40:22 Expected: 0 02:40:22 Actual: -482897332 02:40:22 Stack Trace: 02:40:22 at System.Globalization.Tests.CompareInfoTests.GetHashCode_EmptyString() 02:40:22 Finished: System.Globalization.Tests 02:40:22 ``` 7302 area-System.Net Improve memory usage of HttpClient's StreamToStreamCopy "Copying between streams represents one of the larger sources of memory allocations and copying in HttpClient. HttpClient has its own stream-to-stream copy implementation, but there are ways we can significantly improve it based on typical usage within HttpClient. This commit does the following: - Previously it would special case when both the source and destination stream were MemoryStreams, but even in that case it would allocate a temporary buffer and do a Read/Write loop to copy between them, and even then it's relatively rare to copy from a MemoryStream to a MemoryStream. Instead, if the source stream is a MemoryStream and we can get its buffer, we can do a single write to the destination (regardless of what kind of stream it is), avoiding the need for multiple read/writes and for the temporary buffer. If we can't get its buffer but its length is known to be less than or equal to the requested buffer size and it's positioned at the beginning, we can simply ToArray the source and still do a single write to the target. - If the destination is the special LimitMemoryStream, used for buffering output, and if that LimitMemoryStream was pre-sized based on the response having a Content-Length, then rather than allocating a temporary buffer and repeatedly copying from the source stream into that buffer and copying from the buffer into the memory stream, we can instead give the destination's buffer directly to be read into by the source, avoiding the temporary buffer and the extra copies. This is a very common case. - If the source does not need to be disposed after the copy, rather than doing our own copy loop, we can instead ask the source to use its CopyToAsync implementation to copy to the destination stream. Worst case this will be exactly what we were previously doing, but best case the source has its own CopyToAsync override that's more efficient. - When constructing a LimitMemoryStream, if the Content-Length isn't known, we were explicitly passing a 0 capacity to the base, which causes it to allocate a new zero-length array; I've added a ctor to avoid that. As a small example, with this short test: ``` C# var uri = new Uri(""http://httpbin.org/get""); var c = new HttpClient(); for (int i = 0; i < 100; i++) c.GetAsync(uri).GetAwaiter().GetResult().Dispose(); ``` before the change it allocated 1,411,714 bytes, and after the change, it allocated 1,003,702, for an ~30% reduction. That drop is almost entirely in avoiding needing byte[]s: I'd appreciate some extra scrutiny on this. cc: @davidsh, @cipop, @ericeil, @kapilash, @bartonjs, @ianhays " 7304 area-System.Numerics Vector while debugging incorrectly reports size of register The `Vector` type on a machine which supports 256 bit registers will return 8, however the debug/non-accelerated version of the register only will act as a 128bit register. This means that algorithms that look like so:: ``` csharp for(var offset= 0;count >= Vector.Count; count-= Vector.Count, offset+= Vector.Count) ``` Will go out of bounds or skip elements potentially while debugging giving an incorrect test. 7306 area-System.ComponentModel Small changes to unblock test scenario cc @twsouthwick 7311 area-System.ComponentModel Add support for IsDefaultAttribute on TypeDescriptor attributes This adds a layer between `System.Attribute` and the TypeDescriptor attributes that expose `IsDefaultAttribute`, `Matches`, and `TypeId` as these are used extensively in the TypeDescriptor implementation. @chlowell 7315 area-System.Net Refactor HttpClient with async/await "When HttpClient was initially written, async/await didn't exist, and it was written to use ContinueWith. By switching to async/await, we can both improve the readability and maintainability of the code and improve performance. This commit addresses just the HttpClient class and not the rest of the library, but those can follow. From a readability/maintainability perspective, the code is now more concise and linear, which should hopefully be evident from the diff. From a performance perspective, here's a little test using GetStringAsync: ``` C# var c = new HttpClient(); var url = new Uri(""http://httpbin.org/get""); for (int i = 0; i < 100; i++) { c.GetStringAsync(url).GetAwaiter().GetResult(); } ``` and here's an allocation comparison showing the number of allocations that change due to this switch: ![image](https://cloud.githubusercontent.com/assets/2642209/14107936/d5d5f738-f588-11e5-97c5-80fb22aac69f.png) and showing the amount of memory allocated: ![image](https://cloud.githubusercontent.com/assets/2642209/14107972/05ef2f0c-f589-11e5-949d-13a5e935a210.png) cc: @davidsh, @cipop, @ericeil " 7317 area-System.Net Unix NegotiateStream: Addressing PR feedback #7031 listed out the places in NegotiateStream that needed fix. This PR addresses those of the comments where the scope is limited to NegotiateStream functionality. Specifically, - the tests are cleaned up to remove boilerplate code. - `SecurityStatusAdapterPal` is changed to include a static constructor in the Debug mode. - Constants in pal_gssapi.cpp are defined at a single location. - CMakeLists.txt is modified to give proper, OS-specific error message 7318 area-System.Net Improve serial throughput of HttpClient on Unix "HttpClient on Unix has a thread dedicated to multiplexing the processing of any number of concurrent requests on that client. When a request comes in and that worker thread isn't running, a worker is spun up, and that worker will service any number of requests that come in while it's up. Then, when requests quiesce and there's no more processing to be done, the worker goes away. If more work later arrives, a new worker is spun up. This is done to avoid burning a thread per HttpClient when there's no work to be done on that client. It works well for bursts of activity as well as for sustained concurrent usage. However, if the client is used for a sequence of requests, one after the other, there's a good chance that the worker will go away between requests, requiring a new worker to be spun up for each. This has non-trivial costs, both in terms of CPU processing and in terms of managed and native resource allocation/deallocation. This commit enables a worker to briefly pause before exiting, blocking for a short period of time for new work to arrive rather than simply exiting. With a simple serial workload like: ``` C# using System; using System.Diagnostics; using System.Net.Http; using System.Threading.Tasks; public class Program { public static void Main() { MainAsync().GetAwaiter().GetResult(); } private static async Task MainAsync() { var c = new HttpClient(); var url = new Uri(""http://httpbin.org/ip""); while (true) { var sw = Stopwatch.StartNew(); for (int i = 0; i < 100; i++) { await c.GetStringAsync(url); } Console.WriteLine(sw.Elapsed.TotalSeconds); Task.Delay(500).Wait(); } } } ``` Prior to this change, each run of 100 requests would end up spinning up anywhere between 20 and 40 workers, whereas after the change it typically only spins up 1. This has a significant impact on throughput, typically doubling throughput of this test on my machine, e.g. before: ``` 4.1502928 3.8951023 4.7506992 4.0254529 ``` and after: ``` 2.2819518 1.9307756 1.9129248 1.8165896 ``` cc: @ericeil, @kapilash, @davidsh, @cipop " 7323 area-System.Globalization Add a few culture tests to System.Globalization Ports missing ToF tests to Open. resolves #6429 7325 area-System.Security Open System.Security.Principal.WindowsIdentity As a developer I need access to the current logged in active directory user to check if the user has a specific role. Normally I do this with: ``` csharp WindowsIdentity currentUser = WindowsIdentity.GetCurrent(); var groups = currentUser.Groups; //or groups.Claims ``` So I can get the SID or the groups of the user. Most companies want to control the access of the user with active directory. The enterprise application uses this information to determine whether a user got access or not. If there is no api to access this information, enterprise application development with uwp becomes uninteresting. Please help us out! 7326 area-System.Text Fix System.Text.Encoding test helper. A test helper in System.Text.Encoding had a typo that was causing the GetBytes(char[],...) methods to not be tested for positive validation. resolves #6924 7328 area-System.Text Add tests for CodePages with duplicate names. There are two names that have duplicate associated CodePages. For those two names, we have to test with the expectation that querying the name will always return the same codepage. resolves #6456 7329 area-Infrastructure Pass additional arguments to the dev workflow scripts Right now the dev workflow scripts only admits certain parameters and we want the developer to be able to pass additional parameters to them and propagate those parameters to the msbuild call 7330 area-System.Diagnostics Add Tracing test to filter an event with a higher EventLevel We didn't have any tests that filtered events with a higher event level than being listened to. This adds one (adapted from a ToF test) and resolves #6428. 7332 area-System.Collections Fill coverage gaps for Collections.Concurrent One test supplied most of the missing coverage but simply wasn't decorated as a fact. Most other missing coverage bits were the result of the same test taking different code paths from execution to execution (e.g. race conditions) resolves #6417 7335 area-System.Diagnostics Calling EventSource.WriteEvent(int eventId, string arg1, string arg2) throws an ArgumentNullException "I'm calling the method EventSource.WriteEvent(int eventId, string arg1, string arg2) and arg2 is a string with 90947 characters. It throws the following exception: Exception thrown: 'System.ArgumentNullException' in mscorlib.ni.dll Additional information: Value cannot be null. {""Value cannot be null.\r\nParameter name: format""} ``` at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args) at System.String.Format(IFormatProvider provider, String format, Object[] args) at System.Environment.GetResourceString(String key, Object[] values) at System.Diagnostics.Tracing.EventSource.ThrowEventSourceException(String eventName, Exception innerEx) at System.Diagnostics.Tracing.EventSource.WriteEventWithRelatedActivityIdCore(Int32 eventId, Guid* relatedActivityId, Int32 eventDataCount, EventData* data) at System.Diagnostics.Tracing.EventSource.WriteEvent(Int32 eventId, String arg1, String arg2) ``` " 7337 area-System.Net Add more tests for HttpClient To have more confidence while refactoring (https://github.com/dotnet/corefx/pull/7315), added more HttpClient coverage, in particular of error paths. Brings HttpClient line coverage from 64.7% to 98.3%, and branch coverage from 42.3% to 78.7%. cc: @davidsh, @cipop, @ericeil, @kapilash 7340 area-System.Net DnsTests.GetHostEntryAsyncWithAddress failed on outerloop ubuntu14.04, ipaddress is null. ``` Discovering: System.Net.NameResolution.Functional.Tests 02:06:51 Discovered: System.Net.NameResolution.Functional.Tests 02:06:51 Starting: System.Net.NameResolution.Functional.Tests 02:06:51 System.Net.NameResolution.Tests.DnsTests.GetHostEntryAsyncWithAddress [FAIL] 02:06:51 System.ArgumentNullException : Value cannot be null. 02:06:51 Parameter name: address 02:06:51 Stack Trace: 02:06:51 at System.Net.Dns.HostResolutionBeginHelper(IPAddress address, Boolean flowContext, Boolean includeIPv6, AsyncCallback requestCallback, Object state) 02:06:51 at System.Net.Dns.BeginGetHostEntry(IPAddress address, AsyncCallback requestCallback, Object stateObject) 02:06:51 at System.Net.Dns.<>c.b__15_0(IPAddress arg, AsyncCallback requestCallback, Object stateObject) 02:06:51 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl[TArg1](Func`4 beginMethod, Func`2 endFunction, Action`1 endAction, TArg1 arg1, Object state, TaskCreationOptions creationOptions) 02:06:51 at System.Threading.Tasks.TaskFactory`1.FromAsync[TArg1](Func`4 beginMethod, Func`2 endMethod, TArg1 arg1, Object state) 02:06:51 at System.Net.Dns.GetHostEntryAsync(IPAddress address) 02:06:51 at System.Net.NameResolution.Tests.DnsTests.<>c__DisplayClass1_0.b__0() 02:06:51 at System.Net.NameResolution.Tests.DnsTests.GetHostEntryAsync(Func`1 getHostEntryFunc) 02:06:51 at System.Net.NameResolution.Tests.DnsTests.d__1.MoveNext() 02:06:51 --- End of stack trace from previous location where exception was thrown --- 02:06:51 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 02:06:51 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 02:06:51 --- End of stack trace from previous location where exception was thrown --- 02:06:51 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 02:06:51 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 02:06:51 --- End of stack trace from previous location where exception was thrown --- 02:06:51 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 02:06:51 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 02:06:51 Finished: System.Net.NameResolution.Functional.Tests ``` 7342 area-System.Net ARM build failing due to padding warning in System.Net.Security.Native I encounter a `-Wpadded` warning when building corefx for Linux arm32 environment (using the `arm cross` option in the build script). The build fails due to the presence of `-Werror` flag. ``` In file included from /home/prajwal/dotnet/corefx/src/Native/System.Net.Security.Native/pal_gssapi.cpp:7: /home/prajwal/dotnet/corefx/src/Native/System.Net.Security.Native/pal_gssapi.h:42:8: error: padding size of 'PAL_GssBuffer' with 4 bytes to alignment boundary [-Werror,-Wpadded] struct PAL_GssBuffer ^ 1 error generated. ``` This occurs due to the size of uint8_t pointer being 4 bytes on Linux arm32. I am able to suppress this warning using the `-Wno-padded` warning in the CMakeLists file. Is this a valid fix (suppressing all future padding warnings)? 7343 area-System.Diagnostics "System.Diagnostics.Process doesn't allow to ""wait and kill"" without a race" "Suppose I have a `System.Diagnostics.Process` bound to some running process. I want to wait until that process exits and if it fails to exit in five seconds I want that process terminated. Here's a piece of pseudocode: ``` if( !process.WaitForExit( 5000 ) ) { process.Kill(); } process.Dispose(); ``` The problem is the process might exit between `WaitForExit()` and `Kill()` and then this code gets a rather generic exception. There's no way to write the code above such that there's no potential for the race condition between the other process exiting and this process making the decision of whether to terminate the other process or not. Same problem on desktop. There're three approaches to how this can be resolved. The first one is that `Kill()` does nothing if the process has exited. This would violate the contract stated in the documentation but it's actually the right thing to do. The purpose of `Kill()` is ""get rid of the process"" and if it so happens the process has exited - okay, nothing to do. I cannot imagine a reasonable case where someone would blindly call `Kill()` and then catch the possible exception and make any decisions on what to do based on whether there was an exception. The second one is that a parameter with a default value is added to `Kill()` - such that it turns into `Kill( bool throwIfExited = true )`. This prevents violating the current contract but honestly it's stupid. The third one is crafting some special exception exactly for this case - such that the caller can reliably detect that the process has exited by programmatically inspecting the exception. This would break the contract and it's also stupid. " 7348 area-System.Net Fix NullReferenceException in HttpClient.BaseAddress when logging enabled cc: @davidsh, @cipop, @josguil 7351 area-System.Globalization CharUnicodeInfo has incorrect results on Unix CharUnicodeInfo is expected to return consistent (identical) results across platforms, according to the latest Unicode Standard - 8.0.0 In PR #7279 I added tests for CharUnicodeInfo: the test data comes from the [publicly available Unicode dataset](http://www.unicode.org/Public/UNIDATA/UnicodeData.txt). The Windows tests pass, but Unix builds don't. Unfortunately, owing to a bug in xunit, we can't use [MemberData], so the first assertion failure stops all the tests from running. I presume there are more failures that therefore aren't being reported Here are some examples of the failures. These are not the only ones - there are many more - CodeValue: 00A7; Expected `GetUnicodeCategory`: OtherPunctuation; actual: OtherSymbol - CodeValue: 09F4; Expected `GetNumericValue`: 0.0625; actual: 1 /cc @tarekgh 7357 area-Infrastructure Win7 run failed with coreclr bind error ``` 10:08:22 Installing dotnet cli... 10:08:26 Restoring BuildTools version 1.0.25-prerelease-00228-02... 10:08:26 Failed to load the dll from d:\j\workspace\outerloop_win---9c9e7d59\Tools\dotnetcli\shared\Microsoft.NETCore.App\1.0.0-rc2-23928\coreclr.dll, HRESULT: 0x8007007E 10:08:26 Failed to bind to coreclr 10:08:26 ERROR: Could not restore build tools correctly. See 'd:\j\workspace\outerloop_win---9c9e7d59\init-tools.log' for more details. ``` This may be from dotnetcli update? cc @dagood 7358 area-System.IO System.IO.FileSystem: Unix SetCurrentDirectory follows symlinks "Using `Directory.SetCurrentDirectory` on a symlink in Unix follows the symlink and sets the directory to what the symlink links to. This differs from the Windows behavior as well as the behavior one would see on the command line using similar utilities. Unit test: ``` [ConditionalFact(nameof(CanCreateSymbolicLinks))] public void SetToPathContainingSymLink() { var path = GetTestFilePath(); var linkPath = GetTestFilePath(); Directory.CreateDirectory(path); Assert.True(MountHelper.CreateSymbolicLink(linkPath, path, isDirectory: true)); // Both the symlink and the target exist Assert.True(Directory.Exists(path), ""path should exist""); Assert.True(Directory.Exists(linkPath), ""linkPath should exist""); // Set Current Directory to symlink string currentDir = Directory.GetCurrentDirectory(); try { Console.WriteLine(""LINKPATH : "" + linkPath); Console.WriteLine(""PATH : "" + path); Directory.SetCurrentDirectory(linkPath); Assert.Equal(path, Directory.GetCurrentDirectory()); } finally { Directory.SetCurrentDirectory(currentDir); } Assert.Equal(currentDir, Directory.GetCurrentDirectory()); } ``` On Windows the current directory is set to LinkPath; on Unix it is path. Ubuntu command line behavior using `cd` and `pwd`: ``` mkdir cat touch cat/fluffy sudo ln -s cat fat cd fat pwd ``` prints `/home/ianha/test/fat`. Ubuntu c program behavior using `getcwd` and `chdir` (what we interop to in System.IO.FileSystem) follows the link as expected: ``` #include #include #include int main(char args[]) { char* currentPath = malloc(300); char linkPath[] = ""fat""; chdir(linkPath); getcwd(currentPath, 299); printf(""%s\n"", currentPath); free(currentPath); } ``` Though the current behavior aligns with the c behavior on Unix, it is different from Windows so I decided to open this issue for Future visibility. @stephentoub " 7360 area-System.Collections System.Collections.Concurrent.Tests.BlockingCollectionTests.TestBugFix914998 failed in Windows outerloop See http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_windows_nt_debug/141/consoleFull ``` 08:57:28 System.Collections.Concurrent.Tests.BlockingCollectionTests.TestBugFix914998 [FAIL] 08:57:28 Assert.Equal() Failure 08:57:28 Expected: 1 08:57:28 Actual: -1 08:57:28 Stack Trace: 08:57:28 d:\j\workspace\outerloop_win---069ccc6f\src\System.Collections.Concurrent\tests\BlockingCollectionTests.cs(169,0): at System.Collections.Concurrent.Tests.BlockingCollectionTests.TestBugFix914998() ``` 7362 area-Infrastructure build.sh throws no errors even though there are test failures Build.sh will build and run the tests as part of its workflow, but if a test fails, the build will still succeed. This is wrong since CI will eventually just run build.sh so we specifically want that build.sh should fail if a test fails. 7363 area-System.Runtime Add tests for System.Runtime. Add tests to cover all coverage gaps in System.Runtime and System.Runtime.Extensions with the exception of the URI tests which still need to be ported. resolves #6445. 7364 area-System.Net 2 HttpClientHandler_ServerCertificates_Test failed in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/debian8.2_debug_tst/763/console ``` 14:24:52 System.Net.Http.Functional.Tests.HttpClientHandler_ServerCertificates_Test.NoCallback_RevokedCertificate_RevocationChecking_Fails [FAIL] 14:24:52 Assert.Throws() Failure 14:24:52 Expected: typeof(System.Net.Http.HttpRequestException) 14:24:52 Actual: typeof(System.Threading.Tasks.TaskCanceledException): A task was canceled. 14:24:52 Stack Trace: 14:24:52 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:24:52 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:24:52 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() 14:24:52 at System.Net.Http.HttpClient.d__59.MoveNext() 14:24:52 --- End of stack trace from previous location where exception was thrown --- 14:24:52 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:24:52 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` ``` 14:26:32 System.Net.Http.Functional.Tests.HttpClientHandler_ServerCertificates_Test.NoCallback_RevokedCertificate_NoRevocationChecking_Succeeds [FAIL] 14:26:32 System.Threading.Tasks.TaskCanceledException : A task was canceled. 14:26:32 Stack Trace: 14:26:32 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:26:32 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:26:32 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() 14:26:32 at System.Net.Http.HttpClient.d__59.MoveNext() 14:26:32 --- End of stack trace from previous location where exception was thrown --- 14:26:32 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:26:32 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:26:32 at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() 14:26:32 at System.Net.Http.Functional.Tests.HttpClientHandler_ServerCertificates_Test.d__7.MoveNext() 14:26:32 --- End of stack trace from previous location where exception was thrown --- 14:26:32 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:26:32 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:26:32 --- End of stack trace from previous location where exception was thrown --- 14:26:32 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:26:32 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 14:26:32 --- End of stack trace from previous location where exception was thrown --- 14:26:32 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 14:26:32 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` Both tests failed because a TaskCanceledException was thrown. These do not seem to be recurring failures. @davidsh , @CIPop 7367 area-System.Globalization DateTimeFormatInfoGetInstance.GetInstance failed on Unix in CI "http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/debian8.2_debug_tst/764/console ``` 15:21:57 System.Globalization.Tests.DateTimeFormatInfoGetInstance.GetInstance(provider: TestIFormatProviderClass { }, expected: DateTimeFormatInfo { AbbreviatedDayNames = [""Sun"", ""Mon"", ""Tue"", ""Wed"", ""Thu"", ...], AbbreviatedMonthGenitiveNames = [""Jan"", ""Feb"", ""Mar"", ""Apr"", ""May"", ...], AbbreviatedMonthNames = [""Jan"", ""Feb"", ""Mar"", ""Apr"", ""May"", ...], AMDesignator = ""AM"", Calendar = GregorianCalendar { CalendarType = Localized, Eras = [...], IsReadOnly = True, MaxSupportedDateTime = 9999-12-31T23:59:59.9999999, MinSupportedDateTime = 0001-01-01T00:00:00.0000000, ... }, ... }) [FAIL] 15:21:57 Assert.Equal() Failure 15:21:57 Expected: DateTimeFormatInfo { AbbreviatedDayNames = [""Sun"", ""Mon"", ""Tue"", ""Wed"", ""Thu"", ...], AbbreviatedMonthGenitiveNames = [""Jan"", ""Feb"", ""Mar"", ""Apr"", ""May"", ...], AbbreviatedMonthNames = [""Jan"", ""Feb"", ""Mar"", ""Apr"", ""May"", ...], AMDesignator = ""AM"", Calendar = GregorianCalendar { CalendarType = Localized, Eras = [...], IsReadOnly = True, MaxSupportedDateTime = 9999-12-31T23:59:59.9999999, MinSupportedDateTime = 0001-01-01T00:00:00.0000000, ... }, ... } 15:21:57 Actual: DateTimeFormatInfo { AbbreviatedDayNames = [""���"", ""���"", ""���"", ""���"", ""���"", ...], AbbreviatedMonthGenitiveNames = [""1���"", ""2���"", ""3���"", ""4���"", ""5���"", ...], AbbreviatedMonthNames = [""1���"", ""2���"", ""3���"", ""4���"", ""5���"", ...], AMDesignator = ""������"", Calendar = GregorianCalendar { CalendarType = Localized, Eras = [...], IsReadOnly = False, MaxSupportedDateTime = 9999-12-31T23:59:59.9999999, MinSupportedDateTime = 0001-01-01T00:00:00.0000000, ... }, ... } 15:21:57 Stack Trace: 15:21:57 at System.Globalization.Tests.DateTimeFormatInfoGetInstance.GetInstance(IFormatProvider provider, DateTimeFormatInfo expected) ``` cc: @tarekgh, @hughbe " 7368 area-Infrastructure Modify netci.groovy to include outerloop for coverage resolves #1742 consumes https://github.com/dotnet/buildtools/pull/546 @mmitche @Priya91 @stephentoub 7372 area-System.Numerics Add missing tests to BigInteger resolves #6579 7375 area-Infrastructure Building individual test projects on OSX has issues Right now, if you run `msbuild /t:RebuildAndTest /p:OSGroup=OSX` on some test projects on OSX, the run fails for a few reasons. In general, it seems that we are restoring some Windows binaries which fails early on, usually before any test runs. It seems that certain tests are not fully specifying their dependencies, which results in old versions of packages being pulled in. For example, System.Globalization.Tests.csproj, if run with the above command, fails when calling `Directory.GetCurrentDirectory()` in the Xunit console runner, because the System.IO.FileSystem.dll that is deployed next to the test is the Windows version. If you explicitly add a new version of this package to the tests dependencies, it is successfully restored and the test project gets further. Then it fails because the version of System.Runtime.InteropServices.RuntimeInformation.dll is the Windows version. If you add THAT to the project.json, then the tests finally pass. Easy repro: ``` cd src/System.Globalization/tests /t:RebuildAndTest /p:OSGroup=OSX ``` Interestingly, this issue does not occur if you ALSO pass `/p:TestWithLocalLibraries=true`. I haven't figured out what is happening in this case, but the correct DLL's seem to be copied in if this flag is set. It also shouldn't be necessary to pass `/p:OSGroup=OSX`, either. If this is omitted, no tests are run, though. We should auto-detect this and run tests anyways. We should have the information to make this possible. It's likely that this is also affecting the other non-Windows builds. @Priya91, @joperezr 7377 area-System.Reflection Consider adding PureAttribute to IntrospectionExtensions.GetTypeInfo Porting some code to .NET Core, I encountered the following code: ``` C# public static Type FindImplementationType(Type type, ObjectLiteral objLit, Func getResolverKind) { Contract.Requires(type.IsInterface); // ... } ``` So I added the call to GetTypeInfo(): ``` C# Contract.Requires(type.GetTypeInfo().IsInterface); ``` However, when code contracts actually runs, I get the following error: > error CC1036: Detected call to method 'System.Reflection.IntrospectionExtensions.GetTypeInfo(System.Type)' without [Pure] in contracts of method 'Util.ConfigurationConverter.FindImplementationType(System.Type,ObjectLiteral,System.Func`1)' Is it possible to add a PureAttribute to the GetTypeInfo() method? That seems like it might be a dependency we don't want to add to the contract, is there another way of specifying that a method is pure for code contracts? Should the attribute at least be added to the .NET Framework version of this method? 7379 area-System.Net Refactor MultipartContent to use async/await "Currently serialization of MultipartContent is split across multiple Task-based methods that each ContinueWith to each other. We can instead just write the code naturally in an async method. In addition to being simpler, it also helps with performance, especially when serializing to a memory stream and the whole operation can actually run synchronously. For example, with this little snippet: ``` C# var c = new HttpClient(); var url = new Uri(""http://httpbin.org/post""); for (int i = 0; i < 100; i++) { var mc = new MultipartContent(""someSubtype"", ""theBoundary""); mc.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(""This is a ByteArrayContent""))); mc.Add(new StringContent(""This is a StringContent"")); await c.PostAsync(url, mc); } ``` the number of allocations drops nicely: ![image](https://cloud.githubusercontent.com/assets/2642209/14164603/e51fe004-f6ce-11e5-893e-9c1d10480102.png) cc: @davidsh, @cipop, @ericeil, @kapilash " 7380 area-Infrastructure Code coverage builds failing due to bin clashes "The last few code coverage builds in CI have failed, with lots of errors like this: ``` 16:19:59 Error : Multiple projects built twice with the same target path d:\j\workspace\code_coverage---7bd9c464\bin\ref\System.Threading\4.0.10.0\System.Threading.dll. 16:19:59 d:\j\workspace\code_coverage---7bd9c464\build.proj --> 16:19:59 Global Properties: 16:19:59 Coverage = true 16:19:59 d:\j\workspace\code_coverage---7bd9c464\src\tests.builds --> 16:19:59 Global Properties: 16:19:59 Coverage = true 16:19:59 DefaultBuildAllTarget = BuildAndTest 16:19:59 BuildAllProjects = true 16:19:59 d:\j\workspace\code_coverage---7bd9c464\src\System.Threading\tests\System.Threading.Tests.csproj --> 16:19:59 Global Properties: 16:19:59 Coverage = true 16:19:59 BuildAllProjects = true 16:19:59 OSGroup = Windows_NT 16:19:59 d:\j\workspace\code_coverage---7bd9c464\src\System.Threading\src\System.Threading.csproj --> 16:19:59 Global Properties: 16:19:59 Coverage = true 16:19:59 BuildAllProjects = true 16:19:59 OSGroup = Windows_NT 16:19:59 d:\j\workspace\code_coverage---7bd9c464\src\System.Threading\ref\System.Threading.csproj 16:19:59 Global Properties: 16:19:59 Coverage = true 16:19:59 BuildAllProjects = true ``` and then a note at the end: ``` 16:19:59 MSBUILD : error MSB4015: The build stopped unexpectedly because the ""ReusableLogger"" logger failed unexpectedly during shutdown. 16:19:59 System.Exception: 66 bin clashes were detected during the build. 16:19:59 at Microsoft.DotNet.Build.Tasks.BinClashLogger.Shutdown() 16:19:59 at Microsoft.Build.Evaluation.ProjectCollection.ReusableLogger.Shutdown() 16:19:59 at Microsoft.Build.BackEnd.Logging.LoggingService.ShutdownLogger(ILogger logger) ``` @ericstj, does this look familiar? http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/code_coverage_windows/204/consoleFull " 7383 area-Infrastructure Unix builds fail when trying to sign a project Calling `./build.sh /p:ConfigurationGroup=Release` throws the following error: ``` CSC : error CS7027: Error signing output with public key from file '/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_release/Tools/Test.snk' -- Cannot marshal 'return value': Unknown error. [/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_release/src/System.Globalization/tests/System.Globalization.Tests.csproj] ``` [Here is a sample](http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_ubuntu14.04_release/58/consoleFull) of a build that is running into the issue. 7390 area-Infrastructure Outerloop Unix runs failing with signing error ``` CSC : error CS7027: Error signing output with public key from file '/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_release/Tools/Test.snk' -- Cannot marshal 'return value': Unknown error. [/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_release/src/System.Globalization/tests/System.Globalization.Tests.csproj] ``` e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_ubuntu14.04_release/58/consoleFull http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_ubuntu14.04_debug/64/consoleFull http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_osx_release/61/consoleFull http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_centos7.1_release_bld/42/consoleFull 7391 area-System.Console Boolean System.Console.get_KeyAvailable() "Following issue: #2936 I made a small project referencing the dev nuget feed. When using `SystemConsole.KeyAvailable`, I'm getting an error: System.MissingMethodException: Method not found: 'Boolean System.Console.get_Key Available()'. at SharpSyslogServer.Console.Program.Main(String[] args) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider) at Microsoft.Dnx.ApplicationHost.Program.<>c__DisplayClass3_0.b_ _0() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() The version I'm using is: ""System.Console"": ""4.0.0-rc2-23826"", And the branch with the code to reproduce it: https://github.com/bruno-garcia/SharpSyslogServer/tree/system-console-issue " 7397 area-System.Linq Explicitly void switch expressions imbalance stack on interpreter. "Explicitly void-typed `SwitchExpression`s are allowed to have typed default body and cases, which may even be heterogeneous: ``` C# Expression.Switch( typeof(void), Expression.Constant(0), Expression.Constant(1), null, Expression.SwitchCase(Expression.Constant(""Foo""), Expression.Constant(2)), Expression.SwitchCase(Expression.Constant(DateTime.MinValue), Expression.Constant(3)) ) ``` However for integral and string value types with the default comparison, the interpreter will put the value from the case (or default body) that ran on the stack, upsetting subsequent operations. " 7400 area-System.Data System.Data.SqlClient.SqlException: The connection is broken and recovery is not possible _From @robbpriestley on March 23, 2016 19:27_ Hello, I'm pretty new to EF and .NET Core, but I just thought I'd report an issue I had today and have been able to diagnose somewhat. It has to do with the runtime and applying a migration. In my ASP.NET Core project, when I removed the **dnx451** framework from project.json (intending instead to rely entirely on the **dnxcore50** framework) and I perform the following actions: ``` dnvm use default -r coreclr dnx ef database update ``` I consistently get the below exception. To resolve, I need to restore the **dnx451** framework in the project.json and use the **mono** runtime. Then, it works. My database is SQL Server running on Amazon RDS. Exception message: ``` Applying migration '20160323185819_Update1'. System.Data.SqlClient.SqlException: The connection is broken and recovery is not possible. The connection is marked by the server as unrecoverable. No attempt was made to restore the connection. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.SqlConnection.ValidateAndReconnect(Action beforeDisconnect, Int32 timeout) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.Data.Entity.Storage.Internal.RelationalCommand.<>c.b__13_0(DbCommand cmd, IRelationalConnection con) at Microsoft.Data.Entity.Storage.Internal.RelationalCommand.Execute[T](IRelationalConnection connection, Func`3 action, String executeMethod, Boolean openConnection, Boolean closeConnection) at Microsoft.Data.Entity.Storage.RelationalCommandExtensions.ExecuteNonQuery(IEnumerable`1 commands, IRelationalConnection connection) at Microsoft.Data.Entity.Migrations.Internal.Migrator.Execute(IEnumerable`1 relationalCommands) at Microsoft.Data.Entity.Migrations.Internal.Migrator.Migrate(String targetMigration) at Microsoft.Data.Entity.Design.MigrationsOperations.UpdateDatabase(String targetMigration, String contextType) at Microsoft.Data.Entity.Commands.Program.Executor.Execute(Action action) ClientConnectionId:7f7dac22-d9a0-49cc-950b-5a532b754754 The connection is broken and recovery is not possible. The connection is marked by the server as unrecoverable. No attempt was made to restore the connection. ``` _Copied from original issue: aspnet/EntityFramework#4891_ 7402 area-System.Globalization Add Globalization tests Adds new globalization tests and modified existing tests where the CultureInfo of the process is modified. All tests that modify the process state were moved to execute in their own process. replaces #7323. resolves #6429 7403 area-System.Net System.Net.Sockets.Socket.SetLingerOption() throws exception on OS X 16 WCF OuterLoop tests fail in nightly Helix runs on OS X, all with the same stack trace. These tests pass on Ubuntu. It looks like SetLingerOption() is not properly hooked up in OS X. Here is the Helix log for one such test: ``` Path FunctionalTest.Client.ClientBase.Tests#DuplexClientBaseTests.DuplexClientBaseOfT_OverNetTcp_Synchronous_Call Run On Wednesday, March 30, 2016 12:57 PM Architecture AnyCpu Configuration CHK OperatingSystem OSX.1011 Test Output Test Failed Unhandled exception of type 'System.Net.Sockets.SocketException': System.Net.Sockets.SocketException : Invalid argument at System.Net.Sockets.Socket.SetLingerOption(LingerOption lref) at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Object optionValue) at System.ServiceModel.Channels.CoreClrSocketConnection.Abort(Int32 traceEventType, String timeoutErrorString, TransferOperation transferOperation) at System.ServiceModel.Channels.SocketConnection.Abort(String timeoutErrorString, TransferOperation transferOperation) at System.ServiceModel.Channels.SocketConnection.Abort() at System.ServiceModel.Channels.DelegatingConnection.Abort() at System.ServiceModel.Channels.ConnectionPool.AbortItem(IConnection item) at System.ServiceModel.Channels.CommunicationPool`2.EndpointConnectionPool.AbortItem(TItem item) at System.ServiceModel.Channels.IdlingCommunicationPool`2.IdleTimeoutEndpointConnectionPool.AbortItem(TItem item) at System.ServiceModel.Channels.CommunicationPool`2.EndpointConnectionPool.AbortConnections(List`1 idleItemsToClose) at System.ServiceModel.Channels.CommunicationPool`2.EndpointConnectionPool.Close(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationPool`2.OnClose(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationPool`2.Close(TimeSpan timeout) at System.ServiceModel.Channels.ConnectionPoolRegistry.Release(ConnectionPool pool, TimeSpan timeout) at System.ServiceModel.Channels.TcpChannelFactory`1.ReleaseConnectionPool(ConnectionPool pool, TimeSpan timeout) at System.ServiceModel.Channels.ConnectionOrientedTransportChannelFactory`1.d__52.MoveNext() . . . at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout) at System.ServiceModel.ClientBase`1.System.ServiceModel.ICommunicationObject.Close(TimeSpan timeout) at System.ServiceModel.ClientBase`1.Close() at DuplexClientBaseTests.DuplexClientBaseOfT_OverNetTcp_Synchronous_Call() ``` See WCF issue https://github.com/dotnet/wcf/issues/951 7405 area-System.Net Further reduce Task allocations in GetString/ByteArrayAsync The HttpContent ReadAsStringAsync and ReadAsByteArrayAsync methods ensure that the data is loaded into the buffer, via an async operation, and then process that buffer synchronously. This refactors that synchronous processing into its own method, and changes ReadAs methods to use a simple async method that does the await on LoadIntoBufferAsync and then calls these methods. This avoids any task-related allocations if the data is already buffered. It also makes those synchronous methods callable from the GetString/ByteArrayAsync directly, such that these methods can avoid an extra layer of continuations, as they already do their own buffering. I will separately follow-up on converting the rest of HttpContent to use async/await where it makes sense. cc: @davidsh, @cipop, @ericeil, @kapilash 7407 area-System.Runtime Add Byte, Int16, Int32, Int64, SByte, UInt16, UInt32 and UInt64 tests - Take advantage of xunit - Refactor and add tests for Parse and ToString Contributes to #6286 Cherry picked from #5490 Helps test dotnet/coreclr#3995 7408 area-System.IO Add SetCurrentDirectory test for a symlink path resolves #7358 @stephentoub 7409 area-System.Runtime Regression in StringBuilder.AppendLine and Console.Write and Console.WriteLine "This code: ``` csharp static void Main() { var sb = new StringBuilder(); sb.Append(""hello""); sb.AppendLine(); sb.AppendLine(); sb.Append(""world""); sb.AppendLine(); var s = sb.ToString(); Console.WriteLine(s); } ``` In .NET Framework 4.6, it prints this output (with a completely empty line between the two words): ``` hello world ``` But when I write it in a dotnet-cli console app (generated using ""dotnet new"", and targeting `""frameworks"": {""netstandard1.5""}` and dependency `""Microsoft.NETCore.App"": { ""version"": ""1.0.0-rc2-23930""}`, then it omits the blank line: ``` hello world ``` " 7416 area-Serialization DataConstractJsonSerializer should Escape '<', '>', and '& "@cyberphone submitted the following suggestion in #5647 > Having looked around a bit it seems that the JSON world is rather divided and needs to consider supporting two different serializations, one which is ES6-compatible and another which is ES6-compatible but properly escaped to be declared in browser as a JavaScript object. The latter means that '<', '>', and '&' must be expressed as \unnnn. Preferably quotes around identifier-compatible property names are also dropped in the JavaScript mode. > > Well, ""on the wire"" only real JSON encoding makes sense, but if you express JSON as a JavaScript object embedded in an HTML page like this > > ``` javascript > var jsonData = { > myprop: """" > }; > ``` > > it will break in a browser so I made (in my Java tools...), JavaScript a serializer option that: > •escapes '<', '>', and '&' > •removes """" around properties that adhere to JavaScript identifier syntax (excluding for example ""my-prop"") > •prints data in a pretty (readable) way > > The cool thing is that JSON.stringify() is unaffected by this change since it using ES6 restores data to its true JSON format! " 7417 area-System.Data Only throw NotSupportedException if Integrated Security is set to True on non-Windows platforms Currently an exception is thrown if the keyword is set at all: https://github.com/dotnet/corefx/blob/master/src/System.Data.SqlClient/src/System/Data/SqlClient/SqlConnectionString.cs#L198 But we shouldn't expected any failures if Integrated Security is set to false on non-Windows platforms. 7421 area-System.Runtime Add null test for Nullable GetUnderlyingType 7424 area-System.Linq Expression.Convert() fails in the face of an explicitly named `op_implicit` that doesn't have correct arity Consider: ``` C# private class PerverselyNamedMembers { public readonly uint Field; public PerverselyNamedMembers(uint value) { Field = value; } public static uint op_Implicit() { return 0x8BADF00D; } } ``` Then while `Expression.Convert(Expression.Constant(new PerverselyNamedMembers(0)), typeof(uint)))` should fail with an `InvalidOperationException` it fails with an `IndexOutOfRangeException`. Worse is if there also really is an appropriate `implicit` or `explicit` operator (either on the target or the source type) as then it fails when it should succeed. It _is_ admittedly a perverse case, but perhaps worth guarding against all the same. The case of a multary method with such a name is even worse, as it would then be picked as a match. 7425 area-System.Threading Enable SpinWait tests in System.Threading. SpinWait tests in System.Threading were present but the file wasn't added to the csproj. resolves #6459 7426 area-System.Threading Add test for CancellationTokenSource exceptions resolves #6578 7433 area-System.Runtime GetFullPath_Windows_83Paths failed on Windows Nano ``` 19:42:53 Discovering: System.Runtime.Extensions.Tests 19:42:53 Discovered: System.Runtime.Extensions.Tests 19:42:54 Starting: System.Runtime.Extensions.Tests 19:42:54 System.IO.Tests.PathTests.GetFullPath_Windows_83Paths [FAIL] 19:42:54 Assert+WrapperXunitException : File path: d:\j\workspace\outerloop_win---ce410c48\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs. Line: 650 19:42:54 ---- Assert.Equal() Failure 19:42:54 ↓ (pos 12) 19:42:54 Expected: C:\Windows\TEMP\2516432d47634334a66fb171ea9af088.txt 19:42:54 Actual: C:\Windows\Temp\2516432d47634334a66fb171ea9af088.txt 19:42:54 ↑ (pos 12) 19:42:54 Stack Trace: 19:42:54 at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber) 19:42:54 at Assert.Equal(String expected, String actual, String path, Int32 line) 19:42:54 at System.IO.Tests.PathTests.GetFullPath_Windows_83Paths() 19:42:54 ----- Inner Stack Trace ----- 19:42:54 at Assert.Equal(String expected, String actual, String path, Int32 line) 19:42:55 Finished: System.Runtime.Extensions.Tests ``` `GetTempPath` and `GetFullPath` returning temp path with different casing? cc @JeremyKuhne 7434 area-System.IO Filestream with FileOptions.Encrypted | FileOptions.WriteThrough fails to write on Nano ``` 19:39:16 System.IO.Tests.FileStream_ctor_str_fm_fa_fs_buffer_fo.ValidFileOptions(option: Encrypted) [FAIL] 19:39:16 System.UnauthorizedAccessException : Access to the path 'C:\Windows\TEMP\FileStream_ctor_str_fm_fa_fs_buffer_fo_3qffgkdi.mfj\ValidFileOptions_50' is denied. 19:39:16 Stack Trace: 19:39:17 at System.IO.Win32FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) 19:39:17 at System.IO.Win32FileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) 19:39:17 at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) 19:39:17 at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) 19:39:17 at System.IO.Tests.FileStream_ctor_str_fm_fa_fs_buffer_fo.CreateFileStream(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) 19:39:17 at System.IO.Tests.FileStream_ctor_str_fm_fa_fs_buffer_fo.ValidFileOptions(FileOptions option) 19:39:37 System.IO.Tests.FileStream_ctor_str_fm_fa_fs_buffer_fo.ValidFileOptions(option: Encrypted, Asynchronous) [FAIL] 19:39:37 System.UnauthorizedAccessException : Access to the path 'C:\Windows\TEMP\FileStream_ctor_str_fm_fa_fs_buffer_fo_ts5rrahw.xkr\ValidFileOptions_50' is denied. 19:39:37 Stack Trace: 19:39:37 at System.IO.Win32FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) 19:39:37 at System.IO.Win32FileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) 19:39:37 at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) 19:39:37 at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) 19:39:37 at System.IO.Tests.FileStream_ctor_str_fm_fa_fs_buffer_fo.CreateFileStream(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) 19:39:37 at System.IO.Tests.FileStream_ctor_str_fm_fa_fs_buffer_fo.ValidFileOptions(FileOptions option) 19:39:57 System.IO.Tests.FileStream_ctor_str_fm_fa_fs_buffer_fo.ValidFileOptions(option: Encrypted, DeleteOnClose, SequentialScan, RandomAccess, Asynchronous, WriteThrough) [FAIL] 19:39:57 System.UnauthorizedAccessException : Access to the path 'C:\Windows\TEMP\FileStream_ctor_str_fm_fa_fs_buffer_fo_1doetiwe.nbk\ValidFileOptions_50' is denied. 19:39:57 Stack Trace: 19:39:57 at System.IO.Win32FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) 19:39:57 at System.IO.Win32FileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) 19:39:57 at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) 19:39:57 at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) 19:39:57 at System.IO.Tests.FileStream_ctor_str_fm_fa_fs_buffer_fo.CreateFileStream(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) 19:39:57 at System.IO.Tests.FileStream_ctor_str_fm_fa_fs_buffer_fo.ValidFileOptions(FileOptions option) 19:39:57 Finished: System.IO.FileSystem.Tests ``` 7436 area-System.IO clrcompression package issues Currently there is a Win7 and Win10, the one in Win10 has the appcontainer which causes some issues issues for folks outside of UWP. To help eliminate potential conflicts we should put the Win10 access in the netcore50 folder as that is the only one that is used for UWP. https://github.com/dotnet/corefx/blob/master/src/Native/pkg/runtime.native.System.IO.Compression/win10/runtime.native.System.IO.Compression.pkgproj#L13 `runtimes/lib/netcore50/` On top of that the ARM version of this package has a win7-arm asset which isn't even a valid RID. It would need to be a win8-arm or higher. We should do some validation on the various scenarios for this package. cc @mellinoe @ericstj 7437 area-System.Runtime LoadAssemblyByPath_ValidUserAssembly test failure in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/osx_debug_tst_prtest/2650/console ``` 19:00:04 System.Runtime.Loader.Tests.AssemblyLoadContextTest.LoadAssemblyByPath_ValidUserAssembly [FAIL] 19:00:04 System.IO.IOException : The process cannot access the file '/tmp/System.Runtime.Loader.Test.Assembly.dll' because it is being used by another ``` 7439 area-System.Net ASP.NET Core 1.0 - FTP upload files Hi, I'm trying to upload files to a FTP server. I've tried using old piece of code I've used ASP.NET MVC 5 but DNX Core does not see to provide FtpWebRequest class for FTP manipulation. One workaround has come to my mind to use HttpClient with external Web service (WebAPI 2) which will upload my files, but I would have to maintain two applications and I don't like this approach... So is there any other approach I could use and I'm apparently missing? Thanks! ![ftp](https://cloud.githubusercontent.com/assets/5251112/14212399/56cff172-f83b-11e5-9eb9-36905de58c6f.png) 7440 area-System.Net HttpClient not stripping Content-Length header after redirect on non-Windows systems Scenario: 1) Client sends POST to server with some content. 2) Server sends 302 response. 3) Client sends GET to redirect location **with Content-Length from original POST request but no content**. Example: Client: ``` POST / HTTP/1.1 Host: 10.135.34.146:5000 Accept: */* Accept-Encoding: gzip,deflate Content-Type: text/plain; charset=utf-8 Content-Length: 7 Expect: 100-continue content ``` Server: ``` HTTP/1.1 302 Found Date: Fri, 01 Apr 2016 17:48:58 GMT Content-Length: 0 Location: /Somewhere Server: Kestrel ``` Client: ``` GET /Somewhere HTTP/1.1 Host: 10.135.34.146:5000 Accept: */* Accept-Encoding: gzip,deflate Content-Type: text/plain; charset=utf-8 Content-Length: 7 <----------------------- wrong ``` This is breaking one of our functional tests: https://github.com/aspnet/MusicStore/blob/dev/test/E2ETests/OpenIdConnectTests.cs Reproes on Linux and Mac. 7441 area-Serialization Improve serialization perf tests - Refactor all serialization performance tests to remove duplicated code. Adding more perf tests for all serializers is also more straightforward. Update namespace so the tests show up properly in reports. - Add a flag in test project to enable running tests without project references, which helps us run against Desktop facades for comparison purpose - Add performance tests for Json.Net for comparison purpose Previous PR: https://github.com/dotnet/corefx/pull/7119 @zhenlan @SGuyGe @shmao @brianrob 7447 area-System.Xml [ToFDisable] Port tests for: System.Xml.ReaderWriter "As part of moving out of ToF and into the open, I've been going through the ""Tree of the future"" tests and calculating which of those tests provide coverage that we're missing in the open tests. The goal of this is to get the open tests universally better than the ToF tests so that we can turn the ToF tests off for ProjectK runs and save us all a lot of headache diagnosing test failures from potentially outdated tests. For System.Xml.ReaderWriter, we're missing 13883 lines of coverage. To fulfill the uncovered lines we would need to either create new tests for them or port 6 ToF tests to the open. Those tests are: - [ ] System.Xml.ReaderWriter\4.0.0.0\Writers\XmlWriterApi\System.Xml.RW.XmlWriterApi.Tests_FullRun.XML - [ ] System.Xml.ReaderWriter\4.0.0.0\XmlConvert\System.Xml.RW.XmlConvert.Tests_FullRun.XML - [ ] System.Xml.ReaderWriter\4.0.0.0\Readers\CharCheckingReader\System.Xml.RW.CharCheckingReader.Tests_FullRun.XML - [ ] System.Xml.ReaderWriter\4.0.0.0\Readers\FactoryReader\System.Xml.RW.FactoryReader.Tests_FullRun.XML - [ ] System.Xml.ReaderWriter\4.0.0.0\Readers\CustomReader\System.Xml.RW.CustomReader.Tests_FullRun.XML - [ ] System.Xml.ReaderWriter\4.0.0.0\Readers\SubtreeReader\System.Xml.RW.SubtreeReader.Tests_FullRun.XML Coverage reports, coverage xml files, and detailed json lists of each piece of missing coverage and the corresponding ToF test that fills it are available on request. " 7448 area-System.Xml [ToFDisable] Port tests for: System.Xml.XDocument "As part of moving out of ToF and into the open, I've been going through the ""Tree of the future"" tests and calculating which of those tests provide coverage that we're missing in the open tests. The goal of this is to get the open tests universally better than the ToF tests so that we can turn the ToF tests off for ProjectK runs and save us all a lot of headache diagnosing test failures from potentially outdated tests. For System.Xml.XDocument, we're missing 945 lines of coverage. To fulfill the uncovered lines we would need to either create new tests for them or port 5 ToF tests to the open. Those tests are: - [ ] System.Xml.XDocument\4.0.0.0\TreeManipulation\TreeManipulation.Tests_FullRun.XML - [ ] System.Xml.XDocument\4.0.0.0\Properties\Properties.Tests_FullRun.XML - [ ] System.Xml.XDocument\4.0.0.0\xNodeBuilder\xNodeBuilder.Tests_FullRun.XML - [ ] System.Xml.XDocument\4.0.0.0\misc\Misc.Tests_FullRun.XML - [ ] System.Xml.XDocument\4.0.0.0\xNodeReader\xNodeReader.Tests_FullRun.XML Coverage reports, coverage xml files, and detailed json lists of each piece of missing coverage and the corresponding ToF test that fills it are available on request. " 7449 area-System.IO Port AccessControl for System.IO.Pipes Port PipeSecurity to Open and expose it in a new windows specific library `System.IO.Pipes.AccessControl` 7454 area-System.ComponentModel Implement more System.ComponentModel.TypeConverter surface This implements the remaining surface, removing `CultureInfoConverter` and `ReferenceConverter` due to their problematic purposes and implementations. @twsouthwick 7457 area-System.Globalization IdnMapping unnecessarily allocates substrings Discovered this while going through the code in #7291. It looks like `IdnMapping` is allocating a substring where it shouldn't need to, specifically [here](https://github.com/dotnet/corefx/blob/master/src/Common/src/System/Globalization/IdnMapping.cs#L85) and [here](https://github.com/dotnet/corefx/blob/master/src/Common/src/System/Globalization/IdnMapping.cs#L132). I'm going to open up a PR in a couple of days for this when I have time, but I'm raising an issue here first as a self-reminder. 7458 area-Microsoft.CSharp Microsoft.CSharp code could use some refactoring/optimization This program: ``` cs public static void Main() { for (int i = 0; i < 1000000000; i++) { dynamic thing = new object(); thing.Equals(null); } } ``` causes _many_ GC marks when run from the Visual Studio profiler within a short period of time. Here's a snapshot from my machine: ![](http://i.imgur.com/NVxqwfk.png) Here's the data from the memory profiler about which objects are being allocated the most: ![](http://i.imgur.com/smsN2px.png) Of course, obviously perf is not the first consideration when using `dynamic` objects, but it looks like a lot of these could be avoided. I looked a bit further into the `Microsoft.CSharp` package where this code is coming from, and it looks like the code is [somewhat of a mess.](https://github.com/dotnet/corefx/blob/59f4427b223dc944fb189a6fc9ee6186d690974b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeArray.cs#L16) It uses a lot of [Hungarian notation](https://github.com/dotnet/corefx/blob/59f4427b223dc944fb189a6fc9ee6186d690974b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolManagerBase.cs#L325) and classes with [COM-style all-caps names.](https://github.com/dotnet/corefx/blob/59f4427b223dc944fb189a6fc9ee6186d690974b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolManagerBase.cs#L32-L34) As for perf, [here's](https://github.com/dotnet/corefx/blob/ac67ffac987d0c27236c4a6cf1255c2bcbc7fe7d/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/KnownName.cs#L60) a random example of where it could be optimized, and also [here](https://github.com/dotnet/corefx/blob/59f4427b223dc944fb189a6fc9ee6186d690974b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolManagerBase.cs#L378-L381). As another example, [this](https://github.com/dotnet/corefx/blob/59f4427b223dc944fb189a6fc9ee6186d690974b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeArray.cs#L14) looks like it could be a struct. Posting this here as a self-note, since I'm planning to submit a couple of PRs to remedy this in the next couple of weeks. 7459 area-System.Net Cookie class does not abide by the MSDN docs ## Cookie Constructor (String, String) A `CookieException` is thrown in the following circumstances, according to MSDN: - The `name` parameter is null. - The `name` parameter is of zero length. - The `name` parameter contains an invalid character. - **The `value` parameter is null.** - **The `value` parameter contains a string not enclosed in quotes that contains an invalid character.** The circumstances in bold are currently not followed by the Cookie class - no exception is thrown, but MSDN tells us one should be. ## Cookie.Value Property This field has the following remark: **The Value of a Cookie must not be null. The following characters are reserved and cannot be used for this property: semicolon, comma.** - MSDN does not make it clear if an exception is thrown or not in the above circumstances. - However, in corefx, the second condition is not checked. If a value is null, it is converted to an empty string. ## Solutions - Fix the documentation according to the current behaviour - Adapt the documentation for Cookie.Value Property and change some current behaviour - Change all the behaviours to that described in the MSDN docs ## Notes - Corefx currently aligns with the behaviour of .NET desktop (no exceptions are thrown there) - I reckon its quite important to ensure that Cookie.Value can never be null, as this is documented in MSDN and therefore can lead to NREs. The solutions to this are throwing an exception or setting Cookie.Value to string.Empty /cc @davidsh 7462 area-System.Net Fix CurlHandler Content-Length handling on redirects CurlHandler was explicitly setting the Content-Length header, which overrides libcurl's default handling of Content-Length. This means that Content-Length was being sent even when it shouldn't have been, such as when redirecting a POST to a GET. This commit changes how we handle Content-Length. Rather than explicitly setting the header ourselves, we let libcurl do it, and we tell it the length of the input via the INFILESIZE and POSTFIELDSIZE options. A few other issues addressed as well in the act of fixing this: - A SafeHandle wasn't being disposed of in the case of a redirect. - 301 wasn't being considered a redirect status code for the purposes of credential handling. - Some code could have been a bit cleaner. Fixes https://github.com/dotnet/corefx/issues/7440 cc: @kapilash, @ericeil, @davidsh, @cesarbs 7464 area-System.Net Refactor HttpContent with async/await cc: @davidsh, @cipop, @ericeil, @kapilash 7465 area-System.Security Two CNG tests failing on Win8 outerloop http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_windows_nt_debug/146/consoleFull ``` 14:10:20 System.Security.Cryptography.Cng.Tests.TripleDESCngTests.VerifyMachineKey [FAIL] 14:10:20 Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : Access denied 14:10:20 Stack Trace: 14:10:20 D:\j\workspace\outerloop_win---069ccc6f\src\System.Security.Cryptography.Cng\src\System\Security\Cryptography\CngKey.Create.cs(53,0): at System.Security.Cryptography.CngKey.Create(CngAlgorithm algorithm, String keyName, CngKeyCreationParameters creationParameters) 14:10:20 D:\j\workspace\outerloop_win---069ccc6f\src\System.Security.Cryptography.Cng\tests\SymmetricCngTestHelpers.cs(240,0): at System.Security.Cryptography.Cng.Tests.SymmetricCngTestHelpers.VerifyMachineKey(CngAlgorithm algorithm, Int32 plainBytesCount, Func`2 persistedFunc, Func`1 ephemeralFunc) 14:10:20 D:\j\workspace\outerloop_win---069ccc6f\src\System.Security.Cryptography.Cng\tests\TripleDESCngTests.cs(79,0): at System.Security.Cryptography.Cng.Tests.TripleDESCngTests.VerifyMachineKey() 14:10:20 System.Security.Cryptography.Cng.Tests.AesCngTests.VerifyMachineKey [FAIL] 14:10:20 Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : Access denied 14:10:20 Stack Trace: 14:10:20 D:\j\workspace\outerloop_win---069ccc6f\src\System.Security.Cryptography.Cng\src\System\Security\Cryptography\CngKey.Create.cs(53,0): at System.Security.Cryptography.CngKey.Create(CngAlgorithm algorithm, String keyName, CngKeyCreationParameters creationParameters) 14:10:20 D:\j\workspace\outerloop_win---069ccc6f\src\System.Security.Cryptography.Cng\tests\SymmetricCngTestHelpers.cs(240,0): at System.Security.Cryptography.Cng.Tests.SymmetricCngTestHelpers.VerifyMachineKey(CngAlgorithm algorithm, Int32 plainBytesCount, Func`2 persistedFunc, Func`1 ephemeralFunc) 14:10:20 D:\j\workspace\outerloop_win---069ccc6f\src\System.Security.Cryptography.Cng\tests\AesCngTests.cs(82,0): at System.Security.Cryptography.Cng.Tests.AesCngTests.VerifyMachineKey() ``` 7468 area-System.Net Avoid string.Split allocations in System.Net.Http Similar changes that were made in the `FrameworkName` PR in #7288, except for System.Net.Http. Also switched a couple of places to use `nameof`. @stephentoub and @davidsh, I found another place that could be optimized similarly to not use `string.Split` [here](https://github.com/dotnet/corefx/compare/master...jamesqo:string-split?expand=1#diff-7cb88d670b5606422fd0cabab628f90cR505). Do you think it's worth it? It would lead to a lot of boilerplate code since this is a 5-element array, but would also help us avoid a couple of `Substring` allocations in addition to the `Split` ones, since `parts[0]`, `parts[4]`, and `parts[2]` wouldn't actually have to be used. 7469 area-System.Net Use `using static` in CurlHandler Saw [this](https://github.com/dotnet/corefx/compare/master...jamesqo:curl-todo?expand=1#diff-e5ffb568f6f994c4243d35ef1b6830ceL14) TODO suggesting to replace all of the `using Foo = Interop.Http.Foo` with `using static` once C# 6 was being used. Now that it is, I took the liberty of adding the directives and running `sed` on all the files in the directory to replace all of the explicit references. Do you guys think I should just remove the `using` directives at the top of the file and limit it to that, or should the changes I've made with `sed` be kept? cc @davidsh @stephentoub 7473 area-System.Net Problem installing System.Net.NetworkInformation in a project targeting dnxcore50 "Hi I'm trying to run a simple code to print Hostname using static class Dns.(using System.Net) /_string HostName = Dns.GetHostName(); Console.WriteLine(""Host Name of machine ="" + HostName);_/ This runs fine on VS 2015 and moreover **assembly portability analyser claims that it's 100% portable to dot NetCore 5.0.** However, DNX on Ubuntu 14.04 fails to run it with following error. **error CS0103: The name 'Dns' does not exist in the current context** Note: Its the same code as ran on VS2015. I just ported it to ubuntu. It's not a programming error. Is the location of Dns changed or its just not supported in latest DNX? I've noticed a **similar behaviour for class NetworkInterface** which also **depends on system.dll** assembly. Again, the **porting tool reported that code is 100% portable**, but it actually failed in compilation with following error. **error CS0246: The type or namespace name 'NetworkInterface' could not be found (are you missing a using directive or an assembly reference?)** I've checked the project.lock.json file for the linux project and there was no mention of System.dll in it. However the same was present as References in VS 2015. Please let me know if I'm missing something. Regards " 7474 area-System.Net Avoid array allocations in HttpStatusDescription Currently, `HttpStatusDescription` in `Common` allocates a static array to map status codes to messages. I've replaced it with a giant switch-case statement that both 1) takes less lines of code and 2) is self explanatory (doesn't need comments explaining what code the message represents). Script used to generate the output: https://gist.github.com/jamesqo/78121659bb7b555ac63ecc05f0e7b4de cc @davidsh @stephentoub 7475 area-System.Net Use nameof in WinRT's HttpClientHandler Found a couple of places in the netcore50 `HttpClientHandler` that look like they could use `nameof`, so I changed them accordingly. cc @stephentoub 7483 area-System.Net Tweak SSL context callback in CurlHandler - Perf. We were creating a SafeHandle for the SSL context, but it didn't own the underlying handle, and we were then just passing it back to two native functions. We can skip the SafeHandle altogether, saving on the allocation and marshaling costs for all SSL connections. - Error handling. For robustness, we should be ensuring that any problems related to getting the state from the GCHandle result in returning an error code rather than propagating an exception, which will likely crash. - Naming. The name of the callback method is no longer correct, as it's used for more than just cert verification. cc: @bartonjs, @ericeil, @kapilash 7484 area-System.IO CurrentDirectory test failed in CI on Ubuntu http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/ubuntu_release_tst_prtest/3614/console ``` 05:32:47 System.IO.Tests.Directory_GetFileSystemEntries_str_str_so_alldirs.CurrentDirectory [FAIL] 05:32:47 System.IO.DirectoryNotFoundException : Could not find a part of the path '/mnt/j/workspace/dotnet_corefx/ubuntu_release_tst_prtest/bin/tests/Linux.AnyCPU.Release/System.IO.FileSystem.Tests/dnxcore50/slteu4ll.311'. 05:32:47 Stack Trace: 05:32:47 at System.IO.UnixFileSystem.FileSystemEnumerable`1.OpenDirectory(String fullPath) 05:32:47 at System.IO.UnixFileSystem.FileSystemEnumerable`1.d__11.MoveNext() 05:32:47 at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source, Int32& length) 05:32:47 at System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption) 05:32:47 at System.IO.Directory.GetFileSystemEntries(String path, String searchPattern, SearchOption searchOption) 05:32:47 at System.IO.Tests.Directory_GetFileSystemEntries_str.CurrentDirectory() ``` 7485 area-System.Net Add CurlHandlers.SslProtocols option (Ignore the first commit for review purposes; it's a dup of #7483.) Implements the SslProtocols option on CurlHandler, enabling a developer to further constraint which SSL protocols are used. With libcurl on the OpenSSL backend (the recommended configuration), we can provide full-fidelity for this option. With libcurl on another SSL backend, we can allow choosing all three TLS protocols or just one TLS protocol, but we can't support selecting two of the three. Note that, as with the previous certificate properties, I'm not adding this to the contract. We can customize the entrypoint based on how we ultimately decide to expose this, but this commit provides the implementation and testing for it, regardless of how we choose to expose it. cc: @davidsh, @bartonjs, @ericeil, @kapilash, @joshfree 7487 area-System.ComponentModel Add tests for MemberDescriptor and CustomTypeDescriptor @chlowell 7488 area-System.IO Make Unix EnumerateFileSystemEntries not throw on missing middle dir UnixFileSystem fileentry enumeration will throw an DirectoryNotFoundException when it yields a directory that is then deleted before enumeration of that directory's contents can be completed. This commit modifies the behavior to ignore the exception throw and continue iterating through the other entries instead. It also adds a Unix-Specific test to ensure the new behavior functions as expected. resolves #7484 @stephentoub 7490 area-System.Net Add CurlHandler.MaxConnectionsPerServer option Adds MaxConnectionsPerServer to CurlHandler. cc; @davidsh, @cipop, @ericeil, @kapilash, @bartonjs, @joshfree 7492 area-System.Net Add CurlHandler.ConnectTimeout Adds a timeout to the connection phase of CurlHandler. cc: @davidsh, @cipop, @ericeil, @kapilash, @bartonjs, @joshfree 7494 area-System.Net Fix encoding of proxy credentials in CurlHandler We need to URL encode the username/password for a proxy. Otherwise, for example, a colon in the name could mess up how the concatenated username and password are parsed. libcurl URL decodes them. cc: @ericeil, @kapilash 7496 area-Infrastructure Trouble finding includes for OpenSSL on OS X 10.10/10.11 On OS X 10.10 & 10.11, System.Security.Cryptograhpy.Native is having problems finding the copy of OpenSSL found by homebrew on my system. I originally get the error: ``` /corefx/src/Native/System.Security.Cryptography.Native/openssl.c:14:10: fatal error: 'openssl/asn1.h' file not found #include ``` If I work around this issue by adding OPENSSL_INCLUDE_DIR to the target header search path, I then have errors with warnings in the headers. For example: ``` /usr/local/include/openssl/ecdsa.h:295:14: error: parameter 'flags' not found in the function declaration [-Werror,-Wdocumentation] /usr/local/include/openssl/objects.h:1025:10: error: macro name is a reserved identifier [-Werror,-Wreserved-id-macro] /Sources/dotnet/corefx/src/Native/System.Security.Cryptography.Native/pal_err.cpp:25:27: error: use of old-style cast [-Werror,-Wold-style-cast] *isAllocFailure = ERR_GET_REASON(err) == ERR_R_MALLOC_FAILURE; ^~~~~~~~~~~~~~~~~~~ /usr/local/include/openssl/err.h:246:34: note: expanded from macro 'ERR_GET_REASON' # define ERR_GET_REASON(l) (int)((l)&0xfffL) ``` Is this user error or a problem with the build? If it's a problem with the build, any suggestions on what kind of fix is most likely to be accepted back? Tested on OS X 10.11 Apple LLVM version 7.3.0 (clang-703.0.29) Target: x86_64-apple-darwin15.4.0 Thread model: posix Homebrew 0.9.9 (git revision ac80; last commit 2016-04-03) Homebrew/homebrew-core (git revision 0db2; last commit 2016-04-03) openssl: stable 1.0.2g 7497 area-System.Security Add missing coverage for Crypto CSP One of the VerifyHash methods in RSACryptoServiceProvider wasn't being tested. I modified the existing VerifyHashSignature test to use this VerifyHash method in addition to the one already in place (RSA.VerifyHash). resolves #6450 7499 area-System.Net Add Sockets performance tests We currently have no formal performance testing of Sockets. We have a couple of tests checked in, but they are disabled, haven't been adapted to the xunit.performance infrastructure, and test only a couple of particular end-to-end scenarios. We should add new tests to cover individual operations, as well as a couple of larger scenarios. 7501 area-System.ComponentModel TypeConverter cannot convert from String to Uri on Core "``` TypeDescriptor.GetConverter(typeof(Uri)).ConvertFromInvariantString(""http://www.bing.com""); ``` Results in: ``` System.InvalidOperationException : Failed to convert 'http://www.bing.com' to type 'System.Uri'. ---- System.NotSupportedException : TypeConverter cannot convert from System.String. ``` Works fine on netstandard " 7503 area-System.Net Add CurlHandler.DefaultProxyCredentials cc: @davidsh, @cipop, @ericeil, @kapilash, @bartonjs, @joshfree 7505 area-System.Net Add HttpClientHandler redirect tests Right now we only have redirect tests for 302. It'd be good to have tests for other redirects (301, 303, 307), and to do that, ideally we'd modify our existing Redirect.ashx endpoint to support returning other redirect status codes. 7506 area-System.Net Ignore EINVAL from SO_LINGER on OSX "On OSX, `SO_LINGER` can return `EINVAL` if the other end of the socket is already closed. In that case, there is nothing for this end of the socket to do, so there's no reason to ""linger."" Windows and Linux do not return errors in this case, so we'll simulate success on OSX as well. @stephentoub Fixes #7403 " 7513 area-System.ComponentModel Add TypeId extension to mimic .NET Framework implementation @chlowell 7514 area-Infrastructure Consider running code coverage builds in Release mode Currently code coverage runs (in the CI) run in debug mode by default. I propose considering changing the build to be a release build for the following reasons: 1. Some debug code will always be uncovered (e.g. numerous `internal void Dump()` methods in System.Net or System.Text.RegularExpressions) 2. Release mode tends to run quicker than debug (I don't have empirical evidence to prove this, and this is definitely a smaller reason than 1.) 3. Tests (typically) test code that the API consumer calls publically to a .dll file built in release mode. If any behaviour is considerably different in release mode then it may not be covered in debug CC runs. This could cause problems. 4. A more accurate coverage report I'd be interested in hearing the arguments for keeping the CC runs in debug mode. 7515 area-System.Net Add CurlHandler.MaxResponseHeadersLength Adds the MaxResponseHeadersLength property to CurlHandler. I also changed the ConnectTimeout default to Infinite until the property is exposed; otherwise, we're enforcing a 60 second timeout on connects without providing any way to override it. cc: @davidsh, @cipop, @ericeil, @kapilash 7517 area-System.Net SslStream test failure in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_debug_prtest/4495/console ``` 07:32:12 System.Net.Security.Tests.SslStreamStreamToStreamTest.SslStream_StreamToStream_LargeWrites_Sync_Success(randomizedData: False) [FAIL] 07:32:12 Handshake complete 07:32:12 Expected: True 07:32:12 Actual: False 07:32:12 Stack Trace: 07:32:12 d:\j\workspace\windows_nt_de---06b7984d\src\System.Net.Security\tests\FunctionalTests\SslStreamStreamToStreamTest.cs(105,0): at System.Net.Security.Tests.SslStreamStreamToStreamTest.SslStream_StreamToStream_LargeWrites_Sync_Success(Boolean randomizedData) ``` 7518 area-System.Data SqlClient: Unable to load DLL 'sni.dll' We are seeing a number of folks hitting the `Unable to load DLL 'sni.dll'` issue with the latest RC2 builds. Folks are hitting this when using EF Core but have confirmed that the issue exists when working directly with SQL Client too. See https://github.com/aspnet/EntityFramework/issues/4953 for a good description from someone hitting the issue. cc @mrmeek who filed the above issue 7520 area-System.Reflection How to use Reflection over .net core libraries? "It is not clear how to properly use reflection over .net core libraries. When trying to use T4 template to reflect over a class library (we do this to generate Typescript definition files of our Dto's. The way we have always done this and expected it to work is the following a simple template: ``` <#@ template debug=""false"" language=""C#"" #> <#@ assembly name=""System.Core"" #> <#@ assembly name=""System.Collections"" #> <#@ assembly name=""System.Linq"" #> <#@ assembly name=""$(SolutionDir)\srcCore\CM.Dtos\bin\Debug\dnx451\CM.Dtos.dll"" #> <#@ import namespace=""System"" #> <#@ import namespace=""System.Linq"" #> <#@ import namespace=""System.Reflection"" #> <#@ import namespace=""System.Collections.Generic"" #> <#@ output extension="".d.ts"" #> <# var assembly = Assembly.GetAssembly(typeof(CM.Dtos.PagedRequest)); var allTypes = assembly.GetTypes().ToList(); ``` this does not seem to work with dnx/core libraries as we expected. How would one crack open library the correct way to reflect over it's classes? " 7522 area-System.Net HttpResponseMessage.Dispose does not cancel an ongoing call to ReadAsync "The ""netcore50"" but not the ""dnxcore50"" version of System.Net.Http 4.0.1-beta-23516 has a bug where calling HttpResponseMessage.Dispose() does not cancel an ongoing call to responseStream.ReadAsync(). This breaks the SignalR client in Universal Windows Platform apps. Here is an example of code that will hang indefinitely if HttpResponseMessage.Dispose() is called before the response body is completed. ``` c# using (var client = new HttpClient()) { var request = new HttpRequestMessage(HttpMethod.Get, ""http://localhost:5000/""); HttpResponseMessage response = null; var ignore = Task.Delay(5000).ContinueWith(_ => { mLogger.WriteLine(""Canceling request""); response.Dispose(); }); mLogger.WriteLine(""Making request""); response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None); mLogger.WriteLine(""Got headers""); var buffer = new byte[1024]; int count = -1; var responseStream = await response.Content.ReadAsStreamAsync(); while (count != 0) { mLogger.WriteLine(""ReadAsync""); count = await responseStream.ReadAsync(buffer, 0, 1024); mLogger.WriteLine(""Finished ReadAsync""); } mLogger.WriteLine(""Request complete""); } ``` **Expected behavior (which happens with the dnxcore50 assembly):** When HttpResponseMessage.Dispose() is called, the ongoing call to responseStream.ReadAsync throws a TaskedCanceledException. **Actual behavior (which happens only with dotnetcore50 assembly):** stream.ReadAsync never completes after HttpResponseMessage.Dispose() is called. To make matters even worse, when/if the response body actually does complete, responseStream.ReadAsync _still_ never finishes. **Note:** If the CancellationToken that is passed to Send is canceled before client.SendAsync completes, SendAsync will throw a TaskedCanceledException with both the dnxcore50 and netcore50 versions of System.Net.Http. That is not what this bug is about. " 7527 area-Microsoft.CSharp Dynamic type resolution goes into infinite recursion "Under certain circumstances dynamic type resolution goes into infinite recursion (causing program to terminate with StackOverflowException) alternating between these methods: ``` Microsoft.CSharp.dll!Microsoft.CSharp.RuntimeBinder.Semantics.TypeManager.SubstTypeCore(Microsoft.CSharp.RuntimeBinder.Semantics.CType type, Microsoft.CSharp.RuntimeBinder.Semantics.SubstContext pctx) Microsoft.CSharp.dll!Microsoft.CSharp.RuntimeBinder.Semantics.TypeManager.SubstTypeArray(Microsoft.CSharp.RuntimeBinder.Semantics.TypeArray taSrc, Microsoft.CSharp.RuntimeBinder.Semantics.SubstContext pctx) ``` This happens only when an argument of type ""dynamic"" is passed, of course. Static typing works fine. Repro: ```c# using System; class Program { static void Main(string[] args) { // vvv--- changing ""dynamic"" to ""var"" or ""string"" here fixes the issue dynamic parsedDocument = """"; var mystery = new FailingClass(); Console.WriteLine(""Entering...""); mystery.FailingMethod(parsedDocument); Console.WriteLine(""... and we are back!""); Console.ReadLine(); } } public abstract class CommonBase {} // Technically, this class does nothing and deriving from it should be identical to deriving from CommonBase public abstract class FailingClassBase : CommonBase {} // However, deriving from CommonBase instead of FailingClassBase here also fixes the issue // ----------------------------vvvvvvvvvvvvvvvv public class FailingClass : FailingClassBase> { public void FailingMethod(T src) {} } ``` [EDIT] Fixed callstack formatting by @karelz [EDIT] Inlined source code from original attachment [repro.txt](https://github.com/dotnet/corefx/files/205290/repro.txt), with minor formatting changes by @karelz" 7528 area-Meta Add not supported assemblies for more packages Some packages are only supported starting with a particular RID (EG: System.Runtime.WinRT packages) For these we should add a dummy impl so that folks can compile, JIT, then light up on win8. 7538 area-Infrastructure Building is slow on Linux On Linux, it takes quite a bit of time to build CoreFX from scratch even if skipping tests (about 52 minutes). However, I was surprised to see that if you just do a change in one of the C# file, the recompilation time (it should really be just recompiling an assembly) is quite long (about 31 minutes). This is on a relatively fast machine with a SSD drive. Is this expected? If not, what am I doing wrong? If so, should we have a fast mode that only compiles the assemblies for which their C# code has changed? Note that on Windows, the behavior is the same but it doesn't take the same amount of time (5 minutes for a rebuild with no changes). 7545 area-System.Security ConvertStringSidToSid() result compared against TRUE "`System.Security.Principal.CreateSidFromString()` has this code: ``` if (TRUE != Interop.mincore.ConvertStringSidToSid(stringSid, out ByteArray)) ``` It looks like this causes `ConvertStringSidToSid()` WinAPI function call and `ConvertStringSidToSid()` is documented to return either ""zero"" or ""non-zero"". So this check should compare the result against `FALSE`, not `TRUE`. " 7546 area-System.Net Improve performance of WebUtility "## Summary No escaping needed: - x5 performance improvement - 0 allocations Basic escaping needed (single char): - 20% performance improvement - Allocations cut by a third Advanced escaping needed (surrogate pair): - 15% performance improvement - Allocations cut by a third ## Benchmark Results - No breaking change in behaviour in these validation tests - Times measured in seconds ![benchmark](https://cloud.githubusercontent.com/assets/1275900/14318468/e4ba70d0-fc04-11e5-8a42-3604666dbab3.png) ## Benchmark Code and !!Validation Tests!! - **To ensure there were no breaking changes** I ran the new output against the old output for every single char and surrogate pair in the UTF16 plane. ``` c# static unsafe void Main(string[] args) { PerformanceTests(); VerificationTests(); Console.ReadLine(); } private static void PerformanceTests() { Console.WriteLine(""**** MEASURE NO ESCAPING ****""); TimeAction(""Old: "", () => Old.UrlEncode(""abcxyz"")); TimeAction(""New: "", () => New.UrlEncode(""abcxyz"")); Console.WriteLine(""**** MEASURE SPACES ****""); TimeAction(""Old: "", () => Old.UrlEncode(""abc xyz"")); TimeAction(""New: "", () => New.UrlEncode(""abc xyz"")); Console.WriteLine(""**** MEASURE ESCAPING 1 TIMES ****""); TimeAction(""Old: "", () => Old.UrlEncode(""\u007F"")); TimeAction(""New: "", () => New.UrlEncode(""\u007F"")); Console.WriteLine(""**** MEASURE ESCAPING 2 TIMES ****""); TimeAction(""Old: "", () => Old.UrlEncode(""\u07FF"")); TimeAction(""New: "", () => New.UrlEncode(""\u07FF"")); Console.WriteLine(""**** MEASURE ESCAPING 3 TIMES ****""); TimeAction(""Old: "", () => Old.UrlEncode(""\u1234"")); TimeAction(""New: "", () => New.UrlEncode(""\u1234"")); Console.WriteLine(""**** MEASURE ESCAPING SURROGATE PAIR ****""); TimeAction(""Old: "", () => Old.UrlEncode(""\uD801\uDC37"")); TimeAction(""New: "", () => New.UrlEncode(""\uD801\uDC37"")); } public static void TimeAction(string prefix, Action action) { action(); GC.Collect(); var sw = new Stopwatch(); for (int iter = 0; iter < 5; iter++) { int gen0 = GC.CollectionCount(0); sw.Restart(); for (int i = 0; i < 100000000; i++) { action(); } sw.Stop(); Console.WriteLine($""{prefix}Time: {sw.Elapsed.TotalSeconds}\tGC0: {GC.CollectionCount(0) - gen0}""); } } private static void VerificationTests() { for (int i = 0; i < char.MaxValue; i++) { char c = (char)i; string oldString = Old.UrlEncode(c.ToString()); string newString = New.UrlEncode(c.ToString()); if (!oldString.Equals(newString)) { Console.WriteLine($""FAIL for char {i}. Expected: {oldString}. Actual: {newString}""); } } for (int i = 0x10000; i < 0x10FFFF; i++) { string utf32 = char.ConvertFromUtf32(i); string oldString = Old.UrlEncode(utf32); string newString = New.UrlEncode(utf32); if (!oldString.Equals(newString)) { Console.WriteLine($""FAIL for char {i}. Expected: {oldString}. Actual: {newString}""); } } Console.WriteLine(""Passes Validation Tests""); } ``` /cc @davidsh, @stephentoub, @jamesqo " 7547 area-System.Security ConvertStringSdToSd()/ConvertSdToStringSd() result compared against TRUE "`System.Security.AccessControl.RawSecurityDescriptor.BinaryFormFromSddlForm()` has this code: ``` if (TRUE != Interop.mincore.ConvertStringSdToSd( ``` and `System.Security.AccessControl.Win32.ConvertSdToSddl()` has this code: ``` if (TRUE != Interop.mincore.ConvertSdToStringSd(binaryForm, //WHATEVER ``` `ConvertStringSdToSd()/ConvertSdToStringSd()` are some barely documented functions which looks very similar to `ConvertStringSidToSid()/ConvertSidToStringSid()` and the latter return either ""zero"" or ""non-zero"". Most likely `ConvertStringSdToSd()/ConvertSdToStringSd()` behave the same way and so those checks should compare the result against `FALSE`, not against `TRUE`. " 7548 area-System.Net Exception thrown in Constructor of CookieContainer "I've got an issue with the CookieContainer in my UWP application. ### Expected behaviour The constructors of `CookieContainer`, `HttpClient` and `HttpClientHandler` should not thow an exception when invoked without a parameter. ### Actual behavior - Creating a new instance of `CookieContainer` throws an exception. - Creating a new `HttpClient` or `HttpClientHandler` throws an exception because they create a new `CookieContainer` internally. - It is not possible to use any of these classes. Stack trace/message of the exception: ``` System.ArgumentException: The parameter is incorrect. hostName at Windows.Networking.Connectivity.NetworkInformation.GetHostNames() at System.Net.NetworkInformation.HostInformation.GetFixedInfo() at System.Net.NetworkInformation.HostInformation.get_FixedInfo() at System.Net.NetworkInformation.HostInformation.get_DomainName() at System.Net.CookieContainer..ctor() at System.Net.Http.HttpClientHandler..ctor() ``` The last function in the call stack: [`NetworkInformation.GetHostNames`](https://msdn.microsoft.com/library/windows/apps/windows.networking.connectivity.networkinformation.gethostnames), which doesn't take any parameters. Therefore, I don't which parameter `hostName` could be wrong that I am passing causing the exception. ### Steps to fix/reproduce I figured out how to work around the problem: - Goto `Control Panel\All Control Panel Items\System` -> `Advanced System Settings` -> `Computer Name` -> `Change` -> `More` - Clear what's in the text box of ""Primary DNS suffix of this computer"" (it was `42` before, since this is my local dns suffix, so the FQDN of my host is `hostname.42`). - This is reproducible on my machine. Didn't test this on other machines. - It works using a DNS suffix which is not a number (tested with `foo`). If this behaviour is intended, the possibility of an exception when calling `NetworkInformation.GetHostNames` should be documented. Windows Build: Version 1511 (10586.164) Edit: What I think is that NetworkInformation.GetHostNames() calls `GetAllHostNames()` from `Windows.Networking.HostName.dll` (listed as import of the dll of NetworkInformation). The `HostName` constructor is then used to create the instances of `HostName`. I think the call to the function `HostNameImpl::CanonicalizeHostName` fails, since it raises an exception when it fails. Maybe it's [`DnsValidateName`](https://msdn.microsoft.com/en-us/library/windows/desktop/ms682032%28v=vs.85%29.aspx) that classifies the host name `host.42` as invalid (which seems correct to me). " 7550 area-System.Security Remove Pinvoke exceptions in System.Security.Cryptography.Csp PinvokeAnalyzerExceptionList.analyzerdata in System.Security.Cryptography.Csp implementation contains non api-set pinvokes. Corefx repro is following apiset model and so these Pinvokes should be changed to use the APISet counter parts. If you remove exception list. Pinvoke analyzer will suggest in its error message the correct Apiset to use for this. Advapi32.dll!CryptAcquireContextW Advapi32.dll!CryptGetProvParam Advapi32.dll!CryptGetUserKey Advapi32.dll!CryptGetKeyParam Advapi32.dll!CryptGenKey Advapi32.dll!CryptReleaseContext Advapi32.dll!CryptDecrypt Advapi32.dll!CryptEncrypt Advapi32.dll!CryptExportKey Advapi32.dll!CryptImportKey Advapi32.dll!CryptCreateHash Advapi32.dll!CryptGetHashParam Advapi32.dll!CryptSetHashParam Advapi32.dll!CryptSignHashW Advapi32.dll!CryptVerifySignatureW Advapi32.dll!CryptDestroyKey Advapi32.dll!CryptDestroyHash 7551 area-System.Security Remove Pinvoke exceptions in System.Security.Cryptography.X509Certificates PinvokeAnalyzerExceptionList.analyzerdata in System.Security.Cryptography.X509Certificates implementation contains non api-set pinvoke. Corefx repro is following apiset model and so these Pinvokes should be changed to use the APISet counter part. If you remove exception list, Pinvoke analyzer will suggest in its error message the correct Apiset to use for this. advapi32.dll!CryptAcquireContextW bcrypt.dll!BCryptDestroyKey --> I believe this was ok, I think we discussed this and it was fixed by windows (@bartonjs might know more about this :)). 7552 area-System.Runtime TimeZoneInfo.FindSystemTimeZoneById throws TimeZoneNotFoundException ".NET Core exposes `TimeZoneInfo.FindSystemTimeZoneById(string)` [(MSDN)](https://msdn.microsoft.com/en-us/library/system.timezoneinfo.findsystemtimezonebyid%28v=vs.110%29.aspx) which throws a `TimeZoneNotFoundException`. But the exception can't be caught because `TimeZoneNotFoundException` isn't exposed in .NET Core. We should include the exception type in the System.Runtime contract alongside the API that throws it. Repro: ``` C# using System; public class Program { public static void Main(string[] args) { Console.WriteLine(TimeZoneInfo.FindSystemTimeZoneById(""DoesNotExist"").ToString()); } } ``` " 7561 area-System.Net Strange HttpClient behavior with many concurrent requests on OS X and Linux "When a lot of concurrent requests are thrown at `HttpClient`, I see varying behavior on the different platforms: **Mac OS X**: lots of ""Couldn't connect to server"" and ""Couldn't resolve host name"" errors. **Linux**: works a lot of the time but sometimes hangs due and throws a `TaskCancelledException` due to `HttpClient.Timeout`. **Windows**: works fine. Here is a small `dotnet` application that reproduces the problem: [lotsofhttp.zip](https://github.com/dotnet/corefx/files/207394/lotsofhttp.zip) The input I give to my program is: ``` dotnet run 500 10 500 https://api.nuget.org/v3-flatcontainer/newtonsoft.json/index.json ``` That is, 500 concurrent tasks, 10 iterations per tasks, and a throttling semaphore of 500. The URL `https://api.nuget.org/v3-flatcontainer/newtonsoft.json/index.json` is downloaded for each iteration. My suspicion is there is some kind of handle limiting going on OS X that prevents so many concurrent requests. Are these failures expected? Am I voiding a warranty :smile:? The workaround is certainly to apply throttling above `HttpClient` in the application, correct? I am using System.Net.Http 4.0.1-rc2-23931. " 7562 area-System.Runtime Add missing System.Runtime tests Porting missing tests that are present in SystemRuntimeBringup internally. 7563 area-System.Runtime Add a few GCSettings tests Tests round-tripping for GCSettings properties. Taken from the tests in `QA\ToF\tests\FX\GC`, though there are a number of tests present there that are far more in depth than these. I won't be disabling those tests without the go-ahead from someone more familiar with the GC. 7564 area-System.Net Improvements to CurlHandler perf and reliability 1. **Extend SafeCurlMultiHandle lifetime to that of its MultiAgent.** Today each time we spin up a worker in CurlHandler, we create a new SafeCurlMultiHandle, use it for the lifetime of that worker, and then when the worker goes away, the multi handle is torn down. This was done for simplicity of resource management, but it also leads to significant overheads due to everything that libcurl caches associated with the multi handle, e.g. when the multi handle goes away, so does it connection cache, its DNS cache, etc. This commit addresses that by extending the lifetime of the multi handle to match that of the CurlHandler. We still lazily create the handle when the first worker is spun up, but then we keep it alive until the CurlHandler is disposed. As before, we ensure that as long as a worker is running, the multi handle will be kept alive, even if the handler is disposed. 2. **Extend DNS cache timeout in CurlHandler.** Now that we're allowing the multi handle to live for as long as the CurlHandler, the DNS cache timeout starts to matter much more. libcurl will cache the results of DNS lookups, and by default will timeout entries after 1 minute. Our Windows implementation defaults to 10 minutes, so I'm extending our Unix implementation to match that. 3. **Only call curl_multi_wait if there are active operations.** The CurlHandler work is sometimes hitting pauses unnecessarily, where it finishes processing the last active request and then calls curl_multi_wait to wait for more work to do. This is purely wasteful and can be skipped when we know there aren't any more active operations. 4. **Improve reliability of CurlHandler MultiAgent worker.** If something unexpectedly goes wrong in our worker loop, and in particular when queuing a replacement worker, we may end up leaving a request sitting in the request queue with no one to process it. This commit ensures that if something does go horribly wrong, the agent is left in a state where subsequent incoming requests can still kick off another worker, and in the meantime any pending requests in the queue are failed, so that code blocking on them doesn't simply hang. As I was looking at this and some of our dispose usage, I also cleaned up a few places that could be simplified using the C# 6 ?. syntax. cc: @ericeil, @bartonjs 7569 area-System.Text Regex incorrectly identify surrogate pair unicode category "This defect makes regex useless when you need to match string using unicode categories and string could contain surrogate pairs: ``` c# [Test] public void ClassifySurrogates_Test() { var value = ""𦕒""; var regexLetters = new Regex(@""^\p{Lo}$""); var regexSurrogates = new Regex(@""^\p{Cs}{2}$""); Assert.AreEqual(UnicodeCategory.OtherLetter, char.GetUnicodeCategory(value, 0)); Assert.AreEqual(UnicodeCategory.OtherLetter, CharUnicodeInfo.GetUnicodeCategory(value, 0)); Assert.True(regexSurrogates.IsMatch(value)); // Fails here Assert.True(regexLetters.IsMatch(value)); } ``` " 7570 area-System.IO System.IO.Compression to support zlib thin wrapper over DEFLATE? Currently we have access to this: https://msdn.microsoft.com/en-us/library/system.io.compression.deflatestream(v=vs.110).aspx The _DeflateStream_ type can be used to compress/decompress DEFLATE data. Yet in the wild world people normally wrap that with zlib (i.e. RFC1950), e.g. in the Git pack file, there are multiple zlib streams embedded within. Given underneath we are calling zlib Native, any chance we could provide types that can handle zlib streams? As in: https://github.com/icsharpcode/SharpZipLib/blob/master/src/Zip/Compression/Inflater.cs https://docs.python.org/2/library/zlib.html (zlib.compress(string[, level])) 7575 area-System.IO Filesystem enumeratenonexistent When enumerating over the entries in the current directory there is the potential for a DirectoryNotFoundException if one of the directories in the current directory is deleted. Since we can't easily ensure no corefx tests are modifying the files in the current directory, I opted to instead run the test in its own process with its own current directory (set to a test path). resolves #7484 @stephentoub 7576 area-System.IO FileSystemWatcher and network shares This is related to this bug: https://github.com/aspnet/dotnet-watch/issues/55 The scenario is that you are running your application inside a container using dotnet-watch. Dotnet-watch will watch your files and restart your app whenever you change your code. The issue is that when using Docker your source is typically mounted using something like Samba or VirtualBox shares which means you don't get watcher events fired. What should dotnet-watch do in this case? My current plan is to use a polling file watcher and have a way to launch dotnet-watch in a mode that uses polling when needed. Is there something we can do in corefx to make this better or is this completely up to dotnet-watch to implement? 7577 area-Serialization DataContractSerializer in CoreCLR underperforms Desktop in dictionary scenarios In CoreClr simple dictionary is serialized/deserialized slower up to 2x compared to Desktop 7578 area-Serialization DataContractJsonSerializer in CoreClr is slower than Desktop in simple dictionary scenarios 7579 area-Serialization DataContractJsonSerializer in CoreClr is slower than Desktop in string scenarios 7580 area-System.Linq Linq (Enumerable.cs) should provide overloads for functions that can benefit heavily from knowing the static type of the receiver. Methods like Enumerable.Last work terribly if you pass in something that implements IReadOnlyList but not IList. We could provide additional overloads like: `public static T Last(this IReadOnlyList list) { ... }` so that we now had optimized implementations for these types. This would also be beneficial so we can have codepaths that avoid having to dynamically check the type of the receiver at runtime when the compiler already knows statically what it can dispatch to. 7584 area-Serialization Perf test failures in corefx / src / System.Xml.XmlSerializer / tests / System.Xml.XmlSerializer.Tests.csproj @khdang there seem to be some failures in tests related to corefx / src / System.Xml.XmlSerializer / tests / System.Xml.XmlSerializer.Tests.csproj (Can be repro-ed by >msbuild src\System.Xml.XmlSerializer\tests\System.Xml.XmlSerializer.Tests.csproj /t:BuildAndTest /p:Performance=true /p:Configuration=Release) Please take a look and fix these 7585 area-Infrastructure PInvokeAnalyzer throws NullReferenceException on x-plat builds See http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_ubuntu14.04_debug/76/consoleFull ``` 02:12:18 CSC : error AD0001: Analyzer 'Microsoft.DotNet.CodeAnalysis.Analyzers.PinvokeAnalyzer' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'. [/mnt/j/workspace/dotnet_corefx/outerloop_ubuntu14.04_debug/src/System.IO.FileSystem/src/System.IO.FileSystem.csproj] ``` 7587 area-System.Net Use IntPtr-based file descriptors exclusively, in native calls from Sockets code. This is step 1 of the fix for #6928. This change introduces new native methods that take `IntPtr` file descriptor arguments instead of `int`, and moves all callers to use the new methods, eliminating custom SafeHandle marshaling. Once this new `System.Native` propagates everywhere, we can remove the old methods and eliminate the `_IntPtr` suffix on the names. @stephentoub 7593 area-System.Runtime Parse integers in a string based on an index ## Summary Currently parsing integers takes a string, and parses the entirety of the string. I propose adding APIs to parse a string from an index, with an additional overload specifying the length. ## Rationale In order to parse part of a string, we need to perform a `string.Substring(...)` method on the string. This results in allocations, affecting performance. ## Proposed APIs - with slices ``` csharp public int Parse(ReadOnlySlice s) public int Parse(ReadOnlySlice s, IFormatProvider format); public bool TryParse(ReadOnlySlice s, out int i); public bool TryParse(ReadOnlySlice s, IFormatProvider format, out int i); ``` ## Proposed APIs - without slices ``` csharp public class Int32 { // Proposed new APIs public int Parse(string s, int index); // Either public int Parse(string s, int index, int count); // or Public int Parse(string s, int index, int length); // or public int Parse(string s, int startIndex, int endIndex); // Existing parsing APIs public int Parse(string); ... } ``` ## Discussion - These overloads should be intelligent and not allocate any substrings - I assume TryParse overloads would also have to be added - Would we need to add overloads taking an IFormatProvider too - How common is this use case? - Is this worth adding 4 public methods to each integer type? - Should we bother with the `Parse(string, int)` overload? I think most people calling his API would know the required length. ## Example I added some custom parsing code in a PR in coreclr (dotnet/coreclr#3992). This is basically the code that these proposed methods would use. Parsing performance of ints in Version increased by up to 4x due to reduced substring allocations. Another example is Guid (dotnet/coreclr#3965) where performance of parsing Guid strings increased by up to 3x with the allocation count reducing to 0. ## Alternatives - Add a `Parse(char* s, int count)` method instead but this is rare 7594 area-System.Runtime BitConverter: Write bytes to exisiting array "I moved this here from dotnet/coreclr#4142 because I was told this is the right place. Hello, are there any ambitions to provide an API to BitConverter that takes an exisiting `byte[]` and position to include the bytes of a primitive? Right now I have an additional converter based on BitConverter that has methods like this: ``` c# /// /// Includes an int into an array of bytes /// public unsafe static void InsertBytes(int value, byte[] bytes, int index) { // Error handling and parameter validation if (bytes == null) throw new ArgumentNullException(nameof(bytes)); if (index + 4 > bytes.Length) throw new ArgumentOutOfRangeException(nameof(index)); fixed (byte* b = bytes) *((int*)(b + index)) = value; } /// /// Includes a long into an array of bytes /// [System.Security.SecuritySafeCritical] // auto-generated public unsafe static void InsertBytes(long value, byte[] bytes, int index) { // Error handling and parameter validation if (bytes == null) throw new ArgumentNullException(""bytes""); if (index + 8 > bytes.Length) throw new ArgumentOutOfRangeException(""index""); fixed (byte* b = bytes) *((long*)(b + index)) = value; } ``` I think it would be great to have those methods as well whenever we try to serialize values into an array without having to use `Array.Copy` all the time. To avoid redundant code the `GetBytes` methods should then just call the new methods. ``` c# // Converts an int into an array of bytes with length // four. [System.Security.SecuritySafeCritical] // auto-generated public unsafe static byte[] GetBytes(int value) { Contract.Ensures(Contract.Result() != null); Contract.Ensures(Contract.Result().Length == 4); byte[] bytes = new byte[4]; InsertBytes(value, bytes, 0); return bytes; } // Converts a long into an array of bytes with length // eight. [System.Security.SecuritySafeCritical] // auto-generated public unsafe static byte[] GetBytes(long value) { Contract.Ensures(Contract.Result() != null); Contract.Ensures(Contract.Result().Length == 8); byte[] bytes = new byte[8]; InsertBytes(value, bytes, 0); return bytes; } ``` I would be happy to submit a PR once this was reviewed and approved. " 7595 area-System.Threading Add some Threading tests Adds threading tests to cover all gaps from ToF/tests/FX/Threading with the exception of the tests for the Monitor class which will have their own issue now: #6459 7596 area-Microsoft.CSharp SymbolTable.DoesMethodHaveParameterArray throws exception when accessing a dynamic created property "--> Tested with **dnxcore50**: The following helper code to create a dynamic type with certain properties: ``` c# public static dynamic Create(IDictionary properties) { AssemblyName name = new AssemblyName(""Test.DynamicClasses, Version=1.0.0.0""); AssemblyBuilder assembly = AssemblyBuilder.DefineDynamicAssembly(name, AssemblyBuilderAccess.RunAndCollect); var module = assembly.DefineDynamicModule(""Test.DynamicClasses""); string typeName = ""DynamicClass1""; TypeBuilder tb = module.DefineType(typeName, TypeAttributes.Class | TypeAttributes.Public, typeof(DynamicClass)); GenerateProperties(tb, properties); Type result = tb.CreateTypeInfo().AsType(); return Activator.CreateInstance(result); } ``` And the method which uses IL to create the backing fields, get/set methods and the properties: ``` c# private static FieldInfo[] GenerateProperties(TypeBuilder tb, IDictionary properties) { const MethodAttributes getSetAttr = MethodAttributes.Public | MethodAttributes.SpecialName | MethodAttributes.HideBySig; FieldInfo[] fields = new FieldBuilder[properties.Count]; int i = 0; foreach (string key in properties.Keys) { string name = key; Type type = properties[key]; FieldBuilder fb = tb.DefineField(""_"" + key, type, FieldAttributes.Public); PropertyBuilder pb = tb.DefineProperty(key, PropertyAttributes.HasDefault, type, null); MethodBuilder mbGet = tb.DefineMethod(""get_"" + name, getSetAttr, type, Type.EmptyTypes); ILGenerator genGet = mbGet.GetILGenerator(8); genGet.Emit(OpCodes.Ldarg_0); genGet.Emit(OpCodes.Ldfld, fb); genGet.Emit(OpCodes.Ret); pb.SetGetMethod(mbGet); MethodBuilder mbSet = tb.DefineMethod(""set_"" + name, getSetAttr, null, new Type[] { type }); ILGenerator genSet = mbSet.GetILGenerator(8); genSet.Emit(OpCodes.Ldarg_0); genSet.Emit(OpCodes.Ldarg_1); genSet.Emit(OpCodes.Stfld, fb); genSet.Emit(OpCodes.Ret); pb.SetSetMethod(mbSet); fields[i] = fb; } return fields; } ``` And the test code is like: ``` c# var list = new Dictionary(); list.Add(""x"", typeof(string)); var obj = Fact.Create(list); obj._x = ""ddd""; // accessing backing field directly works string x_ = obj._x; // works Console.WriteLine(""x_=[{0}]"", x_); obj.x = ""err""; // does not work --> throws exception like below string x = obj.x; // does not work --> throws exception like below Console.WriteLine(x); ``` ``` System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.CSharp.RuntimeBinder.SymbolTable.DoesMethodHaveParameterArray(ParameterInfo[] parameters) at Microsoft.CSharp.RuntimeBinder.SymbolTable.AddMethodToSymbolTable(MemberInfo member, AggregateSymbol callingAggregate, MethodKindEnum kind) at Microsoft.CSharp.RuntimeBinder.SymbolTable.AddPropertyToSymbolTable(PropertyInfo property, AggregateSymbol aggregate) at Microsoft.CSharp.RuntimeBinder.SymbolTable.AddNamesInInheritanceHierarchy(String name, List`1 inheritance) at Microsoft.CSharp.RuntimeBinder.SymbolTable.PopulateSymbolTableWithName(String name, IEnumerable`1 typeArguments, Type callingType) at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.PopulateSymbolTableWithPayloadInformation(DynamicMetaObjectBinder payload, Type callingType, ArgumentObject[] arguments) at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.BindCore(DynamicMetaObjectBinder payload, IEnumerable`1 parameters, DynamicMetaObject[] args, DynamicMetaObject& deferredBinding) at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.Bind(DynamicMetaObjectBinder payload, IEnumerable`1 parameters, DynamicMetaObject[] args, DynamicMetaObject& deferredBinding) at Microsoft.CSharp.RuntimeBinder.BinderHelper.Bind(DynamicMetaObjectBinder action, RuntimeBinder binder, IEnumerable`1 args, IEnumerable`1 arginfos, DynamicMetaObject onBindingError) at Microsoft.CSharp.RuntimeBinder.CSharpSetMemberBinder.FallbackSetMember(DynamicMetaObject target, DynamicMetaObject value, DynamicMetaObject errorSuggestion) at System.Dynamic.DynamicMetaObject.BindSetMember(SetMemberBinder binder, DynamicMetaObject value) at System.Dynamic.SetMemberBinder.Bind(DynamicMetaObject target, DynamicMetaObject[] args) at System.Dynamic.DynamicMetaObjectBinder.Bind(Object[] args, ReadOnlyCollection`1 parameters, LabelTarget returnLabel) at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args) ``` " 7597 area-Infrastructure .NET Core test coverage for Bash on Windows https://blogs.windows.com/buildingapps/2016/03/30/run-bash-on-ubuntu-on-windows/ We should add a .NET Core test run for Bash on Windows. @Chrisboh could you add this to Helix initially? 7599 area-System.Net Linux: ArgumentOutOfRangeException on multi-row insert on SQL Azure I get: ``` ---- System.Data.SqlClient.SqlException : A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 35 - An internal exception was caught) -------- System.IO.IOException : The write operation failed, see inner exception. ------------ System.ArgumentOutOfRangeException : Specified argument was out of the range of valid values. Parameter name: size at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, TdsParserStateObject stateObj, Boolean isCommandProc, Boolean sync, TaskCompletionSource`1 completion, Int32 startRpc, Int32 startParam) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, String executeMethod, IReadOnlyDictionary`2 parameterValues, Boolean openConnection, Boolean closeConnection) at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues, Boolean manageConnection) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection) ----- Inner Stack Trace ----- at System.Net.Security.SslStreamInternal.ProcessWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslStream.Write(Byte[] buffer, Int32 offset, Int32 count) at System.Data.SqlClient.SNI.SNITCPHandle.Send(SNIPacket packet) ----- Inner Stack Trace ----- at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size) at System.Data.SqlClient.SNI.SslOverTdsStream.Write(Byte[] buffer, Int32 offset, Int32 count) at System.Net.Security.SslStreamInternal.StartWriting(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) ``` When running ``` SQL SET NOCOUNT ON; DECLARE @toInsert2 TABLE ([Color] nvarchar(15), [DiscontinuedDate] datetime, [ListPrice] money, [Name] nvarchar(450), [ProductCategoryID] int, [ProductModelID] int, [ProductNumber] nvarchar(25), [SellEndDate] datetime, [SellStartDate] datetime, [Size] nvarchar(5), [StandardCost] money, [ThumbNailPhoto] varbinary(max), [ThumbnailPhotoFileName] nvarchar(50), [Weight] decimal, [_Position] [int]); INSERT INTO @toInsert2 VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11, @p12, @p13, 0), (@p14, @p15, @p16, @p17, @p18, @p19, @p20, @p21, @p22, @p23, @p24, @p25, @p26, @p27, 1); DECLARE @inserted2 TABLE ([ProductID] int, [Color] nvarchar(15), [DiscontinuedDate] datetime, [ListPrice] money, [ModifiedDate] datetime, [Name] nvarchar(450), [ProductCategoryID] int, [ProductModelID] int, [ProductNumber] nvarchar(25), [SellEndDate] datetime, [SellStartDate] datetime, [Size] nvarchar(5), [StandardCost] money, [ThumbNailPhoto] varbinary(max), [ThumbnailPhotoFileName] nvarchar(50), [Weight] decimal, [rowguid] uniqueidentifier, [_Position] [int]); MERGE [SalesLT].[Product] USING @toInsert2 AS i ON 1=0 WHEN NOT MATCHED THEN INSERT ([Color], [DiscontinuedDate], [ListPrice], [Name], [ProductCategoryID], [ProductModelID], [ProductNumber], [SellEndDate], [SellStartDate], [Size], [StandardCost], [ThumbNailPhoto], [ThumbnailPhotoFileName], [Weight]) VALUES (i.[Color], i.[DiscontinuedDate], i.[ListPrice], i.[Name], i.[ProductCategoryID], i.[ProductModelID], i.[ProductNumber], i.[SellEndDate], i.[SellStartDate], i.[Size], i.[StandardCost], i.[ThumbNailPhoto], i.[ThumbnailPhotoFileName], i.[Weight]) OUTPUT INSERTED.[ProductID], INSERTED.[Color], INSERTED.[DiscontinuedDate], INSERTED.[ListPrice], INSERTED.[ModifiedDate], INSERTED.[Name], INSERTED.[ProductCategoryID], INSERTED.[ProductModelID], INSERTED.[ProductNumber], INSERTED.[SellEndDate], INSERTED.[SellStartDate], INSERTED.[Size], INSERTED.[StandardCost], INSERTED.[ThumbNailPhoto], INSERTED.[ThumbnailPhotoFileName], INSERTED.[Weight], INSERTED.[rowguid], i._Position INTO @inserted2; SELECT [ProductID], [ModifiedDate], [rowguid] FROM @inserted2 ORDER BY _Position; ``` with ``` SQL `@p0 nvarchar(max) ,@p1 datetime2(7),@p2 decimal(1,0),@p3 nvarchar(4000),@p4 int,@p5 int,@p6 nvarchar(4000),@p7 datetime2(7),@p8 datetime2(7),@p9 nvarchar(max) ,@p10 decimal(1,0),@p11 varbinary(max) ,@p12 nvarchar(max) ,@p13 decimal(4,0),@p14 nvarchar(max) ,@p15 datetime2(7),@p16 decimal(1,0),@p17 nvarchar(4000),@p18 int,@p19 int,@p20 nvarchar(4000),@p21 datetime2(7),@p22 datetime2(7),@p23 nvarchar(max) ,@p24 decimal(1,0),@p25 varbinary(max) ,@p26 nvarchar(max) ,@p27 decimal(4,0)', @p0=NULL,@p1=NULL,@p2=0,@p3=N'1705deb0-2dff-40d1-a40e-f3ff1c42e36d',@p4=NULL,@p5=NULL,@p6=N'1705deb0-2dff-40d1-a40e-f',@p7=NULL,@p8='2016-04-08 13:03:35.3168817',@p9=NULL,@p10=0,@p11=NULL,@p12=NULL,@p13=1000,@p14=NULL,@p15=NULL,@p16=0,@p17=N'5c6dc402-ab8c-4f7f-a40d-945c0491c8b8',@p18=NULL,@p19=NULL,@p20=N'5c6dc402-ab8c-4f7f-a40d-9',@p21=NULL,@p22='2016-04-08 13:03:35.8103840',@p23=NULL,@p24=0,@p25=NULL,@p26=NULL,@p27=1000 ``` On Linux CoreCLR against [adventureworks.zip](https://github.com/dotnet/corefx/files/210782/adventureworks.zip) See aspnet/EntityFramework#4228 7600 area-System.Net Use IntPtr-based file descriptors exclusively, in native calls from Sockets code, part 2 "Part 2 of the fix for #6928. Change signatures of the ""permanent"" native networking methods to take IntPtr arguments, and switch back to using those methods. Once this change propagates everywhere, we can remove the *_IntPtr methods introduced in #7587. @stephentoub " 7605 area-Infrastructure Add /a option to clean.cmd clean.cmd supports /all, clean.sh supports -a and --all, for parity consider adding /a option to clean.cmd 7608 area-Serialization Improve data contract serializers performance in dictionary scenario - Improve data contract serializers performance in dictionary scenario by 2x. - Instead of the current way to get encoded string which involves string creation and buffer copy, use the encoding.GetBytes API - When creating a new instance of a type without a default constructor we use reflection to invoke a method that is not from the serialization assembly. Since that is significantly slower, we should use Activator.CreateInstance whenever we can. The Activator.CreateInstance throws exception so we need to check to know if a type has default constructor or not and use the appropriate method. As this check is also slow, so I've added a cache to make sure we only do this once for each type. - ~~Internally dictionaries are handled as collection of KeyValues. I've updated this type to have default constructor so we can use Activator.CreateInstance to create new instance of it.~~ Update: - Instead of converting KeyValue type to class, which potentially causes GC long pauses, use Activator.CreateInstance for value type cc: @shmao @SGuyGe @zhenlan @mconnew Fix #7578 and #7577 7622 area-System.Net WinHttpResponseStream: Cannot access a disposed object. @davidsh Looks like this might be for you based on other issues. This just started cropping up with my use of both `WindowsAzure.Storage` versions `6.2.2-preview` and `7.0.1-preview` when calling `.ExecuteQuerySegmentedAsync(...)`. The resolved version of the `System.Net.Http` package is `4.0.1-rc3-24008-00`. If you would like a repro of the issue, let me know, and I'll put one up. If this is just due to current churn, no prob, I can wait (a few days anyway). ``` xml 501 NotImplemented Primary 128c10da-0002-001a-0982-920393000000 Sat, 09 Apr 2016 17:07:40 GMT Sat, 09 Apr 2016 17:07:38 GMT Sat, 09 Apr 2016 17:07:41 GMT NotImplemented The requested operation is not implemented on the specified resource. RequestId:128c10da-0002-001a-0982-920393000000 Time:2016-04-09T17:07:40.7566462Z StorageException -2146233088 Cannot access a disposed object. Object name: 'System.Net.Http.WinHttpResponseStream'. ObjectDisposedException -2146232798 Cannot access a disposed object. Object name: 'System.Net.Http.WinHttpResponseStream'. System.Net.Http at System.Net.Http.WinHttpResponseStream.CheckDisposed() at System.Net.Http.WinHttpResponseStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken token) at System.Net.Http.DelegatingStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) at Microsoft.WindowsAzure.Storage.Core.Util.StreamExtensions.<WriteToAsync>d__1`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.<ExecuteAsyncInternal>d__4`1.MoveNext() ``` 7623 area-System.Net System.Net.Http 4.1 Contract Revisions ## Background To support important customer scenarios for CoreFx RTM, we want to update the System.Net.Http contract from 4.0 to 4.1. The System.Net.Http API surface consists of several classes. All of the implementation also lives in the .NET Framework as mostly a standalone implementation DLL (System.Net.Http.dll). Some functionality depends on low level APIs (such as HttpWebRequest) that lives in System.dll As part of updating the contract to 4.1, we are also OOB'ing the Desktop (net46 Windows) implementation so that the package won't be a facade over Desktop but rather a full implementation. As part of this, we are changing the implementation used for Desktop from the legacy HttpWebRequest sockets stack to the WinHttpHandler stack based on native WinHTTP. This will give us a good path forward as WinHttpHandler stack will be getting HTTP/2.0 support with newer versions of Windows 10. Since we are OOB'ing the DLL, we are able to add surface area as regular properties and not be forced to use extension methods (which wouldn't work in this case anyways). .NET Framework (Desktop) developers will only get this new implementation and expanded API set when they consume the NuGet package. Otherwise .NET Framework (Desktop) developers will get the existing inbox implementation. ## Proposed API ``` c# namespace System.Net.Http { // Other classes already part of System.Net.Http 4.0 contract ... public partial class HttpClientHandler : System.Net.Http.HttpMessageHandler { // // Existing methods and properties. // public HttpClientHandler() { } public bool AllowAutoRedirect { get; set; } public System.Net.DecompressionMethods AutomaticDecompression { get; set; } public System.Net.Http.ClientCertificateOption ClientCertificateOptions { get; set; } public System.Net.CookieContainer CookieContainer { get; set; } public System.Net.ICredentials Credentials { get; set; } public int MaxAutomaticRedirections { get; set; } public long MaxRequestContentBufferSize { get; set; } public bool PreAuthenticate { get; set; } public System.Net.IWebProxy Proxy { get; set; } public virtual bool SupportsAutomaticDecompression { get; } public virtual bool SupportsProxy { get; } public virtual bool SupportsRedirectConfiguration { get; } public bool UseCookies { get; set; } public bool UseDefaultCredentials { get; set; } public bool UseProxy { get; set; } protected override void Dispose(bool disposing); protected internal override System.Threading.Tasks.Task SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken); // // New properties. // public bool CheckCertificateRevocationList { get; set; } // Wanted to have this property be on type 'X509Certificate2Collection' but conflicts // with derived class WebRequestHandler in .NET Framework of the same property name. public System.Security.Cryptography.X509Certificates.X509CertificateCollection ClientCertificates { get; set; } // Wanted to have this property be called 'ServerCertificateValidationCallback` but // that name would conflict the derived class WebRequestHandler in .NET Framework // where the property is of a different type. public System.Func ServerCertificateCustomValidationCallback { get; set; } public System.Net.ICredentials DefaultProxyCredentials { get; set; } public int MaxConnectionsPerServer { get; set; } public int MaxResponseHeadersLength { get; set; } public System.Security.Authentication.SslProtocols SslProtocols { get; set; } // Generic property bag to that would allow for additional properties to be set and recognized by particular implementations (i.e. Windows vs. Unix, Unix-only connection socket options, etc.) public System.Collections.Generic.IDictionary Properties { get; } } } ``` ## Open Questions / Issues - There is an existing .NET Framework type, `System.Net.Http.WebRequestHandler` that lives in `System.Net.Http.WebRequest.dll`. `WebRequestHandler` derives from `HttpClientHandler`. And `WebRequestHandler` already has these properties on the type: ``` c# public System.Security.Cryptography.X509Certificates.X509CertificateCollection ClientCertificates { get; set; } public RemoteCertificateValidationCallback ServerCertificateValidationCallback { get; set; } ``` ## Usage The new HttpClientHandler properties being considered are currently already in the System.Net.Http.WinHttpHandler contract, as properties of the WinHttpHandler class. That contract is only implemented on Windows. For reference, all the System.Net.\* APIs were previously reviewed including WinHttpHandler: https://github.com/dotnet/apireviews/pull/21 Pending the 4.1 System.Net.Http review, the WinHttpHandler contract is being considered for removal from CoreFx final RTM contracts since it will be duplicative to the revised System.Net.Http 4.1 contract. 7626 area-System.Net Initial System.Net.Http 4.1 contract To support important customer scenarios for CoreFx RTM, we will be updating the System.Net.Http contract from 4.0 to 4.1. We are focusing on HttpClientHandler enhancements. We will be submitting the final proposed list of additions as part of issue #7623. As part of updating the contract to 4.1, we are also OOB'ing the Desktop (net46 Windows) implementation so that the package won't be a facade over Desktop but rather a full implementation. This is possible since System.Net.Http has always been a standalone dll in the .NET Framework. As part of this, we are changing the implementation for Desktop from the legacy HttpWebRequest sockets stack to the WinHttpHandler stack based on native WinHTTP. This will give us a good path forward as WinHttpHandler stack will be getting HTTP/2.0 support with newer versions of Windows 10. This initial PR has a few API additions that we are definitely going to be adding. It's important to get these changes into the builds so that we can fully bake the OOB Http.dll assembly on all the platforms and continue package testing. There is an existing System.Net.Http.WebRequestHandler class in the .NET Framework located in System.Net.Http.WebRequest.dll. This class is a subclass of HttpClientHandler. Due to this, we are being careful not to cause collisions with some of these added properties. WebRequestHandler has a 'ClientCertificates' property and a 'ServerCertificateValidationCallback' property. So, we are aligning/renaming the properties as we add them to HttpClientHandler OOB assembly. This may get altered slightly as we finalize the 4.1 System.Net.Http API. 7630 area-System.Diagnostics EventListener.DisposeOnShutdown crash due to collection modified during enumeration "http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/windows_nt_debug/1206/consoleFull ``` 10:51:06 System.InvalidOperationException: Collection was modified; enumeration operation may not execute. 10:51:06 at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) 10:51:06 at System.Collections.Generic.List`1.Enumerator.MoveNextRare() 10:51:06 at System.Diagnostics.Tracing.EventListener.DisposeOnShutdown(Object sender, EventArgs e) 10:51:06 d:\j\workspace\windows_nt_debuge57bf35e\Tools\tests.targets(147,5): warning MSB3073: The command ""xunit.console.exe System.Globalization.Calendars.Tests.dll -xml testResults.xml -notrait Benchmark=true -notrait category=OuterLoop -notrait category=failing -notrait category=nonwindowstests "" exited with code 1. ``` " 7633 area-System.Net Use exception filters in StreamFramer Contributes to #7632. cc @stephentoub @bartonjs 7634 area-System.Linq Would it be possible to remove some of the LowLevel* classes? As I understand it, the purpose of the `LowLevel*` classes in `Common` (such as [`LowLevelEnumerable`](https://github.com/dotnet/corefx/blob/master/src/Common/src/System/Linq/LowLevelEnumerable.cs)) is to avoid a dependency on `System.Linq` or `System.Collections`, while still being able to use features from the collection classes. Unfortunately, they have to be maintained in tandem with their counterparts and as a result are more poorly optimized (e.g. [this](https://github.com/dotnet/corefx/blob/master/src/Common/src/System/Linq/LowLevelEnumerable.cs#L33) naïve implementation of `Select`, vs. [this](https://github.com/dotnet/corefx/blob/master/src/System.Linq/src/System/Linq/Select.cs#L12) one). Would it be possible to move the actual sources for the collection classes into `Common`, and a partial class that simply pointed people looking for the code to the `Common` folder? For example, we do this with `Debug` today; the actual source is [here](https://github.com/dotnet/corefx/blob/master/src/Common/src/System/Diagnostics/Debug.cs) in `Common`, while the file in `System.Diagnostics` is just there to [define public visibility](https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.Debug/src/System/Diagnostics/Debug.Public.cs). cc @stephentoub @JonHanna 7635 area-System.IO NamedPipeClientStream poorly handles the case where the pipe does not exist NamedPipeClientStream waits when the pipe does not exist, and it waits by spinning: ``` // Some platforms may return immediately from TryConnect if the connection could not be made, // e.g. WaitNamedPipe on Win32 will return immediately if the pipe hasn't yet been created, // and open on Unix will fail if the file isn't yet available. Rather than just immediately // looping around again, do slightly smarter busy waiting. sw.SpinOnce(); ``` This is problematic for two reasons. 1. I typically do not want to wait if the pipe does not exist; I only want to wait if the pipe is busy. This is because if the pipe doesn't exist, the server is probably not running, so waiting is unlikely to resolve anything. 2. Spinning on file not found consumes an entire CPU waiting for a service to start. Not a good choice. This combination of problems basically makes timeouts larger than a few milliseconds useless if there is any risk that the pipe will not exist. To fix this, I would propose two things: 1. Stop spinning. Sleep for a short time if you must poll. 2. Provide an option to fail if the pipe does not yet exist. Frankly I think this should be the default, but there are probably compatibility implications of this. 7636 area-System.Net Convert BidirectionalDictionary to be a struct Similarly to #7559, since `BidirectionalDictionary` is a type with all-readonly fields (and is always <= 16 bytes, even on 64-bit platforms), it's optimal for being converted to a struct. This PR includes the following changes: - Change definition from `sealed class` to `struct` - Removed `IEnumerable` interface implementation, as `foreach` is duck-typed and we don't want to encourage boxing - If future consumers of the class need to use it with LINQ, they can define their own reference-type wrapper around the struct - Converted call sites of the type to use C# 6 dictionary initializers rather than collection initializers - Dictionary initializers are duck-typed, so we don't need to implement `IEnumerable` - Added indexer property to satisfy the dictionary initializer cc @stephentoub @bartonjs @davidsh @CIPop 7637 area-System.Data System.Data.SqlClient still uses the non-generic collections A quick [GitHub search](https://github.com/dotnet/corefx/search?l=json&q=NonGeneric&utf8=%E2%9C%93) shows that `System.Collections.Specialized` and `System.Data.SqlClient` are the only non-test assemblies still dependent on the non-generic collections. While it's kind of inevitable for the specialized collections since it contains a lot of legacy code, it appears from [this](https://github.com/dotnet/corefx/pull/6527) PR that we can remove `System.Collections.NonGeneric` from the `SqlClient` implementation, since it's not exposed to callers. This is a tracking issue I'm opening up to remove the dependency from `SqlClient`. 7640 area-Infrastructure Command files (*.cmd) can't use directories with spaces "When creating or evaluating an environment variable, quotes are not required: ``` batchfile set INIT_TOOLS_LOG=%~dp0init-tools.log if [%PACKAGES_DIR%]==[] set PACKAGES_DIR=%~dp0packages\ ``` However, when turning that environment variable into a file to be used, quotes are required. Instead of: ``` batchfile set /P BUILDTOOLS_VERSION=< %~dp0BuildToolsVersion.txt echo %PROJECT_JSON_CONTENTS% > %PROJECT_JSON_FILE% echo Running %0 > %INIT_TOOLS_LOG% ``` The correct syntax is: ``` batchfile set /P BUILDTOOLS_VERSION=< ""%~dp0BuildToolsVersion.txt"" echo %PROJECT_JSON_CONTENTS% > ""%PROJECT_JSON_FILE%"" echo Running %0 > ""%INIT_TOOLS_LOG%"" ``` Because of the lack of quotes, any attempt to use these command files in a directory with spaces will fail. -Neil " 7647 area-System.Net NegotiateStream NTLM implementation on Unix Cherry Picked the reviewed commit from dev/NegotiateStream and resending against master. cc: @stephentoub 7652 area-Infrastructure Encapsulate dev workflow common logic Add a script that encapsulates the common logic used in the dev workflow (i.e. OSGroup selection, common logging, init-tools, etc) and have all other dev workflow scripts (sync, clean, build-test, etc) simply call it with extra arguments unique to each dev workflow script. As mentioned by @weshaggard in PR #7566 7654 area-System.ComponentModel Expand System.ComponentModel.TypeConverter test coverage This brings `System.ComponentModel.TypeConverter` line coverage to 47% via some straightforward unit tests of `EventDescriptor`, `PropertyDescriptor`, and `TypeDescriptor` APIs. @twsouthwick 7656 area-System.Runtime Add Split string extension that returns IEnumberable instead of an array. "It's common when parsing strings to need a specific element from a parsed string. Currently, String.Split returns a fully parsed array of all the values, whether the developer needs them all or not. It would very useful to return a IEnumerable that can be used in a Linq expression. Then this can be done: string csv = ""Bill, Gates, One Microsoft Way, Redmond, WA, 98052""; var lastName = csv.EnumerateString(',').Take(2).Last(); The function would not need to fully parse the string if it is done after the second item, in this example. I wrote something like this many years ago and have found it to be very helpful, easier to read, and in many cases, faster than using Split. " 7657 area-System.Security Perform manual verification for Crypto on UWP Automated tests are all well and good, but at some point one really does need to try using a thing to make sure that the tests aren't being unreasonable. - [x] Hash some data using MD5, SHA-1, SHA-2 (SHA256, SHA384, SHA512) - [x] HMAC some data - [x] Encrypt/Decrypt something using AES - [x] Sign/Verify with ECDSA - [x] Encrypt/Decrypt something using RSA-PKCS#1 - [x] Encrypt/Decrypt something using RSA-OAEP (SHA-1, SHA-2) - [x] Sign/Verify with RSA-PKCS#1 - [x] Sign/Verify with RSA-PSS - [x] Encrypt/Decrypt something using 3DES - [x] Get an RSA Public Key from a cert - [x] Get an RSA Private Key from a PFX - [x] Get an ECDSA Public Key from a cert - [x] Get an ECDSA Private Key from a PFX - [x] Play with X509Store All of these are expected to work. Any unusual responses should be turned into issues. 7658 area-System.Diagnostics On Mac/Linux, Process.ExitCode always returns 0 when Process.Exited is used "When `Process.WaitForExit()` is called on a `Process` that was configured to do something with its `Exited` event, it always returns `0`, regardless of the actual exit code of the process. If `WaitForExit()` immediately follows `Start()`, things work as I expect. Sample program: ``` C# using System; using System.Diagnostics; using System.Threading; class ExitedEventExitCodeDemo { public static void Main() { ManualResetEvent toolExited = new ManualResetEvent(false); var proc = new Process(); proc.StartInfo = new ProcessStartInfo(""/bin/sh""); proc.StartInfo.Arguments = ""-c \""exit 1\""""; // turn on the Process.Exited event proc.EnableRaisingEvents = true; // sign up for the exit notification proc.Exited += (object sender, EventArgs e) => toolExited.Set(); proc.Start(); // Waiting for this event after Start gives a 0 ExitCode. toolExited.WaitOne(); // Just sleeping for a while also gives 0. //Thread.Sleep(1000); // But if this is the next line after Start(), ExitCode is 1 as expected. proc.WaitForExit(); Console.WriteLine(""Exit code (should be 1): "" + proc.ExitCode); } } ``` Here's evidence that the child process really fails, but `ExitCode` is `0`: ``` ShellSession $ strace -f -e trace=process ./corerun exec.exe execve(""./corerun"", [""./corerun"", ""exec.exe""], [/* 20 vars */]) = 0 arch_prctl(ARCH_SET_FS, 0x7fac47a52780) = 0 clone(child_stack=0x7fac453def70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fac453df9d0, tls=0x7fac453df700, child_tidptr=0x7fac453df9d0) = 10383 Process 10383 attached [pid 10382] clone(child_stack=0x7fac44bddf70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fac44bde9d0, tls=0x7fac44bde700, child_tidptr=0x7fac44bde9d0) = 10384 Process 10384 attached [pid 10382] clone(child_stack=0x7fac443dcf70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fac443dd9d0, tls=0x7fac443dd700, child_tidptr=0x7fac443dd9d0) = 10385 Process 10385 attached [pid 10382] clone(child_stack=0x7fac43bdbf70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fac43bdc9d0, tls=0x7fac43bdc700, child_tidptr=0x7fac43bdc9d0) = 10386 Process 10386 attached [pid 10382] clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fac47a52a50) = 10387 Process 10387 attached [pid 10387] execve(""/bin/sh"", [""/bin/sh"", ""-c"", ""exit 1""], [/* 20 vars */]) = 0 [pid 10387] arch_prctl(ARCH_SET_FS, 0x7f80adbdb740) = 0 [pid 10387] exit_group(1) = ? [pid 10387] +++ exited with 1 +++ [pid 10382] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=10387, si_status=1, si_utime=0, si_stime=0} --- [pid 10382] clone(child_stack=0x7fac40eb5f70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fac40eb69d0, tls=0x7fac40eb6700, child_tidptr=0x7fac40eb69d0) = 10388 Process 10388 attached [pid 10382] clone(child_stack=0x7fac406b4f70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fac406b59d0, tls=0x7fac406b5700, child_tidptr=0x7fac406b59d0) = 10389 Process 10389 attached [pid 10382] clone(child_stack=0x7fac3fe73f70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fac3fe749d0, tls=0x7fac3fe74700, child_tidptr=0x7fac3fe749d0) = 10390 [pid 10388] wait4(10387, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], WNOHANG, NULL) = 10387 Process 10390 attached [pid 10388] wait4(10387, 0x7fac40eb55e4, WNOHANG, NULL) = -1 ECHILD (No child processes) Exit code (should be 1): 0 [pid 10385] _exit(0) = ? [pid 10385] +++ exited with 0 +++ [pid 10382] exit_group(0) = ? [pid 10390] +++ exited with 0 +++ [pid 10389] +++ exited with 0 +++ [pid 10388] +++ exited with 0 +++ [pid 10386] +++ exited with 0 +++ [pid 10384] +++ exited with 0 +++ [pid 10383] +++ exited with 0 +++ +++ exited with 0 +++ ``` Note that pid 10387 exited with 1 according to strace, but `proc.ExitCode` was 0. This is the root cause of Microsoft/MSBuild#566. " 7660 area-System.ComponentModel ComponentModel attributes that assist in altering data for integrity "It's been asked, [how data annotations can change data](http://stackoverflow.com/questions/51269), and [replace](http://stackoverflow.com/questions/15541199) or [trim](http://stackoverflow.com/questions/2864343/) property values. I don't feel annotations should be used in this way, but there could be benefit in attributes that would preform common and simple tasks that do alter data. These attributes might appropriately be called mutation attributes, which could include: Trim, Replace, RegexReplace, EnsureCase, etc. ### Simple Example It's common that models will trim whitespace form string properties and change empty strings to null. ``` csharp public class User { private string _firstName; public string FirstName { get { return _firstName; } set { value = value.Trim(); _firstName = String.IsNullOrEmpty(value) ? null : value; } } } ``` This could be the business requirement for all string properties of the user class. With mutation attributes this could be shortened drastically. ``` csharp public class User { [Trim, ToDefaultValue("""")] public string FirstName { get; set; } } ``` ### Advanced Example Let's assume we have sign up screen that accepts a username and password, and a model that annotates `User.UserName` as accepting any alphanumeric string including underscores as valid characters. Should the end-user enter `m@x_speed.01` as their desired username, validation would cause exceptions. Then the program should give an appropriate error message: ""Username must contain only alphanumeric character and underscores"". However if the designer would provide mutation attributes, the program could try to determine a valid value from the input. We could then provide a better message to the user: ""That username is invalid. Would you like to use 'mx_speed01' instead?"" ### Proposed API ``` csharp namespace System.ComponentModel.DataMutations { // Describes the context in which mutation is performed. // It supports IServiceProvider so that custom mutation code can acquire additional services to help it perform its mutation. public interface IMutationContext : IServiceProvider { object ObjectInstance { get; } IDictionary Items { get; } IEnumerable Attributes { get; } } // Describes the context in which mutation is performed. // T: The type to consult during mutation. public sealed class MutationContext : IMutationContext { // Constructors public MutationContext(T instance, IDictionary items) : this(instance, items, null); public MutationContext(T instance, IServiceProvider serviceProvider) : this(instance, null, serviceProvider); public MutationContext(T instance, IDictionary items, IServiceProvider serviceProvider) : this(instance); public MutationContext(T instance); // Properties public T ObjectInstance { get; } object IMutationContext.ObjectInstance { get; } public IDictionary Items { get; } public IEnumerable Attributes { get; } // Methods public void InitializeServiceProvider(Func serviceProvider); public object GetService(Type serviceType); } // Helper class to validate objects, properties, and other values using their associated MutationAttributes and custom mutation as implemented through the IMutableObject interface. public static class Mutator { // Mutate Value public static T Mutate(this MutationContext context, IEnumerable attributes) => typeof(T).GetTypeInfo().IsValueType ? // Mutate as value : // Mutate as object; public static T Mutate(this MutationContext context, IEnumerable attributes, T value) where T : struct; // Mutate Object public static T Mutate(this MutationContext context) where T : class; public static T Mutate(this MutationContext context, T instance) where T : class; public static T Mutate(this MutationContext context, T instance, IEnumerable attributes) where T : class; // Mutate Property public static object MutateProperty(this MutationContext context, PropertyInfo property) where T : class; public static P MutateProperty(this MutationContext context, PropertyInfo property, P value) where T : class; public static P MutateProperty(this MutationContext context, Expression> property) where T : class; public static P MutateProperty(this MutationContext context, Expression> property, P value) where T : class; } // Describes custom mutation logic that should be preformed on an object during mutation. public interface IMutableObject { void Mutate(IMutationContext context); } // Base class for all mutation attributes. public abstract class MutationAttribute : Attribute { // Properties public virtual bool RequiresContext { get; } public virtual int Priority { get; set; } // Methods public object Mutate(object value, IMutationContext context = null); protected abstract object MutateValue(object value, IMutationContext context); } // Trim Provides as sample implementation of MutationAttribute [AttributeUsage(AttributeTargets.Property, AllowMultiple = true)] public class TrimAttribute : MutationAttribute { // Constructors public TrimAttribute(params char[] characters); // Properties public char[] Characters { get; private set; } public TrimOptions Direction { get; set; } // Methods protected override object MutateValue(object value, IMutationContext context); } } ``` #### Implemented as Proposed Time has been spent on an implementation as it was needed for a project. Further documentation is provided on the repo. I will continue to update the repo according to this issue. **Source:** [roydukkey/Dado.ComponentModel.Mutations](https://github.com/roydukkey/Dado.ComponentModel.Mutations) **MyGet:** http://www.myget.org/gallery/roydukkey #### Updates 1. Add Attributes property to IMutationContext 2. Add Priority property to MutationAttribute - Without a priority `[DefaultValue(""~/data/""), Trim, ToDefaultValue("""")] string path { get; set; } = "" "";` will have a different result than `[DefaultValue(""~/data/""), ToDefaultValue(""""), Trim] string path { get; set; } = "" "";`. - This will get even messier when inheritance is introduced. " 7661 area-System.Security Add tests for System.Security.AccessControl ACE classes There doesn't seem to be any tests for System.Security.AccessControl in open. I decided to port these tests in chunks instead of all at once to ease reviewing and get feedback on structure before it was difficult to modify. The tests in ToF are very incompatible with Xunit so after wasting a bunch of time trying to get them running in Open, I opted to rewrite them instead. The structure of the tests is different than it was, but the MemberData we're testing with is the same. Progress towards #6922. @stephentoub 7664 area-System.Net Implement send/receive timeouts on CurlHandler This adds SendTimeout, ReceiveHeadersTimeout, and ReceiveDataTimeout to CurlHandler. It's implemented by mapping the timeouts to libcurl's notion of a low speed limit, which lets libcurl automatically cancel a request if an average rate of sending/receiving bytes isn't maintained over a specified period of time. cc: @davidsh, @ericeil, @kapilash, @bartonjs @davidsh, as with the previous additions, this can be tweaked based on what surface area we decide to expose. For now I've matched the APIs exposed from WinHttpHandler, albeit using Timeout.Infinite as the default to make it pay-for-play and to avoid changing from current HttpClientHandler behaviors. 7666 area-System.Security CspParameters.ParentWindowHandle is not respected 7669 area-System.Net Fix HttpContent.CopyToAsync to return rather than throw exception I broke this as part of my async/await refactorings. It was supposed to return a Task.FromException but instead was throwing. And the tests didn't catch it, as they were too loose in what they were checking, so also tightening the tests. cc: @davidsh 7671 area-System.Net Improve performance of WebUtility.Decode for non-escaped strings "- Cuts allocations down to 1/3 of the original - Doubles performance (in time) - We still allocate a little bit, as removing all allocations would harm the performance of strings that actually need escaping ## Benchmark - escaping needed - No performance regressions ![benchmark escaping](https://cloud.githubusercontent.com/assets/1275900/14454716/c85fc7bc-0093-11e6-8c65-3eba5ce34729.png) ## Benchmark - no escaping needed ![benchmark no escaping](https://cloud.githubusercontent.com/assets/1275900/14454713/c5124e54-0093-11e6-983b-ad3ae9e654ff.png) ## Benchmark Code
Click here ``` static void Main(string[] args) { // Escaping TimeAction(""Old: "", () => Old.UrlDecode(""%ABabc"")); TimeAction(""New: "", () => New.UrlDecode(""%ABabc"")); // No escaping TimeAction(""Old: "", () => Old.UrlDecode(""abc"")); TimeAction(""New: "", () => New.UrlDecode(""abc"")); Console.ReadLine(); } public static void TimeAction(string prefix, Action action) { var sw = new Stopwatch(); for (int iter = 0; iter < 5; iter++) { int gen0 = GC.CollectionCount(0); sw.Restart(); for (int i = 0; i < 10000000; i++) { action(); } sw.Stop(); Console.WriteLine($""{prefix}Time: {sw.Elapsed.TotalSeconds}\tGC0: {GC.CollectionCount(0) - gen0}""); } } ```
/cc @stephentoub @jamesqo @davidsh Fixes #6542 together with #7546 " 7681 area-System.Net Fix ConnectTimeout_TimesOut_Throws test This test wasn't actually running because it was incorrectly annotated as a [Theory] but without any data. When changed to be a [Fact], it failed because the test depends on the Socket's listening backlog being filled so that a subsequent connect will time out, but Listen(1) doesn't actually force the OS to use a queue of max size of 1, it's just advisory. The fix is to flood the server with requests that don't get accepted, filling the listen queue. cc: @davidsh, @bartonjs 7683 area-System.Runtime Document how unmanaged libraries are loaded with AssemblyLoadContext "On Windows, System.Data.SqlClient currently p/invokes to a native component sni.dll via DllImport `[DllImport(""sni.dll"")]`. This is inconsistent with other Dllimport calls in corefx that do not include the "".dll"" extension in the native dll name. This causes inconsistent behavior in other parts of the stack. e.g. `AssemblyLoadContext.LoadUnmanagedDll(string unmanagedDllName)` is called with `unmanagedDllName == ""sni.dll""`, but for other libraries the extension is left off. This means AssemblyLoadContext is usually implemented to look for `""sni""`, not `""sni.dll""`. cref https://github.com/dotnet/cli/issues/2289#issuecomment-208655706 **Update** Decided the behavior is fine, but we should document it as it's non-obvious. " 7685 area-System.IO Path.Combine on Unix thinks the filename /foo is rooted "Uncovered via #7680, calling `Path.Combine` with the following parameters yields unexpected results: ``` string fullDirectory = ""/foo/bar.txt""; string dirName = ""/foo/""; string fileName = ""/bar.txt""; string result = Path.Combine(dirName, fileName); Assert.Equal(fullDirectory, result); ``` This fails because `fileName` is thought to be rooted since it begins with a '/' character. " 7688 area-System.Security Add support for import\export and named Crypto Elliptic Curves (API review) "Currently, both .NET 4.6 and .NET Core support only three Elliptic Curves (nistP256, nistP384 and nistP521). There have been requests to add additional curves and to add the ability to import and export parameters similar to how RSA and DSA already have. The proposed API additions are intended for both .NET 4.6.3 and for .NET Core rtm. For .NET Core, both Windows (via [Cryptograph Next Generation or CNG](https://msdn.microsoft.com/en-us/library/windows/desktop/mt632245%28v=vs.85%29.aspx)) and Linux\OSX (via [OpenSsl](https://wiki.openssl.org/index.php/Elliptic_Curve_Cryptography)) are to be supported. ## Rationale and Usage The current implementation has three curves selected by providing their key size (as an integer). However, this is no longer tenable as there are many curves (of different algorithms) that have the same keysize. Instead, a curve should be represented by a well-known Oid. Using named curves enables direct access to the curves supported by the underlying platform and thus does not require additional .NET framework code or public APIs to be added or changed in order to accommodate new curves (in most cases), although adding helper methods to pre-define the Oids may be desired. Using named curves in this way is consistent with both CNG and OpenSsl. In some cases, however, a curve name may not be known by the underlying platform, or a custom curve is desired. In that case, 'explicit' curves are desired which means all domain parameters are explicitly specified instead of being implied by the curve name. An explicit curve is abstract, contains common domain parameters, and is derived from by Prime and Characteristic-2 where each adds an additional domain parameter. The logical hierarchy:            Curve (abstract)             /      \ Named       Explicit (abstract)                    /        \               Prime   Characteristic-2 Note that this logical hierarchy is collapsed into a single struct called ECCurve. This was based on previous API review where class minimization was desired. ## Pull Request Current code is located [here](https://github.com/steveharter/dotnet_corefx/tree/Crypto) with pull request for code review [here](https://github.com/dotnet/corefx/pull/6789). ## High Level Programming Model (platform independent) The most common scenario is to instantiate an instance of [ECDsa](https://msdn.microsoft.com/en-us/library/system.security.cryptography.ecdsa%28v=vs.110%29.aspx) by passing in the name of the curve, and then sign some data or perform other action such as import, export and generate key. ECDsa is abstract, and the concrete dervived class depends upon the platform. For Windows, that is ECDsaCng and for Linux\OSX that class is ECDsaOpenSsl. Work is in progress to allow static Create factory methods to be directly on ECDsa in order to better support platform independent code by removing the need to instantiate the ECDsaCng or ECDsaOpenSsl directly. With that additional work, the programming model is: ``` c# using (ECDsa ec = ECDsa.Create(ECCurve.NamedCurves.nistP256)) { // sign some data, etc. ``` NamedCurves is a nested class under ECCurve, and nistP256 is a static factory method. Other Create() overloads include using the ECParameters class which contains the public and private key as well as a curve: ``` c# ECParameters parameters = ... using (ECDsa ec = ECDsa.Create(parameters)) { // sign some data, etc. ``` and the empty constructor: ``` c# using (ECDsa ec = ECDsa.Create()) { ec.GenerateKey(ECCurve.NamedCurves.brainpoolP256r1); // sign some data, etc. ``` The empty constructor will lazily-create a 521-bit nist curve when the key is first accessed (for backwards compatibility as that it what the constructor on derived classes do). This Create() is useful when the curve is not known at the time of creation and instead can be passed in later during GenerateKey() as shown in the example above. ## High Level Programming Model (platform dependent) The previous programming model examples include the static Create() methods on the abstract ECDsa base class. The examples below show usage of ECDsaCng directly which means the code is tied to a particular platform. ECDsaOpenSsl is not shown however it has the same examples as below, although the Cng and OpenSsl classes do differ in other public members not shown below. The current (but now considered obsolete) programming model using key size as integer: ``` c# // Use nistP256 (one of three supported curves) using (var ec = new ECDsaCng(256)) { // sign some data, etc. ``` The proposed programming model (using NamedCurves factory helper methods): ``` c# using (var ec = new ECDsaCng(ECCurve.NamedCurves.nistP256)) { // sign some data, etc. ``` The curve name can also be provided directly through using an Oid FriendlyName: ``` c# using (var ec = new ECDsaCng(ECCurve.CreateFromFriendlyName(""nistP256""))) { // sign some data, etc. ``` or by using an Oid Value: ``` c# using (var ec = new ECDsaCng(ECCurve.CreateFromValue(""1.2.840.10045.3.1.7""))) { // sign some data, etc. ``` or by using an instance of the Oid class directly: ``` c# using (var ec = new ECDsaCng(ECCurve.CreateFromOid(new Oid(""1.2.840.10045.3.1.7"", ""nistP256"")))) { // sign some data, etc. ``` ## ECCurve Namespace: System.Security.Cryptography.Algorithms Assembly: System.Security.Cryptography.Algorithms.dll This type serves several purposes: 1) Creation. Expose strongly-typed static helper methods to create an instance. 2) Domain Parameters. Contains the domain parameters for a named or explicit curve. For a named curve it uses an [Oid](https://msdn.microsoft.com/en-us/library/system.security.cryptography.oid%28v=vs.110%29.aspx)). For explicit curves it contains several domain parameters. 3) ECCurveType. It nests this class in order to hide it from the root of the namespace. ## ECCurve - Creation ``` c# /// /// An elliptic curve. /// /// /// The CurveType property determines whether the curve is a named curve or an explicit curve /// which is either a prime curve or a characteristic-2 curve. /// public struct ECCurve { /// Create a curve from the given cref=""Oid"". /// /// The Oid to use. /// An ECCurve representing a named curve. public static ECCurve CreateFromOid(Oid curveOid); /// /// Create a curve from the given cref=""Oid"" friendly name. /// /// The Oid friendly name to use. /// An ECCurve representing a named curve. public static ECCurve CreateFromFriendlyName(string oidFriendlyName); /// /// Create a curve from the given cref=""Oid"" value. /// /// The Oid value to use. /// An ECCurve representing a named curve. public static ECCurve CreateFromValue(string oidValue); /// /// Factory class for creating named curves. /// public static class NamedCurves { public static ECCurve brainpoolP160r1 {get;} public static ECCurve brainpoolP160t1 {get;} public static ECCurve brainpoolP192r1 {get;} public static ECCurve brainpoolP192t1 {get;} public static ECCurve brainpoolP224r1 {get;} public static ECCurve brainpoolP224t1 {get;} public static ECCurve brainpoolP256r1 {get;} public static ECCurve brainpoolP256t1 {get;} public static ECCurve brainpoolP320r1 {get;} public static ECCurve brainpoolP320t1 {get;} public static ECCurve brainpoolP384r1 {get;} public static ECCurve brainpoolP384t1 {get;} public static ECCurve brainpoolP512r1 {get;} public static ECCurve brainpoolP512t1 {get;} public static ECCurve nistP256 {get;} public static ECCurve nistP384 {get;} public static ECCurve nistP521 {get;} } ``` For named curves, only the friendly name or the value is required, not both, provided that the platform recognizes it, or if the other value can be determined. For CNG, the FriendlyName is eventually required. For OpenSsl, either will work however the FriendlyName values are not necessarily compatible or the same between Cng and FriendlyName for some curves. Using the Oid Value is preferred as it is stable across platforms although there are a handful of curves that only have the FriendlyName. Discussion topic: the set of static factory methods on NamedCurves are a subset of those from [Windows 10](https://msdn.microsoft.com/en-us/library/windows/desktop/mt632245%28v=vs.85%29.aspx). OpenSsl supports the nist curves, but not the brainpool, plus supports several additional (varies depending on OpenSsl version). RESOLUTION: this list was chosen because the nist and brainpool curves are likely to be the normally recommended curves. ## ECCurve - Domain parameters Elliptical curves contain [domain parameters](http://www.secg.org/sec1-v2.pdf) which are factored to support named curves and two types of explicit curves (Prime and Characteristic-2), to interop with CNG and OpenSsl. These types are used in cases where the parameters need to be provided to import\export and to generatekey. Currently CNG does not support Characteristic-2 curves. The ECCharacteristic2 class is present in the shared Algorithms assembly however -- i.e. it wasn't place in the OpenSsl-only assembly. Note: most of the parameter types are opaque and represented by byte[], even though they could be better represented by BigInteger or a standard integer in some cases. The rationale is because RSA also does this and because we do not expose all of the functionality that CNG or OpenSsl does regarding these types. In addition byte[] preserves the big-endian byte ordering of CNG and OpenSsl, unlike BigInteger. Discussion Topic Fields with public getter and setters are used as that is consistent with other types like RSAParameters. The alternative is to use properties with private setters and to provide additional Create() methods to specify all domain parameters for explicit curves. ``` c# public struct ECCurve { /// /// Coefficient A. Applies only to Explicit curves. /// public byte[] A; /// /// Coefficient B. Applies only to Explicit curves. /// public byte[] B; /// /// Base Point. Applies only to Explicit curves. /// public ECPoint G; /// /// Order of the group generated by G = (x,y). Applies only to Explicit curves. /// public byte[] Order; /// /// Cofactor (optional). Applies only to Explicit curves. /// public byte[] Cofactor; /// /// Seed of the curve (optional). Applies only to Explicit curves. /// public byte[] Seed; /// /// Curve Type. /// public ECCurveType CurveType; /// /// The hash algorithm used to generate A and B from the Seed. Applies only to Explicit curves. /// public HashAlgorithmName? Hash; /// /// The binary polynomial. Applies only to Characteristic2 curves. /// public byte[] Polynomial; /// /// The prime specifying the base field. Applies only to Prime curves. /// public byte[] Prime; /// /// The Oid representing the named curve. Applies only to Named curves. /// /// A clone is returned, not the current instance. public Oid Oid {get; private set} /// /// Validate the current curve. /// /// /// if the curve parameters are not valid for the current CurveType. /// public void Validate(); public bool IsPrime {get;} public bool IsCharacteristic2 {get;} public bool IsExplicit {get;} public bool IsNamed {get;} ``` ECCurve.Oid is immutable, even though the underlying Oid object is not (the Value and FriendlyName properties are settable). This is achieved by making a clone of the Oid during creation of the curve and making a clone of the Oid when the property getter is called. This simplifies usage of the classes that use ECCurve as they don't have to concern themselves with making their own copies of the Oid because the immutability prevents the Value or FriendlyName properties from changing afterwards by someone holding a reference to the Oid. ## ECCurve - nested ECCurveType This enum is used to identify the curve type, and during execution pass to CNG or OpenSsl to identify which explicit algorithm to use. The Prime\* values match a CNG native enum. Characteristic2 is only supported by OpenSsl. ``` c# public struct ECCurve { /// /// Represents the type of an elliptic curve. /// public enum ECCurveType : int { Implicit = 0, PrimeShortWeierstrass = 1, PrimeTwistedEdwards = 2, PrimeMontgomery = 3, Characteristic2 = 4, Named = 5, } ``` ## ECPoint ECPoint is used in ECParameters and ECCurve to represent a point on a curve. ``` c# /// /// Represents a point on an elliptic curve. /// public struct ECPoint { public byte[] X; public byte[] Y; } ``` ## Compatibility Windows 10 added support for named curves, so on versions of Windows before 10, when attempting to use curves except for the 3 that were supported previously, a PlatformNotSupportedException is raised during execution. For versions of Windows <10, extra work has been peformed to ensure that the *named* curve APIs on ECCurve and import\export of named curves work with the 3 curves. Even though named curves were not added until Windows 10, this was accomplished by mapping the names of the 3 curves to individual integer-based curve identifiers used in the older versions of CNG that work Discussion topic Note that _explicit_ curve import\export does not work on these 3 curves in < Windows 10 because that requires Windows 10 features. However it is possible that we hard-code the explicit curve values for the 3 curve values and get that to work if we decided that was worth the effort; this would mean that we hard-code the ECPrimeCurve values for those 3 curves. It is probably not worth the effort because the main scenario for using explicit import\export is to import a custom curve that does not have a name, or does not have a name known by the current platform, so it does not apply to the 3 curves. Windows does not support any Characteristic-2 curves, unlike OpenSsl. None of the Characteristic-2 curves (or in general OpenSsl-only curves) were added as helper factory methods to ECCurve. OpenSsl curve support varies by version, so some curves may work one version of OpenSsl but not another. PlatformNotSupportedException is thrown in such cases. Discussion topic: no [obsolete] keywords have been added in cases where the three existing curves are currently exposed on CngAlgorithm, or when keysize is used in the ECDsaCng and ECDsaOpenSsl constructors. RESOLUTION: obsolete is no longer used Discussion topic: no API has been added to determine if a curve is valid for a platform. Users must use try\catch. It is possible to add such as API. Also, the Oid class cannot be relied upon for determining such status as internally we maintain a global hard-coded mapping between Oid values and friendly names, and because some curves have an friendly name but no value and the Oid class cannot help resolve or verify the friendly name in such cases. RESOLUTION: address later, if at all. Additional work has also been done to ensure that values exported from Windows and OpenSsl have the same validation requirements. When importing, CNG requires the byte[] values of some properties to match, however OpenSsl doesn't. So there has been additional padding and max() calculations added to the OpenSsl side to match the Windows side. This enables better interop in cross-plat user code, at the expense however of those who may use OpenSsl APIs directly and are not constrained by those additional validation checks otherwise. ## ECParameters. This type is used during import\export to specify the public key, optional private key, and curve parameters. ``` c# /// /// Represents the public and private key of the specified elliptical curve. /// public struct ECParameters { /// /// Public point. /// public ECPoint Q; /// /// Private Key. Not always present. /// public byte[] D; /// /// The Curve. /// public ECCurve Curve; } ``` ## Import \ Export \ GenerateKey Namespace: System.Security.Cryptography.Algorithms Assembly: System.Security.Cryptography.Algorithms.dll These methods are overridden in ECDsaCng and ECDsaOpenSsl classes and for .NET 4.6.3 also the ECDiffieHellman class. ``` c# public abstract class ECDsa : AsymmetricAlgorithm { public static ECDsa Create(); public static ECDsa Create(ECCurve curve); public static ECDsa Create(ECParameters parameters); /// /// When overridden in a derived class, exports the named or explicit ECParameters for an ECCurve. /// If the curve has a name, the Curve property will contain named curve parameters otherwise it will contain explicit parameters. /// /// true to include private parameters, otherwise, false. /// public virtual ECParameters ExportParameters(bool includePrivateParameters); /// /// When overridden in a derived class, exports the explicit ECParameters for an ECCurve. /// /// true to include private parameters, otherwise, false. /// public virtual ECParameters ExportExplicitParameters(bool includePrivateParameters); /// /// When overridden in a derived class, imports the specified ECParameters. /// /// The curve parameters. public virtual void ImportParameters(ECParameters parameters); /// /// Generates the public and private key. /// /// The curve to use. /// public virtual void GenerateKey(ECCurve curve); ``` Note: not shown here, but ECDH, RSA and DSA are to add matching Create factory support to better support platform independent code. ECDSA/ECDH: Create(), Create(ECCurve), Create(ECParameters) RSA: Create(), Create(int), Create(RSAParameters) DSA: Create(), Create(int), Create(DSAParameters) ## CNG Specific APIs Namespace: System.Security.Cryptography Assembly: System.Security.Cryptography.Cng.dll A constructor was added to accept the named curve, and overrides for import, export and generatekey. ``` c# public sealed partial class ECDsaCng : ECDsa { /// /// Create an ECDsaCng algorithm with a named curve. /// /// The representing the curve. /// if is null. /// if does not contain an Oid with a FriendlyName. public ECDsaCng(ECCurve curve); /// /// ImportParameters will replace the existing key that ECDsaOpenSsl is working with by creating a /// new CngKey. If the parameters contains only Q, then only a public key will be imported. /// If the parameters also contains D, then a full key pair will be imported. /// The parameters Curve value specifies the type of the curve to import. /// /// /// if does not contain valid values. /// /// /// if references a curve that cannot be imported. /// /// /// if references a curve that is not supported by this platform. /// public override void ImportParameters(ECParameters parameters); /// /// Exports the key and explicit curve parameters used by the ECC object into an object. /// /// /// if there was an issue obtaining the curve values. /// /// /// if explicit export is not supported by this platform. Windows 10 or higher is required. /// /// The key and explicit curve parameters used by the ECC object. public override ECParameters ExportExplicitCurveParameters(bool includePrivateParameters); /// /// Exports the key used by the ECC object into an object. /// If the curve has a name, the Curve property will contain named curve parameters otherwise it will contain explicit parameters. /// /// /// if there was an issue obtaining the curve values. /// /// The key and named curve parameters used by the ECC object. public override ECParameters ExportCurveParameters(bool includePrivateParameters); public override void GenerateKey(ECCurve curve); ``` Misc changes to extend the list of known blob formats (used by import) ``` c# public sealed class CngKeyBlobFormat : IEquatable ... public static CngKeyBlobFormat EccPrivateBlob; public static CngKeyBlobFormat EccPublicBlob; ... ``` Misc changes to extend the list of algorithms. Also includes the previously existing 3 nist curves for backwards compatibility-- i.e. they weren't removed, even though named curves should be used instead going forward. ``` c# public sealed class CngAlgorithm : IEquatable ... public static CngAlgorithm ECDiffieHellman {get;} public static CngAlgorithm ECDsa {get;} ... ``` ## OpenSsl Specific APIs Namespace: System.Security.Cryptography Assembly: System.Security.Cryptography.OpenSsl.dll A constructor was added to accept the named curve and overrides for import, export and generatekey. ``` c# public sealed partial class ECDsaOpenSsl : ECDsa { /// /// Create an ECDsaCng algorithm with a named curve. /// /// The representing the curve. public ECDsaOpenSsl(ECCurve curve); /// /// ImportParameters will replace the existing key that ECDsaOpenSsl is working with by creating a /// new CngKey. If the parameters contains only Q, then only a public key will be imported. /// If the parameters also contains D, then a full key pair will be imported. /// The parameters Curve value specifies the type of the curve to import. /// /// /// if does not contain valid values. /// /// /// if references a curve that cannot be imported. /// /// /// if references a curve that is not supported by this platform. /// public override void ImportParameters(ECParameters parameters); /// /// Exports the key and explicit curve parameters used by the ECC object into an object. /// /// /// if there was an issue obtaining the curve values. /// /// /// if explicit export is not supported by this platform. Windows 10 or higher is required. /// /// The key and explicit curve parameters used by the ECC object. public override ECParameters ExportExplicitCurveParameters(bool includePrivateParameters); /// /// Exports the key used by the ECC object into an object. /// If the curve has a name, the Curve property will contain named curve parameters otherwise it will contain explicit parameters. /// /// /// if there was an issue obtaining the curve values. /// /// The key and named curve parameters used by the ECC object. public override ECParameters ExportCurveParameters(bool includePrivateParameters); public override void GenerateKey(ECCurve curve); ``` ## .NET 4.6.3 Specific APIs The [ECDiffieHellman](https://msdn.microsoft.com/en-us/library/system.security.cryptography.ecdiffiehellman%28v=vs.110%29.aspx) class will have the same members added as ECDsaCng and ECDsaOpenSsl including import, export, and generate key. " 7696 area-System.Net [Part 1] Use nameof in Socket This PR refactors the following places to use `nameof`: - `TraceLoggingTypeInfo` - `UnixFileSystem` - `NegoState` - `SslState` - `Socket` (split up into 2 commits, as the file is massive) cc @stephentoub 7697 area-System.Reflection Test dlls and pdbs containing large tables We don't have much test coverage of PE files (and Portable PDBs) with large numbers of rows. The correctness of size calculation of cross table reference (2B vs 4B) is thus not validated. The problem with testing is that it requires somewhat large files. Having them checked into the repo is not ideal. Instead they should be generated in-memory using the metadata writer once it's ready. See bug https://github.com/dotnet/roslyn/issues/10401 for an example of an issue encountered recently. 7698 area-System.Reflection Fix CustomDebugInfo table row size calculation Fixes issue discovered when testing scenario https://github.com/dotnet/roslyn/issues/10401. Filed https://github.com/dotnet/corefx/issues/7697 to follow up with appropriate unit tests (require metadata writer). 7699 area-Serialization System.Xml.XmlSerializer uses non-generic shim collections It appears from [here](https://github.com/dotnet/corefx/tree/master/src/System.Xml.XmlSerializer/src/System/Collections) that, although it doesn't depend on `System.Collections.NonGeneric`, the `XmlSerializer` assembly has a few shim non-generic collection classes since it hasn't been refactored yet from its port to .NET Core. Indeed, hitting Shift + F12 in Visual Studio shows that `InternalHashtable` is being used in at least 32 different places, and `ArrayList` at least 20. It would be better to eliminate usages of these classes, so less code + avoiding things like boxing/casting. 7700 area-System.Globalization Win7 Outer Loop Test Failures in System.Globalization.Tests.TextInfoToLower.ToLower (and TextInfoToUpper.ToUpper) https://github.com/dotnet/corefx/blob/d725f9f6a7232118f9179dc74f56af8ae54dc269/src/System.Globalization/tests/TextInfo/TextInfoToLower.cs#L78 http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_win7_release/lastCompletedBuild/testReport/System.Globalization.Tests/TextInfoToLower/ToLower_name___en_US___str___34__34____34______34________34__________34____________34______________34___________________expected___34__34____34______34________34__________34____________34______________34________________34____________________/ MESSAGE: Assert.Equal() Failure\r\n ↓ (pos 1)\r\nExpected: 𐐀\r\nActual: 𐐨\r\n ↑ (pos 1) +++++++++++++++++++ STACK TRACE: at System.Globalization.Tests.TextInfoToLower.ToLower(String name, String str, String expected) in d:\j\workspace\outerloop_win---627ab81b\src\System.Globalization\tests\TextInfo\TextInfoToLower.cs:line 81 http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_win7_release/lastCompletedBuild/testReport/System.Globalization.Tests/TextInfoToLower/ToLower_name___fr___str___34__34____34______34________34__________34____________34______________34________________34__________________34____________________34______________________34___________________________expected___34__34____34______34________34__________34____________34______________34________________34__________________34____________________34______________________34________________________34____________________________/ MESSAGE: Assert.Equal() Failure\r\n ↓ (pos 1)\r\nExpected: 𐐀\r\nActual: 𐐨\r\n ↑ (pos 1) +++++++++++++++++++ STACK TRACE: at System.Globalization.Tests.TextInfoToLower.ToLower(String name, String str, String expected) in d:\j\workspace\outerloop_win---627ab81b\src\System.Globalization\tests\TextInfo\TextInfoToLower.cs:line 81 http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_win7_release/lastCompletedBuild/testReport/System.Globalization.Tests/TextInfoToLower/ToLower_name___fr_FR___str___34__34____34______34________34__________34____________34______________34________________34__________________34____________________34______________________34________________________34__________________________34____________________________34______________________________34___________________________________expected___34__34____34______34________34__________34____________34______________34________________34__________________34____________________34______________________34________________________34__________________________34____________________________34______________________________34________________________________34____________________________________/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_win7_release/lastCompletedBuild/testReport/System.Globalization.Tests/TextInfoToUpper/ToUpper_name___en_US___str___34__34____34______34________34__________34____________34______________34________________34__________________34____________________34______________________34________________________34__________________________34____________________________34______________________________34________________________________34__________________________________34____________________________________34______________________________________34________________________________________34__________________________________________34____________________________________________34______________________________________________34___________________________________________________expected___34__34____34______34________34__________34____________34______________34________________34__________________34____________________34______________________34________________________34__________________________34____________________________34______________________________34________________________________34__________________________________34____________________________________34______________________________________34________________________________________34__________________________________________34____________________________________________34______________________________________________34________________________________________________34____________________________________________________/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_win7_release/lastCompletedBuild/testReport/System.Globalization.Tests/TextInfoToUpper/ToUpper_name___fr___str___34__34____34______34________34__________34____________34______________34________________34__________________34____________________34______________________34________________________34__________________________34____________________________34______________________________34________________________________34__________________________________34____________________________________34______________________________________34________________________________________34__________________________________________34____________________________________________34______________________________________________34________________________________________________34__________________________________________________34____________________________________________________34______________________________________________________34___________________________________________________________expected___34__34____34______34________34__________34____________34______________34________________34__________________34____________________34______________________34________________________34__________________________34____________________________34______________________________34________________________________34__________________________________34____________________________________34______________________________________34________________________________________34__________________________________________34____________________________________________34______________________________________________34________________________________________________34__________________________________________________34____________________________________________________34______________________________________________________34________________________________________________________34____________________________________________________________/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_win7_release/lastCompletedBuild/testReport/System.Globalization.Tests/TextInfoToUpper/ToUpper_name___fr_FR___str___34__34____34______34________34__________34____________34______________34________________34__________________34____________________34______________________34________________________34__________________________34____________________________34______________________________34________________________________34__________________________________34____________________________________34______________________________________34________________________________________34__________________________________________34____________________________________________34______________________________________________34________________________________________________34__________________________________________________34____________________________________________________34______________________________________________________34________________________________________________________34__________________________________________________________34____________________________________________________________34______________________________________________________________34___________________________________________________________________expected___34__34____34______34________34__________34____________34______________34________________34__________________34____________________34______________________34________________________34__________________________34____________________________34______________________________34________________________________34__________________________________34____________________________________34______________________________________34________________________________________34__________________________________________34____________________________________________34______________________________________________34________________________________________________34__________________________________________________34____________________________________________________34______________________________________________________34________________________________________________________34__________________________________________________________34____________________________________________________________34______________________________________________________________34________________________________________________________________34____________________________________________________________________/ 7702 area-System.IO System.IO.Compression.ZipFile missing classes for net46 Hi there! Trying to use `System.IO.Compression.ZipFile` with `net46` platform from nuget version `4.0.1-rc3-24013-00` (from `myget/dotnet-core` feed), and it seems that ZipFile is missing from the assembly for this TFM. Note that the only valid assembly that contains the class is for `dotnet5.4` TFM Is this a known issue? 7705 area-Infrastructure InputOSGroup not correctly set when building individual test projects for x-plat `c:\Users\stoub\Source\repos\corefx\src\System.Diagnostics.Process\tests>msbuild /t:rebuild /p:OSGroup=Linux /v:m` With that command line it ends up building the Linux version of the tests but the Windows version of the product libraries: ``` System.Diagnostics.Process -> c:\Users\stoub\Source\repos\corefx\bin\Windows_NT.AnyCPU.Debug\System.Diagnostics.Process\System.Diagnostics.Process.dll RemoteExecutorConsoleApp -> c:\Users\stoub\Source\repos\corefx\bin\Windows_NT.AnyCPU.Debug\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.exe System.Diagnostics.Process.Tests -> c:\Users\stoub\Source\repos\corefx\bin\Linux.AnyCPU.Debug\System.Diagnostics.Process.Tests\System.Diagnostics.Process.Tests.dll ``` That is because the InputOSGroup isn't set correctly and defaults to OSEnvironment windows is Windows_NT when building this on Windows. As a temporary workaround you can do: `c:\Users\stoub\Source\repos\corefx\src\System.Diagnostics.Process\tests>msbuild /t:rebuild /p:OSGroup=Linux /p:InputOSGroup=Linux /v:m` We should do some more testing of the test infrastructure to make sure basic scenarios like this work, in our dev workflow. cc @maririos @stephentoub @sokket 7706 area-System.Net Unified HTTP API for client and server scenarios I have been looking at the potential use of HTTP in IoT scenarios, and I have been wondering and thinking about the current stack that seems incomplete. Historically, in .NET Framework, there has been two distinct set of HTTP API:s: one for handling client scenarios (HttpClient), and another for server scenarios (HttpListener). Both are residing in the System.Net.Http namespace. Presently, there is no HttpListener in the .NET Core stack. It made me to build my own: https://github.com/robertsundstrom/HttpListener I wonder if there are any plans to implement the HttpListener API further down the road. In any case, I have a suggestion for that: Merge the two API:s so that they share a common base and common constructs like: HttpRequestMessage, HttpResponseMessage, etc. This would mean that the HttpClient sends an HttpRequestMessage, and the HttpListener should give a HttpRequestMessage. The content should be virtually the same in each end. Correspondingly, the HttpListener would send a HttpResponseMessage back, and the client would receive a HttpResponseMessage. In this way we get a more flexible API that is also easier to use, because the developers do not have to handle two sets of what actually could be the same thing. 7707 area-System.Net NegotiateStream_StreamToStream_AuthToHttpTarget_Success test failing on RHEL http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_rhel7.2_release_tst/47/consoleFull ``` 08:18:40 System.Net.Security.Tests.KerberosTest.NegotiateStream_StreamToStream_AuthToHttpTarget_Success [FAIL] 08:18:40 System.AggregateException : One or more errors occurred. (A call to SSPI failed, see inner exception.) 08:18:40 ---- System.Security.Authentication.AuthenticationException : A call to SSPI failed, see inner exception. 08:18:40 -------- System.ComponentModel.Win32Exception : ErrorCode=InternalError, Exception=Interop+NetSecurityNative+GssApiException: GSSAPI operation failed with error - An invalid status code was supplied (Server not found in Kerberos database). 08:18:40 at Interop.GssApi.EstablishSecurityContext(SafeGssContextHandle& context, SafeGssCredHandle credential, Boolean isNtlm, SafeGssNameHandle targetName, GssFlags inFlags, Byte[] buffer, Byte[]& outputBuffer, UInt32& outFlags) 08:18:40 at System.Net.Security.NegotiateStreamPal.EstablishSecurityContext(SafeFreeNegoCredentials credential, SafeDeleteContext& context, Boolean isNtlm, String targetName, ContextFlagsPal inFlags, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, ContextFlagsPal& outFlags) 08:18:40 Stack Trace: 08:18:40 at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) 08:18:40 at System.Net.Security.Tests.KerberosTest.NegotiateStream_StreamToStream_AuthToHttpTarget_Success() 08:18:40 ----- Inner Stack Trace ----- 08:18:40 at System.Net.Security.NegoState.EndProcessAuthentication(IAsyncResult result) 08:18:40 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 08:18:40 ----- Inner Stack Trace ----- ``` 7713 area-System.Net System.Net.Security.Tests.KerberosTest.NegotiateStream_StreamToStream_AuthToHttpTarget_Success [FAIL] http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/outerloop_rhel7.2_release_tst/47/consoleFull#-21371504001f1a4601-6aec-4fd5-b678-78d4389fd5e8 08:18:33 === TEST EXECUTION SUMMARY === 08:18:33 System.Net.Primitives.Functional.Tests Total: 260, Errors: 0, Failed: 0, Skipped: 0, Time: 5.249s 08:18:40 System.Net.Security.Tests.KerberosTest.NegotiateStream_StreamToStream_AuthToHttpTarget_Success [FAIL] 08:18:40 System.AggregateException : One or more errors occurred. (A call to SSPI failed, see inner exception.) 08:18:40 ---- System.Security.Authentication.AuthenticationException : A call to SSPI failed, see inner exception. 08:18:40 -------- System.ComponentModel.Win32Exception : ErrorCode=InternalError, Exception=Interop+NetSecurityNative+GssApiException: GSSAPI operation failed with error - An invalid status code was supplied (Server not found in Kerberos database). 08:18:40 at Interop.GssApi.EstablishSecurityContext(SafeGssContextHandle& context, SafeGssCredHandle credential, Boolean isNtlm, SafeGssNameHandle targetName, GssFlags inFlags, Byte[] buffer, Byte[]& outputBuffer, UInt32& outFlags) 08:18:40 at System.Net.Security.NegotiateStreamPal.EstablishSecurityContext(SafeFreeNegoCredentials credential, SafeDeleteContext& context, Boolean isNtlm, String targetName, ContextFlagsPal inFlags, SecurityBuffer inputBuffer, SecurityBuffer outputBuffer, ContextFlagsPal& outFlags) 08:18:40 Stack Trace: 08:18:40 at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) 08:18:40 at System.Net.Security.Tests.KerberosTest.NegotiateStream_StreamToStream_AuthToHttpTarget_Success() 08:18:40 ----- Inner Stack Trace ----- 08:18:40 at System.Net.Security.NegoState.EndProcessAuthentication(IAsyncResult result) 08:18:40 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 08:18:40 ----- Inner Stack Trace ----- 08:18:40 08:18:40 Finished: System.Net.Security.Tests 08:18:40 08:18:40 === TEST EXECUTION SUMMARY === 08:18:40 System.Net.Security.Tests Total: 106, Errors: 0, Failed: 1, Skipped: 0, Time: 11.159s 08:18:40 error: One or more tests failed while running tests from ''. Exit code 1. 7714 area-System.Net Fix HttpClient dependencies on desktop The latest changes to make HttpClient an OOB implementation on desktop were not getting the correct dependency set. This has to do with the the way that EnsureOOBFrameworks evaluates assets to duplicate. It does so by seeing if any placeholders are obscuring the netstandard asset and copying the netstandard asset if that is the case. This worked fine for the reference assembly, but not the implementation since it wasn't actually obscured. The result was that NuGet selects the correct assets, but is missing implementation dependencies. For now I'm fixing this by changing the package structure to explicitly break out the net46 implementations into their own folders. This is essentially what we were trying to make happen automatically with EnsureOOBFrameworks. Longer term we might want to refactor how we generate dependencies to do an actual nuget-asset selection in order to harvest from the actual assemblies that NuGet will choose. For now I'm also working around the problem that the unix shims are being referenced everywhere even though they're only needed for Unix. There's still a problem with this package in that we have two different netstandard dependency groups (one meant for Windows and one meant for Unix) but because we can't express that in a fat package the Unix one will win, even on a windows machine, if the target framework supports NETStandard1.4 or higher. This doesn't cause a problem at the moment because the unix implementation is using a superset of the Windows dependencies but we need to see about how to better handle in lieu of the NuGet feature for RID-specific dependencies. /cc @davidsh @weshaggard @chcosta 7719 area-System.Linq LINQ: Append/Prepend/Cast could probably be optimized Currently, the implementation for `Append` looks like this: ``` cs public static IEnumerable Append(this IEnumerable source, T value) { foreach (var item in source) yield return item; yield return value; } ``` This looks like it's missing out on chances for optimization. For example, this code could probably be optimized if `items` was an array/list: ``` cs items.Append(foo).ToArray(); ``` since we'd know that the result would have a length of exactly `items.Length + 1`. Same for this: ``` cs items.Append(foo).Count(); ``` cc @JonHanna --- **edit:** Also `Cast` too, since the number of elements in the resulting enumerable is guaranteed to have the same number of items as the source. Today we still naively use an iterator block like this: ``` cs public static IEnumerable Cast(this IEnumerable source) { foreach (object obj in source) yield return (T)obj; } ``` 7720 area-System.Threading Add some basic Monitor tests. We don't currently have any tests for argument validation of the Monitor class. I added those as well as some basic functionality tests (ported from ToF). @stephentoub resolves #6459 7725 area-System.Net Allow SslStreamPal.EncryptMessage to resize the output buffer SecureChannel tried precalculating the size of the ouput buffer, because that's how you interact with the Windows SChannel provider. Since OpenSSL has the BIO type to handle payload buffering it isn't set up to report the header and footer sizes the same way SChannel is. So, let the PAL implementation change the output buffer if it wants it to be bigger. The Windows implementation is largely unchanged, the only difference being that the Buffer.BlockCopy that aligns the data for SChannel interpretation has moved into the PAL. The Unix implementation doesn't need that extra copy to happen, so there's even a mild perf gain here. Fixes #7599. CC: @davidsh @CIPop @shrutigarg @stephentoub 7732 area-System.Xml System.Xml.RW.XmlSystemPathResolver.Tests failing ``` System.Xml.Tests.XmlSystemPathResolverTests.TestResolveInvalidPaths [FAIL] Assert.True() Failure Expected: True Actual: False Stack Trace: at System.Xml.Tests.XmlSystemPathResolverTests.AssertInvalidPath(String path) at System.Xml.Tests.XmlSystemPathResolverTests.TestResolveInvalidPaths() ``` 7733 area-System.Runtime ARM64: System.Runtime.InteropServices.RuntimeInformation.Tests failing "``` c__DisplayClass46_1.<b__1>d.MoveNext()\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)\r\n at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.b__1()\r\n at Xunit.Sdk.ExecutionTimer.d__4.MoveNext()\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)\r\n at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction)\r\n at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.b__0()\r\n at Xunit.Sdk.ExceptionAggregator.d__9.MoveNext()\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)\r\n at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code)\r\n at Xunit.Sdk.TestInvoker`1.d__46.MoveNext()\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance)\r\n at Xunit.Sdk.TestInvoker`1.<b__45_0>d.MoveNext()\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n at Xunit.Sdk.TestInvoker`1.b__45_0()\r\n at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext()\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code)\r\n at Xunit.Sdk.TestInvoker`1.RunAsync()\r\n at Xunit.Sdk.XunitTestRunner.InvokeTestMethodAsync(ExceptionAggregator aggregator)\r\n at Xunit.Sdk.XunitTestRunner.d__4.MoveNext()\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator)\r\n at Xunit.Sdk.TestRunner`1.<>c__DisplayClass43_0.b__0()\r\n at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext()\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code)\r\n at Xunit.Sdk.TestRunner`1.d__43.MoveNext()\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n at Xunit.Sdk.TestRunner`1.RunAsync()\r\n at Xunit.Sdk.XunitTestCaseRunner.RunTestAsync()\r\n at Xunit.Sdk.TestCaseRunner`1.d__19.MoveNext()\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n at Xunit.Sdk.TestCaseRunner`1.RunAsync()\r\n at Xunit.Sdk.XunitTestCase.RunAsync(IMessageSink diagnosticMessageSink, IMessageBus messageBus, Object[] constructorArguments, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource)\r\n at Xunit.Sdk.XunitTestMethodRunner.RunTestCaseAsync(IXunitTestCase testCase)\r\n at Xunit.Sdk.TestMethodRunner`1.d__32.MoveNext()\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync()\r\n at Xunit.Sdk.TestMethodRunner`1.d__31.MoveNext()\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n at Xunit.Sdk.TestMethodRunner`1.RunAsync()\r\n at Xunit.Sdk.XunitTestClassRunner.RunTestMethodAsync(ITestMethod testMethod, IReflectionMethodInfo method, IEnumerable`1 testCases, Object[] constructorArguments)\r\n at Xunit.Sdk.TestClassRunner`1.d__38.MoveNext()\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync()\r\n at Xunit.Sdk.TestClassRunner`1.d__37.MoveNext()\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n at Xunit.Sdk.TestClassRunner`1.RunAsync()\r\n at Xunit.Sdk.XunitTestCollectionRunner.RunTestClassAsync(ITestClass testClass, IReflectionTypeInfo class, IEnumerable`1 testCases)\r\n at Xunit.Sdk.TestCollectionRunner`1.d__28.MoveNext()\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync()\r\n at Xunit.Sdk.TestCollectionRunner`1.d__27.MoveNext()\r\n at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n at Xunit.Sdk.TestCollectionRunner`1.RunAsync()\r\n at Xunit.Sdk.XunitTestAssemblyRunner.RunTestCollectionAsync(IMessageBus messageBus, ITestCollection testCollection, IEnumerable`1 testCases, CancellationTokenSource cancellationTokenSource)\r\n at Xunit.Sdk.XunitTestAssemblyRunner.<>c__DisplayClass14_2.b__3()\r\n at System.Threading.Tasks.Task`1.InnerInvoke()\r\n at System.Threading.Tasks.Task.Execute()\r\n at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)\r\n at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)\r\n at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)\r\n at System.Threading.Tasks.SynchronizationContextTaskScheduler.PostCallback(Object obj)\r\n at Xunit.Sdk.MaxConcurrencySyncContext.RunOnSyncContext(SendOrPostCallback callback, Object state)\r\n at Xunit.Sdk.MaxConcurrencySyncContext.<>c__DisplayClass11_0.b__0(Object _)\r\n at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n at lambda_method(Closure , Object , Object )\r\n at Xunit.Sdk.ExecutionContextHelper.Run(Object context, Action`1 action)\r\n at Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc()\r\n at Xunit.Sdk.XunitWorkerThread.<>c.b__5_0(Object _)\r\n at System.Threading.Tasks.Task.InnerInvoke()\r\n at System.Threading.Tasks.Task.Execute()\r\n at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)\r\n at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)\r\n at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)\r\n at System.Threading.Tasks.ThreadPoolTaskScheduler.LongRunningThreadWork(Object obj)\r\n at System.Threading.ThreadHelper.ThreadStart_Context(Object state)\r\n at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n at System.Threading.ThreadHelper.ThreadStart(Object obj)]]> ``` " 7735 area-Infrastructure ARM64: System.Net.WebSockets.Client.Tests failing "``` d__21.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() at System.Net.WebSockets.ClientWebSocket.d__17.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at System.Net.WebSockets.Client.Tests.WebSocketHelper.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at System.Net.WebSockets.Client.Tests.ClientWebSocketTest.d__41.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at System.Net.WebSockets.Client.Tests.ClientWebSocketTest.d__33.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at System.Net.WebSockets.WinHttpWebSocket.d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() at System.Net.WebSockets.WebSocketHandle.d__21.MoveNext() ----- Inner Stack Trace ----- ]]> ``` " 7736 area-System.IO ARM64: System.Net.Http.WinHttpHandler.Unit.Tests fails "``` c__DisplayClass55_0.b__0() at System.Net.Http.WinHttpHandlerUnitTests.SendRequestHelper.Send(WinHttpHandler handler, Action setup, String fakeServerEndpoint) at System.Net.Http.WinHttpHandlerUnitTests.SendRequestHelper.Send(WinHttpHandler handler, Action setup) at System.Net.Http.WinHttpHandlerUnitTests.WinHttpHandlerTest.d__55.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at Interop.zlib.deflateInit2_(Byte* stream, Int32 level, Int32 method, Int32 windowBits, Int32 memLevel, Int32 strategy, Byte* version, Int32 stream_size) at Interop.zlib.DeflateInit2_(ZStream& stream, CompressionLevel level, CompressionMethod method, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy) at System.IO.Compression.ZLibNative.ZLibStreamHandle.DeflateInit2_(CompressionLevel level, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy) at System.IO.Compression.Deflater.DeflateInit(CompressionLevel compressionLevel, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy)]]> c__DisplayClass54_0.b__0() at System.Net.Http.WinHttpHandlerUnitTests.SendRequestHelper.Send(WinHttpHandler handler, Action setup, String fakeServerEndpoint) at System.Net.Http.WinHttpHandlerUnitTests.SendRequestHelper.Send(WinHttpHandler handler, Action setup) at System.Net.Http.WinHttpHandlerUnitTests.WinHttpHandlerTest.d__54.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at Interop.zlib.deflateInit2_(Byte* stream, Int32 level, Int32 method, Int32 windowBits, Int32 memLevel, Int32 strategy, Byte* version, Int32 stream_size) at Interop.zlib.DeflateInit2_(ZStream& stream, CompressionLevel level, CompressionMethod method, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy) at System.IO.Compression.ZLibNative.ZLibStreamHandle.DeflateInit2_(CompressionLevel level, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy) at System.IO.Compression.Deflater.DeflateInit(CompressionLevel compressionLevel, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy)]]> ``` " 7737 area-System.IO ARM64: Tests failing due to missing native components Need to investigate failures, most of them might be fixed when the native dependency is built for arm64. But do verify they pass after that System.Data.SqlClient.Tests Total: 25, Errors: 0, Failed: 2, Skipped: 0, Time: 12.869s System.IO.Compression.Tests Total: 143, Errors: 0, Failed: 113, Skipped: 0, Time: 61.830s System.IO.Compression.ZipFile.Tests Total: 24, Errors: 0, Failed: 12, Skipped: 0, Time: 19.632s System.IO.FileSystem.DriveInfo.Tests Total: 9, Errors: 0, Failed: 1, Skipped: 0, Time: 9.713s System.IO.FileSystem.Tests Total: 2227, Errors: 0, Failed: 18, Skipped: 25, Time: 4181.445s System.IO.Packaging.Tests Total: 131, Errors: 0, Failed: 112, Skipped: 0, Time: 67.804s 7742 area-System.Net AcceptAsyncV4BoundToSpecificV6_CantConnect wrong exception on CentOS http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/centos7.1_release_tst/1272/consoleFull#-21371504001f1a4601-6aec-4fd5-b678-78d4389fd5e8 ``` 23:24:01 System.Net.Sockets.Tests.DualMode.AcceptAsyncV4BoundToSpecificV6_CantConnect [FAIL] 23:24:01 Assert.Throws() Failure 23:24:01 Expected: typeof(System.Net.Sockets.SocketException) 23:24:01 Actual: typeof(System.TimeoutException): Timed out while waiting for the server accept... 23:24:01 Stack Trace: 23:24:02 at System.Net.Sockets.Tests.DualMode.DualModeConnect_AcceptAsync_Helper(IPAddress listenOn, IPAddress connectTo) 23:24:21 Finished: System.Net.Sockets.Tests 23:24:21 23:24:21 === TEST EXECUTION SUMMARY === 23:24:21 System.Net.Sockets.Tests Total: 587, Errors: 0, Failed: 1, Skipped: 2, Time: 44.837s 23:24:21 error: One or more tests failed while running tests from ''. Exit code 1. ``` 7745 area-System.IO Crc32Helper set to internal within System.IO.Compression Currently we have this: https://github.com/dotnet/corefx/blob/master/src/System.IO.Compression/src/System/IO/Compression/Crc32Helper.cs Yet we can't use it for our own checksum calculation. Why it can't be exposed? Best 7750 area-System.Net HttpClient and Cookies not working with redirects under netcore50 "I have a test project that uses an HTTP-Client to connect to a service, which in term uses cookies to store user information. Once done, it performs a redirect. Here's the service API: ``` [HttpGet] [Authorize(ActiveAuthenticationSchemes = ""Cookies"")] [Authorize(ActiveAuthenticationSchemes = ""Bearer"")] public async Task SelectTenant([FromQuery]string tenant) { ... var identity = (ClaimsIdentity) User.Identity; identity.AddClaim(new Claim(""foo"", bar)); // sign in again to persist the new claim in the cookie await HttpContext.Authentication.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, User); // redirect to the index (which won't realize we just logged in on DNX Core) return Redirect(""/""); } ``` Now, when on dnx451, the code works just fine. The index page is invoked, recognizes the cookie and the caller (HttpClient) also gets the cookie information. However, as soon as I switch to netcore50, the redirect isn't working properly anymore, as authentication data (in the cookie) seems to be lost. This is happening **before** `GetAsync` returns control to me. Here is the console output when running on DNX Core as of the redirect. Note that server-side authorization failed after the redirect: ``` info: Microsoft.AspNet.Authentication.Cookies.CookieAuthenticationMiddleware[3] AuthenticationScheme: Cookies signed in. 2016-04-14 18:43:15 [Information] Executing RedirectResult, redirecting to ""/"". info: Microsoft.AspNet.Mvc.RedirectResult[1] Executing RedirectResult, redirecting to /. 2016-04-14 18:43:15 [Information] Executed action ""OrderManager.Controllers.AccountController.SelectTenant"" in 0.0016ms info: Microsoft.AspNet.Mvc.Infrastructure.MvcRouteHandler[2] Executed action OrderManager.Controllers.AccountController.SelectTenant in 0.0016ms 2016-04-14 18:43:15 [Information] Request finished in 0.0016ms 302 info: Microsoft.AspNet.Hosting.Internal.HostingEngine[2] Request finished in 0.0016ms 302 2016-04-14 18:43:15 [Information] Protocol: HTTP/1.1 Method: GET ContentType: ContentLength: Scheme: http Host: localhost:5000 PathBase: Path: / Quer yString: info: Microsoft.AspNet.Hosting.Internal.HostingEngine[1] Request starting HTTP/1.1 GET http://localhost:5000/ 2016-04-14 18:43:15 [Warning] Authorization failed for the request at filter '""Microsoft.AspNet.Mvc.Filters.AuthorizeFilter""'. warn: Microsoft.AspNet.Mvc.Controllers.ControllerActionInvoker[0] Authorization failed for the request at filter 'Microsoft.AspNet.Mvc.Filters.AuthorizeFilter'. 2016-04-14 18:43:15 [Information] AuthenticationScheme: ""Cookies"" was challenged. info: Microsoft.AspNet.Authentication.Cookies.CookieAuthenticationMiddleware[5] AuthenticationScheme: Cookies was challenged. 2016-04-14 18:43:15 [Information] Executing ChallengeResult with authentication schemes ([""Cookies""]). info: Microsoft.AspNet.Mvc.ChallengeResult[1] Executing ChallengeResult with authentication schemes (Cookies). 2016-04-14 18:43:15 [Information] Executed action ""OrderManager.Controllers.HomeController.Index"" in 0.0015ms ``` It's worth noting that once control is returned to my code, HttpClient actually does get Cookies returned (just the wrong ones, since the Index page does another redirect to the logon because it doesn't realize I already logged in). So I guess that after `HttpContext.Authentication.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, User);` is executed, and the redirect happens, `HttpClient`on Core50 doesn't resubmit the cookie to the Index page or something. Here's the client call btw: ``` internal static async Task GetAuthCookie() { var c = new AuthenticationApiClient(new Uri(""https://foo.auth0.com"")); AuthenticationRequest request = new AuthenticationRequest { ... }; // authenticate with auth0 var authToken = await c.AuthenticateAsync(request); // set the authorization header var authHeader = new AuthenticationHeaderValue(""Bearer"", authToken.IdToken); var httpHandler = new HttpClientHandler(); using (var client = new HttpClient(httpHandler) { BaseAddress = new Uri(Settings.Uri) }) { client.DefaultRequestHeaders.Authorization = authHeader; string selectTenantUrl = ""Account/SelectTenant?tenant=bar""; //THIS IS THE CALL THAT DOESN'T WORK THE SAME ON CORE50 var result = await client.GetAsync(selectTenantUrl); Cookies = httpHandler.CookieContainer; } } ``` " 7751 area-System.Numerics Consider SIMD acceleration for Matrix and Quaternion operations similar to Vector ones Currently only Vector operations seem to benefit from SIMD acceleration. Matrix and Quaternion operations still use scalar operations instead. For instance, adding two Vector4 instances would emit a single instruction for packed addition, while transforming a Vector4 with a Matrix4x4 would result in 16 scalar multiplications and 12 scalar additions, instead of 4 packed multiplications and 3 packet additions. Since one of the main usage scenarios of System.Numerics.Vectors is in graphically intensive 2D and 3D applications, there are many cases where such applications can greatly benefit from accelerating Matrix and Quaternion operations. The theoretical speedup of a factor of 4 simply cannot be ignored. Some operations can be emulated by using Vector instead (e.g. Matrix4x4 can be represented with 4 Vector4 instances, so we can emulate the Matrix4x4 x Vector4 transformation by inlining the necessary code by hand), but other operations are hard or impossible to emulate efficiently. 7757 area-System.Globalization TimeZoneInfo should expose FromSerializedString and ToSerializedString `TimeZoneInfo` cannot be serialized with the data contract serializer (which is a recommended serialization API for .NET Core) - serializing it results in an `InvalidDataContractException`. An easy workaround would be to use `ToSerializedString` and `FromSerializedString` to convert the TimeZoneInfo into a string, but those APIs are also not available in .NET Core. This combination makes attempting to serialize a type containing a `TimeZoneInfo` a poor experience (the user needs to add a lot of `[KnownType]` attributes as per [this guidance](https://social.msdn.microsoft.com/Forums/en-US/f164f185-ae18-4775-a2ff-a814813d262d/unable-to-serialze-member-of-type-timezoneinfo?forum=wcf)) which results in messy code. 7758 area-System.ComponentModel Improve code coverage for System.ComponentModel.TypeConverter (24%) The code coverage report shows us at 47% for the next version of the package (currently in `dev/typedescriptor`). Improving this will mostly require work around `TypeDescriptor`. The largest gaps in its coverage are in private code requiring more elaborate scenarios to reach than what we have in unit tests. 7760 area-System.Net Add Http redirect tests Now that the Azure test endpoint has been updated, we can add more redirect tests that use different redirect status codes. It isn't necessary to modify every existing test to use different codes. But I modified the important ones especially those using credentials. Fixes #7505 7763 area-System.Net Convert static readonly fields in Uri to const Right now `Uri` has a bunch of `static readonly` string fields that represent different scheme names, e.g. `UriSchemeFile`. Presumably they correspond to [these](https://msdn.microsoft.com/en-us/library/system.uri_fields%28v=vs.110%29.aspx) fields on MSDN, but since they don't appear to be exposed in the contract (and thus aren't visible publicly), I've converted them to be `const` strings. Summary of full changes in this PR: - Converted `static readonly` fields -> `const` strings - Refactored `UriParser` to reference these constants during intialization of built-in URI parsers - Since a few of them were schemes that were not previously exposed as a field (e.g. `vsmacros`), I've added a few extra `const` strings (such as `UriSchemeVsMacros`) and moved the definitions to `UriParser` - Added a `using static` to `Uri` and `UriBuilder`, which previously referenced those constants cc @justinvp @hughbe @stephentoub 7765 area-Serialization Remove nongeneric collections shim from serialization Remove non-generic collections `ArrayList` and `InternalHashtable` and use ArrayList and generic dictionary instead. There should be no change in behavior. cc: @shmao @zhenlan @SGuyGe Fix #7699 7776 area-System.Net Remove SslStreamPal.PresizeEncryptBuffer - Move the Windows buffer (p)resizing code into the Windows PAL - Remove the consts from the PAL interface - Harden an assert in the Unix PAL TLS Encrypt method Addresses feedback from #7725. cc: @CIPop @stephentoub 7777 area-System.Net Fix build problem in WinHttpHandler tests PR #7760 broke the compilation of these tests but wasn't discovered in CI since WinHttpHandler tests weren't building properly. This PR will fix the compiler error while PR #7747 will make sure that these tests get built/run again in CI. 7778 area-Serialization XmlSerializer internal cache could have issue with concurrent reading and writing operations https://github.com/dotnet/corefx/pull/7765#discussion_r59859405 7779 area-System.Security System.Security.Cryptography.CryptoStream.Dispose throws an exception "Moved from https://github.com/dotnet/coreclr/issues/4329 on behalf of @kosta-arnorsky If Dispose method of System.Security.Cryptography.CryptoStream class which uses AES/Rijndael algorithm with padding is called before the ends of decryption a target data stream it throws the exception: System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed. It's especially unpleasant when decryption is interrupted by an uncaught exception: ``` using (var transform = new System.Security.Cryptography.AesManaged().CreateDecryptor(key, iv)) using (var cryptoStream = new System.Security.Cryptography.CryptoStream(encryptedDataStream, transform, System.Security.Cryptography.CryptoStreamMode.Read)) using (var decryptedStream = new System.IO.MemoryStream()) { var buffer = new byte[5000]; var readed = cryptoStream.Read(buffer, 0, buffer.Length); decryptedStream.Write(buffer, 0, readed); throw new Exception(""Something bad has happend.""); } ``` Actual Result: Dispose throws the exception: ``` System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed. at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast) at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) at System.Security.Cryptography.CryptoStream.FlushFinalBlock() at System.Security.Cryptography.CryptoStream.Dispose(Boolean disposing) at System.IO.Stream.Close() at System.IO.Stream.Dispose() ``` I've created a [small example](https://github.com/kosta-arnorsky/CryptoStream-Dispose-Exception-Sample) to demonstrate this behavior. " 7781 area-Serialization Serialization: iterate with KeyValuePair instead of keys collections for dictionary https://github.com/dotnet/corefx/pull/7765#discussion-diff-59931593 7785 area-System.Net Remove a closure allocation from WinHttpResponseStream Pass in the current `WinHttpResponseStream` as a state parameter to the continuation, so we avoid a closure. Also unindented the code. cc @davidsh @stephentoub --- **edit:** Just updated it to pass in the method parameters as state, as well. 7787 area-System.Data [perf] System.Data.SqlClient allocates lots of closures with ContinueWith Ran this grep query: ``` bash grep --include='*.cs' --exclude-dir=tests --exclude-dir=ref -r 'ContinueWith[^(]*(([^,]*)' . ``` It printed out the following results: https://gist.github.com/anonymous/7afb47c97f2f632c7ddf963111ad3136 The closure in `WinHttpHandler` is fixed by #7785, but there appear to be a bunch of them in `System.Data.SqlClient` that could be removed. Opening up a tracking issue to remove them (which I'll do myself). --- **edit:** Just realized I wasn't picking up on some of them, because most are written in the form: ``` cs task.ContinueWith(t => ...) ``` rather than ``` cs task.ContinueWith((t) => ...) ``` so I ran a new query, which seems to pick up more matches. See: https://gist.github.com/anonymous/14aa1dea4fe3a26e42e338c5b30b09b4 7788 area-System.Net Avoid a closure allocation in MessageProcessingHandler Contributes to #7787 by removing a closure allocation from `MessageProcessingHandler.SendAsync`. cc @davidsh @stephentoub 7790 area-System.Net Improve performance of decoding only '+' in WebUtility "- x4-x5 performance increase (benchmark) - 2x allocations decrease - I think that this is quite a common use case, as a lot of the time our inputs are normal text/phrases/sentences which typically contain ASCII and spaces (e.g. in Google) - Existing tests cover the new branches ## Benchmark ![benchmark](https://cloud.githubusercontent.com/assets/1275900/14580100/b936386e-03ba-11e6-849b-16cf7c8d1ea4.png) ## Benchmark Code
Click here ``` c# static unsafe void Main(string[] args) { TimeAction(""Old: "", () => Old.UrlDecode(""abc+def"")); TimeAction(""New: "", () => New.UrlDecode(""abc+def"")); Console.ReadLine(); } public static void TimeAction(string prefix, Action action) { var sw = new Stopwatch(); for (int iter = 0; iter < 5; iter++) { int gen0 = GC.CollectionCount(0); sw.Restart(); for (int i = 0; i < 10000000; i++) { action(); } sw.Stop(); Console.WriteLine($""{prefix}Time: {sw.Elapsed.TotalSeconds}\tGC0: {GC.CollectionCount(0) - gen0}""); } } ```
/cc @davidsh @stephentoub @jamesqo " 7792 area-Microsoft.CSharp "The method ""GetCustomAttributes(this ParameterInfo element, bool inherit)"" in CustomAttributeExtensions returns wrong value in case of generated property+method.." "The method `var attributes = p.GetCustomAttributes(false);` returns **null** in case the property and get/set-methods are generated using the ILGenerator. However according to the specifications, it should return: `A collection of the custom attributes that are applied to , or an empty collection if no such attributes exist. `. For details s this issue #7596. " 7793 area-System.Xml [xml] Code duplication of some XML decoder types The following types look like they have 2-3 different files, one in `Common` and one in the `System.Xml` assemblies. - `Base64Decoder` and `Base64Encoder`: present in both `Common` and `ReaderWriter` - `BinHexDecoder` and `BinHexEncoder`: present in `Common`, `ReaderWriter`, and `XmlSerializer` - `IncrementalReadDecoder`: present in both `Common` and `ReaderWriter` cc @khdang @zhenlan 7798 area-System.Threading [API Proposal] Task.Default for returning a cached Task with a result of default(T) Basically as the title says. It's a common scenario to want to return a cached `Task` if there's no async work that needs to be done in a method; .NET 4.6 offers `Task.CompletedTask` which helps with this, but for methods that actually return a result through the task there is no such alternative. Examples of where this would be useful: - `Stream.ReadAsync`: Classes that override `ReadAsync` can return `Task.Default()` instead of `Task.FromResult(0)` when there's no more work to do. - For any method returning `Task` where T is a reference type, if the return value is null then they can use `Task.Default()`. - Any method returning `Task.FromResult(false)` can use `Task.Default()` instead, which is likely a common scenario since there's only two boolean values. ## Proposed API ``` cs namespace System.Threading.Tasks { public class Task : IAsyncResult { public static Task Default(); } public class Task : Task { public static Task Default { get; } } } ``` 7800 area-System.Net Replace StreamAsyncHelper with StreamApmExtensions in System.Net.Security System.Net.Security was originally written to use Stream.Begin/EndRead/Write. When it was ported to .NET Core, it took a dependency on a helper that provided such Begin/End methods, but this helper was originally written for a different purpose: providing async Begin/End wrappers for the synchronous Read/Write methods. As a result of this mismatch, the async calls in System.Net.Security are queueing work items that then do work synchronously, blocking thread pool threads unnecessarily. This commit changes those helpers to sit on top of ReadAsync/WriteAsync instead. Eventually System.Net.Security should have its async I/O redone to sit natively on ReadAsync/WriteAsync using async/await, as it'll result in less overhead, but for now with minimal changes this improves the scalability of the library. cc: @davidsh, @cipop, @ericeil, @mikeharder 7804 area-System.Runtime Add UTF8 to CharSet The CharSet enumeration is used to specify how strings should be marshaled: https://github.com/dotnet/corefx/blob/master/src/System.Runtime/ref/System.Runtime.cs#L3019-L3023 ``` C# public enum CharSet { Ansi = 2, Unicode = 3, } ``` `Unicode` specifies that UTF16 should be used, regardless of platform, but `Ansi` is interpreted differently based on platform: on Windows it's interpreted to mean the ANSI format, whereas on Unix it's interpreted to mean UTF8. This means that on Windows we lack the ability to specify UTF8 as the marshaling, and more generally we lack the ability to specify UTF8 marshaling regardless of platform, making writing cross-platform managed components more difficult. We should add a new UTF8 enum value: ``` C# public enum CharSet { Ansi = 2, Unicode = 3, UTF8 = 5, } ``` that when used will cause the runtime's marshaling to be done with UTF8, which is the standard for modern services. [Added-by-Yi] We should also add a new corresponding UnmanagedType enum in UnmanagedType for UTF8 as well, for finer control and parity (between UnmanagedType and CharSet): https://github.com/dotnet/corefx/blob/master/src/System.Runtime.InteropServices.PInvoke/ref/System.Runtime.InteropServices.PInvoke.cs ``` C# public enum UnmanagedType { LPUTF8Str = 0x30 } ``` And new Marshal helpers while we are at it: ``` C# public class PInvokeMarshal { public static string PtrToStringUTF8(System.IntPtr ptr); public static string PtrToStringUTF8(System.IntPtr ptr, int len); public static System.IntPtr StringToAllocatedMemoryUTF8(string s); public static System.IntPtr ZeroFreeMemoryUTF8(System.IntPtr s); } ``` 7805 area-System.Runtime LoadInDefaultContext failed in CI with permissions error http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu15.10_release_tst/15/console ``` 04:16:23 System.Runtime.Loader.Tests.DefaultLoadContextTests.LoadInDefaultContext [FAIL] 04:16:23 System.UnauthorizedAccessException : Access to the path '/tmp/System.Runtime.Loader.Noop.Assembly.dll' is denied. 04:16:23 ---- System.IO.IOException : Operation not permitted 04:16:23 Stack Trace: 04:16:23 Starting: System.Runtime.Loader.Tests 04:16:23 at System.IO.UnixFileSystem.DeleteFile(String fullPath) 04:16:23 at System.Runtime.Loader.Tests.DefaultLoadContextTests.Init() 04:16:23 at System.Runtime.Loader.Tests.DefaultLoadContextTests.LoadInDefaultContext() ``` 7806 area-System.Numerics Intermittent System.Numerics.Tests.divremTest.RunDivRemTests failed in CI on CentOS, Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_centos7.1_debug_tst/3/consoleFull ``` 00:29:07 System.Numerics.Tests.divremTest.RunDivRemTests [FAIL] 00:29:07 Assert.Throws() Failure 00:29:07 Expected: typeof(System.DivideByZeroException) 00:29:07 Actual: typeof(Xunit.Sdk.TrueException): Out parameters not matching 00:29:07 Expected: True 00:29:07 Actual: False 00:29:07 Stack Trace: 00:29:07 at System.Numerics.Tests.StackCalc.VerifyOutParameter() 00:29:07 at System.Numerics.Tests.divremTest.VerifyDivRemString(String opstring) 00:29:07 at System.Numerics.Tests.divremTest.<>c__DisplayClass8_0.b__0() ``` 7807 area-System.Threading 14 System.Threading.Tasks.Parallel tests failing in outerloop They all look similar to: ``` 00:32:12 System.Threading.Tasks.Test.ParallelState.ParallelState73 [FAIL] 00:32:12 Assert.IsType() Failure 00:32:12 Expected: System.InvalidOperationException 00:32:12 Actual: Xunit.Sdk.TrueException 00:32:12 Stack Trace: 00:32:12 at System.Threading.Tasks.Test.ParallelStateTest.RealRun() 00:32:12 at System.Threading.Tasks.Test.ParallelState.ParallelState73() ``` 7809 area-System.Collections Cleanup StringDictionary tests - Use xunit - Remove duplicate tests already covered - Remove unecessary tests 7810 area-System.Data Provider test suite for ADO.NET To promote standard behavior across ADO.NET providers, it would be great if a test suite existed. Ideally all provider-independent tests would be extracted from SqlClient and made available via a nuget. This would be similar to what the EF Core team has done. 7812 area-System.Net WinHttp buffer supplied to the function was too small error should not be exposed "http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/windows_nt_release_prtest/80/consoleFull ``` 07:27:26 System.Net.Http.Functional.Tests.HttpClientHandler_ServerCertificates_Test.UseCallback_BadCertificate_ExpectedPolicyErrors(url: ""https://wrong.host.badssl.com/"", expectedErrors: RemoteCertificateNameMismatch) [FAIL] 07:27:26 System.Net.Http.HttpRequestException : An error occurred while sending the request. 07:27:26 ---- System.Net.Http.WinHttpException : A security error occurred 07:27:26 Stack Trace: 07:27:26 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 07:27:26 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 07:27:26 D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Http\src\System\Net\Http\HttpClient.cs(392,0): at System.Net.Http.HttpClient.d__58.MoveNext() 07:27:26 --- End of stack trace from previous location where exception was thrown --- 07:27:26 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 07:27:26 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 07:27:26 D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Http\tests\FunctionalTests\HttpClientHandlerTest.ServerCertificates.cs(174,0): at System.Net.Http.Functional.Tests.HttpClientHandler_ServerCertificates_Test.d__9.MoveNext() 07:27:26 --- End of stack trace from previous location where exception was thrown --- 07:27:26 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 07:27:26 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 07:27:26 --- End of stack trace from previous location where exception was thrown --- 07:27:26 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 07:27:26 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 07:27:26 --- End of stack trace from previous location where exception was thrown --- 07:27:26 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 07:27:26 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 07:27:26 ----- Inner Stack Trace ----- 07:27:26 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 07:27:26 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 07:27:26 D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs(843,0): at System.Net.Http.WinHttpHandler.d__102.MoveNext() ``` " 7814 area-System.Linq Remove expression catalog tests from expressions tests There are currently many tests run from src\System.Linq.Expressions\tests\Interpreter* that invoke expressions via both the compiler and interpreter to ensure they give the same results. The same set of expressions is also used in testing a no-op visitor. These are very time-consuming; removing them reduces run time from around 2m 50s on my machine to around 30s. They also give a false sense of coverage; a flaw within the expression itself would lead a correctly implemented compiler and interpreter to give the same incorrect result, so the coverage the tests lead to give a false impression of what branches are actually checked by tests. The drop in coverage makes it not a no-brainer clear win, but I think ultimately more of a boon toward the purpose of #1198 than the decrease in running time, even if it does take a step back in the metric. 7818 area-System.Diagnostics TestProcessStartTime failing on certain machines in CI This just started acting up again. I've seen it fail several times today. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/osx_debug_tst_prtest/68/console ``` 14:50:03 System.Diagnostics.Tests.ProcessTests.TestProcessStartTime [FAIL] 14:50:03 Assert+WrapperXunitException : File path: D:\j\workspace\osx_debug_bld---9c844ccb\src\System.Diagnostics.Process\tests\ProcessTests.cs. Line: 411 14:50:03 ---- Assert.InRange() Failure 14:50:03 Range: (4/17/16 9:56:53 PM - 4/17/16 9:56:59 PM) 14:50:03 Actual: 6/6/16 2:59:43 PM 14:50:03 Stack Trace: 14:50:03 at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber) 14:50:03 at Assert.InRange[T](T actual, T low, T high, String path, Int32 line) 14:50:03 at System.Diagnostics.Tests.ProcessTests.TestProcessStartTime() 14:50:03 ----- Inner Stack Trace ----- 14:50:03 at Assert.InRange[T](T actual, T low, T high, String path, Int32 line) ``` 7819 area-System.Net Port to RC2: Replace StreamAsyncHelper with StreamApmExtensions in System.Net.Security https://github.com/dotnet/corefx/pull/7800 System.Net.Security was originally written to use Stream.Begin/EndRead/Write. When it was ported to .NET Core, it took a dependency on a helper that provided such Begin/End methods, but this helper was originally written for a different purpose: providing async Begin/End wrappers for the synchronous Read/Write methods. As a result of this mismatch, the async calls in System.Net.Security are queueing work items that then do work synchronously, blocking thread pool threads unnecessarily. This commit changes those helpers to sit on top of ReadAsync/WriteAsync instead. Eventually System.Net.Security should have its async I/O redone to sit natively on ReadAsync/WriteAsync using async/await, as it'll result in less overhead, but for now with minimal changes this improves the scalability of the library. 7820 area-System.Linq Public members of ExpressionVisitor throw NullReferenceException rather than ArgumentNullException. Calling `Visit(ReadOnlyCollection)` with a null collection, `Visit(ReadOnlyCollection, Func)` with a null collection or function or `VisitAndConvert(ReadOnlyCollection, String)` with a null collection will result in `NullReferenceException` rather than `NullArgumentException` which would be more appropriate. In the case of `Visit(ReadOnlyCollection, Func)` if the collection is empty and the function is null, no exception is thrown. 7824 area-System.Net SendToRecvFromAPM_Single_Datagram_UDP_IPv4 failed on Windows in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_windows_nt_release/4/consoleFull ``` 03:23:09 System.Net.Sockets.Tests.SendReceive.SendToRecvFromAPM_Single_Datagram_UDP_IPv4 [FAIL] 03:23:09 Assert.True() Failure 03:23:09 Expected: True 03:23:09 Actual: False 03:23:09 Stack Trace: 03:23:09 D:\j\workspace\outerloop_win---65ef7d78\src\System.Net.Sockets\tests\FunctionalTests\SendReceive.cs(211,0): at System.Net.Sockets.Tests.SendReceive.SendToRecvFromAPM_Datagram_UDP(IPAddress leftAddress, IPAddress rightAddress) ``` 7825 area-System.Net Kerberos to ntlm fallback is not happening with the ntlmssp plugin when passed valid ntlm creds. There is a bug in ntlmssp package .If we try spnego with valid ntlm creds, it first tries Kerberos and since the creds are not present in Kerberos database it should fallback to ntlm. Which is not happening in the current verison. The issue is discussed with ntlmssp plugin developer (simo sorce) .He will look into this. 7826 area-System.Net Ensure WinHttpHandler exceptions have good stack traces WinHttpHandler often creates an exception in response to some native error code and then stores that exception into a Task. As the exception isn't actually thrown until it's propagated out at the eventual await site, the these exceptions often lack a good stack trace to help highlight where the error came from. This commit ensures that such exceptions have a stack trace by throwing and catching them before storing them into either another exception as an inner exception or directly into a Task. I've not touched cases where the exception was already being thrown or where an exception was wrapping another exception that has a stack trace. cc: @davidsh Inspired by https://github.com/dotnet/corefx/issues/7812 7830 area-System.Security Add Support for EnvelopedCms (API Review) "There have been requests to support EnvelopedCms on UWP and .NET Core. We will start with a Windows-only package (for time/cost reasons) but the package will be structured so that platform dependencies are isolated into a PAL layer and OpenSSL support can be added later. **Usage** The proposed api is designed to be source-compatible with the existing .NET feature (System.Security.Cryptography.Pkcs.EnvelopeCms) https://msdn.microsoft.com/en-us/library/system.security.cryptography.pkcs.envelopedcms(v=vs.110).aspx This is not intended to be an endorsement of that feature’s API design, rather an acknowledgement that easy source migratability remains a compelling feature. In addition to the EnvelopedCms type, we will migrate over the exchange types it needs. This represents the minimal set (despite its size.) ``` namespace System.Security.Cryptography { public sealed class CryptographicAttributeObject {} public sealed class CryptographicAttributeObjectCollection : ICollection, IEnumerable {} public sealed class CryptographicAttributeObjectEnumerator : IEnumerator {} } namespace System.Security.Cryptography.Pkcs { public sealed class AlgorithmIdentifier {} public sealed class CmsRecipient {} public sealed class CmsRecipientCollection : ICollection, IEnumerable {} public sealed class CmsRecipientEnumerator : IEnumerator {} public sealed class ContentInfo {} public sealed class EnvelopedCms {} public sealed class KeyAgreeRecipientInfo : RecipientInfo {} public sealed class KeyTransRecipientInfo : RecipientInfo {} public class Pkcs9AttributeObject : AsnEncodedData {} public sealed class Pkcs9ContentType : Pkcs9AttributeObject {} public sealed class Pkcs9DocumentDescription : Pkcs9AttributeObject {} public sealed class Pkcs9DocumentName : Pkcs9AttributeObject {} public sealed class Pkcs9MessageDigest : Pkcs9AttributeObject {} public sealed class Pkcs9SigningTime : Pkcs9AttributeObject {} public sealed class PublicKeyInfo {} public abstract class RecipientInfo {} public sealed class RecipientInfoCollection : ICollection, IEnumerable {} public sealed class RecipientInfoEnumerator : IEnumerator {} public enum RecipientInfoType {} public sealed class SubjectIdentifier {} public sealed class SubjectIdentifierOrKey {} public enum SubjectIdentifierOrKeyType {} public enum SubjectIdentifierType {} } namespace System.Security.Cryptography.Xml { public struct X509IssuerSerial {} } ``` **Compatibility** Nevertheless, we do propose to remove some of the harder-to-implement/troublesome surface area. **Senders must pass at least one CmsRecipient programmatically.** Unlike the full framework, we will not put up a dialog box for the user to select a certificate interactively. Passing an empty “recipients” argument to EnvelopedCms.Encrypt() will throw a PlatformNotSupportedException. Rationale: The dialog box is a disproportionally costly item to implement and may be irrelevant on Unix platforms (where we probably won’t automatically search a “MY store”) Our current asks have confirmed they do not require this feature. As part of this, we would remove the following method and constructor overloads: ``` EnvelopedCms.Encrypt() EnvelopedCms..ctor(SubjectIdentifierType recipientIdentifierType, ContentInfo contentInfo) EnvelopedCms..ctor(SubjectIdentifierType recipientIdentifierType, ContentInfo contentInfo, AlgorithmIdentifier encryptionAlgorithm) ``` The nullary Encrypt() message will always throw a PlatformNotSupportedException – making it useless. Passing a SubjectIdentifierType to the constructor is useless if the dialog box is unavailable, as that’s the only scenario in which this parameter’s value is used. Its very existence is confusing as the recipientIdentifierType is a per-recipient value, not a per-CMS value. **Remove the Parameter property from the AlgorithmIdentifier class.** Rationale: This property has two purposes: Extract the IV from a decoded CMS and to extract the key encryption algorithm parameters from the CMS. Unfortunately, the “IV” part has been plagued with problems from the start. For DES and 3DES, it returns a bogus value entirely. It only decodes the IV for mostly obsolete algorithms (RC2, RC4, DES and 3DES). For newer algorithms such as AES, it returns you an undefined encoded value. Since the result is a simple byte[] array, there is no way for the caller to know what he got back other than to know these idiosyncracies – nor can we easily fix them in a way that the caller can distinguish good returns from bad. The existence of the Parameters property also tricks one into thinking he can use it as an input to the EnvelopedCms constructor. But that assumption is wrong. EnvelopedCms’s constructor immediately zeroes out the Parameter property of the passed in AlgorithmIdentifier. (This is also rude API behavior as the mutation is visible to the caller.) Given all these historical problems, its vaguely defined nature and the fact that none of our asks need this information, we’d prefer to amputate this problem now. If a need for this information comes up in the future, we can take the opportunity to design the api better. Having said that, the philosophy for this iteration of the package is that we enable the basic encrypt/decrypt/decode scenarios. Supporting the writing of a full-fledged “CMS dumper” utility or attempting to decrypt the content yourself is a non-goal. **Turn IsSynchronized and SyncRoot on the Collection classes into methodimpls.** This has been an ongoing pattern as we port Collection classes. **Remove the finalizer from ContentInfo.** ContentInfo is nothing more than a tuple class that bundles an Oid and a byte array. There is no legitimate reason for it to hold native resources or contain any OS-specific code at all. The original desktop code threw an internal ""pin the byte array and give us a pointer to it"" helper method into it to solely to avoid three lines of ""pin the byte array and call the P/Invoke"" somewhere else. " 7833 area-System.Net Consider implementing perf counters in System.Net.Sockets The Sockets pert counter code is [currently disabled](https://github.com/dotnet/corefx/blob/master/src/System.Net.Sockets/src/System/Net/SocketPerfCounters.cs#L45). The comments reference #2500, which covers tracing, not perf counters, and has already been closed. We should sort out what to do about pert counters in Sockets. 7836 area-System.Net Receive bytes on accepted socket if requested See TODO here: https://github.com/dotnet/corefx/blob/master/src/System.Net.Sockets/src/System/Net/Sockets/AcceptOverlappedAsyncResult.Unix.cs#L31 and here: https://github.com/dotnet/corefx/blob/master/src/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.Unix.cs#L55 7837 area-Serialization Consider XmlAnyElementAttributes to implement typed list instead of IList https://github.com/dotnet/corefx/pull/7765/files#r59948232 7839 area-System.Data System.Data.Common target framework changes Change the System.Data.Common so that it can target portable-net451 and the contracts can reference wp8 . The comments from Eric in https://github.com/dotnet/corefx/pull/7767 can be used as a guideline. 7840 area-System.IO Fix clrcompression windows build The Open Windows native build of clrcompression was inferior to the one in TFS for a few reasons: - The Open clrcompression imported vcruntime140.dll - It did not produce a pdb for either build config - The linker/compiler flags being used were incorrect or inadequate Those problems have been resolved. The clrcompression.dll produced in the open is now the same as the one produced internally with the exception that it is linked against the UCRT instead of a fixed msvcrt from TFS. I also took this opportunity to fix the appx package and add the /guard:cf flag which is missing from the TFS clrcompression. resolves #7436 resolves #7748 related to #7756 @dagood @ellismg @gkhanna79 7841 area-System.IO Better documentation of asynchronous I/O implementation per OS Hey all, I'm trying to dive into the sources for async sockets on Posix/Linux.. And I just want to make sure that I'm not imagining... In posix based systems the async sockets actually queue work items into the ThreadPool, and the actual IO is performed in a synchronous (maybe non-blocking) manner? Is this right? I assume that this is a very big split from how things are done on a native win32 system... I would appreciate any sort of clarification on this matter from someone well aware of the actual implementation I also think the documentation could benefit from a more detailed explanation of how async I/O works in different scenarios (OS)... I would be more than happy to submit a PR for the documentation, but I just want to make sure I'm reading the situation the right way Basically people doing async IO need to be aware of how the .NET idioms map to the actual OS... Better documentation for Windows/Linux/OSX should be very useful 7848 area-Serialization Remove unused files in serialization Follow up from https://github.com/dotnet/corefx/commit/c2babe77ed4af3066ebc3bade23ea5b7eb277d19, removing unused files from serialization folder. cc: @SGuyGe @shmao @zhenlan 7849 area-System.Net Eliminate unnecessary Dns.GetHostName call on Unix in Socket.InitializeSockets See https://github.com/dotnet/corefx/blob/master/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs#L5073 This call can be eliminated on Linux/OSX, which should have some effect on startup perf on those platforms. 7850 area-System.Net Deal with failure in SocketAsyncContext.Register on Unix See TODO here: https://github.com/dotnet/corefx/blob/master/src/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs#L472 We should either throw a different exception, or possibly FailFast. 7851 area-System.Net Consider implementing SocketAsyncEventArgs.LogBuffer on Unix See TODO: https://github.com/dotnet/corefx/blob/master/src/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.Unix.cs#L234 7852 area-System.Net Add validation of Socket.Connect and Socket.Accept on disconnected socket From [the TODO in ArgumentValidationTests](https://github.com/dotnet/corefx/blob/master/src/System.Net.Sockets/tests/FunctionalTests/ArgumentValidationTests.cs#L15): ``` csharp // TODO: // // - Connect(EndPoint): // - disconnected socket // - Accept(EndPoint): // - disconnected socket ``` 7853 area-System.Net Decide whether InternalSocketException from Socket.Connect is an acceptable behavioral difference "From the TODO in DnsEndPointTest.cs: ``` // TODO: Behavior difference from .Net Desktop. This will actually throw InternalSocketException. SocketException ex = Assert.ThrowsAny(() => { sock.Connect(new DnsEndPoint(""notahostname.invalid.corp.microsoft.com"", UnusedPort)); }); ``` " 7854 area-System.Net Resolve TODO: Move to NetworkInformation tests. From the [TODO in DualModeSocketTest.cs](https://github.com/dotnet/corefx/blob/master/src/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs#L2059): ``` // TODO: Move to NetworkInformation tests. // Assert.Equal(NetworkInterface.IPv6LoopbackInterfaceIndex, ipPacketInformation.Interface); ``` (There are three of these in this file) 7855 area-System.Net Figure out how to get interface index with in_addr. From [pal_networking.cpp](https://github.com/dotnet/corefx/blob/master/src/Native/System.Native/pal_networking.cpp#L1254): ``` // TODO: Figure out how to get interface index with in_addr. // One option is http://www.unix.com/man-page/freebsd/3/if_nametoindex // which requires interface name to be known. // Meanwhile: packetInfo->InterfaceIndex = 0; ``` 7856 area-System.Net Add logging to calls to WinHttp based code Tracking EventSource logging for all WinHttp code. This applies to both WinHttpHandler as well as the WinHttp WebSockets implementation. One example from Interop.SafeWinHttpHandle.cs: ``` // TODO(Issue 2500): Add logging so we know when the handle gets closed. return Interop.WinHttp.WinHttpCloseHandle(handle); ``` #2500 was already closed; this issue will cover the specific potential log usage. 7857 area-System.Net Update System.Net TODO comments Update some `TODO` comments with issue numbers. Also, removed a few out-of-date or non-actionable `TODO` comments. See individual commits for specifics on each change. This PR covers all TODOs in `System.Net.Sockets`; I am working through the rest of `System.Net` now. 7858 area-System.Console Console.WindowWidth fails with IOException "Try the following: Program.cs: ``` csharp using System; namespace ConsoleApplication { public class Program { public static void Main(string[] args) { Console.WriteLine($""Width: {Console.WindowWidth}""); } } } ``` project.json: ``` json { ""version"": ""1.0.0-*"", ""compilationOptions"": { ""emitEntryPoint"": true }, ""dependencies"": { ""Microsoft.NETCore.App"": { ""type"": ""platform"", ""version"": ""1.0.0-rc2-3002424"" } }, ""frameworks"": { ""netcoreapp1.0"": {} } } ``` The fails with the following exception: ``` Unhandled Exception: System.IO.IOException: The handle is invalid at System.ConsolePal.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded) at System.ConsolePal.get_WindowWidth() at System.Console.get_WindowWidth() at ConsoleApplication.Program.Main(String[] args) ``` " 7859 area-System.Console Empty Console.WriteLine call does not write blank line "`Console.WriteLine()` should output an empty line: ``` csharp using System; namespace ConsoleApplication { public class Program { public static void Main(string[] args) { Console.WriteLine(""Should have empty line below""); Console.WriteLine(); Console.WriteLine(""Should have empty line above""); } } } ``` **Expected** ``` Should have empty line below Should have empty line above ``` **Observed (1.0.0-rc2-3002424)** ``` Should have empty line below Should have empty line above ``` " 7862 area-System.Net System.Net.Http.WebRequest works as a Microsoft.NETCore.App but not as a NETStandard.Library "The following code snippet and project.json combo restore, build and run: program.cs ... HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); project.json { ""version"": ""1.0.0-*"", ""compilationOptions"": { ""emitEntryPoint"": true }, ""dependencies"": { ""Microsoft.NETCore.App"": { ""type"": ""platform"", ""version"": ""1.0.0-rc2-3002394"" } }, ""frameworks"": { ""netcoreapp1.0"": {} } } Using the same code and creating a library does not [http.tar.gz](https://github.com/dotnet/corefx/files/226190/http.tar.gz) build (note the original library code did not have an entry point, but this was just for simplicity). project.json { ""version"": ""1.0.0-*"", ""compilationOptions"": { ""emitEntryPoint"": true }, ""dependencies"": { ""NETStandard.Library"" : ""1.5.0-rc2-23931"" }, ""frameworks"": { ""netstandard1.5"": {} } } /Users/xyz/Documents/Projects/bug/http/Program.cs(17,9): error CS0246: The type or namespace name 'HttpWebRequest' could not be found (are you missing a using directive or an assembly reference?) /Users/xyz/Documents/Projects/bug/http/Program.cs(17,50): error CS0103: The name 'WebRequest' does not exist in the current context /Users/xyz/Documents/Projects/bug/http/Program.cs(17,35): error CS0246: The type or namespace name 'HttpWebRequest' could not be found (are you missing a using directive or an assembly reference?) /Users/xyz/Documents/Projects/bug/http/Program.cs(21,20): error CS0246: The type or namespace name 'HttpWebResponse' could not be found (are you missing a using directive or an assembly reference?) /Users/xyz/Documents/Projects/bug/http/Program.cs(21,48): error CS0246: The type or namespace name 'HttpWebResponse' could not be found (are you missing a using directive or an assembly reference?) dotnet --info .NET Command Line Tools (1.0.0-rc2-002394) Product Information: Version: 1.0.0-rc2-002394 Commit Sha: 3a423b1080 Runtime Environment: OS Name: Mac OS X OS Version: 10.11 OS Platform: Darwin RID: osx.10.11-x64 " 7864 area-System.Net Is the Content-Type header produced by StringContent() correct? "Consider the following code ... ``` c# string contentType = ""application/atom+xml""; string requestPayload = ""some data""; var stringContent = new StringContent(requestPayload, Encoding.UTF8, contentType); ``` According to Wireshark, I'm seeing a POST using `HttpClient` with this ... ``` Content-Type: application/atom+xml; charset=utf-8 ``` ![capture](https://cloud.githubusercontent.com/assets/1622880/14647964/a1396782-0625-11e6-9c7a-3cdc1b92e4a2.PNG) Shouldn't that `Content-Type` value just be ... ``` Content-Type: application/atom+xml ``` ?? Confused, because something is choking my Azure Table Storage requests with ... ``` string stringToSign = $""{requestMethod}\n\n{contentType}\n{dateInRfc1123Format}\n{canonicalizedResource}""; ``` ... and since `SharedKeyLite`, which only requires the date and resource, **works** with my `dateInRfc1123Format` and `canonicalizedResource`, I've sort of narrowed it down to the `contentType` of the request (shown above) not matching what I'm putting into the signature sting, namely just `application/atom+xml`. " 7866 area-System.ComponentModel Port UriTypeConverter source and add tests. The first commit ports the sources from TFS by dotnet-bot. The second commit clean ups and changes the sources to work in CoreFX. It also adds some tests. I couldn't find the existing tests so I just wrote some new ones in the style of the other tests in the project. The unusual comment style of the sources (devdoc) is to match the other sources in the TypeConverter namespace for consistency. resolves #7501 @Tanya-Solyanik @stephentoub 7870 area-System.Security The type initializer for 'Crypto' threw an exception - Unix "When starting my coreclr web application on a docker image, I receive the following exception: The type initializer for 'Crypto' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object. Full stack trace: http://textuploader.com/5yccn I think this is the line throwing the exception: https://github.com/dotnet/corefx/blob/release/1.0.0-rc1/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EVP.cs#L50 I have tried both update1 and update2 of coreclr. I am utilizing the docker image: microsoft/aspnet:1.0.0-rc1-update1-coreclr I can find the library here and openssl dev is installed: root@475b687:/# find -name ""libcrypto.so"" ./usr/lib/x86_64-linux-gnu/libcrypto.so My project.json looks like: ""dependencies"": { ""Microsoft.AspNet.Authentication.JwtBearer"": ""1.0.0-rc1-final"", ""Microsoft.AspNet.IISPlatformHandler"": ""1.0.0-rc1-final"", ""Microsoft.AspNet.Mvc"": ""6.0.0-rc1-final"", ""Microsoft.AspNet.Server.Kestrel"": ""1.0.0-rc1-final"", ""Microsoft.AspNet.StaticFiles"": ""1.0.0-rc1-final"", ""Microsoft.Extensions.Configuration.FileProviderExtensions"": ""1.0.0-rc1-final"", ""Microsoft.Extensions.Configuration.Json"": ""1.0.0-rc1-final"", ""Microsoft.Extensions.Logging"": ""1.0.0-rc1-final"", ""Microsoft.Extensions.Logging.Console"": ""1.0.0-rc1-final"", ""Microsoft.Extensions.Logging.Debug"": ""1.0.0-rc1-final"", ""System.IdentityModel.Tokens.Jwt"": ""5.0.0-rc1-211161024"" }, " 7871 area-System.Security Port and Fix remaining AccessControl tests "Fixes the ports for the rest of the AccessControl tests to open. Tests are kept mostly intact with a few exceptions: - TestCaseStore data was programatically turned into XUnit MemberData providers. - Test classes were broken up into their own classes and files - Most validation checks were scripted into Assert calls. - Replaced most try/catch blocks with Assert.Throws calls. - Removed all of the ""testCasesPassed++"" calls. - Removed failing tests where the failures were due to bad tests and not bad source. - Tried to clean up the logic where it was easy to do so (e.g. Assert.True(!condition); should be Assert.False(condition);) though there are some of these remaining. Despite the above, there are still gaps and inconsistencies in these tests. The goal of this PR is only to port the tests from ToF and fix the low-hanging errors, but a future clean-up would be beneficial. resolves #6922 @bartonjs @stephentoub " 7873 area-System.Net Expose SocketException(int, EndPoint) to maintain exception Message compatibility. From the TODO in SocketExceptionFactory.cs: ``` csharp public static SocketException CreateSocketException(int socketError, EndPoint endPoint) { // TODO: expose SocketException(int, EndPoint) to maintain exception Message compatibility. return new SocketException(socketError); } ``` 7874 area-System.Data Stub System.Data with type redirections to System.Data.Common ODP.NET is complied against System.Data and now cannot be used under CoreCLR 7875 area-System.Diagnostics Make System.Diagnostics.FileVersionInfo non-RID specific Today we use PInvokes on Windows to implement System.Diagnostics.FileVersionInfo and we use MetadataReader for Unix. If we can do it compatibly we should make this a pure portable library and use the MetadataReader for all platforms and eliminate the need for the RID fork. 7876 area-Infrastructure Update netci and run-test to use the IgnoreForCI trait in Jenkins Updates the netci.groovy and runtest.sh files to pass -notrait Category=IgnoreForCI to build.cmd and run-test.sh in Jenkins so that we can disable tests from running when they're being run in Jenkins. @dotnet-bot test ci please replaces #6522 which replaced part of #6145 (I will merge this someday, you know ) @Priya91 7877 area-System.Net Use HttpCacheReadBehavior.NoCache on Windows 10 From HttpClientHandler.cs: ``` csharp // The .NET Desktop System.Net Http APIs (based on HttpWebRequest/HttpClient) uses no caching by default. // To preserve app-compat, we turn off caching (as much as possible) in the WinRT HttpClient APIs. // TODO: use RTHttpCacheReadBehavior.NoCache when available in the next version of WinRT HttpClient API. this.rtFilter.CacheControl.ReadBehavior = RTHttpCacheReadBehavior.MostRecent; this.rtFilter.CacheControl.WriteBehavior = RTHttpCacheWriteBehavior.NoCache; ``` It looks like `RTHttpCacheReadBehavior.NoCache` is supported on Windows 10; we should consider using it. 7878 area-System.Net Behavior difference from NETFX when unknown HttpRequestMessage.Version is used "From HttpHandlerToFilter.cs: ``` csharp else { // TODO: We need to throw an exception here similar to .NET Desktop // throw new ArgumentException(SR.GetString(SR.net_wrongversion), ""value""); // // But we need to do that checking in the HttpClientHandler object itself. // and we have that bug as well for the WinHttpHandler version also. maxVersion = RTHttpVersion.Http11; } ``` ...but maybe this would be a breaking change at this point? " 7879 area-System.Net Add exception message explaining the PlatformNotSupportedException on MaxRequestContentBufferSize From HttpClientHandler.Windows.cs: ``` csharp public long MaxRequestContentBufferSize { // This property has been deprecated. In the .NET Desktop it was only used when the handler needed to // automatically buffer the request content. That only happened if neither 'Content-Length' nor // 'Transfer-Encoding: chunked' request headers were specified. So, the handler thus needed to buffer // in the request content to determine its length and then would choose 'Content-Length' semantics when // POST'ing. In CoreCLR and .NETNative, the handler will resolve the ambiguity by always choosing // 'Transfer-Encoding: chunked'. The handler will never automatically buffer in the request content. get { return 0; } // TODO: Add message/link to exception explaining the deprecation. // Update corresponding exception in HttpClientHandler.Unix.cs if/when this is updated. set { throw new PlatformNotSupportedException(); } } ``` 7882 area-System.IO Re-Enable Unicode Compression tests Some Compression tests were using unicode files that were failing specifically in CI runs. I've modified those tests to use the IgnoreForCI tag so we can avoid those failures. resolves #5459, #5096 7883 area-System.Net In CurlHandler, use WinHttp's default connect timeout From CurlHandler.cs: ``` csharp private TimeSpan _connectTimeout = Timeout.InfiniteTimeSpan; // TODO: Use the WinHttp default once we determine how to expose this. HttpHandlerDefaults.DefaultConnectTimeout; ``` 7884 area-System.Net Determine if CurlHandler request buffer size should be optimized to start smaller and grow From CurlHandler.EasyRequest.cs: ``` csharp internal readonly byte[] _buffer = new byte[RequestBufferSize]; // PERF TODO: Determine if this should be optimized to start smaller and grow ``` 7885 area-System.Net Consider enhancing HTTP test server endpoint to provide a custom response header with a SHA1 hash of the expected response body From ResponseStreamTest.cs: ``` csharp // TODO: This validation will be improved in the future once the test server endpoint // is able to provide a custom response header with a SHA1 hash of the expected response body. ``` 7889 area-System.Net Figure out the possible values that Linux might return from /sys/class/net//operstate "From LinuxNetworkInterface.cs: ``` csharp // Maps values from /sys/class/net//operstate to OperationStatus values. private static OperationalStatus MapState(string state) { // TODO: Figure out the possible values that Linux might return. switch (state) { case ""up"": return OperationalStatus.Up; case ""down"": return OperationalStatus.Down; default: return OperationalStatus.Unknown; } } ``` " 7890 area-System.Net Better error handling in RequestStream.GetBuffer From RequestStream.cs: ``` csharp public ArraySegment GetBuffer() { ArraySegment bytes; bool success = _buffer.TryGetBuffer(out bytes); if (!success) { // TODO: Need to figure out how to log this and throw a good exception. throw new Exception(); } return bytes; } ``` 7893 area-System.Net Share code between WinHttpWebSocket and WinHttpClientHandler "From WinHttpWebSocket.cs: ``` csharp internal class WinHttpWebSocket : WebSocket { #region Constants // TODO: This code needs to be shared with WinHttpClientHandler private const string HeaderNameCookie = ""Cookie""; private const string HeaderNameWebSocketProtocol = ""Sec-WebSocket-Protocol""; #endregion ``` " 7895 area-System.Net Better error handling in WinHttpWebSocketCallback.cs From WinHttpWebSocketCallback.cs: ``` csharp // TODO: handle SSL related exceptions. state.UpdateState(WebSocketState.Closed); // TODO: Create exception from WINHTTP_CALLBACK_STATUS_SECURE_FAILURE flags. state.TcsUpgrade.TrySetException(exception); ``` 7896 area-System.Net Refactor WinRTWebSocket state into encapsulated class From WinRTWebSocket.cs: ``` csharp #region State // Code related to state management // TODO: Refactor state into encapsulated class ``` 7898 area-System.Net Associate issues with more TODO comments in System.Net This covers all TODO comments I found in the System.Net code. We should now have an open issue for every TODO, and every TODO should reference each issue by ID. There were a couple of comments suggesting that we change some iterative `[Fact]` cases into `[Theory]` cases; rather than file issues on these, I just went ahead and did it. @stephentoub, @CIPop, @davidsh 7899 area-System.Net Failing network tests in the CI "Of the past dozen or so PRs I've done I've noticed the following tests failing repeatedly. This one at least 4 times: System.Net.Http.Functional.Tests.HttpClientHandler_ServerCertificates_Test.UseCallback_BadCertificate_ExpectedPolicyErrors(url: ""https://expired.badssl.com/"", expectedErrors: RemoteCertificateChainErrors) ``` MESSAGE: System.Net.Http.HttpRequestException : An error occurred while sending the request.\r\n---- System.Net.Http.WinHttpException : A security error occurred +++++++++++++++++++ STACK TRACE: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at System.Net.Http.HttpClient.d__58.MoveNext() in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Net.Http\src\System\Net\Http\HttpClient.cs:line 392 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at System.Net.Http.Functional.Tests.HttpClientHandler_ServerCertificates_Test.d__9.MoveNext() in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Net.Http\tests\FunctionalTests\HttpClientHandlerTest.ServerCertificates.cs:line 174 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at System.Diagnostics.ExceptionHelpers.InitializeStackTrace[TException](TException e) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\Diagnostics\ExceptionExtensions.cs:line 15 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at System.Net.Http.WinHttpHandler.d__102.MoveNext() in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs:line 843 ``` This one twice: System.Net.Sockets.Tests.SendReceive.SendToRecvFromAPM_Single_Datagram_UDP_IPv4 ``` MESSAGE: Assert.True() Failure\r\nExpected: True\r\nActual: False +++++++++++++++++++ STACK TRACE: at System.Net.Sockets.Tests.SendReceive.SendToRecvFromAPM_Datagram_UDP(IPAddress leftAddress, IPAddress rightAddress) in D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Sockets\tests\FunctionalTests\SendReceive.cs:line 211 ``` " 7901 area-System.Linq Interpreter fails to throw when compiling redefined labels. A label re-defined in the same scope should throw upon compilation, but this does not happen in the interpreter. This bug was introduced by me at https://github.com/dotnet/corefx/pull/6993/files#diff-e009724c302721a6062e8980279534feR71 7904 area-System.Linq Some tests in Linq.Expressions should be in Linq or Linq.Queryable In particular `MatchSequencePattern` tests for consistency between `Enumerable` and `Queryable` and so should be in the tests for each to catch any regressions in either. (Consider how #5947 changing the `Enumerable` API didn't trigger it in CI). There are some further tests that are really testing `Enumerable` or `Queryable` and should be tested along with the relevant assembly, though most are already well covered by the existing tests. And exception is `QueryableOfQueryable` which hits features of both `Queryable` and of `Expressions` but those features of `Expressions` it touches on are already well covered in parameter an lambda tests. 7906 area-System.Net Building System.Net.Primitives.FunctionalTests against packages fails Building the FunctionalTests with /p:BuildTestsAgainstPackages=true throws errors. Currently true has been added to keep the project reference. We should be able to remove this project reference (just reference the nupkg) and build the test project without errors. 7908 area-System.Security Building System.Sec.Crypto.Cng.Tests against packages fails Building the Tests with /p:BuildTestsAgainstPackages=true throws errors. Currently true has been added to keep the project reference. We should be able to remove this project reference (just reference the nupkg) and build the test project without errors. @bartonjs @weshaggard 7910 area-System.Security Building System.Sec.Crypto.X509Cert.Tests against packages fails Building the Tests with /p:BuildTestsAgainstPackages=true throws errors. Currently true has been added to keep the project reference. We should be able to remove this project reference (just reference the nupkg) and build the test project without errors. @bartonjs @weshaggard 7912 area-Serialization Building System.Xml.XmlSerializer.Tests against packages fails Building the Tests with /p:BuildTestsAgainstPackages=true throws errors. Currently true has been added to keep the project reference. We should be able to remove this project reference (just reference the nupkg) and build the test project without errors. @weshaggard 7913 area-System.Xml Building System.Xml.XDocument.TreeManipulation.Tests against packages fails Building the Tests with /p:BuildTestsAgainstPackages=true throws errors. Currently true has been added to keep the project reference. We should be able to remove this project reference (just reference the nupkg) and build the test project without errors. @weshaggard 7917 area-System.Collections ConcurrentBag allocations ConcurrentBag is potentially the best of the concurrent data structures when it comes to object pooling for high throughput as it has the lowest contention. However, it allocates a lot of `Node`s which means in practice its generally better to use a ConcurrentQueue which is based on array chunks since if you are pooling you are trying to avoid the allocations. It allocates a [new Node for every Add](https://github.com/dotnet/corefx/blob/d0dc5fc099946adc1035b34a8b1f6042eddb0c75/src/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentBag.cs#L905). If for example it used a lockless `ThreadStatic` stack or queue for the `Node`s and recycled them this would reduce its allocation weight; while still having the low contention. (Might be better approaches, just a suggestion) The following code allocates 32M Nodes and 1,278,983,840 bytes ``` csharp var o = new object(); var bag = new ConcurrentBag(); for (var ii = 0; ii < 1000000; ii++) { for (var i = 0; i < 32; i++) { bag.Add(o); } for (var i = 0; i < 32; i++) { bag.TryTake(out o); } } ``` ![Node allocations](http://aoa.blob.core.windows.net/aspnet/concurrentbag1.png) /cc @stephentoub 7920 area-System.Reflection TypeExtensions does not contain GetConstructor, GetMethod which accepts both BindingFlags and a Type[] "For example: in the full framework you could obtain a protected constructor with a specific signature by using the ""Type.GetConstructor(BindingFlags, Binder, Type[], ParameterModifier[])"" method. TypeExtensions provides a method which accepts BindingFlags and one that accepts a Type[]. But there is no method that accepts both. " 7921 area-System.Net Uri GetComponents test fails with invalid punycode on Unix "``` System.Tests.UriMethodTests.GetComponents(uri: http://xn--ሴpck.com/, components: NormalizedHost, expected: ""xn--ሴpck.com"") [FAIL] Assert.Equal() Failure ↓ (pos 0) Expected: xn--ሴpck.com Actual: ఽూ.com ↑ (pos 0) Stack Trace: at System.Tests.UriMethodTests.GetComponents(Uri uri, UriComponents components, UriFormat format, String expected) at System.Tests.UriMethodTests.GetComponents(Uri uri, UriComponents components, String expected) ``` " 7923 area-System.Net Simplify CurlHandler auth type handling After further discussions, it's been decided we don't need to remove NTLM from the auth type list and do lots of gyrations to only allow it in specific circumstances. This commit simplifies the auth type handling as a result, putting NTLM back into the ordered list of auth types. A similar change will be made separately for Windows. cc: @ericeil, @bartonjs, @davidsh 7927 area-Meta ProjectReference -> Package Dependency: No packages available for System.Composition.* project references "In our test builds, we'd like to be able to compile our libraries with project references converted to packages. System.Composition and System.Composition.Convention have project references to these libraries which we do not publish packaging for... > ""System.Composition.AttributedModel"" > ""System.Composition.Convention"" > ""System.Composition.Hosting"" > ""System.Composition.Runtime"" > ""System.Composition.TypedParts"" > ""TestLibrary"" > ""Microsoft.Composition.Demos.ExtendedCollectionImports"" The System.Composition.Convention test library was opted out of the project reference to package dependency conversion with https://github.com/dotnet/corefx/commit/c1ec94b74183f598513199cde0d799a514c0a0fb You can repro the issue by removing the ""KeepAllProjectReferences"" property from System.Composition.Convention.Tests.csproj and running ""sync /p /t"". " 7929 area-System.Net Fix HttpClient package for NETCore50 Recent refactoring broke asset selection for HttpClient on NETCore50. I had removed PackageTargetRuntime in order to use PackageDestination instead but this caused the RID-specific implementation to be chosen for NETCore50: https://github.com/ericstj/corefx/commit/0a8c4fb115246f80bcc86ddb88797bfd1c7271f7#diff-d6c266b4814b075db300e51936fdf722L17 Instead we need to make sure that we package the NETCore50 build as RID-specific as well so that it can take precedence of the RID- specific NETStandard implementation. /cc @davidsh @shmao 7930 area-System.Reflection ProjectReference -> Package Dependency: System.Reflection.Context does not restore against packages In our test builds, we'd like to be able to compile our libraries with project references converted to packages. System.Reflection.Context test project does not build when its project references are converted to package dependencies. EXEC : error : System.Reflection.Context 4.0.1-rc3-24018-00 provides a compile-time reference assembly for System.Reflection.Context on DNXCore,Version=v5.0, but there is no run-time assembly compatible with centos.7-x64. [E:\gh\chcosta\corefx\build.proj] EXEC : error : One or more packages are incompatible with DNXCore,Version=v5.0 (centos.7-x64). [E:\gh\chcosta\corefx\build.proj] EXEC : error : System.Reflection.Context 4.0.1-rc3-24018-00 provides a compile-time reference assembly for System.Reflection.Context on DNXCore,Version=v5.0, but there is no run-time assembly compatible with debian.8.2-x64. [E:\gh\chcosta\corefx\build.proj] EXEC : error : One or more packages are incompatible with DNXCore,Version=v5.0 (debian.8.2-x64). [E:\gh\chcosta\corefx\build.proj] Perhaps the right thing to do here is to remove the System.Reflection.Context test build as I hear it provides very little value... Alternatively, we could switch the target framework to netcore50, but then we'd need to create a netcore50 test-runtime. 7932 area-System.Net HttpResponseMessage dispose doesn't close when the body is not read When using `HttpClient.SendAsync` with `HttpCompletionOption.ResponseHeadersRead`, `HttpResponseMessage.Dispose` on the resulting response does not close the connection if none of the content has been read. If you even read a single byte of the content, `Dispose` works just fine. `HttpCompletionOption.ResponseContentRead` is the default so this is perhaps a less common scenario. I have tested Mac OS X and Linux, which have the same results. Windows acts differently. ``` > dotnet --version 1.0.0-rc2-002345 ``` ### Use Case This is important because sometimes it's not necessary for a client application to read the response body (e.g. if the status code is `500 Internal Server Error` then perhaps the client does not care to download the response). ### Workaround The client can just read a single byte from the response. However this seems like a hack and could break in the future for all I know. ### Test procedure 1. Extract the following .NET CLI test app: [closehttp.zip](https://github.com/dotnet/corefx/files/228633/closehttp.zip) 2. Open a connection but don't read any content (`dotnet run` on the test app). 3. Use some other tool to see open TCP connections on the test app process and verify one exists. - `lsof` on OS X and Linux. - [Process Explorer](https://technet.microsoft.com/en-us/sysinternals/processexplorer.aspx) on Windows. 4. Dispose the connection by following the tool's prompts. (`HttpResponseMessage.Dispose`) 5. Expect the connection to be closed in the tool and verify in the tool used in step 3. 6. Repeat steps 2-5 with `dotnet run read` (or any command line argument) to read a byte of the content body. ### Mac OS X and Linux results Checking a process's TCP connections: ``` > lsof -p PID | grep TCP dotnet 49733 46u IPv4 0t0 TCP :50657->ec2-54-175-222-246.compute-1.amazonaws.com:http (ESTABLISHED) ``` `HttpResponseMessage.Dispose` only closes the connection if an attempt has been made to read from the content stream. Calling `Dispose` on the network stream (from `HttpResponseMessage.Content.ReadAsStreamAsync`) does not help. `HttpClient.Dispose` _does_ close the connections. ### Windows results Checking a process's TCP connections: Screenshot for Process Explorer. ![capture](https://cloud.githubusercontent.com/assets/94054/14687430/572239e4-06f2-11e6-8bfb-5b20dcf13d4d.PNG) `HttpResponseMessage.Dispose` never seems to close the connection. Calling `Dispose` on the network stream (from `HttpResponseMessage.Content.ReadAsStreamAsync`) does not help. `HttpClient.Dispose` _does_ close the connections. I am thinking this may be due to the fact that the underlying layer is doing some connection pooling or `Keep-Alive` stuff. Not sure. 7933 area-Infrastructure Publish a package list with each build We change the set of packages / versions produced quite often. It would be good to produce a build artifact dropped to a public server that lists what packages make up a particular build. 7934 area-System.IO Modify FileSystemWatcher tests to use temp paths. This is a pretty general clean-up of the FSW tests to be more in line with the other FileSystem tests. - Add Common TempDirectory class for short-term temporary directories that are easy to create and destroy - Put all FSW tests into the System.IO.Tests namespace - Modify all FSW tests to use the common TempFile/TempDirectory classes instead of their own custom one - Modify all FSW tests to watch for events in a temporary directory. There shouldn't be any more new items being created or watched in the runtime folder. - Fix the SymLink tests to use the ConditionalFact attribute similar to how the FileSystem tests function. - Remove the symlink print statements being outputted by the FileSystem CreateSymbolicLink function. @stephentoub 7937 area-System.Net System.Net.Security test stabilization - Adding generic parallel test execution script. - Address several System.Net.Security test issues found using the script. The following tests have been used: - 100 parallel test processes on a 12CPU/16GB machine for 1hr - 20 parallel test processes on a 8CPU/3GB machine (leaving this to run overnight) - 20 parallel test processes on a 2CPU/2GB machine (leaving this to run overnight) Most of below bugs were potentially fixed by #7800 at least in part. Other test-code fixes to issues discovered during stress tests have been added to this PR. Fixes #4467 #5283 #5284 #5991. @davidsh @stephentoub @ericeil PTAL /cc @himadrisarkar 7938 area-Serialization `FormatterServices.GetUninitializedObject` replacement? I'm author of [FsPickler](http://nessos.github.io/FsPickler/), a multi-format message serialization library intended as a replacement to BinaryFormatter. The focus of the library is _serialization of closures_, which means that I need to support things like subtyping and internal, compiler-generated classes that often have no accessible constructors or serialization attribute annotations. I would be interested in porting FsPickler (and its father project, [mbrace](http://mbrace.io/)) to CoreCLR, however there are many obstacles, mostly related to deprecated APIs. The component I'm more concerned about is the `FormatterServices.GetUninitializedObject` method which is used for instantiating objects without relying on a parameterless constructor. This is crucial for us since many closure types (particularly F# lambdas) do not come with such constructors. Do you have any plans for replacing this with equivalent functionality? /cc https://github.com/dotnet/corefx/issues/6564#issuecomment-212620200 https://github.com/dotnet/coreclr/issues/2715 7939 area-Infrastructure Update Windows Nano Server image used in CI cc @joshfree 7941 area-System.Net Fail more gracefully if the user specifies a receive buffer for AcceptAsync On Windows, `AcceptAsync` can optionally receive an initial buffer-full of data from the newly connected socket, via the magic of [`AcceptEx`](https://msdn.microsoft.com/en-us/library/windows/desktop/ms737524%28v=vs.85%29.aspx). We currently have no emulation of this feature on Unix. Instead, we fail an assert in Debug builds, or report erroneous results in Release builds. This change causes `AcceptAsync` to throw `PlatformNotSupportedException` if the user has supplied a buffer to receive data. In the future, we can consider implementing this feature, but for now it's better to fail correctly rather than succeed erroneously. I've also added a couple of new test cases (to check that this works on Windows, and does _not_ work on Unix), and some new asserts to make sure this doesn't come up elsewhere. Addresses #7836 @stephentoub, @CIPop 7942 area-Serialization XmlDictionaryWriterTest.XmlBaseWriter_CheckAsync_ThrowInvalidOperationException Fails in Net Native The test asserts the exception message. But in Net Native the exception contains the resource name only instead of the error message, thus the test fails in Net Native. 7944 area-System.Reflection Implements MetadataReaderProvider MetadataReaderProvider can be created from array, stream or a memory block, manages the specified resource and provides MetadataReader. 7946 area-System.Net Fix CurlResponseStream.Dispose to cancel the request We weren't canceling the request when prematurely Dispose'ing the response stream. Because of how asynchronous transfers work, where we need to pause the connection until a reader has requested data, if no reader ever requested data (e.g. the stream was disposed without reading anything) then the connection could remain paused indefinitely, and it would sit around until the HttpClient timeout kicked in and canceled it. This could lead to unbounded growth of the number of sockets being used, as sockets couldn't be pooled or cleaned up due to still being associated with an active download. The fix is simply to cancel the request in Dispose if the request isn't already completed. cc: @ericeil, @kapilash, @davidsh, @joelverhagen 7947 area-System.Net Force CurlHandler active operations to shutdown when handler disposed If the CurlHandler is disposed of while active operations are in progress, fail them. This was generally already happening, but not reliably, and not with the right exception type (a cancellation exception). cc: @ericeil, @kapilash, @davidsh 7948 area-System.Linq CanCatchExceptionAsObject failed in CI on unix http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_release_prtest/138/consoleText ``` System.Linq.Expressions.Tests.ExceptionHandlingExpressions.CanCatchExceptionAsObject(useInterpreter: True) [FAIL] System.Exception : Exception of type 'System.Exception' was thrown. Stack Trace: at System.Linq.Expressions.Interpreter.ThrowInstruction.Run(InterpretedFrame frame) at System.Linq.Expressions.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Linq.Expressions.Interpreter.Interpreter.Run(InterpretedFrame frame) at System.Linq.Expressions.Interpreter.LightLambda.Run(Object[] arguments) at Thunk(Func`2 ) at System.Linq.Expressions.Tests.ExceptionHandlingExpressions.CanCatchExceptionAsObject(Boolean useInterpreter) ``` 7952 area-Infrastructure CoreFX's version of CLI should be updated automatically when a new LKG of CLI is available "For more info on the plan, skip to this comment: https://github.com/dotnet/corefx/issues/7952#issuecomment-213072085 This issue was originally about the following bug that we're fairly sure was because we had an out of date CLI: --- Error during restore in [this OSX Release build](http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/osx_release_prtest/28/): ``` Tools are already initialized [14:24:51.24] Restoring all packages... /tmp/tmp62f36ecd1afa49f8a8396d696921c22e.exec.cmd: line 3: 4667 Segmentation fault: 11 ""/Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx_release_prtest/Tools/dotnetcli/dotnet"" restore --packages ""/Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx_release_prtest/packages"" --source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json --source https://www.nuget.org/api/v2/ --infer-runtimes ""/Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx_release_prtest/src"" ""/Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx_release_prtest/pkg"" [14:28:23.61] Restoring all packages...Done. ``` So far this has only been observed in that one linked build, so I don't know if it's a one-off issue or not. Summary of ideas on this (thanks @ericstj @mellinoe) This was found in https://github.com/dotnet/corefx/pull/7931. However, https://github.com/dotnet/corefx/issues/7902 indicated that there was a corrupted package in the NuGet cache, which suggests that some sort of interruption earlier caused a package to be corrupted during restore. It may have been this same kind of segfault during a package install that caused the corrupt package, but we don't have a good way of tracking this down. A simple `./build.sh managed release` doesn't repro the segfault on my OSX box. One thing to try is to update CLI to take any fixes to the runtime that might have happened. (Side effect: NuGet may also want to be resilient to corrupted cache files, in case segfaults or even just build cancellations happen when the cache is being written.) " 7953 area-System.Linq Lambda compilation causes a stackoverflow when selecting a large number of columns from an EF entity. "This has been moved from https://github.com/aspnet/EntityFramework/issues/5131 We have a bit of an odd use-case and I think I may have uncovered a bug. I am going to be as clear as I can, but please ask any questions you need for clarification. I know this bug (if it is a bug) isn't going to be fixed today, so if someone can point me to the location in source this might originating from, I can take a look and 1) see if I can fix it or 2) if it isn't a bug in EF adjust my code accordingly. #### Problem System.Stackoverflow exception originating from EntityFramework.dll is causing W3WP to crash. #### What we are trying to do We have an entity defined in a DB context - nothing out of the ordinary here. The entity is exposed over a WebAPI Odata endpoint. The web client is able to query the data just fine and exports it to CSV for customers to download. The view backing the entity in question is approaching 1 millions records. We have an SLA to meet when being able to export the CSV, and when you have to export 1million records this SLA is broken. We originally tried a multi-threaded approach by have X number of threads getting N number of records per page and each doing a specific number of pages. So, 5 threads running at a time, each responsible for 200,000 records paging through them at 100 each. This helped, but it would still take ~20 minutes for a full export. So we moved to a streaming approach - this is where the fun starts :) #### Repro steps 1) Create a view in a database with more than 100 columns. 2) Bind that to an entity using the designer and expose it over a WebAPI Odata endpoint 3) Using the Odata framework, construct a query that selects all 100 rows from the entity. Note, you have to **explicitly** select the rows. Allowing the default select (which returns all rows) or doing a ""Select=*"" will not reproduce the problem. EX: `http://localhost/odata/entity?$select=col1,col2,...col99,col100` 4) W3WP crashes with an unhandled exception. You can see this in the Application Log. ``` Faulting application name: w3wp.exe, version: 8.0.9200.16384, time stamp: 0x50108835 Faulting module name: clrjit.dll, version: 4.6.96.0, time stamp: 0x55b96549 Exception code: 0xc00000fd Fault offset: 0x00000000000778ac Faulting process id: 0x2f4c Faulting application start time: 0x01d19b20a1c244cf Faulting application path: c:\windows\system32\inetsrv\w3wp.exe Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clrjit.dll Report Id: 7678dc0b-071e-11e6-945c-000d3a900c63 Faulting package full name: Faulting package-relative application ID: ``` 5) Attach a debugger and make the request again. Make sure your IDE is set to stop on all exceptions and you will see this exception is caught. (The line is annotated in the Example code code blow). Dig into the error and you will see it being thrown from EntityFramework.dll. ``` System.StackOverflowException was unhandled HResult=-2147023895 Message=Exception of type 'System.StackOverflowException' was thrown. InnerException: ``` #### Notes - I did some testing, and as soon as we select more than 96 columns the stackoverflow is thrown. Select 96 or less and it works - Notice we are not using a strongly typed entity. As far as PushStreamContent is concerned, it is just an IQueryable. I think this is important because a few years ago [this non-public patch](https://support.microsoft.com/en-us/kb/2384016) was put put for something very similar. I know it isn't the same, but there are similarities. I assume this would have been included in subsequent versions though. > - If I change the endpoint to _not_ use the PushStreamContent and instead just return the data like you see in most applications (i.e. `return Request.CreateResponse(view );`) it actually works. This leads me to believe it has something to do with the enumeration over the IQueryable. _Edit: The above point is wrong. It will fail either way_ - I mention it in passing, but I want to call out that if the client does a `$select=*`, then everything works. Even if there are more than the 96 columns. I wonder if it has to do with the size of the expression tree being built? - I have traced the bug down to the System.Linq.Expressions.Compiler.LambdaCompiler specifically this: ``` private void EmitLambdaBody() { // The lambda body is the ""last"" expression of the lambda CompilationFlags tailCallFlag = _lambda.TailCall ? CompilationFlags.EmitAsTail : CompilationFlags.EmitAsNoTail; EmitLambdaBody(null, false, tailCallFlag); } ``` #### Example code _you can see here that we are not using the @Queryable annotation, but instead calling options.ApplyTo our self_ ``` public HttpResponseMessage GetEntity(ODataQueryOptions options) { //the IsPublic isn't important here. I am just showing the we do additional query filtering on top of what the client asks for IQueryable view = options.ApplyTo(DbContext.vwEntity.where(row => row.IsPublic)); return new ResponseStreamer(Request).StreamAsync(view); } ``` _ResponseStreamer takes the current HttpWebRequests, and flushes rows out to a `PushStreamContent` as we get read them from the database. This, in essence, allows us to send rows to the client as fast as we are able to get them from SQL_ ``` public HttpResponseMessage StreamAsync(IQueryable data) { HttpResponseMessage response = request.CreateResponse(); response.Content = new PushStreamContent( async (outputStream, httpContent, transportContext) => { try { using (TextWriter tw = new StreamWriter(outputStream)) { using (JsonWriter writer = new JsonTextWriter(tw)) { writer.WriteStartArray(); // The exception is throw while enumerating over ""data"" foreach (var item in data) { string json = JsonConvert.SerializeObject(item)+"",""+Environment.NewLine; writer.WriteRaw(json); await outputStream.FlushAsync(); } writer.WriteEndArray(); } } } catch (Exception ex) { var errorBuffer = Encoding.Default.GetBytes(""an error for the client to see""); outputStream.Write(errorBuffer, 0, errorBuffer.Length); outputStream.Flush(); } finally { outputStream.Close(); } }); return response; } ``` #### Stacktrace ``` [Managed to Native Transition] mscorlib.dll!System.Reflection.Emit.DynamicMethod.CreateDelegate(System.Type delegateType = {Name = Inspecting the state of an object in the debuggee of type System.Type is not supported in this context. FullName = Inspecting the state of an object in the debuggee of type System.Type is not supported in this context.}, object target = {System.Runtime.CompilerServices.Closure}) Unknown System.Core.dll!System.Linq.Expressions.Compiler.LambdaCompiler.Compile(System.Linq.Expressions.LambdaExpression lambda, System.Runtime.CompilerServices.DebugInfoGenerator debugInfoGenerator) Line 210 C# System.Core.dll!System.Linq.Expressions.Expression>>.Compile() Line 190 C# EntityFramework.dll!System.Data.Entity.Core.Common.Internal.Materialization.CoordinatorFactory>.CoordinatorFactory(int depth, int stateSlot, System.Linq.Expressions.Expression> hasData = null, System.Linq.Expressions.Expression> setKeys = null, System.Linq.Expressions.Expression> checkKeys = null, System.Data.Entity.Core.Common.Internal.Materialization.CoordinatorFactory[] nestedCoordinators, System.Linq.Expressions.Expression>> element = {System.Linq.Expressions.Expression>>}, System.Linq.Expressions.Expression> wrappedElement, System.Linq.Expressions.Expression>> elementWithErrorHandling, System.Linq.Expressions.Expression>>> initializeCollection = null, System.Data.Entity.Core.Common.Internal.Materialization.RecordStateFactory[] recordStateFactories) Unknown EntityFramework.dll!System.Data.Entity.Core.Common.Internal.Materialization.CoordinatorFactory>.CoordinatorFactory(int depth, int stateSlot, System.Linq.Expressions.Expression hasData, System.Linq.Expressions.Expression setKeys, System.Linq.Expressions.Expression checkKeys, System.Data.Entity.Core.Common.Internal.Materialization.CoordinatorFactory[] nestedCoordinators, System.Linq.Expressions.Expression element, System.Linq.Expressions.Expression elementWithErrorHandling, System.Linq.Expressions.Expression initializeCollection, System.Data.Entity.Core.Common.Internal.Materialization.RecordStateFactory[] recordStateFactories) Unknown [Native to Managed Transition] [Managed to Native Transition] mscorlib.dll!System.RuntimeType.CreateInstanceImpl(System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder = {System.DefaultBinder}, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes = null, ref System.Threading.StackCrawlMark stackMark) Unknown mscorlib.dll!System.Activator.CreateInstance(System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes) Unknown mscorlib.dll!System.Activator.CreateInstance(System.Type type, object[] args) Unknown EntityFramework.dll!System.Data.Entity.Core.Common.Internal.Materialization.CoordinatorScratchpad.Compile() Unknown EntityFramework.dll!System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslateColumnMap>(System.Data.Entity.Core.Query.InternalTrees.ColumnMap columnMap, System.Data.Entity.Core.Metadata.Edm.MetadataWorkspace workspace, System.Data.Entity.Core.Objects.Internal.SpanIndex spanIndex, System.Data.Entity.Core.Objects.MergeOption mergeOption = NoTracking, bool streaming = true, bool valueLayer) Unknown [Native to Managed Transition] [Managed to Native Transition] EntityFramework.dll!System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslateColumnMap(System.Data.Entity.Core.Common.Internal.Materialization.Translator translator, System.Type elementType, System.Data.Entity.Core.Query.InternalTrees.ColumnMap columnMap, System.Data.Entity.Core.Metadata.Edm.MetadataWorkspace workspace, System.Data.Entity.Core.Objects.Internal.SpanIndex spanIndex, System.Data.Entity.Core.Objects.MergeOption mergeOption, bool streaming, bool valueLayer) Unknown EntityFramework.dll!System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlanFactory.Prepare(System.Data.Entity.Core.Objects.ObjectContext context, System.Data.Entity.Core.Common.CommandTrees.DbQueryCommandTree tree, System.Type elementType, System.Data.Entity.Core.Objects.MergeOption mergeOption = NoTracking, bool streaming = true, System.Data.Entity.Core.Objects.Span span, System.Collections.Generic.IEnumerable> compiledQueryParameters = null, System.Data.Entity.Core.Common.Utils.AliasGenerator aliasGenerator) Unknown EntityFramework.dll!System.Data.Entity.Core.Objects.ELinq.ELinqQueryState.GetExecutionPlan(System.Data.Entity.Core.Objects.MergeOption? forMergeOption) Unknown EntityFramework.dll!System.Data.Entity.Core.Objects.ObjectQuery>.GetResults.AnonymousMethod__6() Unknown EntityFramework.dll!System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction(System.Func func, System.Data.Entity.Infrastructure.IDbExecutionStrategy executionStrategy, bool startLocalTransaction, bool releaseConnectionOnSuccess = false) Unknown EntityFramework.dll!System.Data.Entity.Core.Objects.ObjectQuery>.GetResults.AnonymousMethod__5() Unknown EntityFramework.SqlServer.dll!System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute>>(System.Func>> operation) Unknown EntityFramework.dll!System.Data.Entity.Core.Objects.ObjectQuery>.GetResults(System.Data.Entity.Core.Objects.MergeOption? forMergeOption) Unknown EntityFramework.dll!System.Data.Entity.Core.Objects.ObjectQuery.System.Collections.Generic.IEnumerable.GetEnumerator.AnonymousMethod__0() Unknown EntityFramework.dll!System.Data.Entity.Internal.LazyEnumerator>.MoveNext() Unknown > MyAssembly.dll!MyAssembly.ResponseStreamer.StreamAsync.AnonymousMethod__0(System.IO.Stream outputStream = {System.Net.Http.PushStreamContent.CompleteTaskOnCloseStream}, System.Net.Http.HttpContent httpContent = {System.Net.Http.PushStreamContent}, System.Net.TransportContext transportContext = null) Line 37 C# ``` " 7959 area-Infrastructure Collection modified during package restore "http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/osx_debug_prtest/72/consoleFull#205152537279494335-f7bd-47d0-8771-8661e00c2db2 > 08:47:54 [08:53:09.86] Restoring all packages... > 08:51:58 EXEC : error : Collection was modified; enumeration operation may not execute. [/Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx_debug_prtest/build.proj] > > 08:51:58 > /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx_debug_prtest/build.proj(80,5): error MSB3073: The command """"/Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx_debug_prtest/Tools/dotnetcli/dotnet"" restore --packages ""/Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx_debug_prtest/packages"" --source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json --source https://www.nuget.org/api/v2/ --infer-runtimes ""/Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx_debug_prtest/src"" ""/Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx_debug_prtest/pkg"""" exited with code -1. " 7962 area-System.Net Ensure CurlHandler properly cleans up resources when finalized Right now resources get cleaned up when a request completes, regardless of whether it's disposed or not. But a) that might artificially delay when the resources are cleaned up, e.g. if a response is dropped without disposing it while there's still lots of data to be downloaded, and b) there are some cases where it might leak until the request times out (default is 60 seconds), e.g. if a response message gets dropped without having read any of its data and without being disposed. 7964 area-System.Net Port to RC2: Fix CurlResponseStream.Dispose to cancel the request We weren't canceling the request when prematurely Dispose'ing the response stream. Because of how asynchronous transfers work, where we need to pause the connection until a reader has requested data, if no reader ever requested data (e.g. the stream was disposed without reading anything) then the connection could remain paused indefinitely, and it would sit around until the HttpClient timeout kicked in and canceled it. This could lead to unbounded growth of the number of sockets being used, as sockets couldn't be pooled or cleaned up due to still being associated with an active download. The fix is simply to cancel the request in Dispose if the request isn't already completed. Port of #7946 7973 area-Infrastructure A small suggestion for making the VS experience in corefx more idiot-proof. "Know all these lines that show up in various .csproj files? ``` ``` Well heck, these are just NOP's - might as well get rid of them, right? Or at least, not worry if they don't line up with the Configurations actually supported by the project (is this library ""Debug"" or ""Windows_Debug""?) **Wrong**. I just found out, the hard way, that the VS IDE looks for these conditionals as a sign that a .csproj ""supports"" a certain configuration. And if the .sln file specifies a certain configuration for your .csproj file and your .csproj file doesn't have this magic line, VS ""helpfully"" ""fixes"" your .sln to use a configuration that the .csproj appears to support (how does it know it picked a good one? Beats me.) And unless you're like me and keep files read-only as long as possible, you'll get no notice that ""Hey! We just applied a fix to _your_ file without knowing what we're doing. But I guess you didn't need to know that."" In the mean time, hitting F6 now yields broken or misleading results and you wonder why you have to commit an .sln file change that you have no understanding of. This seems like boilerplate that could go into dir.props so everyone doesn't have to deal with this. It's fine by me if the boilerplate includes every $(Configuration) name we use repo-wide - I see no value in the VS IDE insisting that the $(Configuration)/Project pairup be approved on both sides like that. " 7975 area-System.Net Change handling of NTLM in WinHttpHandler 7976 area-System.Net Implement SocketAsyncEventArgs.LogBuffer Fixes #7851. 7980 area-System.Linq Interpreter throws wrong exception on irreducible extension expression. Given the likes of: ``` private class IrreducibleWithTypeAndNodeType : Expression { public override Type Type => typeof(void); public override ExpressionType NodeType => ExpressionType.Extension; } ``` The compiler throws `ArgumentException` if compilation is attempted. The interpreter throws `PlatformNotSupportedException`. It should be made to correspond with the compiler. 7983 area-System.Net Add UriTemplate from WCF to .NET Core? The [UriTemplate](https://msdn.microsoft.com/en-us/library/system.uritemplate%28v=vs.110%29.aspx) class looks useful for scenarios with calling HTTP clients, however it is part of System.ServiceModel.dll. Could this type (or a similar one) be moved into the core framework along the `Uri` class to allow it to be used more widely and in .NET Core scenarios? 7987 area-System.ComponentModel Fix System.ComponentModel.TypeConverter package generation Due to implementation requirements for TypeDescriptors, the .NET Standard generation needs to be bumped to 1.5. The packages then broke, and this gives the NET Standard 1.0 surface area to wp8/win8 for S.CM.TypeDescriptor 4.1.0. The generation bump is due to new Reflection surface area (such as UnderlyingType and BindingFlags among others). There are also a many places where non-generic and specialized collections are used (which require 1.3) and in an attempt to get the implementation functional, those have not been replaced with generic versions. @chlowell @ericstj @weshaggard 7991 area-Serialization Certain XmlSerializer constructors are not supported in NetNative The following tests fail in NetNative due the corresponding constructors are not supported on NetNative. ``` XmlSerializerTests.Xml_ConstructorWithXmlRootAttr XmlSerializerTests.Xml_ConstructorWithXmlAttributeOverrides ``` 7992 area-System.IO WIP: Re-enable previously failing FileSystemWatcher tests There are a bunch of FileSystemWatcher tests that are ActiveIssue'd out that aren't failing anymore on my local box (Ubuntu or Windows). It's highly probable some of these are intermittent issues but some of them were also failing from concurrency issues that were resolved in https://github.com/dotnet/corefx/pull/7934. It's not immediately clear which are which, so I'm re-enabling them all and updating this as I determine which are which. progress towards: #1165, #7002, #6732, #6241, #6226, #5306, #4916, #3630, #3215, #2011, #1657 7996 area-System.Reflection Unify decoding PE headers and reading other PE sections PEHeaders are currently decoded using (customized) BinaryReader while the rest of the PE file is read using blob readers. We should use blob readers everywhere to avoid doing things in two different ways. As a by-product reading PE headers from non-zero position in the stream would just work. Currently it's broken. 7999 area-System.Net Remove dead code form WebUtility - We no longer need to check `alwaysCreateNewReturnValue`, as now only `true` is ever passed into the method - We are guaranteed to have a non-empty `_charBuffer`, as the string is never empty, so the `if (_numChars > 0)` is always guaranteed to be true We have tests for `UrlEncodeToBytes_NewArray` already /cc @davidsh @stephentoub @jamesqo 8000 area-System.Net Lots of first chance exception System.ObjectDisposedException on SafeHandle in middleware scenario when request is cancelled We were running some middleware scenario where our ASP.NET site would make outgoing request via HttpClient. The request would be cancelled at any time. In the stress run I saw many first chance C++ exception and then accompanying CLR System.ObjectDisposedException on SafeHandle. Actually the WinHttpRequestState already shows it’s disposed. Although the exception would be populated and handled, it sounds more perf/debug-friendly to avoid it by checking the state object before making the PInvoke calls to native code and throw exception. 0:019> !mk Thread 19: SP IP 00:U 000000ac8b21e590 00007ffcc8398a5c KERNELBASE!RaiseException+0x68 [d:\blue\minkernel\kernelbase\xcpt.c @ 828] 01:U 000000ac8b21e670 00007ffca297670c coreclr!RaiseTheExceptionInternalOnly+0x3a4 [f:\dd\ndp\clr\src\vm\excep.cpp @ 3113] 02:U 000000ac8b21e7a0 00007ffca297a8f6 coreclr!UnwindAndContinueRethrowHelperAfterCatch+0x76 [f:\dd\ndp\clr\src\vm\excep.cpp @ 8747] 03:U 000000ac8b21e7f0 00007ffca2a196a2 coreclr!SafeHandle::DangerousAddRef+0xce [f:\dd\ndp\clr\src\vm\safehandle.cpp @ 415] 04:M 000000ac8b21e970 00007ffca2500ad0 System.StubHelpers.StubHelpers.SafeHandleAddRef(System.Runtime.InteropServices.SafeHandle, Boolean ByRef)(+0x1a IL,+0x20 Native) [f:\dd\ndp\clr\src\mscorlib\src\System\StubHelpers.cs @ 1679,13] 05:M 000000ac8b21e9b0 00007ffc44a1a6bd DomainBoundILStubClass.IL_STUB_PInvoke(SafeWinHttpHandle, IntPtr) 06:U 000000ac8b21e9b8 000000ab6417dff0 CLRStub@000000ab6417dff0 07:M 000000ac8b21e9c0 00007ffca2499efe System.Threading.TimerQueueTimer.Close()(+0x6e Native) [f:\dd\ndp\clr\src\mscorlib\src\System\Threading\Timer.cs @ 599,9] 08:M 000000ac8b21ea80 00007ffc44a1a5d2 System.Net.Http.WinHttpHandler.InternalReceiveResponseHeadersAsync(System.Net.Http.WinHttpRequestState)(+0xe2 Native) [f:\dd\ndp\fxcore\Open\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs @ 1361,13] 09:M 000000ac8b21eae0 00007ffc44a07ca0 System.Net.Http.WinHttpHandler+d__102.MoveNext()(+0x40a IL,+0x7d0 Native) [f:\dd\ndp\fxcore\Open\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs @ 849,25] 0a:M 000000ac8b21ebf0 00007ffca2431903 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)(+0x15 IL,+0x83 Native) [f:\dd\ndp\clr\src\mscorlib\src\System\Threading\ExecutionContext.cs @ 93,17] 0b:M 000000ac8b21ec60 00007ffca249a5c1 System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()(+0x24 IL,+0x91 Native) [f:\dd\ndp\clr\src\mscorlib\src\System\Runtime\CompilerServices\AsyncMethodBuilder.cs @ 1071,25] 0c:M 000000ac8b21ecb0 00007ffca2497627 System.Threading.ThreadPoolWorkQueue.Dispatch()(+0xa4 IL,+0x1c7 Native) [f:\dd\ndp\clr\src\mscorlib\src\System\Threading\ThreadPool.cs @ 815,29] 0d:U 000000ac8b21ed50 00007ffca2cf2503 coreclr!CallDescrWorkerInternal+0x83 [f:\dd\ndp\clr\src\vm\amd64\CallDescrWorkerAMD64.asm @ 101] 0e:U 000000ac8b21ed90 00007ffca299b907 coreclr!MethodDescCallSite::CallTargetWorker+0x20f [f:\dd\ndp\clr\src\vm\callhelpers.cpp @ 653] 0f:U 000000ac8b21eea0 00007ffca2aebc96 coreclr!QueueUserWorkItemManagedCallback+0x2a [f:\dd\ndp\clr\src\vm\comthreadpool.cpp @ 510] 10:U 000000ac8b21ef90 00007ffca2957921 coreclr!ManagedThreadBase_DispatchMiddle+0x89 [f:\dd\ndp\clr\src\vm\threads.cpp @ 10144] 11:U 000000ac8b21f0f0 00007ffca2957c6c coreclr!ManagedThreadBase_DispatchOuter+0xb4 [f:\dd\ndp\clr\src\vm\threads.cpp @ 10399] 12:U 000000ac8b21f1a0 00007ffca2957d06 coreclr!ManagedThreadBase::ThreadPool+0x32 [f:\dd\ndp\clr\src\vm\threads.cpp @ 10505] 13:U 000000ac8b21f200 00007ffca2a7be50 coreclr!ManagedPerAppDomainTPCount::DispatchWorkItem+0xe4 [f:\dd\ndp\clr\src\vm\threadpoolrequest.cpp @ 760] 14:U 000000ac8b21f350 00007ffca2a7523a coreclr!ThreadpoolMgr::ExecuteWorkRequest+0x13a [f:\dd\ndp\clr\src\vm\win32threadpool.cpp @ 1891] 15:U 000000ac8b21f3a0 00007ffca2a75d25 coreclr!ThreadpoolMgr::WorkerThreadStart+0x4cd [f:\dd\ndp\clr\src\vm\win32threadpool.cpp @ 2361] 16:U 000000ac8b21f440 00007ffca295243c coreclr!Thread::intermediateThreadProc+0x80 [f:\dd\ndp\clr\src\vm\threads.cpp @ 2859] 17:U 000000ac8b21fe80 00007ffcca3413d2 kernel32!BaseThreadInitThunk+0x22 [d:\9147\base\win32\client\thread.c @ 78] 18:U 000000ac8b21feb0 00007ffccafa54e4 ntdll!RtlUserThreadStart+0x34 [d:\blue\minkernel\ntdll\rtlstrt.c @ 1026] 0:019> !mdt 000000ab630f2738 000000ab630f2738 (System.Net.Http.WinHttpRequestState) _lock:000000ab630f2810 (System.Object) _operationHandle:(System.Runtime.InteropServices.GCHandle) VALTYPE (MT=00007ffca2748ef0, ADDR=000000ab630f27e0) _disposed:true (System.Boolean) k__BackingField:000000ab630f26d0 (System.Threading.Tasks.TaskCompletionSource`1[[System.Net.Http.HttpResponseMessage, System.Net.Http]]) k__BackingField:(System.Threading.CancellationToken) VALTYPE (MT=00007ffca2754758, ADDR=000000ab630f27e8) k__BackingField:000000ab630f22d0 (System.Net.Http.HttpRequestMessage) k__BackingField:000000ab630f19e0 (System.Net.Http.WinHttpHandler) k__BackingField:000000ab6417d920 (Interop+WinHttp+SafeWinHttpHandle) k__BackingField:NULL (System.Exception) k__BackingField:false (System.Boolean) … 000000ac8b21f120 0:019> !mdt 000000ab6417d920 000000ab6417d920 (Interop+WinHttp+SafeWinHttpHandle) handle:000000ac8a3f7200 (System.IntPtr) _state:0x3 (System.Int32) _ownsHandle:true (System.Boolean) _fullyInitialized:true (System.Boolean) _parentHandle:NULL (Interop+WinHttp+SafeWinHttpHandle) 8001 area-System.Linq Missing exception type on xml docs for SingleOrDefault(src, predicate) `public static TSource SingleOrDefault(this IEnumerable source);` has the doc for all exceptions. `public static TSource SingleOrDefault(this IEnumerable source, Func predicate);` looks like it's missing the invalid operation one. ```c# // ..... // Exceptions: // T:System.ArgumentNullException: // source is null. // // T:System.InvalidOperationException: // The input sequence contains more than one element. public static TSource SingleOrDefault(this IEnumerable source); // ..... // Exceptions: // T:System.ArgumentNullException: // source or predicate is null. public static TSource SingleOrDefault(this IEnumerable source, Func predicate); ``` 8003 area-System.Net Add support for all OperationStatus values on Linux I found some documentation on this (now linked from the source). Also, this appears to be how Mono does it. Fixes #7889. @stephentoub @CIPop 8004 area-System.Reflection BlobReader should expose Pointer, Seek, Skip, Align. I was working on pushing down forward-only IL decoding out of IL -> IOperation prototype (but still in separate assembly from SRM for now) and found that BlobReader hides some things (kept internal) that are of general use. Given a BlobReader, I should be able to drop down to pointers/unsafe myself and I should also be able to skip around without resorting to copying a previous BlobReader instance at a previous position which has a bunch of fields (I think we can cut those down, but still, seek should be as cheap as possible). 8005 area-System.Net Add tests for HtmlDecode and HtmlEncode to WebUtility - Valid encoding - Invalid encoding - Unecessary encoding - No encoding needed - High BMP chars - Surrogate pairs - Chars in range 160-255 /cc @davidsh @stephentoub @jamesqo 8006 area-System.Net Add several HttpClient mini-stress tests Several outerloop tests that verify HttpClient doesn't completely fall over under some load: - Use one HttpClient instance to make many requests serially and in parallel - Use multiple HttpClient instances to make many requests serially and in parallel - Ensure that HttpResponseMessages can be GCd even if the associated response hasn't been fully drained. This one fails right now on unix due to an open issue. cc: @davidsh, @ericeil 8012 area-System.IO [CoreRT] Behavior mismatch between CoreCLR and CoreRT Streams in async methods **TL;DR** This will throw a `TaskCanceledException` in CoreCLR, while it will throw a `OperationCanceledException` in CoreRT: ``` cs await Stream.Null.FlushAsync(new CancellationToken(true)); ``` --- Recently noticed that several async methods in `Stream` and `MemoryStream` have differing implementations when it comes to cancellation tokens in the CoreCLR/CoreFX repos. For example, [here](https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/IO/Stream.cs#L894) is the source code of `NullStream.FlushAsync` in CoreCLR, and [here](https://github.com/dotnet/corefx/blob/master/src/System.IO/src/System/IO/Stream.cs#L412) it is in CoreFX. Attempting to await the previous results in a `TaskCanceledException`, and the latter an `OperationCanceledException`. The fix would be to remove the `ThrowIfCancellationRequested` calls (along with all of the `pragmas`) and replace them with an `IsCancellationRequested` - `Task.FromCanceled` pattern. @stephentoub, do you know of any reason why the behaviors should differ? If not then I can submit a PR (along with tests) to fix this. 8013 area-System.Net SocketException improvements - Move all instantiation of InternalSocketException into SocketExceptionFactory. Rename InternalSocketException to ExtendedSocketException, and encapsulate it in SocketExceptionFactory to prevent a proliferation of dependencies on this type. - Add support for adding an EndPoint to the exception message in ExtendedSocketException (fixes #7873). - Remove the TODOs around #7853. I don't believe it's worth complicating the public contracts just in case someone does an exact type equality comparison on a SocketException. (Fixes #7853) 8023 area-System.IO FileSystemWatcher_Deleted_FileDeletedInNestedDirectory failed on Ubuntu in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_release_prtest/279/consoleText ``` System.IO.Tests.DeletedTests.FileSystemWatcher_Deleted_FileDeletedInNestedDirectory [FAIL] Didn't observe a deleted event within 30000ms Expected: True Actual: False Stack Trace: Discovering: System.Net.Ping.Functional.Tests at System.IO.Tests.FileSystemWatcherTest.ExpectEvent(WaitHandle eventOccurred, String eventName, Int32 timeout) at System.IO.Tests.DeletedTests.FileSystemWatcher_Deleted_FileDeletedInNestedDirectory() ``` 8024 area-System.IO Two MoveFileTests failing on Windows OuterLoop > System.IO.Tests.MoveFileTests.Windows_File_Move_To_Different_Directory_Triggers_Event(eventType: Deleted, moveRaisesEvent: False) > System.IO.Tests.MoveFileTests.Windows_File_Move_To_Different_Directory_Triggers_Event(eventType: Renamed, moveRaisesEvent: True) http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_windows_nt_release_prtest/1/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_windows_nt_debug_prtest/3/ 8028 area-System.Globalization System.Globalization.Tests fails on NetBSD "``` System.Globalization.Tests.NumberFormatInfoNumberGroupSizes.NumberGroupSizes_Get(format: NumberFormatInfo { CurrencyDecimalDigits = 2, CurrencyDecimalSeparator = ""."", CurrencyGroupSeparator = "","", CurrencyGroupSizes = [3, 2], CurrencyNegativePattern = 9, ... }, expected: [3, 2]) [FAIL] Assert.Equal() Failure Expected: Int32[] [3, 2] Actual: Int32[] [3] Stack Trace: at System.Globalization.Tests.NumberFormatInfoNumberGroupSizes.NumberGroupSizes_Get(NumberFormatInfo format, Int32[] expected) ``` " 8031 area-System.IO Disable failing FSW tests Disables a few failing tests that are dirtying up the CI. Tests will be permanently fixed as a part of #7992. related to #8023, #8024. @stephentoub 8032 area-System.Console "TermInfo.cs test fail for TERM=""xterm""" "There are entries for ""xterm-256color"", but not for ""xterm"". I don't understand offhand these magic values: ``` [Theory] [PlatformSpecific(PlatformID.AnyUnix)] [InlineData(""xterm-256color"", ""\u001B\u005B\u00330m"", ""\u001B\u005B\u00340m"", 0)] [InlineData(""xterm-256color"", ""\u001B\u005B\u00331m"", ""\u001B\u005B\u00341m"", 1)] [InlineData(""xterm-256color"", ""\u001B\u005B90m"", ""\u001B\u005B100m"", 8)] [InlineData(""screen"", ""\u001B\u005B\u00330m"", ""\u001B\u005B\u00340m"", 0)] [InlineData(""screen"", ""\u001B\u005B\u00332m"", ""\u001B\u005B\u00342m"", 2)] [InlineData(""screen"", ""\u001B\u005B\u00339m"", ""\u001B\u005B\u00349m"", 9)] [InlineData(""Eterm"", ""\u001B\u005B\u00330m"", ""\u001B\u005B\u00340m"", 0)] [InlineData(""Eterm"", ""\u001B\u005B\u00333m"", ""\u001B\u005B\u00343m"", 3)] [InlineData(""Eterm"", ""\u001B\u005B\u003310m"", ""\u001B\u005B\u003410m"", 10)] [InlineData(""wsvt25"", ""\u001B\u005B\u00330m"", ""\u001B\u005B\u00340m"", 0)] [InlineData(""wsvt25"", ""\u001B\u005B\u00334m"", ""\u001B\u005B\u00344m"", 4)] [InlineData(""wsvt25"", ""\u001B\u005B\u003311m"", ""\u001B\u005B\u003411m"", 11)] [InlineData(""mach-color"", ""\u001B\u005B\u00330m"", ""\u001B\u005B\u00340m"", 0)] [InlineData(""mach-color"", ""\u001B\u005B\u00335m"", ""\u001B\u005B\u00345m"", 5)] [InlineData(""mach-color"", ""\u001B\u005B\u003312m"", ""\u001B\u005B\u003412m"", 12)] public void TermInfoVerification(string termToTest, string expectedForeground, string expectedBackground, int colorValue) { ``` I was told that they differ between implementations.. NetBSD (I think) keeps the original curses(3) library still maintained, but I think I can try to use ncurses database for now. Do you know what values would be added for ""xterm""? " 8034 area-System.Numerics Adding a HashCode type to help with combining hash codes Replacing the long discussion with 200+ comments with **new issue #14354** This issue is **CLOSED!!!** ------------------------------------------------------ ### Motivation Java has `Objects.hash` for quickly combining the hash codes of constituent fields to return in `Object.hashCode()`. Unfortunately, .NET has no such equivalent and developers are forced to roll their own hashes like [this](http://stackoverflow.com/a/263416/4077294): ``` cs public override int GetHashCode() { unchecked { int result = 17; result = result * 23 + field1.GetHashCode(); result = result * 23 + field2.GetHashCode(); return result; } } ``` [Sometimes](https://msdn.microsoft.com/en-us/library/system.object.gethashcode.aspx) people even resort to using `Tuple.Create(field1, field2, ...).GetHashCode()` for this, which is bad (obviously) since it allocates. ### Proposal - List of changes in current proposal (against last approved version https://github.com/dotnet/corefx/issues/8034#issuecomment-262331783): - `Empty` property added (as natural starting point analogous to `ImmutableArray`) - Argument names updated: `hash`->`hashCode`, `obj` -> `item` ```cs namespace System { public struct HashCode : IEquatable { public HashCode(); public static HashCode Empty { get; } public static HashCode Create(int hashCode); public static HashCode Create(T item); public static HashCode Create(T item, IEqualityComparer comparer); public HashCode Combine(int hashCode); public HashCode Combine(T item); public HashCode Combine(T item, IEqualityComparer comparer); public int Value { get; } public static implicit operator int(HashCode hashCode); public static bool operator ==(HashCode left, HashCode right); public static bool operator !=(HashCode left, HashCode right); public bool Equals(HashCode other); public override bool Equals(object obj); public override int GetHashCode(); public override string ToString(); } } ``` Usage: ```c# int hashCode1 = HashCode.Create(f1).Combine(f2).Value; int hashCode2 = hashes.Aggregate(HashCode.Empty, (seed, hash) => seed.Combine(hash)); var hashCode3 = HashCode.Empty; foreach (int hash in hashes) { hashCode3 = hashCode3.Combine(hash); } (int)hashCode3; ``` ### Notes Implementation should use algorithm in [`HashHelpers`](https://github.com/dotnet/corefx/blob/master/src/Common/src/System/Numerics/Hashing/HashHelpers.cs#L9). 8036 area-System.Linq Allow ListInitExpression to have zero initializers Akin to #1877 allowing zero case blocks in a `SwitchExpression` and #3043 allowing empty `BlockExpression`s, it seems reasonable to allow `ListInitExpression`s to have zero elements. All the more so considering that `MemberListBinding`s allow them, and it requires no action beyond removing the explicit prohibition. 8043 area-System.Runtime Is Marshal.SizeOf(Type) supposed to be obsolete? "When using Marshal.SizeOf(Type), this gives a warning: ""'Marshal.SizeOf(Type)' is obsolete"" Does this make sense? What's the rationale? What is the alternative? cc @mellinoe " 8048 area-Infrastructure The default debug action for *.Tests projects should disable xunit parallelism. "I see no advantage to having multiple tests running in multiple threads firing off breakpoints when I'm trying to debug a test. tools\test.targets already nicely adds the ""-wait"" argument by default so the console doesn't disappear on you. `$(TestArguments) -wait ` The argument ""-parallel none"" would be a great companion to the ""-wait"" argument. xunit.console.netcore.exe doesn't care if you specify ""-parallel"" multiple times so this should be safe. " 8050 area-System.ComponentModel Remove explicit reference to System.ComponentModel.Primitives project when dev/typedescriptor is merged to master The updated System.ComponentModel.TypeConverter utilizes new attributes in the S.CM.Primitives assembly, but the reference assembly has not been updated with that surface area. For now, there is an explicit reference. Once the branch gets merged and built, the reference assembly will be available and can be referenced instead of explicitly referencing the project file. 8053 area-Infrastructure Build fails on Ubuntu with missing corerun error I was successfully able to do a native build on Ubuntu Linux, but when attempting to do a `./build.sh managed` I received the following error: > `./build.sh: line 129: /var/lib/corefx/Tools/corerun: No such file or directory` And looking at the Tools dir, I don't see `corerun` there. Below are the contents of this directory: ``` drwxr-x--- 4 root root 4096 Apr 25 11:48 . drwxr-xr-x 10 root root 4096 Apr 25 12:05 .. drwxr-xr-x 2 root root 4096 Apr 25 11:48 1.0.25-prerelease-00321-01 drwxr-xr-x 4 1001 sudo 4096 Apr 21 13:47 dotnetcli ``` Here is my build of Ubuntu: ``` Distributor ID: Ubuntu Description: Ubuntu 14.04.4 LTS Release: 14.04 Codename: trusty ``` Is there something I'm missing or should have done? I have followed the *nix build instructions line by line! Thank you in advance! 8054 area-System.Linq Misleading error message on exception for expression delegate type. The error message for a lamda expression of an invalid type is: > Lambda type parameter must be derived from System.Delegate In fact it must be derived from `System.MulticastDelegate`, `System.MulticastDelegate` itself is not allowed, though it is derived from `System.Delegate`. 8059 area-System.IO FileSystem Watcher: Consider polling API There is a prototype for a [Polling FileSystem Watcher in CoreFXLab](https://github.com/dotnet/corefxlab/tree/master/src/System.IO.FileSystem.Watcher.Polling) that we should look into bringing to CoreFX as an alternative to our current implementation. ### Some benefits of polling: - Works on all systems for network drives - Completely reliable - no event buffer overflow causing dropped/failed events - Avoids system resource limitations e.g. inotify max user instances - Consistency is generally achieved (or attempted) with the existing FSW by greatly increasing the size of internal event buffer. The downside of this is that it is using memory that won't be paged out and the max size is 64kb. Polling avoids this issue. ### Some downsides: - Doesn't scale well to very large directories e.g. an entire drive. - Generally considered to be less performant than the OS's watching APIs (though there are some factors that affect this like buffer size, watched directory size, and polling frequency). #### Bringing it to CoreFX There would be a few ways to bring the Polling FSW into CoreFX that we can consider: 1. Bring it in its own library System.IO.FileSystem.Watcher.Polling that is completely separate from the existing FSW 2. Put it into System.IO.FileSystem.Watcher but have it be its own separate class 3. Merge the implementation into the existing FSW and provide a bool constructor overload (e.g. `bool poll = false`) that allows specification of which implementation to use 4. Merge the implementation into the existing FSW and try to programatically determine which implementation to use. We could base our decision on the initial number of entries in the watched directory, for example. 5. Merge the implementation into the existing FSW and use both in unison. Use the OS's API's but also poll every now and then to catch things that the OS's FSW may have missed. 6. Replace our existing implementation with a polling implementation ### Examples of demand for a polling FSW: - https://github.com/dotnet/corefx/issues/7576 - http://stackoverflow.com/questions/239988/filesystemwatcher-vs-polling-to-watch-for-file-changes/240008#240008 - http://stackoverflow.com/questions/3612311/monitoring-a-directory-for-new-file-creation-without-filesystemwatcher/3612432#3612432 @KrzysztofCwalina @stephentoub @sokket @joshfree @chcosta 8061 area-System.Net Timeout_SetTo60AndGetResponseFromServerWhichTakes40_Success failed on Windows The handle is invalid http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_win10_debug/12/consoleText ``` System.Net.Http.Functional.Tests.HttpClientTest.Timeout_SetTo60AndGetResponseFromServerWhichTakes40_Success [FAIL] System.Net.Http.HttpRequestException : An error occurred while sending the request. ---- System.Net.Http.WinHttpException : The handle is invalid Stack Trace: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() d:\j\workspace\outerloop_win---097a300f\src\System.Net.Http\src\System\Net\Http\HttpClient.cs(392,0): at System.Net.Http.HttpClient.d__58.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() d:\j\workspace\outerloop_win---097a300f\src\System.Net.Http\tests\FunctionalTests\HttpClientTest.cs(389,0): at System.Net.Http.Functional.Tests.HttpClientTest.Timeout_SetTo60AndGetResponseFromServerWhichTakes40_Success() ----- Inner Stack Trace ----- d:\j\workspace\outerloop_win---097a300f\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs(1360,0): at System.Net.Http.WinHttpHandler.InternalReceiveResponseHeadersAsync(WinHttpRequestState state) d:\j\workspace\outerloop_win---097a300f\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs(850,0): at System.Net.Http.WinHttpHandler.d__102.MoveNext() ``` 8063 area-System.Net Fixed typo in GetHostAddressesAsync test for Dns class Fixed typo in GetHostAddressesAsync() test. 8064 area-Serialization System.Xml.XmlSerializer Perf tests failing @khdang when I run `msbuild /t:BuildAndTest src\System.Xml.XmlSerializer\tests\System.Xml.XmlSerializer.Tests.csproj /p:Performance=true` there seem to be some exceptions being thrown `System.Xml.XmlSerializer.Tests.Performance.XsPerformanceTest.XsSerializationTest(numberOfRuns: 1000, testType: Dictionary, testSize: 128) [FAIL] System.NotSupportedException : The type System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, mscorlib, Version=4.0.0.0, Culture=neutr al, PublicKeyToken=7cec85d7bea7798e]] is not supported because it implements IDictionary.` Could you take a look and fix this 8065 area-System.Collections Fix ListDictionary.CopyTo throwing IndexOutOfRangeException - Now works as expected according to MSDN docs - Found in #7997, and caused inconsistencies in HybridDictionary behaviour at different lengths I got the impression that we should not throw an exception if count == 0, let me know if this is incorrect. /cc @ianhays 8066 area-System.Net OSX System.Net.NetworkInformation.Functional.Tests timeout in CI "http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/osx_debug_prtest/263/console > 08:53:21 Discovering: System.Net.NetworkInformation.Functional.Tests > 08:53:21 Discovered: System.Net.NetworkInformation.Functional.Tests > 08:53:21 Starting: System.Net.NetworkInformation.Functional.Tests > 08:53:21 System.Xml.XDocument.xNodeBuilder.Tests -> /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx_debug_prtest/bin/AnyOS.AnyCPU.Debug/System.Xml.XDocument.xNodeBuilder.Tests/System.Xml.XDocument.xNodeBuilder.Tests.dll > 10:22:33 > Build timed out (after 120 minutes). Marking the build as aborted. > 10:22:39 > Build was aborted > 10:22:39 [xUnit] [INFO] - Starting to record. > 10:22:39 [xUnit] [INFO] - Processing xUnit.Net-v2 (default) > 10:22:39 > MSBUILD : error MSB4166: Child node ""3"" exited prematurely. Shutting down. Diagnostic information may be found in files in the temporary files directory named MSBuild_*.failure.txt. > 10:22:39 /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx_debug_prtest/Tools/tests.targets(145,5): warning MSB5021: ""sh"" and its child processes are being terminated in order to cancel the build. [/Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx_debug_prtest/src/System.Net.NetworkInformation/tests/FunctionalTests/System.Net.NetworkInformation.Functional.Tests.csproj] " 8067 area-System.Linq ProjectReference -> Package Dependency: Disabled System.Linq.Expressions from package dependency build System.Linq.Expressions does not build when project references are converted to package dependencies due to > Catalog\ExpressionCatalog.RuntimeVariables.cs(34,39): error CS0246: The type or namespace name 'IRuntimeVariables' could not be found (are you missing a using directive or an assembly reference?) [D:\A_work\8\s\src\System.Linq.Expressions\tests See PR #7998 8070 area-Infrastructure Can't open VS project due to missing files "corefx-master\corefx-master\src\System.IO.FileSystem.DriveInfo\src\System.IO.FileSystem.DriveInfo.csproj : error : The imported project ""\corefx-master\corefx-master\Tools\BuildVersion.targets"" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. \corefx-master\corefx-master\dir.props Where are these files? " 8074 area-System.Linq Lamda expressions can have pointer types with high arity but not with low. The following works: ``` C# Expression.Lambda( Expression.Constant(3L), Enumerable.Range(0, 20).Select(_ => Expression.Variable(typeof(int).MakePointerType())) ); ``` However, the following does not: ``` C# Expression.Lambda( Expression.Constant(3L), Enumerable.Range(0, 2).Select(_ => Expression.Variable(typeof(int).MakePointerType())) ); ``` The difference being whether the arity is higher than the highest-arity `Func<>` delegate or not. Neither are likely to be useful, as pointer types hit snags elsewhere, but if the former is allowed, then so should be the latter. 8077 area-System.Text How do i get an spesified encoding like this. "Encoding enc = Encoding.GetEncoding(""gbk""); ↓↓↓↓↓↓↓↓↓↓ Exception: 'gbk' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. Parameter name: name can anyone give a solution,please. " 8081 area-System.Linq Expressions can be typed as open generic types The likes of `Expression.Default(typeof(List<>))`, `Expression.Constant(null, typeof(Dictionary<,>))` and some other expressions (though often other rules will get in the way) are allowed. Since these represent a value of an open generic type, they aren't really meaningful. They can have a value of null which can be used as long as it is converted to `object` and both compilation types accept `Expression.Lambda>(Expression.Default(typeof(List<>)))` as an expression that can be compiled into a delegate that returns null. While they can be pressed into service, it seems more appropriate to prohibit them. Factory methods that have at least one overload that takes `Type` arguments directly. Will check these off when they're either found to already prohibit such types, or fixed to do so (PRs just adding tests of already-correct behaviour marked immediately, PRs fixing behaviour upon acceptance): - [x] `Block` (entailed in check that type is reference-assignable from type of last child expression). - [x] `Break` - [x] `Call` #17333 - [x] `Catch` - [x] `Condition` - [x] `Constant` - [x] `Continue` - [x] `Convert` - [x] `ConvertChecked` - [x] `Default` - [x] `Dynamic` (Entailed in check that arguments match delegate method). - [x] `Field` #16231 - [x] `GetActionType` (Exception: Has practical use here) - [x] `GetDelegateType` (Exception: Has practical use here) - [x] `GetFuncType` (Exception: Has practical use here) - [x] `Goto` - [x] `Label` #16140 - [x] `Lambda` #16233 - [x] `MakeCatchBlock` - [x] `MakeDynamic` (Entailed in check that arguments match delegate method). - [x] `MakeGoto` - [x] `MakeTry` (entailed by check that type is void or that body and catch types are reference-assignable) - [x] `MakeUnary` Waiting on #16141 - [x] `New` - [x] `NewArrayBounds` - [x] `NewArrayInit` - [x] `Parameter` (byref types allowed) - [x] `Property` #16231 - [x] `Rethrow` #16141 - [x] `Return` - [x] `Switch` (Entailed by check that type is void or default and case types are reference-assignable) - [x] `Throw` #16141 - [x] `TryGetActionType` (Exception: Has practical use here) - [x] `TryGetFuncType` (Exception: Has practical use here) - [x] `TypeAs` - [x] `TypeEqual` #16150 (pointer types allowed; always results in `false`) - [x] `TypeIs` #16150 (pointer types allowed; always results in `false`) - [x] `Unbox` #16186 - [x] `Variable` Also the following have overrides that take `MemberInfo`, which could be generic and/or be related to an open generic type. Most will block this with restrictions they place on those `MemberInfo` arguments relating to other types, but they need to be checked. - [x] `Add` #16142 - [x] `AddAsign` #16142 - [x] `AddAsignChecked` #16142 - [x] `AddChecked` #16142 - [x] `And` #16142 - [x] `AndAlso` #16142 - [x] `AndAssign` #16142 - [ ] `Bind` #18610 - [x] `Call` - [x] `Convert` #16437 - [x] `ConvertChecked` #16437 - [x] `Decrement` #16437 - [x] `Divide` #16142 - [x] `DivideAssign` #16142 - [x] `ElementInit` - [x] `Equal` #16142 - [x] `ExclusiveOr` #16142 - [x] `ExclusiveOrAssign` #16142 - [x] `Field` #16231 - [x] `GreaterThan` #16142 - [x] `GreaterThanOrEqual` #16142 - [x] `Increment` #16437 - [x] `IsFalse` #16437 - [x] `IsTrue` #16437 - [x] `LeftShift` #16142 - [x] `LeftShiftAssign` #16142 - [x] `LessThan` #16142 - [x] `LessThanOrEqual` #16142 - [x] `ListBind` #18011 - [x] `ListInit` #16624 - [x] `MakeBinary` #16142 - [x] `MakeIndex` - [x] `MakeMemberAccess` - [x] `MakeUnary` #16437 - [x] `MemberBind` (Covered by validation added in #18011 but also entailed by need of type to match). - [x] `Modulo` #16142 - [x] `ModuloAssign` #16142 - [x] `Multiply` #16142 - [x] `MultiplyAssign` #16142 - [x] `MultiplyAssignChecked` #16142 - [x] `MultiplyChecked` #16142 - [x] `Negate` #16437 - [x] `NegateChecked` #16437 - [x] `New` - [x] `Not` #16437 - [x] `NotEqual` #16142 - [x] `OnesComplement` #16437 - [x] `Or` #16142 - [x] `OrAssign` #16142 - [x] `OrElse` #16142 - [x] `PostDecrementAssign` #16437 - [x] `PostIncrementAssign` #16437 - [x] `Power` #16142 - [x] `PowerAssign` #16142 - [x] `PreDecrementAssign` #16437 - [x] `PreIncrementAssign` #16437 - [x] `Property` #16231 - [x] `RightShift` #16142 - [x] `RightShiftAssign` #16142 - [x] `Subtract` #16142 - [x] `SubtractAssign` #16142 - [x] `SubtractAssignChecked` #16142 - [x] `SubtractChecked` #16142 - [x] `Switch` #16344 - [x] `UnaryPlus` #16437 8082 area-System.Net Enable finalization of resources in CurlHandler This change is primarily about enabling abandoned requests to be cleaned up. Today, if you make a ResponseHeadersRead request on an HttpClient and then drop it without disposing it, the associated state will end up being leaked into the HttpClient until either the HttpClient is disposed or until the request times out, which by default is 60 seconds but could have been extended to never. This change enables such requests to be finalized. See the detailed comment in CurlHandler.cs for a description of the approach taken. Fixes #7962 cc: @ericeil, @bartonjs, @davidsh, @kapilash 8084 area-System.Linq Extension expressions with custom node types throws unreachable exception. "Considering the likes of: ``` C# private class ReducesFromStrangeNodeType : Expression { public override Type Type => typeof(int); public override ExpressionType NodeType => (ExpressionType)(-1); public override bool CanReduce => true; public override Expression Reduce() => Constant(3); } ``` Attempting to compile will throw a reasonable `PlatformNotSupportedException` on the interpreter, but an unreachable error (assertion failure in debug, IOE with the text ""Code supposed to be unreachable"" in release) on the interpreter. At the very least the code clearly isn't unreachable when it's just been reached. Having the compiler match the interpreter would be reasonable enough, but having both call `ReduceAndCheck()` and acting on the results is probably better still; in the worse case there's a better exception than saying the code isn't reachable, and if the node is reducible, we can compile it. " 8086 area-System.Data System.Net.Internals.InternalSocketException on OSX/Linux (Debian) "Hi guys, I have been struggling with this error for a few days, on an asp.net core application. I've created a simpler application that just does a select query, and while it works fine in Windows, it doesn't work on both OS X and Linux (under docker with a debian image). Although the Exception is the same on both environments, the message is slightly different: OS X: Environment details:
 Unhandled Exception: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 35 - An internal exception was caught) ---> System.AggregateException: One or more errors occurred. (Device not configured) --->  System.Net.Internals.InternalSocketException: Device not configured    at System.Net.Dns.HostResolutionEndHelper(IAsyncResult asyncResult)    at System.Net.Dns.EndGetHostAddresses(IAsyncResult asyncResult)    at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown ---    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    at System.Data.SqlClient.SNI.SNITCPHandle.d__22.MoveNext()    --- End of inner exception stack trace ---    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)    at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)    at System.Threading.Tasks.Task.Wait(TimeSpan timeout)    at System.Data.SqlClient.SNI.SNITCPHandle..ctor(String serverName, Int32 port, Int64 timerExpire, Object callbackObject, Boolean parallel)    --- End of inner exception stack trace ---    at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling)    at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)    at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)    at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)    at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)    at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)    at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)    at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)    at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)    at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)    at System.Data.SqlClient.SqlConnection.Open()    at SqlClientTest.Program.Main(String[] args) 
The message on Linux:
 Unhandled Exception: System.Data.SqlClient.SqlException: A network-related or in stance-specific error occurred while establishing a connection to SQL Server. Th e server was not found or was not accessible. Verify that the instance name is c orrect and that SQL Server is configured to allow remote connections. (provider:  TCP Provider, error: 35 - An internal exception was caught) ---> System.Aggrega teException: One or more errors occurred. (No such device or address) --->  Syste m.Net.Internals.InternalSocketException: No such device or address    at System.Net.Dns.HostResolutionEndHelper(IAsyncResult asyncResult)    at System.Net.Dns.EndGetHostAddresses(IAsyncResult asyncResult)    at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchron ization) --- End of stack trace from previous location where exception was thrown ---    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot ification(Task task)    at System.Data.SqlClient.SNI.SNITCPHandle.d__22.MoveNext()    --- End of inner exception stack trace ---    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceled Exceptions)    at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationTo ken cancellationToken)    at System.Threading.Tasks.Task.Wait(TimeSpan timeout)    at System.Data.SqlClient.SNI.SNITCPHandle..ctor(String serverName, Int32 port , Int64 timerExpire, Object callbackObject, Boolean parallel)    --- End of inner exception stack trace ---    at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdent ity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolea n redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData  reconnectSessionData, Boolean applyTransientFaultHandling)    at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOp tions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConn ectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)    at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConn ectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConne ctionPoolKey poolKey, DbConnectionOptions userOptions)    at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owning Object, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)    at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection o wningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection )    at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection ow ningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean o nlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& co nnection)    at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection ow ningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbCon nectionInternal& connection)    at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection  owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions , DbConnectionInternal oldConnection, DbConnectionInternal& connection)    at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(Db Connection outerConnection, DbConnectionFactory connectionFactory, TaskCompletio nSource`1 retry, DbConnectionOptions userOptions)    at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)    at System.Data.SqlClient.SqlConnection.Open()    at SqlClientTest.Program.Main(String[] args) 
Environment settings: - dotnet cli version : 1.0.0-rc2-002422 - nuget feed: https://www.myget.org/F/aspnetvnext - database version: Sql Server 2012 SP1 (11.00.3412) The application is just this Program.cs ``` using System; using System.Data.SqlClient; using System.Collections.Generic; namespace SqlClientTest { public static class Program { public static void Main(string[] args) { string connectionString = ""Data Source=[OUR_DB_SERVER_IP]\\MASTER;Initial Catalog=[OUR_DB_NAME];MultipleActiveResultSets=False;User Id=[USER_ID]; Password=[OUR_PASSWORD];""; string sql = ""select TOP 10 id, vestigingNummer, kantoorNaam1 from NVM_Vestiging where idIsActive = 1""; List makelaars = new List(); using (var conn = new SqlConnection(connectionString)) { conn.Open(); using (var command = new SqlCommand(sql, conn)) { var reader = command.ExecuteReader(); while (reader.Read()) { int id = reader.GetInt32(0); int vestigingNummer = reader.GetInt32(1); string kantoorNaam = reader.GetString(2); makelaars.Add(new Makelaar(id, vestigingNummer, kantoorNaam)); } } } foreach (var makelaar in makelaars) { Console.WriteLine($""{makelaar.VestigingNummer}: {makelaar.KantoorNaam}""); } } } public class Makelaar { public Makelaar(int id, int vestigingNummer, string kantoorNaam) { Id = id; VestigingNummer = vestigingNummer; KantoorNaam = kantoorNaam; } public int Id { get; set; } public int VestigingNummer { get; set; } public string KantoorNaam { get; set; } } } ``` and the project.json: ``` { ""version"": ""1.0.0-*"", ""compilationOptions"": { ""emitEntryPoint"": true }, ""dependencies"": { ""Microsoft.NETCore.App"": { ""type"": ""platform"", ""version"": ""1.0.0-rc2-*"" }, ""System.Runtime"": ""4.0.0-rc2-24018"", ""System.Data.SqlClient"": ""4.1.0-rc2-24018"", ""System.Collections"":""4.0.0-rc2-24018"", ""System.Console"": ""4.0.0-rc2-24018"" }, ""frameworks"": { ""netcoreapp1.0"": { ""imports"": ""dnxcore50"" } } } ``` Running a python client using the FreeTDS driver works fine, so this seems specific to System.Data.SqlClient, and not to our database. " 8093 area-System.ComponentModel Add TypeDescriptor to System.ComponentModel.TypeConverter This change is to get the main functional parts of the TypeDescriptor infrastructure into System.ComponentModel.TypeConverter. There is still some clean up that should be done, but we can track those with some other issues. Fixes #6573 8095 area-System.Net Add WinHttpHandler NTLM auth type handling After further discussions and feedback regarding app-compat with legacy servers, it's been decided we don't need to remove NTLM from the auth type list. This commit puts NTLM back into the ordered list of auth types. A similar change was made to CurlHandler in PR #7923. Due to current limitations with the Azure test server endpoints regarding integrated auth, this change was tested manually. cc: @stephentoub @joshfree @Petermarcu @CIPop @himadrisarkar 8099 area-System.Runtime OSInformation not querying the underlying OS runtime is simply not good enough. Here is a real example of use why build time OS Information without the real runtime is not a good idea. See discussions here: - https://github.com/dotnet/corefx/issues/3032 - https://github.com/dotnet/corefx/issues/6105 - https://github.com/dotnet/corefx/issues/1017 I code for a managed NoSQL database and for us performance is a must; therefore in some cases we have to do some platform specific stuff like calling PrefetchVirtualMemory. The problem is that the function is not supported on any OS, it is only supported in Windows 8+. While this may look like an isolated example, not even in windows (which is very stable) the runtime is changing and underlying APIs are not set in stone. Knowing that, think about newer platforms like Android where versions numbers would mean something is viable or not. Not having a cross-platform way to query the runtime is a no-no for performance and support OS that are not mature enough to absolutely not require having specific dedicated codepath depending on the runtime. EDIT: I know I can still get it with a Win32 call now I know that I am on windows, but that is not the point. 8100 area-Serialization Fix serialization perf test failures XmlSerializer doesn't support dictionary scenarios so skipping them in perf tests cc: @shmao @SGuyGe @zhenlan Fix #7584 8104 area-System.Data ProjectReference -> Package Dependency: Disable SqlClient tests from package dependency build System.Data.SqlClient.Tests.csproj and System.Data.SqlClient.ManualTesting.Tests.csproj have a dependency on sni.dll which we do not currently build in the open. If we build packages in the open (producing new package versions), and then we attempt to restore packages against the new versions, we hit an error because the sni packages were not produced... Errors in E:\gh\chcosta\corefx\bin/obj/generated\System.Data.SqlClient.ManualTesting.Tests\AnyOS\project.json Unable to resolve 'runtime.win7-x86.runtime.native.System.Data.SqlClient.sni (>= 4.0.1-rc3-24026-01)' for 'DNXCore,Version=v5.0'. Unable to resolve 'runtime.win7-x64.runtime.native.System.Data.SqlClient.sni (>= 4.0.1-rc3-24026-01)' for 'DNXCore,Version=v5.0'. Errors in E:\gh\chcosta\corefx\bin/obj/generated\System.Data.SqlClient.Tests\AnyOS\project.json Unable to resolve 'runtime.win7-x64.runtime.native.System.Data.SqlClient.sni (>= 4.0.1-rc3-24026-01)' for 'DNXCore,Version=v5.0'. Unable to resolve 'runtime.win7-x86.runtime.native.System.Data.SqlClient.sni (>= 4.0.1-rc3-24026-01)' for 'DNXCore,Version=v5.0'. I'm going to submit a PR to disable these projects from the Project Reference to package dependency conversion for test builds so that I can unblock some build pipeline work while investigating how we want to resolve this problem. This issue is tracking disabling the System.Data.SqlClient test projects from the project reference to package dependency conversion process so that we can re-enable it once the underlying problem is resolved. 8108 area-System.IO Implement File enumeration over WinRT "We are missing an implementation of FileSystem.EnumeratePaths and FileSystem.EnumerateFileSystemInfos on WinRTFileSystem. https://github.com/dotnet/corefx/blob/master/src/System.IO.FileSystem/src/System/IO/WinRTFileSystem.cs#L231 This should be implemented by grabbing a StorageFolder for the path, then constructing a query and calling CreateFileQueryWithOptions. - Translate SearchOption into [FolderDepth](https://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.search.queryoptions.folderdepth). - Split the searchPattern into `name` and `extension` - Set [ApplicationSearchFilter](https://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.search.queryoptions.applicationsearchfilter.aspx) as `$""System.FileName:~\""{name}\""""` using [AQS](https://msdn.microsoft.com/en-us/library/windows/apps/bb266512.aspx) - Set [FileTypeFilter](https://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.search.queryoptions.filetypefilter.aspx) as `extension`, if it exists. " 8110 area-System.Runtime Remove temporary project references in ref/System.Runtime.InteropServices.csproj The System.Runtime.InteropServices reference assembly contains temporary project references to the System.Runtime and System.Runtime.InteropServices.PInvoke reference assemblies. This is necessary because of the GCHandle move (see https://github.com/dotnet/corefx/pull/7900). 8113 area-System.Net SendAsync - System.Net.Http.HttpRequestException: Error while copying content to a stream "I have a quite critical issue with HttpContent disposing _just_ on linux. (under IIS 8.5 it's working fine) Tried with: coreclr 1.0.0-rc1-update1 and 1.0.0-rc1-update2 I made an action in an asp.net web api, and in that: ``` var uri = ""http://....""; content = new ByteArrayContent(new byte[0]); var requestMsg = new HttpRequestMessage(System.Net.Http.HttpMethod.Post, uri); requestMsg.Content = content; var client = new HttpClient(); var response = client.SendAsync(requestMsg, HttpCompletionOption.ResponseContentRead, System.Threading.CancellationToken.None).GetAwaiter().GetResult(); return Json(string.Empty); ``` If I start a load test on thin, then randomly get this error message: ``` Microsoft.AspNet.Server.Kestrel[13] An unhandled exception was thrown by the application. System.Net.Http.HttpRequestException: Error while copying content to a stream. ---> System.ObjectDisposedException: Cannot access a disposed object. Object name: 'System.Net.Http.ByteArrayContent'. at System.Net.Http.HttpContent.CheckDisposed() at System.Net.Http.HttpContent.CopyToAsync(Stream stream, TransportContext context) at System.Net.Http.CurlHandler.HttpContentAsyncStream.b__26_0() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.Http.CurlHandler.MultiAgent.TransferDataFromRequestStream(IntPtr buffer, Int32 length, EasyRequest easy) at System.Net.Http.CurlHandler.MultiAgent.CurlSendCallback(IntPtr buffer, UInt64 size, UInt64 nitems, IntPtr context) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Net.Http.StreamToStreamCopy.d__0.MoveNext() --- End of inner exception stack trace --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at httptest.Controllers.ValuesController.Get() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.AspNet.Mvc.Controllers.ControllerActionExecutor.ExecuteAsync(MethodInfo actionMethodInfo, Object instance, Object[] orderedActionArguments) at Microsoft.AspNet.Mvc.Controllers.ControllerActionInvoker.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.d__53.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.d__44.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Mvc.Infrastructure.MvcRouteHandler.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at Microsoft.AspNet.Mvc.Routing.InnerAttributeRoute.d__10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at Microsoft.AspNet.Routing.RouteCollection.d__9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Builder.RouterMiddleware.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.IISPlatformHandler.IISPlatformHandlerMiddleware.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Hosting.Internal.RequestServicesContainerMiddleware.d__3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Hosting.Internal.HostingEngine.<>c__DisplayClass32_0.<b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at Microsoft.AspNet.Server.Kestrel.Http.Frame.d__79.MoveNext() ``` I investigated it for several days. Finally I make a wrapper class for the ByteArrayContent: ``` public class SlambyByteArrayContent : ByteArrayContent { public SlambyByteArrayContent(byte[] content):base(content) { } protected override void Dispose(bool disposing) { //do nothing } public void DisposeManually(bool disposing) { base.Dispose(disposing); } } ``` And change my code to: ``` SlambyByteArrayContent content = null; try { var uri = ""http://....""; content = new SlambyByteArrayContent(new byte[0]); var requestMsg = new HttpRequestMessage(System.Net.Http.HttpMethod.Get, uri + ""_stats""); requestMsg.Content = content; var client = new HttpClient(); var response = client.SendAsync(requestMsg, HttpCompletionOption.ResponseContentRead, System.Threading.CancellationToken.None).GetAwaiter().GetResult(); return Json(string.Empty); }finally { if (content != null) content.DisposeManually(true); } ``` Now it's working for my case but I think there must be some evil around the HttpContent disposing. " 8114 area-System.Text System.Text.Encoding and System.Text.Encoding.Extensions test duplication Currently, the System.Text.Encoding and System.Text.Encoding.Extensions test projects test the same things for the same classes - I.e. ASCIIEncoding, UT7Encoding, UTF32Encoding, UTD8Encoding and UnicodeEncoding. For Latin1Encoding, System.Text.Encoding.Extensions is the only one testing this class This means that there is lots of duplication between the test projects. Ideally, this should be fixed. There are some solutions: - Remove/combine the tests in System.Text.Encoding.Extensions to the new more modern System.Text.Encoding.Tests - Extract the current tests in System.Text.Encoding.Tests and System.Text.Encoding.Extensions to src/common/tests and reference the files in both projects - keep as is, and duplicate tests (not an ideal solution IMO) My preferred solution is to migrate the existing non-duplicated tests to System.Text.Encoding.Tests as that project is more modern. In terms of coverage loss, there wouldn't really be any, as the code is in mscorlib anyway. In fact, this could consolidate coverage even more by having he tests in one place. @tarekgh let me know what approach you think is the best and I'll work on it 8115 area-System.Net Refactor SafeFreeCredentials class Tracking issue to fix the following code smells [``SafeFreeCredentials`](https://github.com/dotnet/corefx/blob/master/src/Common/src/Interop/Unix/libssl/SecuritySafeHandles.cs#L62) class: ~~\* As pointed out in [the PR comments of #6469](https://github.com/dotnet/corefx/pull/6469#discussion_r56659315), this class needs to be split up into two separate classes~~ (via #8452) - Rework PAL to remove non- SafeHandle SafeHandles. (Source of this observation was [the PR Comments of #6469](https://github.com/dotnet/corefx/pull/6469#discussion_r56658414) ) 8117 area-System.Net NegotiateStreamTest For Unix relies on ManualSkip The current situation with running functional tests on Linux for `NegotiateStream` is suboptimal. Instead of using a `ConditionalFlag`, each test [checks if the installation is successful or not](https://github.com/dotnet/corefx/blob/master/src/System.Net.Security/tests/FunctionalTests/NegotiateStreamTestForUnix.cs#L155) and bails out if it wasn't. This means that we cannot rely on the output of xunit to know if the test was successful or if it was skipped. This was written this way due to following orthogonal constraints: 1. Unlike other tests, the NegotiateStreamTests were expected to download and install the prereqs (This constraint is related to the infra team). 2. When the tests are run on a dev machine, the installation should be done only if the developer chooses to do so. 3. If the developer does not choose to download, install and configure KDC (presumably because he/she is not testing negotiatestream) the outerloop should not fail. 4. If the tests install anything, we need to uninstall them as well. In order to achieve 1 and 4, we need to use the XUnit's disposable fixture mechanism. But XUnit can only guarantee that the fixture instance is created before the any of the test is run. There are no documented relative ordering of - fixture instance creation - filtering of test cases Thus making it really tricky to achieve all the four requirements. 8119 area-System.Linq TryGetActionType and TryGetFuncType throw on some failures instead of returning false/null. If there are too many types, too few, or if one of the types is `ByRef` then these return false (with `null` to the `out` parameter) as expected. However, if the type list is null, contains null, contains a pointer type, or contains `typeof(void)`, they throw an exception, contrary to the `TryXXX` semantics. Throwing on null or containing null is perhaps defensible, but probably still incorrect. Throwing on pointer types and void less so. 8120 area-System.Linq Are types VBCallSiteDelegate0…7 missing? There's code in src/Common/src/System/Linq/Expressions/Compiler/DelegateHelpers.Generated.cs defining and using public types `VBCallSiteDelegate0` through `VBCallSiteDelegate7`. Because these are wrapped in `#if !FEATURE_COMPILE` they aren't active. Since however the compiler and interpreter used to be mutually exclusive, `!FEATURE_COMPILER` used to entail `FEATURE_INTERPRET` perhaps this should in fact be wrapped with `#if FEATURE_INTERPRET` and hence lit up? Has a type that was public in some contexts been removed due to this? CC @VSadov @bartdesmet 8121 area-System.Linq Expression.GetDelegateType works with pointer types for high arity but not for low. The following works: ``` C# Expression.GetDelegateType(Enumerable.Repeat(typeof(int).MakePointerType(), 18).ToArray()) ``` But the following throws `ArgumentException`: ``` C# Expression.GetDelegateType(Enumerable.Repeat(typeof(int).MakePointerType(), 17).ToArray()) ``` This is similar to (indeed, a variant of) #8074, but differs as while there the usefulness of lambda expressions that take pointer arguments is questionable, here the delegate could be used in a variety of ways that don't meet the same issues, so there's more value in making both work, rather than in making both throw. 8123 area-System.ComponentModel Allow DisplayAttribute on Class declarations Hello, I'd like you to consider allowing `DisplayAttribute` on class declarations. Forgive me if this is a duplicate, I haven't found anything related. Some use cases for it: - Auto-generate form captions - Auto-generate report captions - Use this information to extend nested property captions (like `Person.Details.Address` could get a label as `Personal info / Address`) - Auto-generate documentation (consuming `Description` and `Order` for example) - etc. 8124 area-System.Security Make System.Security.Cryptography.Native.dylib reference libcrypto/libssl via rpath The brew installed openssl has a library id of /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib, which doesn't seem to interact well with the macports installed version. For all the same reasons we make our libraries use an id with rpath we should use `install_name_tool –change` to rewrite these references post-link. 8126 area-System.Runtime Allow custom format strings for boolean values "This is moved from User Voice https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/5748267-allow-custom-format-strings-for-boolean-values?tracking_code=59376d71f1665e5476be1026a8c3318e I would like to be able to specify how string.Format displays the True and False values of Boolean variables. For example I would like the following C# snippet to output ""Boiler: On"" rather than ""Boiler: True"": bool boilerIsOn = true; Console.WriteLine(""Boiler: {0:On:Off}"", boilerIsOn ); " 8128 area-System.Net More HttpClient test fixes and additions - The GetAsync_ResponseWithSetCookieHeaders_AllCookiesRead test has been failing with some regularity in CI, with strange GatewayTimeout errors. I don't know why this particular test is so much more susceptible to that, but I've changed the test to use a local loopback server rather than an external site. - The SendAsync_ReadFromSlowStreamingServer_PartialDataReturned test was relying on timings from the server that might not always be correct, and due to internal differences between curl and WinHttp were very frequently wrong on Unix such that the test was disabled there. I reimplemented it with a local loopback server, too. - I've added another mini-stress test, with posts instead of gets. Fixes https://github.com/dotnet/corefx/issues/7234 Fixes https://github.com/dotnet/corefx/issues/4259 cc: @davidsh, @ericeil 8130 area-System.Reflection Comparing Reflection objects. We either need a story or decide we don't have a story. "This came up as an underlying issue in Issue #6857. Opening this as a Future issue to track. What's a developer to do if you need to compare two Reflection objects such as ParameterInfo for ""semantic equality""? On .NET Native, we actually did override Equals/GetHashCode on these objects and they perform semantic equality. However, .NET Native uses a completely different implementation of Reflection. On CoreClr, Reflection objects inherit the Object Equals() method, so those checks are just reference equality checks. They don't check semantic equality, but they often fool people into thinking they do because the CLR often caches Reflection objects for reuse. We probably don't want to make the caching 100% (unnecessary memory usage) but overriding Equals/GetHashCode may also have its costs (surface area compat? What about user-extended Reflection types if we ever support that?) " 8133 area-System.Runtime Add FormatterServices.GetUninitializedObject The current plan is to not support binary serialization **natively** in .NET Core, but we would like to enable the community and partners (e.g. distributed computing framework providers), and possibly our own out-of-band libraries (BinaryFromatter in a compatibility pack published to nuget) to implement something similar to what binary serialization is doing on top of .NET Core. So far, we identified a couple of enabler features that we do need to add to the core to make such out-of-band serializers possible: 1. FormatterServices.GetUninitializedObject 2. Exception.set_StackTrace This issue/request is to add these two asap. They are absolutely blocking and required. We might need more as we work with partners and community on enabling their scenarios. See the following issues for more context: #7938, #6564, 8135 area-System.Net Removed unsupported schemes from WebRequest.Create CoreFx doesn't support file: or ftp: schemes for WebRequest classes. However, those schemes were left in the source code when it was ported from .NET Framework. Removed the file: and ftp: schemes. Added tests. Fixes #7439. 8139 area-System.Reflection Handle projections for TypeSpecs in ResolveSignatureTypeKind Also add tests for all inputs to ResolveSignatureTypeKind Tracking TODO in code: https://source.dot.net/#System.Reflection.Metadata/System/Reflection/Metadata/Ecma335/MetadataReaderExtensions.cs,420 8141 area-System.Diagnostics Missing DebuggingFlags on DebuggableAttribute Are there plan to add `DebuggingFlags` to System.Diagnostics.DebuggableAttribute? Especially since the constructor takes them as arguments, it seems natural that one could query it? 8142 area-System.Threading Add a way to wait for a Task without throwing and without allocating At the moment there does not seem to be ay direct API that you can use to wait for a task to complete without throwing in case the task completes cancelled or faulted. This forces using exceptions for control flow: ``` try { task.Wait(); } catch (AggEx) { } //Do nothing. ``` This is ugly and _very_ slow. Exceptions seem to cost ~0.1ms of CPU time to process. So if you are writing a port scanner using async IO you will find that you cannot scan more that 10k ports per second because the CPU is pegged from exception processing(!). Also, I don't know if exceptions scale across CPUs. I know that `ExceptionDispatchInfo` uses a global lock internally. So at least some of the processing does not scale at all. It might not be too common to have many faulted tasks. But it is more likely to rely on a greater number of cancelled tasks. I know of two workarounds: ``` Task.WhenAny(task); //params overload task.CW(() => { }, ExecuteSynchronously).Wait(); ``` Both allocate, add overhead and both make it unclear what you want to achieve. Please add a simpler and faster way to wait for a task to complete regardless of the terminal state it ends up in. The same problem exists with `await`. There is no direct way to wait for completion without throwing. Maybe `ConfigureAwait` can be extended with an `AwaitOptions` enum that has the values `IgnoreContext, NoThrow`. 8144 area-System.Net System.Net.Requests: Specify the capacity when creating the PrefixList Minor improvement: Specify the capacity when creating `WebRequest`'s `PrefixList` and reuse the same `HttpRequestCreator` instance for both http and https. As part of that, I added an explicit dependency on `System.Diagnostics.Debug`, so I could add a `Debug.Assert` (it was already being pulled in by other dependencies). While I was at it, I removed the dependency on `System.Diagnostics.Contracts` because it was only being used in one place and code contracts are not being maintained in .NET Core. I also made a few fields readonly, along with fixing the naming/capitalization of a couple parameters in the same class. cc: @davidsh, @stephentoub 8146 area-System.IO System.IO.Compression: Create ExtractToDirectory overload that accepts 'overwrite' boolean "Currently `ExtractToDirectory` is only useful if the target directory is virginal (eg clean or contains files which are not in the zip being extracted). If you're performing an extraction over an existing directory however, then the functionality is extremely limited because you will encounter the following example exception: > Exception calling ""ExtractToDirectory"" with ""2"" argument(s): ""The file 'D:\foo\bar.txt' already exists."" I would like to ask the developers to consider writing a new overload for the `ExtractToDirectory` method that includes an 'overwrite existing files' parameter. Many thanks. " 8150 area-System.Net Fix HttpRequestMessage.Version tests The current tests validating HTTP request message version were depending on a server behavior that is not guaranteed. In particular, HTTP RFC 7230 states that servers are NOT required to respond back with the same minor version if they support a higher minor version. In fact, the RFC states that servers SHOULD send back the highest minor version they support. So, testing the response version to see if the client sent a particular request version only works for some servers. In particular the 'Http2Servers' used in these tests seemed to echo the minor version of the request. However, depending on network configuration, intermediate proxies can change the HTTP version that ends up getting sent to the destination server. And as a result, we can have unpredictable behavior in these tests. To fix this, the tests were switched to use a loopback server that has deterministic behavior. 8153 area-System.Net Disable hanging OSX NetworkInformation test Based on my very basic investigation, it looks like the thread running CFRunLoopRun is not being terminated properly, which should happen after the only listener unsubscribes on the third line of the test case. I'll have to do more in-depth investigation with a local machine. 8154 area-System.IO System.IO.Tests.CreatedTests.FileSystemWatcher_Created_Negative is failing on OSX This has been failing periodically in some runs that I have looked at. For example: http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/osx_debug_prtest/463/consoleFull http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/osx_debug_prtest/457/testReport/junit/System.IO.Tests/CreatedTests/FileSystemWatcher_Created_Negative/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/osx_debug_prtest/455/testReport/junit/System.IO.Tests/CreatedTests/FileSystemWatcher_Created_Negative/ 8158 area-System.Security Port S.S.C.ECDiffieHellman 8162 area-System.Console Console.Readline throws null reference exception following is the stack trace System.NullReferenceException: Object reference not set to an instance of an object. at System.ConsolePal.TryGetSpecialConsoleKey(Char[] givenChars, Int32 startIndex, Int32 endIndex, ConsoleKeyInfo& key, Int32& keyLength) at System.IO.StdInStreamReader.MapBufferToConsoleKey(ConsoleKey& key, Char& ch, Boolean& isShift, Boolean& isAlt, Boolean& isCtrl) at System.IO.StdInStreamReader.ReadKey(Boolean& previouslyProcessed) at System.IO.StdInStreamReader.ReadLine(Boolean consumeKeys) at System.IO.SyncTextReader.ReadLine() at System.Console.ReadLine() My scenario is following My command takes inputs from user interactively. When I give inputs interactively it works fine. But when I used expect,send to give inputs remotely, I got a null ref exception. from the diag logs of expect, I can see that send sends the input properly. Yet I got this exception. Can someone throw light what can be wrong? 8163 area-System.Net Avoid string allocations in Cookie.GetHashCode Previously, `Cookie.GetHashCode` implicitly allocated a new string (from `string.Concat`) every time it was called, in addition to a `params object[]` array and boxing the version. This PR changes its override of `GetHashCode` to match the one used by `Tuple` ([here](https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/Tuple.cs#L57)), and adds tests for the change. (Note that this could be considered a breaking change.) This leads to an about 8x speedup in the method. cc @stephentoub @davidsh 8165 area-System.Net HttpWebRequest/HttpClient with self-signed client certificate Is there a way to do a HttpWebRequest/HttpClient request with a self signed client certificate that is _not_ trusted by the OS (i.e. not stored as trusted root)? 8171 area-System.Net Cookies should use the Value property as opposed to field in constructor "This behavior seems somewhat unintuitive: ``` cs public static void Main() { var cookie = new Cookie(""name"", null); Console.WriteLine(cookie.Value == null); // -> True cookie.Value = null; Console.WriteLine(cookie.Value.Length == 0); // -> True } ``` The fix would be to change [this](https://github.com/dotnet/corefx/blob/master/src/System.Net.Primitives/src/System/Net/Cookie.cs#L106) line of `Cookie` to use the value property instead of field to set the value, since the property defaults to `string.Empty` if the parameter is null. cc @davidsh " 8173 area-System.IO Simpler way to specify leaveOpen in StreamWriter constructor Currently, the `StreamWriter` constructor has the following overloads: ``` c# public StreamWriter(Stream stream) public StreamWriter(Stream stream, Encoding encoding) public StreamWriter(Stream stream, Encoding encoding, int bufferSize) public StreamWriter(Stream stream, Encoding encoding, int bufferSize, bool leaveOpen) ``` I believe a relatively common need is to set `leaveOpen` to `true`, while keeping both `encoding` and `bufferSize` at their default values. But the process of doing that goes something like this: - Figure out there is no way to specify just `leaveOpen`. - From the documentation of `StreamWriter(Stream stream)`, figure out that the default encoding is UTF-8. (Though it doesn't mention it's actually UTF-8 _without BOM_.) - Either make a guess about what a good buffer size is, or look at the source code of `StreamWriter`. - Finally write `new StreamWriter(stream, Encoding.UTF8, 1024, true)`. I don't think that's acceptable, so I'm proposing to make `new StreamWriter(stream, leaveOpen: true)` work. I can see few options on how to do this: 1. Assuming optional arguments are okay (they probably aren't, see dotnet/corefx#470), make use of them by changing the full overload to: ``` c# public StreamWriter( Stream stream, Encoding encoding = null, int bufferSize = -1, bool leaveOpen = false) ``` This would require relaxing `encoding` and `bufferSize` to accept `null` and `-1`, respectively, but I think that's okay. I think this is the most convenient option, since it allows one to easily specify any combination of options. 2. Add a new constructor overload: ``` c# public StreamWriter(Stream stream, bool leaveOpen) ``` Adding some other overloads might make sense too. 3. Don't add anything, just relax `encoding` and `bufferSize` as in option 1. I think this is the most conservative option, but also least convenient, since it would require writing `new StreamWriter(stream, null, -1, true)`. 8175 area-System.Net Clean up ResponseStreamTest Used the MD5 hash verification when verifying correct response body dowload. Fixes #7885. 8176 area-System.Net Default credentials behavior different from .NET Framework "The following code doesn't work on .NET Core (CoreFx) but does work in .NET Framework: ``` c# string url = """"; var handler = new HttpClientHandler(); handler.UseDefaultCredentials = false; //this works on regular .net, does not work on .Net Core handler.Credentials = new CredentialWrapper { InnerCredentials = CredentialCache.DefaultCredentials }; var client = new HttpClient(handler); HttpResponseMessage response = await client.GetAsync(url); Assert.Equal(HttpStatusCode.OK, response.StatusCode); class CredentialWrapper : ICredentials { public ICredentials InnerCredentials { get; set; } public NetworkCredential GetCredential( Uri uri, String authType) { if (InnerCredentials != null) { return InnerCredentials.GetCredential(uri, authType); } else { return null; } } } ``` " 8177 area-System.Net Avoid race condition between queued HttpContent.CopyToAsync and request completion HttpContentAsyncStream is used by CurlHandler as the request content stream, with writes to it done via HttpContent.CopyToAsync. We expect the writes to all be asynchronous via WriteAsync. However, it's possible for an override of CopyToAsync to use Write, and if it does, and if we just delegated from Write(...) to WriteAsync(...).GetAwaiter().GetResult(), we would likely deadlock, as the CopyToAsync call is invoked from the single thread responsible for processing libcurl interactions, including supplying the reader that would unblock the writer. To handle this, we have two options: schedule the CopyToAsync to be invoked asynchronously just in case it does a synchronous write, or implement the write to buffer the data. The former is what was done in https://github.com/dotnet/corefx/pull/4095. It adds some cost to the expected / common case, but more importantly and worse it can also lead to concurrency problems and spurious exceptions, as for example if the request is faulted/canceled between the time that a task to invoke CopyToAsync is scheduled and the time that it actually executes, we could be invoking CopyToAsync on a disposed HttpContent; worse, we could end up invoking CopyToAsync while it's being disposed, which could lead to arbitrary state corruption, and which means we can't guard against this with checks to see if the task has already completed. The only way to fully guard against that is via a lock, but such a lock would itself lead to deadlocks, as the reader that would unblock the writer would have to take the same lock. In comparison, buffering has the downside of taking up more and arbitrary amounts of memory to store all of the input. But, we expect synchronous Writes to be rare, and code shouldn't be doing it anyway; if it does, the fix should really be to switch to asynchronous writes. This commit changes from the first approach to the second, using buffering in synchronous Write calls in order to ensure correctness and to optimize for the expected case. @mconnew, @roncain, this all originally started from https://github.com/dotnet/corefx/issues/4077. Is WCF still doing such synchronous writes as part of HttpContent.CopyToAsync? If so, is this change going to cause a problem for that? We're between a rock and a hard place given the design of HttpClient. Fixes https://github.com/dotnet/corefx/issues/8113 (I think; I couldn't actually reproduce it in the successful case mentioned) cc: @davidsh, @ericeil, @kapilash 8180 area-System.Globalization System.Globalization.Tests failed on Ubuntu16.04 "``` 12:19:16 System.Globalization.Tests.DateTimeFormatInfoGetDayName.GetDayName(format: DateTimeFormatInfo { AbbreviatedDayNames = [""Dim."", ""Lun."", ""Mar."", ""Mer."", ""Jeu."", ...], AbbreviatedMonthGenitiveNames = [""janv."", ""févr."", ""mars"", ""avr."", ""mai"", ...], AbbreviatedMonthNames = [""Janv."", ""Févr."", ""Mars"", ""Avr."", ""Mai"", ...], AMDesignator = ""AM"", Calendar = GregorianCalendar { CalendarType = Localized, Eras = [...], IsReadOnly = False, MaxSupportedDateTime = 9999-12-31T23:59:59.9999999, MinSupportedDateTime = 0001-01-01T00:00:00.0000000, ... }, ... }, expected: [""dimanche"", ""lundi"", ""mardi"", ""mercredi"", ""jeudi"", ...]) [FAIL] 12:19:16 Assert.Equal() Failure 12:19:16 ↓ (pos 0) 12:19:16 Expected: dimanche 12:19:16 Actual: Dimanche 12:19:16 ↑ (pos 0) 12:19:16 Stack Trace: 12:19:16 at System.Globalization.Tests.DateTimeFormatInfoGetDayName.GetDayName(DateTimeFormatInfo format, String[] expected) 12:19:16 System.Globalization.Tests.DateTimeFormatInfoGetMonthName.GetMonthName(format: DateTimeFormatInfo { AbbreviatedDayNames = [""Dim."", ""Lun."", ""Mar."", ""Mer."", ""Jeu."", ...], AbbreviatedMonthGenitiveNames = [""janv."", ""févr."", ""mars"", ""avr."", ""mai"", ...], AbbreviatedMonthNames = [""Janv."", ""Févr."", ""Mars"", ""Avr."", ""Mai"", ...], AMDesignator = ""AM"", Calendar = GregorianCalendar { CalendarType = Localized, Eras = [...], IsReadOnly = False, MaxSupportedDateTime = 9999-12-31T23:59:59.9999999, MinSupportedDateTime = 0001-01-01T00:00:00.0000000, ... }, ... }, expected: ["""", ""janvier"", ""février"", ""mars"", ""avril"", ...]) [FAIL] 12:19:16 Assert.Equal() Failure 12:19:16 ↓ (pos 0) 12:19:16 Expected: janvier 12:19:16 Actual: Janvier 12:19:16 ↑ (pos 0) 12:19:16 Stack Trace: 12:19:16 at System.Globalization.Tests.DateTimeFormatInfoGetMonthName.GetMonthName(DateTimeFormatInfo format, String[] expected) 12:19:16 System.Globalization.Tests.NumberFormatInfoNumberGroupSizes.NumberGroupSizes_Get(format: NumberFormatInfo { CurrencyDecimalDigits = 2, CurrencyDecimalSeparator = ""."", CurrencyGroupSeparator = "","", CurrencyGroupSizes = [3, 2], CurrencyNegativePattern = 9, ... }, expected: [3, 2]) [FAIL] 12:19:16 Assert.Equal() Failure 12:19:16 Expected: Int32[] [3, 2] 12:19:16 Actual: Int32[] [3] 12:19:16 Stack Trace: 12:19:16 at System.Globalization.Tests.NumberFormatInfoNumberGroupSizes.NumberGroupSizes_Get(NumberFormatInfo format, Int32[] expected) 12:19:17 Finished: System.IO.Compression.ZipFile.Tests 12:19:17 12:19:17 === TEST EXECUTION SUMMARY === 12:19:17 System.IO.Compression.ZipFile.Tests Total: 24, Errors: 0, Failed: 0, Skipped: 0, Time: 2.360s 12:19:17 Finished: System.Globalization.Calendars.Tests 12:19:17 12:19:17 === TEST EXECUTION SUMMARY === 12:19:17 System.Globalization.Calendars.Tests Total: 2086, Errors: 0, Failed: 0, Skipped: 0, Time: 2.121s 12:19:17 System.Globalization.Tests.DateTimeFormatInfoGetAbbreviatedDayName.GetAbbreviatedDayName(info: DateTimeFormatInfo { AbbreviatedDayNames = [""Dim."", ""Lun."", ""Mar."", ""Mer."", ""Jeu."", ...], AbbreviatedMonthGenitiveNames = [""janv."", ""févr."", ""mars"", ""avr."", ""mai"", ...], AbbreviatedMonthNames = [""Janv."", ""Févr."", ""Mars"", ""Avr."", ""Mai"", ...], AMDesignator = ""AM"", Calendar = GregorianCalendar { CalendarType = Localized, Eras = [...], IsReadOnly = False, MaxSupportedDateTime = 9999-12-31T23:59:59.9999999, MinSupportedDateTime = 0001-01-01T00:00:00.0000000, ... }, ... }, expected: [""dim."", ""lun."", ""mar."", ""mer."", ""jeu."", ...]) [FAIL] 12:19:17 Assert.Equal() Failure 12:19:17 ↓ (pos 0) 12:19:17 Expected: dim. 12:19:17 Actual: Dim. 12:19:17 ↑ (pos 0) 12:19:17 Stack Trace: 12:19:17 at System.Globalization.Tests.DateTimeFormatInfoGetAbbreviatedDayName.GetAbbreviatedDayName(DateTimeFormatInfo info, String[] expected) 12:19:17 System.Globalization.Tests.DateTimeFormatInfoGetAbbreviatedMonthName.GetAbbreviatedMonthName(info: DateTimeFormatInfo { AbbreviatedDayNames = [""Dim."", ""Lun."", ""Mar."", ""Mer."", ""Jeu."", ...], AbbreviatedMonthGenitiveNames = [""janv."", ""févr."", ""mars"", ""avr."", ""mai"", ...], AbbreviatedMonthNames = [""Janv."", ""Févr."", ""Mars"", ""Avr."", ""Mai"", ...], AMDesignator = ""AM"", Calendar = GregorianCalendar { CalendarType = Localized, Eras = [...], IsReadOnly = False, MaxSupportedDateTime = 9999-12-31T23:59:59.9999999, MinSupportedDateTime = 0001-01-01T00:00:00.0000000, ... }, ... }, expected: ["""", ""janv."", ""févr."", ""mars"", ""avr."", ...]) [FAIL] 12:19:17 Assert.Equal() Failure 12:19:17 ↓ (pos 0) 12:19:17 Expected: janv. 12:19:17 Actual: Janv. 12:19:17 ↑ (pos 0) 12:19:17 Stack Trace: 12:19:17 at System.Globalization.Tests.DateTimeFormatInfoGetAbbreviatedMonthName.GetAbbreviatedMonthName(DateTimeFormatInfo info, String[] expected) 12:19:19 Discovered: System.Dynamic.Runtime.Tests 12:19:19 Starting: System.Dynamic.Runtime.Tests 12:19:20 Finished: System.Globalization.Tests ``` " 8181 area-System.Net System.Net.Http.Functional.Tests.HttpClientHandler test failed on Ubuntu16.04 ``` 12:38:02 System.Net.Http.Functional.Tests.HttpClientHandler_Timeouts_Test.ConnectTimeout_TimesOut_Throws [FAIL] 12:38:02 Assert.InRange() Failure 12:38:02 Range: (1 - 10000) 12:38:02 Actual: 100003 12:38:02 Stack Trace: 12:38:02 at System.Net.Http.Functional.Tests.HttpClientHandler_Timeouts_Test.<>c.<b__4_0>d.MoveNext() 12:38:02 --- End of stack trace from previous location where exception was thrown --- 12:38:02 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 12:38:02 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 12:38:02 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() 12:38:02 at System.Net.Http.Functional.Tests.LoopbackServer.<>c__DisplayClass0_0.<b__0>d.MoveNext() 12:38:02 --- End of stack trace from previous location where exception was thrown --- 12:38:02 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 12:38:02 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 12:38:02 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() 12:38:02 at System.Net.Http.Functional.Tests.LoopbackServer.<>c__DisplayClass2_0.b__0(Task t) 12:38:02 at System.Threading.Tasks.Task.Execute() 12:38:02 --- End of stack trace from previous location where exception was thrown --- 12:38:02 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 12:38:02 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 12:38:02 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() 12:38:02 at System.Net.Http.Functional.Tests.HttpClientHandler_Timeouts_Test.d__4.MoveNext() 12:38:02 --- End of stack trace from previous location where exception was thrown --- 12:38:02 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 12:38:02 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 12:38:02 --- End of stack trace from previous location where exception was thrown --- 12:38:02 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 12:38:02 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 12:38:02 --- End of stack trace from previous location where exception was thrown --- 12:38:02 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 12:38:02 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 12:38:02 Finished: System.Net.Http.Functional.Tests ``` 8182 area-System.Diagnostics System.Diagnostics.Tracing package version 4.1.0 contains version 4.0.20 reference assembly "I am trying to reference System.Diagnostics.Tracing version 4.1.0 from System.Net.Sockets, so I can use the new EventCounter type. I changed the project.json in src\System.Net.Sockets\src\win to include: ``` ""System.Diagnostics.Tracing"": ""4.1.0-rc3-24026-00"", ``` However, the build complains that EventCounter doesn't exist in any referenced assembly. If I open up the reference assembly: ``` packages/System.Diagnostics.Tracing\4.1.0-rc3-24026-00\ref\netstandard1.3\System.Diagnostics.Tracing.dll ``` ...in ILSpy, I see that the assembly version is *4.0.20.00,"" and that indeed it does not contain the EventCounter type. Why does the 4.1.0 package contain the 4.0.20 reference assembly? @ericstj, @vancem " 8183 area-System.Console Console.Write() doesn't show output until a newline "On RHEL 7, `Console.Write()`'s output does not get displayed until a newline is used (or the program exits). If you run the following application, you don't see anything as the output until 10 seconds have passed. Then all of ""HelloWorld!"" appears at once. ``` public static void Main(string[] args) { Console.Write(""Hello World""); Console.Out.Flush(); Task.Delay(10000).Wait(); Console.WriteLine(""!""); } ``` Console applications that do input/output may use a style like the following: ``` public static void Main(string[] args) { Console.Write(""Name: ""); var name = Console.ReadLine(); Console.WriteLine(""Your name is '"" + name + ""'.""); } ``` This doesn't work for me. You get no output at all at first. If you type in something (say ""Foo"") and hit ENTER, then you see all of the output at once: ``` Name: Foo Your name is 'Foo'. ``` If you don't hit enter, then it seems like the application has hung. A `Console.Out.Flush()` doesn't fix this, as in the following: ``` public static void Main(string[] args) { Console.Write(""Name: ""); Console.Out.Flush(); var name = Console.ReadLine(); Console.WriteLine(""Your name is '"" + name + ""'.""); } ``` I ran all the test cases while ssh'ed into the RHEL 7 VM. ``` $ dotnet --version 1.0.0-rc2-002538 ``` " 8186 area-System.Security Add support for opening a PFX with an ephemeral key Currently opening a PFX on Windows creates a temporary keyfile on disk which is deleted if the cert is disposed/finalized without being added to a cert store. While it might not be feasible to change the default to ephemeral, we should add the option to allow better guarantees against key-leak. (PKCS12_NO_PERSIST_KEY, Vista+) ## Rationale Currently .NET supports loading a PFX in two different key-persistence modes. The default mode, which I call perphemeral (a portmanteau of persistent and ephemeral), is to let the key file be created on disk, and then delete that file when the certificate is disposed. Alternatively, the PFX can be loaded with X509KeyStorageFlags.PersistKeySet, and then the key files will not be deleted upon certificate disposal. Both current modes have some pros and some cons: ### Persisted - Pro: You can add it to a persisted X509Store meaningfully. - Pro: new X509Certificate2(cert.Handle) has no surprises - Con: If you open a PFX persisted to add it to an X509Store, and detect the duplicate, you still have emitted the key. (Cleanup is possible, but hard to do correctly) - Con: If you meant to use the key ephemerally this leaks a file on disk every time you use it. ### Perphemeral (default) - Pro: If your application terminates normally, no net key material was leaked to disk. - Con: If you add a perphemeral cert to an X509Store the key file is still deleted, so while it is temporarily a public/private pair in the store it finishes as a public-only import. - Con: new X509Certificate2(cert.Handle) makes the cleanup hard to assess from a user perspective (it's stable, but hard to describe). - Con: If your application does not terminate normally (or it was held outside of the scope of finalization), the keyfile leaks as if you had opened it with PersistKeySet. - Con: Under parallel loads of the same PFX there's a if-available-use race condition (out of our reach) where two different objects were given the same backing keyfile; disposing one copy eliminates the keyfile of the other. When seeking ephemeral behavior (load from a PFX, do some signing/decrypting, dispose) it seems significantly better to just load it ephemerally. ### Ephemeral (new proposal) - Pro: No key material is ever written to disk (modulo the pagefile) so it can't create a persisted file under any circumstance. - Pro: Immune to parallel load race conditions - Pro: new X509Certificate2(cert.Handle) behaves just fine. - Con: Adding the cert to an X509Store may behave as adding the public key only. - Con: Existing interop code expecting to load the key name structure will fail. ## Proposed API: ``` diff public enum X509KeyStorageFlags { DefaultKeySet = 0, + EphemeralKeys = 32, Exportable = 4, MachineKeySet = 2, PersistKeySet = 16, UserKeySet = 1, UserProtected = 8, } ``` Opening an X509Certificate2 (or Importing into a collection) with both PersistKeySet and EphemeralKeySet defined will be an error. On Windows EphemeralKeySet will also force loading into CNG. On Unix this flag has no effect. Since the key handle is now actually owned by the native object, we need to track that dependency like an interior pointer. To that end, new public members have to be added into the CNG contract: ``` diff public abstract partial class SafeNCryptHandle : System.Runtime.InteropServices.SafeHandle { protected SafeNCryptHandle() : base (default(System.IntPtr), default(bool)) { } + protected SafeNCryptHandle(System.IntPtr handle, System.Runtime.InteropServices.SafeHandle parentHandle) : base (default(System.IntPtr), default(bool)) { } public override bool IsInvalid { get { return default(bool); } } protected override bool ReleaseHandle() { return default(bool); } protected abstract bool ReleaseNativeHandle(); } public sealed partial class SafeNCryptKeyHandle : Microsoft.Win32.SafeHandles.SafeNCryptHandle { public SafeNCryptKeyHandle() { } + public SafeNCryptKeyHandle(System.IntPtr handle, System.Runtime.InteropServices.SafeHandle parentHandle) : base (default(System.IntPtr), default(System.Runtime.InteropServices.SafeHandle)) { } protected override bool ReleaseNativeHandle() { return default(bool); } } ``` The parentHandle constructors of these SafeHandles will require that parentHandle be - Not null (ArgumentNullException) - Not IsClosed (ArgumentException) - Not IsInvalid (ArgumentException) otherwise, it will AddRef in the constructor and Release in ReleaseHandle. 8187 area-System.Security Add support for getting a private key handle with no UI prompting "Equivalently ""pass CRYPT_SILENT when opening the key handle"". While some apps may want to use that key and get the PIN/unprotect prompt, other contexts are headless and would rather opening the key just fail. We should add an overload to Get[Algorithm]PrivateKey which lets the caller suppress UI. " 8188 area-System.Data Are Query Notifications on the roadmap? It seems the System.Data.SqlClient does not include any of the query notification (SqlNotification or SqlDependency) classes. is this on the roadmap to be added? 8190 area-System.Linq Expression.Default() accepts null type. Attempting to use the expression (particularly, in compiling) will then result in NRE when that null type is used. Is there a back-compat issue in blocking this? (Anything one could reasonably have been using such an expression for?) Since fixing would involve an arg check, and fixing how #8081 applies to the same method, may be worth fixing together. 8194 area-System.Net Correctly annotate a stress test with HttpStressEnabled It's failed a few times in outerloop; we only want it enabled when we're doing a stress test and nothing else is running, as the time it takes can fluctuate if lots of other things are running. 8195 area-System.Net BeginConnectV6IPEndPointToV4Host_Fails failed in CI on Ubuntu http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_debug_prtest/580/consoleText ``` System.Net.Sockets.Tests.DualMode.BeginConnectV6IPEndPointToV4Host_Fails [FAIL] Assert.Throws() Failure Expected: typeof(System.Net.Sockets.SocketException) Actual: (No exception was thrown) Stack Trace: at System.Net.Sockets.Tests.DualMode.BeginConnectV6IPEndPointToV4Host_Fails() ``` 8196 area-System.Net Move Windows-specific Sockets initialization into SocketPal Fixes https://github.com/dotnet/corefx/issues/7849 cc: @ericeil, @cipop 8201 area-System.ComponentModel Reference Source repo: Resource string files missing The resource file [/src/System.ComponentModel.Annotations/src/Resources/Strings.resx](https://github.com/dotnet/corefx/blob/7965a9020fef095e2d2e3f5a6c543e455ce97c11/src/System.ComponentModel.Annotations/src/Resources/Strings.resx) is not part of [Microsoft/referencesource](https://github.com/Microsoft/referencesource) which [mono is using](https://github.com/mono/referencesource/tree/mono/System.ComponentModel.DataAnnotations/Resources). As a result validation results on mono have the resource names being returned instead of the actual validation message. Running the same code on Windows returns proper validation messages. 8203 area-System.Net Add DefaultCredentials scenario tests These tests require the client and server to be on a Windows Active Directory domain. These tests are Windows specific. Currently this cannot be done in the CI system. So, these tests are only enabled when an environment variable is set which points to the test server. There is a separate todo item #4989 to provide more automated scripts for setting up the test server. For now, there is a readme file with some details. These tests will help support fixes for #8176 and related bugs. 8206 area-System.Net Cookie: Set value to an empty string when null is passed in Addresses #8171 cc @davidsh @hughbe 8208 area-System.Net Fix System.Net.Primitives tests Clean up System.Net.Primitives unit and functional tests. Moved some functional tests to the unit tests projects since they are testing non-public methods. Change the `public` attribute on some of the CookieContainer` methods to match the public ref contract. This wasn't done properly when this code was first ported from .NET Framework to .NET Core. Some of the public methods are only public in Desktop and not Core. With these changes, the System.Net.Primitives tests can now build and run with `/p:BuildTestsAgainstPackages=true`. Fixes #7906. 8213 area-System.Reflection MethodBodyEncoderTests.FatBody test failed on OSX http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/osx_debug_prtest/604/consoleText ``` System.Reflection.Metadata.Ecma335.Tests.MethodBodyEncoderTests.FatBody [FAIL] Expected: 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x2B, 0xFE Actual: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xBD, 0xD2, 0x0B, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD8, 0x82, 0x71, 0xF1, 0x7F, 0x00, 0x00, 0xDB, 0x10, 0x28, 0x0C Differences: ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0xF8, ++> 0xBD, ++> 0xD2, ++> 0x0B, 0x01, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0xC0, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x05, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0x00, ++> 0xD8, ++> 0x82, ++> 0x71, ++> 0xF1, ++> 0x7F, ++> 0x00, ++> 0x00, ++> 0xDB, ++> 0x10, ++> 0x28, ++> 0x0C, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x01, --> 0x2B, --> 0xFE Expected: True Actual: False Stack Trace: at System.Reflection.Metadata.Tests.AssertEx.Equal[T](IEnumerable`1 expected, IEnumerable`1 actual, IEqualityComparer`1 comparer, String message, String itemSeparator, Func`2 itemInspector) at System.Reflection.Metadata.Ecma335.Tests.MethodBodyEncoderTests.FatBody() ``` 8214 area-Infrastructure Some csproj files still use DNXCore,Version=5.0 as the moniker The document for .NET Platform Standard says that `dnxcore` is deprecated, however it's still being used in a couple of `.csproj` files: https://github.com/dotnet/corefx/search?l=xml&q=DNXCore&utf8=%E2%9C%93 Not sure if this is intentional or not. cc @ericstj 8215 area-System.Net Remove TODO in HttpWebRequest RequestStream Changed the TODO to an Assert(). TryGetBuffer() should always succeed since the default MemoryStream() constructor is used and thus the buffer is always visible. Fixes #7890. 8219 area-System.Net Enable Channel Binding in Negotiate Stream for Unix. This is to track the Channel Binding support for NegotiateStream . 8220 area-System.Reflection Attribute.GetCustomAttributes does not resepct 'inherit' flag for non-RuntimeTypes. "The method `GetCustomAttributes` on `PropertyInfo` and `EventInfo` ignores the `inherit` parameter, which is mentioned in the documentation. Instead one is supposed to use the `Attribute.GetCustomAttributes` method to get attributes in the inheritance chain. The problem is that this method only walks the inheritance chain if the type of the `PropertyInfo` (or rather the `MethodInfo` returned from `GetAccessors()` in the case of a property) is an instance of `RuntimePropertyInfo` (or `RuntimeMethodInfo`). This means that for any custom implementation of a `MemberInfo`, such as those provided from `CustomReflectionContext`, there is no way to get the attributes in the inheritance chain in a transparent way, regardless of the implementation of the `MemberInfo` in question. Suggest that the implementation of `Attribute.GetCustomAttributes()` is changed so that it works regardless of the underlying implementation of the `MemberInfo` provided. A sample program illustrating the issue: ```c# [AttributeUsage(AttributeTargets.All, Inherited = true)] public sealed class TestAttribute : Attribute { } class A { [Test] public virtual object MyProp { get; set; } } class B : A { public override object MyProp { get; set; } } class MyReflectionContext : CustomReflectionContext { } class Program { static void Main(string[] args) { PropertyInfo propertyInfo = typeof(B).GetProperty(""MyProp""); var attrs1 = propertyInfo.GetCustomAttributes(true); var attrs2 = Attribute.GetCustomAttributes(propertyInfo, true); MyReflectionContext ctx = new MyReflectionContext(); propertyInfo = ctx.MapType(typeof(B).GetTypeInfo()).GetProperty(""MyProp""); var attrs3 = propertyInfo.GetCustomAttributes(true); var attrs4 = Attribute.GetCustomAttributes(propertyInfo, true); Console.WriteLine(attrs1.Length); // Returns 0 - As expected Console.WriteLine(attrs2.Length); // Returns 1 - As expected Console.WriteLine(attrs3.Length); // Returns 0 - As epected Console.WriteLine(attrs4.Length); // Returns 0 - We want 1 here! } } ``` " 8221 area-System.Net Implement server-side of NegotiateStream on Unix We currently only support the client side. 8223 area-System.Diagnostics Can we make EventCounter work in NetStandard 1.3? Currently EventCounter is only available in NetStandard 1.5. This makes it unavailable to many (most?) CoreFx implementation assemblies. We'd like to use EventCounter in System.Net.Sockets, but it must remain on NetStandard 1.3 (see #7833). We should consider making EventCounter available on 1.3, if possible. 8226 area-System.Runtime StringBuilder.AppendFormat additional pre-checks. Split from #1514 [AppendFormatHelper](https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/Text/StringBuilder.cs/#L1285) It maybe beneficial to do extra checks before actually generating the output. [Approximation Routine](https://gist.github.com/AdamSpeight2008/ef6834483148afcac59234eef36ef36f) _Note: this is rough coding._ This gets us - the number of argholes (`{0}`) - If this is zero, we could just return the original format string. - the approximate length of the output. - we can pre-size the output, reducing the number of resizes and copying - Is the format string structurally sound. (Excluding `IFormatable` errors) - If it is likely to throw an error. Don't generate the output. 8228 area-Infrastructure Update CI to Debian 8.4 1. We should update CI infra to Debian 8.4 (https://www.debian.org/News/2016/20160402) 2. Also please review the RID graph entries for Debian 8.2+ (8.3, 8.4) so there are no issues for users on newer Debian 8 patch levels 8230 area-Meta CoreRun of Xunit.Console.Netcore causes terminal to stop responding to certain inputs on OSX "When running individual CoreFX test cases on OSX (using vanilla corefx fetched this morning), every time I run Xunit.Console.Netcore.exe using corerun my terminal is never the same after. Observations: - You have to actually run tests to get the repro (just running ./corerun xunit.console.netcore.exe doesn't repro) - Running ""reset"" solves this temporarily. Some keys this takes away (not exhaustive list) - Period - Num keys - dash and + (but not _ and =) " 8231 area-System.IO FileSystemWatcher fixes and test changes Fixes to FileSystemWatcher tests to increase their reliability. - Filtering on the OSX FileSystemWatcher was letting through events that should have been filtered out due to the passed NotifyFilters. The first commit fixes this. - Reworks the FSW tests to be 100% passing. - Adds path validation to most tests. - Adds a Retry mechanism to handle expected intermittent failures due to untrustworthy underlying API calls. The tests pass without it but it's a good fallback in case the CI gets bogged down and our tests start failing due to expired wait times. - Adds more test cases to NotifyFilter and splits existing tests into separate dir/file tests to cover either behavior. resolves #1165 resolves #1657 resolves #2011 resolves #2684 resolves #3215 resolves #3630 resolves #4916 resolves #5306 resolves #6226 resolves #6241 resolves #6732 resolves #7002 resolves #8023 resolves #8024 resolves #8154 8234 area-Meta Ubuntu support needs to be better "I'm sure this seems like a nuisance ticket, but it's hard to gauge the level of interest in solving concerns I've seen brought up by others over the .NET experience on Ubuntu. There are a few top-level issues at the moment, immediately apparent by the current install instructions: ![image](https://cloud.githubusercontent.com/assets/115199/14971129/198149e8-1095-11e6-913f-3d58e3e6011a.png) 1. The current instructions to install .NET on Ubuntu are second-rate. The big issue here is that you are requiring additional steps when they could be avoided. If you examine Chrome and other debian packages, they are able to provide a PPA configuration without making you drop to the command line. You can consider this on par with an MSI installer: ![image](https://cloud.githubusercontent.com/assets/115199/14971157/597c511e-1095-11e6-819f-f40a604cf269.png) This entry, as viewed in the ""Software Sources"" app in Ubuntu did not require me to do anything except add the `.deb` found [here](https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb). It's also worth noting that using a PPA also avoids the need to make people do things with keys. 2. Only supporting 14.04. We're coming up to a month with 16.04. If the current build system cannot even support getting 14.10, 15.04 and 15.10 over the last 2 years, something has been seriously overlooked. At the very least, this is a problem you shouldn't be carrying into a 1.0 release. 3. ""Feeds"". Really, you can just package all the versions you want in a single feed and have a metapackage that points to the most current version. As you can see, there are a few things that can be done to reduce the number of touchpoints for an Ubuntu developer as well as increasing the likelihood that they can run this wonderful new platform with confidence. Having a first-rate install experience on Windows is great, but always allowing Linux to lag risks sending a message of what to expect in the future. " 8235 area-System.Net HttpClient does not support IPv6 with scope ID on Mac or Linux **Repro Steps** 1. Start an HTTP server on an IPv6 address with a scope ID. An example is the link-local address provided by running `ifconfig`. 2. Run `curl` to verify the server is working. 2a. On Mac, I needed to wrap the IPv6 address with brackets, and escape the `%` as `%25`. For example: `curl http://[fe80::blah%25en0]:1234/`. 2b. On Linux, I needed to _not_ wrap with brackets, and _not_ escape the `%`. For example: `curl http://fe80::blah%eth0:1234/`. 3. Call `new HttpClient().GetAsync()` using the same URL you passed to curl. **Expected** HttpClient works the same as curl itself. **Actual** HttpClient fails with an error like `System.Net.Http.CurlException: Couldn't connect to server` or `System.UriFormatException: Invalid URI`. **Notes** I tested many combinations of with/without brackets and with/without `%` encoded as `%25`, but none of them worked. HttpClient on Windows does work correctly with IPv6 scope ID (tested with brackets and without encoding `%`). Documentation for IPv6 scope ID support in Windows: https://msdn.microsoft.com/en-us/library/windows/desktop/aa385325(v=vs.85).aspx **Curl Versions** Mac ``` curl 7.37.1 (x86_64-apple-darwin14.0) libcurl/7.37.1 SecureTransport zlib/1.2.5 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz ``` Linux ``` curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smtp smtps telnet tftp Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP ``` 8236 area-System.Net Better perf/readability improvements for UrlEncode and UrlEncodeToBytes Changes: - `UrlEncode` - Instead of maintaining two separate counters for spaces and safe chars, combine them into one variable, `unexpandedCount`. Keep a `foundSpaces` bool around so we can short-circuit. - Removed the Hungarian notation-style prefix. - Assigned the result of `GetByteCount` directly into a variable, so we don't have to subtract from it and then add to it `unexpandedCount` again while getting the length of the array. - `UrlEncodeToBytes` - Removed Hungarian notation, unnecessary counter variable again. - Removed unnecessary branch in the case where there's nothing to encode; `Buffer.BlockCopy` works just fine, and is faster than `Array.Clone`. - [Benchmark to back this up](https://gist.github.com/jamesqo/25a4d0878fc24c2a7a6ae47a670628b5) - [Results](https://gist.github.com/jamesqo/ca74b20d0992b46c1772d35fc7a22f17) cc @hughbe @davidsh @stephentoub 8237 area-System.Net Incorporating SSH client lib in corefx? Given .Net is cross platform now, and in the *nix world SSH (server and client) is used everywhere, should we add basic SSH functionalities into corefx? For managed implementation we can reference: https://github.com/sshnet/SSH.NET For native maybe we can borrow something from PowerShell team? https://github.com/PowerShell/Win32-OpenSSH Thoughts? 8238 area-Serialization `System.Xml.XmlSerializer` cannot serialize `System.Nullable` as attribute ``` System.InvalidOperationException occurred HResult=-2146233079 Message=Cannot serialize member 'ResX' of type System.Nullable`1[System.Double]. XmlAttribute/XmlText cannot be used to encode complex types. Source=System.Xml.XmlSerializer StackTrace: at System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType, Boolean rpc, Boolean openModel, RecursionLimiter limiter) InnerException: ``` 8242 area-System.Globalization Inconsistencies in IdnMapping on Unix and Windows Originally, some of these were found in #7921 and I found more inconsistencies in #8224 so its worth creating a new issue and closing the old one that diagnosed the problems as with Uri.GetComponents. ## GetAscii - uppercase ASCII chars (e.g. `A, B, C`) - Windows behaviour: returns the uppercase chars - Unix behaviour: returns the lowercase chars ## GetAscii - single dash (e.g. `-`) - Windows behaviour: returns the original string - Unix behaviour: throws an `ArgumentException` ## GetAscii - single full stop (e.g. `.`) - Windows behaviour: throws an `ArgumentException` - Mac OSX behaviour: throws an `ArgumentException` - Unix behaviour: returns the original string ## GetUnicode - invalid punycode (e.g. `xn--\u1234pck`) - Windows behaviour: returns the original string - Unix behaviour: returns `ఽూ` /cc @ellismg @tarekgh 8249 area-System.Net Ensure CurlHandler includes IPv6 scope IDs in Urls when applicable Uri.AbsoluteUri omits the scope ID if present. Switch to using GetComponents with SerializationInfoString. (I'll add a test as a follow-up; I need to figure out how to use NetworkInformation to get a link-local address with a scope ID.) Fixes #8235 cc: @davidsh, @ericeil, @mikeharder 8262 area-System.ComponentModel TypeDescriptor APIs Hi there, I was wondering what the status of the `TypeDescriptor` API is. Currently I am using `TypeDescriptor.AddAttributes()` but unfortunately this is not available on .NET Core. Is there any equivalent available or a timeline when this API will be ported? Thanks in advance. 8264 area-System.Security Remove bcrypt exceptions from Algorithms.dll once buildtools is updated Remove the bcrypt exceptions once we get a version of buildtools with dotnet/buildtools#691. 8274 area-System.Net System.Net.Http.Functional.Tests.PostScenarioTest.PostUsingChunkedEncoding_Success failed in CI Happened in a Windows Debug PR test. See: http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/windows_nt_debug_prtest/796/ 8280 area-Infrastructure Install cmake on Win10 images in CI We started building native libs on windows with clrcompression.dll. 8288 area-System.Console [.NET Framework] Console.CancelKeyPress fails to hook Ctrl+C on subsequent registrations "Moved from https://github.com/dotnet/coreclr/issues/892 The Console.CancelKeyPress event handler code doesn't call ControlCHooker.Hook in the follow sequence of events: ``` csharp Console.CancelKeyPress += SomeHandler; Console.CancelKeyPress -= SomeHandler; Console.CancelKeyPress += SomeHandler; // doesn't call _hooker.Hook(); ``` It looks like a fairly trivial issue in the event registration/unregistration implementation: ``` csharp public static event ConsoleCancelEventHandler CancelKeyPress { [System.Security.SecuritySafeCritical] // auto-generated add { new UIPermission(UIPermissionWindow.SafeTopLevelWindows).Demand(); lock(InternalSyncObject) { // Add this delegate to the pile. _cancelCallbacks += value; // If we haven't registered our control-C handler, do it. // NOTE: _hooker will be instantiated but unhooked on the second registration. if (_hooker == null) { _hooker = new ControlCHooker(); _hooker.Hook(); } } } [System.Security.SecuritySafeCritical] // auto-generated remove { new UIPermission(UIPermissionWindow.SafeTopLevelWindows).Demand(); lock(InternalSyncObject) { // If count was 0, call SetConsoleCtrlEvent to remove cb. _cancelCallbacks -= value; Contract.Assert(_cancelCallbacks == null || _cancelCallbacks.GetInvocationList().Length > 0, ""Teach Console::CancelKeyPress to handle a non-null but empty list of callbacks""); if (_hooker != null && _cancelCallbacks == null) _hooker.Unhook(); } } } ``` " 8291 area-Infrastructure "Win7 CoreFX build/testing failing: ""Unable to load DLL""" "I've followed the instructions at https://github.com/dotnet/corefx/blob/master/Documentation/building/windows-instructions.md on a Windows 7 machine. I'm getting the following error when running the `.\build` command: ``` ""C:\corefx\build.proj"" (default target) (1) -> ""C:\corefx\src\tests.builds"" (BuildAndTest target) (494) -> ""C:\corefx\src\System.Xml.XDocument\tests\System.Xml.XDocument.Tests.builds"" (BuildAndTest target) (750) -> ""C:\corefx\src\System.Xml.XDocument\tests\TreeManipulation\System.Xml.XDocument.TreeManipulation.Tests.csproj"" (BuildAndTest target) (769) -> C:\corefx\Tools\tests.targets(190,5): error MSB4018: The ""GetTargetMachineInfo"" task failed unexpectedly.\r [C:\corefx\src\System.Xml.XDocument\tests\TreeManipulation\System.Xml.XDocument.TreeManipulation.Tests.csproj] C:\corefx\Tools\tests.targets(190,5): error MSB4018: System.DllNotFoundException: Unable to load DLL 'api-ms-win-core-sysinfo-l1-2-0.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)\r [C:\corefx\src\System.Xml.XDocument\tests\TreeManipulation\System.Xml.XDocument.TreeManipulation.Tests.csproj] C:\corefx\Tools\tests.targets(190,5): error MSB4018: at Interop.mincore.GetNativeSystemInfo(SYSTEM_INFO& lpSystemInfo)\r [C:\corefx\src\System.Xml.XDocument\tests\TreeManipulation\System.Xml.XDocument.TreeManipulation.Tests.csproj] C:\corefx\Tools\tests.targets(190,5): error MSB4018: at System.Runtime.InteropServices.RuntimeInformation.get_OSArchitecture()\r [C:\corefx\src\System.Xml.XDocument\tests\TreeManipulation\System.Xml.XDocument.TreeManipulation.Tests.csproj] C:\corefx\Tools\tests.targets(190,5): error MSB4018: at Microsoft.DotNet.Build.Tasks.GetTargetMachineInfo.Execute()\r [C:\corefx\src\System.Xml.XDocument\tests\TreeManipulation\System.Xml.XDocument.TreeManipulation.Tests.csproj] C:\corefx\Tools\tests.targets(190,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()\r [C:\corefx\src\System.Xml.XDocument\tests\TreeManipulation\System.Xml.XDocument.TreeManipulation.Tests.csproj] C:\corefx\Tools\tests.targets(190,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() [C:\corefx\src\System.Xml.XDocument\tests\TreeManipulation\System.Xml.XDocument.TreeManipulation.Tests.csproj] ""C:\corefx\build.proj"" (default target) (1) -> ""C:\corefx\src\tests.builds"" (BuildAndTest target) (494) -> ""C:\corefx\src\System.Xml.XDocument\tests\System.Xml.XDocument.Tests.builds"" (BuildAndTest target) (750) -> ""C:\corefx\src\System.Xml.XDocument\tests\Streaming\System.Xml.XDocument.Streaming.Tests.csproj"" (BuildAndTest target) (768) -> C:\corefx\Tools\tests.targets(190,5): error MSB4018: The ""GetTargetMachineInfo"" task failed unexpectedly.\r [C:\corefx\src\System.Xml.XDocument\tests\Streaming\System.Xml.XDocument.Streaming.Tests.csproj] C:\corefx\Tools\tests.targets(190,5): error MSB4018: System.DllNotFoundException: Unable to load DLL 'api-ms-win-core-sysinfo-l1-2-0.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)\r [C:\corefx\src\System.Xml.XDocument\tests\Streaming\System.Xml.XDocument.Streaming.Tests.csproj] C:\corefx\Tools\tests.targets(190,5): error MSB4018: at Interop.mincore.GetNativeSystemInfo(SYSTEM_INFO& lpSystemInfo)\r [C:\corefx\src\System.Xml.XDocument\tests\Streaming\System.Xml.XDocument.Streaming.Tests.csproj] C:\corefx\Tools\tests.targets(190,5): error MSB4018: at System.Runtime.InteropServices.RuntimeInformation.get_OSArchitecture()\r [C:\corefx\src\System.Xml.XDocument\tests\Streaming\System.Xml.XDocument.Streaming.Tests.csproj] C:\corefx\Tools\tests.targets(190,5): error MSB4018: at Microsoft.DotNet.Build.Tasks.GetTargetMachineInfo.Execute()\r [C:\corefx\src\System.Xml.XDocument\tests\Streaming\System.Xml.XDocument.Streaming.Tests.csproj] C:\corefx\Tools\tests.targets(190,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()\r [C:\corefx\src\System.Xml.XDocument\tests\Streaming\System.Xml.XDocument.Streaming.Tests.csproj] C:\corefx\Tools\tests.targets(190,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() [C:\corefx\src\System.Xml.XDocument\tests\Streaming\System.Xml.XDocument.Streaming.Tests.csproj] 15 Warning(s) 160 Error(s) ``` [msbuild.log.txt](https://github.com/dotnet/corefx/files/249606/msbuild.log.txt) " 8297 area-System.Net LinuxNetworkInterface Id and Description implementation Currently NetworkInterface Id and Description throw PlatformNotSupportedException on Linux. I'd like to propose the following: Id returns _name Description returns _name The linux kernel does not grantee a network interface will have the same name after reboot but it can be done by using [udev](http://www.debianhelp.co.uk/udev.htm) or [systemd](https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/). 8307 area-Infrastructure Cross building much slower with new universal runner infrastructure. "As part of adopting the universal runners, we need to copy the entire packages folder from the builder machines to the test executor machines when we have to build managed code on Linux but test it on windows. Previously, the amount of data we needed to copy was on the order of 130 MB (this was the entire ""bin"" folder, de-duplicated in a zip file, via Packer). After the changes to also include the packages folder, we've grown to about 630 MB. We should figure out how to shrink this amount of data. I expect there is low-hanging fruit here (e.g. we are archiving all the nupkg's we downloaded, which we don't need? This removes about 300 MB from the compressed archive if we stop that). " 8311 area-System.Net Any plans to include NetworkAvailabilityChanged We use this event off `NetworkChange`, Portability Analyzer says NetworkChange is available but not that event. Any plans to bring this in for 1.0.0? 8315 area-System.Linq Consider adding System.Linq.Expressions into Standard Library Currently System.Linq.Expressions is not included in the .NETStandard.Library. While it's true that some cases might fallback to interpretation, there does seem to be an implementation that works everywhere. Even Xamarin.iOS had a solution to this (might be interpretation as well). 8319 area-System.IO Modify Path.Combine to not treat slashes as roots Path.Combine on all systems treats directory separators as the root. This is somewhat unexpected behavior on Windows and unhelpful on Unix. This commit changes the behaviors of all systems for path.Combine with path segments that begin with a DirectorySeparator and adds tests for the new behavior. No changes were made to invalid char checking. This is a breaking change. We should either merge this to resolve #7685 or close both by the RTM deadline. @JeremyKuhne @stephentoub @sokket 8320 area-System.Net Every time System.Net.Security\tests\FunctionalTests runs, some disk space gets eaten up permanently. "Every time System.Net.Security\tests\FunctionalTests runs, some disk space gets eaten up permanently. (That means every time people type ""build"" at the root.) To observe: ``` cd %APPDATA%\Roaming\Microsoft\Crypto\RSA cd S-1-5-21-2127521184-1604012920-1887927527-47149 // except yours will have different numbers: it's your user SID dir /A // Remember the number of files here. msbuild -t:clean;build;test System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj dir /A // Note now that a dozen or so around new files have appeared. This is happening every time // people type ""build"" at the root as our nice documentation says. ``` This is because the test loads up and imports certificates from PFX files. https://github.com/dotnet/corefx/blob/master/src/System.Net.Security/tests/FunctionalTests/TestConfiguration.cs#L58 Each time you call ""new X509Certificate2()"" or ""X509Certificate2Collection.Import()"" on a PFX file, a new key container is created on disk. To get rid of it, you need to call Dispose() on the X509Certificate2 you instantiated and/or the members of the X509Certificate2Collection you imported into. You cannot rely on the finalizer because process shutdown doesn't always wait for the finalizers to run. It would be preferable if each test created a new certificate instance and disposed it manually rather than caching these in the test class instance. See this commit (https://github.com/dotnet/corefx/commit/c0afa93132e2f13f403b26ea742c292e55e888c1) for how we fixed this in the X509 tests. If you can't get to this for a while, as a min-bar, please mark the tests that trigger PFX loads with the ""[Outerloop]"" attribute so they don't run on individual dev machines by default. " 8324 area-System.Linq Two PLINQ tests consistently fail on 6 core HT Xeon machine "I have a particular machine with a 6 core (Hyperthreaded to 12) CPU Xeon processor. On this machine both in Windows and an ubuntu VM, I see the following two tests always fail in System.Linq.Parallel tests: ``` ``` As this is the only machine like this I have like this, internal folks can stop by my office to investigate if needed. " 8328 area-Serialization Fix XmlAttributes.Remove behavior difference - The issue is due to implementation difference XmlAttributes.Remove throws on Desktop if item is not found whereas there is no exception on CoreCLR. - Since we don't want to update XmlAttributes back to legacy type CollectionBase, I'm changing these XmlAttributes type to derive from generic List<> and override Remove() method to throw on missing item. - Fix #5831 and also #7837 cc: @SGuyGe @zhenlan @shmao 8330 area-System.Net Uri known issues - [ ] Uri should not throw ArgumentOutOfRangeException for unknown schemes. - [ ] Normalization should produce the same result for escaped/unescaped URIs - [ ] Canonical IPv6 is still performed for unknown schemes. - [ ] IPAddrees doesn't accept bad scopes, Uri does. 8331 area-System.Net Porting System.Private.Uri tests Porting existing internal tests to GitHub. Porting new Unit Tests to GitHub. Fixing a production-code bug discovered by the UnitTests. Code format + sanitize Fixes #6580. @davidsh @ianhays @stephentoub @weshaggard PTAL 8337 area-Infrastructure "Centos tests are failing with ""Permission denied"":" "*NIX tests are failing with ""Permission denied"": http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/centos7.1_debug_prtest/932/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/centos7.1_release_prtest/929/ ``` 17:06:35 Finished running tests. End time=00:08:09. Return value was 126 17:06:35 ./RunTests.sh: line 199: ./corerun: Permission denied 17:06:35 error: One or more tests failed while running tests from ''. Exit code 126. 17:06:35 Running tests... Start time: 00:08:09 17:06:35 Commands: 17:06:35 ./corerun xunit.console.netcore.exe System.Net.Security.Tests.dll -xml testResults.xml -notrait Benchmark=true -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing -notrait category=nonlinuxtests 17:06:35 ./RunTests.sh: line 199: ./corerun: Permission denied 17:06:35 Finished running tests. End time=00:08:09. Return value was 126 17:06:35 error: One or more tests failed while running tests from ''. Exit code 126. 17:06:35 Finished running tests. End time=00:08:09. Return value was 126 17:06:35 error: One or more tests failed while running tests from ''. Exit code 126. 17:06:35 145 test(s) failed ``` " 8353 area-System.Runtime Consider adding UnixTime support to DateTime and DateTimeOffset "One of the big reasons to use dotnetcore is to be able to run on Linux. Please consider adding functions to output datetime to epoch format which is the standard on Linux environments. These suggestions may be a little off but they seem to make sense to me. Add a UnixTime DateTimeKind enum value https://msdn.microsoft.com/en-us/library/shx7s921(v=vs.110).aspx DateTimeOffset can output in unix time using a special function already https://msdn.microsoft.com/en-us/library/system.datetimeoffset.tounixtimeseconds(v=vs.110).aspx But it has no constructor allowing you to initialize a DateTimeOffset from an int64 and DateTimeKind enum. Consider adding this https://msdn.microsoft.com/en-us/library/system.datetimeoffset(v=vs.110).aspx DateTime has a constuctor taking int64 and DateTimeKind, but the int64 represents ticks instead of seconds. Consider setting the behavior for DateTime(int64, DateTimeKind (of UnixTime)) to initialize a DateTime using int64 as seconds instead of ticks, or add a FromUnixTime(int64 seconds) method if you don't want to confuse the payload of the int64 parameter. https://msdn.microsoft.com/en-us/library/w0d47c9c(v=vs.110).aspx. Consider adding a ToUnixTime method to the DateTime structure. Consider adding support for an ""e"" string in ToString, for epoch format, https://msdn.microsoft.com/en-us/library/system.datetimeoffset(v=vs.110).aspx " 8355 area-System.IO Unix Pipes temp directory creation has ACL issues for multi users. When the pipes code creates the temporary directory (/tmp/.dotnet/corefx) it will create the directories with 700 permissions if they are missing. Once this is done, no other user can use this name. This breaks cases where you run dotnet apps as two different users (a common case would be you run one app as root and then another as your local user. If the root one runs first, you can no longer use pipes). Perhaps we need to scope stuff in /tmp based on the current UID? 8356 area-System.Net Assertion in TryPreprocessIPv6Address within the *NIX IPAddressPAL Repro test: System.PrivateUri.Tests.UriIpHostTest.UriIPv6Host_BadAddresses_AllFail() From http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_debug_prtest/823/testReport/junit/System.PrivateUri.Tests/UriIpHostTest/UriIPv6Host_BadAddresses_AllFail/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_debug_prtest/823/ ``` MESSAGE: System.Diagnostics.Debug+DebugAssertException : at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) at System.Diagnostics.Debug.Assert(Boolean condition) at System.Net.IPAddressPal.TryPreprocessIPv6Address(String input, String& host, String& port) at System.Net.IPAddressPal.Ipv6StringToAddress(String ipString, Byte[] bytes, UInt32& scope) at System.Net.IPAddressParser.Parse(String ipString, Boolean tryParse) at System.Net.IPAddress.TryParse(String ipString, IPAddress& address) at System.PrivateUri.Tests.UriIpHostTest.ParseBadIPv6Address(String badIpv6String) at System.PrivateUri.Tests.UriIpHostTest.UriIPv6Host_BadAddresses_AllFail() at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Xunit.Sdk.TestInvoker`1.CallTestMethod(Object testClassInstance) at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.<b__1>d.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass46_1.b__1() at Xunit.Sdk.ExecutionTimer.d__4.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) at Xunit.Sdk.ExceptionAggregator.d__9.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) at Xunit.Sdk.TestInvoker`1.d__46.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance) at Xunit.Sdk.TestInvoker`1.<b__45_0>d.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) at Xunit.Sdk.TestInvoker`1.b__45_0() at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) at Xunit.Sdk.XunitTestRunner.d__4.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator) at Xunit.Sdk.ExceptionAggregator.d__10`1.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) at Xunit.Sdk.TestRunner`1.d__43.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) at Xunit.Sdk.TestRunner`1.RunAsync() at Xunit.Sdk.TestCaseRunner`1.d__19.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) at Xunit.Sdk.TestCaseRunner`1.RunAsync() at Xunit.Sdk.TestMethodRunner`1.d__32.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() at Xunit.Sdk.TestMethodRunner`1.d__31.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) at Xunit.Sdk.TestMethodRunner`1.RunAsync() at Xunit.Sdk.TestClassRunner`1.d__38.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() at Xunit.Sdk.TestClassRunner`1.d__37.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) at Xunit.Sdk.TestClassRunner`1.RunAsync() at Xunit.Sdk.TestCollectionRunner`1.d__28.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() at Xunit.Sdk.TestCollectionRunner`1.d__27.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) at Xunit.Sdk.TestCollectionRunner`1.RunAsync() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) at Xunit.Sdk.MaxConcurrencySyncContext.RunOnSyncContext(SendOrPostCallback callback, Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc() at Xunit.Sdk.XunitWorkerThread.<>c.b__5_0(Object _) at System.Threading.Tasks.Task.Execute() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) +++++++++++++++++++ STACK TRACE: at System.Diagnostics.Debug.UnixDebugLogger.ShowAssertDialog(String stackTrace, String message, String detailMessage) at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) at System.Diagnostics.Debug.Assert(Boolean condition) at System.Net.IPAddressPal.TryPreprocessIPv6Address(String input, String& host, String& port) at System.Net.IPAddressPal.Ipv6StringToAddress(String ipString, Byte[] bytes, UInt32& scope) at System.Net.IPAddressParser.Parse(String ipString, Boolean tryParse) at System.Net.IPAddress.TryParse(String ipString, IPAddress& address) at System.PrivateUri.Tests.UriIpHostTest.ParseBadIPv6Address(String badIpv6String) at System.PrivateUri.Tests.UriIpHostTest.UriIPv6Host_BadAddresses_AllFail() ``` 8357 area-System.IO Make win8 ARM clrcompression pkg win7-arm is not a valid RID. This commit removes that package and replaces it with an equivalent win8-arm package. resolves #7436 @weshaggard @ericstj 8358 area-System.IO Expose Stream.Begin/EndRead/Write in System.IO contract We really want devs to use Stream.Read/WriteAsync, but not having these Begin/End methods exposed breaks portability scenarios, e.g. where a stream in the full framework wraps another stream (e.g. SslStream) and the wrapper's async implementation wraps the Begin/End methods on the underlying Stream. Without these Begin/End members in the contract, it's impossible for a portable Stream implementation to plug in to that wrapper correctly. The core work here (for RTM) is to: - Expose the Begin/EndRead/Write virtual methods in the contract - Fix all of our Stream implementations in corefx to override these. In some cases, the methods already exist and we just need to change them from internal methods to public overrides. In other cases, we need to implement them and can do so easily on top of the Read/WriteAsync implementations. After that, we can optionally consider: - Changing the base Stream.Begin/EndRead/Write implementation to check if ReadAsync/WriteAsync are overridden, and if they are, delegating to those instead of queueing a work item that invokes the synchronous Read/Write. There are potential issues here, though, e.g. if a Stream overrides ReadAsync/WriteAsync to delegate to Begin/End which it doesn't override, at which point they'll end up in an infinite redirection loop. There may be ways to mitigate that. If we added that, we need a similar change (under a quirk) in the full framework. cc: @weshaggard, @terrajobst, @KrzysztofCwalina, @davidfowl, @benaadams 8359 area-System.ComponentModel Use generic collections in System.ComponentModel.TypeConverter implementation instead of non-generic 8360 area-System.Net IPAddress.ToString behavior difference: IPv6-mapped addresses format as regular IPv6 addresses From http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_debug_prtest/823/testReport/junit/System.PrivateUri.Tests/UriIpHostTest/UriIPv6Host_EmbeddedIPv4_Success/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_debug_prtest/823/ ``` MESSAGE: Assert.Equal() Failure ↓ (pos 10) Expected: [::ffff:0:c0a8:1] Actual: [::ffff:0:192.168.0.1] ↑ (pos 10) +++++++++++++++++++ STACK TRACE: at System.PrivateUri.Tests.UriIpHostTest.ParseIPv6Address(String ipv6String) at System.PrivateUri.Tests.UriIpHostTest.UriIPv6Host_EmbeddedIPv4_Success() ``` 8361 area-System.Net IPAddress.Parse behavior difference: failure to reject many bad IP address strings. System.PrivateUri.Tests.UriIpHostTest.UriIPv4Host_BadAddresses_AllFail From: http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_debug_prtest/823/testReport/junit/System.PrivateUri.Tests/UriIpHostTest/UriIPv4Host_BadAddresses_AllFail/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_debug_prtest/823/ ``` MESSAGE: 127.0.0.1 \nExpected: False\nActual: True +++++++++++++++++++ STACK TRACE: at System.PrivateUri.Tests.UriIpHostTest.ParseBadIPv4Address(String badIpv4String) at System.PrivateUri.Tests.UriIpHostTest.UriIPv4Host_BadAddresses_AllFail() ``` 8362 area-System.Net IPAddress.TryParse behavior difference: dotted octal In OSX _only_ there are 3 tests failing for the dotted octal IP format: http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/osx_debug_prtest/867/ - [ ] UriIPv4Host_DottedOctalExtraLeadingZeros_Success ``` Assert.Equal() Failure\n ↓ (pos 0)\nExpected: 235.73.31.33\nActual: 157.59.25.27\n ↑ (pos 0) +++++++++++++++++++ STACK TRACE: at System.PrivateUri.Tests.UriIpHostTest.ParseIPv4Address(String ipv4String) at System.PrivateUri.Tests.UriIpHostTest.UriIPv4Host_DottedOctalExtraLeadingZeros_Success() ``` - [ ] UriIPv4Host_PartialOctal_Success ``` MESSAGE: Assert.Equal() Failure\n ↓ (pos 10)\nExpected: 157.59.25.33\nActual: 157.59.25.27\n ↑ (pos 10) +++++++++++++++++++ STACK TRACE: at System.PrivateUri.Tests.UriIpHostTest.ParseIPv4Address(String ipv4String) at System.PrivateUri.Tests.UriIpHostTest.UriIPv4Host_PartialOctal_Success() ``` - [ ] UriIPv4Host_DottedOctal_Success ``` MESSAGE: Assert.Equal() Failure\n ↓ (pos 0)\nExpected: 235.73.31.33\nActual: 157.59.25.27\n ↑ (pos 0) +++++++++++++++++++ STACK TRACE: at System.PrivateUri.Tests.UriIpHostTest.ParseIPv4Address(String ipv4String) at System.PrivateUri.Tests.UriIpHostTest.UriIPv4Host_DottedOctal_Success() ``` 8366 area-System.Net System.Net.Http.Functional.Tests RevokedCertificate 2 tests fail Failures on Ubuntu: http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_release_prtest/854/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_release_prtest/854/ Failures on Centos: http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/centos7.1_release_tst_prtest/861/consoleFull#6262143651f1a4601-6aec-4fd5-b678-78d4389fd5e8 ``` MESSAGE: Assert.Throws() Failure Expected: typeof(System.Net.Http.HttpRequestException) Actual: typeof(System.Threading.Tasks.TaskCanceledException): A task was canceled. +++++++++++++++++++ STACK TRACE: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.Http.HttpClient.d__58.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` ``` MESSAGE: System.Threading.Tasks.TaskCanceledException : A task was canceled. +++++++++++++++++++ STACK TRACE: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.Http.HttpClient.d__58.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.Http.Functional.Tests.HttpClientHandler_ServerCertificates_Test.d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` 8367 area-Infrastructure "Several tests ""Aborted"" on CentOS" From : http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/centos7.1_debug_tst_prtest/858/consoleFull#6262143651f1a4601-6aec-4fd5-b678-78d4389fd5e8 ``` 15:26:50 ./RunTests.sh: line 198: 33206 Aborted ./corerun xunit.console.netcore.exe System.Reflection.TypeExtensions.Tests.dll -xml testResults.xml -notrait Benchmark=true -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing -notrait category=nonlinuxtests 15:26:50 Finished running tests. End time=22:28:27. Return value was 134 15:26:50 error: One or more tests failed while running tests from ''. Exit code 134. 15:26:50 Finished running tests. End time=22:28:27. Return value was 0 15:26:50 ./RunTests.sh: line 198: 33345 Segmentation fault ./corerun xunit.console.netcore.exe System.Reflection.Tests.dll -xml testResults.xml -notrait Benchmark=true -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing -notrait category=nonlinuxtests 15:26:50 Finished running tests. End time=22:28:27. Return value was 139 15:26:50 error: One or more tests failed while running tests from ''. Exit code 139. 15:27:06 ./RunTests.sh: line 201: 40586 Aborted ./corerun xunit.console.netcore.exe System.Runtime.Tests.dll -xml testResults.xml -notrait Benchmark=true -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing -notrait category=nonlinuxtests 15:27:06 Finished running tests. End time=22:28:43. Return value was 134 ``` 8369 area-Infrastructure Building CoreFx on Windows requires both MsBuild 12.0 and 14.0 tools installed The instructions for setting up a machine to build CoreFx are not precise and can lead to problems building. The instructions right now say: https://github.com/dotnet/corefx/blob/master/Documentation/building/windows-instructions.md “Visual Studio 2015 is required.” However, that is not sufficient using the default settings of Visual Studio 2015 install. The default settings will only install MsBuild 14.0. But the CoreFx CSPROJ and other scripts seem to want MsBuild 12.0 (you will see warning messages when doing “build” from the CoreFx root directory). In addition, it ends up using the C# 5 compiler: ![image](https://cloud.githubusercontent.com/assets/7684835/15089388/f19df56e-13b6-11e6-8b32-1ca1c936e675.png) This will cause compilation errors in System.Net.Http/src for example due to C# 6 features being used in the source files. The fix is to install these additional things from Visual Studio 2015. This will install MsBuild 12.0 tools. ![image](https://cloud.githubusercontent.com/assets/7684835/15089391/f85c2a2e-13b6-11e6-89b7-bb5cd0faf2fb.png) Which then results in the C# 6 compiler being used: ![image](https://cloud.githubusercontent.com/assets/7684835/15089394/ff56d630-13b6-11e6-9f7a-43d438f5ca89.png) Why does our build system require both MsBuild 12.0 and MsBuild 14.0 tools? 8371 area-System.Net Dns.GetHostAddressesAsync is blocking a ThreadPool thread The implementation of Dns.GetHostAddressesAsync is just a wrapper around the blocking implementation and is queued on the ThreadPool. https://github.com/dotnet/corefx/blob/1baa9ad06a466a5d6399e1e0a7a7a02564ab51b0/src/System.Net.NameResolution/src/System/Net/DNS.cs#L274 This can lead to a ThreadPool starvation when there are many concurrent calls of GetHostAddressAsync in an environment where the DNS is slow. The code in .Net 4.6 is slightly different but suffers from the same issue: http://referencesource.microsoft.com/#System/net/System/Net/DNS.cs,744 Windows and Linux both provides real asynchronous calls to resolve a DNS. The asynchronous implementation could use these. 8372 area-System.Security Add System.Security.SecureString to corefx We'd previously removed it due to not believing in the type, but it's used by enough apps that it's important to provide simply to aid in porting. This reverts the previous removal, and then does a bunch of work to fix it up to build and run again successfully. cc: @bartonjs, @weshaggard, @ellismg 8373 area-System.Net Add InvalidCredentialException to System.Net.Security contract It looks like this exception type was inadvertently left out of the contract file. It's a public type in the implementation and it's thrown in several places. cc: @davidsh, @cipop 8376 area-System.IO Reduce the minimum buffer size required by the StreamWriter class `StreamWriter` forces its `bufferSize` constructor parameter to be at least `128`. There is no workaround. This seems unnecessarily limiting. `bufferSize = 128` actually consumes about `256+(128*3)` bytes of memory with UTF8 (I checked this using the debugger). This is a significant amount of memory per instance. If the user really wants a smaller size, maybe knowing something about the data distribution, the user-specified value should take effect. For example, I might know that I will be writing only a few dozen bytes when serializing a cookie or an HTTP header. Simply lowering this minimum value would be a compatibility concern. So I propose this: The user-specified `bufferSize` value should be used with a minimum of `1`. Each time the buffer is actually exhausted, grow the internal buffers by doubling them each time until a size of `128` is reached. This way the user can specify a smaller buffer size if they know that not much data will be coming. But if a small size was mistakenly specified `StreamWriter` will quickly adapt to a bigger, more efficient buffer. This mitigates the compatibility concern. An alternative scheme would be to always start with a size of `16` and double until `max(bufferSize, 128)` is reached. That way the user-provided value is taken as a maximum instead of a precise value. I'm not convinced this scheme should be implemented. Just mentioning it. 8377 area-System.Net Add SSL support to LoopbackServer in HTTP tests We currently make a lot of calls off-box in our unit tests. By adding SSL support to the loopback server, we should be able to convert many more tests to avoid needing to actually hit the network. This adds such basic support, and converts a few tests to use it. Per previous PR feedback, I also moved the client-related code out of the loopback server, moving it to the call sites. Those call sites will be more easily reviewed with whitespace-diffing disabled, as the majority of the changes are indentation due to adding using blocks. Also, since I was moving the certificate configuration code to a central location, I fixed an issue related to cleanup. Fixes https://github.com/dotnet/corefx/issues/8320 cc: @davidsh, @cipop, @bartonjs 8378 area-System.IO Add Stream.Begin/EndRead and Stream.Begin/EndWrite While we want developers to implement and consume the ReadAsync/WriteAsync methods on Stream, not having the older Begin/End\* methods causes portability problems for libraries (it also makes porting harder). This commit adds back the virtual methods in the contract and provides an implementation for Stream in corert (coreclr already has implementations in mscorlib). It also provides overrides on the streams defined in System.IO.dll. Once a new package is published with this updated contract, I'll add overrides to the rest of our stream implementations in corefx as well as tests. cc: @ianhays, @weshaggard, @danmosemsft, @KrzysztofCwalina, @jkotas 8379 area-System.Security Evaluate the impact of changing to CryptProtectData in SecureString https://github.com/dotnet/corefx/pull/8372 is resurrecting a CoreFx implementation of SecureString. The desktop version uses CryptProtectMemory at the SAME_PROCESS scope. The current corefx version uses CryptProtectData, which is a SAME_USER scope. There are two compatibility changes to consider: 1) CoreFx effectively allows a SecureString to now be marshalled into another process (though there are complicated things making that hard still) 2) The desktop and CoreFx versions might not have the same behavior under impersonation. At minimum a test should be done for behavioral differences across an impersonation boundary; and the SAME_PROCESS v SAME_USER impact should be considered. One solution may be to build UWP as CryptProtectData, but the full-Windows version as CryptProtectMemory. 8380 area-System.Net Add way to receive RemoteEndPoint from TcpClient I'm working on porting one of my networking libraries to .NET Core, and some of the changes made to sockets and TcpClient have made some information impossible to get. I was using a derived version of NetworkStream, however with the removal of the Client property, I could not create that anymore. I can work without that, but with neither NetworkStream or TcpClient providing the RemoteEndPoint of the socket, I cannot receive the remote address or remote port of the client. In addition, because of the removal of Async methods from Socket, I can't use raw sockets either. Any chance a way to get RemoteEndPoint data from a TcpClient or NetworkStream, a way to get the raw Socket again from TcpClient, or Task based async methods on raw Sockets? 8382 area-System.IO Add async overloads to BinaryReader/Writer Because I'd love to use it to read/write things, asynchronously from the network. 8385 area-Infrastructure "Skipping build of test assemblies when ""skiptests"" is specified" On Unix, one can specify the `skiptests` command line option to `build.sh`. However, it still compiles all the test assemblies and increases the overall compile time. Shouldn't the build of test assemblies be actually skipped too? 8386 area-Infrastructure chmod errors when building on Linux When building on Linux, I'm getting a lot of those messages. Luckily they do not cause the build to break. It would be nice however to not have those: ``` Common.Tests -> /home/local/Microsoft/corefx/bin/Unix.AnyCPU.Debug/Common.Tests/Common.Tests.dll chmod: cannot access ‘/home/local/Microsoft/corefx/bin/tests/Unix.AnyCPU.Debug/Common.Tests/dnxcore50/corerun’: No such file or directory ``` 8389 area-System.Net PostSyncBlockingContentUsingChunkedEncoding_Success failed on Windows in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/windows_nt_debug/247/consoleText ``` System.Net.Http.Functional.Tests.PostScenarioTest.PostSyncBlockingContentUsingChunkedEncoding_Success(serverUri: https://corefx-net.cloudapp.net/Echo.ashx) [FAIL] System.Threading.Tasks.TaskCanceledException : A task was canceled. Stack Trace: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() D:\j\workspace\windows_nt_debug88592b53\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs(850,0): at System.Net.Http.WinHttpHandler.d__102.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() D:\j\workspace\windows_nt_debug88592b53\src\System.Net.Http\src\System\Net\Http\HttpClient.cs(392,0): at System.Net.Http.HttpClient.d__58.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() D:\j\workspace\windows_nt_debug88592b53\src\System.Net.Http\tests\FunctionalTests\PostScenarioTest.cs(171,0): at System.Net.Http.Functional.Tests.PostScenarioTest.d__22.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() D:\j\workspace\windows_nt_debug88592b53\src\System.Net.Http\tests\FunctionalTests\PostScenarioTest.cs(85,0): at System.Net.Http.Functional.Tests.PostScenarioTest.d__14.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` 8390 area-System.Numerics divremTest.RunDivRemTests failed on OSX in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_osx_debug/29/consoleText ``` System.Numerics.Tests.divremTest.RunDivRemTests [FAIL] Out parameters not matching Expected: True Actual: False Stack Trace: System.Threading -> /Users/dotnet-bot/j/workspace/dotnet_corefx/master/outerloop_osx_debug/bin/OSX.AnyCPU.Debug/System.Threading/System.Threading.dll at System.Numerics.Tests.StackCalc.VerifyOutParameter() at System.Numerics.Tests.divremTest.VerifyDivRemString(String opstring) at System.Numerics.Tests.divremTest.RunDivRemTests() ``` 8392 area-Infrastructure Clean.cmd and .sh should offer an option to prevent user prompt on failures "When Clean.cmd or .sh fail to unlink a file during the 'git clean -xdf' phase, they prompt ""Should I try again?"" This is fatal for an automated environment like CI and will require manual intervention. Clean should offer an option that prevents prompts. Possible solution is: - Optionally 'set GIT_ASK_YESNO=false' in clean.cmd I would prefer this prompt suppression should be the default. Interactive users can see the failures and try again, but lab machines cannot. Any netci.groovy scripts using clean.cmd/sh or doing manual 'git clean -xdf' should also be aware of whichever option is chosen and use it. " 8393 area-System.Security Several EnvelopedCms test failures on Windows 7 and Windows 8.1 **Windows 7** http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_win7_release/lastCompletedBuild/testReport/System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests/StateTests/PostDecrypt_Encode/ Stacktrace MESSAGE: Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : Cannot find the certificate and private key for decryption +++++++++++++++++++ STACK TRACE: at System.Security.Cryptography.Pkcs.EnvelopedCms.DecryptContent(RecipientInfoCollection recipientInfos, X509Certificate2Collection extraStore) at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.StateTests.PostDecrypt_Encode() http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_win7_release/lastCompletedBuild/testReport/System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests/EdgeCasesTests/ImportEdgeCaseSki/ Stacktrace MESSAGE: Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : Cannot find the certificate and private key for decryption +++++++++++++++++++ STACK TRACE: at System.Security.Cryptography.Pkcs.EnvelopedCms.DecryptContent(RecipientInfoCollection recipientInfos, X509Certificate2Collection extraStore) at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.EdgeCasesTests.ImportEdgeCaseSki() http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_win7_debug/lastCompletedBuild/testReport/System.Net.Security.Tests/CertificateValidationClientServer/CertificateValidationClientServer_EndToEnd_Ok_useClientSelectionCallback__False_/ System.Net.Security.Tests.CertificateValidationClientServer.CertificateValidationClientServer_EndToEnd_Ok(useClientSelectionCallback: False) (from (empty)) MESSAGE: System.AggregateException : One or more errors occurred. (Assert.Equal() Failure\r\nExpected: RemoteCertificateChainErrors\r\nActual: RemoteCertificateNotAvailable)\r\n---- Assert.Equal() Failure\r\nExpected: RemoteCertificateChainErrors\r\nActual: RemoteCertificateNotAvailable +++++++++++++++++++ STACK TRACE: at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout) at System.Net.Security.Tests.CertificateValidationClientServer.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at System.Net.Security.Tests.CertificateValidationClientServer.ServerSideRemoteClientCertificateValidation(Object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) at System.Net.Security.SslStream.UserCertValidationCallbackWrapper(String hostName, X509Certificate2 certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) at System.Net.Security.SecureChannel.VerifyRemoteCertificate(RemoteCertValidationCallback remoteCertValidationCallback) at System.Net.Security.SslState.CompleteHandshake() at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.WriteCallback(IAsyncResult transportResult) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) at System.Net.Security.SslStream.EndAuthenticateAsServer(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) **Windows 8.1** http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_windows_nt_debug/lastCompletedBuild/testReport/System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests/DecryptTests/Decrypt_IssuerAndSerial/ Stacktrace MESSAGE: Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : Keyset does not exist +++++++++++++++++++ STACK TRACE: at System.Security.Cryptography.Pkcs.EnvelopedCms.DecryptContent(RecipientInfoCollection recipientInfos, X509Certificate2Collection extraStore) in D:\j\workspace\outerloop_win---bf7c4efa\src\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 240 at System.Security.Cryptography.Pkcs.EnvelopedCms.Decrypt(X509Certificate2Collection extraStore) in D:\j\workspace\outerloop_win---bf7c4efa\src\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 188 at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.DecryptTests.VerifySimpleDecrypt(Byte[] encodedMessage, CertLoader certLoader, ContentInfo expectedContent) in D:\j\workspace\outerloop_win---bf7c4efa\src\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\DecryptTests.cs:line 210 at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.DecryptTests.TestSimpleDecrypt_RoundTrip(CertLoader certLoader, ContentInfo contentInfo, String algorithmOidValue, SubjectIdentifierType type) in D:\j\workspace\outerloop_win---bf7c4efa\src\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\DecryptTests.cs:line 196 at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.DecryptTests.Decrypt_IssuerAndSerial() in D:\j\workspace\outerloop_win---bf7c4efa\src\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\DecryptTests.cs:line 30 8396 area-System.Diagnostics Windows 8.1 outerloop release - System.Diagnostics.Tests.ProcessStartInfoTests.TestUserCredentialsPropertiesOnWindows http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_windows_nt_release/lastCompletedBuild/testReport/System.Diagnostics.Tests/ProcessStartInfoTests/TestUserCredentialsPropertiesOnWindows/ Stacktrace MESSAGE: System.InvalidOperationException : No process is associated with this object. +++++++++++++++++++ STACK TRACE: at System.Diagnostics.Process.EnsureState(State state) in D:\j\workspace\outerloop_win---65ef7d78\src\System.Diagnostics.Process\src\System\Diagnostics\Process.cs:line 779 at System.Diagnostics.Process.get_HasExited() in D:\j\workspace\outerloop_win---65ef7d78\src\System.Diagnostics.Process\src\System\Diagnostics\Process.cs:line 189 at System.Diagnostics.Tests.ProcessStartInfoTests.TestUserCredentialsPropertiesOnWindows() in D:\j\workspace\outerloop_win---65ef7d78\src\System.Diagnostics.Process\tests\ProcessStartInfoTests.cs:line 393 8398 area-System.Reflection Alternative for Assembly.Location / bring back Assembly.Location Getting the location of a loaded assembly is a core feature of the Assembly class. Now that the Assembly.Location property is only available in .net standard 1.5, how can code targeting lower platform versions retrieve the path where an assembly got loaded from? Alternatively, can Assembly.Location be brought back? According to msdn it was there since 1.1: https://msdn.microsoft.com/en-us/library/system.reflection.assembly.location(v=vs.110).aspx 8399 area-System.Net Disable BadCertificate test failing on Windows "This has recently been failing on Windows (inconsistently), with errors like ""A security error occurred"" and ""The buffers supplied to a function was too small"". https://github.com/dotnet/corefx/issues/7812 cc: @davidsh " 8410 area-System.IO FileSystemWatcher Test failure: FileSystemWatcher_File_Create_DeepDirectoryStructure Creating a file in a nested directory does not always send a Created event on some Linux distros. This results in the `FileSystemWatcher_File_Create_DeepDirectoryStructure` test failing intermittently. 8413 area-System.Net Fix PhysicalAddress.Equals() PhysicalAddress.Equals() returned false for 2 PhysicalAddress instances with byte array contents that are equal but not reference equals. 8414 area-System.Net SslStream/NegotiateStream should throw InvalidCredentialException when the authentication fails and cannot be retried According to MSDN: https://msdn.microsoft.com/en-us/library/system.security.authentication.invalidcredentialexception(v=vs.110).aspx > The exception that is thrown when authentication fails for an authentication stream and cannot be retried. At the moment SslStream is throwing only `AuthenticationException`. 8415 area-System.IO FileSystem: Implement WinRT File Enumeration "The enumeration in WinRTFileSystem is currently stubbed out to return an empty array. This commit adds an implementation with behavior matching the Win32FileSystem as much as possbible. There are still a few differences: - Search paths that contain a file with an extension containing a wildcard will have those extensions ignored when filtering results. - Double dot ("".."") search patterns do not throw an ArgumentException like they do on Win32. resolves #8108 @ericstj " 8418 area-Serialization ReflectionBasedDCS: Fix 5 test failures, MemberInfo, DateTimeOffset, KeyValuePair Fix the following 5 tests: DCS_DateTimeOffsetAsRoot DCS_DataMemberAttribute DCS_DuplicatedKnownTypesWithAdapterThroughConstructor DCS_DuplicatedKeyDateTimeOffset DCS_MyPersonSurrogate cc: @SGuyGe @shmao @zhenlan 8422 area-Serialization Nullref while deserializing on many threads with DataContractJsonSerializer "Updating the packages used for serialization seems to have introduced a crash. Repro: 1) dotnet new 2) replace program.cs with [this](https://gist.github.com/billwert/183050efed9a3ff9856dda9cd58be86c#file-program-cs) 3) Add these to your project.json: ""System.Runtime.Serialization.Json"": ""4.0.2-rc3-24109-00"", ""System.Runtime.Serialization.Primitives"": ""4.1.1-rc3-24109-00"" 4) dotnet restore 5) dotnet build 6) dotnet run It should crash with something like this at the top of the stack: Unhandled Exception: System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.) (Object reference not set to an instance of an object.) (Object reference not set to an instance of an object.) ---> System.NullReferenceException: Object reference not set to an instance of an object. at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at System.Runtime.Serialization.XmlFormatReaderGenerator.UnsafeGetUninitializedObject(Type type) at ReadPersonFromJson(XmlReaderDelegator , XmlObjectSerializerReadContextComplexJson , XmlDictionaryString , XmlDictionaryString[] ) Rolling the packages back to these will make the bug go away. ""System.Runtime.Serialization.Json"": ""4.0.2-rc3-23924"", ""System.Runtime.Serialization.Primitives"": ""4.1.1-rc3-23924"" " 8423 area-System.Security PublicKeyTests.TestKey_RSA failed in CI on Ubuntu 14.04 http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_release/254/consoleText ``` System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests.TestKey_RSA [FAIL] Assert.Equal() Failure Expected: Byte[] [1, 0, 1] Actual: Byte[] [] ``` 8424 area-System.Net Disable ConnectTimeoout test on Linux It's failing on Ubuntu 16.04. Something about the curl used in CI is likely wrong. https://github.com/dotnet/corefx/issues/8181 8425 area-System.Security System.Security.SecureString.Tests fails using Ubuntu 14.04.3 LTS I noticed one error when building the corefx repository. The repository was freshly cloned to ensure it wasn't fixed in the meantime. An extract of the `msbuild.log` file (hopefully) indicating the issue. [https://gist.github.com/TorbenJ/40e4fe407d18976bb0d881a606f4a048](url) I tried to build using `./build.sh` and another time using `./build.sh Linux` with the same results. 8426 area-System.Net PostNonRewindableContentUsingAuth_PreAuthenticate_Success failed on Windows in CI The handle is invalid error. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/windows_nt_release_prtest/1074/consoleText ``` System.Net.Http.Functional.Tests.PostScenarioTest.PostNonRewindableContentUsingAuth_PreAuthenticate_Success(serverUri: http://corefx-net.cloudapp.net/Echo.ashx?auth=basic&user=user1&password=password1) [FAIL] System.Net.Http.HttpRequestException : An error occurred while sending the request. ---- System.Net.Http.WinHttpException : The handle is invalid Stack Trace: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Http\src\System\Net\Http\HttpClient.cs(392,0): at System.Net.Http.HttpClient.d__58.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Http\tests\FunctionalTests\PostScenarioTest.cs(207,0): at System.Net.Http.Functional.Tests.PostScenarioTest.d__23.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Http\tests\FunctionalTests\PostScenarioTest.cs(149,0): at System.Net.Http.Functional.Tests.PostScenarioTest.d__21.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs(1331,0): at System.Net.Http.WinHttpHandler.InternalSendRequestAsync(WinHttpRequestState state) D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs(843,0): at System.Net.Http.WinHttpHandler.d__102.MoveNext() ``` 8429 area-System.Runtime Addition ConditionalWeakTable.AddOrUpdate From https://github.com/dotnet/coreclr/issues/4545 Or indexer setter? At the moment you need to do ``` csharp lock (cwt) { cwt.Remove(key); cwt.Add(key, newValue); } ``` Would be nicer if you could just do ``` csharp cwt[key] = newValue; ``` or ``` csharp cwt.AddOrUpdate(key, newValue); ``` 8430 area-Infrastructure Enable ApiCompat for CoreFX builds @venkat-raman251 setup ApiCompat and did some initial clean runs but ever enabled it in the corefx builds. We need to enable by adding RunApiCompat=true (see https://github.com/weshaggard/corefx/commit/f208510f7720116c139f7fedbb89bbf31ebcc184), but before turning it on we have to clean-up the existing issues that have occurred since then. 8434 area-System.Net Improve WinHttpHandler logic regarding default credentials In some cases, WinHttpHandler was not sending default credentials that were specified inside a custom ICredentials object. In other cases, default credentials would be sent even though CredentialCache.DefaultCredentials was not specified. The code was incorrectly comparing the proxy and server credential (ICredential interface) values against the DefaultCredentials object. Instead, the ICredentials.GetCredential() method should be called to compute the final NetworkCredential object. This takes into account the given uri and auth scheme. This PR fixes the logic by delay the setting in WinHTTP for releasing default credentials. This ensures that default crdentials are released when requested. Fixes #8176. 8435 area-System.Net System.Net.Sockets\tests\PerformanceTests is not building on Windows "Running `msbuild /t:rebuild,test` on Windows will result in: ``` ""S:\c2\src\System.Net.Sockets\tests\PerformanceTests\System.Net.Sockets.Async.Performance.Tests.csproj"" (rebuild;test target) (1) -> (CoreCompile target) -> S:\c2\src\Common\tests\System\Net\Sockets\Performance\SocketTestClient.cs(209,18): error CS0103: The name 'SocketTestMemcmp' does not exist in the c urrent context [S:\c2\src\System.Net.Sockets\tests\PerformanceTests\System.Net.Sockets.Async.Performance.Tests.csproj] 0 Warning(s) 1 Error(s) ``` Specifying `/property:Configuration=Windows_Debug` (or `Linux_*`/`OSX_` works as expected). /cc @davidsh @himadrisarkar @ericeil " 8437 area-System.Net CertificateValidationClientServer_EndToEnd_Ok if failing on Windows7 ``` System.AggregateException : One or more errors occurred. (Assert.Equal() Failure\r\nExpected: RemoteCertificateChainErrors\r\nActual: RemoteCertificateNotAvailable)\r\n---- Assert.Equal() Failure\r\nExpected: RemoteCertificateChainErrors\r\nActual: RemoteCertificateNotAvailable +++++++++++++++++++ STACK TRACE: at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout) at System.Net.Security.Tests.CertificateValidationClientServer.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at System.Net.Security.Tests.CertificateValidationClientServer.ServerSideRemoteClientCertificateValidation(Object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) at System.Net.Security.SslStream.UserCertValidationCallbackWrapper(String hostName, X509Certificate2 certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) at System.Net.Security.SecureChannel.VerifyRemoteCertificate(RemoteCertValidationCallback remoteCertValidationCallback) at System.Net.Security.SslState.CompleteHandshake() at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.WriteCallback(IAsyncResult transportResult) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) at System.Net.Security.SslStream.EndAuthenticateAsServer(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) ``` Has been failing consistently in past 3 builds. 8439 area-System.IO System.IO.Tests.WaitForChangedTests.Created_Success(changeType: Created) [FAIL] From: http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/centos7.1_debug_tst_prtest/965/consoleFull#-21371504001f1a4601-6aec-4fd5-b678-78d4389fd5e8 Failed on Innerloop CentOS7.1 Debug Build and Test: ``` 14:05:40 System.IO.Tests.WaitForChangedTests.Created_Success(changeType: Created) [FAIL] 14:05:40 WaitForChanged didn't complete 14:05:40 Expected: True 14:05:40 Actual: False 14:05:40 Stack Trace: 14:05:40 at System.IO.Tests.WaitForChangedTests.Created_Success(WatcherChangeTypes changeType) 14:05:40 Finished: System.IO.FileSystem.Watcher.Tests 14:05:40 14:05:40 === TEST EXECUTION SUMMARY === 14:05:40 System.IO.FileSystem.Watcher.Tests Total: 185, Errors: 0, Failed: 1, Skipped: 0, Time: 11.844s 14:05:41 Finished running tests. End time=21:07:28. Return value was 1 14:05:41 error: One or more tests failed while running tests from ''. Exit code 1. ``` 8440 area-System.Net HttpClient Unstable on CoreCLR "I've been using HttpClient in my ASP.NET Core application, running on the (full) `clr` runtime. It works great. However, when I `dnvm use` to switch to `coreclr` runtime, then I've found that HttpClient invocations fail. At first this seems like this is a Kestrel issue, but please read my post through to learn my workaround. The workaround suggests this is an issue with HttpClient itself. To create this problem: - Run under `1.0.0-rc1-update2 coreclr`. I use `x86` for architecture, but I don't think that matters. - Execute an HttpClient request **in an async / await construct**. This part is necessary! - Perform back-to-back HttpClient POST requests that serialize payload (I have been using `Microsoft.AspNet.WebApi.Client v5.2.3` extensions, such as `PostAsJsonAsync`). I launch the test by typing `dnx test`, which launches xUnit. The first HttpClient request will work correctly. The next request will mysteriously receive a 404. When I insert fiddler to spy on traffic, it interferes by ""post-poning"" the problem; it allows two or three HttpClient requests to be processed before finally failing with a 404. Furthermore, Fiddler will only capture half or less of the traffic(!!!!) being received by Kestrel (even though all requests are coming from the same HttpClient object instance!). One of the 404 requests that was captured by both Fiddler and Kestrel looked like this: ``` PATCH http://localhost:60996/evt/Subscribers/bcf8edb0-dbae-4e83-bb8d-b5d966b2736b/AddNumbers HTTP/1.1 Content-Type: application/json; charset=utf-8 Accept-Encoding: gzip, deflate Connection: Keep-Alive Host: localhost:60996 Content-Length: 15 [""303 2968199""] ``` Looks normal. On the Kestrel side, it looks like this: ``` info: Microsoft.AspNet.Hosting.Internal.HostingEngine[1] Request starting HTTP/1.1 PATCH http://localhost:60996/evt/Subscribers/bcf8edb0-dbae-4e83-bb8d-b5d966b2736b/AddNumbers application/json; charset=utf-8 verb: Microsoft.AspNet.Mvc.Routing.InnerAttributeRoute[0] Request successfully matched the route with name '' and template 'evt/Subscribers/{id}/AddNumbers'. verb: Microsoft.AspNet.Mvc.Infrastructure.DefaultActionSelector[0] Action 'ApiBasics.Controllers.SubscribersController.AddNumbers' with id 'b482e6ad-649c-4885-9b7d-12a25e3b422a' did not match the constraint 'Microsoft.AspNet.Mvc.ActionConstraints.HttpMethodConstraint' verb: Microsoft.AspNet.Mvc.Infrastructure.MvcRouteHandler[3] No actions matched the current request verb: Microsoft.AspNet.Builder.RouterMiddleware[0] Request did not match any routes. ``` It would seem this is a Kestrel problem, but consider the workaround. If I simply Dispose() the HttpClient after every request, and re-create it fresh for each subsequent request - then I can successfully run this code on coreclr. Furthermore, if I don't use async/await constructs with HttpClient, then this problem also does not appear. Evidently, there is some sort of state that HttpClient is retaining between calls. Again, this work-around is not necessary and the problem does not occur **if I use dnvm to switch to `1.0.0-rc1-update2 clr`** and then run my test again. I'm launching my test via xUnit. I have an xUnit `IClassFixture` which launches Kestrel. In other words, I am performing in-memory fast integration tests. The versions I am using for these two tools are: ``` ""xunit.runner.dnx"": ""2.1.0-rc1-build204"", ""xunit"": ""2.2.0-beta1-build3239"", ""Microsoft.AspNet.Server.Kestrel"": ""1.0.0-rc1-final"", ``` ## Work-around Test Code To simplify my ability to test the ""restart HttpClient"" work-around, I have been using this code: ``` public class AsyncClient { Uri address; HttpClient client; public AsyncClient(Uri baseAddress) { address = baseAddress; client = new HttpClient(); client.BaseAddress = baseAddress; } public async Task Request(Func> call) { HttpResponseMessage response = null; using (var client = new HttpClient()) { client.BaseAddress = address; response = await call(client); } return response; } } ``` The above `AsyncClient` is registered as a singleton in my IOC container. By simply commenting the ""using"" line in the `Request` method, I can toggle between a singleton `HttpClient` or a ""per invocation"" `HttpClient`. ## Further Anomaly Using the `AsyncClient` code shown above, I can ensure the `HttpClient` is fresh for every request - and this allows the `coreclr` execution to be successful. However, when I change the address of the server so that Fiddler can intercept traffic, then this 404 problem occurs all over again!!!! So if the `HttpClient` base address normally points here: ``` http://localhost:60996 ``` And I change that address (for Fiddler's sake) to this address: ``` http://localhost.fiddler:60996 ``` Then the same 404 appears after the third or fourth request! And this time, my ""workaround"" can't save me...the `coreclr` execution simply will not work...due to these 404 issues. No Fiddler for `coreclr` !!! Incidentally, if I switch back to the full `clr` runtime...my errors might be gone, but Fiddler still only captures half the traffic that Kestrel is successfully receiving. Queue twilight zone music. :sweat: " 8443 area-System.Net Allow CurlHandler to work with link-local Uris on older libcurls "In https://github.com/dotnet/corefx/pull/8249 I modified CurlHandler to work with Uris that included scope/zone IDs. This was based on libcurl's parsing support for IPv6 uris with scope/zone IDs, but that support was added in libcurl v7.37, and some systems we target have an earlier version (e.g. Ubuntu 14.04 uses v7.35 by default). Rather than just saying ""use a newer libcurl"", we can use libcurl's CURLOPT_ADDRESS_SCOPE feature (which has been around for a very long time) to explicitly set the link-local scope ID when it's set, and allow such Uris to be used on older libcurls. cc: @ericeil, @davidsh, @cipop, @mikeharder " 8444 area-System.Net System.Net.Http.Functional.Tests.HttpClientHandler_SslProtocols_Test.GetAsync_AllowedSSLVersion_Succeeds(acceptedProtocol: Tls) failed in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_debug_prtest/994/testReport/junit/System.Net.Http.Functional.Tests/HttpClientHandler_SslProtocols_Test/GetAsync_AllowedSSLVersion_Succeeds_acceptedProtocol__Tls_/ ``` MESSAGE: System.Net.Http.HttpRequestException : An error occurred while sending the request.\n---- System.Net.Http.CurlException : Failure when receiving data from the peer +++++++++++++++++++ STACK TRACE: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at System.Net.Http.HttpClient.d__58.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at System.Net.Http.Functional.Tests.HttpClientHandler_SslProtocols_Test.<>c__DisplayClass4_0.<b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at System.Net.Http.Functional.Tests.LoopbackServer.<>c__DisplayClass3_0.b__0(Task t) at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at System.Net.Http.Functional.Tests.HttpClientHandler_SslProtocols_Test.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error) at System.Net.Http.CurlHandler.MultiAgent.FinishRequest(StrongToWeakReference`1 easyWrapper, CURLcode messageResult) ``` This was talking to the loopback server. 8445 area-System.Net Disable two recently added tests These were both added in the last few days and have both failed in CI at least once. cc: @ellismg 8449 area-System.Collections Why ImmutableList throws ArgumentOutOfRange instead of IndexOutOfRange on insertion Why `ImmutableList` throws `ArgumentOutOfRangeException` instead of `IndexOutOfRangeException` when index out of allowed range is passed to `Insert` method? 8450 area-System.Security X509Certificate2.GetECDsaPublicKey fails on UWP https://github.com/dotnet/corefx/blob/d0dc5fc099946adc1035b34a8b1f6042eddb0c75/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Windows/X509Pal.PublicKey.cs ``` C# private static ECDsa DecodeECDsaPublicKey(CertificatePal certificatePal) { using (SafeBCryptKeyHandle bCryptKeyHandle = ImportPublicKeyInfo(certificatePal.CertContext)) { ... } } private static SafeBCryptKeyHandle ImportPublicKeyInfo(SafeCertContextHandle certContext) { #if NETNATIVE // CryptImportPublicKeyInfoEx2() not in the UWP api list. throw new PlatformNotSupportedException(); #else ... #endif } ``` 8452 area-System.Net Moving SafeDeleteContext and SafeFreeCredentials to common location SafeFreeCredentials and SafeDeleteContext are used across two native libraries - libssl and System.Net.Security.Native. Moving these two classes a common location. 8453 area-System.Runtime System.Runtime.Loader depends on Net462 "Of all the Microsoft.NETCore.App dependencies only 1 requires something higher than Net46 and that package is System.Runtime.Loader. Why? The reason I ran into this was trying to cross compile a .NET console app between core and net46. To do this I need to target at least 4.6.2, but only for 1 package. It would be nice to know if that is a hard dependency, a nice to have, or a dependency that could be avoided. Repo: dotnet new vi project.json ``` { ""version"": ""1.0.0-*"", ""compilationOptions"": { ""emitEntryPoint"": true }, ""dependencies"": { ""Microsoft.NETCore.App"": { ""type"": ""platform"", ""version"": ""1.0.0-rc2-3002426"" } }, ""frameworks"": { ""netcoreapp1.0"": {}, ""net46"": {} } } ``` dotnet restore dotnet build Expected: dotnet build for .NETFramework,Version=v4.6 succeeds Actual: project.json(7,31): error NU1002: The dependency System.Runtime.Loader 4.0.0-rc2-24018 does not support framework .NETFramework,Version=v4.6. " 8454 area-System.Reflection API difference between ref assembly and actuall assembly `System.Reflection.ParameterInfo` defines a protected constructor in mscorlib, but in the ref assembly `System.Reflection` it does not. This prevents me from inheriting from it. While I suspect this is the very reason this is done... 1. Why change the API contract? 2. Why block me from inheriting (even more so only by ref assembly)? 8455 area-System.Security RSACertificateExtensions.GetRSAPrivateKey() fails on UWP Since 4.2.0-rc3-24105-00, in UWP, calling RSACertificateExtensions.GetRSAPrivateKey() results in: System.TypeLoadException occurred Message=Could not load type 'System.Security.Cryptography.ECDsa' from assembly 'System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Source=System.Security.Cryptography.X509Certificates I see in the package that the runtime changed from netstandard1.4 to 1.6. 4.1.0-rc3-24104 works fine. 8456 area-System.Net Fix HttpClient test hanging on machines with a single core One of the HttpClient client tests hangs on a machine with a single core. xunit by default uses a SynchronizationContext that has N threads to do work, where N defaults to Environment.ProcessorCount. Thus on a single core machine, there's only one thread available to run tests, and if that thread blocks waiting for an async operation that'll schedule work back to that context, it'll deadlock. cc: @davidsh, @bartonjs 8458 area-System.Net IPAddresses returned from System.Net.NetworkInformation are missing ScopeID on OSX and Linux "**Repro Steps** 1. Run the following code, and compare the results to ipconfig/ifconfig: ``` CSharp NetworkInterface.GetAllNetworkInterfaces() .SelectMany(i => i.GetIPProperties().UnicastAddresses) .Select(a => a.Address) .Where(a => a.IsIPv6LinkLocal) .ToList() .ForEach(ip => Console.WriteLine($""IP: {ip}, ScopeId: {ip.ScopeId}"")); ``` **Windows** .NET Core ``` IP: fe80::1234:5678:90ab:cdef%18, ScopeId: 18 IP: fe80::1234:5.6.7.8%15, ScopeId: 15 ``` ipconfig /all ``` Link-local IPv6 Address . . . . . : fe80::1234:5678:90ab:cdef%18(Preferred) ``` **OS X** .NET Core ``` IP: fe80::1, ScopeId: 0 IP: fe80::1234:5678:90ab:cdef, ScopeId: 0 ``` ifconfig ``` inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 inet6 fe80::1234:5678:90ab:cdef%en0 prefixlen 64 scopeid 0x4 ``` **Linux** .NET Core ``` IP: fe80::1234:5468:90ab:cdef, ScopeId: 0 ``` ifconfig ``` eth0 inet6 addr: fe80::1234:5678:90ab:cdef/64 Scope:Link ``` " 8462 area-System.Net Fix handling of ScopeIDs with IPAddresses in NetworkInformation We had the scopeId, we just weren't storing it into the IPAddress. (As with other aspects of NetworkInformation, this is hard to add a test for, but I'm going to add a test to the HttpClient suite that tries to use a link-local Uri with a loopback server, and that will implicitly provide some verification here, as that will only succeed if the scope ID is correct.) Fixes https://github.com/dotnet/corefx/issues/8458 cc: @mellinoe, @ericeil, @mikeharder 8464 area-System.Net Issues with Socket.GetSocketOption for errors on Linux "It seems I've stumbled on some behavior issues with Socket.GetSocketOption. In Npgsql I use a pretty standard pattern for non-blocking socket connect: ``` c# var ep = new IPEndPoint(IPAddress.Parse(""127.0.0.1""), 44444); var socket = new Socket(ep.AddressFamily, SocketType.Stream, ProtocolType.Tcp) { Blocking = false }; try { socket.Connect(ep); } catch (SocketException e) { if (e.SocketErrorCode != SocketError.WouldBlock) throw; } var write = new List { socket }; var error = new List { socket }; Socket.Select(null, write, error, -1); var errorCode = (int)socket.GetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Error); Console.WriteLine(""First getsockopt: "" + (SocketError)errorCode); if (errorCode != 0) { var second = (int)socket.GetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Error); Console.WriteLine(""Second getsockopt: "" + (SocketError)second); throw new SocketException(errorCode); } ``` The code above is supposed to fail with a ConnectionRefused since nobody's listening at 44444. On Linux/mono, as well as on Windows/coreclr and Windows/net451 the output of this code is ConnectionRefused from both GetSocketOption invocations. However, on Linux/coreclr I curiously get 111 from the first GetSocketOption, and Success from the second. " 8467 area-System.Net Add HttpClient test with IPv6 Uris Adds support to the loopback server for binding to IPv6 local addresses, then adds a test that uses both ::1 and a link-local address for the current machine. cc: @davidsh, @ericeil, @mellinoe, @mikeharder (Relies on https://github.com/dotnet/corefx/pull/8462; won't pass on Unix until that's merged.) 8468 area-Serialization Fix race condition issue in data contract serializers Use ConcurrentDictionary instead of Dictionary. I ran perf tests a few times to get the comparison before and after the change. Although there are noises in the results no consistent trend of regression is identified. Fix https://github.com/dotnet/corefx/issues/8422 cc: @shmao @SGuyGe @zhenlan 8470 area-System.Net Dispose of the inner HttpClient in HttpWebRequest While browsing through the code recently, I noticed that `HttpWebRequest` uses an `HttpClient` internally, which it does not dispose of afterwards. I made a quick fix to use `using` where the variables were initialized; since they're not saved to fields or anything I'm assuming I don't have to touch the finalizer/Dispose methods of this class. (Also assuming that since `client.SendAsync` is awaited immediately after it is invoked, we don't have to worry about the client being disposed before it finishes sending or anything.) Changes: - Added `using` statements - Indented the code (hence why the diff is so big, try adding ?w=1 to the end of the GitHub URL to unsee whitespace changes) cc @davidsh @stephentoub 8471 area-System.Net Fix translation in GetSocketOption with SocketOptionName.Error On Unix we're currently handing back the underlying errno value from the platform. We need to instead translate that to a SocketError value. Also added a test. Fixes https://github.com/dotnet/corefx/issues/8464 cc: @ericeil, @davidsh, @cipop, @roji 8472 area-System.Net Unhandled exception from SslStream in CI I'm not sure what test this is from, but it's from something in System.Net.Security.Tests http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/centos7.1_release_tst_prtest/1004/consoleText ``` Unhandled Exception: System.InvalidOperationException: This operation is only allowed using a successfully authenticated context. at System.Net.Security.SslState.CheckThrow(Boolean authSucessCheck) at System.Net.Security.SslState.get_SecureStream() at System.Net.Security.SslStream.Read(Byte[] buffer, Int32 offset, Int32 count) at System.IO.Stream.<>c.b__38_0(Object ) at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.IO.Stream.EndRead(IAsyncResult asyncResult) at System.Net.Security.Tests.DummyTcpServer.OnReceive(IAsyncResult result) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.IO.Stream.ReadWriteTask.System.Threading.Tasks.ITaskCompletionAction.Invoke(Task completingTask) at System.Threading.Tasks.Task.FinishContinuations() at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution) at System.Threading.ThreadPoolWorkQueue.Dispatch() ./RunTests.sh: line 198: 61827 Aborted ./corerun xunit.console.netcore.exe System.Net.Security.Tests.dll -xml testResults.xml -notrait Benchmark=true -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing -notrait category=nonlinuxtests ``` 8479 area-Infrastructure Enable checksumalgorithm:SHA256 for managed code. see https://github.com/dotnet/roslyn/issues/10451 We will need to generate an rsp file for this for now because it isn't exposed in the csc build task. 8480 area-System.Net Add configurable test settings for Http and WebSocket tests Building on the current use of environment variables for passing in test settings, added a common test helper class to allow the http and websocket tests to access alternate test servers. This will help with load balancing and network latency issues which are causing occasional timeouts in CI tests. This will also allow developers to run their own version of the Azure test endpoints. Consolidated the current environment variables used and standardized on a naming format. Fixes #2383. 8482 area-System.Net System.Net.Http surface area on Linux "When compiling the System.Net.Http.Functional tests with projectreferences converted to package dependencies, the build breaks due to differing surface area. I'm testing a temporary fix to opt system.net.http.functional tests out of the projectreference-> package dependency conversion, but these failures should be investigated so that we can reimplement to compile against packages instead of implementation assemblies if desired. This issue is tracking the failures. I'll provide better repro instructions soon. ``` ""D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj"" (Build target) (172) -> (CoreCompile target) -> HttpClientHandlerTest.Timeouts.cs(22,64): error CS1061: 'HttpClientHandler' does not contain a definition for 'ConnectTimeout' and no extension method 'ConnectTimeout' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.Timeouts.cs(34,74): error CS1061: 'HttpClientHandler' does not contain a definition for 'ConnectTimeout' and no extension method 'ConnectTimeout' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.Timeouts.cs(47,25): error CS1061: 'HttpClientHandler' does not contain a definition for 'ConnectTimeout' and no extension method 'ConnectTimeout' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.Timeouts.cs(48,69): error CS1061: 'HttpClientHandler' does not contain a definition for 'ConnectTimeout' and no extension method 'ConnectTimeout' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.Timeouts.cs(58,25): error CS1061: 'HttpClientHandler' does not contain a definition for 'ConnectTimeout' and no extension method 'ConnectTimeout' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.Timeouts.cs(60,79): error CS1061: 'HttpClientHandler' does not contain a definition for 'ConnectTimeout' and no extension method 'ConnectTimeout' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.Timeouts.cs(61,72): error CS1061: 'HttpClientHandler' does not contain a definition for 'ConnectTimeout' and no extension method 'ConnectTimeout' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.Timeouts.cs(71,64): error CS0117: 'HttpClientHandler' does not contain a definition for 'ConnectTimeout' [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.SslProtocols.cs(23,55): error CS1061: 'HttpClientHandler' does not contain a definition for 'SslProtocols' and no extension method 'SslProtocols' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.SslProtocols.cs(39,25): error CS1061: 'HttpClientHandler' does not contain a definition for 'SslProtocols' and no extension method 'SslProtocols' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.SslProtocols.cs(40,49): error CS1061: 'HttpClientHandler' does not contain a definition for 'SslProtocols' and no extension method 'SslProtocols' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.SslProtocols.cs(56,72): error CS1061: 'HttpClientHandler' does not contain a definition for 'SslProtocols' and no extension method 'SslProtocols' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.SslProtocols.cs(73,68): error CS1061: 'HttpClientHandler' does not contain a definition for 'SslProtocols' and no extension method 'SslProtocols' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.SslProtocols.cs(84,60): error CS0117: 'HttpClientHandler' does not contain a definition for 'SslProtocols' [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.SslProtocols.cs(104,60): error CS0117: 'HttpClientHandler' does not contain a definition for 'SslProtocols' [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.SslProtocols.cs(120,60): error CS0117: 'HttpClientHandler' does not contain a definition for 'SslProtocols' [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.MaxResponseHeadersLength.cs(22,49): error CS1061: 'HttpClientHandler' does not contain a definition for 'MaxResponseHeadersLength' and no extension method 'MaxResponseHeadersLength' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.MaxResponseHeadersLength.cs(33,83): error CS1061: 'HttpClientHandler' does not contain a definition for 'MaxResponseHeadersLength' and no extension method 'MaxResponseHeadersLength' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.MaxResponseHeadersLength.cs(45,25): error CS1061: 'HttpClientHandler' does not contain a definition for 'MaxResponseHeadersLength' and no extension method 'MaxResponseHeadersLength' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.MaxResponseHeadersLength.cs(46,50): error CS1061: 'HttpClientHandler' does not contain a definition for 'MaxResponseHeadersLength' and no extension method 'MaxResponseHeadersLength' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.MaxResponseHeadersLength.cs(56,25): error CS1061: 'HttpClientHandler' does not contain a definition for 'MaxResponseHeadersLength' and no extension method 'MaxResponseHeadersLength' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.MaxResponseHeadersLength.cs(58,72): error CS1061: 'HttpClientHandler' does not contain a definition for 'MaxResponseHeadersLength' and no extension method 'MaxResponseHeadersLength' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.MaxResponseHeadersLength.cs(70,64): error CS0117: 'HttpClientHandler' does not contain a definition for 'MaxResponseHeadersLength' [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.MaxConnectionsPerServer.cs(21,52): error CS1061: 'HttpClientHandler' does not contain a definition for 'MaxConnectionsPerServer' and no extension method 'MaxConnectionsPerServer' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.MaxConnectionsPerServer.cs(32,74): error CS1061: 'HttpClientHandler' does not contain a definition for 'MaxConnectionsPerServer' and no extension method 'MaxConnectionsPerServer' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.MaxConnectionsPerServer.cs(47,29): error CS1061: 'HttpClientHandler' does not contain a definition for 'MaxConnectionsPerServer' and no extension method 'MaxConnectionsPerServer' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.MaxConnectionsPerServer.cs(65,29): error CS1061: 'HttpClientHandler' does not contain a definition for 'MaxConnectionsPerServer' and no extension method 'MaxConnectionsPerServer' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.DefaultProxyCredentials.cs(20,73): error CS1061: 'HttpClientHandler' does not contain a definition for 'DefaultProxyCredentials' and no extension method 'DefaultProxyCredentials' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.DefaultProxyCredentials.cs(30,25): error CS1061: 'HttpClientHandler' does not contain a definition for 'DefaultProxyCredentials' and no extension method 'DefaultProxyCredentials' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.DefaultProxyCredentials.cs(31,44): error CS1061: 'HttpClientHandler' does not contain a definition for 'DefaultProxyCredentials' and no extension method 'DefaultProxyCredentials' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.DefaultProxyCredentials.cs(33,25): error CS1061: 'HttpClientHandler' does not contain a definition for 'DefaultProxyCredentials' and no extension method 'DefaultProxyCredentials' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.DefaultProxyCredentials.cs(34,73): error CS1061: 'HttpClientHandler' does not contain a definition for 'DefaultProxyCredentials' and no extension method 'DefaultProxyCredentials' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.DefaultProxyCredentials.cs(52,25): error CS1061: 'HttpClientHandler' does not contain a definition for 'DefaultProxyCredentials' and no extension method 'DefaultProxyCredentials' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] HttpClientHandlerTest.DefaultProxyCredentials.cs(87,29): error CS1061: 'HttpClientHandler' does not contain a definition for 'DefaultProxyCredentials' and no extension method 'DefaultProxyCredentials' accepting a first argument of type 'HttpClientHandler' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\9\s\src\System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj] ""D:\A\_work\9\s\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj"" (Build target) (190) -> NegotiateStreamTestForUnix.cs(35,34): error CS0103: The name 'File' does not exist in the current context [D:\A\_work\9\s\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj] NegotiateStreamTestForUnix.cs(36,17): error CS0103: The name 'File' does not exist in the current context [D:\A\_work\9\s\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj] NegotiateStreamTestForUnix.cs(89,17): error CS0103: The name 'File' does not exist in the current context [D:\A\_work\9\s\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj] ``` " 8484 area-System.Net Don't cancel all requests when HttpClient disposed on Unix On Unix when an HttpClientHandler is disposed, we cancel all outstanding operations associated with that handler. It turns out this isn't the desired behavior (aka the behavior of WinHttpHandler), which is that we should cancel all outstanding operations that haven't yet published its HttpResponseMessage, but for requests where the HttpResponseMessage has been published, it should remain valid. This commit tweaks the behavior accordingly and adds a test for it. cc: @ericeil, @davidsh, @cipop 8488 area-System.Net If we fail to register a socket file descriptor with kqueue/epoll, throw a more appropriate exception As it turns out, the only circumstance under which these should fail is resource exhaustion, so we can just throw OutOfMemoryException, with InternalException as a fallback in case something unexpected happens. Fixes #7850 @stephentoub 8489 area-System.Security Bring back protected fields for SymmetricAlgorithm ``` C# protected int BlockSizeValue; protected byte[] IVValue; protected byte[] KeyValue; protected KeySizes[] LegalBlockSizesValue; protected KeySizes[] LegalKeySizesValue; protected int KeySizeValue; protected CipherMode ModeValue; protected PaddingMode PaddingValue; ``` There's also `protected int FeedbackSizeValue`; but right now FeedbackSize is out-of-contract; so I'm not sure what the best plan is there. This would be merged back into the existing contract and implementation before RTM, no package version bump. 8490 area-System.Security Bring back protected fields for AsymmetricAlgorithm ``` C# protected int KeySizeValue; protected KeySizes[] LegalKeySizesValue; ``` This would be merged back into the existing contract and implementation before RTM, no package version bump. 8491 area-System.Security Consider adding algorithm-agnostic X509Certificate2.GetPublicKey() and X509Certificate2.GetPrivateKey() A while ago, it was decided to remove these properties from the public contract to encourage people to use the strongly typed extensions: https://github.com/dotnet/corefx/issues/2449#issuecomment-129042445. Though the motivation seems legitimate, this approach leads to very weird code in practice, specially in framework classes that don't need to deal with the concrete algorithm instance, as it ties them to algorithm-specific extensions: - https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/KDev/src/Microsoft.IdentityModel.Tokens/X509SecurityKey.cs#L78 - https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/KDev/src/Microsoft.IdentityModel.Tokens/X509SecurityKey.cs#L102 Is there a chance to bring these properties back? /cc @bartonjs @brentschmaltz 8495 area-Infrastructure Test crashes cross plat don't trigger CI failures in MSBuild While investigating https://github.com/dotnet/corefx/issues/8425, I noticed a case where a test project was failing in CI, but the build was not being marked as an error. The best way to reproduce it may be to just revert the change I'm going to merge to fix this issue and run a CI job or local build. I'm not yet sure where the problems lies. Is the universal runner not flowing the correct exit code back in this case or is MSBuild just dropping it for some reason? 8496 area-System.Net PostLongerContentLengths_UsesChunkedSemantics failed in CI on Windows The handle is invalid http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/windows_nt_debug/304/consoleText ``` System.Net.Http.Functional.Tests.PostScenarioTest.PostLongerContentLengths_UsesChunkedSemantics(contentLength: 64512) [FAIL] System.Net.Http.HttpRequestException : Error while copying content to a stream. ---- System.IO.IOException : The read operation failed, see inner exception. -------- System.Net.Http.WinHttpException : The handle is invalid Stack Trace: D:\j\workspace\windows_nt_debug88592b53\src\System.Net.Http\src\System\Net\Http\HttpContent.cs(365,0): at System.Net.Http.HttpContent.d__50.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() D:\j\workspace\windows_nt_debug88592b53\src\System.Net.Http\src\System\Net\Http\HttpClient.cs(392,0): at System.Net.Http.HttpClient.d__58.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() D:\j\workspace\windows_nt_debug88592b53\src\System.Net.Http\tests\FunctionalTests\PostScenarioTest.cs(171,0): at System.Net.Http.Functional.Tests.PostScenarioTest.d__22.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() D:\j\workspace\windows_nt_debug88592b53\src\System.Net.Http\tests\FunctionalTests\PostScenarioTest.cs(123,0): at System.Net.Http.Functional.Tests.PostScenarioTest.d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() D:\j\workspace\windows_nt_debug88592b53\src\System.Net.Http\src\System\Net\Http\StreamToStreamCopy.cs(171,0): at System.Net.Http.StreamToStreamCopy.d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() D:\j\workspace\windows_nt_debug88592b53\src\System.Net.Http\src\System\Net\Http\HttpContent.cs(358,0): at System.Net.Http.HttpContent.d__50.MoveNext() ----- Inner Stack Trace ----- ``` 8497 area-System.Net Remove CurlHandler.ConnectTimeout property I'd added this when bringing properties from WinHttpHandler to CurlHandler in bulk, with the expectation that we might expose them. Since we're not planning on exposing this particular property from HttpClientHandler (turns out it's not very useful in practice), I'm removing it. Related to https://github.com/dotnet/corefx/issues/7623 Closes https://github.com/dotnet/corefx/issues/8181 cc: @davidsh, @ericeil 8498 area-System.Data SqlClient diagnostics Before event should record timestamp The following [logging of the before event for SqlClient diagnostics](https://github.com/dotnet/corefx/blob/master/src/System.Data.SqlClient/src/System/Data/SqlClient/SqlClientDiagnosticListenerExtensions.cs#L27-L32) should include a timestamp member. This would be as simple as adding `Timestamp = Stopwatch.GetTimestamp()` to the anonymous type passed into `DiagnosticListener.Write()`. Please assign this issue to me, as I will be making the code change and submitting the pull request (I am the author of the code in question). 8502 area-System.Net Remove WinHttpHandler.ConnectTimeout property It turns out that setting the WinHTTP 'Connect' timeout does nothing. We discovered this because we still got ERROR_WINHTTP_TIMEOUT errors after about 20 seconds even after setting the 'Connect' timeout to INFINITE. We discussed this with the WinHTTP team and they told us that this timeout is essentially deprecated due to performance enhancements in the TCP stack. For the technically curious, here is the explanation. Underneath the 'Connect' timeout is really a set of TCP timeouts related to setting up the socket via the 3-leg SYN/ACK exchange. The TCP timeout is about retransmits with backoff and how many is tried by the winsock stack. The default of these initial packet exchanges is 21 seconds with 2 retransmits (3 overall SYNs) and initial RTO of 3 (3 + 6 + 12). So that explained the timeouts we saw during periods of high network congestion. There is no API exposed in WinHTTP to control those low-level TCP timeouts. And thus it doesn't make any sense to have a 'ConnectTimeout' on the WinHttpHandler class. 8504 area-System.Security Delete CryptoNative_GetStreamSizes Delaying the function removal until 1.1 to allow for a smooth RC2 to RTM upgrade path. 8505 area-System.Net Disable parts of the test build from projectreference->package dependency conversion. Disables System.net.http.functional.tests and system.net.security.functional.tests from the projectreference -> package dependency conversion during the test build. These test libraries have build breaks when targeting Linux using packages due to differing surface area. Further investigation will be required to understand the failures and produce a fix. Opting out of conversion for now unblock our build pipeline. Tracking issue - https://github.com/dotnet/corefx/issues/8482 I'll flesh out the tracking issue with more info soon... /cc @weshaggard @jhendrixMSFT 8507 area-Serialization ReflectionBasedDCS: refactor to avoid concrete adapters in ReflectionXmlFormatReader/Writer https://github.com/dotnet/corefx/pull/8418#discussion_r62722072 8509 area-System.Net System.Net.IPAddress and IPv6 zone indices "I already reported this issue on mono's bugzilla but since it's mainly a .NET issue, I was redirected here. Here's my original bug entry: https://bugzilla.xamarin.com/show_bug.cgi?id=37724 As per this article (https://en.wikipedia.org/wiki/IPv6_address#Link-local_addresses_and_zone_indices) the syntax of specifying IPv6 zone indices and link-local addresses depends on the platform. On MS Windows the index is determined by the interface number while on Unix-like OS's (including OS X) the interface name (ie. en0) is used. System.Net.IPAddress only has support for specifying the interface the MS Windows way in the form of it's ""ScopeId"" property which is a ""long"". So this causes issues on non-Windows systems and in some cases, specifically where the MS Windows notation is not supported as an alternate way of specifying the interface it renders this class completely useless. Even worse, IPAddress.Parse succeeds in parsing an IP Address with a zone index specified as name (ie. %en0"") but totally ignores/scraps the zone index resulting in a false positive. At least on OS X (can't speak for other Unix or BSD based platforms) one can alternatively specify the zone index using the index of the interface. This is not well known or widely used though and requires finding an interface's index instead of just using it's name. So on platforms where the number-based notation is available but not the default, IPAddress.Parse could be extended to look up the interface index using the System.Net.NetworkInformation.NetworkInterface class. On systems where this ""fallback"" isn't available this wouldn't work though and apart from introducing a new property and adjusting the parsing code I have no suggestion for this scenario. " 8510 area-System.Diagnostics Cleanup dependencies on System.Diagnostics.Contracts Code Contracts are not being maintained in .NET Core and `Debug.Assert` is being used in favor of `Contract.Assert`, yet many CoreFX components still depend on `System.Diagnostics.Contracts` in their implementation. https://github.com/dotnet/corefx/search?l=json&p=1&q=%22System.Diagnostics.Contracts%22&type=Code Could we start removing dependencies on `System.Diagnostics.Contracts` (similar to how most dependencies on `System.Collections.NonGeneric` have been removed) or is there a reason to keep the dependencies the way they are? cc: @weshaggard 8511 area-System.Diagnostics Add the notion of metadata to DiagnosticsSource DiagnosticsSource has been around for a while now and as more sites are instrumented and more listeners come online, it is becoming evident that there is a need for metadata to be provided as part of the system - specifically, the notion of collecting `timestamps`, `duration`, `correlationid` and possibly `stack`, `processid` and `threadid`. These concerns are currently being tracked in an inconsistent manner across the publisher and subscriber code bases and has lead to several problems (i.e. different listeners coming up with different durations or timestamps, correlations not being determined correctly, listening to more events than are needed just to calculate duration, etc). Hence, after seeing issues like #8498 arise, it has been determined that the correct place isn't in the publisher or the subscriber, but most likely in the underlying subsystem - DiagnosticsSource. This issue is to track this discussion and determine the best way to start including this data into the system. Considerations that need to be had are as follows: - Can we get these updates in place before RTM/RTW lockdowns? - Can we make these changes in a non breaking way, given the fact that people are already taking a dependency on DS today? - A possible solution here is to have two subscription methods which listeners can use, listen without metadata (what they would be using today) and listening with metadata. Other solutions are also possible. - Is there the need for the subscribers to dictate which metadata they would like collected (i.e. if no listeners want the stack, then the stack wouldn't be collected)? - Can the system be optimized so that to calculate durations, listener don't have to listen to both the `begin`/`end` events? - To do this work, do we need to take any extra dependencies, and if so does it matter? - Can correlations between `begin`/`end` events be provided in a deterministic way? Obviously given where things are at timing wise with release schedules, we need to see what we think is the right solution and what we can get done in the time we have. Assuming this work is done, we can also go through and cleanup some of the publishers code and simply things greatly. // @vancem @stephentoub (note this should be assigned to @vancem for the time being). 8515 area-Meta Cleanup ApiCompat baseline for 4.6.3+ TargetingPack Also includes APIs from #6936. While enabling ApiCompat for our builds by default https://github.com/dotnet/corefx/pull/8513 we are hitting the following compat errors: netcore50 ``` TypesMustExist : Type 'System.Security.Cryptography.ECDsa' does not exist in the implementation but it does exist in the contract. ``` net463 - I suspect these are planned to go into net463 so it there might not be anything needed except the baseline before the actually exist there. ``` TypesMustExist : Type 'System.Security.Cryptography.ECCurve' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Security.Cryptography.ECDsa.Create(System.Security.Cryptography.ECCurve)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Security.Cryptography.ECDsa.Create(System.Security.Cryptography.ECParameters)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Security.Cryptography.ECDsa.ExportExplicitParameters(System.Boolean)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Security.Cryptography.ECDsa.ExportParameters(System.Boolean)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Security.Cryptography.ECDsa.GenerateKey(System.Security.Cryptography.ECCurve)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Security.Cryptography.ECDsa.ImportParameters(System.Security.Cryptography.ECParameters)' does not exist in the implementation but it does exist in the contract. TypesMustExist : Type 'System.Security.Cryptography.ECParameters' does not exist in the implementation but it does exist in the contract. TypesMustExist : Type 'System.Security.Cryptography.ECPoint' does not exist in the implementation but it does exist in the contract. ``` @bartonjs @steveharter 8516 area-System.Runtime ApiCompat issues with System.Runtime.Extensions While enabling ApiCompat by default in our builds https://github.com/dotnet/corefx/pull/8513 we discovered the following compat errors: netstandard15aot ``` MembersMustExist : Member 'System.Environment.Exit(System.Int32)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Environment.GetCommandLineArgs()' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Environment.MachineName.get()' does not exist in the implementation but it does exist in the contract. ``` @tarekgh you added that configuration what are the plans for getting correct support for these APIs? 8517 area-System.Net System.Net.InternalException should include more diagnostic info "We throw `System.Net.InternalException` as a kind of ""soft assert"" in the networking code; In DEBUG builds, this will stop the process immediately, while in RELEASE builds this is just an exception, albeit an unexpected one. In DEBUG builds, because we crash immediately, we should be able to reconstruct the state that lead to the exception, in a debugger; but in RELEASE builds this information may be long gone before we get a chance to debug. We should consider enhancing `InternalException` to carry some state info to aid in debugging. " 8518 area-System.Net WinHttpHandler.SslProtocols initially will use OS defaults To support future security improvements, the default value for WinHttpHandler.SslProtocols will use the enum value of .None. This means that no preferred list of protocols is being expressed. And that means to use the best OS defaults. Currently this translates into using: ``` c# Tls10 | Tls11 | Tls12 ``` This list will change over time as platforms adopt newer Tls versions and phase out older versions. 8519 area-System.Net System.Net.Http.Functional.Tests.PostScenarioTest.PostUsingUsingConflictingSemantics_UsesChunkedSemantics failed in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/windows_nt_release_prtest/1179/testReport/junit/System.Net.Http.Functional.Tests/PostScenarioTest/PostUsingUsingConflictingSemantics_UsesChunkedSemantics_serverUri__https___corefx_net_cloudapp_net_Echo_ashx_/ > MESSAGE: > System.Net.Http.HttpRequestException : An error occurred while sending the request.\r\n---- System.Net.Http.WinHttpException : The operation has been canceled > +++++++++++++++++++ > STACK TRACE: > at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.Http.HttpClient.d__58.MoveNext() in D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Http\src\System\Net\Http\HttpClient.cs:line 392 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.Http.Functional.Tests.PostScenarioTest.d__22.MoveNext() in D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Http\tests\FunctionalTests\PostScenarioTest.cs:line 171 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.Http.Functional.Tests.PostScenarioTest.d__16.MoveNext() in D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Http\tests\FunctionalTests\PostScenarioTest.cs:line 99 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.Http.WinHttpHandler.d__102.MoveNext() in D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs:line 843 8521 area-System.Net Change CurlHandler.SslProtocols default Same change as https://github.com/dotnet/corefx/pull/8518, but for CurlHandler. cc: @davidsh, @ericeil 8522 area-System.Net Fail gracefully if IPAddress.Parse is given an IPv6 address beginning with ':' Fixes #8356. @stephentoub, @CIPop 8523 area-System.Net Add HttpClient e2e test validating SslProtocols.None behavior "See: https://github.com/dotnet/corefx/pull/8518 > useful to have an e2e test validating that if ""None"" is set, Tls12 (at least at this time) is going to be negotiated. The test can check SslStream.SslStream on the new LocalhostServer. " 8526 area-System.Runtime Proposal: Introduce System.Runtime.Loader as a Desktop contract System.Runtime.Loader is the only difference between NET462 and NETCoreApp today, this means that code that is targeting both Desktop and NETCoreApp need to have different code paths. Adding a simple emulator of the APIs on Desktop would suffice a lot of scenarios, certainly those that want to run on NETCoreApp. Previous discussion: #8453 8530 area-System.Net Fail gracefully if IPAddress.Parse is given an IPv6 address beginning with a single ':' "(This is one of the commits from #8522. I will have to submit the test changes separately, after this change to System.Net.Primitives propagates such that it can be used from the System.Private.Uri tests.) This is to match the Unix behavior with the existing Windows behavior. On Windows (both CLR and CoreFx), `IPAddress.Parse("":1"")` throws `FormatException`. On Unix, we were failing an assert (or throwing `IndexOutOfRangeException`, in release builds). Fixes #8356. @stephentoub, @CIPop " 8531 area-System.Net Remove ActiveIssue for #8356 Removes the ActiveIssue tag for #8356, and reorganizes the tests into [Theory]- based cases. Won't pass CI until #8530 is merged. @stephentoub @CIPop 8535 area-System.Net Use stackalloc in WebUtility + avoid some branching Changes: - Refactor `UrlEncode` to use `stackalloc` if the UTF-8 representation of the input is <= 1024 bytes - Refactored the core of `GetEncodedBytes` to use pointers - Refactored the array-based overload of `GetEncodedBytes` to forward everything to the new pointer-based one - Added plenty of debug asserts to prevent buffer overflows/UB by `fixed` when the input array is null or empty - Avoided branches in `HexToInt` and `IsUrlSafeChar` methods - Added `IsIntBetween` helper method to check whether a given int is between 2 others, without branching - Used it in `IsUrlSafeChar`, `HexToInt`, and some of the `Html*` methods - Another trick: since the difference between `a` (97) and `A` (65) is 32, which is a power of 2, you can use this fact to avoid a branch when checking if a char is a letter (recently found this out in dotnet/coreclr#4881) - [Related StackOverflow question](http://stackoverflow.com/q/37179678/4077294) - Renamed `safeSpecialCharMask` to use Pascal casing as it is const Will post perf measurements as soon as I get the chance, but I wanted to submit a PR for code review/feedback first. cc @hughbe @stephentoub 8537 area-System.Net Add NetworkInterface.LoopbackInterfaceIndex test Fixes https://github.com/dotnet/corefx/issues/7854 cc: @ericeil, @davidsh, @cipop 8538 area-System.Net WinHttpHandler not updating response state with error from server when client supports multiple TLS protocols Might be a test bug. Noticed this while adding HttpClientHandler.SslProtocols property to Windows. System.Net.Http.Functional.Tests.HttpClientHandler_SslProtocols_Test.GetAsync_DisallowTls10_AllowTls11_AllowTls12 ``` Assert.Throws() Failure Expected: typeof(System.Net.Http.HttpRequestException) Actual: typeof(System.Threading.Tasks.TaskCanceledException): A task was canceled. Stack Trace: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() s:\GitHub\corefx\src\System.Net.Http\src\System\Net\Http\HttpClient.cs(392,0): at System.Net.Http.HttpClient.d__58.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` 8539 area-System.Net System.Net.Http 4.1 contract implementation "As per approved #7623, add remaining properties to HttpClientHandler for all platforms. Move pre-existing Unix-only Http tests to run for all platforms. Ensure that ""credentials"" related properties are secure by default and have an initial (default) value of null. " 8540 area-System.Runtime S.R.CS.Unsafe: Adding a Copy(ref T, ref U) overload Right now we support copying from a pointer to a reference, and a reference to a pointer via `Unsafe.Copy`, but not between two references. We should add an overload with the following signature: ``` cs public static class Unsafe { public static void Copy(ref U destination, ref T source); } ``` that copies `sizeof(T)` bytes from `source` to `destination`. Example usages: ``` cs // Reinterpret binary data byte[] array = { 0x01, 0x02, 0x03, 0x04 }; int asInt = 0; Unsafe.Copy(ref asInt, ref array[0]); Assert.Equal(0x04030201, asInt); // Object-to-pointer public unsafe static void* GetCurrentAddress(this object obj) { var result = default(IntPtr); Unsafe.Copy(ref result, ref obj); return result.ToPointer(); } // As-style functionality extended to structs public static ImmutableArray FakeAsImmutable(this T[] array) { var result = default(ImmutableArray); Unsafe.Copy(ref result, ref array); return result; } ``` cc @mellinoe @nietras @jkotas 8541 area-System.Net Determine default value for netcore50 HttpClientHandler.MaxResponseHeadersLength Ref: PR #8539 Determine the proper value to return as the default value of 'MaxResponseHeaderLength'. Unlike WinHTTP which has WINHTTP_OPTION_MAX_RESPONSE_HEADER_SIZE, there is no known default value for WinINet used in WinRT Windows.Web.Http. 8546 area-System.Net Add test verifying HttpClient negotiates Tls12 when None specified Fixes https://github.com/dotnet/corefx/issues/8523 cc: @davidsh, @cipop 8547 area-System.IO FileSystemWatcher Test failure (OSX): WaitForChangedTests.CreatedDeleted_Success http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/osx_debug_prtest/1149/consoleText ``` System.IO.Tests.WaitForChangedTests.CreatedDeleted_Success(changeType: Deleted) [FAIL] Assert.Equal() Failure Expected: Deleted Actual: 0 Stack Trace: at System.IO.Tests.WaitForChangedTests.CreatedDeleted_Success(WatcherChangeTypes changeType) ``` 8552 area-System.Net Impossible to create UdpClient on shared port As per the discussion here: https://github.com/dotnet/corefx/pull/5953#issuecomment-219304032 With the removal of `Client` from `UdpClient`, it's now impossible to create a `UdpClient` instance that can listen on a shared port if the port is already in use. The core issue is that the ctor of `UdpClient` creates the socket. The `ExclusiveAddressUse` is a property that evaluates after the ctor, so it's too late. Today, this is accomplished by using the default `UdpClient` ctor, then setting a bunch of options on the socket/client and then calling `udpClient.Client.Bind(localEndpoint)`. This allows for the socket to be setup as a shared socket before binding. We need a way to create a `UdpClient` while specifying exclusive address use is false. One suggestion could be to add another ctor parameter with that flag. Another might be to add a collection of socket options. 8553 area-System.Net Fix WinHttpHandler default cred auth when server offers multiple schemes When a server offers multiple auth schemes, WinHttpHandler is supposed to select the more secure scheme regardless of the order of the authentication headers. So, despite a server offering Basic and Negotitate (in that order), Negotiate would be selected. When using default credentials, however, it was not calling WinHttpSetCredentials(null, null). This resulted in the first scheme offered by the server (Basic) to be attempted. But there were no credentials set and so a 401 resulted. Fix WinHttpHandler so that it will always call WinHttpSetCredentials even with default credentials. This ensures that the selected auth scheme (in this case Negotiate) is used correctly. Revised test configuration instructions. An IHttpModule is used for the test server endpoint to ensure that IIS will put 'Basic' first in the response headers. 8555 area-System.Net Change some System.Net.Requests tests to use LoopbackServer Moved LoopbackServer.cs to Common/tests path. Changed HttpWebResponse test to use LoopbackServer. More tests will be changed to use this server as part of increasing test reliability and simplifying the requirements for the Azure test server. 8556 area-System.Net Change some System.Net.Requests tests to use LoopbackServer Changed HttpWebResponse test to use LoopbackServer. More tests will be changed to use this server as part of increasing test reliability and simplifying the requirements for the Azure test server. 8557 area-Infrastructure [ARM/Linux] Build Failure on ARM Recent commit (9c2f1fe) breaks ARM build. The (len) variable need explicit type conversion to unsigned value. ``` /home/jyoung/git/dotnet/corefx/src/Native/System.Native/pal_networkchange.cpp:63:63: error: comparison of integers of different signs: '__u32' (aka 'unsigned int') and 'ssize_t' (aka 'int') [-Werror,-Wsign-compare] for (nlmsghdr* hdr = reinterpret_cast(buffer); NLMSG_OK(hdr, len); NLMSG_NEXT(hdr, len)) ^~~~~~~~~~~~~~~~~~ /home/jyoung/git/dotnet/rootfs-corefx/arm/usr/include/linux/netlink.h:89:24: note: expanded from macro 'NLMSG_OK' (nlh)->nlmsg_len <= (len)) ~~~~~~~~~~~~~~~~ ^ 1 error generated. ``` ``` 55 ssize_t len; ... SKIP ... 63 for (nlmsghdr* hdr = reinterpret_cast(buffer); NLMSG_OK(hdr, len); NLMSG_NEXT(hdr, len)) ``` ``` 87 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \ 88 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ 89 (nlh)->nlmsg_len <= (len)) ``` I will post a PR soon. 8560 area-System.Threading missing System.Threading.Thread VolatileRead/VolatileWrite/MemoryBarrier methods or porting documentation Recently I started porting some concurrent data structure to coreclr and I ran into this issue. Maybe I missed some api / documentation / deprecation notices, but the VolatileRead(_), VolatileWrite(_), MemoryBarrier() methods seems missing from System.Threading.Thread class [1]. However the coreclr repo has an implementation [2], and also has some documentation reference [3]. Please note, I am perfectly fine to left out these methods from the api in order to simplify it (in this case could somebody please give me a pointer about these decisions?). [1] https://github.com/dotnet/corefx/blob/master/src/System.Threading.Thread/ref/System.Threading.Thread.cs#L13 [2] https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/Threading/Thread.cs#L1477 [3] https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/Threading/Volatile.cs#L20 8567 area-System.Numerics BigInteger.Parse returns bogus value for exponents above 1000 "When parsing a `BigInteger` in exponential form, the FX code artificially limits the exponent to 1000. If a larger exponent than that is found, an exponent of 9999 (!!) is substituted instead. See [FormatProvider.Number.cs, from line 495](https://github.com/dotnet/corefx/blob/master/src/Common/src/System/Globalization/FormatProvider.Number.cs#L495) or test it yourself: ``` Console.WriteLine(BigInteger.Parse(""1e+1000"", NumberStyles.AllowExponent).ToString(""E"", CultureInfo.InvariantCulture)); Console.WriteLine(BigInteger.Parse(""1e+1001"", NumberStyles.AllowExponent).ToString(""E"", CultureInfo.InvariantCulture)); ``` > 1.000000E+1000 > > 1.000000E+9999 The explicit coding seems like this was intentional, but it is hard to accept. The behavior is surprising and inconsistent; also, this exponent is not in any way a limit of BigInteger itself, only in the parsing: ``` Console.WriteLine((BigInteger.Parse(""1e+1000"", NumberStyles.AllowExponent) * 10).ToString(""E"", CultureInfo.InvariantCulture)); ``` > 1.000000E+1001 If `BigInteger.Parse` needs to have a limitation (e.g. currently it uses an `int` to store the exponent, so it might need to have a limit around `Int32.MaxValue` until this gets reimplemented), it should probably rather die with a `FormatException` or `NotSupportedException` or somesuch when the limit is reached instead of delivering a completely bogus value. (This was discovered [in a question on StackOverflow](http://stackoverflow.com/a/37195411/304138).) " 8575 area-System.Net Update netcore50 MaxResponseHeadersLength property Windows.Web.Http is built on WinINet. There is no maximum limit (except for out of memory) for received response headers. So, returning 0 (indicating no limit) is appropriate. Fixes #8541. 8576 area-System.Linq Restore the use of reflection methods with binding flags in Linq.Expressions "Reflection used to expose APIs like ``` C# // allocates nothing in steady state return type.GetMethod(name, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, ...); ``` In CoreFX the surface was reduced to minimum ""GetMethods() forcing the following solution: ``` C# // allocates array with all methods each time MethodInfo[] methods = type.GetMethods(); foreach (var method in methods) { if (method.IsStatic && method.Name == name) return methods; } ``` The second is wore performance-wise and we should be getting the original API with binding flags back. Make sure that Linq.Expression is switched back to using that API " 8577 area-Microsoft.CSharp Restore the use of reflection methods with binding flags in Microsoft.CSharp "Reflection used to expose APIs like ``` C# // allocates nothing in steady state return type.GetMethod(name, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, ...); ``` In CoreFX the surface was reduced to minimum ""GetMethods() forcing the following solution: ``` C# // allocates array with all methods each time MethodInfo[] methods = type.GetMethods(); foreach (var method in methods) { if (method.IsStatic && method.Name == name) return methods; } ``` The second is worse performance-wise and we should be getting the original API with binding flags back. Make sure that Microsoft.CSharp is switched back to using that API " 8581 area-System.Net System.Net.WebSockets.Client.Tests.ClientWebSocketTest.SendAsync__MultipleOutstandingSendOperations_Throws failed in CI On Windows NT Release: System.Net.WebSockets.WebSocketException : Unable to connect to the remote server\r\n---- System.Net.WebSockets.WebSocketException : Unable to connect to the remote server\r\n-------- System.Net.Http.WinHttpException : The operation has been canceled [Details](http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/windows_nt_release_prtest/1316/testReport/junit/System.Net.WebSockets.Client.Tests/ClientWebSocketTest/SendAsync__MultipleOutstandingSendOperations_Throws_server__wss___corefx_net_cloudapp_net_WebSocket_EchoWebSocket_ashx_/) 8585 area-Infrastructure Add openSUSE Leap 42.1 Add openSUSE Leap 42.1 to Jenkins CI and release infrastructure 8586 area-System.Net Implement NetworkInterface.Id and .Description on Linux and OSX "These now return the same value as ""Name"" on these platforms, but this value is more useful than simply throwing a `PlatformNotSupportedException`. Previously, `OSXNetworkInterface.Id` was returning the system index of the network interface. This was not particularly useful. Technically, these are implemented via `UnixNetworkInterface`, so future subclasses will also inherit the behavior. @tmds , @CIPop Fixes https://github.com/dotnet/corefx/issues/8297 " 8592 area-System.Runtime IntPtr and UIntPtr should implement the IEquatable interface Both are structs, overload ==, and even have [specialized implementations](https://github.com/dotnet/corefx/blob/master/src/System.Collections/src/System/Collections/Generic/EqualityComparer.cs#L64-L67) for the default `EqualityComparer`, yet they don't implement `IEquatable` (or override `Equals`). Should we consider making them implement the interface? If there's no particular reason why they shouldn't, then here is the API proposal: ``` cs public struct IntPtr : IEquatable { public bool Equals(IntPtr other); } public struct UIntPtr : IEquatable { public bool Equals(UIntPtr other); } ``` 8593 area-Serialization Perf Improvements on ReflectionReadCollectionCore(). The perf improvements speed up the following performance tests: ``` DeSerializationTest(numberOfRuns: 1000, testType: ListOfInt, testSize: 128) Baseline: 563.00 Fix: 153.00 Diff: -72.82% DeSerializationTest(numberOfRuns: 1000, testType: ListOfInt, testSize: 1024) Baseline: 4610.00 Fix: 1200.00 Diff: -73.97% DeSerializationTest(numberOfRuns: 1, testType: ListOfInt, testSize: 1048576) Baseline:4660.00 Fix: 1270.00 Diff: -72.75% ``` The numbers for baseline/fix indicate the time taken by the tests with/without the fix. 8597 area-System.Data DataTable future? Hi, there is a newly introduced (empty) type System.Data.DataTable in RC2, is this some sort of workaround that will be removed in final, or do you plan to extend it and keep DataTable and related classes as part of the core framework? I am asking because our code similarly to lot of others relies on DataSet / DataTable structures and we need to outline some strategy how to address this or wait. 8598 area-Meta .NET Core compatibility change list Provide a table highlighting all major changes in technology (api, specification etc.) between .NET Framework and .NET Core. Something like: | Change No. | Technology | Change | Public Reference | | --- | --- | --- | --- | | 1 | System.Net.Sockets | API Surface, Async Only | None | | 2 | AppDomains | Removed | Blog - http:// | | 3 | Shutdown | Specification | GitHub #5205 | 8601 area-System.Security Set KeySizeValue directly, rather than doing gymnastics "In the RSA and ECDSA types we do gymnastics to ensure that we can make get_KeySize return ""the correct answer"", even if it isn't ""a legal answer"" per LegalKeySizes. In full .NET Framework this is easily solvable by setting the protected field instead of the property. Since #8571 brought the fields back, we can simplify the code now (once the new packages are introduced... so, tomorrow-ish). " 8603 area-System.Net Add back TcpClient/UdpClient.Client properties to System.Net.Sockets Mainly a cleaned-up revert of https://github.com/dotnet/corefx/pull/5953. cc: @ericeil, @davidsh, @CIPop 8606 area-System.ComponentModel System.ComponentModel.Tests.MemberDescriptorTests.CopiedMemberDescriptorEqualsItsSource test failure http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_debug_prtest/1257/testReport/junit/System.ComponentModel.Tests/MemberDescriptorTests/CopiedMemberDescriptorEqualsItsSource/ > Stacktrace > > MESSAGE: > Assert.True() Failure > Expected: True > Actual: False > +++++++++++++++++++ > STACK TRACE: > at System.ComponentModel.Tests.MemberDescriptorTests.CopiedMemberDescriptorEqualsItsSource() 8608 area-System.Collections System.Collections.Immutable should not use ` and + in its file names so source lookup works. Currently in System.Collections.Immutable\src\System\Collections\Immutable there are a number of files that have names like ``` ImmutableHashSet`1+MutationResult.cs ``` which have unusal characters like ` and +. It turns out that these characters cause problem with the Nuget Symbol packages we generate in that they need to be escaped. See the package bin\symbolpkg\System.Collections.*.symbols.nupkg You will see that the special characters are escaped, in the nuget package archive. This in turn confuses the nuget source server. (basically source lookup for these files simply fail). While we could try to push nuget and all downstream components to support ` and + as normal characters, this seems like more trouble than it is worth. System.Collections.Immutable is the only assembly in CoreFX that does this. Thus my recommendation is to simply avoid the problem and reaname the source files to avoid ` and + (very easy). This will have no effect on the assembly, but it will make source code lookup work properly. Thus low cost, useful value. 8610 area-System.IO ZipArchive doesn't verify checksums when decompressing. The Zip specification includes a crc32 for each individual file entry header. When writing a ZipArchive, we calculate this crc32 and include it for each file. When reading/decompressing a ZipArchive, we read this crc32 from the file header but don't ever validate it. We pass the data block to the underlying DeflateStream to decompress then return that deflatestream to the caller. The end result of this is that you can successfully unzip an archive that has potentially invalid data. Changing this behavior would introduce a large number of new errors and breaking changes. This issue is copied from an internal bug report. 8617 area-Infrastructure Desktop System.Globalization test need strong name skip verification entries to run All failing tests Log [here](http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_win7_debug/38/) ``` System.IO.FileLoadException : Could not load file or assembly 'System.Globalization.Extensions, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)\r\n---- System.Security.SecurityException : Strong name validation failed. (Exception from HRESULT: 0x8013141A) +++++++++++++++++++ STACK TRACE: at System.Globalization.Tests.GetStringComparerTests.Compare(String x, String y, String cultureName, CompareOptions options, Int32 expectedWindows, Int32 expectedICU) ----- Inner Stack Trace ----- ``` 8618 area-System.ComponentModel Create lookup table for IsDefault and TypeId System.ComponentModel.TypeDescriptor expects certain attributes(defined in System.ComponentModel.Primitives) to override IsDesfaultAttribute and TypeId from System.Attribute. This is not available on .NET Core, so an interface had been supplied for it instead. This design required the projects to depend on each other rather than the ref assemblies, so this removes that dependency by creating a lookup table that should cover the majority of the cases. Fixes #8050 8622 area-System.Data DataTable like API in .Net Core `System.Data.DataTable` is present in .Net core as an empty class to complete the interfaces implementation. This issue is to track the work needed to bring in an API to provide DataTable like API in .Net Core. 8623 area-Serialization Fix serialization issue for type with XmlNode[] property XmlSerializer fails to serialize type with XmlNode[] property due to the implementation is not complete yet. This change ports the code path from Desktop to enable the scenario. cc: @shmao @SGuyGe @zhenlan 8624 area-System.ComponentModel Skip failing System.ComponentModel.TypeConverter test This works around #8606 to unblock CI, pending a permanent fix. 8627 area-System.Net HttpClient/WinHttpHandler can't cancel slow response stream reads "Was part of #2165 list items > Register callback on cancellation token to cancel WinHTTP operation for WinHttpRequestStream, WinHttpResponseStream Creating separate issue for this. Cancelling an http request where the response headers arrive slowly works correctly. However, if the response headers arrive fast but the reads from the response body are slow, then the cancellation doesn't really work and still takes a long time. Both HttpClient.Timeout or cancellation token Cancel() doesn't work correctly against the WinHttpResponseStream.ReadAsync() method. ``` c# [Fact] public async Task GetIncludesReadingResponseBody_CancelUsingTimeout_TaskCanceledInShortTime() { var stopwatch = new Stopwatch(); stopwatch.Start(); using (var client = new HttpClient()) { client.Timeout = new TimeSpan(0, 0, 1); Task getResponse = client.GetAsync(s_fastHeadersSlowBodyServer, HttpCompletionOption.ResponseContentRead); try { await getResponse; _output.WriteLine(""GetAsync() success""); } catch (TaskCanceledException) { _output.WriteLine(""TaskCanceledException""); } finally { stopwatch.Stop(); _output.WriteLine(""Time to complete GetAsync(): {0}"", stopwatch.Elapsed.ToString()); } } } [Fact] public async Task GetIncludesReadingResponseBody_CancelUsingToken_TaskCanceledInShortTime() { var stopwatch = new Stopwatch(); stopwatch.Start(); var cts = new CancellationTokenSource(); using (var client = new HttpClient()) { Task getResponse = client.GetAsync(s_fastHeadersSlowBodyServer, HttpCompletionOption.ResponseContentRead, cts.Token); Task ignore = Task.Delay(1000).ContinueWith(_ => { _output.WriteLine(""Calling cts.Cancel() at: {0}"", stopwatch.Elapsed.ToString()); cts.Cancel(); }); try { await getResponse; _output.WriteLine(""GetAsync() success""); } catch (TaskCanceledException) { _output.WriteLine(""TaskCanceledException""); } finally { stopwatch.Stop(); _output.WriteLine(""Time to complete GetAsync(): {0}"", stopwatch.Elapsed.ToString()); } } } [Fact] public async Task ResponseStreamRead_CancelUsingToken_TaskCanceledInShortTime() { var stopwatch = new Stopwatch(); stopwatch.Start(); using (var client = new HttpClient()) using (HttpResponseMessage response = await client.GetAsync(s_fastHeadersSlowBodyServer, HttpCompletionOption.ResponseHeadersRead)) { stopwatch.Stop(); _output.WriteLine(""Time to get headers: {0}"", stopwatch.Elapsed.ToString()); Assert.Equal(HttpStatusCode.OK, response.StatusCode); var cts = new CancellationTokenSource(); Stream stream = await response.Content.ReadAsStreamAsync(); byte[] buffer = new byte[ResponseBodyLength]; Task ignore = Task.Delay(1000).ContinueWith(_ => { _output.WriteLine(""Calling cts.Cancel() at: {0}"", stopwatch.Elapsed.ToString()); cts.Cancel(); }); stopwatch.Restart(); try { await stream.ReadAsync(buffer, 0, buffer.Length, cts.Token); _output.WriteLine(""ReadAsync() success""); } catch (TaskCanceledException) { _output.WriteLine(""TaskCanceledException""); } finally { stopwatch.Stop(); _output.WriteLine(""Time to complete response stream read: {0}"", stopwatch.Elapsed.ToString()); } } } ``` " 8628 area-System.Net Fix hang in OSX NetworkAddressChange implementation Fixes #8066 If the NetworkAddressChanged event is quickly subscribed and unsubscribed, there is a chance we experience a deadlock in the threaded CFRunLoop implementation. It seems that if CFRunLoopStop is called too quickly after CFRunLoopStart is called, we may end up successfully calling CFRunLoopStop without actually terminating the CFRunLoopRun call which has, or is just about to, start. To work around this, I have added a call to CFRunLoopIsWaiting in order to ensure that the call to CFRunLoopRun has happened, and that thread is waiting for messages. This means that, when we finally call CFRunLoopStop, the call to CFRunLoopRun has definitely already begun and we can successfully terminate it. This seems to be entirely a timing issue. With a debug runtime, the tests run a lot slower, and the behavior is never encountered (no hangs). With an optimized runtime, it is much more likely to occur. Without this change, around 1 in 10 test runs would hang on my test laptop. With the change, I am not seeing any hangs, and I have run the tests >1000 times in a row. 8629 area-Serialization 1. Updating for .NET Native; 2. Adding SerializationOption. @shmao @khdang @zhenlan 8630 area-System.ComponentModel Remove dependencies on project references for TypeConverter library This tests are depending on project references instead of the package references. This is fine in CI builds and local builds, but breaks the lab builds. This unblocks the lab builds by disabling all the tests. Once the reference assemblies are updated, the tests can be reenabled. 8631 area-System.Net Fixing ClientCertificate functional tests for Windows 7. Starting with Windows 8, Schannel is not sending the Distinguished Name within the Server Hello record. This list was based on certificates present in the Trusted Root Authorities in Win7 and below: https://technet.microsoft.com/en-us/library/hh831771.aspx#BKMK_Changes2012R2 Adding OS and TRA certificate detection to the test. In order to run all aspects of this test on a Win7 machine, we need the client certificate issuer installed on the test machine in TRA. With this fix, the test will skip validating all aspects on machines without the issuer installed in TRA. Fixing the csproj to be able to build, test and debug from VS. @Priya91 @davidsh PTAL /cc @stephentoub @bartonjs Fixes #8437 8634 area-Infrastructure Symlinks are causing tests to fail when building on mapped drive "OS: Win10 Repro: - Map network drive to any drive on your PC - clone repo in the mapped drive - build example output: (I'm seeing dozens of similar errors) ``` E:\oss\xml\Tools\tests.targets(180,5): warning MSB3073: The command ""E:\oss\xml\bin/tests/AnyOS.AnyCPU.Debug/System.Run time.Serialization.Json.Tests/dnxcore50/RunTests.cmd E:\oss\xml\packages/"" exited with code -1. [E:\oss\xml\src\System. Runtime.Serialization.Json\tests\System.Runtime.Serialization.Json.Tests.csproj] E:\oss\xml\Tools\tests.targets(189,5): error : One or more tests failed while running tests from 'System.Runtime.Serial ization.Json.Tests' please check log for details! [E:\oss\xml\src\System.Runtime.Serialization.Json\tests\System.Runtim e.Serialization.Json.Tests.csproj] System.Security.Cryptography.Csp.Tests -> E:\oss\xml\bin\Windows_NT.AnyCPU.Debug\System.Security.Cryptography.Csp.Tes ts\System.Security.Cryptography.Csp.Tests.dll Using E:\oss\xml\packages/ as folder for resolving package dependencies. Executing in E:\oss\xml\bin\tests\AnyOS.AnyCPU.Debug\System.Runtime.Serialization.Xml.Tests\dnxcore50\ Hard linking dependent files... Local NTFS volumes are required to complete the operation. ``` " 8636 area-System.Net SendToV4IPEndPointToV6Host_NotReceived failed in CI on OSX http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/osx_release_prtest/1297/consoleText ``` System.Net.Sockets.Tests.DualMode.SendToV4IPEndPointToV6Host_NotReceived [FAIL] Assert.Throws() Failure Expected: typeof(System.TimeoutException) Actual: typeof(System.Net.Sockets.SocketException): Connection refused Stack Trace: at System.Net.Sockets.Socket.SendTo(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint remoteEP) at System.Net.Sockets.Tests.DualMode.DualModeSendTo_IPEndPointToHost_Helper(IPAddress connectTo, IPAddress listenOn, Boolean dualModeServer, Boolean expectedToTimeout) ``` 8638 area-Infrastructure Warning when running sync.cmd "When I run sync.cmd now, I get this warning: ``` corefx\dir.traversal.targets(235,3): warning MSB4011: ""corefx\Tools\versioning.targets"" cannot be impor ted again. It was already imported at ""corefx\Tools\Build.Common.targets (96,3)"". This is most likely a build authoring error. This subsequent import will be ignored. [corefx\build.proj] ``` " 8641 area-System.Data IsKey is always null in SqlDataReader.GetColumnSchema() "``` c# using (var cmd = new SqlCommand(""CREATE TABLE data (id INTEGER PRIMARY KEY)"", conn)) cmd.ExecuteNonQuery(); using (var cmd = new SqlCommand(""SELECT id FROM data"", conn)) using (var reader = cmd.ExecuteReader(CommandBehavior.SchemaOnly)) { var columns = reader.GetColumnSchema(); Console.WriteLine(columns[0].IsKey); } ``` " 8643 area-System.Runtime LoadFromAssemblyName_ValidTrustedPlatformAssembly failing in all CentOS runs I assume we're only seeing this on CentOS because we're pulling the latest CoreCLR artifacts on CentOS and not in the other PR legs. e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/centos7.1_debug_tst_prtest/1247/consoleText ``` System.Runtime.Loader.Tests.AssemblyLoadContextTest.LoadFromAssemblyName_ValidTrustedPlatformAssembly [FAIL] System.IO.FileLoadException : Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Stack Trace: Discovered: System.Runtime.Serialization.Json.Tests at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly) at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath) at System.Runtime.Loader.Tests.CustomTPALoadContext.Load(AssemblyName assemblyName) at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) at System.Runtime.Loader.Tests.AssemblyLoadContextTest.LoadFromAssemblyName_ValidTrustedPlatformAssembly() ``` 8645 area-System.Data [SQL Server 2005] System.Data.SqlClient: pre-login fails with SSL error even with Encryption=false "Platform : Debian 8 ""Jessie"" Runtime : 1.0.0-preview1-002702,coreclr,x64,linux System.Data.SqlClient : 4.1.0-rc2-24027 ConnectionString : Server=tcp:server.domain.lan,1433;User ID=XXXX;Password=XXXX;Encrypt=False"" An attempt to connect to a Microsoft SQL Server 2005 instance results in the following exception: ``` Project foo (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation. Unhandled Exception: System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 31 - Encryption(ssl/tls) handshake failed) ---> System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: size at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.Data.SqlClient.SNI.SslOverTdsStream.Read(Byte[] buffer, Int32 offset, Int32 count) at System.IO.Stream.<>c.b__39_0(Object ) at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Threading.Tasks.TaskToApm.End[TResult](IAsyncResult asyncResult) at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult) --- End of stack trace from previous location where exception was thrown --- at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Data.SqlClient.SNI.SNITCPHandle.EnableSsl(UInt32 options) at System.Data.SqlClient.SNI.SNIProxy.EnableSsl(SNIHandle handle, UInt32 options) --- End of inner exception stack trace --- at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at ConsoleApplication.Program.Main(String[] args) ``` To me, the error looks as if the `Encrypt=false` just does not get communicated properly in the [`PRELOGIN` packet](https://msdn.microsoft.com/en-us/library/dd357559.aspx) because the exception is the same no matter if I set `Encrypt` to `true` (the default) or `false`. Adding `TrustServerCertificate=true` with the `Encrypt` setting enabled or disabled has no effect. The `Encrypt` setting is parsed as if I specify an invalid value for it, I get an error about it. " 8647 area-System.Xml Port xsd.exe to .NET Core We use xsd.exe to generate C# classes for based on xml schema. At present there is no xsd.exe tool to generate CoreCLR compliant code and hence code generation can not be fully automated as part of the build at the moment. Please let us know plan/timelines around availability of the same. 8652 area-System.ComponentModel Skip failing S.CM.TypeConverter test #8606 can also affect Windows builds, so with this change the test is skipped on all platforms. @stephentoub 8655 area-System.IO .NET should no longer preemptively check for paths being too long "EDIT: See latest list of work items: https://github.com/dotnet/corefx/issues/8655#issuecomment-314969840 We've never been able to get this correct. Historically we've blocked using legitimate paths by trying to guess up front. Across all of the platforms we don't have a rock solid way to know that a path will go over a particular API's limit. On Windows the historical ""limit"" has been MAX_PATH, but not all of the APIs enforce it. In addition, there is an ability to circumvent it for _some_ APIs with extended DOS device syntax (`\\?\`). Even if we did have a list of every API we called and what it supported: 1. That API's support could (and likely will) change 2. The real limits are based on complicated internal details that are difficult, if not impossible, to replicate (see [DOS to NT: A Path's Journey](https://blogs.msdn.microsoft.com/jeremykuhne/2016/05/02/dos-to-nt-a-paths-journey/)) 3. Lower level file systems (CDFS, UDF, NTFS, FAT16, ReFS, etc., etc.) impose their own limits which are nearly impossible to check with reparse points 4. Related to above we already get it wrong with path segments- not all file systems have a max of 255 characters It is particularly problematic with normalization methods that we provide (Path.GetFullPath). Checking there can block legitimate uses with other API's that don't have the limits we are claiming are system wide. PathTooLong should only throw from the actual platform invokes, which we already do. " 8657 area-System.Security Seg fault in System.Security.Cryptography.X509Certificates.Tests.dll on CentOS in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/centos7.1_release_tst_prtest/1252/consoleText ``` ./RunTests.sh: line 208: 41177 Segmentation fault ./corerun xunit.console.netcore.exe System.Security.Cryptography.X509Certificates.Tests.dll -xml testResults.xml -notrait Benchmark=true -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing -notrait category=nonlinuxtests Finished running tests. End time=18:46:58. Return value was 139 error: One or more tests failed while running tests from ''. Exit code 139. ``` I don't know if this is the same issue @janvorli is already chasing down... 8661 area-System.Collections None of the System.Collections.Generic collections have a ToString override. "It would be very useful to have `ToString` overrides on our generic collections, to make it easier for a user in the debugger to see at a glance what's inside of them. This could probably be mostly implemented in terms of a simple helper method for `IEnumerable` that goes something like this: ``` return string.Join(enumerable.Select(obj => obj == null ? ""null"" : obj.ToString()), "", ""); ``` Any thoughts on this? Good idea? Bad idea? (Please forgive me if the LINQ syntax isn't perfect; I don't do much work with lambdas in C#.) " 8662 area-System.Net WinHttpResponseStream.ReadAsync() ignores cancellation token "(Split from #8627 which contained multiple related bugs) The following code demonstrates the problem. This test server will return response headers quickly. But will take 15 seconds to return response body. We cancel the ReadAsync() after 1 second. But the ReadAsync() task doesn't cancel until the 15 seconds has elapsed. ``` c# [Fact] public async Task ResponseStreamRead_CancelUsingToken_TaskCanceledQuickly() { var stopwatch = new Stopwatch(); stopwatch.Start(); using (var client = new HttpClient()) using (HttpResponseMessage response = await client.GetAsync(s_fastHeadersSlowBodyServer, HttpCompletionOption.ResponseHeadersRead)) { stopwatch.Stop(); _output.WriteLine(""Time to get headers: {0}"", stopwatch.Elapsed.ToString()); Assert.Equal(HttpStatusCode.OK, response.StatusCode); var cts = new CancellationTokenSource(); Stream stream = await response.Content.ReadAsStreamAsync(); byte[] buffer = new byte[ResponseBodyLength]; Task ignore = Task.Delay(new TimeSpan(0,0,1)).ContinueWith(_ => { _output.WriteLine(""Calling cts.Cancel() at: {0}"", stopwatch.Elapsed.ToString()); cts.Cancel(); }); stopwatch.Restart(); await Assert.ThrowsAsync( () => stream.ReadAsync(buffer, 0, buffer.Length, cts.Token)); stopwatch.Stop(); _output.WriteLine(""ReadAsync() completed at: {0}"", stopwatch.Elapsed.ToString()); Assert.True(stopwatch.Elapsed < new TimeSpan(0,0,3), ""Elapsed time should be short""); } } ``` " 8663 area-System.Net HttpClient ignores Timeout and cancellation token for slow response body reads on Windows "(Split from #8627 which contained multiple related bugs) This bug is in the core logic for HttpClient, HttpContent classes and will affect both Windows and *Nix. The following code demonstrates the problem with all of the HttpClient *Async() methods when set to buffer in the response body. This test server will return response headers quickly. But will take 15 seconds to return response body. In these examples, we call GetAsync() and include the option (default) to read in (buffer into memory) the response body as well as response headers. Each test uses a different method to cancel the operation after 1 second. Either the .Timeout property or a cancellation token. In both case, we request cancellation after 1 second. But the GetAsync() task doesn't cancel until the 15 seconds has elapsed. This pattern works on .NET Framework (Desktop). Looking at the Desktop code, it is surprising that it works because the cancellation token passed into `HttpClient.GetAsync` is not actually propagated down thru the stack. The cancellation logic only works on Desktop because of a special internal method used by Desktop HTTP stack (HttpWebRequest). Since we have a different HTTP stack for CoreFx, this doesn't work. ``` c# [ActiveIssue(8663)] [Fact] public async Task GetIncludesReadingResponseBody_CancelUsingTimeout_TaskCanceledInShortTime() { var stopwatch = new Stopwatch(); stopwatch.Start(); using (var client = new HttpClient()) { client.Timeout = new TimeSpan(0, 0, 1); Task getResponse = client.GetAsync(s_fastHeadersSlowBodyServer, HttpCompletionOption.ResponseContentRead); stopwatch.Restart(); await Assert.ThrowsAsync( () => getResponse); stopwatch.Stop(); _output.WriteLine(""GetAsync() completed at: {0}"", stopwatch.Elapsed.ToString()); Assert.True(stopwatch.Elapsed < new TimeSpan(0,0,3), ""Elapsed time should be short""); } } [ActiveIssue(8663)] [Fact] public async Task GetIncludesReadingResponseBody_CancelUsingToken_TaskCanceledInShortTime() { var stopwatch = new Stopwatch(); stopwatch.Start(); var cts = new CancellationTokenSource(); using (var client = new HttpClient()) { Task getResponse = client.GetAsync(s_fastHeadersSlowBodyServer, HttpCompletionOption.ResponseContentRead, cts.Token); Task ignore = Task.Delay(new TimeSpan(0, 0, 1)).ContinueWith(_ => { _output.WriteLine(""Calling cts.Cancel() at: {0}"", stopwatch.Elapsed.ToString()); cts.Cancel(); }); stopwatch.Restart(); await Assert.ThrowsAsync( () => getResponse); stopwatch.Stop(); _output.WriteLine(""GetAsync() completed at: {0}"", stopwatch.Elapsed.ToString()); Assert.True(stopwatch.Elapsed < new TimeSpan(0,0,3), ""Elapsed time should be short""); } } ``` " 8664 area-System.IO Allow other file handle types If using `\\?\` allow handle types via the path constructor that we allow in handle constructors. #187 @zippy1981, @davkean, @ericstj, @ianhays 8665 area-Infrastructure Change dnxcore50 to netcoreapp10 Most existing projects assume dnxcore50 in various ways including the json and csproj. These should all be changed to netcoreapp10 per @ericstj Note that the test scripts for unix (including runtest.sh) assume dnxcore50 being the last folder in the test's bin directory. An attempt was made to use netcoreapp10 for the folder test name for System.Security.Cryptography.OpenSll and .Cng but resulted in various hacks in its respective .csproj. 8668 area-System.Reflection System.Reflection.TargetException.ctor() has different message between Core and Framework While refactoring tests for System.Reflection.TargetException, I found that the [.NET documentation](https://msdn.microsoft.com/en-us/library/system.reflection.targetexception%28v=vs.110%29.aspx) states that the default constructor: > Initializes a new instance of the TargetException class with an empty message and the root cause of the exception. However I'm getting different messages in the exception on the [.NET framework](http://referencesource.microsoft.com/#mscorlib/system/reflection/targetexception.cs,8aea524b98ba77d4) where I get: > Error in the application. and .NET Core, where I get: > Exception of type 'System.Reflection.TargetException' was thrown. What should be the behavior I should test for? 8671 area-Infrastructure Slave went offline (OSX Release Build and Test) ``` Slave went offline during the build 14:40:45 ERROR: Connection was broken: java.io.IOException: Connection aborted: org.jenkinsci.remoting.nio.NioChannelHub$MonoNioTransport@6cd7293e[name=dci-macpro-04] 14:40:45 at org.jenkinsci.remoting.nio.NioChannelHub$NioTransport.abort(NioChannelHub.java:208) 14:40:45 at org.jenkinsci.remoting.nio.NioChannelHub.run(NioChannelHub.java:628) 14:40:45 at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) 14:40:45 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 14:40:45 at java.util.concurrent.FutureTask.run(FutureTask.java:262) 14:40:45 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 14:40:45 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 14:40:45 at java.lang.Thread.run(Thread.java:745) 14:40:45 Caused by: java.io.IOException: Connection reset by peer 14:40:45 at sun.nio.ch.FileDispatcherImpl.read0(Native Method) 14:40:45 at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) 14:40:45 at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) 14:40:45 at sun.nio.ch.IOUtil.read(IOUtil.java:197) 14:40:45 at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:384) 14:40:45 at org.jenkinsci.remoting.nio.FifoBuffer$Pointer.receive(FifoBuffer.java:136) 14:40:45 at org.jenkinsci.remoting.nio.FifoBuffer.receive(FifoBuffer.java:306) 14:40:45 at org.jenkinsci.remoting.nio.NioChannelHub.run(NioChannelHub.java:561) 14:40:45 ... 6 more ``` Found in #8631: http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/osx_release_prtest/1337/consoleFull#-1250096032a6fc86e9-18e8-40d3-a876-f39e33df2c41 8673 area-System.Net HttpClientHandler needs Expect: 100-Continue support to use client certificates fully "Without support for this header, some scenarios are completely broken with no workaround. If you are sending a request to a server over HTTPS which doesn't immediately require a client certificate on the initial handshake and the request entity body is non-trivial in size then the request will always fail. This is because when the server sends the SSL renegotiation request the client has already sent too much data for the server to buffer before it can receive the SSL renegotiation response. If you support HTTP and HTTPS on the same site in IIS, then you can't set certificates to be required, only accepted. When communicating with IIS/HTTP.SYS, 16KB is the amount of data that the client needs to send so that the connection can't be established. The `Expect: 100-Continue` header works around this issue by causing the client to hold off sending the entity body until the server sends a ""100 Continue"" status response. This allows the server to do the SSL renegotiation before it sends the ""100 Continue"" response and the connection/request succeeds. Without full support for this header, client certificates with an entity body > 16KB are going to be a fragile use case depending on server config and client/server latency. " 8675 area-Infrastructure Enabling ARM based builds in corefx CI The current CI code in corefx does not build (cross/native) for ARM architecture. Some commits could break the native part of corefx for Linux ARM (as can be seen here #8557 ). I want to add the code to cross build the native part of corefx for Ubuntu-ARM to prevent such build breaks. I would like to do the same in 2 steps. 1. Add code to enable cross build for Ubuntu ARM to the CI (supporting manual trigger of the CI check). 2. Once this is confirmed to work correctly, change the code to make this check automatically triggered for every PR. I saw the CI script, and have a question regarding where in the script could this change be best accommodated. 1. Adding code to build native corefx (no testing) under the outerloop testing part of the script (lines 319 to 375). 2. Adding code to build native corefx (again, no testing) under the innerloop part of the script (lines 467 to 590). What is the best choice for this change? @mmitche @Priya91 8677 area-System.Linq ParallelQueryCombinationTests.GetEnumerator_AggregateException test failed in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_osx_release/40/consoleText ``` System.Linq.Parallel.Tests.ParallelQueryCombinationTests.GetEnumerator_AggregateException(source: ThrowOnFirstEnumeration, operation: Union-Left:Default) [FAIL] Assert.Throws() Failure Expected: typeof(System.AggregateException) Actual: (No exception was thrown) Stack Trace: at System.Linq.Parallel.Tests.AssertThrows.Wrapped[T](Action action) at System.Linq.Parallel.Tests.ParallelQueryCombinationTests.GetEnumerator_AggregateException(Labeled`1 source, Labeled`1 operation) ``` 8679 area-System.ComponentModel Custom Type Converters in Core "Custom Type converters as detailed here: https://msdn.microsoft.com/en-us/library/ayybcxe5.aspx are not working in core. The ConvertFrom() and ConvertTo() methods never get hit but they do work when targetting full CLR. This is how my project.json looks like: `""dependencies"": { ""Newtonsoft.Json"": ""8.0.3"", ""System.ComponentModel.TypeConverter"": ""4.0.1-rc2-24027"" }, ""runtimes"": { ""win7-x64"": { }, ""win7-x86"": { } }, ""frameworks"": { ""netcoreapp1.0"": { ""imports"": ""dnxcore50"", ""dependencies"": { ""Microsoft.NETCore.App"": { ""type"": ""platform"", ""version"": ""1.0.0-rc2-3002702"" }, ""System.Dynamic.Runtime"": ""4.0.11-rc2-24027"", ""System.Runtime.Serialization.Primitives"": ""4.1.1-rc2-24027"" } } }` " 8681 area-System.Threading AsyncLocal is behaving differently after upgraging from DNX "## Steps to reproduce I have the following class: ``` c# namespace MyTested.Mvc.Internal.Caching { using System.Linq; using System.Collections.Generic; #if NET451 using System.Runtime.Remoting.Messaging; using System.Runtime.Remoting; #elif NETSTANDARD1_5 using System.Threading; #endif using Contracts; using Microsoft.Extensions.Caching.Memory; public class MockedMemoryCache : IMockedMemoryCache { #if NET451 private const string DataKey = ""__MemoryCache_Current__""; #elif NETSTANDARD1_5 private static readonly AsyncLocal> МemoryCacheCurrent = new AsyncLocal>(); #endif private readonly IDictionary cache; public MockedMemoryCache() { this.cache = this.GetCurrentCache(); } public int Count => this.cache.Count; public void Dispose() { this.cache.Clear(); } public void Remove(object key) { if (this.cache.ContainsKey(key)) { this.cache.Remove(key); } } public ICacheEntry CreateEntry(object key) { var value = new MockedCacheEntry(key); this.cache[key] = value; return value; } public bool TryGetValue(object key, out object value) { ICacheEntry cacheEntry; if (this.TryGetCacheEntry(key, out cacheEntry)) { value = cacheEntry.Value; return true; } value = null; return false; } public bool TryGetCacheEntry(object key, out ICacheEntry value) { if (this.cache.ContainsKey(key)) { value = this.cache[key]; return true; } else { value = null; return false; } } public IDictionary GetCacheAsDictionary() { return this.cache.ToDictionary(c => c.Key, c => c.Value.Value); } private IDictionary GetCurrentCache() { #if NET451 var handle = CallContext.GetData(DataKey) as ObjectHandle; var result = handle?.Unwrap() as IDictionary; if (result == null) { result = new Dictionary(); CallContext.SetData(DataKey, new ObjectHandle(result)); } return result; #elif NETSTANDARD1_5 var result = МemoryCacheCurrent.Value; if (result == null) { result = new Dictionary(); МemoryCacheCurrent.Value = result; } return result; #endif } } } ``` The following test runs successfully on DNX. Assume that TestServiceProvider always returns the same instanve of MockedMemoryCache and TestHelper just call Dispose, which clears the dictionary. ``` c# [Fact] public void MockedMemoryCacheShouldBeDifferentForEveryCallAsynchronously() { Task .Run(async () => { TestHelper.ClearMemoryCache(); string firstValue = null; string secondValue = null; string thirdValue = null; string fourthValue = null; string fifthValue = null; var tasks = new List { Task.Run(() => { var memoryCache = TestServiceProvider.GetService(); memoryCache.Set(""test"", ""first""); firstValue = TestServiceProvider.GetService().Get(""test""); TestHelper.ClearMemoryCache(); }), Task.Run(() => { var memoryCache = TestServiceProvider.GetService(); memoryCache.Set(""test"", ""second""); secondValue = TestServiceProvider.GetService().Get(""test""); TestHelper.ClearMemoryCache(); }), Task.Run(() => { var memoryCache = TestServiceProvider.GetService(); memoryCache.Set(""test"", ""third""); thirdValue = TestServiceProvider.GetService().Get(""test""); TestHelper.ClearMemoryCache(); }), Task.Run(() => { var memoryCache = TestServiceProvider.GetService(); memoryCache.Set(""test"", ""fourth""); fourthValue = TestServiceProvider.GetService().Get(""test""); TestHelper.ClearMemoryCache(); }), Task.Run(() => { var memoryCache = TestServiceProvider.GetService(); memoryCache.Set(""test"", ""fifth""); fifthValue = TestServiceProvider.GetService().Get(""test""); TestHelper.ClearMemoryCache(); }) }; await Task.WhenAll(tasks); Assert.Equal(""first"", firstValue); Assert.Equal(""second"", secondValue); Assert.Equal(""third"", thirdValue); Assert.Equal(""fourth"", fourthValue); Assert.Equal(""fifth"", fifthValue); }) .GetAwaiter() .GetResult(); } ``` ## Expected behavior The test to pass like it did on DNX. ## Actual behavior After moving to CLI the test started failing with unexpected values like `first` equals `third` and so on. It seems that the internal dictionary is shared between the tasks and it should not be. Maybe I am missing something? Is this expected behavior? If you need more minimalistic example, I can provide one. NOTE: After changing AsyncLocal to ThreadLocal the test passed right away. " 8683 area-System.Threading Thread.Yield not available on CoreClr It is used for example in `SpinWait` etc however it is not exposed publicly in the api - although it is public https://github.com/dotnet/coreclr/issues/5094 8684 area-System.Security Improve crypto error handling for ECDSA Misc low-priority issues found post code review (elliptic curve support): - Clear native errors in cases where validating oid, and other failure cases where a native crypto exception will not occur (ERR_clear_error) to avoid false exception information - Add [DebuggerDisplay] ECCurve to return the curve oid so we get useful debugger information instead of the default type name semantics (via ToString) - Remove any unused resource strings (one known: Cryptography_UnsupportedEcKeyAlgorithm) 8686 area-System.Security S.S.C.OpenSsl contract does not include ECDSA import/export The contract stayed at netstandard1.4, it needs to be bumped to 1.6 and the new override methods declared. We should do a search across github to find out how prevalent references to this package directly are, but the quick consensus is we should just bump it to 1.6 and not carry around the 1.4 compat version. 8688 area-System.Security Enhance RSA.Create During the API review of #7688 it was decided that to enable better cross-plat authoring we should have Create() methods on the following crypto base classes: ECDsa: Create(), Create(ECCurve), Create(ECParameters) _RSA: Create(), Create(int), Create(RSAParameters)_ ECDiffieHellman: Create(), Create(ECCurve), Create(ECParameters) DSA: Create(), Create(int), Create(DSAParameters) Hopefully all of these make it for net463, and we should have them in .NET Core as well. This specific issue tracks adding the int and RSAParameters create overloads for RSA, and is an offshoot of #8487. 8692 area-System.Net "Add ""FastHeadersSlowBody"" capability to CI-accessible test server" "Ref: Issue #8662 ``` c# // TODO: Issue #X. Move this internal test server capability to Azure test server or Loopback server. private const string FastHeadersSlowBodyHost = ""winrtnet.corp.microsoft.com""; private const int FastHeadersSlowBodyPort = 1337; private const int ResponseBodyReadDelayInMilliseconds = 15000; // 15 seconds. private const int ResponseBodyLength = 1024; private static Uri s_fastHeadersSlowBodyServer = new Uri(string.Format( ""http://{0}:{1}/?slow={2}&length={3}"", FastHeadersSlowBodyHost, FastHeadersSlowBodyPort, ResponseBodyReadDelayInMilliseconds, ResponseBodyLength)); ``` " 8693 area-System.Net Fix cancellation of WinHttpHandler response stream reads Reading from the response stream using ReadAsync() was ignoring the cancellation token passed in. To fix this, registered a delegate that will be called to dispose the WinHTTP request handle during pending I/O. This will cause the WinHTTP operation to cancel. Added tests. For now, left them disabled to be resolved in issue #8692 next week. But wanted to get this fix in asap since it blocks partners for RTM. Fixes #8662. 8695 area-System.ComponentModel Preserve ordering in MemberDescriptor.FilterAttributesIfNeeded Prior code used `Hashtable` to remove duplicates in the `_attributes` array, then reassigned that array with `Hashtable.Values`, sometimes changing the ordering of elements and causing `Equals` to erroneously return false. With this change, duplicates are removed without affecting the order of elements. This fixes #8606. @stephentoub @Tanya-Solyanik @twsouthwick 8700 area-System.Net Restructure IP address parsing tests "- The System.Uri tests were relying on IPAddress.Parse to validate their results. Changed these to hard-code known good results, so we're no longer dependent on IPAddress.Parse to validate System.Uri. - The IPAddress.Parse tests were missing many cases that were covered in the System.Uri tests. Added these cases to the IPAddress tests. - Restructured all of these as ""theories."" - Marked known differences between platforms for various IPAddress.Parse cases. This represents the ""fix"" for most of the platform differences in IPAddress.Parse, which we have decided should simply behave as the underlying platform does. One exception is #8362, which we can still fix by switching from `getaddrinfo` to `inet_aton` on OSX. Closes #8361. Closes #8360. @stephentoub @CIPop " 8701 area-System.Data SqlClient: async command to fetch sequence values hangs connection on Linux "Executing a DbCommand asynchronously with SqlClient can cause the connection to hang on Linux. ### Setup Minimal repro here: [Archive.zip](https://github.com/dotnet/corefx/files/402773/Archive.zip) What this test app does: Create 50 tasks. Each task tries to select a value from a sequence using ExecuteScalarAsync. The important part of this repro: ``` c# using (var conn = new SqlConnection(connStr)) { var command = conn.CreateCommand(); command.CommandText = ""SELECT NEXT VALUE FOR TestSequence""; conn.Open(); await command.ExecuteScalarAsync(); } ``` ### Expected behavior Can retrieve 50 values in parallel for all platforms. It works on Windows 10-x64. ### Actual behavior On Linux, command execution hangs on executescalarasync. Subsequent attempts to open a connection will overwhelm the server until to refuses more connections. A few of the first calls to ExecuteScalarAsync may pass, but with in a few seconds, this simple app crashes as subsequent connections are rejected: ``` System.Data.SqlClient.SqlException : A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server) ``` ### Setup SQL 2014 and SQL 2016 Ubuntu 14.04-x64 System.Data.SqlClient/4.1.0-rc2-24027 Exact same app works on Windows against the exact same database using an identical connection string: `Server=mymachine.com;User ID=user;Password=password;Connect Timeout=30` " 8703 area-System.Data System.Data.SqlClient: System.OverflowException during Prelogin Handshake "During the Sql Client prelogin handshake, it appears the Sql Client does not respect the stream nature of TCP and will fail with _System.OverflowException: Arithmetic operation resulted in an overflow_ if the underlying socket read call returns less bytes than expected. Sample app that repro's the issue: ``` csharp class Program { static void Main(string[] args) { string sqlHost = ""[YourDBHost]""; Task.Factory.StartNew(() => { SetupProxy(sqlHost); }); // Using sleeps to avoid any races... Thread.Sleep(1000); using (SqlConnection conn = new SqlConnection(""Server=localhost,9999;Database=[YourDBName];User ID=sa;Password=[password];Encrypt=False"")) { conn.Open(); Console.WriteLine(""Open succeeds""); } } static void SetupProxy(string actualHost) { // Create listener, wait for client TcpListener listener = new TcpListener(9999); listener.Start(); var client = listener.AcceptTcpClient(); var sqlClient = new TcpClient(actualHost, 1433); // Setup reading and writing proxy Task.Factory.StartNew(() => { ForwardToSql(client, sqlClient); }); Task.Factory.StartNew(() => { ForwardToClient(client, sqlClient); }); } static void ForwardToSql(TcpClient ourClient, TcpClient sqlClient) { while(true) { byte[] buffer = new byte[1024]; int bytesRead = ourClient.GetStream().Read(buffer, 0, 1024); sqlClient.GetStream().Write(buffer, 0, bytesRead); } } static void ForwardToClient(TcpClient ourClient, TcpClient sqlClient) { byte[] buffer; int bytesRead; // Read one byte first to show the issue. // Comment this out to see things work as expected. buffer = new byte[1]; bytesRead = sqlClient.GetStream().Read(buffer, 0, 1); if(bytesRead != 1) { Console.WriteLine(""Failed reading a single byte...""); return; } ourClient.GetStream().Write(buffer, 0, bytesRead); // Now proxy normally. We will sleep for 500ms to make sure that nagling doesn't cause further data to be bundled with this. Thread.Sleep(500); while (true) { buffer = new byte[1024]; bytesRead = sqlClient.GetStream().Read(buffer, 0, 1024); ourClient.GetStream().Write(buffer, 0, bytesRead); } } } ``` " 8704 area-Serialization Setting ReflectionAsBackup as default. @shmao @khdang @zhenlan 8708 area-System.Globalization System.Tests.StringTests.{Starts|Ends}With_NullInStrings failures on CentOS ``` 18:23:43 System.Tests.StringTests.StartsWith_NullInStrings(comparison: CurrentCulture) [FAIL] 18:23:43 Assert.False() Failure 18:23:43 Expected: False 18:23:43 Actual: True 18:23:43 Stack Trace: 18:23:43 at System.Tests.StringTests.StartsWith_NullInStrings(StringComparison comparison) 18:23:43 System.Tests.StringTests.StartsWith_NullInStrings(comparison: CurrentCultureIgnoreCase) [FAIL] 18:23:43 Assert.False() Failure 18:23:43 Expected: False 18:23:43 Actual: True 18:23:43 Stack Trace: 18:23:43 at System.Tests.StringTests.StartsWith_NullInStrings(StringComparison comparison) 18:23:43 System.Tests.StringTests.EndsWith_NullInStrings(comparison: CurrentCulture) [FAIL] 18:23:43 Assert.False() Failure 18:23:43 Expected: False 18:23:43 Actual: True 18:23:43 Stack Trace: 18:23:43 at System.Tests.StringTests.EndsWith_NullInStrings(StringComparison comparison) 18:23:43 System.Tests.StringTests.EndsWith_NullInStrings(comparison: CurrentCultureIgnoreCase) [FAIL] 18:23:43 Assert.False() Failure 18:23:43 Expected: False 18:23:43 Actual: True 18:23:43 Stack Trace: 18:23:43 at System.Tests.StringTests.EndsWith_NullInStrings(StringComparison comparison) 18:23:43 Finished: System.Runtime.Tests 18:23:43 18:23:43 === TEST EXECUTION SUMMARY === 18:23:43 System.Runtime.Tests Total: 5781, Errors: 0, Failed: 4, Skipped: 0, Time: 3.193s ``` http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/centos7.1_release_tst_prtest/1303/consoleFull#-21371504001f1a4601-6aec-4fd5-b678-78d4389fd5e8 8712 area-System.Security JwtBearer validation failes on osx but works on windows "_From @hsorbo on May 20, 2016 14:16_ Been struggeling with exceptions porting from rc1 to rc2 on os x. On windows it seems to work, but failes with this on os x. Im using RS256. Am i missing something? ``` info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerMiddleware[7] auth0 was not authenticated. Failure message: IDX10503: Signature validation failed. Keys tried: 'Microsoft.IdentityModel.Tokens.X509SecurityKey , KeyId: RkUxNDU0QTg0RTNCRTNEQjk5ODg5MDBGRjIxQTJFQkM0NThBODgwQg '. Exceptions caught: 'System.ArgumentNullException: Value cannot be null. Parameter name: SafeHandle cannot be null. at System.StubHelpers.StubHelpers.SafeHandleAddRef(SafeHandle pHandle, Boolean& success) at Interop.Crypto.RsaVerify(Int32 type, Byte[] m, Int32 m_len, Byte[] sigbuf, Int32 siglen, SafeRsaHandle rsa) at System.Security.Cryptography.RSAOpenSsl.VerifyHash(Byte[] hash, Byte[] signature, HashAlgorithmName hashAlgorithmName) at System.Security.Cryptography.RSAOpenSsl.VerifyHash(Byte[] hash, Byte[] signature, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding) at System.Security.Cryptography.RSA.VerifyData(Byte[] data, Int32 offset, Int32 count, Byte[] signature, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding) at System.Security.Cryptography.RSA.VerifyData(Byte[] data, Byte[] signature, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding) at Microsoft.IdentityModel.Tokens.AsymmetricSignatureProvider.Verify(Byte[] input, Byte[] signature) at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateSignature(Byte[] encodedBytes, Byte[] signature, SecurityKey key, String algorithm) at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateSignature(String token, TokenValidationParameters validationParameters) ``` The setup code is fairly trivial: ``` app.UseJwtBearerAuthentication(new JwtBearerOptions { AuthenticationScheme = ""auth0"", Audience = Configuration[""Auth0:Audience""], Authority = Configuration[""Auth0:Authority""], AutomaticAuthenticate = true, AutomaticChallenge = true, }); ``` ``` brew info openssl openssl: stable 1.0.2h (bottled) [keg-only] ``` ``` dotnet --version 1.0.0-preview1-002702` ``` ``` uname -a Darwin Macarena.local 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64` ``` _Copied from original issue: aspnet/Security#826_ " 8713 area-System.Net HttpMessageContent - Is this a part of .NET Core? Can I use `HttpMessageContent` with .NET Core. I can't seem to find this class here or anywhere else. Any pointer will be appreciated. 8714 area-System.Net MailMessage and SmtpClient libraries in CoreFx Greetings, I'm using RC1 in production for my web application and it uses .NET Mail Service assemblies for sending mails using MailMessage and SmtpClient. These are only available on .NET Framework, when I'll get these libraries as a part of CoreFx so that I can port my application on .NET Core and avoid using 3rd party libraries. Regards, 8715 area-System.Net HttpRequestHeaders Date header Hello, Proposal: I think Date header in HttpRequestHeaders (and maybe other headers of DateTimeOffset type) must be of new DateTimeHeaderValue type which will be convertible to/from DateTimeOffset and string. Rationale: Many token based authentication schemes require client to send some hash/HMAC of request data. Value of Date header is almost always part of data to be hashed/HMACed. While values of other types of headers (like StringWithQualityHeaderValue) can be get by simply calling ToString() this is not the case for Date. So you'll have to read documentation on how dates are represented in HTTP headers and convert value exactly the same way. Or probably dig into source code of CoreFX to see how it's done. Abstraction leaked the bad way. As a side note, maybe it's good idea to provide type conversion operators for header value types, which will call ToString/Parse internally and ease one's life. 8716 area-System.Security System.Security.Cryptography.Native OSX build errors. My native build on OSX is failing from some compilation errors in the native crypto library. The failures look to be introduced by https://github.com/dotnet/corefx/pull/8600. ``` Scanning dependencies of target System.Security.Cryptography.Native [ 66%] [ 67%] [ 69%] [ 70%] [ 72%] Building CXX object System.Security.Cryptography.Native/CMakeFiles/System.Security.Cryptography.Native.dir/pal_ecc_import_export.cpp.o Building CXX object System.Security.Cryptography.Native/CMakeFiles/System.Security.Cryptography.Native.dir/pal_hmac.cpp.o Building CXX object System.Security.Cryptography.Native/CMakeFiles/System.Security.Cryptography.Native.dir/pal_ssl.cpp.o Building CXX object System.Security.Cryptography.Native/CMakeFiles/System.Security.Cryptography.Native.dir/pal_x509ext.cpp.o Building CXX object System.Security.Cryptography.Native/CMakeFiles/System.Security.Cryptography.Native.dir/pal_x509_root.cpp.o /Users/bryan/git/corefx/src/Native/System.Security.Cryptography.Native/pal_ecc_import_export.cpp:351:14: error: use of undeclared identifier 'EC_KEY_set_public_key_affine_coordinates' if (!EC_KEY_set_public_key_affine_coordinates(*key, qxBn, qyBn)) ^ /Users/bryan/git/corefx/src/Native/System.Security.Cryptography.Native/pal_ecc_import_export.cpp:493:14: error: use of undeclared identifier 'EC_KEY_set_public_key_affine_coordinates' if (!EC_KEY_set_public_key_affine_coordinates(key, qxBn, qyBn)) ^ 2 errors generated. make[2]: *** [System.Security.Cryptography.Native/CMakeFiles/System.Security.Cryptography.Native.dir/pal_ecc_import_export.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... /Users/bryan/git/corefx/src/Native/System.Security.Cryptography.Native/pal_ssl.cpp:80:34: error: use of undeclared identifier 'SSL_OP_NO_COMPRESSION' SSL_CTX_set_options(ctx, SSL_OP_NO_COMPRESSION); ^ /usr/include/openssl/ssl.h:582:39: note: expanded from macro 'SSL_CTX_set_options' SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL) ^ 1 error generated. make[2]: *** [System.Security.Cryptography.Native/CMakeFiles/System.Security.Cryptography.Native.dir/pal_ssl.cpp.o] Error 1 /Users/bryan/git/corefx/src/Native/System.Security.Cryptography.Native/pal_hmac.cpp:33:9: error: cannot initialize a variable of type 'int' with an rvalue of type 'void' int ret = HMAC_Init_ex(ctx.get(), key, keyLen, md, nullptr); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/bryan/git/corefx/src/Native/System.Security.Cryptography.Native/pal_hmac.cpp:56:12: error: cannot initialize return object of type 'int32_t' (aka 'int') with an rvalue of type 'void' return HMAC_Init_ex(ctx, nullptr, 0, nullptr, nullptr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/bryan/git/corefx/src/Native/System.Security.Cryptography.Native/pal_hmac.cpp:70:12: error: cannot initialize return object of type 'int32_t' (aka 'int') with an rvalue of type 'void' return HMAC_Update(ctx, data, UnsignedCast(len)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/bryan/git/corefx/src/Native/System.Security.Cryptography.Native/pal_hmac.cpp:86:9: error: cannot initialize a variable of type 'int' with an rvalue of type 'void' int ret = HMAC_Final(ctx, md, &unsignedLen); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 errors generated. make[2]: *** [System.Security.Cryptography.Native/CMakeFiles/System.Security.Cryptography.Native.dir/pal_hmac.cpp.o] Error 1 make[1]: *** [System.Security.Cryptography.Native/CMakeFiles/System.Security.Cryptography.Native.dir/all] Error 2 ``` This is on a fresh clone of the CoreFX repo. @steveharter @bartonjs 8718 area-Infrastructure NuGet packages for releases should have more memorable versions "Currently, the package versions for the RC2 release look something like this: | Package | Version | | --- | --- | | Microsoft.NETCore.App | 1.0.0-rc2-3002702 | | NETStandard.Library | 1.5.0-rc2-24027 | | System.Collections | 4.0.11-rc2-24027 | | Microsoft.AspNetCore.Server.Kestrel | 1.0.0-rc2-final | There seem to be three groups: - Microsoft.NETCore.App: rc2-3002702 - CoreFX: rc2-24027 - ASP.NET Core: rc2-final I like the ASP.NET Core approach of marking the release version by ""-final"", while CoreFX and NETCore.App just use a seemingly meaningless number. Would it be possible to use the ""-final"" approach for future releases of CoreFX, NETCore.App and any other .Net Core packages? I think this is especially important since hand-editing project.json seems to be a relatively common practice. " 8719 area-System.Collections BitArray should include shift operators As far as I can tell, BitArray does not currently support shift operators. These would be really useful if they could be implemented efficiently. ### API Proposal For details see https://github.com/dotnet/corefx/issues/8719#issuecomment-221659151 and https://github.com/dotnet/corefx/issues/8719#issuecomment-245046251 ```diff public sealed partial class BitArray : System.Collections.ICollection, System.Collections.IEnumerable { ... + public System.Collections.BitArray RightShift(int count); + public System.Collections.BitArray LeftShift(int count); ... } ``` 8721 area-System.Security ProjectReference -> Package Dependency: cannot convert from 'System.Security.Cryptography.ECCurve' to 'int' A recent change to System.Security.Cryptography.OpenSsl changed the surface area of the library. The result is that if you try to build tests against packages (convert projectrefrence’s into package dependencies), you get a build break. ``` 2016-05-20T07:00:03.3568246Z EcDsaOpenSslProvider.cs(21,37): error CS1503: Argument 1: cannot convert from 'System.Security.Cryptography.ECCurve' to 'int' [D:\A\_work\1\s\src\System.Security.Cryptography.OpenSsl\tests\System.Security.Cryptography.OpenSsl.Tests.csproj] 2016-05-20T07:00:03.3568246Z EcDsaOpenSslTests.cs(250,35): error CS1503: Argument 1: cannot convert from 'System.Security.Cryptography.ECCurve' to 'int' [D:\A\_work\1\s\src\System.Security.Cryptography.OpenSsl\tests\System.Security.Cryptography.OpenSsl.Tests.csproj] 2016-05-20T07:00:03.3568246Z EcDsaOpenSslTests.cs(265,35): error CS1503: Argument 1: cannot convert from 'System.Security.Cryptography.ECCurve' to 'int' [D:\A\_work\1\s\src\System.Security.Cryptography.OpenSsl\tests\System.Security.Cryptography.OpenSsl.Tests.csproj] 2016-05-20T07:00:03.3568246Z EcDsaOpenSslTests.cs(274,35): error CS1503: Argument 1: cannot convert from 'System.Security.Cryptography.ECCurve' to 'int' [D:\A\_work\1\s\src\System.Security.Cryptography.OpenSsl\tests\System.Security.Cryptography.OpenSsl.Tests.csproj] ``` I am creating a PR to disable this library from the conversion until this issue has been resolved. This issue is tracking the problem, and the temporary work-around. /cc @steveharter , @bartonjs 8723 area-Meta Port WCF message security to Core For full WCF support, and compatibility with Mono, WCF needs to bring in Message Security and the myriad of supporting classes around it. Message security enables confidentially, integrity and authentication within the message, rather than relying on the transport, thus enabling end-to-end security through message routers and a wider set of authentication mechanisms which are not limited by transport capabilities. 8724 area-System.IO Disable event filtering on OSX FSW The OSX FileSystemWatcher coalesces past events of a file into new events. Previously we did some special work to try to filter out those extraneous events to better match the FSW inotify/win32 behavior. However, this had the consequence that we filtered out some valid events. This commit modifies the behavior to raise an event for exactly every flag that the OS API sets. It also modifies the OSX tests to no longer assert that an event _didn't_ occur, but to only assert that an event _did_ occur. resolves #8547 8725 area-System.IO Increase FSW InternalBufferSize test values Seems we're intermittently not hitting the InternalBufferSize capacity in one of our FSW tests. Upping the expected capacity should resolve the issue. @stephentoub resolves #8569 8726 area-System.IO Special-case FSW tests for Win7 A few of the FSW tests are failing from differences between the win7 FSW behavior and the win8+ FSW behavior. resolves #8436 @stephentoub @Priya91 8727 area-System.Net UnixDomainSocketEndPoint should set length instead of null-terminating I've used (a copy of) UnixDomainSocketEndPoint to connect to a unix socket with an abstract address (path starts with a zero-byte). The connect call failed with ECONNREFUSED. When I changed the implementation to pass `2 + _encodedPath.Length` instead of `s_nativeAddressSize` in Serialize the connect works. \cc @stephentoub 8731 area-System.Net Remove dead code from System.Net.CredentialCache Remove an internal property on `CredentialCache` that is not used anywhere in CoreFX. In the full framework, the internal property is only used in [two places](http://referencesource.microsoft.com/#System/net/System/Net/CredentialCache.cs,7f6f0db537998048,references), inside `HttpWebRequest` and `SmtpClient`. cc: @davidsh, @CIPop 8735 area-System.Globalization Question: How to get RegionInfo from CultureInfo "In net45 I was using the following code to get the correct region info. ``` var ci = new System.Globalization.CultureInfo(""sv-SE""); var ri = new System.Globalization.RegionInfo(ci.LCID); ``` Is there any way that I can do more or less the same in dotnet-core? The reason is that the Swedish region info (if created from `SE`) is returned the following; that not is the main region information, and need to find correct main region. ``` PS> New-Object system.globalization.regioninfo(""SE"") Name : SE EnglishName : Sweden DisplayName : Sweden NativeName : Ruoŧŧa TwoLetterISORegionName : SE ThreeLetterISORegionName : SWE ThreeLetterWindowsRegionName : SWE IsMetric : True GeoId : 221 CurrencyEnglishName : Swedish Krona CurrencyNativeName : ruvdnu CurrencySymbol : kr ISOCurrencySymbol : SEK ``` If I go with the LCID instead from `CultureInfo(""sv-SE"")` I got the correct main region out. ``` PS> New-Object system.globalization.regioninfo((New-Object system.globalization.cultureinfo(""sv-se"")).LCID) Name : SE EnglishName : Sweden DisplayName : Sweden NativeName : Sverige TwoLetterISORegionName : SE ThreeLetterISORegionName : SWE ThreeLetterWindowsRegionName : SWE IsMetric : True GeoId : 221 CurrencyEnglishName : Swedish Krona CurrencyNativeName : Svensk krona CurrencySymbol : kr ISOCurrencySymbol : SEK ``` " 8736 area-Serialization DCS/DCJS: CultureInfo is not serializable Today, if you try to serialize CultureInfo, you'll get the following error: System.Runtime.Serialization.InvalidDataContractException : Type 'System.Globalization.CompareInfo' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. Alternatively, you can ensure that the type is public and has a parameterless constructor - all public members of the type will then be serialized, and no attributes will be required. 8742 area-Serialization Reflection Based DCS Bug Fixes: Fixed All Test Failures in NetCore. This PR includes 7 commits fixing 22 failed tests. One commit addressed one issue/bug. It might be easier to review the PR by reviewing each commit separately. /cc: @SGuyGe @khdang @zhenlan 8744 area-System.Net failure in ServerAsyncAuthenticate_AllClientVsIndividualServerSupportedProtocols_Success Details in http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/windows_nt_release_prtest/1552/console on a [PR](https://github.com/dotnet/corefx/pull/8707) that could not possibly cause the issue System.Net.Security.Tests.ServerAsyncAuthenticateTest.ServerAsyncAuthenticate_AllClientVsIndividualServerSupportedProtocols_Success(serverProtocol: Tls11) [FAIL] System.ComponentModel.Win32Exception : The credentials supplied to the package were not recognized Stack Trace: D:\j\workspace\windows_nt_re---37265eab\src\Common\src\Interop\Windows\sspicli\SSPIWrapper.cs(232,0): at System.Net.SSPIWrapper.AcquireCredentialsHandle(SSPIInterface secModule, String package, CredentialUse intent, SecureCredential scc) D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Security\src\System\Net\SslStreamPal.Windows.cs(330,0): at System.Net.SslStreamPal.AcquireCredentialsHandle(CredentialUse credUsage, SecureCredential secureCredential) D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Security\src\System\Net\SslStreamPal.Windows.cs(126,0): at System.Net.SslStreamPal.AcquireCredentialsHandle(X509Certificate certificate, SslProtocols protocols, EncryptionPolicy policy, Boolean isServer) D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Security\src\System\Net\SecureChannel.cs(769,0): at System.Net.Security.SecureChannel.AcquireServerCredentials(Byte[]& thumbPrint) D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Security\src\System\Net\SecureChannel.cs(901,0): at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Security\src\System\Net\SecureChannel.cs(805,0): at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Security\src\System\Net\SecureProtocols\SslState.cs(749,0): at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Security\src\System\Net\SecureProtocols\SslState.cs(955,0): at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Security\src\System\Net\SecureProtocols\SslState.cs(1131,0): at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) --- End of stack trace from previous location where exception was thrown --- D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Security\src\System\Net\SecureProtocols\SslState.cs(742,0): at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) D:\j\workspace\windows_nt_re---37265eab\src\System.Net.Security\src\System\Net\SecureProtocols\SslState.cs(710,0): at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- 8749 area-Infrastructure CoreRun.exe not being copied to test directory when the script is run "Hi, I've recently rebased against the latest changes you guys have made to the repo. When I do a clean build of the repo via ``` cmd build /p:ConfigurationGroup=Release /p:SkipTests=true ``` and then cd to an individual `bin/tests/OS.CPU.Release/Assembly.Tests`, then run the `RunTests` script with `path\to\corefx\packages` as the argument, I get the following output: ``` Using C:\Users\James\Code\git\corefx\packages as folder for resolving package dependencies. Executing in C:\Users\James\Code\git\corefx\bin\tests\AnyOS.AnyCPU.Release\System.Reflection.Tests\dnxcore50\ Hard linking dependent files... Finished linking needed files, moving to running tests. Running tests... Start time: 23:42:38.95 Command(s): CoreRun.exe xunit.console.netcore.exe System.Reflection.Tests.dll -xml testResults.xml -notrait Benchmark=true -notrait category=OuterLoop -notrait category=failing -notrait category=nonwindowstests 'CoreRun.exe' is not recognized as an internal or external command, operable program or batch file. Finished running tests. End time=23:42:38.97, Exit code = 1 ``` Looking into the code of the script, it appears the `CoreRun` executable isn't being copied into the test directory, even though it's still being used. [Here's](https://gist.github.com/jamesqo/66617b7ae005de8e6019cc9de146691e) a gist I made of the script (this particular one is for `System.Runtime.Tests`); if you do a Ctrl + F and search for ""corerun"", you'll notice it's not in one of the dependent files linked in. " 8761 area-System.IO Pipes tests failing on CentOS innerloop - UnauthorizedAccessException : Access to the path '/tmp/.dotnet/corefx' is denied http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/release_1.0.0/job/centos7.1_release_tst_prtest/4/testReport/ MESSAGE: System.UnauthorizedAccessException : Access to the path '/tmp/.dotnet/corefx' is denied.\n---- System.IO.IOException : Permission denied +++++++++++++++++++ STACK TRACE: at System.IO.Pipes.PipeStream.CreateDirectory(String directoryPath) at System.IO.Pipes.PipeStream.EnsurePipeDirectoryPath() at System.IO.Pipes.PipeStream.GetPipePath(String serverName, String pipeName) at System.IO.Pipes.NamedPipeServerStream.Create(String pipeName, PipeDirection direction, Int32 maxNumberOfServerInstances, PipeTransmissionMode transmissionMode, PipeOptions options, Int32 inBufferSize, Int32 outBufferSize, HandleInheritability inheritability) at System.IO.Pipes.Tests.NamedPipeTest_CreateServer.Unix_GetHandleOfNewServerStream_Throws_InvalidOperationException() ----- Inner Stack Trace ----- 8763 area-System.Runtime 300+ test failures with TypeLoadException: Could not load type 'System.Runtime.InteropServices.GCHandle' from assembly 'System.Runtime' "- OS X http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/checked_osx_tst_prtest/1821/testReport/ - Ubuntu http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/checked_ubuntu_tst_prtest/1954/testReport/ Stacktrace MESSAGE: BEGIN EXECUTION /Users/dotnet-bot/j/workspace/dotnet_coreclr/master/checked_osx_tst_prtest/bin/tests/Windows_NT.x64.Checked/Tests/coreoverlay/corerun Pinned.exe Unhandled Exception: System.TypeLoadException: Could not load type 'System.Runtime.InteropServices.GCHandle' from assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. ./Pinned.sh: line 106: 61574 Abort trap: 6 $_DebuggerFullPath ""$CORE_ROOT/corerun"" Pinned.exe $CLRTestExecutionArguments Expected: 100 Actual: 134 END EXECUTION - FAILED +++++++++++++++++++ STACK TRACE: " 8768 area-System.Net Restore Socket.ConnectAsync via hostname on *nix platforms. There's a bit of history to this, but due to https://github.com/dotnet/corefx/issues/5829 which was resolved by https://github.com/dotnet/corefx/commit/30bd4b79185d83f269f6a6e432881998a0158178, we are no longer able to use hostnames in socket connections for some platforms. Currently, it's a runtime `PlatformNotSupportedException`. This breaks [StackExchange.Redis](https://github.com/StackExchange/StackExchange.Redis) on at least OS X and Linux, you can see the issue filed here: https://github.com/StackExchange/StackExchange.Redis/issues/410 The best notes for this are in the https://github.com/dotnet/corefx/commit/30bd4b79185d83f269f6a6e432881998a0158178 commit, copied here for ease of consumption: > On unix, once connect fails on a socket, that socket becomes unusable for further operations, including additional connect attempts. This is at direct odds with Socket's instance Connect methods, some of which allow for multiple connect attempts, either due to multiple IPAddresses being provided or due to a string hostname / DnsEndPoint being provided that could then result in multiple IPAddresses to be tried. > > We've explored multiple workarounds for this, all of which have problems. The workaround still in the code involves creating a temporary socket for each address, connecting to it, and if that's successful then immediately disconnecting and connecting with the actual socket. But that causes mayhem for a server not expecting that pattern, e.g. that fails if the client disconnects and attempts a reconnect. > > This leaves us with a few choices, none of which are great: > 1. Remove the offending Connect instance methods. Ideally they'd be replaced with static methods, which can be implemented with POSIX-compliant behavior. But these methods are heavily used and work on Windows. > 2. Always throw from the instance Connect methods when there's a possibility that multiple addresses will be tried, e.g. from Connect(IPAddress[], ...) but also from Connect(EndPoint) if a DnsEndPoint is specified. This will break a lot of existing code, but it's also predictable, and developers will know quickly when using a problematic API and move away from it to supported patterns. > 3. Throw from the Connect methods if multiple addresses are actually supplied, e.g. calling Connect(IPAddress[]) with an array of length 1 would work but an array of length 2 will fail. This will allow a lot more existing code to work, but it's also very unpredictable, e.g. if a string host is provided and gets mapped by DNS to a single IPAddress in the test environment but then multiple IPAddresses in the production environment, everything will work fine locally but then fail in production. > 4. When presented with multiple addresses, try the first one, and if it fails, then throw a PlatformNotSupportedException. This may be slightly more predictable than (3), but is still unpredictable, e.g. if a DNS server returns addresses in a different quantity or order from another server. Currently option 2 is implemented, which breaks this codepath: [`SocketTaskExtensions.ConnectAsync(this Socket socket, string host, int port)`](https://github.com/dotnet/corefx/blob/d0dc5fc099946adc1035b34a8b1f6042eddb0c75/src/System.Net.Sockets/src/System/Net/Sockets/SocketTaskExtensions.cs#L60) [`Socket.BeginConnect(string host, int port, AsyncCallback requestCallback, object state)`](https://github.com/dotnet/corefx/blob/c2a6a128a6d2cdbad3a8be663d027152ca9d63bc/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs#L2304) This hits [line 2334](https://github.com/dotnet/corefx/blob/c2a6a128a6d2cdbad3a8be663d027152ca9d63bc/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs#L2334): `ThrowIfNotSupportsMultipleConnectAttempts();` The _exact_ codepath doesn't matter, because several more feed into this one. In fact even if you call [`BeginConnect(EndPoint remoteEP, AsyncCallback callback, object state)`](https://github.com/dotnet/corefx/blob/c2a6a128a6d2cdbad3a8be663d027152ca9d63bc/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs#L2262), it's still calling [`BeginConnect(dnsEP.Host, dnsEP.Port, callback, state);`](https://github.com/dotnet/corefx/blob/c2a6a128a6d2cdbad3a8be663d027152ca9d63bc/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs#L2293) in the host case anyway. So even using the explicit overload of a single endpoint, it still breaks. I would like us to change to option 3 in the comments above, only throwing **for the case that breaks**. The current state needlessly breaks existing code for no real reason. The comments in option 3 about deployments being a surprise break is perfectly valid, but it's no worse than option 2 and we're seeing that break in actual runtime usage already out in the wild. If we can't prevent the issue in general (it looks like all practical options have been exhausted there), I would argue for 2 changes: 1. Only break when multiple endpoints are _actually_ passed in. 2. Provide a much clearer exception message on why we're throwing, [here's a link to the current one](https://github.com/dotnet/corefx/blob/183f7fb0136d8b25f7e0194df4f18930d4199939/src/System.Net.Sockets/src/Resources/Strings.resx#L277). 8771 area-System.Reflection Downgrade S.R.Metadata to v1.2.1 and internalize public surface for NET Core 1.0.0 RTM "The changes under development for S.R.Metadata 1.3 are aligned to the VS ""15"" schedule and there are insufficient resources to lock them down now. We should set the .NET Core 1.0.0 RTM version of System.Reflection.Metadata to 1.2.1 and internalize the features under development for 1.3. We still need a new 1.2.1 package to support the new netstandard scheme for packages. cc @ericstj @tmat I have the change ready. Creating a tracking issue to follow the v1.0.0 change process. " 8773 area-System.IO ReadLinesReader.CreateIterator might not dispose a stream I just discovered [this](https://github.com/dotnet/corefx/blob/538a35ee2e7fe09ea5024ad464cb99331fec0b05/src/System.IO.FileSystem/src/System/IO/ReadLinesIterator.cs#L100) dubious line in the ReadLineIterator. If the StreamReader reader is not null the method still opens a stream but never disposes it or returns it in any way to the caller. This looks wrong to me. This might happen if Clone() is called. I think this should be fixed or a comment should be added explaining why this is the correct behavior. 8779 area-Serialization NetDatacontractSerializer functionality on linux Hi, We are trying to port our codebase to Linux. Right now, we are using NetDatacontractSerializer to send exception over wire as the client doesn't know the type of exception beforehand. Since NetDatacontractSerializer is no longer present in coreclr, we tried using DataContractResolver . However, since type information is not embedded in the serialized object, it throws an exception when we are trying to deserialize. In full CLR, DataContractResolver with dataContractSerializer would've solved the problem. Though DataContractResolver is available in coreCLR, there is no constructor of DataContractResolver using DataContractResolver. Is this the intended behavior. Can you help me out? 8783 area-System.Runtime Interop.mincore.IdnToAscii/IdnToUnicode fails on UWP there are two pinvoke definitions in Interop.Idna.cs which isn't compatible with UWP app. https://github.com/dotnet/corefx/blob/d7d2f7a83269b9540cd9a966338149dcc014171b/src/Common/src/Interop/Windows/mincore/Interop.Idna.cs 1> Compiling interop code 1>c:\users\namc\documents\visual studio 2015\Projects\App2\App2\obj\x86\Release\ilc\intermediate\App2.McgInterop\PInvoke.g.cs(2132,21): error : The best overloaded method match for 'McgInterop.api_ms_win_core_localization_l1_2_0_dll_PInvokes.IdnToUnicode(uint, ushort_, int, ushort_, int)' has some invalid arguments 1>c:\users\namc\documents\visual studio 2015\Projects\App2\App2\obj\x86\Release\ilc\intermediate\App2.McgInterop\PInvoke.g.cs(2136,9): error : Argument 4: cannot convert from 'char_' to 'ushort_' 1>c:\users\namc\documents\visual studio 2015\Projects\App2\App2\obj\x86\Release\ilc\intermediate\App2.McgInterop\PInvoke.g.cs(2231,21): error : The best overloaded method match for 'McgInterop.api_ms_win_core_localization_l1_2_0_dll_PInvokes.IdnToAscii(uint, ushort_, int, ushort_, int)' has some invalid arguments 1>c:\users\namc\documents\visual studio 2015\Projects\App2\App2\obj\x86\Release\ilc\intermediate\App2.McgInterop\PInvoke.g.cs(2235,9): error : Argument 4: cannot convert from 'char_' to 'ushort_' 1>c:\users\namc\documents\visual studio 2015\Projects\App2\App2\obj\x86\Release\ilc\intermediate\App2.McgInterop\PInvoke.g.cs(2289,21): error : The best overloaded method match for 'McgInterop.api_ms_win_core_localization_l1_2_0_dll_PInvokes.IdnToAscii__0(uint, ushort_, int, ushort_, int)' has some invalid arguments 1>c:\users\namc\documents\visual studio 2015\Projects\App2\App2\obj\x86\Release\ilc\intermediate\App2.McgInterop\PInvoke.g.cs(2293,9): error : Argument 4: cannot convert from 'char_' to 'ushort_' 1>c:\users\namc\documents\visual studio 2015\Projects\App2\App2\obj\x86\Release\ilc\intermediate\App2.McgInterop\PInvoke.g.cs(2317,21): error : The best overloaded method match for 'McgInterop.api_ms_win_core_localization_l1_2_0_dll_PInvokes.IdnToUnicode__0(uint, ushort_, int, ushort_, int)' has some invalid arguments 1>c:\users\namc\documents\visual studio 2015\Projects\App2\App2\obj\x86\Release\ilc\intermediate\App2.McgInterop\PInvoke.g.cs(2321,9): error : Argument 4: cannot convert from 'char_' to 'ushort_' 8787 area-Infrastructure OuterLoop: Release builds test with previous build native binaries, causing upgrade failures ``` MESSAGE: System.EntryPointNotFoundException : Unable to find an entry point named 'CryptoNative_EcKeyCreateByOid' in DLL 'System.Security.Cryptography.Native'. +++++++++++++++++++ STACK TRACE: at Interop.Crypto.EcKeyCreateByOid(String oid) at System.Security.Cryptography.ECDsaOpenSsl.GenerateKeyLazy() at System.Lazy`1.CreateValue() at System.Lazy`1.LazyInitValue() at System.Security.Cryptography.ECDsaOpenSsl.DuplicateKeyHandle() at System.Security.Cryptography.OpenSsl.Tests.RsaOpenSslTests.VerifyDuplicateKey_ECDsaHandle() ``` To see full test log [here](http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_osx_release/47/#showFailuresLink) 8797 area-System.IO FileStream to fully support externally open files # Proposal Add ``` FileStream(string path, SafeFileHandle handle, FileAccess fileAccess, int bufferSize, bool isAsync) ``` platform independent constructor for externally opened files, when both handle and path are known. # Rationale My case is good support for Transactioned NTFS file stream https://bitbucket.org/triflesoft/nabu/src/c52a39909bab429e4a7ce61fa1432e1d48b09ca9/Sources/Modules/Nabu.Platform.Vista/FileSystem/Streams/TxFileStream.cs where I open file by calling CreateFileTransactedW native API function and know both path and handle, but cannot supply both to constructor and forced to use dirty hack. Maybe there are other similar cases I do not know about. Anyway this is just a few lines of code which will break nothing. So effort is small and risk is absent. 8806 area-System.Runtime Provide API to enumerate assemblies that constitute the application "This has shown up a couple times as a limitation in the Win8-aot .NET profile - .NET Core doesn't provide a way to enumerate assemblies that constitute the ""running application"". Frameworks such as Xamarin Forms need to use [workarounds](https://developer.xamarin.com/guides/xamarin-forms/platform-features/windows/installation/universal/#troubleshooting) to build such lists. It can be up to a debate whether: - We define a new API, or reuse an existing one (`AppDomain.GetAssemblies` with a well defined behavior) - The API returns Assemblies, or string names. - We treat System.Private assemblies specially or not. - Etc. " 8807 area-System.Data AAD Auth (Federated Authenticaion) Support for Azure SQL Database "Please add AAD auth support for Azure SQL Database the way how that' s supported in .NET framework 4.6. We should be able to use Authentication modes like ""Active Directory Integrated"" and ""Active Directory Password"" in the connecting string. Currently, including aforementioned authentication modes result into following error: “Keyword not supported: ‘authentication’ . " 8809 area-System.Net Huge performance issue with HttpClient.PostAsync after upgrade from RC1 to RC2 "This issue related to (_https://github.com/aspnet/JavaScriptServices/issues/92_) We faced some strange issue with `await client.PostAsync` I created sample repository to show what we have here, you can find it [here](https://github.com/laskoviymishka/HttpIssue) To run sample do following steps: 1. Clone repository 2. Run `cd src\WebApplication1 & dotnet restore & dotnet run` 3. Run `cd ..\ConsoleApp1\ & dotnet restore & dotnet run` 4. Check how long it takes to make 20 post api requests To see how it works in classic .net open solution There is 2 console project with really same code, but .netcore version take significant longer. Please notice that stop watch show incorrect amount of time, or may be i log it incorect. Please notice that in RC1 version of _https://github.com/aspnet/JavaScriptServices_ the really same code perform usually for ~50-60 ms. Right not it executed ~1.2-1.5 second. Here is version of dotnet which i use: `.NET Command Line Tools (1.0.0-preview1-002702)` ConsoleApp run for following framework: ``` ""frameworks"": { ""netcoreapp1.0"": { ""imports"": ""dnxcore50"" } } ``` JavaScriptServices for following: ``` ""frameworks"": { ""netcoreapp1.0"": { ""imports"": [ ""dotnet5.6"", ""dnxcore50"", ""portable-net45+win8"" ] } }, ``` This is major issue IMHO. Can anyone advise? May be i miss something? " 8810 area-System.IO Path Too Long Exception Raising here as per: https://github.com/aspnet/FileSystem/issues/193 I'm listing files from an `IFileProvider` by enumerating the files, and filtering based on the file extension. However when accessing `IFileInfo.PhysicalPath` I'm getting a `PathTooLongException` ![image](https://cloud.githubusercontent.com/assets/3176632/15479635/f963432a-2118-11e6-8fb8-5a801bfb7e06.png) I'm using build `1.0.0-rc2-15922` in an ASP.NET 5 RC1 based application. Given that the file exists (on Windows), why should it error when accessing it's path? 8811 area-System.Net SslStream should handle handshake and close_notify alerts At least until 2014, there was a problem with SslStream, where it didn't terminate the connection properly. There is a solution for the problem described on [Stack Overflow: .NET SslStream doesn't close TLS connection properly](http://stackoverflow.com/questions/237807/net-sslstream-doesnt-close-tls-connection-properly). This solution (obviously) doesn't work any more with .NET Core. Is this problem fixed, or do we still need some kind of workaround? 8813 area-System.Data SqlConnection with a blank password leads to NRE The repro code is below `SqlConnectionStringBuilder bldr = new SqlConnectionStringBuilder(); bldr.Password = string.Empty; SqlConnection conn = new SqlConnection(bldr.ConnectionString); ` The above code throws a NullReferenceException when an empty password is set. 8815 area-Infrastructure "Lots of ""CoreRun.exe"" not found issues during CI" I noticed when looking at a test results lots of errors like ``` 14:16:22 System.AppContext -> /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug_prtest/bin/ref/System.AppContext/4.1.0.0/System.AppContext.dll 14:16:25 /bin/sh: 3: /tmp/tmpe981cd0cc1d24e4dbb12e5d80b2be7eb.exec.cmd: /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug_prtest/Tools/CoreRun.exe: not found ``` http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_debug_prtest/1490/consoleFull This one, for example, has 319 of these messages. I can't quite tell if this means that the tests aren't running or if it is innocuous. @MattGal is this related to your test runner work? I'm guessing this is coming from https://github.com/dotnet/buildtools/commit/6a824644b18126db086065175226f3f5dd6b4ed8 /cc @weshaggard @joperezr in case they have any ideas. I see Joe previously made a change to tool-runtime to copy corerun to corerun.exe. 8819 area-System.Net WinHttpRequestState memory leak when cancelling requests (reported by ASP.NET team). cc: @DavidObando There is a memory leak of WinHttpRequestState (and related objects) when the outstanding http request is canceled prior to it completing with an HttpResponseMessage. 8821 area-System.Threading Non value returning TaskCompletionSource `TaskCompletionSource` is an easy to use class to use for deferred result returning Tasks controlled via user code; with coverage for exception and cancellation handling. However it would be good to have a non-result returning, non-generic version also e.g. `TaskCompletionSource` with `TrySetResult` => `TrySetCompleted` I often see `TaskCompletionSource` with `TrySetResult(null)` used for this purpose, however that is not very clean. 8835 area-Infrastructure Updating versions of externalpackages in pkg\ExternalPackages\versions.props This PR, https://github.com/dotnet/corefx/pull/8824, is introducing pkg\ExternalPackages\versions.props which we are using to determine version numbers for external packages (System.IO.Compression for example). We need some method (similar to UpdatePackageDependencyVersion), so that we can keep this file up to date w.r.t. the latest stable package version for these packages (perhaps making use of the versions repo). Until that is done, we'll have to be diligent about manually updating this file. :( /cc @jhendrixMSFT @weshaggard @jhendrixMSFT , assigning to you for tracking at the moment... 8839 area-System.Data Unable to load DLL 'sni.dll' I have seen several threads and applied all the solutions but unable to resolve my issue. I am building a simple console application which uses SQL Client for connecting to a database and execute the query in VS 2015 and i am getting this error. I installed visual c++ also for VS 2015 but it didn't solve my issue. What else i can do to resolve this ? P.S I am using .NET core 1.0.0. version 8841 area-Infrastructure Stop pulling live CoreCLR We've been hitting issues left and right recently because some of our jobs pull live CoreCLR bits and that breaks us. We've hit issues due to the mscorlib rename, changes that expose test issues, and the inability to get a consistent mscorlib/coreclr pair because of how we pull from jobs. Windows, OSX and Ubuntu 14.04 consume CoreCLR from packages. It's time that we do the same for the other distros. If we are concerned about trying to get an early read on if CoreCLR changes are going to break CoreFX, there should be tests in CoreCLR that use a LKG test drop and run with a live CoreCLR. 8848 area-System.Linq LinQ GroupBy fails with TResult I have the following Linq Expression (after loading elements from the database): ``` C# var result = memberships.GroupBy( m => m.Role, (role, ms) => new RoleUsage { Role = role, MemberCount = ms.Count(m => m.StructuralUnitId == query.StructuralUnitId), InheritedMemberCount = ms.Count(m => m.StructuralUnitId != query.StructuralUnitId) }).ToList(); ``` Where `memberships` is a `List` of _non null_ `Membership` instances. `Role` and `Membership` are simple classes. Running that Linq will fail with a NullReferenceException in the inner `Count(m => m..)` Expression, since `m` is `null`. We first thought, it would have to do with EF, which loads the `Memberships`, but it's not the case. Appearantly somewhere in Linqs GroupBy something goes wrong, since pointing with the Debugger on `ms` states Powers of 2 in elemt Count, with lots of empty entries. Further Investigation leads to `corefx / src / System.Linq / src / System / Linq / Lookup.cs` and especially `ApplyResultSelector` (Line 240), which applies the result selector to the Elemtents of a Grouping. Unfortunately that `_elements` (Line 253) appearantly contains null entries, which should not be present. 8853 area-System.Console Implement Console support for netcore50 The Windows implementation currently used for netcore50 will fail the WACK check as it calls a number of APIs unsupported by UWP. This commit adds a separate netcore50 build that stubs out the API calls and replaces them with PlatformNotSupportedExceptions or no-ops where appropriate. The result is a platform-agnostic version of System.Console that can be used anywhere but is severely stripped of functionality. - Where possible the behavior of a redirected Console operation will attempt to mimic that of a Unix redirected Console operation. Otherwise it will throw. - Encoding is fixed to UTF8. Attempting to set the Console encoding will no-op. - Added a section in the packaging build for the new netcore50 specific binary - Input/Output redirection and subsequent reads/writes work as expected. Discussion points: - This does not add System.Console to the UWP meta-package. That is mostly because I do not know where the UWP meta-package lives. - This does not redirect Console.WriteLine to Debug or ETW. Those functions currently throw PlatformSupportedException on a non-redirected stdout. I'm going to push an update that special-cases them to call Debug.WriteLine if the Console isn't redirected if we're sure that is the most useful alternative. @ericstj @weshaggard resolves #5875. 8855 area-System.Reflection Any reason System.Reflection.TypeExtensions can also target Profile151 I see no reason why it can't profile 151 when it already targets a lot of similar profiles. 8856 area-System.Data SqlClient high memory consumption when there is disk IO saturation ### Repro environment - Windows 10 - LocalDb - [npm](https://nodejs.org/en/) - loadtest: `npm install -g loadtest` - dotnet 1.0.0-preview2-002823 ### Scenario description Stress test for ASP.NET and Entity Framework. The code is [here](https://github.com/aspnet/Performance/tree/dev/testapp/BasicApi). There's a server side and a client side to the test. For the server side, execute the app with `dotnet run -c Release`. For the client side, execute `.\loadtest.ps1 -iterations 50000 -rps 500` The `-rps 500` part is important, as the issue only manifests itself when disk IO is saturated. ### Observed results Once the test starts running we're reaching disk IO saturation almost immediately. The memory increases dramatically, up to 1 GB in private bytes when loadtest is run with the parameters stated above. After the test is up, we force GC collection once and take some measurements of the managed heap: - Gen 0: 49,440 bytes - Gen 1: 384,344 bytes - Gen 2: 5,178,176 bytes - LOH: 6,375,520 bytes Totalling roughly 12 MB. That said, the application is currently taking 959 MB in total committed memory. I'm assuming then that there's native memory being held. A profile trace of the execution shows that most of the time is being spent in `ReadSniSyncOverAsync`. ### Expected results We expect the memory to not grow as much as it's doing now. ### Notes After forcing GC collection a number of times, we end up bringing the committed memory down to 515 MB and it stabilizes there. The managed heap shrinks from 12 MB to 10 MB. 8857 area-System.Threading Regression threading.NamedMutex.test1 (from (empty)) http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/release_1.0.0/job/debug_centos7.1_prtest/11/testReport/junit/threading/NamedMutex/test1/ Stacktrace MESSAGE: 'paltest_namedmutex_test1' failed at line 355. Expression: m != nullptr 'paltest_namedmutex_test1' failed at line 421. Expression: WriteHeaderInfo(BuildGlobalShmFilePath(name, NamePrefix), -1, 0, &fd) 'paltest_namedmutex_test1' failed at line 502. Expression: m != nullptr 'paltest_namedmutex_test1' failed at line 607. Expression: m != nullptr 'paltest_namedmutex_test1' failed at line 248. Expression: parentEvents[i] != nullptr 'paltest_namedmutex_test1' failed at line 629. Expression: InitializeParent(parentEvents, childEvents) 'paltest_namedmutex_test1' failed at line 761. Expression: AbandonTests_Parent() 'paltest_namedmutex_test1' failed at line 234. Expression: WaitForSingleObject(childRunningEvent, FailTimeoutMilliseconds) == WAIT_OBJECT_0 'paltest_namedmutex_test1' failed at line 280. Expression: AcquireChildRunningEvent(childRunningEvent) 'paltest_namedmutex_test1' failed at line 675. Expression: InitializeChild(childRunningEvent, parentEvents, childEvents) +++++++++++++++++++ STACK TRACE: 8860 area-Infrastructure Update CI to use dotnet cli to build Ubuntu16.04 This is a tracking bug, to ensure using dotnet cli packages once available. dotnet/cli#2957 cc @joshfree 8864 area-Infrastructure Improve reliability of official builds. Official builds have been failing for the following reasons in order of severity. 1. Race in the build when building tests with one or more TargetGroups defined. 2. Missing retries when making Azure REST API calls. 3. Missing retries when downloading the CLI. These fixes have been tested and made in master, we need to port them to the release/1.0.0 branch as they are the only known issues causing those builds to fail. 8868 area-System.Net Regression System.Net.Sockets.Tests.DualMode.SendToV4IPEndPointToV6Host_NotReceived (from (empty)) http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/release_1.0.0/job/osx_release_prtest/24/testReport/junit/System.Net.Sockets.Tests/DualMode/SendToV4IPEndPointToV6Host_NotReceived/ Stacktrace MESSAGE: Assert.Throws() Failure\nExpected: typeof(System.TimeoutException)\nActual: typeof(System.Net.Sockets.SocketException): Connection refused +++++++++++++++++++ STACK TRACE: at System.Net.Sockets.Socket.SendTo(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint remoteEP) at System.Net.Sockets.Tests.DualMode.DualModeSendTo_IPEndPointToHost_Helper(IPAddress connectTo, IPAddress listenOn, Boolean dualModeServer, Boolean expectedToTimeout) Test failure in PR https://github.com/dotnet/corefx/pull/8863 8869 area-System.Globalization Regression - 10 CharTests failures in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/centos7.1_release_tst/490/consoleFull#-21371504001f1a4601-6aec-4fd5-b678-78d4389fd5e8 16:33:59 System.Tests.CharTests.IsNumber_String_Int [FAIL] 16:33:59 Assert.False() Failure 16:33:59 Expected: False 16:33:59 Actual: True 16:33:59 Stack Trace: 16:34:00 at System.Tests.CharTests.IsNumber_String_Int() 16:34:00 System.Tests.CharTests.IsLower_String_Int [FAIL] 16:34:00 Assert.False() Failure 16:34:00 Expected: False 16:34:00 Actual: True 16:34:00 Stack Trace: 16:34:00 at System.Tests.CharTests.IsLower_String_Int() 16:34:00 System.Tests.CharTests.IsLower_Char [FAIL] 16:34:00 Assert.False() Failure 16:34:00 Expected: False 16:34:00 Actual: True 16:34:00 Stack Trace: 16:34:00 at System.Tests.CharTests.IsLower_Char() 16:34:00 System.Tests.CharTests.IsNumber_Char [FAIL] 16:34:00 Assert.False() Failure 16:34:00 Expected: False 16:34:00 Actual: True 16:34:00 Stack Trace: 16:34:00 at System.Tests.CharTests.IsNumber_Char() 16:34:00 System.Tests.CharTests.IsDigit_Char [FAIL] 16:34:00 Assert.False() Failure 16:34:00 Expected: False 16:34:00 Actual: True 16:34:00 Stack Trace: 16:34:00 at System.Tests.CharTests.IsDigit_Char() 16:34:00 System.Tests.CharTests.IsLetter_String_Int [FAIL] 16:34:00 Assert.False() Failure 16:34:00 Expected: False 16:34:00 Actual: True 16:34:00 Stack Trace: 16:34:00 at System.Tests.CharTests.IsLetter_String_Int() 16:34:00 System.Tests.CharTests.IsLetterOrDigit_Char [FAIL] 16:34:00 Assert.False() Failure 16:34:00 Expected: False 16:34:00 Actual: True 16:34:00 Stack Trace: 16:34:00 at System.Tests.CharTests.IsLetterOrDigit_Char() 16:34:00 System.Tests.CharTests.IsLetterOrDigit_String_Int [FAIL] 16:34:00 Assert.False() Failure 16:34:00 Expected: False 16:34:00 Actual: True 16:34:00 Stack Trace: 16:34:00 at System.Tests.CharTests.IsLetterOrDigit_String_Int() 16:34:00 System.Tests.CharTests.IsDigit_String_Int [FAIL] 16:34:00 Assert.False() Failure 16:34:00 Expected: False 16:34:00 Actual: True 16:34:00 Stack Trace: 16:34:00 at System.Tests.CharTests.IsDigit_String_Int() 16:34:00 System.Tests.CharTests.IsLetter_Char [FAIL] 16:34:00 Assert.False() Failure 16:34:00 Expected: False 16:34:00 Actual: True 16:34:00 Stack Trace: 16:34:00 at System.Tests.CharTests.IsLetter_Char() 16:34:01 Finished: System.Runtime.Tests 16:34:01 16:34:01 === TEST EXECUTION SUMMARY === 16:34:01 System.Runtime.Tests Total: 5757, Errors: 0, Failed: 10, Skipped: 0, Time: 2.846s 16:34:01 Finished running tests. End time=23:34:38. Return value was 10 8872 area-Serialization Fixed an Issue in NetNative. Fixed bugs with using GetDataContractFromGeneratedAssembly in NetNative. This unblocked many failed tests in NetNative. 8874 area-Serialization Migrate xmlserializer metadatawriter This is work in progress as part of an attempt to add shim types for Reflection namespace so that we can use MetadataWriter in XmlSerializer. This PR is just for record. 8877 area-System.Net SendToAsyncV4IPEndPointToDualHost_Success timeout on OSX in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/osx_debug_prtest/1605/consoleText ``` System.Net.Sockets.Tests.DualMode.SendToAsyncV4IPEndPointToDualHost_Success [FAIL] System.TimeoutException : The operation has timed out. Stack Trace: /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx_debug_prtest@2/src/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs(1372,0): at System.Net.Sockets.Tests.DualMode.DualModeSendToAsync_IPEndPointToHost_Helper(IPAddress connectTo, IPAddress listenOn, Boolean dualModeServer, Boolean expectedToTimeout) /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx_debug_prtest@2/src/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs(1327,0): at System.Net.Sockets.Tests.DualMode.SendToAsyncV4IPEndPointToDualHost_Success() ``` 8880 area-Infrastructure Code coverage broken recently Code coverage doesn't seem to be working anymore (I think after dnxcore50 -> netcoreapp1.0). ## Steps to reproduce - Clone the repo - Initialize build tools - Navigate to a test project (e.g. System.Collections.NonGeneric) - Run `msbuild /T:BuildAndTest /P:Coverage=true` ## Expected - ~100% code coverage ## Actual - 0% code coverage reported ![untitled](https://cloud.githubusercontent.com/assets/1275900/15567682/8c1a36a8-231f-11e6-836f-fc9f79f85cfd.png) /cc @ericstj 8883 area-System.Console Console Title test should run in separate process. Modifying the Title of the test process in Outerloop is prone to failure. Moving it to its own process is a bit safer. probably resolves #6223. I'll have to keep an eye on the win10 outerloop runs to verify this. They pass without issue locally. 8884 area-System.Net Delay HttpResponseMessage publishing in CurlHandler until all request data sent "libcurl uses a callback model, where it asks for request data when it wants to send it and passes back response information as it's received. It doesn't enforce any significant constraints on top of this, such that if a server sends response headers and even body before all of the request information has been received, libcurl will dutifully pass that data back to the application as it's received. CurlHandler responses to receiving response body data by completing the SendAsync with the HttpResponseMessage, which means it can complete this task after receiving all response headers but in some cases before all of the request data has been sent. This can actually be beneficial for some scenarios, however with the current HttpClient implementation, it can cause a problem: the request message is Dispose'd of as soon as the SendAsync Task completes, which means HttpClient might dispose of the request message while we're still trying to send data from it. There are two high-level solutions here: 1. Stop always disposing of the request message when SendAsync completes, leaving such disposal up to the consumer (or moving the responsibility to the handler), and state that it's allowed for a handler to complete the SendAsync task when all response headers have been received even if all request data has not yet been sent. 2. Force CurlHandler to not complete the SendAsync task until all request data has been sent, even if the response headers were completed before then. While in the future I would like to see us go with (1), as it opens up additional scenarios and simplifies this implementation, a decision was made to go with (2) for now. This PR implements that. There are two commits: - The first commit adds a bunch of additional tracing. This was beneficial in tracking down the cause of the original problem as seen in some WCF workloads, and it's useful to check it in to help with future investigations. - The second commit adds the completion delay to SendAsync. This is done primarily in the routine that's used to complete the SendAsync task and publish the response message: it now keeps track of whether it was previously invoked, and if it wasn't, it proceeds to do the publishing... but if a copy operation is still in progress, rather than doing the publishing directly, it hooks up a continuation to the copy task so that the publishing will be done when the copy completes. It also disables the ""Expect: 100-continue"" header that libcurl uses with posts by default, as otherwise libcurl may decide in certain situations not to send the payload, and if we've already kicked off the copy operation, we could end up hanging until the operation times out (such hanging is the biggest risk with this change). I also added several additional tests. cc: @davidsh, @ericeil, @mconnew, @KKhurin, @bartonjs Fixes https://github.com/dotnet/wcf/issues/1211 " 8887 area-Serialization Fixed issues in NetNative. Fixes all the places where we use GetDataContractFromGeneratedAssembly. 8890 area-System.Net Parsing /etc/resolv.conf throws exception when iterating network interfaces The default generated /etc/resolve.conf for a docker container causes enumeration of network interfaces to throw because the file does not end with a newline. ``` hexdump -C /etc/resolv.conf 00000000 0a 6e 61 6d 65 73 65 72 76 65 72 20 38 2e 38 2e |.nameserver 8.8.| 00000010 38 2e 38 0a 6e 61 6d 65 73 65 72 76 65 72 20 38 |8.8.nameserver 8| 00000020 2e 38 2e 34 2e 34 |.8.4.4| 00000026 ``` stacktrace ``` Unhandled Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: startIndex at System.String.LastIndexOf(Char value, Int32 startIndex, Int32 count) at System.IO.RowConfigReader.TryGetNextValue(String key, String& value) at System.Net.NetworkInformation.StringParsingHelpers.ParseDnsAddressesFromResolvConfFile(String filePath) at System.Net.NetworkInformation.UnixIPInterfaceProperties.GetDnsAddresses() at System.Net.NetworkInformation.UnixIPInterfaceProperties..ctor(UnixNetworkInterface uni) at System.Net.NetworkInformation.LinuxIPInterfaceProperties..ctor(LinuxNetworkInterface lni) at System.Net.NetworkInformation.LinuxNetworkInterface..ctor(String name) at System.Net.NetworkInformation.LinuxNetworkInterface.GetOrCreate(Dictionary`2 interfaces, String name) at System.Net.NetworkInformation.LinuxNetworkInterface.<>c__DisplayClass5_0.b__2(String name, LinkLayerAddressInfo* llAddr) at Interop.Sys.EnumerateInterfaceAddresses(IPv4AddressDiscoveredCallback ipv4Found, IPv6AddressDiscoveredCallback ipv6Found, LinkLayerAddressDiscoveredCallback linkLayerFound) at System.Net.NetworkInformation.LinuxNetworkInterface.GetLinuxNetworkInterfaces() ``` /cc @mellinoe 8894 area-System.Net Move HTTP request content disposal responsibility to handlers Alternate to https://github.com/dotnet/corefx/pull/8884. Same core problem, but rather than addressing it by making CurlHandler artificially delay the SendAsync task's completion until all request data has been sent, it allows for that case and instead moves the responsibility for disposing of the request content from HttpClient to the handler. The first commit here is the same as in the other PR and simply adds a bunch of tracing (a small amount of that made it into the second PR as well). cc: @davidsh, @ericeil, @mconnew, @KKhurin, @bartonjs Partially addresses dotnet/wcf#1211. 8895 area-System.IO System.IO.Stream.Close() behavior issues "So normally you would think Dispose() does the same job including writing out the file to disk. It turns out there is one extra case. Space for the file is not guaranteed to have been allocated until calling close() or CloseHandle() and may not in fact exist. This means that writing a file swallows knowledge of certain errors that should be thrown. Close() must throw to catch write errors Dispose() must _not_ throw to avoid problems with using() {} blocks. In effect Dispose() is { try { Cose(); } catch (IOException){}} (omitting certain details of the dispose pattern for clarity) The code to replace a file safely was: using (f = new System.IO.FileStream(""name~"", ...) { /\* write contents */ f.Close(); } System.IO.Move(""name~"", ""name""); But now that doesn't work because Close() can't be there to error out. Adding it to just FileStream() doesn't help all that much. I have many occasions to do new MyStream1(new MyStream2(new GzipOutputStream(new FileStream(...)))); " 8899 area-Infrastructure Enable ApiCompat on Linux I am disabling this because it is broken presently and the breaks will cause problems when MSBuild actually starts to catch them. We need to fix up the problems (there are some file casing issues that need to be tracked down). 8908 area-Infrastructure Improve the CoreFX test runner Print out the detail information about discovered, passed or failed test case counts. And catch a ctrl-c event and stop the execution and print the results. I will post PR soon. 8910 area-System.Runtime Question: Is there any way to get all types from all loaded assemblies? Hi. In our solution we are during startup scanning all loaded assemblies (AppDomain.CurrentDomain.GetAssemblies()) and fetching all types and depend on custom attributes register the classes in different factories and/or ServiceProvider. When I tried to use netstandard as TFM I didn't find a way to get the assembly. I was trying with the DependencyContext that I found in some other issue that was possible to use to find all dependencies. Does it exists any simplier way to get the loaded assemblies then check all dependencies from DependencyContext and manually load them? 8912 area-System.Console Console.ReadKey returns escape sequence instead of expected key on Ubuntu 14.04 Code snippit: ``` while (true) { var key = Console.ReadKey(true).Key; Console.WriteLine(key); } ``` Pressing the right and left arrow outputs: ``` Escape C Escape D ``` Expected output: ``` RightArrow LeftArrow ``` 8913 area-System.ComponentModel FileExtensionsAttribute always says invalid "Hello, i have a property that the model always says is invalid, i have tried to not put any extensions only with `[FileExtensions]` but doesnt work, only works if i dont put the attribute, what i have is this. ``` [FileExtensions(Extensions = ""png"")] public IFormFile Property { get; set; } ``` " 8916 area-System.IO WaitForChangedTests.Changed_Success failed on Unix in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_debug_prtest/1619/consoleText ``` System.IO.Tests.WaitForChangedTests.Changed_Success [FAIL] Assert.Equal() Failure Expected: Changed Actual: 0 Stack Trace: /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug_prtest/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.WaitForChanged.cs(173,0): at System.IO.Tests.WaitForChangedTests.Changed_Success() ``` 8919 area-System.Net Improve tracing in CurlHandler While debugging some HttpClient issues, I needed more tracing in CurlHandler. It's useful to check this in to help with future investigations. This is the same changes as from: https://github.com/dotnet/corefx/pull/8894 https://github.com/dotnet/corefx/pull/8884 as I'd like to get these tracing changes merged without first resolving what to do with those changes. cc: @bartonjs, @ericeil (you guys already reviewed these changes as part of that other commit) 8920 area-System.Runtime Add mono detection to RuntimeInformation Currently the RuntimeInformation class has a FrameworkDescription which will display `.NET Framework 4.0.0.0` on Mono. There should be a different value for Mono so that is easier to tell if you are running on Mono 8921 area-Serialization Fixing regression of KeyValuePair test in CodeGenOnly mode. @shmao @zhenlan @khdang 8923 area-System.Net Port to release/1.0.0: Improve tracing in CurlHandler Porting #8919 to release/1.0.0 branch 8924 area-System.IO IsolatedStorageFileStream no longer derives from FileStream... The base implementation was changed and the class name wasn't updated. https://github.com/dotnet/corefx/blob/master/src/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageFileStream.cs 8926 area-System.Net System.Net.Http.Functional.Tests randomly hanging on Windows in CI e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/windows_nt_release_prtest/1753/consoleText 8928 area-System.Net GetAsync_AllowedSSLVersion_Succeeds failure on Windows in CI The handle is invalid http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/windows_nt_debug_prtest/1778/consoleText ``` System.Net.Http.Functional.Tests.HttpClientHandler_SslProtocols_Test.GetAsync_AllowedSSLVersion_Succeeds(acceptedProtocol: Tls) [FAIL] System.Net.Http.HttpRequestException : An error occurred while sending the request. ---- System.Net.Http.WinHttpException : The handle is invalid Stack Trace: Discovering: System.Security.Claims.Tests at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() D:\j\workspace\windows_nt_de---4526f5ff\src\System.Net.Http\src\System\Net\Http\HttpClient.cs(391,0): at System.Net.Http.HttpClient.d__58.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() System.Security.AccessControl.Tests -> D:\j\workspace\windows_nt_de---4526f5ff\bin\Windows_NT.AnyCPU.Debug\System.Security.AccessControl.Tests\System.Security.AccessControl.Tests.dll D:\j\workspace\windows_nt_de---4526f5ff\src\System.Net.Http\tests\FunctionalTests\HttpClientHandlerTest.SslProtocols.cs(90,0): at System.Net.Http.Functional.Tests.HttpClientHandler_SslProtocols_Test.<>c__DisplayClass4_0.<b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() D:\j\workspace\windows_nt_de---4526f5ff\src\Common\tests\System\Net\Http\LoopbackServer.cs(57,0): at System.Net.Test.Common.LoopbackServer.<>c__DisplayClass3_0.b__0(Task t) at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() D:\j\workspace\windows_nt_de---4526f5ff\src\System.Net.Http\tests\FunctionalTests\HttpClientHandlerTest.SslProtocols.cs(88,0): at System.Net.Http.Functional.Tests.HttpClientHandler_SslProtocols_Test.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- D:\j\workspace\windows_nt_de---4526f5ff\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs(1356,0): at System.Net.Http.WinHttpHandler.InternalReceiveResponseHeadersAsync(WinHttpRequestState state) D:\j\workspace\windows_nt_de---4526f5ff\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs(853,0): at System.Net.Http.WinHttpHandler.d__102.MoveNext() ``` 8930 area-System.IO Port System.IO.Pipes AccessControl to CoreFX This commit ports the Pipes AccessControl source from the full framework and adds infrastructure to fit it into CoreFX as part of the regular build. - The PipeStream GetAccessControl and SetAccessControl functions are implemented as Extension methods similar to what was done for FileSystem AccessControl. - A few basic tests for behavior were added. - A net46 implementation of the extension methods is available as well. - This commit includes packaging - Behavior is the same as the .NET 4.6 version of PipeSecurity/PipeAuditRule/etc. with the exception that the SetAccessControl extension method does not retain the same exception throwing behavior for NamedPipeClientStream. Since it's an extension method, we don't have access to the internal PipeStream State that is used in the full version to decide which error to throw. The original will throw an InvalidOperation for a WaitingToConnect stream or a IOException for a Broken stream. We just throw an InvalidOperation for either. resolves https://github.com/dotnet/corefx/issues/7449 8931 area-System.Threading Obsolete Task.Result, Introduce Task.TryGetResult "Related https://github.com/dotnet/corefx/pull/8902 ""Remove ""Result"" property of ValueTask"" - `Task.Result` has can have implicit blocking. If you invoke an async method in a UI app, and try to fetch the .Result of the returned task before it is completed, you’ll get a deadlock. - `.GetAwaiter().GetResult()` will force a blocking value return if required - An expected test to see if the result is ready without exceptions may be `task.IsCompleted`, however it should really be `task.Status == TaskStatus.RanToCompletion` An alternative `bool TryGetResult(out T value)` would be a safer option increasing the chance of writing correct code. It would return `true` if the task has `RanToCompletion` with the result in the out param. It would return `false` if the task hadn't completed (or was cancelled/faulted, maybe throw exception then) " 8935 area-System.Net Dispose of request HttpContent after buffering response Related to: https://github.com/dotnet/corefx/pull/8884 and https://github.com/dotnet/corefx/pull/8894 Both of those PRs attempt to fix the issue described in https://github.com/dotnet/corefx/pull/8884. The first does it by delaying the completion of the HttpClientHandler's SendAsync task until all request data has been sent. The second does it by moving the responsibility for Dispose into the HttpClientHandler, which can then do it when it knows it's done with the request content. Both of those changes carry some risk. In contrast, this PR is a very low-risk change, which just moves the request content Dispose done by HttpClient to be a bit later, though it's only a partial mitigation rather than an actual fix. For several of the methods on HttpClient, e.g. GetAsync, PostAsync, etc., the default mode is to buffer all of the response data (HttpCompletionOption.ResponseContentRead), and in the rare situations where a server does start sending a response body before it's received all of the request body, it will still likely not send all of the response body until it's received all of the request body. As such, if we delay the disposal of the request content until after we've finished buffering the response, the chances of hitting an issue here are further reduced. (This doesn't solve the issue for WCF; WCF would still need to take a separate fix to workaround the issue, but it would hopefully mitigate an already rare case to the point where it's unlikely to be impactful.) cc: @davidsh, @cipop, @ericeil, @mconnew, @KKhurin 8941 area-System.Net HttpClient not overwriting RequestURI after server redirect on non-Windows Scenario: 1) Client sends GET to server, server sends 302 response. 2) Client sends GET to redirect location and completes the request but the RequestURI is not updated Example: ``` 1): Request URL:http://localhost:5000/ Request Method:GET Status Code:302 Found Remote Address:127.0.0.1:5000 2): Request URL:http://localhost:5000/hello Request Method:GET Status Code:200 OK Remote Address:127.0.0.1:5000 ``` The expected content of the `HttpResponseMessage` is: ``` Response.RequestMessage: Method: GET, RequestUri: 'http://localhost:5000/hello', Version: 1.1, Content: , Headers: { } Response: Hello world StatusCode: 200, ReasonPhrase: 'OK', Version: 1.1, Content: System.Net.Http.StreamContent, Headers: { Date: Sat, 28 May 2016 02:18:13 GMT Transfer-Encoding: chunked Server: Kestrel } ``` This is correct and what I see on Windows. But on Mac, (and most likely Linux too) I'm seeing: ``` Response.RequestMessage: Method: GET, RequestUri: 'http://localhost:5000/', Version: 1.1, Content: , Headers: { } Response: Hello world StatusCode: 200, ReasonPhrase: 'OK', Version: 1.1, Content: System.Net.Http.StreamContent, Headers: { Date: Sat, 28 May 2016 01:48:35 GMT Transfer-Encoding: chunked Server: Kestrel } ``` I have a simple repro on https://github.com/JunTaoLuo/ServerRedirect. You can repro by running `dotnet restore` at the solution root, then running `dotnet run` in the ServerRedirect project followed by `dotnet run` in the Client project. This is breaking one of some of our functional tests when I re-enabled them while trying to verify the fix for https://github.com/dotnet/corefx/issues/7440: https://github.com/aspnet/MusicStore/blob/dev/test/E2ETests/SmokeTests.cs#L103 https://github.com/aspnet/MusicStore/blob/dev/test/E2ETests/OpenIdConnectTests.cs#L41 I have been able to repro this on Mac and I suspect this will also affect Linux (I'll follow up when I try that on a Ubuntu machine). cc @Tratcher @muratg @Eilon 8944 area-System.Net NameResolution TryGetAddrInfo_HostName test failed then seg faulted in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/opensuse13.2_release_tst/483/consoleText ``` System.Net.NameResolution.PalTests.NameResolutionPalTests.TryGetAddrInfo_HostName [FAIL] Assert.Equal() Failure Expected: Success Actual: HostNotFound Stack Trace: ./RunTests.sh: line 208: 8433 Segmentation fault ./corerun xunit.console.netcore.exe System.Net.NameResolution.Pal.Tests.dll -xml testResults.xml -notrait Benchmark=true -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing -notrait category=nonlinuxtests ``` 8945 area-System.Net WinHttpHandler off-by-1 in MaxAutomaticRedirections It appears that WinHttpHandler has an off-by-1 error in its handling of MaxAutomaticRedirections. When MaxAutomaticRedirections is set to N, it successfully follows N-1 redirects, but fails on the Nth, rather than successfully following N redirects and failing on the N+1th. 8946 area-System.Net Fix CurlHandler handling of redirects - Relative urls in Location headers were not being handled correctly. We now allow any url that TryCreate will parse using the current url as a base. - We were only handling a subset of redirect status codes as redirects, trying to second-guess which status codes libcurl would redirect for, e.g. 300 wasn't being treated as a redirect with regards to our processing of it (it would redirect but we wouldn't reconfigure some of our state). We now let libcurl do all the work. - We should have been playing it safer with regards to clearing out credentials if we weren't sure a Uri redirect location was valid. Now we do. - We were tracking state unnecessarily that we should have instead been asking libcurl for, e.g. the last url used in a redirect. This also caused us to store the wrong RequestMessage.Uri in some cases where a location header came in but we didn't actually follow it. cc: @davidsh, @ericeil, @JunTaoLuo, @bartonjs Fixes https://github.com/dotnet/corefx/issues/8941 8947 area-System.Net MaxAutomaticRedirections behavior difference between .NET Framework and .NET Core "Repro: ``` C# using System; using System.Net.Http; class Program { static void Main() { var c = new HttpClient(new HttpClientHandler { MaxAutomaticRedirections = 3 }); Console.WriteLine(c.GetAsync(""http://corefx-net.cloudapp.net/Redirect.ashx?statuscode=302&uri=%2FEcho.ashx&hops=4"").GetAwaiter().GetResult().StatusCode); } } ``` With the .NET Framework, this prints out ""Redirect"". With .NET Core (both on Windows and on Unix), this throws an HttpRequestException due to exceeding the number of allowed redirects. Is this behavioral change by design? cc: @davidsh, @cipop " 8948 area-Meta Add an announcements repo for dotnet Hey there, The aspnet GitHub org has a special repo for announcements, it would be really useful to have that for the dotnet org as well, especially with the changes coming to the api surface and the fact that there is a very large amount of activity in the corefx repo, so its easy for announcements/calls for feedback to get lost. An announcement repo where you link to issues for discussion would be a great way to alleviate that 8949 area-System.Threading Sync-blocking on threadpool threads If there is a sync block on a threadpool thread `task.Wait()` etc; could it increment the threadpool min thread count by one? Then decrement by one on complete? May or may not help with threadpool starvation in async-over-sync situations which seem to keep popping up. 8950 area-System.Console Console not echoing input on Mac OS X until enter is pressed There appears to be a difference in behaviour with respect to echoing console input on at least .NET Core RC 2 on Mac OS X vs. .NET 4.6 on Windows. ### Environment - OS X El Capitan 10.11.4 - Bash config and inputrc (in case they matter): https://github.com/nguerrera/.dot - .NET Core RC 2 installed following https://www.microsoft.com/net/core#macosx ### Repro steps - Create project ``` $ mkdir repro $ cd repro $ dotnet new $ dotnet restore ``` - Edit Program.cs to match: ``` C# class Program { static void Main(string[] args) { System.Console.ReadLine(); } } ``` - Run: ``` $ dotnet run ``` - Wait for compilation to succeed and app to start up - Start typing ### Expected result Characters I type are echoed back to me as I type. ### Actual result Characters are not shown to me until I hit enter. @stephentoub @pallavit 8951 area-Meta dotnet restore segfaults on Debian 9.0/stretch Testing The standard, default project.json files cause 'dotnet restore' to segfault on Debian Testing. ``` barnett@barnett-debian:~/csharp_proj$ dotnet new Created new C# project in /home/barnett/csharp_proj. barnett@barnett-debian:~/csharp_proj$ dotnet restore log : Restoring packages for /home/barnett/csharp_proj/project.json... Segmentation fault ``` ``` .NET Command Line Tools (1.0.0-preview2-002900) Product Information: Version: 1.0.0-preview2-002900 Commit SHA-1 hash: f4ceb1f213 Runtime Environment: OS Name: debian OS Version: OS Platform: Linux RID: debian.-x64 ``` ``` barnett@barnett-debian:~$ uname -a Linux barnett-debian 4.5.0-2-amd64 #1 SMP Debian 4.5.4-1 (2016-05-16) x86_64 GNU/Linux ``` [csharp_proj.zip](https://github.com/dotnet/corefx/files/288127/csharp_proj.zip) 8954 area-System.Data Retrieving records affected by statement DbDataRecord has a RecordsAffected property, which allows users to know how many rows were inserted/updated/deleted. However, when executing a multi-statement command (e.g. `UPDATE xxx; UPDATE xxx`), this property provides an aggregation of all rows across statements. There's no programmatic way to get records affected per statement. For an example of why this might be useful, see [EFCore's modification command batch](https://github.com/aspnet/EntityFramework/blob/dev/src/Microsoft.EntityFrameworkCore.Relational/Update/AffectedCountModificationCommandBatch.cs). One of EFCore's major new features are command batching (i.e. the use of multi-statement commands), but in order to implement optimistic concurrency it needs to know, _for each command_, how many records were affected. For SqlServer this is implemented by sending `SELECT @@ROWCOUNT` after each update, and parsing the results. PostgreSQL has no equivalent SQL query, so in Npgsql I actually developed a statement-by-statement RecordsAffected mechanism to support this. In a nutshell, a collection of NpgsqlStatements is exposed by NpgsqlDataReader, and each object has its own RecordsAffected. Let me know if you want more detail. Note that this is somewhat related to #3688, where the possibility of a better API for command batching is discussed (the latter may/could also depend on multiple DbStatement instances being managed within a single DbCommand). 8955 area-System.Data API for writing parameters without boxing In the current ADO.NET API, writing a parameter to the database involves passing it through an object. This implies a boxing operation, which can create lots of garbage in a scenario where lots of value types (e.g. ints) are written to the database. A generic subclass of DbParameter could solve this, if properly implemented by providers. 8956 area-System.Net Fix client certificates-related seg fault in HttpClientHandler Using HttpClient with client certificates on Unix would crash when making a request, waiting for several minutes, and making another one. The issue was that our client certificate code was disposing of SafeHandles for resources we'd logically transferred ownership of to OpenSSL. The underlying connection cache would keep the connection open for any requests made within a few minutes, but once the connection's timeout expired, it would be culled from the cache, and the resources associated with these handles would then be re-freed, resulting in a seg fault (either immediately when closing or when we next tried to use an SSL connection). The fix is simply to not dispose of the resources we no longer own. cc: @bartonjs, @billwert, @ericeil Fixes https://github.com/dotnet/corefx/issues/8958 8960 area-Infrastructure Building System.Data.SqlClient.sln in parallel often fails "When I build System.Data.SqlClient.sln without parallelization, it works fine (but notice the same file is built twice): ``` >msbuild /v:m /t:rebuild System.Data.SqlClient.sln Microsoft (R) Build Engine version 14.0.25123.0 Copyright (C) Microsoft Corporation. All rights reserved. System.Data.SqlClient -> E:\Users\Svick\git\corefx\bin\ref\System.Data.SqlClient\4.1.0.0\System.Data.SqlClient.dll System.Data.SqlClient -> E:\Users\Svick\git\corefx\bin\Windows_NT.AnyCPU.Debug\System.Data.SqlClient\System.Data.SqlClient.dll System.Data.SqlClient -> E:\Users\Svick\git\corefx\bin\Windows_NT.AnyCPU.Debug\System.Data.SqlClient\System.Data.SqlClient.dll System.Data.SqlClient.Tests -> E:\Users\Svick\git\corefx\bin\Windows_NT.AnyCPU.Debug\System.Data.SqlClient.Tests\System.Data.SqlClient.Tests.dll System.Data.SqlClient.ManualTesting.Tests -> E:\Users\Svick\git\corefx\bin\Windows_NT.AnyCPU.Debug\System.Data.SqlClient.ManualTesting.Tests\System.Data.SqlClient.ManualTesting.Tests.dll ``` But when I build it in parallel, it often (but not always) fails: ``` >msbuild /v:m /m /t:rebuild System.Data.SqlClient.sln Microsoft (R) Build Engine version 14.0.25123.0 Copyright (C) Microsoft Corporation. All rights reserved. System.Data.SqlClient -> E:\Users\Svick\git\corefx\bin\ref\System.Data.SqlClient\4.1.0.0\System.Data.SqlClient.dll E:\Users\Svick\git\corefx\Tools\sign.targets(70,5): error : E:\Users\Svick\git\corefx\bin/obj/Windows_NT.AnyCPU.Debug/System.Data.SqlClient/System.Data.SqlClient.dll: I/O error reading or writing PE file: The process cannot access the f ile 'E:\Users\Svick\git\corefx\bin\obj\Windows_NT.AnyCPU.Debug\System.Data.SqlClient\System.Data.SqlClient.dll' because it is being used by another process. [E:\Users\Svick\git\corefx\src\System.Data.SqlClient\src\System.Data.SqlClient. csproj] System.Data.SqlClient -> E:\Users\Svick\git\corefx\bin\Windows_NT.AnyCPU.Debug\System.Data.SqlClient\System.Data.SqlClient.dll System.Data.SqlClient.ManualTesting.Tests -> E:\Users\Svick\git\corefx\bin\Windows_NT.AnyCPU.Debug\System.Data.SqlClient.ManualTesting.Tests\System.Data.SqlClient.ManualTesting.Tests.dll System.Data.SqlClient.Tests -> E:\Users\Svick\git\corefx\bin\Windows_NT.AnyCPU.Debug\System.Data.SqlClient.Tests\System.Data.SqlClient.Tests.dll ``` Sometimes it just produces warnings: ``` >msbuild /v:m /m /t:rebuild System.Data.SqlClient.sln Microsoft (R) Build Engine version 14.0.25123.0 Copyright (C) Microsoft Corporation. All rights reserved. System.Data.SqlClient -> E:\Users\Svick\git\corefx\bin\ref\System.Data.SqlClient\4.1.0.0\System.Data.SqlClient.dll C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3088: Could not read state file ""E:\Users\Svick\git\corefx\bin/obj/Windows_NT.AnyCPU.De bug/System.Data.SqlClient/System.Data.SqlClient.csprojResolveAssemblyReference.cache"". The process cannot access the file 'E:\Users\Svick\git\corefx\bin\obj\Windows_NT.AnyCPU.Debug\System .Data.SqlClient\System.Data.SqlClient.csprojResolveAssemblyReference.cache' because it is being used by another process. [E:\Users\Svick\git\corefx\src\System.Data.SqlClient\src\System.Da ta.SqlClient.csproj] System.Data.SqlClient -> E:\Users\Svick\git\corefx\bin\Windows_NT.AnyCPU.Debug\System.Data.SqlClient\System.Data.SqlClient.dll System.Data.SqlClient -> E:\Users\Svick\git\corefx\bin\Windows_NT.AnyCPU.Debug\System.Data.SqlClient\System.Data.SqlClient.dll C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(3863,5): warning MSB3026: Could not copy ""E:\Users\Svick\git\corefx\bin/obj/Windows_NT.AnyCPU.Debug/System. Data.SqlClient/System.Data.SqlClient.pdb"" to ""E:\Users\Svick\git\corefx\bin/Windows_NT.AnyCPU.Debug/System.Data.SqlClient/System.Data.SqlClient.pdb"". Beginning retry 1 in 1000ms. The proc ess cannot access the file 'E:\Users\Svick\git\corefx\bin/Windows_NT.AnyCPU.Debug/System.Data.SqlClient/System.Data.SqlClient.pdb' because it is being used by another process. [E:\Users\S vick\git\corefx\src\System.Data.SqlClient\src\System.Data.SqlClient.csproj] System.Data.SqlClient.ManualTesting.Tests -> E:\Users\Svick\git\corefx\bin\Windows_NT.AnyCPU.Debug\System.Data.SqlClient.ManualTesting.Tests\System.Data.SqlClient.ManualTesting.Tests.dll System.Data.SqlClient.Tests -> E:\Users\Svick\git\corefx\bin\Windows_NT.AnyCPU.Debug\System.Data.SqlClient.Tests\System.Data.SqlClient.Tests.dll ``` I believe those issues are because the same project is built twice in parallel, causing a race condition. Other solutions have the same issue too, for example, System.Net.Http.sln. This looks similar to #5292. CC: @weshaggard " 8962 area-Infrastructure Set up and run tests on BigEndian platforms. At the moment, it appears that all tests are being run on LittleEndian platforms. Given there are a number of packages and protocols that actually care about the endianness of the system, we should make sure our tests pass on these systems. In theory only those packages that deal with endian-handline code would need this, but I'm not sure how easy that would be to check for... 8963 area-Infrastructure 1.Nuget package restore failed for project tests\System.Data/Sqlclient.Manualtesting.Tests for 'test-runtime' 2.Unable to resolve test-runtime for .NETCoreApp, Version=v1.0 I am trying to build sqlclient (System.Data.SqlClient) from the source available from github. But i get these issues when i trying to build it. I tried uninstalled and re-installed nuget packet manager, still it doesn't solve the issue. What else i am missing ? 8965 area-System.Runtime System.Runtime.Loader not working in webapp targeting 4.6.2 ? "I am using System.Runtime.Loader in .NET Core app (net462) it doesn't give error at compile time but gives exception at run time ""Could not load assembly System.Runtime.Loader"". I want to know System.Runtime.Loader is not working in 4.6.2 webapp? " 8967 area-System.Numerics "Optimize BigInteger ""DataTip"" speed" "For very big BigIntegers the Visual Studio DataTip (the thing that appears when hovering over a variable with the mouse) takes a long time to load. I assume that's because the ToString processing takes too long. The result is not visible anyway because it is aborted by a timeout as it seems. Can the DataTip be made faster for super long BigIntegers? Maybe it could just show the first and last 20 digits instead of all digits. It's still possible to see all digits by calling ToString using the debugger. Maybe the output could be `$""{firstDigits} ... {lastDigits} ({totalDigits} digits in total, {byteCount} bytes}""`. That would be useful to both see the data and to get a feel for memory consumption. The ToString output would stay unchanged. " 8968 area-Serialization DataContractSerializer exception when deserializing exceptions with async stack traces "This used to work on RC1, and also works when targeting `net46`. Repro (only happens if `Run` is an `async` method): ``` csharp using System; using System.IO; using System.Runtime.Serialization; using System.Threading.Tasks; namespace ConsoleApp5 { public class Program { public static void Main(string[] args) { Run().GetAwaiter().GetResult(); } public static async Task Run() { try { throw new Exception(""Foo""); } catch (Exception e) { SerializeAndDeserializeException(e); } } private static void SerializeAndDeserializeException(Exception e) { using (var stream = new MemoryStream()) { var serializer = new DataContractSerializer(e.GetType()); serializer.WriteObject(stream, e); Console.WriteLine(""Serialized!""); stream.Position = 0; var ex = (Exception)serializer.ReadObject(stream); Console.WriteLine(""Deserialized! Message = "" + ex.Message); } } } } ``` `ReadObject` throws the following exception: ``` Unhandled Exception: System.Runtime.Serialization.SerializationException: There was an error deserializing the object of type System.Exception. End element '_stackTraceString' from namespace 'http://schemas.datacontract.org/2004/07/System' expected. Found element 'Run' from namespace 'http://schemas.datacontract.org/2004/07/System'. Line 1, position 259. ---> System.Xml.XmlException: End element '_stackTraceString' from namespace 'http://schemas.datacontract.org/2004/07/System' expected. Found element 'Run' from namespace 'http://schemas.datacontract.org/2004/07/System'. Line 1, position 259. at System.Xml.XmlExceptionHelper.ThrowXmlException(XmlDictionaryReader reader, String res, String arg1, String arg2, String arg3) at System.Xml.XmlBaseReader.ReadEndElement() at System.Xml.XmlBaseReader.ReadElementContentAsString() at ReadExceptionFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString[] , XmlDictionaryString[] ) at System.Runtime.Serialization.ClassDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context) at System.Runtime.Serialization.ExceptionDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context) at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, DataContract& dataContract) at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, String name, String ns) at System.Runtime.Serialization.DataContractSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName, DataContractResolver dataContractResolver) at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) --- End of inner exception stack trace --- at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) at System.Runtime.Serialization.XmlObjectSerializer.ReadObject(XmlDictionaryReader reader) at ConsoleApp5.Program.SerializeAndDeserializeException(Exception e) at ConsoleApp5.Program.d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at ConsoleApp5.Program.Main(String[] args) ``` " 8973 area-System.Runtime Proposal: Enums should implement generic IEquatable/IComparable interfaces Every enum should implement its own version of `IEquatable` and `IComparable`, to avoid boxing when being compared/tested for equality (as they are really just ints underneath). The API would be similar to how each delegate class has its own version of `Invoke`/each `T[]` implements `IList`, although there is no strongly-typed base class that actually declares this. (Note: I'm aware that `EqualityComparer.Default` already specializes for enums, however I still think this would be an API addition worth pursuing. Additionally, `Comparer.Default` [does not](https://dotnetfiddle.net/vlr0UV) specialize for enums and falls back to boxing.) Enums already implement the non-generic `IComparable` interface (there is no non-generic `IEquatable`), so I think this would be a welcome change right? 8979 area-Infrastructure Clean build produces lots of warnings "12 on Windows: ``` D:\j\workspace\windows_nt_debug88592b53\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.6"" framework. Add a reference to "".NETStandard,Version=v1.6"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [D:\j\workspace\windows_nt_debug88592b53\src\System.AppContext\ref\System.AppContext.csproj] D:\j\workspace\windows_nt_debug88592b53\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.6"" framework. Add a reference to "".NETStandard,Version=v1.6"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [D:\j\workspace\windows_nt_debug88592b53\src\System.AppContext\ref\System.AppContext.csproj] D:\j\workspace\windows_nt_debug88592b53\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.6"" framework. Add a reference to "".NETStandard,Version=v1.6"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [D:\j\workspace\windows_nt_debug88592b53\src\System.AppContext\ref\System.AppContext.csproj] D:\j\workspace\windows_nt_debug88592b53\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.6"" framework. Add a reference to "".NETStandard,Version=v1.6"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [D:\j\workspace\windows_nt_debug88592b53\src\System.AppContext\ref\System.AppContext.csproj] D:\j\workspace\windows_nt_debug88592b53\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.6"" framework. Add a reference to "".NETStandard,Version=v1.6"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [D:\j\workspace\windows_nt_debug88592b53\src\System.AppContext\src\System.AppContext.csproj] D:\j\workspace\windows_nt_debug88592b53\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.6"" framework. Add a reference to "".NETStandard,Version=v1.6"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [D:\j\workspace\windows_nt_debug88592b53\src\System.AppContext\src\System.AppContext.csproj] D:\j\workspace\windows_nt_debug88592b53\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.6"" framework. Add a reference to "".NETStandard,Version=v1.6"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [D:\j\workspace\windows_nt_debug88592b53\src\System.AppContext\src\System.AppContext.csproj] D:\j\workspace\windows_nt_debug88592b53\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.6"" framework. Add a reference to "".NETStandard,Version=v1.6"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [D:\j\workspace\windows_nt_debug88592b53\src\System.AppContext\src\System.AppContext.csproj] C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [D:\j\workspace\windows_nt_debug88592b53\src\System.Net.Http\src\System.Net.Http.csproj] C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [D:\j\workspace\windows_nt_debug88592b53\src\System.Security.Cryptography.OpenSsl\ref\System.Security.Cryptography.OpenSsl.csproj] C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [D:\j\workspace\windows_nt_debug88592b53\src\System.Security.Cryptography.X509Certificates\src\System.Security.Cryptography.X509Certificates.csproj] C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [D:\j\workspace\windows_nt_debug88592b53\src\System.Security.Cryptography.X509Certificates\src\System.Security.Cryptography.X509Certificates.csproj] 12 Warning(s) 0 Error(s) ``` 27 on Ubuntu: ``` /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/Tools/packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.6"" framework. Add a reference to "".NETStandard,Version=v1.6"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.AppContext/ref/System.AppContext.csproj] /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/Tools/packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.6"" framework. Add a reference to "".NETStandard,Version=v1.6"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.AppContext/ref/System.AppContext.csproj] /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/Tools/packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.6"" framework. Add a reference to "".NETStandard,Version=v1.6"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.AppContext/ref/System.AppContext.csproj] /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/Tools/packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.6"" framework. Add a reference to "".NETStandard,Version=v1.6"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.AppContext/ref/System.AppContext.csproj] /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/Tools/packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.6"" framework. Add a reference to "".NETStandard,Version=v1.6"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.AppContext/src/System.AppContext.csproj] /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/Tools/packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.6"" framework. Add a reference to "".NETStandard,Version=v1.6"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.AppContext/src/System.AppContext.csproj] /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/Tools/packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.6"" framework. Add a reference to "".NETStandard,Version=v1.6"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.AppContext/src/System.AppContext.csproj] /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/Tools/packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.6"" framework. Add a reference to "".NETStandard,Version=v1.6"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.AppContext/src/System.AppContext.csproj] /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.ComponentModel.TypeConverter/src/Resources/Strings.resx : warning MSB3568: Duplicate resource name ""TypeDescriptorProviderError"" is not allowed, ignored. [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj] /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.ComponentModel.TypeConverter/src/Resources/Strings.resx : warning MSB3568: Duplicate resource name ""TypeDescriptorUnsupportedRemoteObject"" is not allowed, ignored. [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj] /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.ComponentModel.TypeConverter/src/Resources/Strings.resx : warning MSB3568: Duplicate resource name ""TypeDescriptorProviderError"" is not allowed, ignored. [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj] /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.ComponentModel.TypeConverter/src/Resources/Strings.resx : warning MSB3568: Duplicate resource name ""TypeDescriptorUnsupportedRemoteObject"" is not allowed, ignored. [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj] /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.ComponentModel.TypeConverter/src/Resources/Strings.resx : warning MSB3568: Duplicate resource name ""TypeDescriptorProviderError"" is not allowed, ignored. [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj] /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.ComponentModel.TypeConverter/src/Resources/Strings.resx : warning MSB3568: Duplicate resource name ""TypeDescriptorUnsupportedRemoteObject"" is not allowed, ignored. [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj] /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.ComponentModel.TypeConverter/src/Resources/Strings.resx : warning MSB3568: Duplicate resource name ""TypeDescriptorProviderError"" is not allowed, ignored. [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj] /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.ComponentModel.TypeConverter/src/Resources/Strings.resx : warning MSB3568: Duplicate resource name ""TypeDescriptorUnsupportedRemoteObject"" is not allowed, ignored. [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj] /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/Tools/Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.Net.Http/src/System.Net.Http.csproj] /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/Tools/Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.Security.Cryptography.OpenSsl/ref/System.Security.Cryptography.OpenSsl.csproj] /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/Tools/Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.Security.Cryptography.X509Certificates/src/System.Security.Cryptography.X509Certificates.csproj] /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/Tools/Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.Security.Cryptography.X509Certificates/src/System.Security.Cryptography.X509Certificates.csproj] libust[33786/33786] : warning : HOME environment variable not set. Disabling LTTng-UST per-user tracing. (in setup_local_apps() at lttng-ust-comm.c:305) [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.Globalization/tests/System.Globalization.Tests.csproj] libust[33796/33796] : warning : HOME environment variable not set. Disabling LTTng-UST per-user tracing. (in setup_local_apps() at lttng-ust-comm.c:305) [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.Globalization/tests/System.Globalization.Tests.csproj] libust[33823/33823] : warning : HOME environment variable not set. Disabling LTTng-UST per-user tracing. (in setup_local_apps() at lttng-ust-comm.c:305) [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.Globalization/tests/System.Globalization.Tests.csproj] libust[33833/33833] : warning : HOME environment variable not set. Disabling LTTng-UST per-user tracing. (in setup_local_apps() at lttng-ust-comm.c:305) [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.Globalization/tests/System.Globalization.Tests.csproj] libust[33839/33839] : warning : HOME environment variable not set. Disabling LTTng-UST per-user tracing. (in setup_local_apps() at lttng-ust-comm.c:305) [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.Globalization/tests/System.Globalization.Tests.csproj] libust[33862/33862] : warning : HOME environment variable not set. Disabling LTTng-UST per-user tracing. (in setup_local_apps() at lttng-ust-comm.c:305) [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.Globalization/tests/System.Globalization.Tests.csproj] libust[33869/33869] : warning : HOME environment variable not set. Disabling LTTng-UST per-user tracing. (in setup_local_apps() at lttng-ust-comm.c:305) [/mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_debug/src/System.Globalization/tests/System.Globalization.Tests.csproj] 27 Warning(s) 0 Error(s) ``` " 8983 area-System.IO Seg fault running FileSystemWatcher tests on OSX "http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_osx_debug/52/consoleText ``` /Users/dotnet-bot/j/workspace/dotnet_corefx/master/outerloop_osx_debug/bin/tests/OSX.AnyCPU.Debug/System.IO.FileSystem.Watcher.Tests/netcoreapp1.0/RunTests.sh: line 285: 70576 Segmentation fault: 11 ./corerun xunit.console.netcore.exe System.IO.FileSystem.Watcher.Tests.dll -xml testResults.xml -notrait Benchmark=true -notrait category=IgnoreForCI -notrait category=failing -notrait category=nonosxtests Finished running tests. End time=23:20:31. Return value was 139 /Users/dotnet-bot/j/workspace/dotnet_corefx/master/outerloop_osx_debug/Tools/tests.targets(202,5): warning MSB3073: The command ""/Users/dotnet-bot/j/workspace/dotnet_corefx/master/outerloop_osx_debug/bin/tests/OSX.AnyCPU.Debug/System.IO.FileSystem.Watcher.Tests/netcoreapp1.0/RunTests.sh /Users/dotnet-bot/j/workspace/dotnet_corefx/master/outerloop_osx_debug/packages/"" exited with code 139. [/Users/dotnet-bot/j/workspace/dotnet_corefx/master/outerloop_osx_debug/src/System.IO.FileSystem.Watcher/tests/System.IO.FileSystem.Watcher.Tests.csproj] /Users/dotnet-bot/j/workspace/dotnet_corefx/master/outerloop_osx_debug/Tools/tests.targets(211,5): error : One or more tests failed while running tests from 'System.IO.FileSystem.Watcher.Tests' please check log for details! [/Users/dotnet-bot/j/workspace/dotnet_corefx/master/outerloop_osx_debug/src/System.IO.FileSystem.Watcher/tests/System.IO.FileSystem.Watcher.Tests.csproj] ``` cc: @janvorli, @ianhays " 8984 area-System.Diagnostics TestUserCredentialsPropertiesOnWindows failed on Win10 in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_win10_release/51/consoleText ``` System.Diagnostics.Tests.ProcessStartInfoTests.TestUserCredentialsPropertiesOnWindows [FAIL] System.ComponentModel.Win32Exception : The user name or password is incorrect Stack Trace: d:\j\workspace\outerloop_win---6835b088\src\System.Diagnostics.Process\src\System\Diagnostics\Process.Windows.cs(619,0): at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) d:\j\workspace\outerloop_win---6835b088\src\System.Diagnostics.Process\tests\ProcessStartInfoTests.cs(375,0): at System.Diagnostics.Tests.ProcessStartInfoTests.TestUserCredentialsPropertiesOnWindows() ``` 8986 area-System.IO Increase the min supported version of the Zip spec Zips created by ZipArchive right now say that they will support any version of the ZIP format. However, they will actually only support versions 2.0 and up. This would mean that zips created by the core version of ziparchive will be improperly unzipped by unzippers from versions 0.0 to 2.0 (1989 to 1993). This commit fixes a regression from the full framework that sets the min to 2.0. The windows zip utility also sets the version to 2.0. @ericstj 8987 area-System.Console Port to release/1.0.0: Implement Console support for netcore50 port https://github.com/dotnet/corefx/pull/8853: The Windows implementation currently used for netcore50 will fail the WACK check as it calls a number of APIs unsupported by UWP. This commit adds a separate netcore50 build that stubs out the API calls and replaces them with PlatformNotSupportedExceptions or no-ops where appropriate. The result is a platform-agnostic version of System.Console that can be used anywhere but is severely stripped of functionality. - Where possible the behavior of a redirected Console operation will attempt to mimic that of a Unix redirected Console operation. Otherwise it will throw. - Encoding is fixed to UTF8. Attempting to set the Console encoding will no-op. - Added a section in the packaging build for the new netcore50 specific binary - Input/Output redirection and subsequent reads/writes work as expected. @weshaggard @ericstj 8990 area-System.Net Remove innerloop dependencies on www.ssllabs.com We have several tests that make HTTP calls during System.Net.Http.Functional.Tests out to www.ssllabs.com, which has SSL endpoints for different SSL protocols. This commit avoids using that server during innerloop tests. Some of the dependencies are removed entirely, by using a localhost SSL server instead. The remainder are made outerloop. cc: @bartonjs, @davidsh, @cipop, @ericeil 8995 area-System.IO ZipArchiveEntry always writes Unicode bit for entries Initial discussion here: https://github.com/dotnet/corefx/pull/8986#issuecomment-222739144 Previously we would only write the Unicode bit if 1. The system default was UTF8. 2. Any characters in the string were greater than 127. It turns out that neither of these were very common so before the bit was rarely set, now it is always set. /cc @ianhays 8996 area-System.Net Fix some memory leaks in WinHttpRequestState When HTTP requests are canceled, we are leaking WinHttpRequestState objects and some child objects. Since WInHttpRequestState is strongly pinned, it's important to release things as soon as possible. This fix addresses part of the leaks involved in #8819 by removing references to some fields in the state object related to the request/response phase (CancellationToken). In addition, this fix addresses some cases where the state object is created and pinned but the request is canceled before we hook up the state object to the WInHTTP status callback. Because of not being hooked up yet, the state object won't get HANDLE_CLOSING notifications and remains pinned forever. We now pin the state object later when we're sure that we've hooked up the status callback. I also added some DEBUG tracking to help diagnose the rest of the leaks of #8819. 9002 area-System.Net If we don't expect UDP packets to be received, don't send redundant packets. "Fixes #8636. On OSX, if a UDP packet is actively rejected, a subsequent send on the same socket can result in a ""connection refused"" error. This change avoids that error for the cases where we're intentionally sending packets that might be rejected. @stephentoub " 9003 area-System.Net System.Net.Http.HttpClientHandler.CookieContainer is empty in a UWP app when cookies are set on 302 redirect response When the System.Net.Http.HttpClient class - with a HttpClientHandler is used from a UWP, the response cookie collection returned is empty. **This happens when the cookies are being set on a 302 redirect response.** When you collect a network trace, you should notice the below request/response pattern: # Request: GET _location_ HTTP/1.1 Host: _host_ Connection: Keep-Alive ..._other request headers_ # Response: HTTP/1.1 302 Object moved Set-Cookie: name=value; Location: _redirect location_ ..._other response headers_ The problem happens because the default behavior of the HttpClientHandler is to perform auto-redirection. With this setting, the .NET layer does not get to see the cookies in the redirect response leading to the buggy behavior. 9004 area-System.IO Allow writing an ASCII ZipArchive ZipArchive currently always sets the Zip header Unicode bit. This is a regression from the net46 version that set the bit based on the current default encoding page set. This commit modifies the behavior to default write ASCII whenever possible and only write/set Unicode when it is necessary or explicitly asked for. - When encoding an entry name, we check if it contains any characters outside 32-126. If it does, we encode it as UTF8. If it doesn't, we encode it as ASCII. - Decoding is unchanged. If the encoding isn't set, then we assume UTF8. This is so we have the widest range of effective readability and because we cannot represent values outside of the ASCII 32-126 range from CP437 @ericstj resolves #8995 9006 area-System.Net CurlHandler completes SendAsync task even if request content not fully sent This is a feature or a bug depending on who you talk to. CurlHandler completes the Task returned from SendAsync when all of the response headers have been received. That's by design. However, it does this regardless of whether all of the request content has been received. While rare, it's possible a server might send the response headers and even some or all of the body before the request content has been sent/received, e.g. in a streaming scenario where it was echoing/transforming/etc. the request content out as response content. WinHttpHandler and the implementation on desktop complete the SendAsync task only once all of the request content has been sent and all of the response headers have been received. The CurlHandler design is potentially problematic, however, as HttpClient explicitly disposes of the request content once the SendAsync task completes. If that task completes and the request content is still being sent, obvious problems can result. Several potential solutions: - Modify HttpClient to stop Dispose'ing of the request content, e.g. https://github.com/dotnet/corefx/issues/1794 - Moving the responsibility for Dispose'ing of the HttpContent to the HttpClientHandler, which can know when it's safe to dispose, e.g. https://github.com/dotnet/corefx/pull/8894 - Modifying CurlHandler to only complete the SendAsync task once the request content has all been sent, e.g. https://github.com/dotnet/corefx/pull/8884 9008 area-System.Net Socket.Handle isn't public *and* no access to SIO_KEEPALIVE_VALS / SIOCKEEPALIVE via Socket Got here looking for how to call ioctl(SIOCKEEPALVIE) / WSAIOCTL(SIO_KEEPALIVE_VALS). No access via public Socket API layer and no access to the handle either. I could P/Invoke it if I had the handle, but I don't oops. 9009 area-System.IO Filesystem tests for symlinks failing in Helix for OSX These tests are all failing with a similar error and there don't seem to be any recent changes to the tests themselves. System.IO.Tests.FileInfo_Exists.SymLinksMayExistIndependentlyOfTarget System.IO.Tests.Directory_GetDirectories_str.EnumerateWithSymLinkToDirectory System.IO.Tests.Directory_Delete_str_bool.DeletingSymLinkDoesntDeleteTarget System.IO.Tests.Directory_Delete_Tests.FileSystemWatcher_Directory_Delete_SymLink System.IO.Tests.Directory_Create_Tests.FileSystemWatcher_Directory_Create_SymLink Log: ``` System.ComponentModel.Win32Exception : No such file or directory ``` @dsgouda can you please take a look, you had the most recent changes to this directory (https://github.com/dotnet/corefx/tree/master/src/System.IO.FileSystem/tests) @weshaggard @ericstj Any ideas on the cause? 9010 area-System.Net Adding image example for PerfView collection. Fixes #4325 @saurabh500 @davidsh PTAL 9011 area-System.Runtime Consider exposing more APIs via RuntimeInformation The CLI and AspNet Core have a bunch of APIs that p/invoke to read runtime information that's not readily available via `RuntimeInformation`. This includes operating system version and Unix distro name. Scanning through the code, there're internal APIs to read both these pieces of information, but they aren't surfaced in a way that can be consumed. Could the API surface for `RuntimeInformation` be enhanced to include this information? 9012 area-System.Runtime Dependency on System.Runtime.InteropServices.RuntimeInformation causes runtime error for apps targeting net451 on *nix systems (i.e. running on Mono) ## Scenario 1) Running a `net451` app depending on `System.Runtime.InteropServices.RuntimeInformation` on OSX/Ubuntu will produce the following exception at runtime: ``` dotnet -v run -f net451 1 ↵ Telemetry is: Enabled Project RuntimeServiceOnMono (.NETFramework,Version=v4.5.1) was previously compiled. Skipping compilation. Running /usr/local/bin/mono --debug /Users/jtluo/Documents/workspace/juntaoluo/tp/RuntimeServiceOnMono/bin/Debug/net451/osx.10.11-x64/RuntimeServiceOnMono.exe Process ID: 29130 Unhandled Exception: System.DllNotFoundException: System.Native at (wrapper managed-to-native) Interop/Sys:GetUnixNamePrivate () at Interop+Sys.GetUnixName () [0x00000] in :0 at System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform (OSPlatform osPlatform) [0x00000] in :0 at ConsoleApplication.Program.Main (System.String[] args) [0x00000] in :0 [ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: System.Native at (wrapper managed-to-native) Interop/Sys:GetUnixNamePrivate () at Interop+Sys.GetUnixName () [0x00000] in :0 at System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform (OSPlatform osPlatform) [0x00000] in :0 at ConsoleApplication.Program.Main (System.String[] args) [0x00000] in :0 ``` ## Example See repro at https://github.com/JunTaoLuo/RuntimeServiceOnMono. To run the sample, run `dotnet restore` and `dotnet run -f net451` I understand Mono is not a scenario that's actively being developed for but we should not be causing a exception like this especially since we intend to use the `InteropServices` APIs in often used ASP.NET packages like Logging. Currently this means that most of our samples and apps cannot run on Mono (full CLR on *nix). ## Environment `dotnet --version`: ``` Microsoft .NET Core Shared Framework Host Version : 1.0.1-rc3-004312-00 Build : 1db6c07638a70a621b312e78d4dc9fb31a530f2f ``` `mono -V`: ``` Mono JIT compiler version 4.0.5 ((detached/1d8d582 Tue Oct 20 15:15:33 EDT 2015) Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com TLS: normal SIGSEGV: altstack Notification: kqueue Architecture: x86 Disabled: none Misc: softdebug LLVM: yes(3.6.0svn-mono-(detached/a173357) GC: sgen ``` cc @BrennanConroy @muratg @Eilon 9015 area-System.Net Fixing PerformanceTests command line build. Fixes #8435 @davidsh @ericeil @stephentoub PTAL 9017 area-System.Net Sockets test failures SendToAsyncV4IPEndPointToV6Host_NotReceived & BeginSendToV4IPEndPointToV6Host_NotReceived ``` Test Result (2 failures / +2) ``` System.Net.Sockets.Tests.DualMode.SendToAsyncV4IPEndPointToV6Host_NotReceived System.Net.Sockets.Tests.DualMode.BeginSendToV4IPEndPointToV6Host_NotReceived http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/release_1.0.0/job/osx_debug_prtest/58/testReport/ Regression System.Net.Sockets.Tests.DualMode.SendToAsyncV4IPEndPointToV6Host_NotReceived (from (empty)) Failing for the past 1 build (Since Failed#58 ) Took 0.31 sec. Stacktrace MESSAGE: Assert.Throws() Failure\nExpected: typeof(System.TimeoutException)\nActual: typeof(Xunit.Sdk.EqualException): Assert.Equal() Failure\nExpected: 1\nActual: 0 +++++++++++++++++++ STACK TRACE: at System.Net.Sockets.Tests.DualMode.DualModeSendToAsync_IPEndPointToHost_Helper(IPAddress connectTo, IPAddress listenOn, Boolean dualModeServer, Boolean expectedToTimeout) in /Users/dotnet-bot/j/workspace/dotnet_corefx/release_1.0.0/osx_debug_prtest/src/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs:line 1359 at System.Net.Sockets.Tests.DualMode.b__119_0() in /Users/dotnet-bot/j/workspace/dotnet_corefx/release_1.0.0/osx_debug_prtest/src/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs:line 1311 Regression System.Net.Sockets.Tests.DualMode.BeginSendToV4IPEndPointToV6Host_NotReceived (from (empty)) Failing for the past 1 build (Since Failed#58 ) Took 7 ms. Stacktrace MESSAGE: Assert.Throws() Failure\nExpected: typeof(System.TimeoutException)\nActual: typeof(System.Net.Sockets.SocketException): Connection refused +++++++++++++++++++ STACK TRACE: at System.Net.Sockets.Socket.DoBeginSendTo(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint endPointSnapshot, SocketAddress socketAddress, OverlappedAsyncResult asyncResult) in /Users/dotnet-bot/j/workspace/dotnet_corefx/release_1.0.0/osx_debug_prtest/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 3004 at System.Net.Sockets.Socket.BeginSendTo(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint remoteEP, AsyncCallback callback, Object state) in /Users/dotnet-bot/j/workspace/dotnet_corefx/release_1.0.0/osx_debug_prtest/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 2942 at System.Net.Sockets.SocketTaskExtensions.<>c.b__12_0(ArraySegment`1 targetBuffer, SocketFlags flags, EndPoint endPoint, AsyncCallback callback, Object state) in /Users/dotnet-bot/j/workspace/dotnet_corefx/release_1.0.0/osx_debug_prtest/src/System.Net.Sockets/src/System/Net/Sockets/SocketTaskExtensions.cs:line 235 at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl[TArg1,TArg2,TArg3](Func`6 beginMethod, Func`2 endFunction, Action`1 endAction, TArg1 arg1, TArg2 arg2, TArg3 arg3, Object state, TaskCreationOptions creationOptions) at System.Threading.Tasks.TaskFactory`1.FromAsync[TArg1,TArg2,TArg3](Func`6 beginMethod, Func`2 endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, Object state) at System.Net.Sockets.SocketTaskExtensions.SendToAsync(Socket socket, ArraySegment`1 buffer, SocketFlags socketFlags, EndPoint remoteEndPoint) in /Users/dotnet-bot/j/workspace/dotnet_corefx/release_1.0.0/osx_debug_prtest/src/System.Net.Sockets/src/System/Net/Sockets/SocketTaskExtensions.cs:line 234 at System.Net.Sockets.SocketAPMExtensions.BeginSendTo(Socket socket, Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint remoteEP, AsyncCallback callback, Object state) in /Users/dotnet-bot/j/workspace/dotnet_corefx/release_1.0.0/osx_debug_prtest/src/Common/src/System/Net/Sockets/SocketAPMExtensions.cs:line 565 at System.Net.Sockets.Tests.DualMode.DualModeBeginSendTo_EndPointToHost_Helper(IPAddress connectTo, IPAddress listenOn, Boolean dualModeServer, Boolean expectedToTimeout) in /Users/dotnet-bot/j/workspace/dotnet_corefx/release_1.0.0/osx_debug_prtest/src/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs:line 1234 at System.Net.Sockets.Tests.DualMode.b__110_0() in /Users/dotnet-bot/j/workspace/dotnet_corefx/release_1.0.0/osx_debug_prtest/src/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs:line 1200 9018 area-Infrastructure Jenkins CI OS X slave went offline during the build http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/release_1.0.0/job/osx_debug_prtest/60/consoleFull#-1250096032a6fc86e9-18e8-40d3-a876-f39e33df2c41 Slave went offline during the build 18:42:55 ERROR: Connection was broken: java.io.IOException: Connection aborted: org.jenkinsci.remoting.nio.NioChannelHub$MonoNioTransport@3b61e371[name=dci-macpro-12] 18:42:55 at org.jenkinsci.remoting.nio.NioChannelHub$NioTransport.abort(NioChannelHub.java:208) 18:42:55 at org.jenkinsci.remoting.nio.NioChannelHub.run(NioChannelHub.java:628) 18:42:55 at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) 18:42:55 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 18:42:55 at java.util.concurrent.FutureTask.run(FutureTask.java:262) 18:42:55 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 18:42:55 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 18:42:55 at java.lang.Thread.run(Thread.java:745) 18:42:55 Caused by: java.io.IOException: Connection reset by peer 18:42:55 at sun.nio.ch.FileDispatcherImpl.read0(Native Method) 18:42:55 at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) 18:42:55 at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) 18:42:55 at sun.nio.ch.IOUtil.read(IOUtil.java:197) 18:42:55 at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:384) 18:42:55 at org.jenkinsci.remoting.nio.FifoBuffer$Pointer.receive(FifoBuffer.java:136) 18:42:55 at org.jenkinsci.remoting.nio.FifoBuffer.receive(FifoBuffer.java:306) 18:42:55 at org.jenkinsci.remoting.nio.NioChannelHub.run(NioChannelHub.java:561) 18:42:55 ... 6 more 9023 area-System.Net HttpClient.SendAsync with HttpMethod.Trace and request content sends a body "https://tools.ietf.org/html/rfc7231 states for TRACE ""A client MUST NOT send a message body in a TRACE request,"" but WinHttpHandler does: ``` C# using (var client = new HttpClient()) { var request = new HttpRequestMessage(HttpMethod.Trace, ""http://corefx-net.cloudapp.net/Echo.ashx"") { Content = new StringContent(""some body"") }; using (HttpResponseMessage response = client.SendAsync(request).GetAwaiter().GetResult()) { Console.WriteLine(response.StatusCode); } } ``` This outputs BadRequest. " 9024 area-System.Net Add several HttpClientHandler tests related to content - Verify that request content isn't disposed until after response content is buffered (https://github.com/dotnet/corefx/pull/8935) - Verify that request content isn't disposed until after request content is sent and response headers are received (https://github.com/dotnet/corefx/issues/9006) - Verify that verbs which shouldn't send request content don't (https://github.com/dotnet/corefx/issues/9023) cc: @davidsh, @ericeil 9025 area-System.Net Port to release/1.0.0: Fix CurlHandler handling of redirects Port #8946 to release/1.0.0 9027 area-System.Net SendAsync_ExpectedDiagnosticSourceLogging tests failed in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/windows_nt_debug_prtest/1863/consoleText ``` System.Net.Http.Functional.Tests.HttpClientTest.SendAsync_ExpectedDiagnosticSourceNoLogging [FAIL] Request was logged while logging disabled. Expected: False Actual: True Stack Trace: D:\j\workspace\windows_nt_de---4526f5ff\src\System.Net.Http\tests\FunctionalTests\HttpClientTest.cs(476,0): at System.Net.Http.Functional.Tests.HttpClientTest.SendAsync_ExpectedDiagnosticSourceNoLogging() ``` and ``` System.Net.Http.Functional.Tests.HttpClientTest.SendAsync_ExpectedDiagnosticSourceLogging [FAIL] System.AggregateException : One or more errors occurred. (An error occurred while sending the request.) Finished: System.Resources.Writer.Tests ---- System.Net.Http.HttpRequestException : An error occurred while sending the request. -------- System.Net.Http.WinHttpException : The operation has been canceled Stack Trace: at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) D:\j\workspace\windows_nt_de---4526f5ff\src\System.Net.Http\tests\FunctionalTests\HttpClientTest.cs(435,0): at System.Net.Http.Functional.Tests.HttpClientTest.SendAsync_ExpectedDiagnosticSourceLogging() ----- Inner Stack Trace ----- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() D:\j\workspace\windows_nt_de---4526f5ff\src\System.Net.Http\src\System\Net\Http\HttpClient.cs(381,0): at System.Net.Http.HttpClient.d__58.MoveNext() ----- Inner Stack Trace ----- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() D:\j\workspace\windows_nt_de---4526f5ff\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs(838,0): at System.Net.Http.WinHttpHandler.d__101.MoveNext() ``` 9031 area-System.Net Port to release/1.0.0: Fix some memory leaks in WinHttpRequestState Port #8996 to release/1.0.0 9033 area-System.IO Add Compression binary compat tests We don't currently test binary equality of outputted test zips, so tested compatibility is limited to the parts of the header we expose via a ZipArchive API. This commit adds some tests that compare normal and unicode zips between the current version and .NET 4.5 and .NET 4.6. depends on https://github.com/dotnet/corefx-testdata/pull/10. Tests will fail without https://github.com/dotnet/corefx/pull/9004. 9039 area-Meta Strategy for targetting safe subsets of mscorlib This blog post describes plans to support more API on .NET core: https://blogs.msdn.microsoft.com/dotnet/2016/05/27/making-it-easier-to-port-to-net-core/ Good news, but it does raise some questions. Let's say that in six months it's possible to link against the BCL reference assemblies; you compile a dll, which can now be used on the various platforms and appmodels of the core CLR. So: what happens to code which calls System.DoesntWorkOnLinux? Or in the case of UWP, System.IO? As a library author, I won't have the capability to test every current and future platform. How should I go about building packages which do not throw PlatformNotSupportedException in an unexpected new environment? Can netstandard help here? It's not yet clear how it will relate to mscorlib - and some problems would still exist, like the one with System.IO in Store apps. 9041 area-System.Net Flow HttpClient timeouts and cancellation to the response stream When using a timeout and/or a cancellation token with a buffered HttpClient operation, the cancellation/timeout doesn't flow through to the actual read/write operations on the underlying streams. This fixes that. cc: @davidsh, @cipop, @ericeil, @bartonjs Fixes #8663 9043 area-System.Net Reduce System.Net.CredentialCache allocations This PR is broken up into multiple commits to make it easier to review... - The first two commits add some more tests and modifies an `ArgumentException` to include the param name using `nameof`. The tests in the first commit pass before and after the rest of the changes. - The next commit changes `CredentialCache`'s dictionaries to be lazily allocated. `CredentialCache` has two backing dictionaries: one is for Uri-based protocols like HTTP/HTTPS used by `HttpClient`, the other for Host/Port-based protocols like SMTP, used by `SmtpClient` in the full framework (but not in CoreFX as `SmtpClient` hasn't been ported yet). While it's possible that both types of protocols could be used at the same time with the same `CredentialCache` instance, it's more likely that only one dictionary will be used per instance. Instead of always allocating both dictionaries up-front, lazily allocate the dictionaries only when needed. - The next commit avoids the array allocation/copying in `CredentialCache`'s enumerator, using the dictionary enumerator(s) instead. - The next commit reduces allocations in `CredentialHostKey`. `CredentialHostKey` can be a struct instead of a class. Unlike with the Uri-based dictionary, there's no need to enumerate all items in the Host/Port-based dictionary to find the greatest prefix length. Instead, we can look up the item in the dictionary directly. There's also no need to cache the hash code. Allocations associated with `ToUpperInvariant().GetHashCode()` can be avoided by using `StringComparer.OrdinalIgnoreCase.GetHashCode()`. - The next commit reduces allocations in `CredentialKey`. Unlike `CredentialHostKey`, I've left `CredentialKey` as a class for now, as the dictionary needs to be enumerated to find the longest matching prefix, and I was concerned about potential perf degradation due to copying a large struct. However, there is still room for improvement. The `AuthenticationType.ToUpperInvariant().GetHashCode()` allocation can be avoided in `GetHashCode` by using `StringComparer.OrdinalIgnoreCase.GetHashCode(AuthenticationType)`. There's no need to include the length in the hash code, as the hash code for the Uri is sufficient. And, there's no need to cache the hash code, which allows us to at least reduce the size of `CredentialKey`. - The last commit contains some minor cleanup while making changes in this file. cc: @stephentoub, @davidsh 9044 area-System.Net Port System.Net.Http UWP tests /cc @davidsh Requires NetNative test execution support. 9045 area-System.Net Enable System.Net tests to run against NetFX /cc @tarekgh @davidsh An example is already available in `System.Globalization.Calendars`. To run the tests against .Net 4.6 Desktop: `msbuild /t:rebuild,test /property:Configuration=net46`. 9048 area-System.Net Add multi-machine and Enterprise scenario support for System.Net tests /cc @himadrisarkar @davidsh @vijaykota @shrutigarg @markwilkie @MattGal System.Net.\* testing requires multiple machines to exercise real-world networking scenarios. These include both the outer-loop tests as well as tests requiring more complicated setup and fixed SKUs such as perf. Here is a list of requirements that our team brainstormed a while back: ## Network Scenarios - Internet scenarios - Use a set of publicly available, always available Azure servers. - Allow `localhost`, local network or private Azure servers. - Enterprise scenarios (auth, IPSec) - Use `localhost` servers - Use local network servers - Use an Azure closed test environment - Performance/stress scenarios ## Test Server Requirements - Scripts should allow deployment on `localhost` as well as a specific on-prem machine or an Azure account. An example of such deployment is available at https://github.com/davidsh/corefx-net-testservers. - Server configuration scripts (both for local and remote deployments) - Use Bash/Powershell - Scripts should be able to both install and uninstall the server. - Ensure a clear state of the machine after uninstall. ## Test Client Requirements - Standardized script naming and location will allow for automatic prerequisite installation/cleanup. - Client prerequisite scripts: install and cleanup - Use Powershell/Bash - Will run as `Administrator` / `root`. ## Test Execution - Endpoint configuration will be made through Environment variables (see #2383). - A single script will be used to: - set the environment variables (a `.gitignore`d override file could allow developers to set up their own custom environment) - detect and install prerequisites - run selected tests - uninstall prerequisites - Proposed prerequisite script location and naming: - contract_name\tests\scripts\client - setupclient.ps1(.sh) [-u(ninstall)] - contract_name\tests\scripts\server - setupserver.ps1(.sh) [-u(ninstall)] 9049 area-System.Net Port System.Net.WebSockets.Client tests /cc @davidsh The following tests need to be ported: - [ ] Performance tests - [ ] NetNative tests - will be part of 2.1 work - [x] Server code and scripts 9053 area-System.Runtime MathTests.Pow test failing after recent coreclr change e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/centos7.1_debug_tst/558/consoleText http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/fedora23_debug_tst/167/consoleText http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu16.04_debug_tst/347/consoleText ``` System.Tests.MathTests.Pow [FAIL] Assert+WrapperXunitException : File path: D:\j\workspace\fedora23_debu---1725fa63\src\System.Runtime.Extensions\tests\System\Math.cs. Line: 266 ---- Assert.Equal() Failure Expected: 1 Actual: NaN Stack Trace: at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber) at Assert.Equal[T](T expected, T actual, String path, Int32 line) at System.Tests.MathTests.Pow() ----- Inner Stack Trace ----- at Assert.Equal[T](T expected, T actual, String path, Int32 line) ``` I believe this was caused by https://github.com/dotnet/coreclr/pull/4847 cc: @tannergooding, @janvorli, @jkotas https://github.com/dotnet/corefx/blob/d0dc5fc099946adc1035b34a8b1f6042eddb0c75/src/System.Runtime.Extensions/tests/System/Math.cs#L266 9058 area-System.Security Port ProtectedMemory I found the class ProtectedData in System.Security.Cryptography, but did not find the class ProtectedMemory. 9063 area-System.Threading Thread.IsThreadPoolThread not exposed in coreclr https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/Threading/Thread.cs#L645-L649 Some times we want to queue things on the threadpool; but if we are already on the threadpool continue executing rather than queue - however the thread can't be checked if is threadpool thread currently. Coreclr issue https://github.com/dotnet/coreclr/issues/5407 9064 area-System.Data System.Data.SqlClient | UWP ARM Build ## Win 10 IoT ARM Build The .NET Core Foundation Libraries already got Builds for most common platforms and architectures. Since the release of Windows 10 IoT Preview Version and announced support for Raspberry Pi Products many developers want to use it in a commercial way but the current build does not inherit the full core. The main issue with the current IoT-Build is the missing ability to connect to MS SQL Server and pass your requests. Using an additional WCF Service and communicate over REST-API is not the proper way to transfer Data in a company. So my request is to add a build of the .NET CORE on ARM for Windows 10 IoT usage on the github list or at least adding the ability to handle SQL for MS SQL Server. **tl;dr** No possibility to connect to MS SQL Server via UWP Should be implemented since Raspberry Pi 3 got Win 10 IoT and is rising interest for companies Please consider: According to the porting documentation and a missing branch for IoT ARM I am leaving this request/issue on the master page. There is no other project handling my request 9066 area-Infrastructure CI tests pass, but plugin fails to report results, failing leg ``` [xUnit] [ERROR] - The plugin hasn't been performed correctly: Problem on deletion ``` e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/osx_release_prtest/1749/consoleText http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/osx_debug_prtest/1790/consoleText 9068 area-Infrastructure "Two outerloop Process tests failing on OSX with ""Permission denied""" "http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_osx_debug/55/consoleText http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_osx_release/58/consoleText ``` System.Diagnostics.Tests.ProcessTests.TestBasePriorityOnUnix [FAIL] System.ComponentModel.Win32Exception : Permission denied Stack Trace: at System.Diagnostics.Process.set_PriorityClassCore(ProcessPriorityClass value) at System.Diagnostics.Process.set_PriorityClass(ProcessPriorityClass value) at System.Diagnostics.Tests.ProcessTests.SetAndCheckBasePriority(ProcessPriorityClass exPriorityClass, Int32 priority) at System.Diagnostics.Tests.ProcessTests.TestBasePriorityOnUnix() ``` and ``` System.Diagnostics.Tests.ProcessTests.TestPriorityClassUnix [FAIL] System.ComponentModel.Win32Exception : Permission denied Stack Trace: at System.Diagnostics.Process.set_PriorityClassCore(ProcessPriorityClass value) at System.Diagnostics.Process.set_PriorityClass(ProcessPriorityClass value) at System.Diagnostics.Tests.ProcessTests.TestPriorityClassUnix() ``` Both of these tests have a comment next to them ""// This test requires admin elevation on Unix ""... maybe the runs where these fail isn't being done elevated? " 9070 area-System.Security X509Certificate2.GetECDsaPrivateKey fails "I have a certificate in the certificate store that `GetECDsaPrivateKey` fails on in Windows Server 2012 R2. It fails with the exception: > Keys used with the ECDsaCng algorithm must have an algorithm group of ECDsa. > Parameter name: key First, some details on the certificate. It is a self signed (for now) certificate with a 256-bit ECC key, the public key parameters are ECDSA_P256. The keyUsage extension is Critical:digitalSignature (80) and the EKU is codeSigning. The certificate was added to the certificate store using the import wizard when opening a PKCS12 file. When I platform invoke CNG myself with `CryptAcquireCertificatePrivateKey` and pass the key handle to `CngKey.Open` the same way the CertificatePal does it [here](https://github.com/dotnet/corefx/blob/d0dc5fc099946adc1035b34a8b1f6042eddb0c75/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Windows/CertificatePal.PrivateKey.cs#L66), I see that the CngKey is believed to be ECDH and has a key usage of ""AllUsage"". Regardless, I need an ECDsa instance for this certificate. What is the trick to getting CNG / GetECDsaPrivateKey is a ECDSA key, not an ECDH? There really isn't a difference between an ECDSA key or an ECDH key, as long as you don't use the same key for both purposes, so I would think this should work. /cc @bartonjs " 9071 area-System.Net Add CancellationToken-accepting overloads to HttpContent members We should consider adding overloads for methods like SerializeToStreamAsync, so that cancellation can be passed in and threaded through to the underlying ReadAsync/WriteAsync operations performed. 9075 area-System.Net HttpClientHandler.SendAsync on Unix completes at start-of-body, not end-of-headers The implementation currently looks for the first byte of the body (or no more processing to be done) as an indication that the response message should be published, but it should really be when the last byte of the headers are received. Ideally we'd find some mechanism to be notified by libcurl of end-of-headers (including end-of-headers for the final request when doing automatic redirection) so we can publish then, in case there's a delay between the last byte of the headers and the first byte of the body. We may need to switch to not using libcurl's automatic redirection mechanism and instead handle automatic redirections manually, using https://curl.haxx.se/libcurl/c/CURLOPT_FOLLOWLOCATION.html. 9085 area-System.Linq Enumerable Append and Prepend should be ported to the netfx Enumerable.Append and Enumerable.Prepend are new public API added in CoreFX 9087 area-System.Linq NETFX: Port Compile(System.Boolean) overloads in Linq.Expressions to netfx Preferrable with full interpreter support. It would be acceptable just to port the API and fallback to compiling since API does not strictly require interpretation. 9088 area-Infrastructure The build.cmd script should accept more common options Currently to build the repo as release you have to do this: ``` cmd build /p:ConfigurationGroup=Release ``` This is very error-prone to typos, since you can write something like `/p:ConfigurationGrouo=Release` and go away from your computer for 40 minutes only to realize you built on Debug configuration. We should provide `--debug` and `--release` shortcuts like is done in [the `build.sh` script](https://github.com/dotnet/corefx/blob/master/build.sh#L10), as well as update the documentation/`--help` output. Then, we could call the script like this: ``` cmd build --release ``` Other things we might want to consider: `--skiptests[ bool]` (default false), `--buildtests[ bool]` (default true), `--buildpackages[ bool]` (default true) cc: @mellinoe Note: I have knowledge of batch/shell scripting, so I can submit a PR to fix this myself if this is OK. **edit:** Additionally we should echo the arguments that are being passed to MSBuild to the user, so they know right away if they made a typo. 9091 area-System.Net Sometimes Socket.Dispose() doesn’t trigger ws2_32!closesocket() in NanoServer I have a full SKU physical machine on which I created a Nanoserver virtual machine (i.e., VM). If I run below PowerShell command on physical machine twice, the second command sometimes will either hang or fail. This is due to the fact that Socket.Dispose() sometimes doesn’t trigger ws2_32!closesocket() in Nanoserver. Statistically the repro rate is about 50%, but for the same physical machine-VM pair, the repro rate seems to be either 0 or 100%. New-PSSession -vmname -credential 9094 area-Infrastructure Port build fixes to unblock official builds Need to port the following commits from master to unblock building on new Linux distros. 3e3ab10bc37fb4379b7e38366ca0978ce8efa4b0 1d8bac52febbaf4f1cc626cc8ef4c030054e92ef 02f40870f59eda6dae5c55550670dc4b433cb59e 217289492a53b9972a9c0f9d0ce3503c422fe601 9102 area-System.Net Flow HttpClient timeouts and cancellation to the response stream (This is the same PR as #9041, which was already signed-off on; Jenkins wasn't responding to requests on it.) When using a timeout and/or a cancellation token with a buffered HttpClient operation, the cancellation/timeout doesn't flow through to the actual read/write operations on the underlying streams. This means that on Windows, doing a basic operation like GetStringAsync with a server that pauses for arbitrarily long periods of time while sending the response body won't cancel or timeout until it sends more data. (We don't need to do this on Unix, as on Unix we already handle this case differently, with a single registration for the duration of the SendAsync operation.) 9108 area-System.IO System.IO.Compression ZipArchive improvements I've been spending some time with zips and found our APIs lacking in a few places: 1. Cannot rename an entry, have to remove it and re-add-it 2. Cannot open multiple entries at once since they seem share the same underlying stream. 3. Cannot control the order/re-order entries in the zip 9109 area-System.Net Add some HttpClientHandler client certificate tests We didn't previously have any. And fix a small bug discovered from this, lack of argument validation when setting the enum value. cc: @davidsh, @cipop, @bartonjs, @ericeil 9110 area-System.Net Port to release/1.0.0: Flow HttpClient timeouts and cancellation to the response stream Port https://github.com/dotnet/corefx/pull/9102 to release/1.0.0 9114 area-System.Security "VerifyCrlCache test failed in release branch: ""Chain should not build validly""" http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/release_1.0.0/job/outerloop_ubuntu14.04_debug_prtest/1/consoleText ``` System.Security.Cryptography.X509Certificates.Tests.X509FilesystemTests.VerifyCrlCache [FAIL] Chain should not build validly Expected: False Actual: True Stack Trace: /mnt/j/workspace/dotnet_corefx/release_1.0.0/outerloop_ubuntu14.04_debug_prtest/src/System.Security.Cryptography.X509Certificates/tests/X509FilesystemTests.Unix.cs(58,0): at System.Security.Cryptography.X509Certificates.Tests.X509FilesystemTests.VerifyCrlCache() ``` 9116 area-System.IO System.IO.Compression perf tests failing on linux machines When running the System.IO.Compression perf tests locally on a linux machine, a bunch for FileNotFoundExceptions show up Eg.: System.IO.Compression.Tests/netcoreapp1.0/GZTestData/Canterbury/GZCompressed/grammar.lsp.gz not found To repro the error: On a linux machine, build the CoreFX repro and run the following command ``` Tools/corerun Tools/MSBuild.exe src/System.IO.Compression/tests/System.IO.Compression.tests.csproj /t:BuildAndTest /p:Performance=true /p:OSGroup=Linux ``` 9118 area-System.IO System.IO.Pipes perf tests never finish exection on linux machine When running System.IO.Pipes perf tests on a linux machine, the tests seem to run infinitely and need to be killed/timed out To repro the error: On a linux machine, build the CoreFX repo and run the following command `Tools/corerun Tools/MSBuild.exe src/System.IO.Pipes/tests/System.IO.Pipes.tests.csproj /t:BuildAndTest /p:Performance=true /p:OSGroup=Linux` 9119 area-System.Net Fix HttpClientMiniStressTests tests These were broken at some point (almost all of the tests fail, complaining about invalid responses from the server), but we didn't notice because they're not enabled by default. cc: @davidsh 9124 area-System.Net "HttpClient.GetAsync throws an exception, if server response has more than one""WWW-Authenticate: Basic"" header with different realm" "HttpClient.GetAsync throws an exception, if server response has more than one ""WWW-Authenticate: Basic"" header with different realms. The sample client code is: ` ``` var handler = new HttpClientHandler(); handler.UseDefaultCredentials = false; handler.Credentials = System.Net.CredentialCache.DefaultCredentials; handler.AllowAutoRedirect = true; using (var client = new HttpClient(handler)) { client.BaseAddress = new Uri(""type you server URI here""); HttpResponseMessage response = await client.GetAsync(""api/values""); } ``` ` Same code works fine under desktop .Net framework. The exception call stack is: System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.WinHttpException: The operation identifier is not valid at System.Net.Http.WinHttpAuthHelper.CheckResponseForAuthentication(WinHttpRequestState state, UInt32& proxyAuthScheme, UInt32& serverAuthScheme) at System.Net.Http.WinHttpHandler.d__101.MoveNext() --- End of inner exception stack trace --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.Http.HttpClient.d__58.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at ConsoleApplication.Program.d__1.MoveNext() in D:\prj\repro_ntlm_integrated\Client\Program.cs:line 42 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at ConsoleApplication.Program.d__0.MoveNext() in D:\prj\repro_ntlm_integrated\Client\Program.cs:line 28 Below is fiddler trace: > GET http://stiliev-dev/WebApplication2/api/values HTTP/1.1 > Accept: application/json > Accept-Encoding: gzip, deflate, peerdist > Connection: Keep-Alive > X-P2P-PeerDist: Version=1.1 > X-P2P-PeerDistEx: MinContentInformation=1.0, MaxContentInformation=2.0 > Host: stiliev-dev > > HTTP/1.1 401 Unauthorized > Cache-Control: no-cache > Pragma: no-cache > Content-Type: application/json; charset=utf-8 > Expires: -1 > Server: Microsoft-IIS/10.0 > X-AspNet-Version: 4.0.30319 > WWW-Authenticate: Basic realm=""http://stiliev-dev:8080/tfs"" > WWW-Authenticate: Basic realm=""http://stiliev-dev:8080"" > WWW-Authenticate: Negotiate > WWW-Authenticate: NTLM > X-Powered-By: ASP.NET > Date: Fri, 03 Jun 2016 14:50:44 GMT > Content-Length: 61 > {""Message"":""Authorization has been denied for this request.""} " 9127 area-System.Net Add greater validation to HttpClient SSL cerificate validation Add more checks in addition to the host name, validity periods and chaining to trusted roots. 9130 area-System.Net System.Net.Security: Authentication failed because the remote party has closed the transport stream. In #9115: On a `Standard_D3_v2` Azure machine: Windows_NT Debug Build and Test failed because: ``` System.Net.Security.Tests.ServerNoEncryptionTest.ServerNoEncryption_ClientAllowNoEncryption_ConnectWithNoEncryption [FAIL] failed. MESSAGE: System.IO.IOException : Authentication failed because the remote party has closed the transport stream. +++++++++++++++++++ STACK TRACE: at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) in D:\j\workspace\windows_nt_de---494cfe0d\src\System.Net.Security\src\System\Net\SecureProtocols\SslState.cs:line 870 at System.Net.Security.SslState.PartialFrameCallback(AsyncProtocolRequest asyncRequest) in D:\j\workspace\windows_nt_de---494cfe0d\src\System.Net.Security\src\System\Net\SecureProtocols\SslState.cs:line 1098 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) in D:\j\workspace\windows_nt_de---494cfe0d\src\System.Net.Security\src\System\Net\SecureProtocols\SslState.cs:line 740 at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) in D:\j\workspace\windows_nt_de---494cfe0d\src\System.Net.Security\src\System\Net\SecureProtocols\SslState.cs:line 710 at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) in D:\j\workspace\windows_nt_de---494cfe0d\src\System.Net.Security\src\System\Net\SecureProtocols\SslStream.cs:line 125 at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at System.Net.Security.Tests.ServerNoEncryptionTest.d__4.MoveNext() in D:\j\workspace\windows_nt_de---494cfe0d\src\System.Net.Security\tests\FunctionalTests\ServerNoEncryptionTest.cs:line 63 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` 9131 area-System.Net Fix crash in HttpClient on Unix when using client certificates In HttpClient on Unix when a client certificate is used, we add the intermediate certificates for the client authentication cert's chain so that the server can chain-verify. When we add the extra chain certificate to the SSL handle, we're transferring ownership to that handle, which we subequently dispose... but we don't mark the original SafeHandle as invalid, so it eventually gets finalized and we end up double-free'ing, leading to seg faults and other badness. This commit simply cleans up the handle appropriately. cc: @bartonjs, @billwert 9137 area-System.Net Fixing Socket async connect for connection-less protocols; Fixing and enabling Socket perf tests. Simulating an asynchronous Connect (APM/TPL) for connection-less protocols. Moving SocketPerformance to Outerloop and enabling the tests without an execution time expectation. Fixes #4968, #3635 9140 area-System.Net "Revert ""Flow HttpClient timeouts and cancellation to the response stream""" This reverts the product changes from commit cc8b48c8ea41b9cee888055483d16072f3f3a1c5. The test changes remain. cc: @davidsh, @cipop 9142 area-System.Net Unix SslStream may not be sending intermediate CA certs when required "As a followup to #9109 I was looking for the equivalent code in SslStream, and there doesn't seem to be any. This issue is currently ""determine if there really is a problem"", with the implicit ""if there was, fix it"". This is somewhat hard to test, since the only way to get the intermediate certs on the request given the current API (I think) is to have them in a CA store; but if they're in a CA store we'll already find them when we chain walk on the receiver side. If the client API made guarantees about when the chain was walked then it could be [OuterLoop] managed by adding intermediates to the store, setting up the client, removing the certs from the store, and letting the request initiate. " 9143 area-System.Security Dispose unneeded certs in chain walk Followup to #8978. OpenSslChainProcessor.FindCandidates causes a lot of X509Certificate2 objects to be spawned (https://github.com/dotnet/corefx/blob/master/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs#L495-L498). When the toProcess queue is empty it should find all certificates not referenced in `candidates` and Dispose() them, to be a much better citizen with the underlying SafeX509Handles. 9145 area-System.Console Interruptable read on a pipe "Challenge: Try reading from System.Console.StandardInput.BaseStream without blocking a thread such that another thread can interrupt the read without resorting to P/Invoke. ReadAsync does indeed return immediately, but the Task's cancellation token isn't bound to the task thanks to ""Tuple.Create(this, buffer, offset, count), CancellationToken.None, "" in Stream.cs and no descendant path to WindowsConsoleStream attempts to fix this. This means that attempting to gather the completion result wedges the thread. Both the Windows and the Unix APIs are capable of solving this, but each do so completely differently. I've got thousands upon thousands of lines of code written attempting this problem and still more to go before it works at all. " 9155 area-System.Net HttpClient and PreAuthenticate I am just curious why PreAuthenticate has never worked as expected. On several occasions when I am using Server to Server auth the nounce needs to stay the same on consecutive request but with the way HttpClient behaves I cannot implement that. 9156 area-Infrastructure Official Build Frequency? Today, in the new build pipeline, we have triggers set to build CoreFX 4 times a day, every day, and CoreCLR 3 times a day, every day. This leads to tons on version updates everyday and it's generating a lot of noise, IMHO. I think we should consider doing some (all?) of the following: - Reduce the frequency of triggered builds. As we can launch these on demand and have results in an hour, there's less need to be doing them proactively. - Don't build over the weekend. - Have automation which auto merges green dependency updates. - Have automation which closes old dependency updates with no comments/additional commits. I'm interested in hearing everyone else's thoughts. /cc @dotnet/corefx-contrib @jhendrixMSFT @eerhardt @wtgodbe 9158 area-System.Text 'Cyrillic' is not a supported encoding name. "When I run this: ``` Encoding.GetEncoding(""Cyrillic""); ``` I am now getting this: ``` Unhandled Exception: System.ArgumentException: 'Cyrillic' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. Parameter name: name at System.Globalization.EncodingTable.GetCodePageFromName(String name) at System.Text.Encoding.GetEncoding(String name) at ConsoleApplication.Program.Main(String[] args) ``` which wasn't the case before, it started happening in RC2. dotnet CLI: ``` .NET Command Line Tools (1.0.0-preview1-002702) Product Information: Version: 1.0.0-preview1-002702 Commit Sha: 6cde21225e Runtime Environment: OS Name: ubuntu OS Version: 14.04 OS Platform: Linux RID: ubuntu.14.04-x64 ``` project.json ``` { ""version"": ""1.0.0-*"", ""buildOptions"": { ""emitEntryPoint"": true, ""preserveCompilationContext"": true }, ""dependencies"": { ""Microsoft.Extensions.DependencyModel"": ""1.0.0-rc2-final"", ""Microsoft.Extensions.Configuration.EnvironmentVariables"": ""1.0.0-rc2-final"", ""Microsoft.Extensions.Configuration.Json"": ""1.0.0-rc2-final"", ""Microsoft.Extensions.Options"": ""1.0.0-rc2-final"", ""Microsoft.Extensions.Configuration.Binder"": ""1.0.0-rc2-final"", ""Microsoft.Extensions.Options.ConfigurationExtensions"": ""1.0.0-rc2-final"", ""Microsoft.NETCore.App"": { ""type"": ""platform"", ""version"": ""1.0.0-rc2-3002702"" } }, ""frameworks"": { ""netcoreapp1.0"": { ""imports"": ""portable-net45+wp80+win8+wpa81+dnxcore50"" } } } ``` " 9160 area-System.Net NegotiateStream AuthenticateAsClientAsync does not work for non default credential NegotiateStream AuthenticateAsClientAsync works for default credential, but not non default credential. I have a repro app similar to the sample in https://msdn.microsoft.com/en-us/library/system.net.security.negotiatestream(v=vs.110).aspx The repro app is passing in desktop, but failing in .net core. I have observed that the client has got a NTLM credential instead of kerberos and failed to log on to the server. [Repro.zip](https://github.com/dotnet/corefx/files/299179/Repro.zip) with below exception from client. > System.Net.Security.dll!System.Net.Security.NegoState.ThrowCredentialException(long error) Line 842 C# > System.Net.Security.dll!System.Net.Security.NegoState.ProcessReceivedBlob(byte[] message, System.Net.LazyAsyncResult lazyResult) Line 608 C# > System.Net.Security.dll!System.Net.Security.NegoState.ReadCallback(System.IAsyncResult transportResult) Line 758 C# > System.Net.Security.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken) Line 481 C# > System.Net.Security.dll!System.Net.LazyAsyncResult.ProtectedInvokeCallback(object result, System.IntPtr userToken) Line 431 C# > System.Net.Security.dll!System.Net.StreamFramer.ReadFrameComplete(System.IAsyncResult transportResult) Line 292 C# > System.Net.Security.dll!System.Net.StreamFramer.ReadFrameCallback(System.IAsyncResult transportResult) Line 171 C# > System.Net.Security.dll!System.Threading.Tasks.TaskToApm.InvokeCallbackWhenTaskCompletes.AnonymousMethod__0() Line 137 C# > System.Private.CoreLib.ni.dll!System.Runtime.CompilerServices.TaskAwaiter.OutputWaitEtwEvents.AnonymousMethod__0() Unknown > System.Private.CoreLib.ni.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown > System.Private.CoreLib.ni.dll!System.Threading.Tasks.AwaitTaskContinuation.RunCallback(System.Threading.ContextCallback callback, object state, ref System.Threading.Tasks.Task currentTask) Unknown > System.Private.CoreLib.ni.dll!System.Threading.Tasks.Task.FinishContinuations() Unknown > System.Private.CoreLib.ni.dll!System.Threading.Tasks.Task.TrySetResult(int result) Unknown > System.Private.CoreLib.ni.dll!System.Threading.Tasks.TaskFactory.FromAsyncCoreLogic(System.IAsyncResult iar, System.Func endFunction, System.Action endAction, System.Threading.Tasks.Task promise, bool requiresSynchronization) Unknown > System.Private.CoreLib.ni.dll!System.Threading.Tasks.TaskFactory.FromAsyncImpl.AnonymousMethod__1(System.IAsyncResult iar) Unknown > System.Net.Sockets.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken) Line 481 C# > System.Net.Sockets.dll!System.Net.ContextAwareResult.CompleteCallback() Line 461 C# > System.Net.Sockets.dll!System.Net.ContextAwareResult.Complete.AnonymousMethod__15_0(object s) Line 450 C# > System.Private.CoreLib.ni.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown > System.Net.Sockets.dll!System.Net.ContextAwareResult.Complete(System.IntPtr userToken) Line 451 C# > System.Net.Sockets.dll!System.Net.LazyAsyncResult.ProtectedInvokeCallback(object result, System.IntPtr userToken) Line 431 C# > System.Net.Sockets.dll!System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped\* nativeOverlapped) Line 181 C# > System.Threading.Overlapped.dll!System.Threading.ThreadPoolBoundHandleOverlapped.CompletionCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped\* nativeOverlapped) Line 48 C# 9162 area-Meta Introduce System.Json as a Json.Net-compatible foundational library "JSON has entered the global software ecosystem with a force that is as strong, arguably stronger, than XML was in its time. In the .NET ecosystem, for years, it has been striking that the framework was not supporting JSON in a built-in way. As a result, `Newtonsoft.Json` is now the No1 package on Nugget. I suggest that the foundational libraries should include a `System.Json` library with an API compatible with `Newtonsoft.Json`. Indeed, as it stands Json.NET represents a tax that every .NET developer need to pay: you have to discover first _why_ there is no built-in way to deal with JSON, then you have to discover that this one specific third party package is worthy to be trusted. I am not dismissing the quality of this excellent package, but this massive hit primarily demonstrates that JSON should be part of the foundational libraries of .NET. Then, taking the longer view, I am worried - and I believe others should be - about the long term implications of having such a _narrow_ yet _mission-critical_ library developed and maintained separately. .NET Core can be a viable economic product to maintain over time even without the backing of Microsoft. However, Json.NET _alone_ is not economically viable, not even through commercial support, not only 10 years time scale anyway. The project might or might no go the way ServiceStack went (another great project by the way). Also, the commit profile of this project, with the _first contributor having literally over 100x more commits than the second_, a scenario ala NDoc is not to be ruled out either. Presently, Newtonsoft is taking the path of building complementary products on top of Json.NET, which again is very good, yet should not be relied upon for the future of .NET. Opening .NET to the community is great. However, the fundational libraries should cover the _very basic_ use cases. XML is covered, JSON should be as well. In particular, ""outsourcing"" narrow yet critical components is paving the way for upcoming messes ala left-pad. Ideally, `System.Json` would be API-compatible with `Newtonsoft.Json`. There are multiple ways to achieve that. Starting a discussion on this precise matter between corefx representants and James Newton-King would be a start. " 9179 area-System.Net Make the internal CookieComparer class static `CookieComparer` is never used as an `IComparer`, so there's no need for a singleton instance to be created on-demand and cached. Instead, a simple static `Compare` method is sufficient. cc: @stephentoub, @davidsh, @CIPop 9180 area-System.Diagnostics SIGABRT_ASSERT_System.Native.so!SystemNative_ForkAndExecProcess "**The notes in this bug refer to the Ubuntu.14.04 dump [rc3-24202-00_004C](https://rapreqs.blob.core.windows.net/sschaab/BodyPart_669c030d-366e-481c-8f12-0e82c88679f2?sv=2015-04-05&sr=b&sig=yodf0SNKqzeSzh2ZReKVeGouiJC8UhD%2B504JC9qrI1s%3D&st=2016-06-03T22%3A16%3A16Z&se=2017-06-03T22%3A16%3A16Z&sp=r). Other dumps are available if needed.** ``` STOP_REASON: SIGABRT FAULT_SYMBOL: System.Native.so!SystemNative_ForkAndExecProcess FAILURE_HASH: SIGABRT_System.Native.so!SystemNative_ForkAndExecProcess FAULT_STACK: libc.so.6!__GI_raise libc.so.6!__GI_abort libc.so.6!__assert_fail_base libc.so.6!UNKNOWN System.Native.so!SystemNative_ForkAndExecProcess System.Runtime.Extensions.dll!DomainBoundILStubClass.IL_STUB_PInvoke(System.String, Byte**, Byte**, System.String, Int32, Int32, Int32, Int32 ByRef, Int32 ByRef, Int32 ByRef, Int32 ByRef) System.Diagnostics.Process.dll!Interop+Sys.ForkAndExecProcess(System.String, System.String[], System.String[], System.String, Boolean, Boolean, Boolean, Int32 ByRef, Int32 ByRef, Int32 ByRef, Int32 ByRef) System.Diagnostics.Process.dll!System.Diagnostics.Process.StartCore(System.Diagnostics.ProcessStartInfo) System.Diagnostics.Process.dll!System.Diagnostics.Process.Start() System.Diagnostics.Process.Tests.dll!System.Diagnostics.Tests.ProcessWaitingTests.SingleProcess_TryWaitMultipleTimesBeforeCompleting() rc3-24202-00_004C.exe!stress.generated.UnitTests.UT0() stress.execution.dll!stress.execution.UnitTest.Execute() stress.execution.dll!stress.execution.DedicatedThreadWorkerStrategy.RunWorker(stress.execution.ITestPattern, System.Threading.CancellationToken) stress.execution.dll!stress.execution.DedicatedThreadWorkerStrategy+<>c__DisplayClass1_0.b__0() System.Private.CoreLib.ni.dll!System.Threading.Tasks.Task.Execute() System.Private.CoreLib.ni.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) System.Private.CoreLib.ni.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef) System.Private.CoreLib.ni.dll!System.Threading.Tasks.Task.ExecuteEntry(Boolean) System.Private.CoreLib.ni.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) libcoreclr.so!CallDescrWorkerInternal libcoreclr.so!CallDescrWorkerWithHandler(CallDescrData*, int) libcoreclr.so!MethodDescCallSite::CallTargetWorker(unsigned long const*) libcoreclr.so!MethodDescCallSite::Call(unsigned long const*) libcoreclr.so!ThreadNative::KickOffThread_Worker(void*) libcoreclr.so!ManagedThreadBase_DispatchInner(ManagedThreadCallState*) libcoreclr.so!ManagedThreadBase_DispatchMiddle(ManagedThreadCallState*) libcoreclr.so!ManagedThreadBase_DispatchOuter(ManagedThreadCallState*)::$_6::operator()(ManagedThreadBase_DispatchOuter(ManagedThreadCallState*)::TryArgs*) const::{lambda(Param*)#1}::operator()(Param*) const libcoreclr.so!ManagedThreadBase_DispatchOuter(ManagedThreadCallState*)::$_6::operator()(ManagedThreadBase_DispatchOuter(ManagedThreadCallState*)::TryArgs*) const libcoreclr.so!ManagedThreadBase_DispatchOuter(ManagedThreadCallState*) libcoreclr.so!ManagedThreadBase_FullTransitionWithAD(ADID, void (*)(void*), void*, UnhandledExceptionLocation) libcoreclr.so!ManagedThreadBase::KickOff(ADID, void (*)(void*), void*) libcoreclr.so!ThreadNative::KickOffThread(void*) libcoreclr.so!Thread::intermediateThreadProc(void*) libcoreclr.so!CorUnix::CPalThread::ThreadEntry(void*) libpthread.so.0!start_thread libc.so.6!__clone FAULT_THREAD: thread #1: tid = 53100, 0x00007f00ab935cc9 libc.so.6`__GI_raise(sig=6) + 57 at raise.c:56, name = 'corerun', stop reason = signal SIGABRT ``` **Looking at the code for frame 4 (pal_process.cpp line 151) it looks like the call to fork() returns -1 so it asserts with the message ""fork() failed.""** ``` (lldb) fr s 4 frame #4: 0x00007effd1df2cb5 System.Native.so`::SystemNative_ForkAndExecProcess(filename=""/home/DotNetBot/dotnetbuild/work/b36360ef-8151-4402-8438-48a63dd3588d/Work/d643c218-6748-4941-8172-9696a99dcf7b/Exec/execution/corerun"", argv=0x00007eff87d5ebc0, envp=0x00007eff87d61380, cwd=0x0000000000000000, redirectStdin=0, redirectStdout=0, redirectStderr=0, childPid=0x00007f000aff9d30, stdinFd=0x00007f000aff9d28, stdoutFd=0x00007f000aff9d20, stderrFd=0x00007f000aff9d18) + 645 at pal_process.cpp:151 (lldb) fr v -D1 (const char *) filename = 0x00007eff87d62220 ""/home/DotNetBot/dotnetbuild/work/b36360ef-8151-4402-8438-48a63dd3588d/Work/d643c218-6748-4941-8172-9696a99dcf7b/Exec/execution/corerun"" (char *const *) argv = 0x00007eff87d5ebc0 (char *const *) envp = 0x00007eff87d61380 (const char *) cwd = 0x0000000000000000 (int32_t) redirectStdin = 0 (int32_t) redirectStdout = 0 (int32_t) redirectStderr = 0 (int32_t *) childPid = 0x00007f000aff9d30 (int32_t *) stdinFd = 0x00007f000aff9d28 (int32_t *) stdoutFd = 0x00007f000aff9d20 (int32_t *) stderrFd = 0x00007f000aff9d18 (int) success = 1 (int [2]) stdinFds = ([0] = -1, [1] = -1) (int [2]) stdoutFds = ([0] = -1, [1] = -1) (int [2]) stderrFds = ([0] = -1, [1] = -1) (int [2]) waitForChildToExecPipe = ([0] = 162, [1] = 164) (int) processId = -1 // Fork the child process if ((processId = fork()) == -1) { assert(false && ""fork() failed.""); success = false; goto done; } ``` " 9181 area-Serialization Addressed Feedback for PR #9125. The change is to avoid the intermediate `StringBuilder` and `string` allocations. Thanks for @justinvp 's suggestions. 9184 area-System.Net Allow CookieContainer to be Serialized/Deserialized "Currently, serialization and deserialization of the CookieContainer doesn't work. The documentation says to use the CookieContainer if one needs to save off HttpOnly cookies. It seems that saving the CookieContainer isn't possible. ""If the server sends HTTPOnly cookies, you should create a System.Net.CookieContainer on the request to hold the cookies, although you will not see or be able to access the cookies that are stored in the container."" We should look at providing support for CookieContainer class to have XML serialization. " 9187 area-Infrastructure Introduce Gentoo Linux RID and a job in CI matrix The current master branches of CoreCLR and CoreFX native builds on Gentoo Linux. I have compiled the steps to create a Gentoo LXC container on Ubuntu 14 with list of dependencies required for the said repos: https://gist.github.com/jasonwilliams200OK/1a2e2c0e904ffa95faf6333fcd88d9b8. Please assign an RID for Gentoo Linux and add CI job to continuously monitor its build status. Thanks! :) 9189 area-System.Net Socket.Connect fails for connection-less and single IP-address remote endpoints on Unix Ref: #9137, #4968 [System.Net.Sockets.Tests.UdpClientTest.Connect_Success (from (empty))](http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_debug_prtest/1814/testReport/junit/System.Net.Sockets.Tests/UdpClientTest/Connect_Success/) ``` Stacktrace MESSAGE: System.PlatformNotSupportedException : Sockets on this platform are invalid for use after a failed connection attempt, and as a result do not support attempts to connect to multiple endpoints. +++++++++++++++++++ STACK TRACE: at System.Net.Sockets.Socket.ThrowIfNotSupportsMultipleConnectAttempts() at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port) at System.Net.Sockets.Socket.Connect(String host, Int32 port) at System.Net.Sockets.Tests.UdpClientTest.Connect_Success() ``` [System.Net.Sockets.Tests.UdpClientTest.ConnectAsync_Success (from (empty))](http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_debug_prtest/1814/testReport/junit/System.Net.Sockets.Tests/UdpClientTest/ConnectAsync_Success/) ``` Stacktrace MESSAGE: System.PlatformNotSupportedException : Sockets on this platform are invalid for use after a failed connection attempt, and as a result do not support attempts to connect to multiple endpoints. +++++++++++++++++++ STACK TRACE: at System.Net.Sockets.Socket.ThrowIfNotSupportsMultipleConnectAttempts() at System.Net.Sockets.Socket.BeginConnect(String host, Int32 port, AsyncCallback requestCallback, Object state) at System.Net.Sockets.SocketTaskExtensions.<>c.b__5_0(String targetHost, Int32 targetPort, AsyncCallback callback, Object state) at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl[TArg1,TArg2](Func`5 beginMethod, Func`2 endFunction, Action`1 endAction, TArg1 arg1, TArg2 arg2, Object state, TaskCreationOptions creationOptions) at System.Threading.Tasks.TaskFactory.FromAsync[TArg1,TArg2](Func`5 beginMethod, Action`1 endMethod, TArg1 arg1, TArg2 arg2, Object state) at System.Net.Sockets.SocketTaskExtensions.ConnectAsync(Socket socket, String host, Int32 port) at System.Net.Sockets.Tests.UdpClientTest.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` 9191 area-System.IO Fix Filesystem tests failing from path changes Changes in path validation disabled some of the FileSystem tests. Re-enable them with the new path logic in place. resolves #6931 9201 area-System.Net HttpClient PostAsync - The server returned an invalid or unrecognized response "EDITED: If I run this application on a Windows computer everything works out fine. When I run this application on a Linux (CentOS) computer I get the following exception: > System.Net.Http.HttpRequestException: The server returned an invalid or unrecognized response. at System.Net.Http.CurlResponseHeaderReader.ReadHeader(String& headerName, String& headerValue) at System.Net.Http.CurlHandler.MultiAgent.CurlReceiveHeadersCallback(IntPtr buffer, UInt64 size, UInt64 nitems, IntPtr context) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) I've tried this code on a Windows machine and it is working perfectly. I've also tried to make a SOAP call on CentOS console trough curl and it also works fine (I get the response). In the web application I keep getting the exception saying that the server returned an invalid or unrecognized response. This is the code - Exception thrown right on the hc.PostAsync(). ``` Uri uri = new Uri(ServiceConfiguration.SERVICE_URL); string sSOAPResponse = String.Empty; HttpClient hc = new HttpClient(); hc.DefaultRequestHeaders.Add(""SOAPAction"", oRequest.Action); var content = new StringContent(oRequest.RequestMessage, Encoding.UTF8, ""text/xml""); try { using (HttpResponseMessage response = await hc.PostAsync(uri, content)) { sSOAPResponse = await response.Content.ReadAsStringAsync(); (...) } ``` ` ## Steps to reproduce Call post async method with HttpClient on a Linux Server (CentOS 7.1 My case) ## Expected behavior Get the SOAP response (Works perfectly on Windows). ## Actual behavior The server returned an invalid or unrecognized response thrown. ## Environment data Product Information: Version: 1.0.0-preview1-002702 Commit Sha: 6cde21225e Runtime Environment: OS Name: centos OS Version: 7 OS Platform: Linux RID: centos.7-x64 Moved from https://github.com/dotnet/cli/issues/3344 on behalf of @RicardoRazz as this seems to be an HttpClient issue in the RC2 release of Shared Framework. " 9202 area-System.Globalization string.IndexOf not giving correct index "## Repro Steps 1. Copy code below 2. Run code ``` csharp namespace TestApp { class Program { static void Main(string[] args) { var sentence = ""\uDAD1²\uDF8F 㽜|""; var index = sentence.IndexOf(sentence); Console.WriteLine(""index: {0}"", index); if (index == 0) { Console.WriteLine(""It works!""); } else { throw new InvalidOperationException(""Expected that it is 0""); } } } } ``` ## Expected `index` is equal to 0. ## Actual An InvalidOperationException is thrown because `index` is equal to 1. " 9204 area-Infrastructure CentOS 7 outerloop runs failing [cmake is not found] After upgrading to build everything on the target machines the CentOS outerloop runs are failing with an error saying cmake is not found. Looking at how the labels are set up in Jenkins, it looks like the outerloop runs use a different base image id than the inner loop ones. I suppose CMake is not present on this newer image? 9208 area-System.Net Allow whitespace after HTTP response header name Be a bit more lenient in what we allow in the formatting of response headers. Fixes https://github.com/dotnet/corefx/issues/9201 cc: @davidsh, @ericeil, @RicardoRazz 9212 area-System.Net Manual_CertificateSentMatchesCertificateReceived_Success failed on Windows CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/windows_nt_debug_prtest/2007/consoleFull#-4102119967b4762c-faac-47f0-8268-9f6835e4535e ``` System.Net.Http.Functional.Tests.HttpClientHandler_ClientCertificates_Test.Manual_CertificateSentMatchesCertificateReceived_Success(numberOfRequests: 3, reuseClient: True) [FAIL] 16:28:34 System.Net.Http.HttpRequestException : An error occurred while sending the request. 16:28:34 ---- System.Net.Http.WinHttpException : The server returned an invalid or unrecognized response 16:28:34 Stack Trace: 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 16:28:34 Starting: System.Threading.Tasks.Tests 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 16:28:34 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() 16:28:34 D:\j\workspace\windows_nt_de---4526f5ff\src\System.Net.Http\src\System\Net\Http\HttpClient.cs(381,0): at System.Net.Http.HttpClient.d__58.MoveNext() 16:28:34 --- End of stack trace from previous location where exception was thrown --- 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 16:28:34 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() 16:28:34 D:\j\workspace\windows_nt_de---4526f5ff\src\System.Net.Http\src\System\Net\Http\HttpClient.cs(172,0): at System.Net.Http.HttpClient.d__32`1.MoveNext() 16:28:34 --- End of stack trace from previous location where exception was thrown --- 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() 16:28:34 D:\j\workspace\windows_nt_de---4526f5ff\src\System.Net.Http\tests\FunctionalTests\HttpClientHandlerTest.ClientCertificates.cs(88,0): at System.Net.Http.Functional.Tests.HttpClientHandler_ClientCertificates_Test.<>c__DisplayClass5_0.<b__2>d.MoveNext() 16:28:34 --- End of stack trace from previous location where exception was thrown --- 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() 16:28:34 D:\j\workspace\windows_nt_de---4526f5ff\src\System.Net.Http\tests\FunctionalTests\HttpClientHandlerTest.ClientCertificates.cs(106,0): at System.Net.Http.Functional.Tests.HttpClientHandler_ClientCertificates_Test.<>c__DisplayClass5_2.<b__4>d.MoveNext() 16:28:34 --- End of stack trace from previous location where exception was thrown --- 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() 16:28:34 D:\j\workspace\windows_nt_de---4526f5ff\src\Common\tests\System\Net\Http\LoopbackServer.cs(57,0): at System.Net.Test.Common.LoopbackServer.<>c__DisplayClass3_0.b__0(Task t) 16:28:34 at System.Threading.Tasks.Task.Execute() 16:28:34 --- End of stack trace from previous location where exception was thrown --- 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() 16:28:34 D:\j\workspace\windows_nt_de---4526f5ff\src\System.Net.Http\tests\FunctionalTests\HttpClientHandlerTest.ClientCertificates.cs(98,0): at System.Net.Http.Functional.Tests.HttpClientHandler_ClientCertificates_Test.d__5.MoveNext() 16:28:34 --- End of stack trace from previous location where exception was thrown --- 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 16:28:34 --- End of stack trace from previous location where exception was thrown --- 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 16:28:34 --- End of stack trace from previous location where exception was thrown --- 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 16:28:34 ----- Inner Stack Trace ----- 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 16:28:34 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 16:28:34 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() 16:28:34 D:\j\workspace\windows_nt_de---4526f5ff\src\System.Net.Http.WinHttpHandler\src\System\Net\Http\WinHttpHandler.cs(845,0): at System.Net.Http.WinHttpHandler.d__101.MoveNext() ``` 9213 area-System.Net Sample Application on HttpClient with .NET core I want to send a Http request to some website(URL) and get a response(Basically i need to use GetAsync and PutAsync methods for this) and i need to do with **.NET Core** in vs2015. Since i am new to .NET Core, i am unable to do it on my own and i didn't find good useful links that address my need. Can anyone set me on the path by providing sample applications or useful links ?Thanks in advance. P.S. I tried randomly some console application(Not sure if it is correct) but when i am adding Microsoft.Net.Http dependency to the project.json, i am getting an error like This dependency cannot be supported on .NET Core framework. 9218 area-System.Net Allow Socket.Connect{Async} to be used with a string-based IP addresses "As outlined in https://github.com/dotnet/corefx/issues/8768, on Unix we don't currently support using the instance Connect/ConnectAsync methods that take a string host or a DnsEndPoint, because they could map to multiple addresses, which means we might need to try reconnecting on the same socket after a failed attempt, and that's not supported with BSD sockets. They are potential workarounds we can explore as outlined in that issue, but they're non-trivial and/or have undesirable ramifications. However, one simple thing we can do is allow a string/DnsEndPoint version of an IPAddress, e.g. just as someone can provide an IPAddress, they can provide a string version of that IPAddress, such as ""127.0.0.1"". This is a common thing to do, and we can make it work just by attempting to parse the address. Fixes https://github.com/dotnet/corefx/issues/9189 Related to https://github.com/dotnet/corefx/issues/8768 cc: @ericeil, @cipop, @davidsh, @joshfree " 9220 area-System.Reflection DispatchProxy should emit interface properties and events metadata "Currently, `DispatchProxyGenerator` only emits accessor methods of the interface type, does not emit any properties and/or events. Thus, getting properties and/or events via reflection fails as following: ``` csharp interface IFoo { string Bar { get; set; } }; IFoo proxy = DispatchProxy.Create(); PropertyInfo[] props = proxy.GetType().GetProperties(); ``` In this point, it is natural to think that `props` has 1 property (string Bar), but it is actually an empty array even though `var bar = proxy.Bar` and `proxy.Bar = ""something""` can be compiled. It looks unnatural. In addition, it limits effectiveness of `DispatchProxy`. For example, when we generate a wrapper which implements `INotifyPropertyChanged` around underlying model object using `DispatchProxy`, we cannot do that because the data binding engine fails to retrieve `PropertyInfo` and then fails to bind object. Other AOP scenario may also be restricted by this issue. So, `DispatchProxyGenerator` should also emit properties and events of specified interface type as well as their accessor methods. " 9222 area-System.IO Consider File.WriteAll(Stream) method I frequently find myself wanting to dump all of the data from a stream to a new file. Currently, the best way to do that is: ``` using (var fs = new FileStream(pathForNewFile, FileMode.Create)) { streamIWantToDump.CopyTo(fs); } // OR using (var fs = File.OpenWrite(pathForNewFile)) { streamIWantToDump.CopyTo(fs); } // or async CopyTo equivalents. ``` while these are fine, I'd really like to be able to do: ``` File.WriteAllFromStream(pathForNewFile, streamIWantToDump); ``` where `WriteAllFromStream` reads from `streamIWantToDump` until its end is reached. 9224 area-System.Net Port to release/1.0.0: Allow whitespace after HTTP response header name Port https://github.com/dotnet/corefx/pull/9208 to release/1.0.0 9225 area-System.Security System.Security.AccessControl Unix implementation It may be worth looking into providing an implementation of AccessControl on Unix. It would at least be nice to have some control over basic RWX permissions for user/group/all, or we could go deeper with getfacl and setfacl. Most of the things on Windows would likely have to be left out as it would be too far a stretch to map them to anything on Unix, but it's worth considering regardless. discussion started in https://github.com/dotnet/corefx/pull/8930. 9227 area-System.Net HttpRequestException StatusCode property Is it possible to add HttpStatusCode to the `HttpRequestException` class? It seems like we have the ability to add the status code [here](https://github.com/dotnet/corefx/blob/master/src/System.Net.Http/src/System/Net/Http/HttpResponseMessage.cs#L161), but it's added to the exception message instead of an extra property on the exception. 9228 area-System.Net "Cancelling Http requests can result in ""The handle is invalid"" or other WinHTTP state errors" Http requests can be cancelled in various ways using a cancellation token or even a timeout. Sometimes the CI tests timeout contacting the Azure test server due to network congestion, so this results in the requests getting cancelled as well by the HttpClient.Timeout property. When Http requests are cancelled in WinHttpHandler, the WinHTTP handle is closed. This cancels any outstanding async operations in WinHTTP. However, the current CancellationTokenRegistration code is closing the handle without first seeing if there is an active operation in flight. ``` c# private async void StartRequest(object obj) { // ... using (state.CancellationToken.Register(s => ((WinHttpRequestState)s).RequestHandle.Dispose(), state)) { do { // ... } while (state.RetryRequest); } ``` Since this cancellation is happening on a different thread from the main StartRequest() logic, it results in in-deterministic behavior. PR #8693 (Fix cancellation of WinHttpHandler response stream reads) has a similar CancellationToken.Register logic but it correctly checks for an active operation. This same logic needs to apply to the StartRequest() operation. This is the root cause of the following issues: #8928 #8496 #8426 #8061 #8000 ## History of failures ``` System.Net.Http.HttpRequestException : An error occurred while sending the request. ---- System.Net.Http.WinHttpException : The handle is invalid ``` Day | Build | OS | Test -- | -- | -- | -- 5/9 | 20170509.01 | Win7 | Timeout_SetTo30AndGetResponseFromLoopbackQuickly_Success 5/10 | 20170510.01 | Win7 | GetAsync_AllowedSSLVersion_Succeeds 5/11 | 20170511.01 | Win7 | GetAsync_AllowedSSLVersion_Succeeds 5/19 | 20170519.04 | Win7 | PostAsync_CallMethod_StreamContent 5/26 | 20170526.01 | Win7 | PostLongerContentLengths_UsesChunkedSemantics 5/30 | 20170530.06 | Win7 | SetDelegate_ConnectionSucceeds 6/4 | 20170604.02 | Win7 | NoCallback_RevokedCertificate_NoRevocationChecking_Succeeds 6/7 | 20170607.01 | Win7 | PostSyncBlockingContentUsingChunkedEncoding_Success 6/13 | 20170613.02 | Win7 | SetDelegate_ConnectionSucceeds 6/14 | 20170614.01 | Win7 | PostAsync_CallMethod_StreamContent 6/15 | 20170615.03 | Win7 | NoCallback_RevokedCertificate_NoRevocationChecking_Succeeds 6/15 | 20170615.03 | Win8.1 | GetAsync_ServerNeedsNonStandardAuthAndSetCredential_StatusCodeUnauthorized 6/16 | 20170616.01 | Win7 | PostAsync_CallMethod_EmptyContent 9/26 | 20170926.06 | Win7 | ReadAsStreamAsync_ValidServerResponse_Success 10/10 | 20171010.03 | Win7 | GetStreamAsync_ReadToEnd_Success 10/11 | 20171011.02 | Win7 | PostAsync_CallMethod_StreamContent 10/20 | 20171020.01 | Win7 | SetDelegate_ConnectionSucceeds 10/22 | 20171022.01 | Win7 | MaxResponseContentBufferSize_ThrowsIfTooSmallForContent 10/22 | 20171022.02 | Win7 | MaxResponseContentBufferSize_ThrowsIfTooSmallForContent 10/23 | 20171023.02 | Win7 | ReadAsStreamAsync_ValidServerResponse_Success 10/25 | 20171025.04 | Win7 | GetAsync_ExpectedStatusCodeAndReason_Success 10/25 | 20171025.08 | Win7 | PostRewindableContentUsingAuth_NoPreAuthenticate_Success 10/25 | 20171025.08 | Win7 | PostAsync_CallMethod_StreamContent 10/27 | 20171027.03 | Win7 | PostUsingContentLengthSemantics_Success 10/30 | 20171030.01 | Win7 | PostRewindableContentUsingAuth_NoPreAuthenticate_Success 10/30 | 20171030.02 | Win7 | GetAsync_SupportedSSLVersion_Succeeds 10/31 | 20171030.05 | Win7 | SetDelegate_ConnectionSucceeds 11/3 | 20171103.07 | Win7 | GetAsync_ExpectedStatusCodeAndReason_Success 11/6 | 20171106.03 | Win7 | GetAsync_ExpectedStatusCodeAndReason_Success 11/6 | 20171106.01 | Win7 | PostRewindableContentUsingAuth_NoPreAuthenticate_Success 11/7 | 20171107.02 | Win7 | GetAsync_ExpectedStatusCodeAndReason_Success 11/9 | 20171109.04 | Win7 | ReadAsStreamAsync_ValidServerResponse_Success 11/15 | 20171115.02 | Win7 | PostAsync_EmptyContent_ContentTypeHeaderNotSent 11/15 | 20171115.03 | Win7 | GetAsync_TrailingHeaders_Ignored 11/18 | 20171118.04 | Win7 | GetStreamAsync_ReadZeroBytes_Success 11/20 | 20171120.01 | Win7 | GetAsync_TrailingHeaders_Ignored 11/20 | 20171120.02 | Win7 | GetAsync_AllowedSSLVersion_Succeeds 11/22 | 20171122.02 | Win7 | GetAsync_ExpectedStatusCodeAndReason_Success 11/23 | 20171123.02 | Win7 | GetAsync_ServerNeedsNonStandardAuthAndSetCredential_StatusCodeUnauthorized 11/24 | 20171124.01 | Win7 | GetAsync_ExpectedStatusCodeAndReason_Success 11/27 | 20171127.06 | Win7 | GetAsync_ExpectedStatusCodeAndReason_Success 11/28 | 20171128.01 | Win7 | SetDelegate_ConnectionSucceeds 11/28 | 20171128.07 | Win10 | UseCallback_NotSecureConnection_CallbackNotCalled 12/5 | 20171205.05 | Win7 | GetAsync_ExpectedStatusCodeAndReason_Success 12/5 | 20171205.06 | Win7 | GetAsync_ExpectedStatusCodeAndReason_Success 12/8 | 20171208.01 | Win7 | PostAsync_EmptyContent_ContentTypeHeaderNotSent 12/12 | 20171212.02 | Win7 | GetStreamAsync_ReadToEnd_Success 12/23 | 20171223.01 | Win7 | GetAsync_MaxLimited_ConcurrentCallsStillSucceed - [link](https://mc.dot.net/#/product/netcore/master/source/official%7E2Fcorefx%7E2Fmaster%7E2F/type/test%7E2Ffunctional%7E2Fcli%7E2F/build/20171223.01/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpClientHandler_MaxConnectionsPerServer_Test%7E2FGetAsync_MaxLimited_ConcurrentCallsStillSucceed(maxConnections:%203,%20numRequests:%202,%20secure:%20True)) 12/24 | 20171224.02 | Win7 | GetAsync_MaxLimited_ConcurrentCallsStillSucceed - [link](https://mc.dot.net/#/product/netcore/master/source/official%7E2Fcorefx%7E2Fmaster%7E2F/type/test%7E2Ffunctional%7E2Fcli%7E2F/build/20171224.02/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpClientHandler_MaxConnectionsPerServer_Test%7E2FGetAsync_MaxLimited_ConcurrentCallsStillSucceed(maxConnections:%203,%20numRequests:%202,%20secure:%20True)) 12/31 | 20171231.01 | Win7 | GetAsync_ServerNeedsNonStandardAuthAndSetCredential_StatusCodeUnauthorized - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20171231.01/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpClientHandlerTest~2FGetAsync_ServerNeedsNonStandardAuthAndSetCredential_StatusCodeUnauthorized(authHeaders:%20%5C%22WWW-Authenticate:%20CustomAuth%5C%5Cr%5C%5Cn%5C%22)) 1/5 | 20180105.01 | Win7 | SetDelegate_ConnectionSucceeds - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180105.01/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpClientHandler_DangerousAcceptAllCertificatesValidator_Test~2FSetDelegate_ConnectionSucceeds(acceptedProtocol:%20Tls,%20Tls11,%20Tls12,%20requestOnlyThisProtocol:%20True)) 1/10 | 20180110.03 | Win7 | GetAsync_ExpectedStatusCodeAndReason_Success - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180110.03/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpProtocolTests_Dribble~2FGetAsync_ExpectedStatusCodeAndReason_Success(statusLine:%20%5C%22HTTP~2F1.1%20201%20Created%5C%22,%20expectedStatusCode:%20201,%20expectedReason:%20%5C%22Created%5C%22)) 1/11 | 20180111.02 | Win7 | GetAsync_ExpectedStatusCodeAndReason_Success - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180111.02/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpProtocolTests_Dribble~2FGetAsync_ExpectedStatusCodeAndReason_Success(statusLine:%20%5C%22HTTP~2F1.1%20500%20Internal%20Server%20Error%5C%22,%20expectedStatusCode:%20500,%20expectedReason:%20%5C%22Inter)) 1/14 | 20180114.01 | Win7 | PostAsync_EmptyContent_ContentTypeHeaderNotSent - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180114.01/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.PostScenarioTest~2FPostAsync_EmptyContent_ContentTypeHeaderNotSent(serverUri:%20https:~2F~2Fcorefx-net.cloudapp.net~2FEcho.ashx)) 1/16 | 20180116.01 | Win7 | SetDelegate_ConnectionSucceeds - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180116.03/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpClientHandler_DangerousAcceptAllCertificatesValidator_Test~2FSetDelegate_ConnectionSucceeds(acceptedProtocol:%20None,%20requestOnlyThisProtocol:%20True)) 1/18 | 20180118.04 | Win7 | MaxResponseContentBufferSize_ThrowsIfTooSmallForContent - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180118.04/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpProtocolTests~2FMaxResponseContentBufferSize_ThrowsIfTooSmallForContent(maxSize:%202,%20contentLength:%201,%20exceptionExpected:%20False)) 1/19 | 20180119.02 | Win7 | GetAsync_AllowedSSLVersion_Succeeds - [link](https://mc.dot.net/#/product/netcore/master/source/official%7E2Fcorefx%7E2Fmaster%7E2F/type/test%7E2Ffunctional%7E2Fcli%7E2F/build/20180119.02/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpClientHandler_SslProtocols_Test%7E2FGetAsync_AllowedSSLVersion_Succeeds(acceptedProtocol:%20Tls11,%20requestOnlyThisProtocol:%20False)) 1/19 | 20180119.04 | Win7 | PostUsingContentLengthSemantics_Success - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180119.04/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.PostScenarioTest~2FPostUsingContentLengthSemantics_Success(serverUri:%20http:~2F~2Fcorefx-net.cloudapp.net~2FEcho.ashx)) 1/21 | 20180121.01 | Win7 | MaxResponseContentBufferSize_ThrowsIfTooSmallForContent - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180121.01/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpProtocolTests~2FMaxResponseContentBufferSize_ThrowsIfTooSmallForContent(maxSize:%202,%20contentLength:%201,%20exceptionExpected:%20False)) 1/22 | 20180122.02 | Win7 | ReadAsStreamAsync_ValidServerResponse_Success - only in [catastrophic failure logs](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180122.02/workItem/System.Net.Http.Functional.Tests/wilogs) 1/23 | 20180123.01 | Win7 | PostRewindableContentUsingAuth_NoPreAuthenticate_Success - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180123.01/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.PostScenarioTest~2FPostRewindableContentUsingAuth_NoPreAuthenticate_Success(serverUri:%20http:~2F~2Fcorefx-net.cloudapp.net~2FEcho.ashx%3Fauth=basic&user=user1&password=password1)) 1/23 | 20180123.01 | Win7 | GetAsync_ExpectedStatusCodeAndReason_Success - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180123.01/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpProtocolTests~2FGetAsync_ExpectedStatusCodeAndReason_Success(statusLine:%20%5C%22HTTP~2F1.1%20200%20OK%C2%80%5C%22,%20expectedStatusCode:%20200,%20expectedReason:%20%5C%22OK%3F%5C%22)) 1/23 | 20180123.01 | Win7 | GetAsync_MaxLimited_ConcurrentCallsStillSucceed - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180123.01/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpClientHandler_MaxConnectionsPerServer_Test~2FGetAsync_MaxLimited_ConcurrentCallsStillSucceed(maxConnections:%203,%20numRequests:%205,%20secure:%20False)) 1/25 | 20180125.01 | Win7 | PostAsync_ReuseRequestContent_Success - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180125.01/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpClientHandlerTest~2FPostAsync_ReuseRequestContent_Success(remoteServer:%20http:~2F~2Fcorefx-net.cloudapp.net~2FEcho.ashx)) 1/27 | 20180127.01 | Win7 | GetAsync_TrailingHeaders_Ignored - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180127.01/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpClientHandlerTest~2FGetAsync_TrailingHeaders_Ignored(includeTrailerHeader:%20True)) 1/27 | 20180127.04 | Win10 | PostRepeatedFlushContentUsingChunkedEncoding_Success - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180127.04/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.PostScenarioTest~2FPostRepeatedFlushContentUsingChunkedEncoding_Success(serverUri:%20http:~2F~2Fcorefx-net.cloudapp.net~2FEcho.ashx)) 1/27 | 20180127.04 | Win7 | GetAsync_RedirectResponseHasCookie_CookieSentToFinalUri - only in [catastrophic failure logs](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180127.04/workItem/System.Net.Http.Functional.Tests/wilogs) 1/29 | 20180129.05 | Win7 | GetAsync_MaxLimited_ConcurrentCallsStillSucceed - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180129.05/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpClientHandler_MaxConnectionsPerServer_Test~2FGetAsync_MaxLimited_ConcurrentCallsStillSucceed(maxConnections:%203,%20numRequests:%202,%20secure:%20True)) 1/30 | 20180130.05 | Win7 | PostEmptyContentUsingConflictingSemantics_Success - only in [catastrophic failure logs](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180130.05/workItem/System.Net.Http.Functional.Tests/wilogs) 1/31 | 20180131.05 | Win7 | SetDelegate_ConnectionSucceeds - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180131.05/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpClientHandler_DangerousAcceptAllCertificatesValidator_Test~2FSetDelegate_ConnectionSucceeds(acceptedProtocol:%20Tls,%20Tls11,%20Tls12,%20requestOnlyThisProtocol:%20True)) 2/1 | 20180201.01 | Win7 | PostUsingChunkedEncoding_Success - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180201.01/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.PostScenarioTest~2FPostUsingChunkedEncoding_Success(serverUri:%20https:~2F~2Fcorefx-net.cloudapp.net~2FEcho.ashx)) 2/1 | 20180201.01 | Win7 | GetAsync_MaxLimited_ConcurrentCallsStillSucceed - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180201.01/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpClientHandler_MaxConnectionsPerServer_Test~2FGetAsync_MaxLimited_ConcurrentCallsStillSucceed(maxConnections:%203,%20numRequests:%205,%20secure:%20False)) 2/1 | 20180201.05 | Win7 | GetAsync_ExpectedStatusCodeAndReason_Success - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180201.05/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpProtocolTests~2FGetAsync_ExpectedStatusCodeAndReason_Success(statusLine:%20%5C%22HTTP~2F1.1%20200%20OK%C2%80%5C%22,%20expectedStatusCode:%20200,%20expectedReason:%20%5C%22OK%3F%5C%22)) 2/5 | 20180205.01 | Win7 | SetDelegate_ConnectionSucceeds - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180205.01/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpClientHandler_DangerousAcceptAllCertificatesValidator_Test~2FSetDelegate_ConnectionSucceeds(acceptedProtocol:%20None,%20requestOnlyThisProtocol:%20False)) 2/6 | 20180206.04 | Win7 | SetDelegate_ConnectionSucceeds - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180206.04/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpClientHandler_DangerousAcceptAllCertificatesValidator_Test~2FSetDelegate_ConnectionSucceeds(acceptedProtocol:%20None,%20requestOnlyThisProtocol:%20False)) 2/6 | 20180206.05 | Win7 | UseCallback_NotSecureConnection_CallbackNotCalled - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180206.05/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpClientHandler_ServerCertificates_Test~2FUseCallback_NotSecureConnection_CallbackNotCalled) 2/8 | 20180208.01 | Win7 | 2x GetAsync_ExpectedStatusCodeAndReason_Success - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180208.01/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpProtocolTests~2FGetAsync_ExpectedStatusCodeAndReason_Success(statusLine:%20%5C%22HTTP~2F1.1%20200%20O%20K%5C%22,%20expectedStatusCode:%20200,%20expectedReason:%20%5C%22O%20K%5C%22)) and [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180208.01/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpProtocolTests~2FGetAsync_ExpectedStatusCodeAndReason_Success(statusLine:%20%5C%22HTTP~2F1.1%20600%20still%20valid%5C%22,%20expectedStatusCode:%20600,%20expectedReason:%20%5C%22still%20valid%5C%22)) 2/9 | 20180209.05 | Win7 | ThresholdExceeded_ThrowsException - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180209.05/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpClientHandler_MaxResponseHeadersLength_Test~2FThresholdExceeded_ThrowsException(responseHeaders:%20%5C%22HTTP~2F1.1%20200%20OK%5C%5Cr%5C%5CnContent-Length:%200%5C%5Cr%5C%5CnCustom-000%5C%22...,%20maxResponseHeadersLe)) 2/10 | 20180210.01 | Win7 | GetAsync_MaxLimited_ConcurrentCallsStillSucceed - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180210.01/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpClientHandler_MaxConnectionsPerServer_Test~2FGetAsync_MaxLimited_ConcurrentCallsStillSucceed(maxConnections:%203,%20numRequests:%205,%20secure:%20False)) 2/10 | 20180210.01 | Win7 | GetAsync_ExpectedStatusCodeAndReason_Success - only in [catastrophic failure logs](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180210.01/workItem/System.Net.Http.Functional.Tests/wilogs) 2/13 | 20180213.01 | Win7 | ThresholdExceeded_ThrowsException 2/20 | 20180220.08 | Win7 | The handle is invalid | GetAsync_ExpectedStatusCodeAndReason_Success 2/21 | 20180221.01 | Win7 | The handle is invalid | GetAsync_ExpectedStatusCodeAndReason_Success 2/25 | 20180225.01 | Win7 | HttpClientHandler_IncorrectCredentials_Fails - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180225.01/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpClientHandler_Authentication_Test~2FHttpClientHandler_IncorrectCredentials_Fails(authenticateHeader:%20%5C%22WWW-Authenticate:%20Digest%20realm=%5C%5C%5C%22hello%5C%5C%5C%22,%20nonce=%5C%5C%5C%22%5C%22...)) 2/25 | 20180225.02 | Win10 | HttpClientHandler_Authentication_Succeeds - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180225.02/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpClientHandler_Authentication_Test~2FHttpClientHandler_Authentication_Succeeds(authenticateHeader:%20%5C%22Basic%20something,%20Digest%20something%5C%22,%20result:%20False)) 2/26 | 20180226.04 | Win7 | GetAsync_AllowedSSLVersion_Succeeds - [link](https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180226.04/workItem/System.Net.Http.Functional.Tests/analysis/xunit/System.Net.Http.Functional.Tests.HttpClientHandler_SslProtocols_Test~2FGetAsync_AllowedSSLVersion_Succeeds(acceptedProtocol:%20Tls11,%20requestOnlyThisProtocol:%20True)) 2/28 | 20180228.07 | Win7 | ThresholdExceeded_ThrowsException 3/1 | 20180301.01 | Win7 | GetAsync_ExpectedStatusCodeAndReason_Success 3/2 | 20180302.06 | Win7 | ReadAsStreamAsync_ValidServerResponse_Success 3/4 | 20180304.01 | Win7 | ReadAsStreamAsync_ValidServerResponse_Success 3/7 | 20180307.03 | Win7 | GetAsync_MaxLimited_ConcurrentCallsStillSucceed 3/7 | 20180307.03 | Win7 | GetAsync_ExpectedStatusCodeAndReason_Success 3/7 | 20180307.04 | Win7 | ReadAsStreamAsync_ValidServerResponse_Success 3/8 | 20180308.01 | Win7 | GetAsync_ExpectedStatusCodeAndReason_Success 3/8 | 20180308.09 | Win7 | GetAsync_SetCookieContainer_CookieSent 3/10 | 20180310.02 | Win7 | GetAsync_ExpectedStatusCodeAndReason_Success 3/14 | 20180314.01 | Win7 | GetAsync_ExpectedStatusCodeAndReason_Success 3/17 | 20180317.03 | Win7 | GetAsync_MaxLimited_ConcurrentCallsStillSucceed 3/22 | 20180322.06 | Win7 | ThresholdExceeded_ThrowsException #### Similar failure with IOException wrapped in the middle ``` System.Net.Http.HttpRequestException : Error while copying content to a stream. ---- System.IO.IOException : The write operation failed, see inner exception. -------- System.Net.Http.WinHttpException : The handle is invalid ``` Day | Build | OS | Test -- | -- | -- | -- 11/17 | 20171117.04 | Win7 | PostUsingContentLengthSemantics_Success 12/2 | 20171202.01 | Win7 | PostAsync_ReuseRequestContent_Success 9233 area-System.Net Remove keepallprojectreferences from system.net.http and system.net.security tests Private testing has shown that the surface area discrepancy between Windows / Linux has been resolved, per @stephentoub 's suspicion. This changes removes the property which keeps tests from compiling against packages for these test libraries. Fixes issue https://github.com/dotnet/corefx/issues/8482 /cc @stephentoub @weshaggard 9234 area-System.Net NTLM credentials not sent by client when there are multiple WWW-Authenticate headers "We have a strange case after migrating from RC1 to RC2. We use HttpClient with default windows credentials authentication. The code works fine with one server, but does not work with another server. In the second case client just receives 401 error and does not start NTLM handshake. The only difference that I spotted was that second server sends two WWW-Authenticate headers (one with basic, another with HTML). When I intercepted the response with Fiddler, and removed ""WWW-Authenticate"" header with basic authorization, everything worked fine, client started NTLM handshake, and finally authorized. ```c# var handler = new HttpClientHandler(); handler.UseDefaultCredentials = true; var client = new HttpClient(handler); HttpResponseMessage response = await client.GetAsync(url); ``` Request/response from second server: ``` GET https://my-server:8081/tfs/DefaultCollection/_apis/projects?api-version=1.0 HTTP/1.1 Connection: Keep-Alive Accept-Encoding: gzip, deflate Host: my-server:8081 HTTP/1.1 401 Unauthorized Content-Type: text/html Server: Microsoft-IIS/8.5 Access-Control-Allow-Origin: * Access-Control-Max-Age: 3600 Access-Control-Allow-Methods: OPTIONS,GET,POST,PATCH,PUT,DELETE Access-Control-Expose-Headers: ActivityId,X-TFS-Session,X-MS-ContinuationToken Access-Control-Allow-Headers: authorization X-FRAME-OPTIONS: SAMEORIGIN Set-Cookie: Tfs-SessionId=XXX; path=/; secure Set-Cookie: Tfs-SessionActive=2016-06-07 20:44:23Z; path=/; secure WWW-Authenticate: Basic realm=""my-server"" WWW-Authenticate: NTLM P3P: CP=""CAO DSP COR ADMa DEV CONo TELo CUR PSA PSD TAI IVDo OUR SAMi BUS DEM NAV STA UNI COM INT PHY ONL FIN PUR LOC CNT"" X-Content-Type-Options: nosniff Date: Tue, 07 Jun 2016 20:44:22 GMT Content-Length: 1293 ``` OS: windows 10 x64, app running on coreclr RC2 " 9237 area-System.IO Discuss adding System.IO.Compression static shortcuts "# Problem I'd like to see some better support for compressing data in different forms quickly. Say you have a string right now - to compress it you have to do something like this: ``` string iWantToCompress = ""thisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokaythisisalongstringokay?""; byte[] bytesToCompress = Encoding.UTF8.GetBytes(iWantToCompress); using (var streamWithCompressed = new MemoryStream()) { using (var compressor = new DeflateStream(streamWithCompressed, CompressionMode.Compress, true)) { compressor.Write(bytesToCompress, 0, bytesToCompress.Length); } byte[] compressed = streamWithCompressed.ToArray(); } ``` # Proposal It would be nice if we could compress or decompress a string more intuitively, like so: ``` byte[] compressed = Deflate.Compress(iWantToCompress); ``` This would be somewhat similar to what we did in FileSystem by having`File.WriteAll*` operations to circumvent the need for a `FileStream`. # Design ### Deflate / Zlib / GZIP Deflate, Zlib, and GZip are all variants of the DEFLATE algorithm. The difference between them is that Deflate does not have a header, while ZLib and GZip have their own distinct headers. We currently support Deflate and GZip via DeflateStream and GZipStream, though there is [an issue for adding Zlib header support](https://github.com/dotnet/corefx/issues/7570). Do we add string support for all three types? If so, how? Some options: - Have one `Compression` static class with methods `Compress` and `Decompress` that take in an optional `HeaderType` enum with values `None`, `ZLib`, and `GZip`. The default would be None. ``` string compressed, decompressed; compressed = Compression.Compress(""stringToCompress"", HeaderType.GZip); compressed = Compression.Compress(""stringToCompress""); // uses Deflate i.e. no header is written decompressed = Compression.Decompress(compressed); // decompression can detect and interpret the header for any of the three DEFLATE types, so specifying it explicitly would override that behavior and force the header to conform to the given type ``` - Have 2-3 static classes `Deflate`, `GZip`, and `ZLib` that contain their own `Compress` and `Decompress` methods. ``` string compressed, decompressed; compressed = GZip.Compress(""stringToCompress""); compressed = Deflate.Compress(""stringToCompress""); decompressed = Deflate.Decompress(compressed); ``` - Add static `Compress` and `Decompress` methods to the existing `DeflateStream` and `GZipStream` classes: ``` string compressed, decompressed; compressed = GZipStream.Compress(""stringToCompress""); compressed = DeflateStream.Compress(""stringToCompress""); decompressed = DeflateStream.Decompress(compressed); ``` ### Parameters There should be three versions of Compress + three versions of Decompress: ``` Compress(string stringToCompress); Compress(string stringToCompress, Encoding encoding); Compress(byte[] bytesToCompress); Decompress(string stringToDecompress); Decompress(string stringToDecompress, Encoding encoding); Decompress(byte[] bytesToDecompress); ``` though I could see the value for `stream` equivalents (similar to https://github.com/dotnet/corefx/issues/9222) as well: ``` Compress(Stream streamToCompress); Decompress(Stream streamToCompress); ``` ### Return value Three sensible options: - Return a string with the results of the operation. :-1: - Return a byte[] with the results of the operation - Return a stream that can be read for the results of the operation. - The return type varies based on the parameter type e.g. `Compress(string)` returns a string, `Compress(byte[])` returns a byte[], etc. :-1: # Perf Using these shortcuts would circumvent the need for: - an Underlying stream (e.g. a MemoryStream) to hold the results of the (de)compression. - a DeflateStream/GZipStream object - A Deflater/Inflater object since we would be able to directly hit the ZLibStream SetInput/GetOutput methods because we know the entirety of the item being compressed/decompressed. The downside to this is that the thing being (de)compressed would have to first be entirely in memory, but for a string or byte[] array that isn't an issue. There would be a net memory savings of an object already in memory since we wouldn't need to allocate the internal arrays of a DeflateStream object. # Downsides - Every compress/decompress opens its own ZLibStreamHandle. For a lot of repeated operations this would be a performance hit. - Adding fine-grained Compression support (e.g. CompressionLevel) would be too clunky to be worthwhile - Adds a potentially large amount of new API " 9240 area-System.Net Add note about Unix HTTP header handling to release notes "To add to release notes: ### HttpClient handler header parsing strictness on Linux and OS X HttpClient response header parsing logic on Linux and on OS X fairly strictly follows the RFC. Certain ""invalid"" headers, such as with spaces between the header name and the colon, might be accepted by other browsers or even by HttpClient on Windows, but could be rejected when run on Linux or on OS X. " 9244 area-System.Net [release/1.0.0] HttpClientHandler tests failed with SSL Connect error on Debian and OSX In both master and release, hence tagging this issue for RTM, pending investigation. ``` MESSAGE: System.Net.Http.HttpRequestException : An error occurred while sending the request.\n---- System.Net.Http.CurlException : SSL connect error +++++++++++++++++++ STACK TRACE: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at System.Net.Http.HttpClient.d__58.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at System.Net.Http.Functional.Tests.HttpClientHandlerTest.d__69.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error) at System.Net.Http.CurlHandler.MultiAgent.FinishRequest(StrongToWeakReference`1 easyWrapper, CURLcode messageResult) ``` Test runs here http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/release_1.0.0/job/debian8.4_debug/1/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/release_1.0.0/job/debian8.4_release/1/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/release_1.0.0/job/osx_debug/78/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/debian8.4_release/24/testReport/ 9245 area-System.Data Cancelling an async SqlClient operation throws SqlException, not TaskCanceledException When using a cancellation token to cancel an SqlClient async operation, an SqlException is thrown rather than TaskCanceledException. This seems like problematic behavior, here's some analysis. On the problematic side, standard async APIs generally throw TaskCanceledException, and SqlClient is doing something different and therefore unexpected. Also, as a result, canceled SqlClient tasks don't have status Canceled, they're Faulted instead. This makes differentiating cancellations from real exceptions more difficult, and the problem is compounded if the SqlClient call is just part of a larger async operation (which again, will be faulted instead of canceled unless some manual specific handling is involved). The argument for the current behavior seems to be that all of SqlClient's server and network errors are raised as SqlException, making it easy to catch all database errors under a single exception type. On the other hand, it seems that cancellation isn't really an error condition as it's been requested by the user and is expected to occur. The TaskCanceledException is simply a mechanism for conveying the cancellation up the stack. For the record, this was originally reported by @mikkeljohnsen for Npgsql in https://github.com/npgsql/npgsql/issues/1146. Whatever is decided here for SqlClient will also be adopted for Npgsql (which currently behaves like SqlClient in this respect). 9248 area-System.Security X509Certificates.Tests.X509FilesystemTests.X509Store_AddAfterDispose This appears to be a test issue. Please investigate and confirm. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/release_1.0.0/job/fedora23_release/lastCompletedBuild/testReport/System.Security.Cryptography.X509Certificates.Tests/X509FilesystemTests/X509Store_AddAfterDispose/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/release_1.0.0/job/fedora23_debug/lastCompletedBuild/testReport/System.Security.Cryptography.X509Certificates.Tests/X509FilesystemTests/X509Store_AddAfterDispose/ ``` MESSAGE: System.Security.Cryptography.CryptographicException : The owner of '/mnt/resource/j/workspace/dotnet_corefx/release_1.0.0/fedora23_release/tempHome/.dotnet/corefx/cryptography/x509stores/teststorea5d8b5c4bda94ae2bdb99f5cc6afdcdd' is not the current user. +++++++++++++++++++ STACK TRACE: at Internal.Cryptography.Pal.DirectoryBasedStoreProvider.EnsureDirectoryPermissions(String path, UInt32 userId) at Internal.Cryptography.Pal.DirectoryBasedStoreProvider.Add(ICertificatePal certPal) at System.Security.Cryptography.X509Certificates.Tests.X509FilesystemTests.<>c.b__7_0(X509Store store, String storeDirectory) at System.Security.Cryptography.X509Certificates.Tests.X509FilesystemTests.RunX509StoreTest(Action`2 testAction) ``` ``` MESSAGE: System.Security.Cryptography.CryptographicException : The owner of '/mnt/resource/j/workspace/dotnet_corefx/release_1.0.0/fedora23_debug/tempHome/.dotnet/corefx/cryptography/x509stores/teststore99ac8254ea77466ebf1bf59151bb561d' is not the current user. +++++++++++++++++++ STACK TRACE: at Internal.Cryptography.Pal.DirectoryBasedStoreProvider.EnsureDirectoryPermissions(String path, UInt32 userId) at Internal.Cryptography.Pal.DirectoryBasedStoreProvider.Add(ICertificatePal certPal) at System.Security.Cryptography.X509Certificates.X509Store.Add(X509Certificate2 certificate) at System.Security.Cryptography.X509Certificates.Tests.X509FilesystemTests.<>c.b__7_0(X509Store store, String storeDirectory) at System.Security.Cryptography.X509Certificates.Tests.X509FilesystemTests.RunX509StoreTest(Action`2 testAction) at System.Security.Cryptography.X509Certificates.Tests.X509FilesystemTests.X509Store_AddAfterDispose() ``` 9249 area-Infrastructure VSO build should fail if package upload also fails "Currently all the new build pipeline results are ""green"" even though all builds have failed to publish since MyGet.org is returning HTTP 500. The pipeline should actually catch this and not report success. " 9252 area-System.Security [dev/cms_unix] EnvelopedCms Decode different behavior between Framework and Core Decode on Framework returns a CryptographicAttributeObjectCollection for unprotected attributes that has a CryptographicAttributeObject for every Oid listed in the encoding, even if it holds no attributes (if it's given an empty set for that oid). However Core won't create an object for the oid if the set is empty. Thus EnvelopedCms.UnprotectedAttributes.Count will return different things on framework and core. 9253 area-System.Globalization InvalidOperationException: Unknown error '3' from string.Normalize CentOS 7 https://github.com/aspnet/Home/issues/1536 ``` Unhandled Exception: System.InvalidOperationException: Unknown error '3'. at System.StringNormalizationExtensions.IsNormalized(String value, NormalizationForm normalizationForm) at Microsoft.AspNetCore.Server.Kestrel.Http.PathNormalizer.NormalizeToNFC(String path) ``` Windows Docker: ``` System.InvalidOperationException: Unknown error '3'. at System.StringNormalizationExtensions.Normalize(String value, NormalizationForm normalizationForm) at Microsoft.AspNetCore.Identity.UpperInvariantLookupNormalizer.Normalize(String key) ``` 9257 area-Meta Instructions to run perf tests need to be updated The instructions provided to run perf tests here https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/performance-tests.md need to be modified now that we have enabled execution of perf tests using dotnet cli. We also need to remove dependencies mentioned there that are no longer applicable. 9258 area-System.Net Initial System.Net.WebSockets.Client implementation on Unix This PR provides an initial implementation of the client WebSockets library for Unix. It's actually not Unix-specific, and rather is a managed implementation on top of System.Net.Sockets and System.Net.Security. I opted to start with a managed implementation as there does not appear to be a universally-adopted native implementation we can utilize. I looked to see if we could just adopt the Mono implementation, but it's based on HttpWebRequest, which in corefx is built on top of HttpClient, which isn't particularly amenable to being used for websockets (and libcurl does not have websockets support). This is passing all of the unit/functional tests, including a few more I added, though I'm fairly confident that there are additional bugs lurking (i.e. I assume there's going to be a bug tail here). I'm opting to check this in as an initial implementation now in hopes that others will be able to help with finding and fixing issues. Along with that, I've spent close to zero time looking at performance; I'm sure there are opportunities to make meaningful improvements, but for now I've opted for simplicity and functionality. There are also two features I didn't implement: proxies and credentials... but it doesn't look like either the WinHttp or WinRT implementations pay attention to those either. cc: @ericeil, @cipop, @davidsh, @bartonjs Fix https://github.com/dotnet/corefx/issues/2486 9260 area-System.Net Update PlatformNotSupportedException message for Socket.Connect on Unix Just the exception message improvement from https://github.com/dotnet/corefx/pull/9218. 9261 area-System.Net Port to release/1.0.0: Update PlatformNotSupportedException message for Socket.Connect on Unix Port https://github.com/dotnet/corefx/pull/9260 to release/1.0.0 9265 area-System.IO AccessViolationException in zlib on CLI Windows build ## Repro steps: - step 1: get a CLI repo - step 1.a: add a remote for github.com/dotnet/cli - step 2: git checkout -b preview2 upstream/rel/1.0.0-preview2 - In case the cli repo moves forward, and somehow that causes the AV to no longer occur: use this sha1: 3c9f8dd99be5918a504f34260f4d6016a086ea99 - step 3: build.cmd -Targets Prepare,Compile - that should succeed - step 4: build.cmd -Targets Prepare,InitPackage,GenerateVersionBadge,GenerateZip,GenerateMsis,GenerateNugetPackages - that will hit the AV ## Notes I’ve uploaded a mini dump with heap: `\\scratch2\scratch\eerhardt\dotnet.dmp` I was able to find clrcompression symbols on the MyGet symbol server: https://dotnet.myget.org/F/dotnet-core/symbols/ Unfortunately, talking with @dagood we are not able to locate the coreclr.pdb file matching the build from yesterday’s CoreCLR build: 1.0.24207.2. I still have the process broken on my machine with an attached debugger, here is the callstack: ``` > clrcompression.dll!fizzle_matches(internal_state * s, match * current, match * next) Line 121 C clrcompression.dll!deflate_medium(internal_state * s, int flush) Line 265 C clrcompression.dll!deflate(z_stream_s * strm, int flush) Line 982 C 00007ff7c22e8403() Unknown 0000020f85a48610() Unknown 00000016a837cb40() Unknown 0000020f876fd5b8() Unknown 0000020f876ff710() Unknown 0000be2449de0620() Unknown coreclr.dll!00007ff8220276b0() Unknown ``` line 121 is: ``` C static void fizzle_matches(deflate_state *s, struct match *current, struct match *next) { IPos limit; unsigned char *match, *orig; int changed = 0; struct match c,n; /* step zero: sanity checks */ if (current->match_length <= 1) return; match = s->window - current->match_length + 1 + next->match_start ; orig = s->window - current->match_length + 1 + next->strstart ; /* quick exit check.. if this fails then don't bother with anything else */ if (zlikely(*match != *orig)) <<<<< HERE return; ``` /cc @ianhays @stephentoub @Petermarcu 9268 area-System.Data Query: options for connecting to Oracle databases Hi I am considering using the cross platform dot net framework for building a major new application. But I have hit an issue - I am unsure whether the current corefx supports connecting to Oracle databases or not. I need to be able to support multiple database backends, including Oracle and SQL Server. Thanks 9270 area-System.Net [Release/1.0.0]HttpClientHandlerTest.PostAsync_CallMethod_StreamContent failed on fedora debug This test is failing intermittently between builds, filing it under RTM for investigation. ``` MESSAGE: System.Threading.Tasks.TaskCanceledException : A task was canceled. +++++++++++++++++++ STACK TRACE: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at System.Net.Http.HttpClient.d__58.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at System.Net.Http.Functional.Tests.HttpClientHandlerTest.d__55.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/release_1.0.0/job/fedora23_debug/3/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/release_1.0.0/job/fedora23_debug/5/ 9272 area-System.Net [Release/1.0.0]System.Net.Security.Tests failing on Opensuse "``` 15:50:21 Copyright (C) 2014 Outercurve Foundation. 15:50:21 15:50:21 Discovering: System.Net.Security.Unit.Tests 15:50:21 Discovered: System.Net.Security.Unit.Tests 15:50:21 Starting: System.Net.Security.Unit.Tests 15:50:22 Finished: System.Net.Security.Tests 15:50:22 15:50:22 === TEST EXECUTION SUMMARY === 15:50:22 System.Net.Security.Tests Total: 97, Errors: 0, Failed: 0, Skipped: 3, Time: 3.204s 15:50:22 Finished running tests. End time=22:51:38. Return value was 0 15:50:22 /mnt/resource/j/workspace/dotnet_corefx/release_1.0.0/opensuse13.2_debug/Tools/tests.targets(202,5): warning MSB3073: The command ""/mnt/resource/j/workspace/dotnet_corefx/release_1.0.0/opensuse13.2_debug/bin/tests/Linux.AnyCPU.Debug/System.Net.Security.Tests/netcoreapp1.0/RunTests.sh /mnt/resource/j/workspace/dotnet_corefx/release_1.0.0/opensuse13.2_debug/packages/"" exited with code -1. [/mnt/resource/j/workspace/dotnet_corefx/release_1.0.0/opensuse13.2_debug/src/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj] 15:50:22 /mnt/resource/j/workspace/dotnet_corefx/release_1.0.0/opensuse13.2_debug/Tools/tests.targets(211,5): error : One or more tests failed while running tests from 'System.Net.Security.Tests' please check log for details! ``` " 9274 area-System.Runtime "OS X is now branded as ""macOS""" "**Update (6/13):** Apple has officially announced that ""OS X"" is now ""macOS"". --- It appears highly likely that ""OS X"" will be rebranded as ""macOS"" next week at WWDC. - http://9to5mac.com/2016/06/08/latest-hint-at-macos-rebranding-of-os-x-appears-in-new-app-store-guidelines/ - https://daringfireball.net/linked/2016/03/30/macos Is it too late to tweak the naming of new .NET Core APIs with `OSX`, or will the first version of .NET Core RTM with obsolete naming? e.g. [`RuntimeInformation.IsOSPlatform(OSPlatform.OSX)`](https://github.com/dotnet/corefx/blob/d0dc5fc099946adc1035b34a8b1f6042eddb0c75/src/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/OSPlatform.cs#L13) -> `OSPlatform.Mac` or `OSPlatform.MacOS` or `OSPlatform.Darwin` or ? " 9276 area-System.Net Race condition in HttpClient on Unix when redirecting a post request https://github.com/aspnet/MusicStore/pull/683 9278 area-Infrastructure We should archive msbuild.* even on failed CI jobs Today we only archive msbuild log files if the job completes successfully, but the logs have value in cases where the job fails as well. 9282 area-System.Net Change how request content is read in libcurl libcurl wants to be able to call back to CurlHandler at arbitrary times to ask it to seek in the request content stream. This can happen for redirects, for auth challenges, etc. Handling this has been a challenge due to the way HttpContent is designed. HttpContent provides two modes for accessing the data via Streams: - Push: You call CopyToAsync(Stream, TransportContext) to have the data from the HttpContent copied into the target stream. - Pull: You call ReadAsStreamAsync to get a stream that represents the data in the HttpContent, and you can read from that. The pull model is ideal for libcurl. It allows us to get a stream which we can jump around in if it's seekable, and we can request a new stream if it's not seekable. The push model is challenging, as we're forced to put in plcae an intermediary, a push-pull adapter that let's us effectively read from a type that's trying to write to us. There is however an issue with the pull model. With the push model, StreamContent's CopyToAsync tracks whether the stream has already been accessed, and if it has and if it's non-seekable, trying to call CopyToAsync again throws to alert you that rewinding simply isn't possible. The pull StreamContent's ReadAsStreamAsync, however, does not. This means that if you get a non-seekable stream and you call ReadAsStreamAsync again, you get back the same stream (or, rather, a read-only wrapper around the same stream) that is at the existing position rather than the original position. Then resending that content will end up sending less data than it should have, resulting in failure, just not abruptly. That issue caused us to go down the path of the more challenging push model and trying to use CopyToAsync. However, recently that's been shown to have even worse effects. We don't have the ability to cancel CopyToAsync, which means that if the first copy is still in-flight when we try to seek, we have no choice but to fail, even if the stream is actually seekable, as most are (e.g. memory streams, file streams, etc.) This can happen deterministically in cases where libcurl decides to redirect before it's fully sent the request content, but it's also prone to race conditions even for cases where the request content is fully sent but the copy hasn't been officially marked as complete by the time libcurl tries to redirect. ASP.NET recently began hitting this frequently on some machines in their lab runs. While there's no perfect solution, the best solution is to go with the one that's the simplest code, the fastest code, and the deterministic outcome: the pull model. This commit deletes a whole bunch of code that was there in support of the push model, adds just a bit of code to enable the pull model, and fixes up a couple of tests that were written to expect the push model. Fixes https://github.com/dotnet/corefx/issues/9276 cc: @davidsh, @cipop, @ericeil, @bartonjs, @mconnew, @JunTaoLuo @mconnew, is this going to cause any issues for WCF? @JunTaoLuo, can you help verify that this makes the MusicStore issue go away and that it doesn't introduce any other such issues? @davidsh, I know this isn't the model that was intended for an HttpClientHandler consuming HttpContent, but I don't see any way to do so correctly/without race conditions given the APIs available. 9293 area-Infrastructure Fedora /mnt/resource is an NTFS mount, making permissions checks fail ``` $ mount | grep resource /dev/sdb1 on /mnt/resource type fuseblk (rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096) ``` fuseblk is NTFS, which doesn't support Unix mode-based permissions; and leads to things like the X509Store permissions set/checks failing. 9294 area-System.Runtime Allow setting the stack trace on deserialized exception object ## Proposal Provide a setter property for SourceExceptionStackTrace in ExceptionDispatchInfo class ```C# namespace System.Runtime.ExceptionServices { public sealed class ExceptionDispatchInfo { public string SourceExceptionStackTrace { get; set; } } } ``` ## Details Exception serialization scenario is challenging as there is no easy way can deserialize an exception object and include the stack trace in the de-serialized object. The reason is Exception lack supporting a StackTrace setter property or providing a constructor that can take stack trace as a paramter. The net core supports binary serialization which can serialize and de-serialize the exception objects including the stack trace but this approach is not helping much for the following reasons: - Net core is not promising supporting binary serialization across different net core versions (or with other targets like full framework). - Other serialization engines (e.g. DateContractSerialization) will not benefit from the binary serialization and need to have a way to fully deserialize exception objects. - When binary deserialize exception object which include a stack trace and then throw this de-serialized object, the stack trace after throwing is the one reflect the place where we threw this exception but the original de-serialized stack trace will be lost. The original stack trace will be preserved only in case re-throw previously thrown exception. The following code demonstrate this issue ```C# try { throw new Exception(); } catch (Exception e) { using (MemoryStream ms = new MemoryStream(100)) { BinaryFormatter formatter = new BinaryFormatter(); formatter.Serialize(ms, e); // reset the stream ms.Position = 0; var excp = (Exception)formatter.Deserialize(ms); Console.WriteLine(excp.StackTrace); // this will show the right original serialized stack try { throw excp; } catch (Exception excp1) { Console.WriteLine(excp1.StackTrace); } // this will show the new stack but the old de-serialized stack will be lost. throw; // the thrown exception will include the original exception stack in “e” object } } ``` To support the scenario, we need to add SourceExceptionStackTrace property to ExceptionDispatchInfo class. The following code demonstrate how ExceptionDispatchInfo can be used to get the exception with the original serialized stack trace and also how to throw the exception with the new stack trace. ```C# ExceptionDispatchInfo edi = ExceptionDispatchInfo.Capture(deserializedException); edi.SourceExceptionStackTrace = originalStackTrace; Exception deserializedExceptionWithOriginalStackTrace = edi.SourceException; edi.Throw(); ``` ## Behavior ExceptionDispatchInfo.SourceExceptionStackTrace The setter of this property will overwrite the current source trace on the source exception. the setter will not affect any other properties in the source exception object. The getter will return the stack trace from the source exception. this can be empty string if there is no stack trace in the source #exception ## Alternative Design We can think in adding a setter for Exception.StackTrace property or expose a method like Exception AddPreservedStack(string stackTrace)) ```C# namespace System { public class Exception : ISerializable, _Exception { public virtual String StackTrace { get; set; } } } ``` I got some feedback from different people that they don't like this option as in the main scenarios nobody should set the stack trace on the exception objects and this option can cause confusion and people misuse it. 9296 area-System.Net Test failure: WebSockets.Client.Tests.SendReceiveTest.SendReceive_PartialMessage_Success (server: wss://corefx-net.cloudapp.net/WebSocket/EchoWebSocket.ashx) http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/release_1.0.0/job/outerloop_windows_nt_debug/lastCompletedBuild/testReport/System.Net.WebSockets.Client.Tests/ClientWebSocketTest/SendReceive_PartialMessage_Success_server__wss___corefx_net_cloudapp_net_WebSocket_EchoWebSocket_ashx_/ ``` MESSAGE: System.Net.Http.WinHttpException : The server returned an invalid or unrecognized response +++++++++++++++++++ STACK TRACE: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at System.Net.WebSockets.WinHttpWebSocket.d__30.MoveNext() in d:\j\workspace\outerloop_win---b9d0e81a\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WinHttpWebSocket.cs:line 458 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at System.Net.WebSockets.Client.Tests.ClientWebSocketTest.d__16.MoveNext() in d:\j\workspace\outerloop_win---b9d0e81a\src\System.Net.WebSockets.Client\tests\ClientWebSocketTest.cs:line 195 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` 9304 area-System.Net "UDP Socket.ConnectAsync(IPAddress, int) fails with ""An invalid argument was supplied""" "Related to https://github.com/dotnet/corefx/issues/4968... This code works fine on desktop: ``` C# var c = new UdpClient(); c.Client.EndConnect(c.Client.BeginConnect(IPAddress.Parse(""114.114.114.114""), 53, null, null)); ``` but this fails in corefx: ``` [Fact] public async Task ConnectAsync_IPAddress_Success() { using (var c = new UdpClient()) { await c.Client.ConnectAsync(IPAddress.Parse(""114.114.114.114""), 53); } } ``` with the error: ``` System.Net.Sockets.Tests.UdpClientTest.ConnectAsync_IPAddress_Success [FAIL] System.Net.Sockets.SocketException : An invalid argument was supplied Stack Trace: c:\Users\stoub\Source\repos\corefx\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs(5774,0): at System.Net.Sockets.Socket.BeginConnectEx(EndP oint remoteEP, Boolean flowContext, AsyncCallback callback, Object state) c:\Users\stoub\Source\repos\corefx\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs(2296,0): at System.Net.Sockets.Socket.BeginConnect(EndPoi nt remoteEP, AsyncCallback callback, Object state) c:\Users\stoub\Source\repos\corefx\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs(2411,0): at System.Net.Sockets.Socket.BeginConnect(IPAddr ess address, Int32 port, AsyncCallback requestCallback, Object state) c:\Users\stoub\Source\repos\corefx\src\System.Net.Sockets\src\System\Net\Sockets\SocketTaskExtensions.cs(43,0): at System.Net.Sockets.SocketTaskExte nsions.<>c.b__3_0(IPAddress targetAddress, Int32 targetPort, AsyncCallback callback, Object state) at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl[TArg1,TArg2](Func`5 beginMethod, Func`2 endFunction, Action`1 endAction, TArg1 arg1, TArg2 arg2, Object state, TaskCreationOptions creationOptions) at System.Threading.Tasks.TaskFactory.FromAsync[TArg1,TArg2](Func`5 beginMethod, Action`1 endMethod, TArg1 arg1, TArg2 arg2, Object state) c:\Users\stoub\Source\repos\corefx\src\System.Net.Sockets\src\System\Net\Sockets\SocketTaskExtensions.cs(42,0): at System.Net.Sockets.SocketTaskExte nsions.ConnectAsync(Socket socket, IPAddress address, Int32 port) c:\Users\stoub\Source\repos\corefx\src\System.Net.Sockets\tests\FunctionalTests\UdpClientTest.cs(93,0): at System.Net.Sockets.Tests.UdpClientTest.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` " 9320 area-System.Net Expected !isStopped assert in sockets on Fedora http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_fedora23_debug_prtest/1/consoleText ``` Expected !IsStopped at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) at System.Diagnostics.Debug.Assert(Boolean condition, String message) at System.Net.Sockets.SocketAsyncContext.OperationQueue`1.Enqueue(TOperation operation) at System.Net.Sockets.SocketAsyncContext.TryBeginOperation[TOperation](OperationQueue`1& queue, TOperation operation, SocketEvents events, Boolean maintainOrder, Boolean& isStopped) at System.Net.Sockets.SocketAsyncContext.ReceiveFromAsync(Byte[] buffer, Int32 offset, Int32 count, SocketFlags flags, Byte[] socketAddress, Int32 socketAddressLen, Action`5 callback) at System.Net.Sockets.SocketAsyncContext.ReceiveAsync(Byte[] buffer, Int32 offset, Int32 count, SocketFlags flags, Action`5 callback) at System.Net.Sockets.SocketPal.ReceiveAsync(SafeCloseSocket handle, Byte[] buffer, Int32 offset, Int32 count, SocketFlags socketFlags, OverlappedAsyncResult asyncResult) at System.Net.Sockets.Socket.DoBeginReceive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, OverlappedAsyncResult asyncResult) at System.Net.Sockets.Socket.BeginReceive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, SocketError& errorCode, AsyncCallback callback, Object state) at System.Net.Sockets.Socket.BeginReceive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, AsyncCallback callback, Object state) at System.Net.Sockets.NetworkStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state) at System.Net.Sockets.NetworkStream.<>c.b__58_0(Byte[] bufferArg, Int32 offsetArg, Int32 sizeArg, AsyncCallback callback, Object state) at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl[TArg1,TArg2,TArg3](Func`6 beginMethod, Func`2 endFunction, Action`1 endAction, TArg1 arg1, TArg2 arg2, TArg3 arg3, Object state, TaskCreationOptions creationOptions) at System.Threading.Tasks.TaskFactory.FromAsync[TArg1,TArg2,TArg3,TResult](Func`6 beginMethod, Func`2 endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, Object state) at System.Net.Sockets.NetworkStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 size, CancellationToken cancellationToken) at System.IO.Stream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count) at System.IO.StreamApmExtensions.BeginRead(Stream stream, Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state) at System.Net.FixedSizeReader.StartReading() at System.Net.FixedSizeReader.AsyncReadPacket(AsyncProtocolRequest request) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.WriteCallback(IAsyncResult transportResult) at System.Threading.Tasks.TaskToApm.<>c__DisplayClass3_0.b__0() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask) at System.Threading.Tasks.Task.FinishContinuations() at System.Threading.Tasks.Task`1.TrySetResult(TResult result) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) at System.Net.LazyAsyncResult.Complete(IntPtr userToken) at System.Net.ContextAwareResult.CompleteCallback() at System.Net.ContextAwareResult.<>c.b__17_0(Object s) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Net.ContextAwareResult.Complete(IntPtr userToken) at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken) at System.Net.LazyAsyncResult.InvokeCallback(Object result) at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionCallback(Int32 numBytes, SocketError errorCode) at System.Net.Sockets.OverlappedAsyncResult.CompletionCallback(Int32 numBytes, Byte[] socketAddress, Int32 socketAddressSize, SocketFlags receivedFlags, SocketError errorCode) at System.Net.Sockets.SocketAsyncContext.<>c.b__46_0(Object args) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.QueueUserWorkItemCallbackDefaultContext.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() ``` 9324 area-System.Net Fix hanging System.Net.Http test We've been plagued for the last few weeks by CI jobs on Windows that hang in System.Net.Http.Functional.Tests, causing the whole job to fail after it eventually times out after two hours. I managed to find a CI server that had a process still alive after having experienced the hang and was able to debug it. The Dispose_DisposingHandlerCancelsActiveOperationsWithoutResponses test is creating three loopback servers and using HttpClient.GetAsync to access each of them. It's then Disposing of the HttpClient to verify that requests which should have been canceled are canceled. The problem is that there's a race condition. We may end up canceling one of the requests before it even gets a chance to connect to the server. As a result, the server remains stuck in an asynchronous accept on it socket, and at the end of the test, we're waiting for all of the servers to shutdown... deadlock. The fix is simple: don't wait for the servers... we don't care about their results, and they'll all be torn down when we exit the inner delegate. Fixes #8926 cc: @davidsh, @ericeil 9325 area-System.Reflection The NetNative implementation of System.Reflection.TypeExtensions does not properly handle generic method overriding. "Consider this class: ``` public abstract class Base { public abstract TResult Foo(Func f); } public sealed class Derived { public override TResult Foo Func f) { return null; } } ``` Calling typeof(Derived).GetMethods() on this is expected to return only Derived.Foo. However, on .NET Native, it returns Base.Foo as well. The bug is in the helper method: AreNamesAndSignaturesEqual(MethodInfo method1, MethodInfo method2) https://github.com/AtsushiKan/corefx/blob/master/src/System.Reflection.TypeExtensions/src/Internal/Reflection/Extensions/NonPortable/MemberPolicies.cs#L63 This method detects overrides by comparing the method name and parameter types. The simple comparison of parameter types is insufficent to detect the override here because the TResult of Base.Foo is considered to be a different type from the TResult of Derived.Foo. We need to do something different here. Probably we'll have to manually compare the types using recursion and define the comparison of generic method parameters as ""compare the position only."" " 9327 area-System.Runtime Fill out AppDomain There are several buckets here, which likely should be broken out. We know .UnhandledException, .CurrentDomain, .GetAssemblies, .GetCurrentThreadId are heavily used in Xamarin/Unity and should be straightforward to add. DefineDynamicAssembly is in the next bucket. True AppDomain support would be a larger challenge. We may distinguish design time support (eg for Unity IDE) vs. bulletproof runtime level support. 9329 area-System.Runtime Fill out GC class Below is what's in Xamarin Android but not in Core. If these are all still in the implementation, we should expose them. ``` public static class GC { public static void CancelFullGCNotification(); public static int GetGeneration(WeakReference wo); public static void RegisterForFullGCNotification(int maxGenerationThreshold, int largeObjectHeapThreshold); public static GCNotificationStatus WaitForFullGCApproach(); public static GCNotificationStatus WaitForFullGCApproach(int millisecondsTimeout); public static GCNotificationStatus WaitForFullGCComplete(); public static GCNotificationStatus WaitForFullGCComplete(int millisecondsTimeout); } public enum GCNotificationStatus { Canceled = 2, Failed = 1, NotApplicable = 4, Succeeded = 0, Timeout = 3, } ``` 9331 area-Serialization Refactor Exception Messages New Added in ReflectionBasedDCS Branch 9333 area-Serialization Fixes for Reflection Based DCS in NetNative This PR include several bug fixes for reflection based DCS in Net Native. Each commit addressed one issue. @roncain @mconnew @zhenlan Can you please help review the PR? Before reviewing this, it might be worth to take a look at three PRs that enabled reflection based DCS in Net Native: https://github.com/dotnet/corefx/pull/8629 https://github.com/dotnet/corefx/pull/8704 https://github.com/dotnet/corefx/pull/8887 Please feel free to comment on parts that had been checked in. 9337 area-System.Net [release/1.0.0] Many networking tests fail with ---- System.ComponentModel.Win32Exception : Unable to load DLL 'System.Net.Security.Native': The specified module could not be found. One example failure: ``` Starting KDC.. System.Net.Security.Tests.NegotiateStreamTest.NegotiateStream_EchoServer_ClientWriteRead_Successive_Async_Success [FAIL] System.Security.Authentication.AuthenticationException : A call to SSPI failed, see inner exception. ---- System.ComponentModel.Win32Exception : Unable to load DLL 'System.Net.Security.Native': The specified module could not be found. (Exception from HRESULT: 0x8007007E) Stack Trace: at System.Net.Security.NegoState.ValidateCreateContext(String package, Boolean isServer, NetworkCredential credential, String servicePrincipalName, ChannelBinding channelBinding, ProtectionLevel protectionLevel, TokenImpersonationLevel impersonationLevel) at System.Net.Security.NegotiateStream.BeginAuthenticateAsClient(NetworkCredential credential, ChannelBinding binding, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel, AsyncCallback asyncCallback, Object asyncState) at System.Net.Security.NegotiateStream.BeginAuthenticateAsClient(NetworkCredential credential, String targetName, AsyncCallback asyncCallback, Object asyncState) at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl[TArg1,TArg2](Func`5 beginMethod, Func`2 endFunction, Action`1 endAction, TArg1 arg1, TArg2 arg2, Object state, TaskCreationOptions creationOptions) at System.Threading.Tasks.TaskFactory.FromAsync[TArg1,TArg2](Func`5 beginMethod, Action`1 endMethod, TArg1 arg1, TArg2 arg2, Object state) at System.Net.Security.NegotiateStream.AuthenticateAsClientAsync(NetworkCredential credential, String targetName) at System.Net.Security.Tests.NegotiateStreamTest.NegotiateStream_EchoServer_ClientWriteRead_Successive_Async_Success() ----- Inner Stack Trace ----- at System.Net.Security.NegotiateStreamPal.AcquireCredentialsHandle(String package, Boolean isServer, NetworkCredential credential) at System.Net.NTAuthentication.Initialize(Boolean isServer, String package, NetworkCredential credential, String spn, ContextFlagsPal requestedContextFlags, ChannelBinding channelBinding) at System.Net.NTAuthentication..ctor(Boolean isServer, String package, NetworkCredential credential, String spn, ContextFlagsPal requestedContextFlags, ChannelBinding channelBinding) at System.Net.Security.NegoState.ValidateCreateContext(String package, Boolean isServer, NetworkCredential credential, String servicePrincipalName, ChannelBinding channelBinding, ProtectionLevel protectionLevel, TokenImpersonationLevel impersonationLevel) ``` 9342 area-Serialization Speed up JsonWriterDelegator.WriteDateTimeInDefaultFormat. "While investigating https://github.com/dotnet/coreclr/issues/5558 it was noted that JsonWriterDelegator.WriteDateTimeInDefaultFormat can be sped up considerably for some cases. @mconnew had the following comments: Looking at that code, my guess would be fetching the timezone info from Linux is the expensive operation. This can be easily avoided in the first if-block and this code sped up considerably. This is purely to check an edge case where the regular code won’t catch it and is unlikely to happen but is there for correctness. We can do a cheaper pre-check to reduce the chance of hitting this code. The result from TimeZoneInfo.Local.GetUtcOffset(value) is bounded to +/- 24 hours so we can have some constants which allow us to check if (DateTime.MinValue + 24 hours) < value < (DateTime.MaxValue – 24 hours). If this is true, then we don’t need to do the more expensive check. If it’s false, then we do the full more expensive check. It could be something like this: ``` if (value.Kind != DateTimeKind.Utc) { // lowBound and highBound should be cached statics DateTime lowBound = DateTime.MinValue.AddDays(1.0); DateTime highBound = DateTime.MaxValue.AddDays(-1.0); if(lowBound.CompareTo(value)>0 || highBound.CompareTo(value)<0) { long tickCount = value.Ticks - TimeZoneInfo.Local.GetUtcOffset(value).Ticks; if ((tickCount > DateTime.MaxValue.Ticks) || (tickCount < DateTime.MinValue.Ticks)) { throw XmlObjectSerializer.CreateSerializationException(SR.JsonDateTimeOutOfRange, new ArgumentOutOfRangeException(nameof(value))); } } } ``` In the Local/Unspecified switch block, the code can be rewritten like this: ``` // +""zzzz""; //TimeSpan ts = TimeZone.CurrentTimeZone.GetUtcOffset(value.ToLocalTime()); TimeSpan ts = TimeZoneInfo.Local.GetUtcOffset(value.ToLocalTime()); writer.WriteString(string.Format(CultureInfo.InvariantCulture, ""{0:+00;-00}{1:00;00}"", ts.Hours, ts.Minutes)); break; ``` This results in only one call to writer.WriteString and removes some string concatenations and a bunch of comparisons. " 9343 area-System.Net Use stackalloc for UrlEncode in WebUtility This contains basically the same changes as #8535, except without the branching-related stuff. I've refactored `WebUtility.UrlEncode` to use `stackalloc` instead of allocating on the heap under a certain threshold (<= 1024 bytes). I also did a bit of refactoring/made sure to comment a lot of the added code for clarity. ### Perf impact The changes made here seem to make the method 2x faster for inputs that meet the `stackalloc` criteria. (Disclaimer: I tested against the RC2 packages, as opposed to a build of the master branch of the repo.) - [Test code](https://gist.github.com/jamesqo/a002901c2925967d21052a0945ed54ba) - [Old results](https://gist.github.com/jamesqo/9a95188d52609d778a7deeab9897772e) - [New results](https://gist.github.com/jamesqo/79331f536eefd66cd8bd7361aa7247d4) cc @davidsh, @ellismg, @hughbe, @stephentoub 9347 area-System.Reflection Stress: Investigate re-adding Reflection.Emit tests to runs The Reflection.Emit tests are causing daily dumps to be generated because of their high heap allocations causing OutOfMemoryExceptions everywhere. Turn them off with `[Trait(“Stress”, “Excluded”)]`. 9350 area-System.Net System.Net.Ping ignores PingOptions on unix [Relevant code](https://github.com/dotnet/corefx/blob/master/src/System.Net.Ping/src/System/Net/NetworkInformation/Ping.Unix.cs#L59) Ignoring DontFragment or TTL produces different behaviour between linux and windows builds when implementing a simple ICMP trace. Is this the intended/by-design behaviour? Wouldn't a NotImplementedException if PingOptions are given/non default be a nicer signal to the developer? 9353 area-System.Net Come up with a plan for the NegotiateStream tests on Linux The tests have both prerequisites and modify machine state during execution. It would be great if we could eliminate the machine state modifications. 9357 area-System.Net System.Net.Http.CurlException HttpClient PostAsync "### **Environment** > DISTRIB_ID=Ubuntu > DISTRIB_RELEASE=16.04 > DISTRIB_CODENAME=xenial > DISTRIB_DESCRIPTION=""Ubuntu 16.04 LTS"" ### **Curl version** > curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3 > Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp > Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets ### **Code** ``` C# var client = new HttpClient() { BaseAddress = new Uri(""http://example.com/"") }; var formContent = new FormUrlEncodedContent(new[] { new KeyValuePair(""key"", ""val"") }); var response = await client.PostAsync(""/some.php"", formContent, CancellationToken.None); ``` ### **Target** > dotnet 1.0.0-preview1-002702 > ""System.Net.Http"": ""4.0.1-rc2-24027"" ### **Exception** > Unhandled Exception: System.AggregateException: One or more errors occurred. (An error occurred while sending the request.) ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.CurlException: _**Failure when receiving data from the peer**_ > at System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error) > at System.Net.Http.CurlHandler.MultiAgent.FinishRequest(EasyRequest completedOperation, CURLcode messageResult) ### **Run Curl directly is working** `curl -c cookies.txt -b cookies.txt -X POST --form ""key=val"" http://example.com/some.php -L ` ~~Can't get it working with dotnet, everything else just fine, except when I post **FormUrlEncodedContent**. I tried different setup with HttpClientHandler, same exception.~~ #### **Update!** Running with **1.0.0-preview2-003119** works fine. " 9369 area-System.Security Add static hash helper methods "Computing a hash code currently requires this code: ``` byte[] hashBytes; using (var hashAlgo = SHA256.Create()) hashBytes = hashAlgo.ComputeHash(bytes); ``` Or the more awkward `HashAlgorithm.Create(""SHA256"")`. This code is alright. It's not the end of the world. But I think it should be slimmer than that: ``` var hashBytes = SHA256.ComputeHash(bytes); ``` Benefits: 1. This is more terse. 2. It's an expression as opposed to a statement. That makes it more composable. It can be a subexpression for example in a LINQ query. 3. No way to forget resource cleanup or mess up code quality otherwise. 4. `SHA256.ComputeHash` can look at it's input size and dynamically pick the fastest implementation. I found the following to be optimal through testing on Windows x64: `estimatedDataLength <= 512 ? new SHA1Managed() : HashAlgorithm.Create(""SHA1"")`. Apparently, using the Windows crypto API has quite some per-hash cost. I request that static helper method be added to the framework. This seems like an attractive case for a community contribution. " 9370 area-System.Net MultipartContent should override CreateContentReadStreamAsync "This program: ``` C# using System; using System.Net.Http; class Program { static void Main() { var form = new MultipartFormDataContent(); var bytes = new byte[1024 * 1024]; for (int i = 0; i < 2048; i++) { form.Add(new ByteArrayContent(bytes), ""file"", Guid.NewGuid().ToString()); } form.ReadAsStreamAsync().GetAwaiter().GetResult(); } } ``` throws an exception: ``` System.Net.Http.HttpRequestException: Cannot write more bytes to the buffer than the configured maximum buffer size: 2147483647 ``` This is because MultipartContent doesn't override CreateContentReadStreamAsync, which means it's trying to serialize all of the parts to a MemoryStream which it can then return. It should instead return a custom stream that reads from each part in turn, just as its override of SerializeToStreamAsync doesn't try to store the whole thing into a byte[]/MemoryStream which it could write out but rather writes out each part individually. " 9371 area-System.Net Remove some allocations from unix WebSocket client Some low-hanging fruit. (I have another change that gets rid of many more allocations coming from the networking stack, but I'm seeing an odd behavior I wasn't expecting and am following up on that before submitting it.) - Change how we read message headers. Rather than using a `Task ReadMessageHeaderAsync` method, we now separate the buffering and the reading of the header, saving several allocations. - Removing the WithAbortAsync method. I'd initially added this when it wasn't clear to me that any operation getting canceled is meant to trigger the whole websocket getting aborted. Since that is the behavior, this method is no longer needed and we can do something much simpler, resulting in many fewer allocations per operation. This change modifies indentation in several places, so it's most easily reviewed ignoring whitespace changes: https://github.com/dotnet/corefx/pull/9371/files?w=1 cc: @ericeil, @bartonjs, @davidsh, @cipop 9376 area-System.Diagnostics System.Diagnostics.PerformanceCounter is missing in .Net Core missing Performance counter in .Net Core 9377 area-System.Net Override HttpContent.CreateContentReadStreamAsync in MultipartContent MultipartContent doesn't override CreateContentReadStreamAsync. This means that a ReadAsStreamAsync operation will end up serializing all of the content to a MemoryStream, which can be problematic for very large content, preventing such content from being uploaded with some HttpClientHandlers. This change overrides CreateContentReadStreamAsync to use a custom stream that delegates to all of the inner streams from each content. Fixes https://github.com/dotnet/corefx/issues/9370 cc: @davidsh, @cipop, @ericeil 9379 area-System.Runtime Improve test coverage for Comparer/EqualityComparer of enums The runtime has special logic to create Comparer/EqualityComparer of enums, but we do not seem to have any tests to exercise these special paths. 9383 area-Infrastructure Hello. Is it possible to install CoreFX to a custom folder? Is it possible to install CoreFX to a custom folder after the building from sources? Command to build: `./build.sh x64 debug` But in this case CoreFX installs to a current folder. What command I must enter to onfigure sources and instal to a custom folder? PS: OS Ubuntu 16.04 LTS. Problem with building are missing. 9384 area-System.Net Avoid send/receive delegate allocations with SocketAsyncEventArgs on Unix Every send/receive operation on a Socket on Unix when using SocketAsyncEventArgs is allocating a new delegate. Since the whole point of SocketAsyncEventArgs is to cache state and ammortize the costs of things across multiple operations, it's better to create the delegate once and reuse it for all operations. cc: @ericeil 9394 area-System.Security [macOS] Move standard cryptographic operations from OpenSSL to Apple's libraries "Today when you install openssl via brew, it may print a message saying ""Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries"". We should add to the release notes that this is expected and lay out our plan on moving off OpenSLL and onto Apple stuff (maybe it happens for 1.1?, I think right know it's in the ""we will do this in the future"" bucket, but it would be good for us to start thinking about what the actual timeline is). **Edit:** Since this issue is already known to people as the tracking item for the move, it has been repurposed from ""make a roadmap"" to ""go, baby, go!"". " 9395 area-System.Net Fix build break cc: @wtgodbe 9397 area-Serialization DCS Deserialization Failure with PreserveObjectReferences Set to true "DCS failed during deserialization when PreserveObjectReferences is set to true. See below for an example of the error message: ``` DataContractSerializerTests.DCS_CircularTypes_PreserveObjectReferences_True [FAIL] System.Runtime.Serialization.SerializationException : Deserialized object with reference id 'i3' not found in stream. Stack Trace: D:\OSS\corefx\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XmlObjectSerializerReadContext.cs(442,0): at System.Runtime.Serialization.XmlObjectSerializerReadContext.GetExistingObject(String id, Type type, String name, String ns) ... ``` Serializing and de-serializing the following root object would repro the issue. ``` csharp var root = new Root(); root.Children = new List { new Child { Root = root, Name = ""A"" }, new Child { Root = root, Name = ""B"" } }; [DataContract] public class Root { [DataMember] public List Children { get; set; } } [DataContract(IsReference = true)] public class Child { [DataMember] public Root Root { get; set; } [DataMember] public string Name { get; set; } } ``` " 9402 area-System.Security X509Certificates cannot be used in Mac? I can `dotnet build` my Asp.Net Core RC2 code in OS X, but `dotnet run` throw following exception (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation. Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Interop+Crypto+OpenSslCryptographicException: error:2006D080:BIO routines:BIO_new_file:no such file at Interop.Crypto.CheckValidOpenSslHandle(SafeHandle handle) at Internal.Cryptography.Pal.CertificatePal.FromFile(String fileName, String password, X509KeyStorageFlags keyStorageFlags) at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(String fileName, String password, X509KeyStorageFlags keyStorageFlags) at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName, String password) at mycode.Startup.ConfigureServices(IServiceCollection services) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.AspNetCore.Hosting.Startup.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection exportServices) at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices() at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication() at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build() 9407 area-System.Net ClientWebSocket_Abort_CloseOutputAsync failed in CI on Unix http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/osx_debug_prtest/2082/consoleText ``` System.Net.WebSockets.Client.Tests.ClientWebSocketTest.ClientWebSocket_Abort_CloseOutputAsync(server: wss://corefx-net.cloudapp.net/WebSocket/EchoWebSocket.ashx) [FAIL] System.InvalidOperationException : This operation is only allowed using a successfully authenticated context. Stack Trace: Using /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx_debug_prtest@2/packages/ as folder for resolving package dependencies. Executing in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx_debug_prtest@2/bin/tests/AnyOS.AnyCPU.Debug/System.Composition.Tests/netcoreapp1.0 Executing in unpack directory, do not have to copy files Hard linking dependent files... at System.Net.Security.SslState.CheckThrow(Boolean authSucessCheck) at System.Net.Security.SslState.get_SecureStream() at System.Net.Security.SslStream.EndWrite(IAsyncResult asyncResult) at System.Net.Security.SslStream.<>c.b__86_1(IAsyncResult iar) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() at System.Net.WebSockets.WebSocketHandle.ManagedClientWebSocket.d__59.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() at System.Net.WebSockets.WebSocketHandle.ManagedClientWebSocket.d__69.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at System.Net.WebSockets.Client.Tests.ClientWebSocketTest.<>c.<b__37_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at System.Net.WebSockets.Client.Tests.ClientWebSocketTest.d__44.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at System.Net.WebSockets.Client.Tests.ClientWebSocketTest.d__37.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` 9408 area-System.Net CloseAsync_CloseDescriptionIsMaxLengthPlusOne_ThrowsArgumentException periodically throwing wrong exception on Unix ``` System.Net.WebSockets.Client.Tests.ClientWebSocketTest.CloseAsync_CloseDescriptionIsMaxLengthPlusOne_ThrowsArgumentException(server: ws://corefx-net.cloudapp.net/WebSocket/EchoWebSocket.ashx) [FAIL] System.Net.WebSockets.WebSocketException : Unable to connect to the remote server ---- System.ObjectDisposedException : Cannot access a disposed object. Object name: 'System.Net.Sockets.TcpClient'. Stack Trace: at System.Net.WebSockets.WebSocketHandle.ManagedClientWebSocket.d__48.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() at System.Net.WebSockets.ClientWebSocket.d__16.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at System.Net.WebSockets.Client.Tests.WebSocketHelper.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at System.Net.WebSockets.Client.Tests.ClientWebSocketTest.d__27.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at System.Net.Sockets.TcpClient.GetStream() at System.Net.WebSockets.WebSocketHandle.ManagedClientWebSocket.d__48.MoveNext() ``` 9409 area-System.Numerics QuaternionCreateFromYawPitchRollTest2 failed in CI on OSX http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_osx_release/72/consoleText ``` System.Numerics.Tests.QuaternionTests.QuaternionCreateFromYawPitchRollTest2 [FAIL] Yaw:-545 Pitch:155 Roll:365 Expected: True Actual: False ``` cc: @mellinoe, @RussKeldorph 9410 area-Infrastructure build.sh script hammering proxy When trying to build corefx via the build.sh script, at some point it fetches some data from https://dotnetmyget.blob.core.windows.net This is hammering our proxy with 5-10 requests per second, which in turn causes the proxy to rate-limit and stall/disconnect the client, which in turn leads to failures during the build stage: ``` darkstar@kubuntu:/usr/src/corefx$ ./build.sh managed x64 debug Setting up directories for build Installing dotnet cli... Restoring BuildTools version 1.0.25-prerelease-00512-01... Initializing BuildTools... ERROR: An error occured when trying to initialize the tools. Please check '/usr/src/corefx/init-tools.log' for more details. ./build.sh: line 107: /usr/src/corefx/Tools/corerun: No such file or directory tail: cannot open '/usr/src/corefx/msbuild.log' for reading: No such file or directory Build Exit Code = 127 darkstar@kubuntu:/usr/src/corefx$ ``` the problem is that there is no way of recovering from such a failed build as subsequent builds will fail quite early in the process: ``` darkstar@kubuntu:/usr/src/corefx$ ./build.sh managed x64 debug Setting up directories for build Tools are already initialized ./build.sh: line 107: /usr/src/corefx/Tools/corerun: No such file or directory tail: cannot open '/usr/src/corefx/msbuild.log' for reading: No such file or directory Build Exit Code = 127 darkstar@kubuntu:/usr/src/corefx$ ``` There should be an option for build.sh to not hammer the proxy with hundreds of parallel requests, or instead of requesting each and every file individually maybe something like a ZIP archive could be downloaded instead? another idea could be that the `build.sh` script checks which files are downloaded already and only downloads those that are missing/incomplete, instead of nothing (if re-running `build.sh` without cleaning) or everything (if running `clean.sh` before retrying `build.sh`) right now I'm unable to build corefx and coreclr because of this issue. Any ideas for workarounds will be appreciated :) 9412 area-System.Net More perf improvements for managed WebSocket client on Unix Primary changes: - NetworkStream's Read/WriteAsync simply uses the underlying Socket's Begin/EndReceive/Send methods, wrapped in tasks. While that could be optimized further, we have a more constrained scenario in WebSockets, in that we only support a single read at a time and a single write at a time. As a result, we can create, cache, and reuse a single SocketAsyncEventArgs instance for reading and another for writing, using the socket's Send/ReceiveAsync methods with that cached args instance. This avoids a bunch of per operation allocation. - Due to #4900 (and the behavior that was made to match on Unix), successful socket operations never complete synchronously. This means that code which awaits them typically ends up needing to yield, due to the callbacks being invoked asynchronously, even if the socket operation completed synchronously, which is very likely in the case of a send. Our SendFrameAsync method suffers from this, as it really just delegates to the socket's send method, albeit with a tiny amount of pre- and post-work. The real solution is to make it so that Socket.SendAsync can complete synchronously, after which SendFrameAsync will also typically complete synchronously and generally be allocation-free. Until then, though, since this is a hot path, we can optimize it for the common case to reduce the amount of allocation and general work involved when the socket operation does complete asynchronously. - For chatty cases where each send expects a receive, it's likely that each receive needs to read from the network. This means we end up going through several layers of async methods (ReceiveAsyncPrivate, EnsureBufferContainsHeaderAsync, EnsureBufferContainsAsync), which will all end up yielding and allocating when the read on the network doesn't complete synchronously. Since EnsureBufferContainsHeaderAsync is small and only used from one place, we can avoid all of the allocations associated with it by simply inlining it into its caller (ReceiveAsyncPrivate). Other miscellaneous: - Removed the base class from the internal ManagedWebSocket. It's unnecessary and leads to virtual methods on the instance. More importantly, though, we end up potentially handing out this instance via a Task's AsyncState, and we don't want folks to be able to cast to the base class and call methods without going through the thin ClientWebSocket wrapper. - A bunch of resources weren't being used. I deleted them. - WebSocketReceiveResult had non-readonly backing fields for each of its properties, which had private setters purely to be able to set the properties in the constructor. Now that we're using C# 6, we can simply make these get-only properties, eliminating the setters and allowing the compiler to make the backing fields readonly. - Used nameof in a few more places. Results: I ran a simple test with a local echo server, where I'd repeatedly send a message and receive its echo. As a baseline, with the Windows WinHTTP implementation sending and receiving 20,000 messages, I get the following. Each line is a run of the 20,000 messages, with the first number being the elapsed time and the second number being the number of gen 0 GCs. ``` > corerun WSPerf.exe 28745 20000 1 2.6906097, 5 2.7209642, 5 2.6802832, 5 2.7098154, 5 2.7061351, 6 2.6964876, 5 2.7943476, 5 2.7638309, 5 2.7918148, 5 2.744804, 6 ``` Instead using the managed implementation on Windows, before these changes, I got: ``` > corerun WSPerf.exe 28745 20000 1 3.1177403, 22 3.2149994, 22 2.6798198, 23 2.8078613, 23 2.6670316, 24 2.6744515, 23 2.6619906, 24 2.7596847, 23 2.6485313, 24 2.6559615, 23 ``` After these changes, using the managed implementation on Windows, I get: ``` > corerun WSPerf.exe 28745 20000 1 2.576682, 9 2.6461474, 9 2.5376302, 9 2.5192637, 9 2.5189807, 10 2.5227088, 9 2.5305238, 9 2.5696738, 9 2.5766855, 9 2.5433629, 9 ``` On Linux, I'm using a different local echo server, so the timing numbers aren't directly comparable to the ones on Windows, however before the changes I got: ``` $ ./corerun WSPerf.exe 7681 20000 1 1.6772411, 16 1.2316513, 11 1.1890394, 10 1.7308767, 19 1.1968002, 11 1.5696637, 19 1.5461821, 18 1.2686805, 12 1.1765528, 10 1.124586, 11 ``` and after the changes I got: ``` $ ./corerun WSPerf.exe 7681 20000 1 1.2716779, 5 1.0913687, 5 1.0198689, 5 1.1038351, 4 1.0823826, 4 1.0074977, 4 1.0132344, 5 1.0704005, 4 1.1775556, 6 1.0341026, 6 1.0462667, 4 ``` At this point I'm not planning to do any more proactive work on improving the send/receive performance, as the performance after these changes on Linux looks to be on par with the Windows implementation. There are likely more opportunities which can be addressed individually and reactively, including once #4900 is addressed. There may also be opportunities to improve scenarios other than lots of sending/receiving with the same websocket, e.g. minimizing the overhead associated with creating lots of websockets that each do relatively little work. cc: @ericeil, @bartonjs, @davidsh, @cipop Also fixes #9408 and fixes #9407 9413 area-System.IO System.IO.FileSystem.DriveInfo is missing from .Net Core System.IO.FileSystem.DriveInfo is missing https://github.com/dotnet/corefx/tree/master/src/System.IO.FileSystem/src/System/IO https://dotnet.github.io/api/System.IO.DriveInfo.html 9414 area-System.Net Add test for posting FormUrlEncodedContent with HttpClient https://github.com/dotnet/corefx/issues/9357 cc: @ericeil 9416 area-System.Runtime System.Dynamic.Runtime and System.Runtime tests hanging in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_debug_prtest/2040/consoleText Both the System.Dynamic.Runtime.Tests and the System.Runtime.Tests are hanging. Note that we just picked up a new CoreCLR: rc4-24214-02. I don't know if this is related, but to my knowledge we haven't seen these hang like this before. cc: @jkotas, @sergiy-k 9417 area-Infrastructure [PostRTM] Introduce .depproj references for newly stable packages The stable versions of contracts are embedded via a .depproj; rather than continuing to rebuild them (and potentially rewriting history). As part of our Post-RTM tasks we should change .csproj to .depproj as appropriate, holistically. 9418 area-Infrastructure [PostRTM] Change project.json references to stable packages Part of the problem with the build frequency (#9156) is that the project.json updates frequently end up with merge conflicts (not only between the bots, but between the bots and humans). If all of the existing references are snapped to the stable versions the updates won't be editing any files, and will continue to not need to edit any files until live dependencies on new contract API starts to creep in; making for significantly less noise than we have today. 9420 area-System.Runtime System.Runtime.Serialization.Formatters takes dependency on xunit.performance but has no perf tests The perf tests are currently detected by figuring out which tests take a dependency on xunit.performance and running those test dlls with xunit performance runner. System.Runtime.Serialization.Formatters seems to take a dependency on xunit.performance but does not have a perf test to execute To repro: `msbuild .\src\System.Runtime.Serialization.Formatters\tests\System.Runtime.Serialization.Formatters.Tests.csproj /t:buildAndtest /p:performance=true /p:OSGroup=Windows_NT` Is this intended? 9423 area-System.Net TcpClient.Dispose used concurrently with ConnectAsync may not Dispose of the Socket TcpClient is not documented to have thread-safe members, and in general Dispose implementations should not be used concurrently with other members on the containing types. However, as TcpClient is a thin wrapper for a Socket, code may end up calling Dispose on the TcpClient in order to cancel in-progress async operations, such as ConnectAsync. However, on Unix, ConnectAsync is implemented by creating a new Socket for each address it attempts to connect to, and that Socket isn't stored into the TcpClient until after a connection has been successfully established. As a result, Dispose can't be used to cancel the connect operation, as the Socket won't have been stored yet, and in such cases the Socket won't get disposed of. 9427 area-System.Runtime Several DateTimeOffset tests fail in certain timezones on Linux "e.g. ``` stoub@stoublinux2:~/netcore$ echo ""Europe/Prague"" | sudo tee /etc/timezone Europe/Prague stoub@stoublinux2:~/netcore$ sudo dpkg-reconfigure --frontend noninteractive tzdata Current default time zone: 'Europe/Prague' Local time is now: Tue Jun 14 23:58:46 CEST 2016. Universal Time is now: Tue Jun 14 21:58:46 UTC 2016. stoub@stoublinux2:~/netcore$ ./corerun xunit.console.netcore.exe System.Runtime.Tests.dll -notrait category=nonlinuxtests -notrait category=failing -notrait category=outerloop xUnit.net console test runner (64-bit .NET Core) Copyright (C) 2014 Outercurve Foundation. Discovering: System.Runtime.Tests Discovered: System.Runtime.Tests Starting: System.Runtime.Tests System.Tests.DateTimeOffsetTests.AddYears(dateTimeOffset: 1986-08-15T10:20:05.0700000+02:00, years: -10, expected: 1976-08-15T10:20:05.0700000+01:00) [FAIL] Assert.Equal() Failure Expected: 1976-08-15T10:20:05.0700000+01:00 Actual: 1976-08-15T10:20:05.0700000+02:00 Stack Trace: at System.Tests.DateTimeOffsetTests.AddYears(DateTimeOffset dateTimeOffset, Int32 years, DateTimeOffset expected) System.Tests.DateTimeOffsetTests.AddMonths(dateTimeOffset: 1986-08-15T10:20:05.0700000+02:00, months: 2, expected: 1986-10-15T10:20:05.0700000+01:00) [FAIL] Assert.Equal() Failure Expected: 1986-10-15T10:20:05.0700000+01:00 Actual: 1986-10-15T10:20:05.0700000+02:00 Stack Trace: at System.Tests.DateTimeOffsetTests.AddMonths(DateTimeOffset dateTimeOffset, Int32 months, DateTimeOffset expected) Finished: System.Runtime.Tests === TEST EXECUTION SUMMARY === System.Runtime.Tests Total: 6871, Errors: 0, Failed: 2, Skipped: 0, Time: 6.537s ``` " 9428 area-Infrastructure Move TestSuite package to dotnet-core feed To improve perf of restore and avoiding hitting multiple feeds, move the new sets of packages to the dotnet-core feed and not the dotnet-buildtools feed. 9433 area-System.Net HttpWebResponse.ContentType returns empty string when response has malformed headers "Copied from https://github.com/dotnet/coreclr/issues/5806 /cc @erezvani1529 The content-type property is being stripped off of response if it is not in ""type/subtype"" format. Information on the project and target frameworks: - .NetCore Console App - project.json ``` JSON { ""version"": ""1.0.0-*"", ""buildOptions"": { ""emitEntryPoint"": true }, ""dependencies"": { ""Microsoft.NETCore.App"": { ""type"": ""platform"", ""version"": ""1.0.0-rc2-3002702"" }, ""WindowsAzure.Storage"": ""7.0.2-preview"" }, ""frameworks"": { ""netcoreapp1.0"": { ""imports"": [ ""dnxcore50"", ""portable-net451+win8"" ] } } } ``` Sample fiddler trace using WindowsAzure.Storage client library(CoreCLR RC2 release): ``` User-Agent: Azure-Storage/7.0.2-preview (.NET Core 5.0) x-ms-content-language: languagevalue x-ms-content-type: contenttypevalue---> Content type header is sent successfully x-ms-client-request-id: 271c0518-3f42-4a05-89f0-27fcdf082d25 x-ms-version: 2015-07-08 x-ms-date: Wed, 08 Jun 2016 21:12:46 GMT ---------------------- Content-Type: contenttypevalue --> the stored content type returned from server Content-Language: languagevalue Last-Modified: Wed, 08 Jun 2016 21:12:45 GMT ETag: ""0x8D38FE1A3263418"" Server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 x-ms-request-id: cf262393-001a-0014-27ca-c18fe2000000 x-ms-version: 2015-07-08 x-ms-type: File Date: Wed, 08 Jun 2016 21:14:23 GMT ``` result: ContentType doesn't have the specified value (null value is retuned in the application). Note: I have tried the same scenario with a content-type with ""type/subtype"" format such as: ""contenttypeva/lue"" and it works fine. Please let me know if there are any more information required to investigate this issue. Thanks! " 9434 area-System.Net Fixing NegotiateStream Windows Interop. Adding NTLM and Kerberos remote tests. Fixing Windows SSPI Interop. Adding a common Configuration and Capabilities infrastructure for System.Net in preparation for multi-machine testing. Fixes #9160. @davidsh @stephentoub PTAL 9436 area-System.Net Significantly reduce running time of WebSocket.Client tests Two commits: - The first one essentially just replaces the regions used in the single ClientWebSocketTest.cs file with classes. - The second one moves those classes to their own files. No test logic/code was changed at all. This split helps to keep things a bit tidier, but more importantly, it enables xunit's default parallelization to run tests (from different test classes) concurrently. On my quad-core (which translates into xunit allowing four tests to run concurrently), it reduces the running time of the tests from ~40s to ~10s. Subsequently we might want to move the WebSocketHelper and WebSocketData functions into the new ClientWebSocketTestBase class, but that's orthogonal to this change. The ClientWebSocketTestBase just contains all of the helpers that were in ClientWebSocketTest.cs and that were shared by the various tests. cc: @davidsh, @cipop, @ericeil, @weshaggard 9438 area-System.Security Parameterize System.Security.Cryptography.Rfc2898DeriveBytes for HMAC Currently [System.Security.Cryptography.Rfc2898DeriveBytes](https://github.com/dotnet/corefx/blob/master/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/Rfc2898DeriveBytes.cs) is hardcoded to use HMACSHA1, it would be nice if HMAC could be parameterized. (More specifically, so that developers can use HMACSHA256 for more security.) Eg : public Rfc2898DeriveBytes(HMAC hmac, string password, byte[] salt, int iterations). 9439 area-System.Data RC2: Connecting to SQL Server from Linux Docker Container throws OpenSSL exception When connecting to SQL Server from .NET Core 1.0 RC2 running within a Linux container, the System.Data.SqlClient library throws an exception citing issues with the OpenSSL handshake. Code/steps to reproduce can be found here: https://github.com/iSynaptic/LinuxSqlServer 9445 area-System.Xml Add TryParse to XDocument Hi, this is a RFC issues to request support for a adding a `bool TryParse(string text, out XDocument document)` method to the `XDocument` class. I've searched around the repo but cannot find anything related, so if this is a dupe feel free to close. ## Problem: Sometimes happens that you have to work with XML files that comes from _untrusted_ sources, and you have to ensure that the file is actually well formed XML. Currently there are [some](http://stackoverflow.com/questions/25791738/determine-whether-a-given-string-is-xml-or-not) not so nice [ways](http://stackoverflow.com/questions/117007/how-best-to-test-the-validity-of-xml-from-a-method) to verify a string is a well formed XML that involves exception handling. None of the suggested ways looks like a clean solution to a quite common problem (at least IMO). Please note also that other [BCL classes](http://referencesource.microsoft.com/#q=Parse) that exposes a `Parse(string source)` method usually also exposes a `bool TryParse(string source, out...)` thus adding a `TryParse` method will make `XDocument` class somewhat more consistent with other BCL classes. ## Suggestion: add the following method `bool TryParse(string text, out XDocument document)` to `XDocument` and `XElement` classes ## Question: Do we need feature parity with `XmlDocument` classes? Actually `XmlDocument` exposes a `LoadXml(string xml)` so we could add a `bool TryLoadXml(string xml, out XmlDocument document)` but I really don't like the name and thus if feature parity isn't a must, I would prefer not adding it. 9446 area-System.Net Flow HttpClient timeouts and cancellation to the response stream Basically this is the same as PR #9102. We reverted that PR when the internal ToF tests started failing. But it was determined that the failure was due to infrastructure which is now fixed via https://github.com/dotnet/coreclr/pull/5695 9448 area-System.IO Add UWP clrcompression build "The AOT netcore50 clrcompression (formerly represented by win10) is currently the only one that still needs to be built in TFS. This commit resolves that requirement by adding AppContainer support to the Open Windows native build. It also ports some custom CRT code to circumvent undefined API errors and make it WACK-friendly. - The result of this is that a clrcompression built with /p:TargetGroup=netcore50 will have the APPCONTAINER bit set. - When building in netcore50 Release, the imports of the clrcompression will be a limited set of the usual (i.e. non-UWP) imports - this makes the dll pass the WACK supported API check. - The import methods of the Release netcore50 clrcompression are identical to the corresponding clrcompression shipped out of TFS, though the latter imports ""api-ms-win-core*"" whereas the former imports ""kernel32"" and ""ole32"". - This commit will need to be merged alongside a TFS commit to remove clrcompression entirely from the ""PackagesToPublish"" group. - We will also need a commit to the build pipeline to add netcore50 configs to the ""pipelines.corefx.json"" file for the ""CoreFx-Windows-Product-Native-Trusted"" builds. imports of this dll: ``` KERNEL32.dll 180009000 Import Address Table 18000CF30 Import Name Table 0 time date stamp 0 Index of first forwarder reference 214 GetCurrentThreadId 2FA GetTickCount64 117 DisableThreadLibraryCalls 2DD GetSystemTimeAsFileTime 430 QueryPerformanceCounter ole32.dll 180009030 Import Address Table 18000CF60 Import Name Table 0 time date stamp 0 Index of first forwarder reference 7F CoTaskMemFree 7E CoTaskMemAlloc ``` imports of the dll from TFS: ``` api-ms-win-core-profile-l1-1-0.dll 180008038 Import Address Table 18000C188 Import Name Table 0 time date stamp 0 Index of first forwarder reference 0 QueryPerformanceCounter api-ms-win-core-processthreads-l1-1-0.dll 180008028 Import Address Table 18000C178 Import Name Table 0 time date stamp 0 Index of first forwarder reference D GetCurrentThreadId api-ms-win-core-sysinfo-l1-1-0.dll 180008048 Import Address Table 18000C198 Import Name Table 0 time date stamp 0 Index of first forwarder reference A GetSystemTimeAsFileTime E GetTickCount64 api-ms-win-core-libraryloader-l1-1-0.dll 180008018 Import Address Table 18000C168 Import Name Table 0 time date stamp 0 Index of first forwarder reference 0 DisableThreadLibraryCalls api-ms-win-core-com-l1-1-0.dll 180008000 Import Address Table 18000C150 Import Name Table 0 time date stamp 0 Index of first forwarder reference 3E CoTaskMemFree 3D CoTaskMemAlloc ``` This also has the added benefit of upgrading the version of ZLib used in UWP to Zlib-Intel. " 9449 area-System.Net CentOS: System.Net.WebSockets.WebSocketException : Unable to connect to the remote server http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/centos7.1_release_prtest/221/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/centos7.1_release_prtest/221/testReport/junit/System.Net.WebSockets.Client.Tests/ClientWebSocketTest/SendReceive_Concurrent_Success_server__ws___corefx_net_cloudapp_net_WebSocket_EchoWebSocket_ashx_/ ``` MESSAGE: System.Net.WebSockets.WebSocketException : Unable to connect to the remote server\n---- System.ObjectDisposedException : Cannot access a disposed object.\nObject name: 'System.Net.Sockets.TcpClient'. +++++++++++++++++++ STACK TRACE: at System.Net.WebSockets.WebSocketHandle.ManagedClientWebSocket.d__48.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.WebSockets.ClientWebSocket.d__16.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.WebSockets.Client.Tests.WebSocketHelper.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.WebSockets.Client.Tests.ClientWebSocketTest.d__23.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ----- Inner Stack Trace ----- at System.Net.Sockets.TcpClient.GetStream() at System.Net.WebSockets.WebSocketHandle.ManagedClientWebSocket.d__48.MoveNext() ``` 9451 area-System.Runtime Issue, Proposal: Decimal, Double (Negative 0) ToString "I am having a hard time believing I never caught this before but none the less; I must be missing something and if I am not then this should probably be corrected... `System.BitConverter.ToDouble(System.BitConverter.GetBytes(-0.0), 0)` Evaluates to : '0.0' `System.BitConverter.Int64BitsToDouble(System.BitConverter.ToInt64(System.BitConverter.GetBytes(-0.0), 0))` Evaluates to : '0.0' But ... `System.BitConverter.DoubleToInt64Bits(-0.0)` Evaluates to '-9223372036854775808', e.g. long.MaxValue + 1. I guess my issue / question is how to round trip negative zero in the CLR using the BitConverter.. It gets the Bytes correctly as can be seen here: `System.BitConverter.GetBytes(-0.0)` > {byte[8]} > [0]: 0 > [1]: 0 > [2]: 0 > [3]: 0 > [4]: 0 > [5]: 0 > [6]: 0 > [7]: 128 `System.BitConverter.GetBytes(0.0)` > {byte[8]} > [0]: 0 > [1]: 0 > [2]: 0 > [3]: 0 > [4]: 0 > [5]: 0 > [6]: 0 > [7]: 0 And I believe that it actually does parse to `-0.0`. However as can be seen by the following statement(s): `-unchecked(-System.BitConverter.Int64BitsToDouble(long.MaxValue + 1))` `unchecked(-System.BitConverter.Int64BitsToDouble(long.MaxValue + 1))` `unchecked(-0.0)` `(0.0 + -0.0)` `System.BitConverter.GetBytes((-1.0 * 0.0))` > {byte[8]} > [0]: 0 > [1]: 0 > [2]: 0 > [3]: 0 > [4]: 0 > [5]: 0 > [6]: 0 > [7]: 128 `System.BitConverter.ToDouble(System.BitConverter.GetBytes((-1.0 * 0.0)), 0)`, Evaluates to 0 but as can be seen using the following code: `System.BitConverter.GetBytes(System.BitConverter.ToDouble(System.BitConverter.GetBytes((-1.0 * 0.0)), 0))` You get the same bytes... Yes I am aware there is IEEE 754, which also says that both are equal except in terms of divisions with negative numbers... It also says `−1.0*0.0` == `-0.0` [Wikipedia Signed Zero](https://en.wikipedia.org/wiki/Signed_zero) You cannot evaluate an expression to negative zero because the interpreter always replaces it with absolute 0, however in memory the bytes are actually as they are given by the BitConverter or otherwise which can also be verified as follows: `double d = -0.0;` `*((byte*)(&d) + 7)` Evaluates to `0x80` e.g. `128`. The following code can detect the anomaly: ``` [System.CLSCompliant(false)] public unsafe static bool IsNegativeZero(double* d) { //Check for -0.0 return (*((long*)(d))).Equals(Common.Binary.NegativeZeroBits); } public unsafe static bool IsNegativeZero(ref double d) { //Make a pointer to the pointer, which when dereferenced can access the result. System.IntPtr value = Unsafe.AddressOf(ref d); //Check for -0.0 return (*((long*)((int*)&value))).Equals(Common.Binary.NegativeZeroBits); } ``` This gets even more confusing with Decimals as `new Decimal(0, 0, 0, true, 0).Equals(-0.0m)` evaluates to true. However > System.Decimal.GetBits(new Decimal(0, 0, 0, true, 0)) > {int[4]} > [0]: 0 > [1]: 0 > [2]: 0 > [3]: -2147483648 > > System.Decimal.GetBits(-0.0m) > {int[4]} > [0]: 0 > [1]: 0 > [2]: 0 > [3]: -2147418112 Since the Decimal type itself is documented this way I find it less intrusive to deal with, however the issue still remains that the value I pass is interpreted as a different but equal value in the cases of Double and Decimal where I do not believe they should be, neither mathematically typing nor obviously with respect to their binary representation. I guess I will go as far as to even propose that '-0.0' Should not be equal to `0.0`, furthermore that the same should also apply to Decimal with respect to the variations of Zero which are possible although I am sure that proposal can be taken elsewhere besides the corefx issues. For instance... `(1 / -0.0) + Double.PositiveInfinity` == `NaN` This indicates the value is actually preserved and calculated as expected to the standard but there is no way to indicate the display of such a value without testing specifically for such and augmenting the results thereof. The only source of information I can find in relation to this topic was from the BCL Team Blog back in 2006: [Here](https://blogs.msdn.microsoft.com/bclteam/2006/10/12/decimal-negative-zero-representation-lakshan-fernando/). It obviates the differences between the decimal representations of negative zero but doesn't touch on the subject for the double type; although I am fairly sure after seeing this the same obviously applies there as well. A more reasonable approach or proposal which would still be compliant to the IEEE standard would be to allow the 'sign' to be given as '+' or '-' via the ToString and not omit it; and also to return the value parsed and not an equivalent representation. Finally, here is a good example of a 'buggy' or weird case in my humble opinion: `System.BitConverter.GetBytes(double.Parse(""-0.0""))` > {byte[8]} > [0]: 0 > [1]: 0 > [2]: 0 > [3]: 0 > [4]: 0 > [5]: 0 > [6]: 0 > [7]: 0 Thanks in advance! " 9453 area-System.Data Refactor SqlClient ManualTests to fetch connection strings from environment variables. This change also allows ManualTests to be built and run automatically, but no actual tests will be run if the connection strings aren't present. CC @saurabh500 9463 area-System.Net SendReceive_PartialMessage_Success websockets test failed on Windows in CI The server returned an invalid or unrecognized response http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/windows_nt_debug/655/consoleText ``` System.Net.WebSockets.Client.Tests.SendReceiveTest.SendReceive_PartialMessage_Success(server: wss://corefx-net.cloudapp.net/WebSocket/EchoWebSocket.ashx) [FAIL] System.Net.Http.WinHttpException : The server returned an invalid or unrecognized response Stack Trace: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at System.Net.WebSockets.WinHttpWebSocket.d__30.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() D:\j\workspace\windows_nt_debug88592b53\src\System.Net.WebSockets.Client\tests\SendReceiveTest.cs(49,0): at System.Net.WebSockets.Client.Tests.SendReceiveTest.d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` 9464 area-Infrastructure Clean build in master yields 32 warnings "``` c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.0"" framework. Add a reference to "".NETStandard,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\coref x\src\System.Diagnostics.FileVersionInfo\tests\System.Diagnostics.FileVersionInfo.TestAssembly\System.Diagnostics.FileVersionInfo.TestAssembly.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.0"" framework. Add a reference to "".NETStandard,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\coref x\src\System.Diagnostics.FileVersionInfo\tests\System.Diagnostics.FileVersionInfo.TestAssembly\System.Diagnostics.FileVersionInfo.TestAssembly.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.0"" framework. Add a reference to "".NETStandard,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\coref x\src\System.Diagnostics.FileVersionInfo\tests\System.Diagnostics.FileVersionInfo.TestAssembly\System.Diagnostics.FileVersionInfo.TestAssembly.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.0"" framework. Add a reference to "".NETStandard,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\coref x\src\System.Diagnostics.FileVersionInfo\tests\System.Diagnostics.FileVersionInfo.TestAssembly\System.Diagnostics.FileVersionInfo.TestAssembly.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\Common\tests\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\Common\tests\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\Common\tests\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\Common\tests\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\Common\tests\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\Common\tests\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\Common\tests\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\Common\tests\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\System.Reflection\tests\TestExe\System.Reflection.Tests.TestExe.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\System.Reflection\tests\TestExe\System.Reflection.Tests.TestExe.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\System.Reflection\tests\TestExe\System.Reflection.Tests.TestExe.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\System.Reflection\tests\TestExe\System.Reflection.Tests.TestExe.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.0"" framework. Add a reference to "".NETStandard,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\coref x\src\System.Runtime.Loader\tests\System.Runtime.Loader.Noop.Assembly\System.Runtime.Loader.Noop.Assembly.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.0"" framework. Add a reference to "".NETStandard,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\coref x\src\System.Runtime.Loader\tests\System.Runtime.Loader.Noop.Assembly\System.Runtime.Loader.Noop.Assembly.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.0"" framework. Add a reference to "".NETStandard,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\coref x\src\System.Runtime.Loader\tests\System.Runtime.Loader.Noop.Assembly\System.Runtime.Loader.Noop.Assembly.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETStandard,Version=v1.0"" framework. Add a reference to "".NETStandard,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\coref x\src\System.Runtime.Loader\tests\System.Runtime.Loader.Noop.Assembly\System.Runtime.Loader.Noop.Assembly.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\Common\tests\System\Xml\ModuleCore\ModuleCore.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\Common\tests\System\Xml\ModuleCore\ModuleCore.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\Common\tests\System\Xml\ModuleCore\ModuleCore.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\Common\tests\System\Xml\ModuleCore\ModuleCore.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\Common\tests\System\Xml\XmlDiff\XmlDiff.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\Common\tests\System\Xml\XmlDiff\XmlDiff.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\Common\tests\System\Xml\XmlDiff\XmlDiff.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\Common\tests\System\Xml\XmlDiff\XmlDiff.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\Common\tests\System\Xml\XmlCoreTest\XmlCoreTest.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\Common\tests\System\Xml\XmlCoreTest\XmlCoreTest.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\Common\tests\System\Xml\XmlCoreTest\XmlCoreTest.csproj] c:\Users\stoub\Source\repos\corefx\Tools\packageresolve.targets(73,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. [c:\Users\stoub\Source\repos\corefx\ src\Common\tests\System\Xml\XmlCoreTest\XmlCoreTest.csproj] ``` " 9465 area-System.IO Compat work for IO category Break out as needed, tagging with the dev/api-xxx tags. 9471 area-System.Net Fix MulticastInterface_Set_ValidIndex_Success failures on non-Windows platforms. "This test assumed that the ""loopback"" interface was always at index 1, which is not true on Linux/OSX/etc. This change makes that assumption explicitly Windows-only, while allowing the ""any interface"" case to run on all platforms. I also added a retry loop around the UDP send to harden this a little against the loopback packet loss we've seen on Unix platforms in other tests. Fixes #8971. @CIPop @stephentoub " 9472 area-System.Net CloseAsync_Cancel_Success failed in CI on Windows http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/windows_nt_release_prtest/2252/consoleText ``` System.Net.WebSockets.Client.Tests.CancelTest.CloseAsync_Cancel_Success(server: ws://corefx-net.cloudapp.net/WebSocket/EchoWebSocket.ashx) [FAIL] Assert.Equal() Failure  (pos 4) Expected: The 'System.Net.WebSockets.InternalClientWebS��� Actual: The WebSocket is in an invalid state ('Aborte���  (pos 4) Stack Trace: D:\j\workspace\windows_nt_re---37265eab\src\System.Net.WebSockets.Client\tests\ClientWebSocketTestBase.cs(81,0): at System.Net.WebSockets.Client.Tests.ClientWebSocketTestBase.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) D:\j\workspace\windows_nt_re---37265eab\src\System.Net.WebSockets.Client\tests\CancelTest.cs(77,0): at System.Net.WebSockets.Client.Tests.CancelTest.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` 9474 area-System.ComponentModel Adding Facade for System.ComponentModel.Composition cc: @weshaggard @danmosemsft FYI: @JeremyKuhne 9477 area-System.Net Fix octal IP address string parsing on OSX "On OSX and Linux, IPAddress.Parse uses getaddrinfo to parse the string. This is spec'd to only work for decimal, but seems to do more than that on both platforms. On Linux, I guess it works well for both hex and octal. On OSX, hex seems to work, but octal only sometimes works. After some experimentation, I think what's going on is that getaddrinfo on OSX tries to parse the address as decimal first, and only if that fails does it try to parse it as octal. So an address like ""010.010.010.010"" will parse as ""10.10.10.10,"" but ""0300.0300.0300.0300,"" since it's not a valid address in decimal, will correctly parse as ""192.192.192.192."" With this change, we use inet_aton to parse IPv4 addresses, instead of getaddrinfo. inet_aton seems to handle octal strings correctly, and is officially documented to do so. Fixes #8362 " 9478 area-Meta Document building against packages We need to document the various aspects of building against packages. Including but not necessary limited to: - How to build with it. (i.e. /p:BuildTestAgainstsPckages=true) - What does KeepProjectReference property mean - What does KeepAllProjectReferences property mean - When is it OK for people to use those properties or not. (i.e. They should be exceptional cases and we need to always make sure we have test projects that work against the packages to ensure the packages are correct). 9480 area-System.Security Compat work for ACL 9481 area-System.Net ContentEncoding header stripped out of response.header.content.contentEncoding "When getting a response with ""gzip"" as the content encoding, this value is not populated into the response.Header.Content.contentEncoding object. If the value is ""foo"" this value is properly propagated from the response to the header object. However, setting the AutomaticDecompression to DecompressionMethods.None on the HttpClientHandler instance is a workaround for us at the moment. Note: this issue was originally opened in Coreclr repo ([Closed](https://github.com/dotnet/coreclr/issues/4114#issuecomment-226612226) and opened here as it is related to HttpClient) " 9483 area-System.Security Compat work Claims based security System.Security.Claims.* 9484 area-System.IO System.IO.Compression.ZipFile tests leak folders into temp directory The ZipFile tests create paths like this in the /tmp or %TEMP% folders: ./ZipTestsRoot_ef3dc45b504d4ff58e009af435fb4ccc ./ZipTestsRoot_ef3dc45b504d4ff58e009af435fb4ccc/ZipTests1 On a long-running test VM, these random folders build up, and on Linux can eventually fill /tmp so hard that execution of pretty much anything is blocked. I'm working to prevent this from mattering in infrastructure, but if the tests could either use their current directory (which gets automatic cleanup on .NET Helix) or be more aggressive in cleaning up leaked ZipTest folders that would prevent this in the future. 9487 area-System.Runtime Compat work for System.*.Compiler* System.Runtime.CompilerServices System.CodeDom.Compiler 9489 area-System.ComponentModel Compat work for Component Model non/MEF System.ComponentModel excepting System.ComponentModel.Composition 9491 area-System.IO Compat work for Compression System.IO.Compression. Looks like there's almost nothing missing here just APM 9492 area-Meta Compat work for Configuration We do not plan to bring System.Configuration.*. Xamarin does not include it, and the usage in mobile apps that we have seems to be essentially zero. It is also problematic in terms of layering. 9500 area-Infrastructure Enable (optionally) statically linking native dependencies on Linux Related: dotnet/coreclr#5853 9503 area-System.Net Use managed WebSockets implementation on all Windows (not UWP) Now that we have a managed implementation of Websockets that we use on Unix, should we also use it on Windows pre-Windows 8, since the current Windows implementation requires OS support only available Windows 8 and later? I'm assuming this should mostly be an issue of package authoring? cc: @davidsh, @cipop, @ericstj, @davidfowl 9511 area-System.Net Speed up System.Net.Sockets.Tests execution - Split `System.Net.Sockets.Tests.DualMode` into multiple classes, to allow more tests to run in parallel. - Tweak the timeout values in some of these tests, so that operations that are expected to time out do so faster. - Removed the `TestFinalizers` case, which was of questionable value in the first place. The assumptions made here before this change were probably not valid (xunit doesn't run tests in any particular order), and they certainly aren't valid after this change. We run enough tests in this suite that finalizers are going to end up running, with or without this test case. On my Windows machine, this brings System.Net.Sockets.Tests execution time from ~76 seconds to ~15 seconds. On my Ubuntu 14.04 VM, execution time goes from ~40 seconds to ~6 seconds. @CIPop @stephentoub 9514 area-Meta Compat work for ClickOnce (stub it) Without CAS, this would not work anyway. Issue tracks stubbing it. 9516 area-System.Console Compat work for Console Not much here to match Xamarin mobile, as much of it isn't there. We do miss these: ``` public static Stream OpenStandardError(int bufferSize); public static Stream OpenStandardInput(int bufferSize); public static Stream OpenStandardOutput(int bufferSize); public static void Write(string format, object arg0, object arg1, object arg2, object arg3, __arglist); public static void WriteLine(string format, object arg0, object arg1, object arg2, object arg3, __arglist); ``` also `enum ConsoleKey` 9521 area-System.Console System.Console implementations with limitations such as Color should not throw All NetCore50 implementations of System.Console I've found so far throw if any color settings are used (i.e. ForegroundColor) due to limitations of where they run. This means that I can't use Xunit.Console.NetCore.exe against these versions because the first thing XUnit DOES is to set the console color. I favor turning these NotSupportedExceptions into noops... ideally with some kind of debug output that indicates to the user this happened, in case the behavior is desired so much that they're checking it out under a debugger. Either way, I need some way to run executables that expect to set these colors on such a runtime. 9527 area-System.Net Convert CredentialCache perf tests to xunit.performance These tests were running for a long time, and then ignoring the result. These tests run for ~2 minutes in our functional test passes, even though we're not getting useful data out of them. This change converts the tests to use xunit.performance. This will greatly reduce their runtime when not running as performance tests (we just run one iteration in that case). It will also enable them to produce useful results in our perf lab, where we _do_ have the infrastructure to find regressions in both throughput and GC counts for xunit.performance-based tests. @stephentoub @davidsh @CIPop @justinvp @brianrob 9533 area-System.Net HttpClient on non-Windows does not support Windows authentication "The following code snippet works fine on Windows (.NET Framework), and can authenticate against an IIS web service configured with Windows authentication only. Status code is 200. ``` using (var client = new HttpClient ( new HttpClientHandler { PreAuthenticate = true, UseDefaultCredentials = false, UseProxy = false, Credentials = new NetworkCredential (""user"", ""pass"", ""domain"") })) { client.BaseAddress = new Uri (""http://test.com""); client.DefaultRequestHeaders.Accept.Clear (); client.DefaultRequestHeaders.Accept.Add (new MediaTypeWithQualityHeaderValue (""application/json"")); HttpResponseMessage response = await client.GetAsync (""test/values""); if (response.IsSuccessStatusCode) { Console.WriteLine (await response.Content.ReadAsStringAsync ()); } else { Console.WriteLine (response.StatusCode); } } ``` However, when it runs in a .NET Core RC2 app on Mac, the response status code is always 401. By capturing packets via Wireshark, no user credentials are sent. (if disable Windows authentication and enable Basic authentication, then it works with 200 status code and user credentials in packets.) So I think the cross platform Windows authentication support is not yet fully implemented. Is there a plan to address this? " 9534 area-System.Net Several managed WebSockets tweaks - When we fail to connect due to an abort/cancellation, ensure the inner exception of the WebSocketException is an OperationCanceledException rather than an ObjectDisposedException. - When sending a keep-alive ping, if the send lock is already held, that means we're actively sending something, so there's no value in also sending a keep-alive; we can simply make it a nop. - Only create the keep-alive timer if asked for. - Make a field readonly. cc: @ericeil 9535 area-System.ComponentModel TryValidateObject not returning localized text after migration from RC1 to RC2 "I have MVC project that uses some model validation outside of MVC pipe by calling directly System.ComponentModel.DataAnnotations.Validator.TryValidateObject(...) The project is for French market, so CurrentCulture and CurrentUICulture are both set to ""fr"" In RC1, this setup was returning correctly validation error messages in French. After migration to RC2, all messages are now in english, regardless of current culture that is set. Do I miss something (localization package or different runtime), or is this a bug ? " 9536 area-System.Net Add retry to GetConnectedWebSocket To hopefully avoid spurious failures when connecting to the remote endpoint. cc: @cipop, @davidsh, @ericeil 9537 area-System.Net Allow default xunit parallelization for System.Net.Http.Functional.Tests The System.Net.Http functional tests currently run serially, but the stated reasons for disabling xunit's parallelism no longer exist. The only remaining reason I see for them to not run concurrently is that some of the tests exercise EventSources/DiagnosticSources, which affect the entire process. This PR: - Makes each of those tests run in its own process, so that they don't affect and are unaffected by other tests in the same process - Enables the default xunit parallelism No test logic was changed in this PR, other than moving some tests to their own file and wrapping the body of those tests with RemoveInvoke. As a result, the innerloop execution time drops on my machine from ~60s to ~40s. The majority of the remaining time is spent in the HttpClientHandlerTest class, and simply by splitting up that class, the execution time can easily be dropped to ~15s on a quad core, resulting in xunit's default parallelism level being 4. (I've not done that in this PR, however.) cc: @davidsh, @cipop, @ericeil, @Priya91 9538 area-System.Net MulticastInterface_Set_AnyInterface_Succeeds failing on Fedora in CI Since https://github.com/dotnet/corefx/pull/9471 was merged, all Fedora runs appear to be failing in this test with this error: ``` System.Net.Sockets.Tests.SocketOptionNameTest.MulticastInterface_Set_AnyInterface_Succeeds [FAIL] System.Net.Sockets.SocketException : Connection timed out Stack Trace: at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at System.Net.Sockets.Tests.SocketOptionNameTest.MulticastInterface_Set_Helper(Int32 interfaceIndex) ``` 9539 area-System.Runtime Why System.Runtime.Loader isn't available on UWP? Load assembly at runtime is very useful for app extension purpose. UWP apps can have the codeGeneration capability. And there is VirtualProtectFromApp function. Why System.Runtime.Loader isn't available on UWP? 9541 area-System.Net Uri.TryCreate method throws NullReferenceException "NullReferenceException is thrown at the line https://github.com/dotnet/corefx/blob/master/src/System.Private.Uri/src/System/Uri.cs#L2042 (_syntax is null) for the following call: ``` System.Uri url; System.Uri.TryCreate(""http:Ç"", System.UriKind.RelativeOrAbsolute, out url); ``` with the stack trace ``` at System.Uri.CreateUriInfo(Flags cF) at System.Uri.EnsureUriInfo() at System.Uri.ParseRemaining() at System.Uri.EnsureParseRemaining() at System.Uri.InitializeUri(ParsingError err, UriKind uriKind, UriFormatException& e) at System.Uri.CreateHelper(String uriString, Boolean dontEscape, UriKind uriKind, UriFormatException& e) at System.Uri.TryCreate(String uriString, UriKind uriKind, Uri& result) at ConsoleApplication36.Program.Main(String[] args) at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() ``` https://connect.microsoft.com/VisualStudio/feedback/details/2826777/uri-trycreate-method-throws-nullreferenceexception " 9542 area-System.Net Uri parser supports paths wrt. RFC3986-5.4.2 "Unicode relative paths with known schemes that have without ""//"" characters are parsed correctly. Fix #9541 " 9543 area-System.Net Test failure: Manual_CertificateSentMatchesCertificateReceived_Success "The test as currently written fails sporadically on Windows. If, however, `GC.Collect(); GC.WaitForPendingFinalizers();` is added inside the loop here: https://github.com/dotnet/corefx/blob/483aa5a3012fe78ea001ece1b0404b18c0b90a29/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs#L117 the `reuseClient==false` test fails deterministically for me with the error ""The client certificate credentials were not recognized"". It appears something is getting finalized and preventing the same certificate instance from being used with subsequent HttpClientHandler instances. " 9544 area-System.Net Tweak HTTP client certificates test and add ActiveIssue With GC/finalization at the right moment, the test currently fails on Windows. https://github.com/dotnet/corefx/issues/9543 cc: @davidsh, @cipop, @ericeil 9545 area-System.Security Make KeyDerivationAlgorithm a primitive @bartonjs I think this would allow for more flexibility than simply parameterizing Rfc2898DeriveBytes, UWP already has concepts of KeyDerivationAlgorithm, HashAlgorithm, MacAlgorithm, AsymmetricAlgorithm and SymmetricAlgorithm defined. 9547 area-Serialization Performance Improvments on Reflection Based De-serialization The fix improves the performance of reflection based de-serialization. The basic idea was to cache useful information acquired via reflection when de-serializing collections and create delegates for reflection invokes. The table below shows the results of the perf test runs, | DeSerializationTest | numberOfRuns | testSize | Baseline | Fix | Diff | | --- | --- | --- | --- | --- | --- | | ByteArray | 100 | 1024 | 0.563 | 0.597 | 6.04% | | ByteArray | 5 | 1048576 | 21.4 | 21.8 | 1.87% | | String | 10000 | 128 | 23.7 | 24.6 | 3.80% | | String | 10000 | 1024 | 48.6 | 47.9 | -1.44% | | ListOfInt | 1000 | 128 | 611 | 64.9 | -89.38% | | ListOfInt | 100 | 1024 | 494 | 46.8 | -90.53% | | ListOfInt | 1 | 1048576 | 5.07E+03 | 474 | -90.65% | | Dictionary | 1000 | 128 | 694 | 497 | -28.39% | | Dictionary | 100 | 1024 | 539 | 368 | -31.73% | | SimpleType | 10 | 1 | 0.616 | 0.31 | -49.68% | | SimpleType | 1 | 15 | 2.21E+03 | 1.07E+03 | -51.58% | | ISerializable | 10000 | -1 | 73.2 | 76.2 | 4.10% | | XmlElement | 10000 | -1 | 34.6 | 35.2 | 1.73% | | ArrayOfSimpleType | 1000 | 128 | 1.90E+03 | 394 | -79.26% | | ArrayOfSimpleType | 100 | 1024 | 1.53E+03 | 294 | -80.78% | | ListOfSimpleType | 1000 | 128 | 1.77E+03 | 371 | -79.04% | | ListOfSimpleType | 100 | 1024 | 1.43E+03 | 290 | -79.72% | | DictionaryOfSimpleType | 1000 | 128 | 1.81E+03 | 934 | -48.40% | | DictionaryOfSimpleType | 100 | 1024 | 1.44E+03 | 721 | -49.93% | 9548 area-System.Net Allow the HTTP2 protocol test to pass with untrusted chains on Debian. "The TLS context is set up to make this chain: CN=http2.akamai.com, O=Akamai Technologies Inc., L=Santa Clara, S=CA, C=US CN=Verizon Akamai SureServer CA G14-SHA2, OU=Cybertrust, O=Verizon Enterprise Solutions, L=Amsterdam, C=NL CN=Baltimore CyberTrust Root, OU=CyberTrust, O=Baltimore, C=IE CN=GTE CyberTrust Global Root, OU=""GTE CyberTrust Solutions, Inc."", O=GTE Corporation, C=US making use of the cross-signed Baltimore CyberTrust Root certificate. Unfortunately, that chain is not trusted on Debian 8.4 (GTE CyberTrust Global Root was removed), and a combination of data and installed software results in the valid chain using the self-signed Baltimore root is never built. To prevent this situation from making the tests show as a failure, selectively allow Debian 8 to succeed on an incomplete chain. " 9550 area-System.Xml [dev/xml] Port XslCompiledTransform tests This needs to be done as a part of dev/xml branch work. Workload size: large 9555 area-System.IO FileSystem: Expand CanCreateSymlinks test Make it harder to pass the CanCreateSymbolicLinks check so that tests don't fail on some systems where a file symlink can be created but a directory symlink can't be. Also adds a File.Exists/Directory.Exists check to provide a bit more strengthening to the CanCreateSymbolicLinks check. likely resolves #9009 9556 area-Meta Update new API's to netstandard1.7 Once we have a nuget client that support NS1.7 (https://github.com/NuGet/Home/issues/2998) then we need to update a number of our contracts, particularly in the dev/api branch, to target NS1.7 9559 area-System.Security Compat work for Crypto Need to define how much we want to do here. 9562 area-System.IO Update System.IO target version to NS1.7 When #9556 is available we need to update System.IO. 9565 area-System.Net Several more WebSocket tweaks "- Refactor out of the ReceiveAsyncPrivate method the portions responsibility for handling the close, ping, and pong messages; this slightly increases allocations for handling those, but helps with the send/receive cases. - Ensure we capture an exception into the task returned from SendAsync rather than throwing it out synchronously - Properly handle a few more ""bad message"" cases. We're now passing 100% of the autobahn WebSockets tests (other than the ""unimplemented"" compression ones). cc: @ericeil " 9570 area-System.Diagnostics Proposal: support for local variables in SymbolReader for Portable PDB, Linux To support getting names of local variables from Portable PDB (see dotnet/coreclr#5809) the following method should be added to System.Diagnostics.Debug.SymbolReader (#8981): ``` c# public static bool GetLocalVariableName(string assemblyFileName, int methodToken, int localIndex, out IntPtr localVarName) { } ``` The output parameter `localVarName` is supposed to be marshaled as BSTR to native code. @lucenticus @mikem8361 @seanshpark @chunseoklee 9576 area-System.Net Removed redundant calls to SetFieldsFromUri() in UriBuilder SetFieldsFromUri() is more or less identical to Init() (which for some reason calls SetFieldsFromUri() resulting in UriBuilder being initialized twice). The only other place it's called is in the Uri property after the new Uri object has been constructed. It doesn't make sense for a UriBuilder to re-initialize itself with the information it just used to construct a new Uri object. 9577 area-System.Net Fix MulticastInterface_Set_Helper in Fedora Outerloop runs Attempt to work around routing issues in the test environment by manually sending from the same interface we'll receive on. Fixes #9538. 9578 area-System.Net "System.ArgumentNullException: ""SafeHandle cannot be null"" on every http request" Looks like we missed this in WCF HelloWorld perf/stress :( There is a System.ArgumentNullException per WCF request which gets handled and the request proceeds successfully, but the exception isn't the most performant way to control the execution flow ... I didn't dig into the details on why it happens (whether it needs a multi-threaded access to http client or not), I only have the call stack for now: ``` System.StubHelpers.StubHelpers.SafeHandleAddRef(System.Runtime.InteropServices.SafeHandle, Boolean ByRef) Interop+WinHttp.WinHttpSetOption(SafeWinHttpHandle, UInt32, UInt32 ByRef, UInt32) DomainBoundILStubClass.IL_STUB_PInvoke(SafeWinHttpHandle, UInt32, UInt32 ByRef, UInt32) System.Net.Http.WinHttpHandler+d__101.MoveNext() System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.RunWithDefaultContext() System.Threading.ThreadPoolWorkQueue.Dispatch() ``` 9580 area-System.Net Disable SocketOptionNameTest.MulticastInterface_Set_AnyInterface_Succeeds on Fedora 23 Disable `SocketOptionNameTest.MulticastInterface_Set_AnyInterface_Succeeds` on Fedora, while we investigate why this test has been failing (#9538). 9581 area-System.Collections System.Collections.BitArray tests fail for netcore50aot "There's a slight difference in the implementations of `System.Collections.BitArray` in mscorlib and for netcore50aot (which is in the corefx repository): netcore50aot includes a parameter name for an exception, while mscorlib does not. [coreclr/mscorlib](https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/Collections/BitArray.cs#L390): ``` if (array is int[]) { // .... } else if (array is byte[]) { // .... } else if (array is bool[]) { // .... } else throw new ArgumentException(Environment.GetResourceString(""Arg_BitArrayTypeUnsupported"")); // No argument name in this message. ``` [corefx/netcore50aot](https://github.com/dotnet/corefx/blob/master/src/System.Collections/src/System/Collections/BitArray.cs#L422) ``` if (array is int[]) { // ..... } else if (array is byte[]) { // .... } else if (array is bool[]) { // .... } else throw new ArgumentException(SR.Arg_BitArrayTypeUnsupported, nameof(array)); // Uses name of argument ``` ...this is causing tests to fail, because the tests verify the non-existence of the parameter name. What should be done in this case? Remove the parameter name from the version in corefx? Add them to mscorlib (perhaps in future)? (more classes' tests may fail, these are just the one I've been investigating) " 9582 area-Serialization Compat work for Serialization Devise our plan for increasing compatibility with serialization, and break out the work. 9583 area-System.Text Compat work for Encoding (for Windows) ~70 types and members on the types, among these types: ``` System.Text.Decoder System.Text.DecoderExceptionFallbackBuffer System.Text.DecoderReplacementFallbackBuffer System.Text.Encoder System.Text.EncoderExceptionFallbackBuffer System.Text.EncoderReplacementFallbackBuffer System.Text.Encoding System.Text.EncodingInfo System.Text.UnicodeEncoding ``` 9596 area-System.Net Uri.TryCreate creates wrong Uri "Uri class duplicates everytrhing after the colon when scheme is unknown and there are unicode characters in the uri. `Uri.TryCreate(""scheme:Ç"", System.UriKind.RelativeOrAbsolute, out url);` creates `""scheme:ÇÇ""`, `Uri.TryCreate(""scheme:Ç/Ğ/İ?a=b"", System.UriKind.RelativeOrAbsolute, out url);` creates `""scheme:Ç/Ğ/İ?a=bÇ/Ğ/İ?a=b""`. https://connect.microsoft.com/VisualStudio/feedback/details/2844324 " 9597 area-System.Net Uri supports unknown schemes wrt. RFC3986-5.4.2 "Unicode relative paths with unknown schemes without ""//"" characters are parsed correctly. Fix #9596 " 9600 area-Infrastructure [ARM/Linux] Fix build break: /usr/bin/objcopy: Unable to recognise the format of the input file ... ARM cross build on Ubuntu 14.04LTS is stop with following message. ``` /home/sjlee/git/corefx/bin/obj/Linux.arm.Release/Native/System.IO.Compression.Native/System.IO.Compression.Native.so.dbg Reaping winning child 0x01168930 PID 6432 cd /home/sjlee/git/corefx/bin/obj/Linux.arm.Release/Native/System.IO.Compression.Native && /usr/bin/objcopy --only-keep-debug /home/sjlee/git/corefx/bin/obj/Linux.arm.Release/Native/System.IO.Compression.Native/System.IO.Compression.Native.so /home/sjlee/git/corefx/bin/obj/Linux.arm.Release/Native/System.IO.Compression.Native/System.IO.Compression.Native.so.dbg Live child 0x01168930 (System.IO.Compression.Native/System.IO.Compression.Native.so) PID 6433 /usr/bin/objcopy: Unable to recognise the format of the input file `/home/sjlee/git/corefx/bin/obj/Linux.arm.Release/Native/System.IO.Compression.Native/System.IO.Compression.Native.so' Reaping losing child 0x01168930 PID 6433 make[2]: *** [System.IO.Compression.Native/System.IO.Compression.Native.so] Error 1 Removing child 0x01168930 PID 6433 from chain. make[2]: Leaving directory `/home/sjlee/git/corefx/bin/obj/Linux.arm.Release/Native' Reaping losing child 0x008abc00 PID 6413 make[1]: *** [System.IO.Compression.Native/CMakeFiles/System.IO.Compression.Native.dir/all] Error 2 Removing child 0x008abc00 PID 6413 from chain. make[1]: Leaving directory `/home/sjlee/git/corefx/bin/obj/Linux.arm.Release/Native' Reaping losing child 0x01a8c5c0 PID 6409 make: *** [all] Error 2 Removing child 0x01a8c5c0 PID 6409 from chain. Failed to build corefx native components. Command exited with non-zero status 1 1.76user 1.17system 0:02.91elapsed 101%CPU (0avgtext+0avgdata 39456maxresident)k 0inputs+17168outputs (0major+428797minor)pagefaults 0swaps ``` It was caused by wrong reference of toolchain `/usr/bin/objcopy` instead `/usr/bin/arm-linux-gnueabihf-objcopy` during cross build. 9605 area-System.Runtime Port the new UTF8 API and contract to 4.6.3 and remove APICompact exception 9608 area-System.Net Add server-side SslStream support for SNI and multiple server certificates https://tools.ietf.org/html/rfc6066#section-3 This is needed for servers servicing multiple host names. https://github.com/aspnet/KestrelHttpServer/issues/241 9623 area-Infrastructure Code coverage broken, again, due to missing .pdbs "The RunTests.cmd isn't copying the .pdb file for the target assembly to the execution directory. As a result, code coverage doesn't produce any results. For example: ``` c:\Users\stoub\Source\repos\corefx\src\System.Linq.Parallel\tests>msbuild /v:m /t:rebuildandtest /p:Coverage=true Microsoft (R) Build Engine version 14.0.25123.0 Copyright (C) Microsoft Corporation. All rights reserved. System.Linq.Parallel -> c:\Users\stoub\Source\repos\corefx\bin\ref\System.Linq.Parallel\4.0.0.0\System.Linq.Parallel.dll System.Linq.Parallel -> c:\Users\stoub\Source\repos\corefx\bin\ref\System.Linq.Parallel\4.0.0.0\System.Linq.Parallel.dll System.Linq.Parallel -> c:\Users\stoub\Source\repos\corefx\bin\AnyOS.AnyCPU.Debug\System.Linq.Parallel\System.Linq.Parallel.dll System.Linq.Parallel -> c:\Users\stoub\Source\repos\corefx\bin/packages/Debug/specs/System.Linq.Parallel.nuspec System.Linq.Parallel.Tests -> c:\Users\stoub\Source\repos\corefx\bin\AnyOS.AnyCPU.Debug\System.Linq.Parallel.Tests\System.Linq.Parallel.Tests.dll Using c:\Users\stoub\Source\repos\corefx\packages/ as folder for resolving package dependencies. Executing in c:\Users\stoub\Source\repos\corefx\bin\tests\AnyOS.AnyCPU.Debug\System.Linq.Parallel.Tests\netcoreapp1.0\ Hard linking dependent files... Finished linking needed files, moving to running tests. Running tests... Start time: 9:37:20.24 Command(s): c:\Users\stoub\Source\repos\corefx\packages/OpenCover\4.6.519\tools\OpenCover.Console.exe -oldStyle -filter:""+[*]* -[*.Tests]* -[xunit.*]*"" -excludebyfile:""* \Common\src\System\SR.*"" -nodefaultfilters -excludebyattribute:*.ExcludeFromCodeCoverage* -skipautoprops -hideskipped:All -threshold:1 -returntargetcode -reg ister:user -target:CoreRun.exe -output:c:\Users\stoub\Source\repos\corefx\bin/tests/coverage\System.Linq.Parallel.Tests.coverage.xml -targetargs:""xunit.conso le.netcore.exe System.Linq.Parallel.Tests.dll -xml testResults.xml -notrait Benchmark=true -notrait category=OuterLoop -notrait category=failing -notrait c ategory=nonwindowstests "" Executing: c:\Users\stoub\Source\repos\corefx\bin\tests\AnyOS.AnyCPU.Debug\System.Linq.Parallel.Tests\netcoreapp1.0\CoreRun.exe xUnit.net console test runner (64-bit .NET Core) Copyright (C) 2014 Outercurve Foundation. Discovering: System.Linq.Parallel.Tests Discovered: System.Linq.Parallel.Tests Starting: System.Linq.Parallel.Tests Finished: System.Linq.Parallel.Tests === TEST EXECUTION SUMMARY === System.Linq.Parallel.Tests Total: 21007, Errors: 0, Failed: 0, Skipped: 0, Time: 9.131s Committing... No results, this could be for a number of reasons. The most common reasons are: 1) missing PDBs for the assemblies that match the filter please review the output file and refer to the Usage guide (Usage.rtf) about filters. 2) the profiler may not be registered correctly, please refer to the Usage guide and the -register switch. Finished running tests. End time= 9:37:31.92, Exit code = 0 Loading report 'c:\Users\stoub\Source\repos\corefx\bin\tests\coverage\System.Linq.Parallel.Tests.coverage.xml' Preprocessing report Initiating parser for OpenCover Initializing report builders for report types: Html, Badges Analyzing 0 classes Creating summary Report generation took 0.2 seconds c:\Users\stoub\Source\repos\corefx\src\System.Linq.Parallel\tests> ``` Note the ""No results"" part. The RunTests.cmd shows that the .dll is being copied but not the .pdb: ``` call :copyandcheck ""%PACKAGE_DIR%\c:\Users\stoub\Source\repos\corefx\bin\AnyOS.AnyCPU.Debug\System.Linq.Parallel\System.Linq.Parallel.dll"" ""%EXECUTION_DIR%\System.Linq.Parallel.dll"" || exit /b -1 ``` If I manually copy over the .pdb to the execution directory, then it works. " 9624 area-System.Net Fix logic with setting response body receive timeout Due to code moving around with PR #8996, the `state.RequestHandle` was already null when trying to set the receive timeout for the response body. This generated an exception which was caught internally. This fix moves the setting of the receive timeout so that it has a valid `state.RequestHandle` to use. Fixes #9578 9626 area-System.Console ARM64: System.Console.Tests ``` WindowAndCursorProps.SetWindowSize [FAIL] System.ArgumentOutOfRangeException : The new console window size would force the console buffer size to be too large. Parameter name: width Actual value was 241. Stack Trace: at System.ConsolePal.SetWindowSize(Int32 width, Int32 height) at System.Console.set_WindowWidth(Int32 value) at WindowAndCursorProps.SetWindowSize() Finished: System.Console.Tests === TEST EXECUTION SUMMARY === System.Console.Tests Total: 75, Errors: 0, Failed: 1, Skipped: 0, Time: 15.235s Finished running tests. End time= 8:33:55.37, Exit code = 1 ``` 9627 area-System.Data ARM64: System.Data.SqlClient.Tests ``` System.Data.SqlClient.Tests.SqlErrorCollectionTest.Indexer_Success [FAIL] System.TypeInitializationException : The type initializer for 'System.Data.SqlClient.TdsParser' threw an exception. ---- System.TypeInitializationException : The type initializer for 'System.Data.SqlClient.SNILoadHandle' threw an exception. -------- System.BadImageFormatException : An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B (COR_E_BADIMAGEFORMAT)) Stack Trace: at System.Data.SqlClient.TdsParser..ctor(Boolean MARS, Boolean fAsynchronous) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, TimeoutTimer timeout) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.Tests.SqlErrorCollectionTest.Indexer_Success() at System.Data.SqlClient.SqlConnection.Open() at System.Data.SqlClient.Tests.ExceptionTest.GenerateConnectionException(String connectionString) at System.Data.SqlClient.Tests.ExceptionTest.<>c__DisplayClass5_0.b__0() ----- Inner Stack Trace ----- at System.Data.SqlClient.TdsParser..cctor() ----- Inner Stack Trace ----- at System.Data.SqlClient.SNINativeMethodWrapper.SNIInitialize(IntPtr pmo) at System.Data.SqlClient.SNILoadHandle..ctor() at System.Data.SqlClient.SNILoadHandle..cctor() System.Data.SqlClient.Tests.ExceptionTest.ExceptionTests [FAIL] System.Data.SqlClient.Tests.ExceptionTest.IndependentConnectionExceptionTestOpenConnection [FAIL] System.Data.SqlClient.Tests.SqlErrorCollectionTest.CopyTo_NonGeneric_Success [FAIL] System.Data.SqlClient.Tests.SqlErrorCollectionTest.CopyTo_Throws [FAIL] System.Data.SqlClient.Tests.SqlErrorCollectionTest.IsSynchronized_Success [FAIL] System.Data.SqlClient.Tests.SqlErrorCollectionTest.SyncRoot_Success [FAIL] System.Data.SqlClient.Tests.SqlErrorCollectionTest.CopyTo_Success [FAIL] System.Data.SqlClient.Tests.SqlErrorCollectionTest.CopyTo_NonGeneric_Throws [FAIL] System.Data.SqlClient.Tests.SqlErrorCollectionTest.GetEnumerator_Success [FAIL] System.Data.SqlClient.Tests.SqlErrorCollectionTest.Indexer_Throws [FAIL] ... Finished: System.Data.SqlClient.Tests === TEST EXECUTION SUMMARY === System.Data.SqlClient.Tests Total: 82, Errors: 0, Failed: 11, Skipped: 0, Time: 8.406s ``` 9628 area-System.Diagnostics ARM64: System.Diagnostics.Process.Tests ``` System.Diagnostics.Tests.ProcessTests.TestProcessOnRemoteMachineWindows [FAIL] System.InvalidOperationException : Couldn't connect to remote machine. ---- System.InvalidOperationException : Couldn't get process information from performance counter. -------- System.InvalidOperationException : Cannot load Counter Name data because an invalid index '' was read from the registry. Stack Trace: at System.Diagnostics.NtProcessManager.GetProcessInfos(String machineName, Boolean isRemoteMachine) at System.Diagnostics.NtProcessManager.GetProcessIds(String machineName, Boolean isRemoteMachine) at System.Diagnostics.ProcessManager.GetProcessIds(String machineName) at System.Diagnostics.Process.GetProcessById(Int32 processId, String machineName) at System.Diagnostics.Tests.ProcessTests.d__39.MoveNext() at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext() ----- Inner Stack Trace ----- at System.Diagnostics.NtProcessManager.GetProcessInfos(PerformanceCounterLib library) at System.Diagnostics.NtProcessManager.GetProcessInfos(String machineName, Boolean isRemoteMachine) ----- Inner Stack Trace ----- at System.Diagnostics.PerformanceCounterLib.GetStringTable(Boolean isHelp) at System.Diagnostics.PerformanceCounterLib.get_NameTable() at System.Diagnostics.PerformanceCounterLib.GetCounterName(Int32 index) at System.Diagnostics.NtProcessManager.GetProcessInfos(PerformanceCounterLib library, Int32 processIndex, Int32 threadIndex, Byte[] data) at System.Diagnostics.NtProcessManager.GetProcessInfos(PerformanceCounterLib library) Finished: System.Diagnostics.Process.Tests === TEST EXECUTION SUMMARY === System.Diagnostics.Process.Tests Total: 88, Errors: 0, Failed: 1, Skipped: 0, Time: 42.874s ``` 9629 area-System.IO ARM64: System.IO.Compression.ZipFile.Tests ``` System.IO.Compression.Tests.ZipTest.InvalidDates [FAIL] System.IO.Compression.ZLibException : The underlying compression routine could not be loaded correctly. ---- System.BadImageFormatException : An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B (COR_E_BADIMAGEFORMAT)) Stack Trace: at System.IO.Compression.Deflater.DeflateInit(CompressionLevel compressionLevel, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy) at System.IO.Compression.Deflater..ctor(CompressionLevel compressionLevel, Int32 windowBits) at System.IO.Compression.DeflateStream.InitializeDeflater(Stream stream, Boolean leaveOpen, Int32 windowBits, CompressionLevel compressionLevel) at System.IO.Compression.DeflateStream..ctor(Stream stream, CompressionMode mode, Boolean leaveOpen, Int32 windowBits) at System.IO.Compression.ZipArchiveEntry.GetDataCompressor(Stream backingStream, Boolean leaveBackingStreamOpen, EventHandler onClose) at System.IO.Compression.ZipArchiveEntry.OpenInWriteMode() at System.IO.Compression.ZipArchiveEntry.Open() at System.IO.Compression.ZipFileExtensions.DoCreateEntryFromFile(ZipArchive destination, String sourceFileName, String entryName, Nullable`1 compressionLevel) at System.IO.Compression.Tests.ZipTest.InvalidDates() ----- Inner Stack Trace ----- at Interop.zlib.deflateInit2_(Byte* stream, Int32 level, Int32 method, Int32 windowBits, Int32 memLevel, Int32 strategy, Byte* version, Int32 stream_size) at Interop.zlib.DeflateInit2_(ZStream& stream, CompressionLevel level, CompressionMethod method, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy) at System.IO.Compression.ZLibNative.ZLibStreamHandle.DeflateInit2_(CompressionLevel level, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy) at System.IO.Compression.Deflater.DeflateInit(CompressionLevel compressionLevel, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy) System.IO.Compression.Tests.ZipTest.CreateEntryFromFileTest(withCompressionLevel: True) [FAIL] System.IO.Compression.Tests.ZipTest.CreateEntryFromFileTest(withCompressionLevel: False) [FAIL] System.IO.Compression.Tests.ZipTest.FilesOutsideDirectory [FAIL] System.IO.Compression.Tests.ZipTest.DirectoryEntryWithData [FAIL] System.IO.Compression.Tests.ZipTest.CreateFromDirectoryNormal [FAIL] System.IO.Compression.Tests.ZipTest.ReadStreamOps [FAIL] System.IO.Compression.Tests.ZipTest.UpdateAddFile [FAIL] System.IO.Compression.Tests.ZipTest.ExtractToDirectoryNormal [FAIL] System.IO.Compression.Tests.ZipTest.UpdateReadTwice [FAIL] System.IO.Compression.Tests.ZipTest.UnsupportedCompression [FAIL] System.IO.Compression.Tests.ZipTest.ExtractToDirectoryTest [FAIL] === TEST EXECUTION SUMMARY === System.IO.Compression.ZipFile.Tests Total: 24, Errors: 0, Failed: 12, Skipped: 0, Time: 11.467s ``` 9630 area-System.IO ARM64: System.IO.Packaging.Tests ``` System.IO.Packaging.Tests.Tests.T168_InvalidRelationshipId [FAIL] System.IO.Compression.ZLibException : The underlying compression routine could not be loaded correctly. ---- System.BadImageFormatException : An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B (COR_E_BADIMAGEFORMAT)) Stack Trace: at System.IO.Compression.Deflater.DeflateInit(CompressionLevel compressionLevel, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy) at System.IO.Compression.Deflater..ctor(CompressionLevel compressionLevel, Int32 windowBits) at System.IO.Compression.DeflateStream.InitializeDeflater(Stream stream, Boolean leaveOpen, Int32 windowBits, CompressionLevel compressionLevel) at System.IO.Compression.DeflateStream..ctor(Stream stream, CompressionLevel compressionLevel, Boolean leaveOpen, Int32 windowBits) at System.IO.Compression.ZipArchiveEntry.GetDataCompressor(Stream backingStream, Boolean leaveBackingStreamOpen, EventHandler onClose) at System.IO.Compression.ZipArchiveEntry.WriteLocalFileHeaderAndDataIfNeeded() at System.IO.Compression.ZipArchive.WriteFile() at System.IO.Compression.ZipArchive.Dispose(Boolean disposing) at System.IO.Packaging.ZipPackage.Dispose(Boolean disposing) at System.IO.Packaging.Package.System.IDisposable.Dispose() at System.IO.Packaging.Tests.Tests.T168_InvalidRelationshipId() ----- Inner Stack Trace ----- at Interop.zlib.deflateInit2_(Byte* stream, Int32 level, Int32 method, Int32 windowBits, Int32 memLevel, Int32 strategy, Byte* version, Int32 stream_size) at Interop.zlib.DeflateInit2_(ZStream& stream, CompressionLevel level, CompressionMethod method, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy) at System.IO.Compression.ZLibNative.ZLibStreamHandle.DeflateInit2_(CompressionLevel level, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy) at System.IO.Compression.Deflater.DeflateInit(CompressionLevel compressionLevel, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy) ... === TEST EXECUTION SUMMARY === System.IO.Packaging.Tests Total: 131, Errors: 0, Failed: 112, Skipped: 0, Time: 26.291s ``` 9631 area-System.Linq ARM64: System.Linq.Expressions.Tests ``` System.Linq.Expressions.Tests.BinaryModuloTests.CheckLongModuloTest(useInterpreter: False) [FAIL] Assert.Equal() Failure Expected: 0 Actual: -1 Stack Trace: at System.Linq.Expressions.Tests.BinaryModuloTests.VerifyLongModulo(Int64 a, Int64 b, Boolean useInterpreter) at System.Linq.Expressions.Tests.BinaryModuloTests.CheckLongModuloTest(Boolean useInterpreter) System.Linq.Expressions.Tests.BinaryModuloTests.CheckUShortModuloTest(useInterpreter: False) [FAIL] Assert.Equal() Failure Expected: 0 Actual: 65535 Stack Trace: at System.Linq.Expressions.Tests.BinaryModuloTests.VerifyUShortModulo(UInt16 a, UInt16 b, Boolean useInterpreter) at System.Linq.Expressions.Tests.BinaryModuloTests.CheckUShortModuloTest(Boolean useInterpreter) System.Linq.Expressions.Tests.BinaryModuloTests.CheckULongModuloTest(useInterpreter: False) [FAIL] Assert.Equal() Failure Expected: 0 Actual: 18446744073709551615 Stack Trace: at System.Linq.Expressions.Tests.BinaryModuloTests.VerifyULongModulo(UInt64 a, UInt64 b, Boolean useInterpreter) at System.Linq.Expressions.Tests.BinaryModuloTests.CheckULongModuloTest(Boolean useInterpreter) System.Linq.Expressions.Tests.BinaryModuloTests.CheckUIntModuloTest(useInterpreter: False) [FAIL] Assert.Equal() Failure Expected: 0 Actual: 4294967295 Stack Trace: at System.Linq.Expressions.Tests.BinaryModuloTests.VerifyUIntModulo(UInt32 a, UInt32 b, Boolean useInterpreter) at System.Linq.Expressions.Tests.BinaryModuloTests.CheckUIntModuloTest(Boolean useInterpreter) System.Linq.Expressions.Tests.BinaryModuloTests.CheckShortModuloTest(useInterpreter: False) [FAIL] Assert.Equal() Failure Expected: 0 Actual: -1 Stack Trace: at System.Linq.Expressions.Tests.BinaryModuloTests.VerifyShortModulo(Int16 a, Int16 b, Boolean useInterpreter) at System.Linq.Expressions.Tests.BinaryModuloTests.CheckShortModuloTest(Boolean useInterpreter) System.Linq.Expressions.Tests.OpAssign.AssignmentEquivalentsWithIndexAccess(nonAssign: System.Linq.Expressions.BinaryExpression Modulo(System.Linq.Expressions.Expression, System.Linq.Expressions.Expression), assign: System.Linq.Expressions.BinaryExpression ModuloAssign(System.Linq.Expressions.Expression, System.Linq.Expressions.Expression), type: typeof(int), useInterpreter: False) [FAIL] Assert.True() Failure Expected: True Actual: False Stack Trace: at System.Linq.Expressions.Tests.OpAssign.AssignmentEquivalentsWithIndexAccess(MethodInfo nonAssign, MethodInfo assign, Type type, Boolean useInterpreter) System.Linq.Expressions.Tests.OpAssign.AssignmentEquivalentsWithMemberAccess(nonAssign: System.Linq.Expressions.BinaryExpression Modulo(System.Linq.Expressions.Expression, System.Linq.Expressions.Expression), assign: System.Linq.Expressions.BinaryExpression ModuloAssign(System.Linq.Expressions.Expression, System.Linq.Expressions.Expression), type: typeof(int), useInterpreter: False) [FAIL] Assert.True() Failure Expected: True Actual: False Stack Trace: at System.Linq.Expressions.Tests.OpAssign.AssignmentEquivalentsWithMemberAccess(MethodInfo nonAssign, MethodInfo assign, Type type, Boolean useInterpreter) Finished: System.Linq.Expressions.Tests === TEST EXECUTION SUMMARY === System.Linq.Expressions.Tests Total: 25919, Errors: 0, Failed: 7, Skipped: 5, Time: 813.119s ``` 9632 area-System.IO ARM64: System.IO.Compression.Tests ``` System.IO.Compression.Tests.DeflateStreamTests.DoubleDispose [FAIL] System.IO.Compression.ZLibException : The underlying compression routine could not be loaded correctly. ---- System.BadImageFormatException : An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B (COR_E_BADIMAGEFORMAT)) Stack Trace: at System.IO.Compression.Deflater.DeflateInit(CompressionLevel compressionLevel, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy) at System.IO.Compression.Deflater..ctor(CompressionLevel compressionLevel, Int32 windowBits) at System.IO.Compression.DeflateStream.InitializeDeflater(Stream stream, Boolean leaveOpen, Int32 windowBits, CompressionLevel compressionLevel) at System.IO.Compression.DeflateStream..ctor(Stream stream, CompressionMode mode, Boolean leaveOpen, Int32 windowBits) at System.IO.Compression.Tests.DeflateStreamTests.DoubleDispose() ----- Inner Stack Trace ----- at Interop.zlib.deflateInit2_(Byte* stream, Int32 level, Int32 method, Int32 windowBits, Int32 memLevel, Int32 strategy, Byte* version, Int32 stream_size) at Interop.zlib.DeflateInit2_(ZStream& stream, CompressionLevel level, CompressionMethod method, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy) at System.IO.Compression.ZLibNative.ZLibStreamHandle.DeflateInit2_(CompressionLevel level, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy) ... === TEST EXECUTION SUMMARY === System.IO.Compression.Tests Total: 151, Errors: 0, Failed: 112, Skipped: 0, Time: 24.877s ``` 9634 area-System.IO ARM64: System.IO.FileSystem.Tests fail ``` You do not have sufficient privilege to perform this operation. Discovered: System.IO.FileSystem.Tests Starting: System.IO.FileSystem.Tests ... System.IO.Tests.Directory_EnumFiles_str_str.WindowsSearchPatternInvalid [FAIL] Assert.Throws() Failure Expected: typeof(System.IO.IOException) Actual: (No exception was thrown) Stack Trace: at System.IO.Tests.Directory_GetFileSystemEntries_str_str.WindowsSearchPatternInvalid() ... System.IO.Tests.File_Create_str_i_fo.CreateCurrentDirectory [FAIL] Assert.Throws() Failure Expected: typeof(System.UnauthorizedAccessException) Actual: typeof(System.IO.IOException): The process cannot access the file 'E:\Github\corefx\bin\tests\Windows_NT.AnyCPU.Release\System.IO.FileSystem.Tests\netcoreapp1.0' because it is being used by another process. Stack Trace: at System.IO.Win32FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) at System.IO.Win32FileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.Tests.File_Create_str_i_fo.Create(String path) at System.IO.Tests.File_Create_str.b__4_0() ... System.IO.Tests.Directory_CreateDirectory.PathWithReservedDeviceNameAsExtendedPath [FAIL] Assert.All() Failure: 22 out of 22 items in the collection did not pass. [21]: System.UnauthorizedAccessException: Access to the path '\\?\E:\Github\corefx\bin\tests\Windows_NT.AnyCPU.Release\System.IO.FileSystem.Tests\netcoreapp1.0\ei4v2v0y.ww1\LPT9' is denied. at System.IO.Win32FileSystem.CreateDirectory(String fullPath) at System.IO.Directory.CreateDirectory(String path) at System.IO.Tests.Directory_CreateDirectory.Create(String path) at System.IO.Tests.Directory_CreateDirectory.<>c__DisplayClass33_0.b__0(String path) at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 act ... === TEST EXECUTION SUMMARY === System.IO.FileSystem.Tests Total: 2276, Errors: 0, Failed: 32, Skipped: 26, Time: 3924.654s ``` 9641 area-System.Security Add System.Security.Permissions.PrincipalPermission "We see this being used in apps. It does have effect in Desktop in the default configuration (unlike CAS). We could reasonably implement it cross platform. So we should add it. ``` class Program { static void Main() { new System.Security.Permissions.PrincipalPermission(""foo"", ""bar"").Demand(); } } Unhandled Exception: System.Security.SecurityException: Request for principal permission failed. at System.Security.Permissions.PrincipalPermission.ThrowSecurityException() at System.Security.Permissions.PrincipalPermission.Demand() at Program.Main() in C:\Users\stoub\Documents\Visual Studio 2015\Projects\ConsoleApplication27\ConsoleApplication27\Program.cs:line 5 ``` " 9643 area-System.Globalization Compat work for Globalization Most interesting from usage point of view are: ``` M:System.Globalization.TextInfo.get_OEMCodePage M:System.Globalization.CultureInfo.CreateSpecificCulture(System.String) M:System.Globalization.TextInfo.ToTitleCase(System.String) M:System.Globalization.CultureInfo.GetCultureInfo(System.String) M:System.Globalization.CultureInfo.get_InstalledUICulture M:System.Globalization.CultureInfo.#ctor(System.String,System.Boolean) M:System.Globalization.CompareInfo.GetSortKey(System.String) ``` Fuller list, including many with little usage in our corpora: ``` types removed T:System.Globalization.CalendarAlgorithmType T:System.Globalization.CultureTypes T:System.Globalization.DaylightTime T:System.Globalization.DigitShapes T:System.Globalization.SortKey T:System.Globalization.SortVersion ``` ``` types with changes to members System.Globalization.Calendar System.Globalization.CalendarAlgorithmType System.Globalization.CharUnicodeInfo System.Globalization.ChineseLunisolarCalendar System.Globalization.CompareInfo System.Globalization.CultureInfo System.Globalization.CultureNotFoundException System.Globalization.CultureTypes System.Globalization.DateTimeFormatInfo System.Globalization.DaylightTime System.Globalization.DigitShapes System.Globalization.EastAsianLunisolarCalendar System.Globalization.GregorianCalendar System.Globalization.HebrewCalendar System.Globalization.HijriCalendar System.Globalization.JapaneseCalendar System.Globalization.JapaneseLunisolarCalendar System.Globalization.JulianCalendar System.Globalization.KoreanCalendar System.Globalization.KoreanLunisolarCalendar System.Globalization.NumberFormatInfo System.Globalization.PersianCalendar System.Globalization.RegionInfo System.Globalization.SortKey System.Globalization.SortVersion System.Globalization.StringInfo System.Globalization.TaiwanCalendar System.Globalization.TaiwanLunisolarCalendar System.Globalization.TextInfo System.Globalization.ThaiBuddhistCalendar System.Globalization.UmAlQuraCalendar ``` 9644 area-System.Net HttpClient stripping Content-Length header after redirect on non-Windows systems "Scenario: 1) Client sends PATCH to server with some content. 2) Server sends 401 response. 3) Client add a new auth-header then re-sends PATCH to server with same content sent before. Example: Client: ``` PATCH /_apis/distributedtask/pools/1/jobrequests/34?lockToken=00000000-0000-0000-0000-000000000000 HTTP/1.1 Host: ting.tfsbuildhost3.tfsallin.net Accept-Encoding: gzip Content-Type: application/json; charset=utf-8; api-version=3.0-preview.1 Accept: application/json; api-version=3.0-preview.1 User-Agent: VSServices/15.255.65000.0 (NetStandard) VstsAgentCore-osx.10.11-x64/2.102.0 (Darwin 15.0.0 Darwin Kernel Version 15.0.0: Wed Aug 26 16:57:32 PDT 2015; root:xnu-3247.1.106~1/RELEASE_X86_64) Accept-Language: en-US X-TFS-FedAuthRedirect: Suppress X-TFS-Session: a458e637-3514-4103-9713-61bb2b32140f Content-Length: 16 Expect: 100-continue {""requestId"":34} <------ this is the content object ``` Server: ``` HTTP/1.1 401 Unauthorized Content-Type: text/html; charset=utf-8 Server: Microsoft-IIS/8.5 X-TFS-ProcessId: 8ec18195-7fd1-4116-8397-3b6fd8a2cdd6 Strict-Transport-Security: max-age=31536000; includeSubDomains Access-Control-Allow-Origin: * Access-Control-Max-Age: 3600 Access-Control-Allow-Methods: OPTIONS,GET,POST,PATCH,PUT,DELETE Access-Control-Expose-Headers: ActivityId,X-TFS-Session,X-MS-ContinuationToken Access-Control-Allow-Headers: authorization X-FRAME-OPTIONS: SAMEORIGIN X-TFS-FedAuthRealm: https://app.tfsbuildhost3.tfsallin.net/ X-TFS-FedAuthIssuer: https://tfstest.accesscontrol.windows.net/v2/wsfederation X-VSS-ResourceTenant: 00000000-0000-0000-0000-000000000000 X-TFS-SoapException: %3c%3fxml+version%3d%221.0%22+encoding%3d%22utf-8%22%3f%3e%3csoap%3aEnvelope+xmlns%3asoap%3d%22http%3a%2f%2fwww.w3.org%2f2003%2f05%2fsoap-envelope%22%3e%3csoap%3aBody%3e%3csoap%3aFault%3e%3csoap%3aCode%3e%3csoap%3aValue%3esoap%3aReceiver%3c%2fsoap%3aValue%3e%3csoap%3aSubcode%3e%3csoap%3aValue%3eUnauthorizedRequestException%3c%2fsoap%3aValue%3e%3c%2fsoap%3aSubcode%3e%3c%2fsoap%3aCode%3e%3csoap%3aReason%3e%3csoap%3aText+xml%3alang%3d%22en%22%3eTF400813%3a+Resource+not+available+for+anonymous+access.+Client+authentication+required.%3c%2fsoap%3aText%3e%3c%2fsoap%3aReason%3e%3c%2fsoap%3aFault%3e%3c%2fsoap%3aBody%3e%3c%2fsoap%3aEnvelope%3e X-TFS-ServiceError: TF400813%3a+Resource+not+available+for+anonymous+access.+Client+authentication+required. WWW-Authenticate: TFS-Federated X-TFS-FedAuthRedirect: https://app.tfsbuildhost3sps.tfsallin.net/_signin?realm=ting.tfsbuildhost3.tfsallin.net&reply_to=https%3A%2F%2Fting.tfsbuildhost3.tfsallin.net%2F_apis%2Fdistributedtask%2Fpools%2F1%2Fjobrequests%2F34%3FlockToken%3D00000000-0000-0000-0000-000000000000&redirect=1&context=eyJodCI6MiwiaGlkIjoiNDk2YThiNTgtZmFjZi00NDAzLWJkZWQtZjBiMDU5ZDBhMGY2IiwicXMiOnt9LCJyciI6Imh0dHBzOi8vYXBwLnRmc2J1aWxkaG9zdDNzcHMudGZzYWxsaW4ubmV0LyIsInZoIjoiMTluSVNfZ0VfSU9Hb2NqeGg2NEViZ21rSTBKQzBoY1N2R0pWblpVMVc4YzEiLCJjdiI6IiIsImNzIjoiIn01#ctx=eyJTaWduSW5Db29raWVEb21haW5zIjpbImh0dHBzOi8vbG9naW4ud2luZG93cy1wcGUubmV0IiwiaHR0cHM6Ly9sb2dpbi5taWNyb3NvZnRvbmxpbmUuY29tIl190 WWW-Authenticate: Basic realm=""https://app.tfsbuildhost3.tfsallin.net/"" X-VSS-S2STargetService: 00000002-0000-8888-8000-000000000000/visualstudio.com WWW-Authenticate: Bearer X-Powered-By: ASP.NET P3P: CP=""CAO DSP COR ADMa DEV CONo TELo CUR PSA PSD TAI IVDo OUR SAMi BUS DEM NAV STA UNI COM INT PHY ONL FIN PUR LOC CNT"" X-Content-Type-Options: nosniff Date: Thu, 23 Jun 2016 18:49:42 GMT Content-Length: 9867 ... ``` Client: ``` PATCH /_apis/distributedtask/pools/1/jobrequests/34?lockToken=00000000-0000-0000-0000-000000000000 HTTP/1.1 Host: ting.tfsbuildhost3.tfsallin.net Accept-Encoding: gzip Content-Type: application/json; charset=utf-8; api-version=3.0-preview.1 Accept: application/json; api-version=3.0-preview.1 User-Agent: VSServices/15.255.65000.0 (NetStandard) VstsAgentCore-osx.10.11-x64/2.102.0 (Darwin 15.0.0 Darwin Kernel Version 15.0.0: Wed Aug 26 16:57:32 PDT 2015; root:xnu-3247.1.106~1/RELEASE_X86_64) Accept-Language: en-US X-TFS-FedAuthRedirect: Suppress X-TFS-Session: a458e637-3514-4103-9713-61bb2b32140f X-VSS-UserData: Authorization: Bearer <-- since we got 401 from server, we add an auth header. eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InotVUk5MW1ZR2cyRE9oVC1kSUw4a3JGX1o3RSJ9.eyJuYW1laWQiOiJlNzViYzIxYi1hNDc0LTQzM2QtOTM5OS04Y2UzYTkyZWY1MjUiLCJzY3AiOiJ2c28uYWdlbnRwb29sc19saXN0ZW4iLCJpc3MiOiJhcHAudGZzYnVpbGRob3N0M3Nwcy50ZnNhbGxpbi5uZXQiLCJhdWQiOiJhcHAudGZzYnVpbGRob3N0M3Nwcy50ZnNhbGxpbi5uZXR8dnNvOjQ5NmE4YjU4LWZhY2YtNDQwMy1iZGVkLWYwYjA1OWQwYTBmNiIsIm5iZiI6MTQ2NjcwNzc4MywiZXhwIjoxNDY2NzExMzgzfQ.bImbtAmuTlGAVtyogb4sb5yO2AODMEpPa7sQFcyUPCxgZBD99qXEzNefSdJeup_4HT5T-SiUlZy6hUSEDf6SxKrpJhj8boRSLshwP8QYbjo_lSH-hV_NsnVHMLlGN8LE9dXV6y9PCLXuv3P8GI3S_H8OkEDqy_mE4PgcM4Nl5qUudw2zObfXQwKIXrt2M1fb1dnv5_qZTZxmiPDzG6UQrgSLcY-qtlO_fSpKqoQEpaDismFKgSBSJprHjGqalGSa3Pz9NoPJWd6gO_XyT4u5NLNwx0Kfk3HxGg6yaSCCONGuPu7oSy9qXbtrfKHAvb2UAwAzm1NeqHJQaoRVsV7aHA Transfer-Encoding: chunked <----- Content-Length is missing here, as a result, server will get null for the patch object -----> Expect: 100-continue {""requestId"":34} ``` The problem only repros on Linux or OSX, windows client works fine, seems like opposite situation to #7440 " 9650 area-System.Globalization String.Normalize() throws SEHException on Windows Server 2016 TP5 "# Repro Steps 1. Install CLI 1.0.0-preview2-003121 2. `dotnet new& dotnet restore& dotnet run` 3. Edit `Program.cs`, and change the code to `Console.WriteLine(""Hello World!"".Normalize());` 4. `dotnet run` # Expected Prints `Hello World!` # Actual On Windows Server 2012 R2, it works fine. On Windows Server 2016 TP5, it fails with the following exception: ``` Unhandled Exception: System.Runtime.InteropServices.SEHException: External component has thrown an exception. at Interop.mincore.NormalizeString(Int32 normForm, String source, Int32 sourceLength, Char[] destenation, Int32 destenationLength) at System.StringNormalizationExtensions.Normalize(String strInput, NormalizationForm normalizationForm) at System.StringNormalizationExtensions.Normalize(String strInput) at ConsoleApplication.Program.Main(String[] args) ``` I'm not sure if this is a bug in CoreFx or Windows Server 2016 TP5. " 9651 area-System.Globalization Typo in parameter names for method Interop.mincore.NormalizeString() There is a typo in the parameter names for method `Interop.mincore.NormalizeString()`. The parameters use the word `destenation` instead of `destination`. https://github.com/dotnet/corefx/blob/d0dc5fc099946adc1035b34a8b1f6042eddb0c75/src/Common/src/Interop/Windows/mincore/Interop.Normalization.cs#L37-L38 9652 area-System.Net Consider options for supporting Socket.DontFragment on Unix sockets Right now, setting `Socket.DontFragment` outside of windows results in an exception being thrown. We do not have a mapping for this option in `Interop.Sys.SetSockOpt`. It would be nice for this to work, especially if we can get the same behavior as Windows. It looks like there are a couple of options. Supposedly, there exists `IP_DONTFRAG` on some systems (https://www.ibm.com/support/knowledgecenter/ssw_i5_54/apis/ssocko.htm). I'm not sure if any of the systems we support actually have this. Ubuntu/CentOS don't seem to. There is another option, `IP_MTU_DISCOVER` (http://man7.org/linux/man-pages/man7/ip.7.html), which seems to control what we want: ``` Set or receive the Path MTU Discovery setting for a socket. When enabled, Linux will perform Path MTU Discovery as defined in RFC 1191 on SOCK_STREAM sockets. For non-SOCK_STREAM sockets, IP_PMTUDISC_DO forces the don't-fragment flag to be set on all outgoing packets. ``` I'm not familiar with the difference between SOCK_STREAM and non-SOCK_STREAM sockets is, or which we use in our implementation. If we use non-SOCK_STREAM sockets, this seems like a good option. For reference, it looks like [mono](https://github.com/mono/mono/blob/91734968b83a0971c041254286cdc903b26564e2/mono/metadata/socket-io.c#L445) uses `IP_DONTFRAGMENT` or `IP_MTU_DISCOVER`, based on which is available. Presumably, `IP_DONTFRAGMENT` is only available on Windows. If we use `IP_MTU_DISCOVER`, we need to set the value to `IP_PMTUDISC_DO`, according to the above manpage. @ericeil , @pgavlin 9657 area-System.IO Add support for 7z/LZMA1/LZMA2 to System.IO.Compression http://7-zip.org/sdk.html 9664 area-System.Globalization Missing creation of StringComparer for other languages "I'm trying to retarget a portable C# library for .Net core 1.0. I used to do something like this to get a string comparer for a different language, once I obtained a CultureInfo object for the language (via a delegate set by the caller): IComparer comparer = (IComparer)StringComparer.Create(cultureInfo, caseInsensitive); .Net Core currently seems to only support it for the current culture via properties like StringComparer.CurrentCulture. Is there a way to get a string comparer for a given language or culture? This is important for an app that uses multiple languages simultaneously, such as an app for language-learning. From a StackOverflow post I made (http://stackoverflow.com/questions/37801425/how-to-create-stringcomparer-for-different-languages-in-net-core?s=1|2.5892) I got this: ""So, you could set Thread.CurrentThread.CurrentCulture to the desired culture, then grab the StringComparer for that culture using StringComparer.CurrentCulture, then set the Thread.CurrentThread.CurrentCulture to the next desired culture, then grab another StringComparer ... etc."" But it seems it could be better. If it's going to be different from the old .Net, how about something even simpler like: public static StringComparer Create(string languageCode) where language code is a language code such as ""en"" or ""en-us"". Thanks. -John " 9665 area-System.Net Fix HttpRequestMessage reuse handling in HttpClientHandler on Unix HttpRequestMessages are meant to be used for a single request. However, that checking is done by HttpClient rather than by HttpClientHandler. As a result, if code bypasses HttpClient, e.g. by using HttpMessageInvoker or by using a custom HttpMessageHandler sitting between the HttpClient and the HttpClientHandler, the same HttpRequestMessage can be used multiple times without an exception being thrown warning of the invalid usage. And on Windows, things happen to work, but with our Unix implementation was never expecting this scenario and doesn't work well with it: - The handler is explicitly disposing of the request content stream rather than leaving that up to the request content's disposal to handle. - The handler is removing the Content-Length header from the request message content, as a simple way to avoid overriding the Content-Length header that libcurl itself may send based on previous configuration. - The handler is using ReadAsStreamAsync to get the request stream to send, but ReadAsStreamAsync caches the returned stream, so if the same request message is reused with the same Content, the stream will have already advanced to the end of the stream, and when the message gets reused, we won't have content to send. This commit fixes that: - We now don't dispose the request content stream. That'll be left up to the request content's disposal. - We now don't remove the ContentLength header from the request message. We instead just check as we're writing out the headers whether the header is Content-Length, skipping it if it is. - We now store the original position of a seekable stream that's provided to us, and at the end of the request, rather than disposing of the stream, we rewind to the original position if it exists. (If the stream isn't seekable, reusing the request message wouldn't be possible anyway.) This last point also fixes another theoretical issue. When libcurl wants to go back to the beginning of the stream (e.g. in a redirect scenario where it needs to rewind), it asks us to seek back to the beginning. We're currently seeking back to the exact position asked for. But the stream may have come in to us already advanced beyond 0, in which case we need to seek back to the requested offset plus that original position rather than just the requested offset. And in doing this, I noticed that we were inadvertently allowing a set of closure/delegate allocations due to inadvertently using some captured state in a place where we were trying to avoid that. I fixed that as well. We were also marking everything complete before we'd cleaned up all resources, which meant that any failures from such cleanup would go unnoticed. I've fixed that to ensure we clean up all state before we officially declare the async operation done. Fixes #9644 cc: @ericeil, @davidsh 9669 area-System.Diagnostics Trace uses the string DEFAULT_APPNAME unconditionally in logged messages "This looks like a temporary workaround that was never fully resolved, and got lost in an old bug tracker. https://github.com/dotnet/corefx/blob/d0dc5fc099946adc1035b34a8b1f6042eddb0c75/src/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceInternal.cs#L52 ``` CSharp // This needs to be updated once we have the correct property implemented in the Environment class. // Bug:895000 is tracking this. s_appName = ""DEFAULT_APPNAME""; ``` Desktop uses the code below, which may not be a good idea in today's world where the first command-line arg is often the CLR host. ``` CSharp appName = Path.GetFileName(Environment.GetCommandLineArgs()[0]); ``` I propose we use `Assembly.GetEntryAssembly()`, but it would require us to bump the support up to `netstandard1.5`: ``` CSharp s_appName = Assembly.GetEntryAssembly().GetName().Name; ``` " 9670 area-System.Diagnostics Line number is incorrect in the stack trace of the exception thrown in middleware on x64 machines "I have created a repro for this issue at https://github.com/JunTaoLuo/TestHost/tree/johluo/stack-trace-zip for incorrect line numbers in the stack trace of exceptions thrown. Run the sample at `/samples/TestMiddlewareSample` with `dotnet run` after restoring packages. Then navigate to `http://localhost:5000/MiddlewareException` to trigger an exception at https://github.com/JunTaoLuo/TestHost/blob/johluo/stack-trace-zip/src/TestMiddleware/TestMiddleware.cs#L24. In the console of a x64 machine (Windows, Linux and Mac), however, I see the following stack trace report that the exception is thrown on line 27 instead: ``` == Test Middleware == Request Path: /MiddlewareException fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id ""0HKSSBS4L43JJ"": An unhandled exception was thrown by the application. System.Exception: Middleware Exception at TestHost.TestMiddleware.d__2.MoveNext() in C:\gh\tp\TestHost\src\TestMiddleware\TestMiddleware.cs:line 27 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.d__3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Frame`1.d__2.MoveNext() ``` The incorrect line number doesn't affect all exceptions though. In the repro, navigating to `http://localhost:5000` will trigger an exception at https://github.com/JunTaoLuo/TestHost/blob/johluo/stack-trace-zip/sample/TestMiddlewareSample/Startup.cs#L16. This exception is reported correctly: ``` == Test Middleware == Request Path: / fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id ""0HKSSBS4L43JJ"": An unhandled exception was thrown by the application. System.Exception: Application Exception at TestHost.Sample.Startup.<>c.b__0_0(HttpContext context) in C:\gh\tp\TestHost\sample\TestMiddlewareSample\Startup.cs:line 16 at TestHost.TestMiddleware.d__2.MoveNext() in C:\gh\tp\TestHost\src\TestMiddleware\TestMiddleware.cs:line 27 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.d__3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Frame`1.d__2.MoveNext() ``` I also see that this problem seems to only affect x64 machines. On a Windows x86 machine I see that the exceptions contain the correct line numbers: ``` == Test Middleware == Request Path: / fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id ""0HKSSB81Q7FVP"": An unhandled exception was thrown by the application. System.Exception: Application Exception at TestHost.Sample.Startup.<>c.b__0_0(HttpContext context) in C:\gh\tp\TestHost\sample\TestMiddlewareSample\Startup.cs:line 16 at TestHost.TestMiddleware.d__2.MoveNext() in C:\gh\tp\TestHost\src\TestMiddleware\TestMiddleware.cs:line 27 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.d__3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Frame`1.d__2.MoveNext() == Test Middleware == Request Path: /MiddlewareException fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id ""0HKSSB81Q7FVP"": An unhandled exception was thrown by the application. System.Exception: Middleware Exception at TestHost.TestMiddleware.d__2.MoveNext() in C:\gh\tp\TestHost\src\TestMiddleware\TestMiddleware.cs:line 24 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.d__3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Frame`1.d__2.MoveNext() C:\gh\tp\TestHost\sample\TestMiddlewareSamplePS> ``` I have attached the zip files of the repro project and its build outputs (`.dll`s, `.pdb`s, ...) in the root of the repro as `.zip` files. cc @pakrym @davidfowl " 9672 area-System.Net HttpClientHandler on Linux/OSX doesn't correctly implement Digest authentication "When making a request to a server requiring Digest authentication, the username is incorrectly specified as `realm\\username` in the challenge response. WCF has an implementation of the digest authentication algorithm in our tests which the following is from. The details of the authentication handshake that we're seeing uses the following credential information. ``` Username: be70abb0 Password: c84613c28bee44e5 Realm: bfd3c ``` A request is first made to the server with no authorization header. The server responds with a 401 Access Denied response and provides the following response header, `WWWAuthenticate: Digest realm=""bfd3c"", nonce=""Ni8yNC8yMDE2IDEyOjMyOjI0IFBN"", opaque=""0000000000000000"", stale=false, algorithm=MD5, qop=""auth""` The client then sends the following response headers. `Authorization: Digest username=""bfd3c\\be70abb0"", realm=""bfd3c"", nonce=""Ni8yNC8yMDE2IDEyOjMyOjI0IFBN"", uri=""//HttpDigestNoDomain.svc/http-digest-nodomain"", cnonce=""MTliMzMyYmFlNmZiZWZiMTAwMTE2NDQ4MDAwMDFjNjc="", nc=00000001, qop=auth, response=""d632601dd17ae997ec1fd065da22cf7f"", opaque=""0000000000000000"", algorithm=""MD5""` The digest username sent is `bfd3c\\be70abb0` which is `realm\\username`. This is incorrect as the username should be sent without the realm. " 9673 area-System.IO System.IO.Compression should support *tar files Now that we have x-plat implementation it'd be great to be able to work with .tar & .tar.gz. 9675 area-System.Net NetworkInterface.GetAllNetworkInterfaces throws on UWP I’m using the “final” .NET Core bits off of the MyGet feed and ran into an issue trying to use System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces(). The method throws on UWP with a NotImplementedException. ``` System.Net.NetworkInformation.dll!System.Net.NetworkInformation.NetNativeNetworkInterface.GetNetworkInterfaces() Unknown System.Net.NetworkInformation.dll!System.Net.NetworkInformation.NetworkInterfacePal.GetAllNetworkInterfaces() Unknown System.Net.NetworkInformation.dll!System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces() Unknown > Zeroconf.dll!Zeroconf.NetworkInterface.NetworkRequestAsync(byte[] requestBytes, System.TimeSpan scanTime, int retries, int retryDelayMilliseconds, System.Action onResponse, System.Threading.CancellationToken cancellationToken) Line 28 C# Zeroconf.dll!Zeroconf.ZeroconfResolver.ResolveInternal(System.Collections.Generic.IEnumerable protocols, byte[] requestBytes, System.TimeSpan scanTime, int retries, int retryDelayMilliseconds, System.Action callback, System.Threading.CancellationToken cancellationToken) Line 75 C# Zeroconf.dll!Zeroconf.ZeroconfResolver.BrowseDomainsAsync(System.TimeSpan scanTime, int retries, int retryDelayMilliseconds, System.Action callback, System.Threading.CancellationToken cancellationToken) Line 113 C# ZeroconfTest.UWP.exe!ZeroconfTest.UWP.MainPage.ResolveClick(object sender, Windows.UI.Xaml.RoutedEventArgs e) Line 25 C# ``` Why isn’t this working on UWP? The library has explicit support for netcore50 in the 4.1.0 nuget package. I would not expect arbitrary methods to simply not work. It sort of undermines trust that WYSIWYG when it comes to available surface area. 9678 area-System.Diagnostics TestUserCredentialsPropertiesOnWindows failing on Windows outer loop e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_windows_nt_release/79/consoleText/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_windows_nt_release/78/consoleText/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_windows_nt_release/76/consoleText/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_windows_nt_debug/79/consoleText http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_windows_nt_debug/78/consoleText http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_windows_nt_debug/77/consoleText ``` System.Diagnostics.Tests.ProcessStartInfoTests.TestUserCredentialsPropertiesOnWindows [FAIL] System.ComponentModel.Win32Exception : The user name or password is incorrect Stack Trace: D:\j\workspace\outerloop_win---65ef7d78\src\System.Diagnostics.Process\src\System\Diagnostics\Process.Windows.cs(619,0): at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) D:\j\workspace\outerloop_win---65ef7d78\src\System.Diagnostics.Process\tests\ProcessStartInfoTests.cs(375,0): at System.Diagnostics.Tests.ProcessStartInfoTests.TestUserCredentialsPropertiesOnWindows() ``` 9680 area-System.Net Add a Socket.Listen() overload "[`Socket.Listen`](https://msdn.microsoft.com/en-us/library/system.net.sockets.socket.listen%28v=vs.110%29.aspx) requires an `int backlog` parameter. Please add an overload that chooses a good default value. 1. Almost nobody seems to know what's a good value to pass here. Nobody takes the time to test this. 2. So far I have never seen a practical case where the value mattered. 3. I'm not even sure to what extent the different operating systems use that value. I know for sure that some do not allow certain ranges of values and override. Quoting [MSDN `listen` documentation](https://msdn.microsoft.com/en-us/library/windows/desktop/ms739168%28v=vs.85%29.aspx): > The maximum length of the queue of pending connections. If set to SOMAXCONN, the underlying service provider responsible for socket s will set the backlog to a maximum reasonable value. If set to SOMAXCONN_HINT(N) (where N is a number), the backlog value will be N, adjusted to be within the range (200, 65535). Note that SOMAXCONN_HINT can be used to set the backlog to a larger value than possible with SOMAXCONN. > SOMAXCONN_HINT is only supported by the Microsoft TCP/IP service provider. There is no standard provision to obtain the actual backlog value. I suggest this: ``` void Listen() => Listen(int.MaxValue); ``` Because this is what `TcpListener.Start()` does. Probably, every interesting OS replaces that with ""a maximum reasonable value"". `SOMAXCONN` is `int.MaxValue` anyway. This seems to trigger the dynamic backlog feature of Windows server OS'es. Note, that `TcpListener.Start(int backlog)` does different argument validation than `Socket.Listen(int backlog)` does. Might be worth investigating and unifying. But that's not what this ticket is about. Surveying what .NET internal code passes: 1. FTP uses `1` for it's active channel. Seems unsafe since a spurious connect (port scan) could kill the connection. 2. WCF uses `if (OSEnvironmentHelper.IsApplicationTargeting45) return (12 * OSEnvironmentHelper.ProcessorCount); else return 10;`. Seems like they made a mistake here and fixed it. `10` clearly is not an appropriate value for a webservice with unknown load profile. I think the new computation is not good, either. They should just pass `int.MaxValue`. I suggest marking this issue as available for community contribution. " 9688 area-System.Text Compat work for Regex As far as I can tell, after commit 4d40e9e there is nothing left to do here. We have the same surface area as Desktop/Xamarin. Please reactivate if this is not the case. 9697 area-System.Net Add Task-based async methods to Socket The Socket class is fully capable of async IO but `Task`-returning methods are missing. I find myself pulling in the same set of helper extensions each time I use async sockets. Since sockets are a primary use case for async IO I'd find this API addition extremely useful. Note, that the async methods on `NetworkStream` are not enough because we need async support for things like `Connect` as well. 9698 area-System.Net Add reliable timeouts to socket operations Socket operations do not support timeouts sufficiently in the following cases: 1. All async operations do not respect the configured timeout. 2. `Connect` cannot be made to observe a timeout. I think there is no timeout for `Accept` either but that's usually an operation that is never supposed to time out. The workarounds usually are quite nasty. For (1) people build their own (tedious and often flawed) timeouts. For (2) people often use an event plus an async IO. In case the timeout fires they close the socket. (This actually triggers [this unavoidable race condition resulting in an access violation!](https://github.com/dotnet/corefx/issues/5749#issuecomment-215597396)) Note the amount of confusion that these problems cause: https://www.google.com/webhp?complete=1&hl=en&gws_rd=cr,ssl&ei=#complete=1&hl=en&q=socket+beginreceive+timeout (I sometimes like to point to Google and Stack Overflow to show a nice sample of real-world user complaints. I have opened this ticket because I'm repeatedly facing this issue as well.) I understand that the underlying Winsock (and now Linux) APIs make some of this hard. Since these issues are so widespread I believe it's worth the work to fix this at the managed code level (by implementing the timeouts and aborts in .NET code as opposed to making the native APIs do that). As an open concern for (1) I see the question what happens to an IO that is cancelled at the managed level due to timeout or cancellation but still running at the native level. This can cause data to be discarded. The only clean way to solve this that I could find is to terminate the connection when a read or write ends up being cancelled. In my experience this matches perfectly with real world requirements. In case of a timeout usually the calling code backs out and just wants to shut everything down. To summarize the ticket: Please add timeouts to all possibly blocking socket operations. Related ticket: [Allow the user to cancel anything at will (this is needed in addition to the timeout).](https://github.com/dotnet/corefx/issues/5749). Also related: [Add Task-based async methods which should take a `CancellationToken` _and_ observe the configured timeout.](https://github.com/dotnet/corefx/issues/9697) 9699 area-System.Runtime Remove System.Runtime\src\ApiCompatBaseline.uap101aot.txt DebuggableAttribute members. Right now, these baseline entries are needed because the new members aren't present in System.Private.CoreLib, and it's logistically inefficient to address that right now. Once we have the means to port those members to .Net Native, we can get rid of these entries. 9702 area-Serialization Performance Improvments on Reflection Based Serialization The PR includes several performance optimizations on reflection based serialization (~60% improvement). Some optimizations also improved de-serialization (~20% improvement). @mconnew @roncain @zhenlan , can you please review the PR? Thanks. 9703 area-System.Runtime Delist System.Runtime.InteropServices.PInvoke package Seems like this package has been removed as the source is no longer in this repo: https://www.nuget.org/packages/System.Runtime.InteropServices.PInvoke/ 9704 area-System.IO Add support for LZ4 to System.Compression As per requested in https://github.com/dotnet/corefx/issues/9657 I am adding a new one. LZ4 is by far the fastest compression algorithm out there (at the expense of compression ratio that-is). It makes sense to have such an algorithm available on the baseline release. We can also provide our port of our managed LZ4 implementation of the r131 (which includes acceleration) if that makes the official inclusion of an algorithm we heavily rely upon easier. We are still working on the perf front but it is currently faster than the one that we had https://github.com/Corvalius/ravendb/blob/lz4-131/src/Sparrow/Compression/LZ4.cs 9706 area-System.Net Socket.SendFile leaks FileStream in case of error Here's a sketch of the method: ```c# public void SendFile(string fileName, byte[] preBuffer, byte[] postBuffer, TransmitFileOptions flags) { ... FileStream fileStream = null; ... fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read); ... if (fileStream != null) { ExceptionHelper.UnmanagedPermission.Assert(); ... } ... } ``` 1. The `fileStream` can leak if there's an exception. Actually, I can't find the place where the stream is ever closed but this might be an oversight on my part. This is a resource leak and therefore a bug. 2. `new TransmitFileOverlappedAsyncResult(this)` can leak in case anything throws. This class has a finalizer. Probably a minor issue. 3. Another issue is that if `ReuseSocket` is set but not `Disconnect` we in fact disconnect. Is this really intended? The whole design of the enum stinks as well but we're stuck with that. Also, the enum is not validated and directly passed into unmanaged code. Hope this is alright. Disclaimer: I have not tested this. This is from code review only. 9709 area-System.IO Investigate high-level CompressionStream with header detection "## Problem There have been a number of requests coming up lately to add new compression algorithms to System.IO.Compression. This is a great way to expand the usefulness of the library and be more friendly to other platforms that frequently use compression algorithms other than Deflate/GZip/Zip. However, adding those algorithms will likely introduce lots of new, in-depth API that may add too much complexity to the scenarios where the user just wants to compress/decompress something using the defaults. ## Suggestion We should consider whether we want to provide a high-level way of compression without the need for fine-grained construction and setup, possibly by adding API that allow easy choosing of a Compression algorithm . A **major** part of this would be to add header detection to the default decompression stream. This way we can add detailed compression algorithms in their individual classes (e.g. LZMAStream, BZ2Stream, GZipStream) while still providing a simple Compression/Decompression vehicle with plenty of Algorithm choices. ## API 1 - CompressionStream type ``` public enum Compressiontype { Deflate = 0, GZip = 1, ZLib = 2, LZMA = 3 ... } public partial class CompressionStream : System.IO.Stream { public CompressionStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode) { } // default Deflate for CompressionMode.Compress. CompressionMode.Decompress attempts to detect type from header and defaults to Deflate if it can not be determined. public CompressionStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode, System.IO.Compression.CompressionType type) { } // no auto-header detection for Decompression. public CompressionStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode, bool leaveOpen) { } public CompressionStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode, System.IO.Compression.CompressionType type, bool leaveOpen) { } ... } ``` ### Examples ``` using (FileStream fs = File.OpenRead(""existinggzipfile.gz"")) using (CompressionStream compStream = new CompressionStream(fs, CompressionMode.Decompress)) { // compStream defers entirely to GZipStream } using (FileStream fs = File.OpenWrite(""newgzipfile.gz"")) using (CompressionStream compStream = new CompressionStream(fs, CompressionMode.Compress, CompressionType.GZip)) { // compStream defers entirely to GZipStream } ``` ## API 2 - Compression static class ``` public enum Compressiontype { Deflate = 0, GZip = 1, ZLib = 2, LZMA = 3 ... } public partial static class Compression { public static Stream CreateStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode) { } // default Deflate for CompressionMode.Compress. CompressionMode.Decompress attempts to detect type from header and defaults to Deflate if it can not be determined. public static Stream CreateStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode, System.IO.Compression.CompressionType type) { } // no auto-header detection for Decompression. public static Stream CreateStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode, bool leaveOpen) { } public static Stream CreateStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode, System.IO.Compression.CompressionType type, bool leaveOpen) { } ... } ``` ### Examples ``` using (FileStream fs = File.OpenRead(""existinggzipfile.gz"")) using (Stream compStream = Compression.CreateStream(fs, CompressionMode.Decompress)) // stream is a GZipStream { ... } using (FileStream fs = File.OpenWrite(""newgzipfile.gz"")) using (Stream compStream = Compression.CreateStream(fs, CompressionMode.Compress, CompressionType.GZip)) // stream is a GZipStream { ... } ``` Somewhat related to https://github.com/dotnet/corefx/issues/9237. Discussion forked from https://github.com/dotnet/corefx/issues/9657. Issues for adding new compression algorithms: - ZLib https://github.com/dotnet/corefx/issues/7570 - 7z/LZMA1/LZMA2 https://github.com/dotnet/corefx/issues/9657 - LZ4 https://github.com/dotnet/corefx/issues/9704 - Bz2 https://github.com/dotnet/corefx/issues/3253 " 9710 area-System.IO Move UWP-AOT clrcompression build to the Open The AOT netcore50 clrcompression (formerly represented by win10) is currently the only one that still needs to be built in TFS. Until we can build against the API sets in the open, we'll have to continue building it internally. https://github.com/dotnet/corefx/pull/9448 is a closed PR and https://github.com/ianhays/corefx/tree/clrcompression_arm is the corresponding branch that contains the changes required to make the build work for UWP whenever we resolve the API set issue. More info copied from #9448: - OneCore based platforms need api-set imports as opposed to kernel32 imports. The binaries produced by CMake use the kernel32 imports. - The kernel32 import issue is present in the non-appcontainer build as well but it is less of an issue there - Until we solve the API sets import issue, we'll need to keep building the UWP-aot native binaries internally - This means that the aot clrcompression is the old zlib that does not contain the zlib-intel changes. - Since it is only the aot clrcompression that still imports the API sets, debug will use the newer clrcompression that imports kernel32. 9715 area-System.Net Adding multi-machine installation scripts and unifying test configuration. - Powershell scripts to create a 3-machine environment with a client, IIS server and Active Directory Domain Controller. - Changing all test projects to use the `Configuration.*.cs` pattern. This is WIP for #9048. The ASP.Net applications are not working as expected at this point (disabled + TODO). Additional work is required to convert them to ASP.Net Core and have a single way to deploy on both a private environment or Azure. @davidsh @stephentoub @ericeil @himadrisarkar PTAL 9719 area-System.Data SqlException: Connection Timeout Expired. The timeout period elapsed during the post-login phase. "**dotnet 1.0.0-rc2-3002702 Microsoft.EntityFrameworkCore.SqlServer 1.0.0-rc2-final Ubuntu 14.04 LTS** **Microsoft SQL Server 2008 R2 (SP1)** 10.50.2550.0 (X64) Jun 11 2012 16:41:53 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1) Connection string: Data Source=192.168.1.x;Initial Catalog=DBName;Persist Security Info=False;User ID=username;Password=pass This issue may be related to #6467. Unfortunately, we cannot upgrade our SQL server service pack. The same application works fine on Windows. This also impacts Entity Framework . Code: ``` using (SqlConnection connection = new SqlConnection(connectionString)) { SqlCommand command = new SqlCommand(queryString, connection); connection.Open(); SqlDataReader reader = command.ExecuteReader(); try { while (reader.Read()) { Console.WriteLine(String.Format(""{0}, {1}"", reader[""Id""], reader[""Email""])); } } catch(Exception ex) { Console.WriteLine(ex.ToString()); } } ``` **Full error:** Executing action method Dashboard.Controllers.HomeController.Index (Dashboard) with arguments () - ModelState is Valid' Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware An unhandled exception has occurred while executing the request System.Data.SqlClient.SqlException: Connection Timeout Expired. The timeout period elapsed during the post-login phase. The connection could have timed out while waiting for server to complete the login process and respond; Or it could have timed out while attempting to create multiple active connections. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=159; handshake=578; [Login] initialization=9; authentication=40; [Post-Login] complete=14062; ---> System.ComponentModel.Win32Exception: Unknown error 258 --- End of inner exception stack trace --- at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at Dashboard.Controllers.HomeController.Index() at lambda_method(Closure , Object , Object[] ) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Mvc.Internal.FilterActionInvoker.d__41.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Mvc.Internal.FilterActionInvoker.d__32.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Mvc.Internal.MvcRouteHandler.d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Builder.RouterMiddleware.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.ApplicationInsights.AspNetCore.ExceptionTrackingMiddleware.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.MigrationsEndPointMiddleware.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.d__7.MoveNext() ClientConnectionId:1f658ddc-13f8-43e8-85a3-fdd8cc853eff Error Number:-2,State:0,Class:11 " 9724 area-System.Collections ICollection.CopyTo argument validation is inconsistent or non-existent Posting now after RTM, as suggested once upon a time. The method `ICollection.CopyTo(Array array, int index)` has a multitude of invalid inputs. Here are some examples ### `array.GetLowerBound(0) != 0` Suggested throw type: `ArgumentException` Problem if not checked: `IndexOutOfRangeException` (bug) Compatability impact: minimal (lower bound is very rarely not 0) ### `array.Rank != 1` Suggested throw type: `ArgumentException` Problem if not checked: `IndexOutOfRangeException` (bug) Compatability impact: slight (array could be multidimensional but this is unlikely to be caught) ### `array == null` Suggested throw type: `ArgumentNullException` Problem if not checked: `NullReferenceException` (bug) Compatability impact: medium (null is a common argument passed incorrectly) ### `index < 0` Suggested throw type: `ArgumentOutOfRangeException` Problem if not checked: `IndexOutOfRangeException` (bug) Compatability impact: medium (e.g. letting user type in a custom index and catching IORE) ### `array.Count - index < collection.Count` Suggested throw type: `ArgumentException` Problem if not checked: `IndexOutOfRangeException` (bug) Compatability impact: medium (e.g. letting user type in a custom index and catching IORE) These are all I can think of at the moment. ## Examples Here are some examples that I've encountered in the past. I haven't gone searching but I'm certain there are some more - Regex ICollections only check if `array == null` and perform no other checks - System.Security.Cryptography ICollections do not check the lower bound - Hashtable, Hashtable.Keys and Hashtable.Values does not check the lower bound ## Proposition Many ICollections do not perform all of these checks. The majority check for `array == null` and `index < 0`. The builtin `System.Collections.Generic` types have these checks, but many ICollections offer custom `CopyTo` implementations We should discuss the following: - Do the benefits of validating arguments (fixing a buggy implementation) outweigh the potential compat effects? - Should we allow a non-zero lower bound (e.g. like SortedList)? - Should we establish a consistent ordering for argument validation? Should existing argument validation checks be reordered? /cc @stephentoub and @bartonjs who suggested creating a discussion 9728 area-System.Net HttpClientHandler.ServerCertificateCustomValidationCallback blows up on OSX "I just updated my Project to RTM and did testing on Windows and everything worked. I then went to test on OSX 10.11.5 (latest stable everything, dotnet, openssl) and ran into issues very quickly.. I'm getting `The libcurl library in use (7.43.0) and its SSL backend (\""SecureTransport\"") do not support custom handling of certificates. A libcurl built with OpenSSL is required.` in stable latest everything on macOS... ``` "" at System.Net.Http.CurlHandler.SslProvider.SetSslOptions(EasyRequest easy, ClientCertificateOption clientCertOption)\n at System.Net.Http.CurlHandler.EasyRequest.InitializeCurl()\n at System.Net.Http.CurlHandler.MultiAgent.ActivateNewRequest(EasyRequest easy)\n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()\n at System.Net.Http.HttpClient.d__58.MoveNext()\n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()\n at Exceptionless.Submission.DefaultSubmissionClient.GetSettings(ExceptionlessConfiguration config, Int32 version, IJsonSerializer serializer) in /Users/blake/Code/Exceptionless.Net/src/Exceptionless/Submission/DefaultSubmissionClient.cs:line 89"" [string] ``` ``` 5] blake@:~/Code/Exceptionless.Net$ brew info openssl openssl: stable 1.0.2h (bottled) [keg-only] SSL/TLS cryptography library [2:16] lake@:~/Code/Exceptionless.Net$ brew install openssl Warning: openssl-1.0.2h_1 already installed blake@:~/Code/Exceptionless.Net$ brew link --force openssl Warning: Already linked: /usr/local/Cellar/openssl/1.0.2h_1 To relink: brew unlink openssl && brew link openssl blake@:~/Code/Exceptionless.Net$ ``` I narrowed it down to defining a custom validation callback breaks the http client.. I can't even do a `GET`. ``` cs var handler = new HttpClientHandler { UseDefaultCredentials = true }; handler.ServerCertificateCustomValidationCallback = delegate { return true; }; var client = new HttpClient(handler, true); client.GetAsync(url).GetAwaiter().GetResult(); ``` All the code can be found here: http://github.com/exceptionless/Exceptionless.Net " 9734 area-System.Net Routing all BeginConnect calls through UnsafeBeginConnect This allows all calls to `BeginConnect(...)` overloads to be used with connection-less protocols such as UDP. Fixes #9304. Note that non-task based `ConnectAsync` APIs will still throw SocketException if used with a non-`Stream` Socket (similar to .Net Desktop). 9735 area-Infrastructure Assemblies in NETFramework TargetingPack do not compile on non-Windows platforms "The targeting packs for full desktop .NET on dotnet.myget.org/F/dotnet-core do not currently work when attempting to compile on OSX or Linux. **Repro** ``` json { ""dependencies"": { ""Microsoft.TargetingPack.NETFramework.v4.5.1"": { ""type"": ""build"", ""version"": ""1.0.1"" } }, ""frameworks"": { ""net451"": {} } } ``` `dotnet build` > /private/tmp/targeting/error CS1509: The referenced file '/Users/namc/.nuget/packages/Microsoft.TargetingPack.NETFramework.v4.5.1/1.0.1/lib/net451/System.EnterpriseServices.Wrapper.dll' is not an assembly > /private/tmp/targeting/error CS0009: Metadata file '/Users/namc/.nuget/packages/Microsoft.TargetingPack.NETFramework.v4.5.1/1.0.1/lib/net451/System.EnterpriseServices.Thunk.dll' could not be opened -- PE image doesn't contain managed metadata. " 9747 area-System.Diagnostics Microsoft.Diagnostics.Tracing.EventSource package does not play nicely with .NET Framework 4.5 projects using project.json "1) Create a new csproj-based project targeting .NET Framework 4.5 2) Add a project.json with: ``` { ""supports"": { }, ""dependencies"": { ""Microsoft.Diagnostics.Trace.EventSource"": { ""version"": ""1.1.16-beta"", } }, ""frameworks"": { "".NETFramework,Version=v4.5"": { } } } ``` 3) Close project, reopen 4) Build Expected: No errors or warnings Actual: ``` Warning The referenced component 'Microsoft.Diagnostics.Tracing.EventSource' could not be found. VisualStudio Warning Failed to resolve all project references for 'VisualStudio'. The package restore result for 'C:\Users\frsilb\Documents\git\roslyn-project-system\src\Dependencies\VisualStudio\VisualStudio.csproj' may be incomplete. 0 ``` Reason described in this PR: https://github.com/dotnet/roslyn-project-system/pull/278. " 9748 area-Serialization DataContractSerializer Fails to deserialize if any part contain '<' and '>'. Espically when u serialize exceptions stacktrace "Run the Program.cs file. I have reproduced the issue in simple format. The issue happens when i serialize any exception , espically stacktrace as it contains tempelate reference i.e. containing '<' and '>'. **Program.cs** using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace SampleNetCore { using System.IO; using System.Runtime.Serialization; public class Program { public static void Main(String[] srgs) { Exception e = new ArgumentException(""Hello <> World""); byte[] d = FromException1(e); Exception e1 = null; if (ToException1(d, out e1)) { Console.WriteLine(""After Deserializing Exception {0}"", e1); } else { Console.WriteLine(""Deserialiing Failed""); } Console.ReadLine(); ``` } public static byte[] FromException1(Exception exception) { var serializer = new DataContractSerializer(typeof(AggregateException)); using (var stream = new MemoryStream()) { AggregateException e1 = new AggregateException(new Exception[] { exception }); serializer.WriteObject(stream, e1); stream.Flush(); return stream.ToArray(); } } public static bool ToException1(byte[] remoteExceptionInformation, out Exception result) { var serializer = new DataContractSerializer(typeof(AggregateException)); try { using (var stream = new MemoryStream(remoteExceptionInformation)) { AggregateException result12 = (AggregateException)serializer.ReadObject(stream); result = result12.InnerException; return true; } } catch (Exception e) { System.Console.WriteLine(""Exception Occured while Deserializing {0} "", e); } result = null; return false; } ``` } } **project.json** { ""version"": ""1.0.0-*"", ""buildOptions"": { ""emitEntryPoint"": true }, ""dependencies"": { ""Microsoft.NETCore.App"": { ""type"": ""platform"", ""version"": ""1.0.0"" }, ""System.Runtime.Serialization.Xml"": ""4.1.1"" }, ""frameworks"": { ""netcoreapp1.0"": { ""imports"": ""dnxcore50"" } } } Expected behavior Any kind of exception should be serialize and deserialize, even if the content like ""Message"" / ""StackTrace"" contains '<' and '>'. Actual behavior The deserializing failed for above scenario. **Environment data** dotnet --info output: .NET Command Line Tools (1.0.0-preview3-003161) **Product Information:** Version: 1.0.0-preview3-003161 Commit SHA-1 hash: 63846c5 **Runtime Environment:** OS Name: ubuntu OS Version: 16.04 OS Platform: Linux RID: ubuntu.16.04-x64 " 9750 area-System.ComponentModel ForeignKeyAttribute add cascadeDelete cascadeUpdate param ForeignKeyAttribute add cascadeDelete cascadeUpdate param 9751 area-System.Net HttpContent Stream Read() and ReadAsync() consume 100% CPU on Scientific Linux 7.2 Running 1.0.0-preview2-003121 on Scientific Linux release 7.2 (Nitrogen), which `dotnet --info` identifies as (OS Name: rhel, OS Version: 7.2, OS Platform: Linux, RID: rhel.7.2-x64). In order to read from a SSE EventSource (which is basically just a HTTP GET that doesn't close immediately), my code currently: 1. Creates a `HttpClient` 2. Sets up a `HttpRequestMessage` and uses it in a `SendAsync()` on the `HttpClient` to get a `HttpResponseMessage` 3. awaits `HttpResponseMessage.Content.ReadAsStreamAsync()` 4. Enters into a loop calling `ReadAsync()` on the `Stream`, which is then fed into a decoder. The issue is that on RHEL 7.2, `await ReadAsync()` blocks (as expected), but with 100% CPU used by the `dotnet` process. This also occurs if the `ReadAsync()` is replaced by the standard blocking `Read()`. To my untrained eye, it appears to be spin waiting or spin locking, or something in that vain. I have tested and confirmed that the issue does not manifest itself on Windows 10 (build 14372) or Ubuntu 14.04. I have attached a small example project that reproduces the issue. It is unfortunately slightly cumbersome to run, since an event source must be hosted for it to read, and I can't find an existing example event source server to point it to. [RHELBugTest.zip](https://github.com/dotnet/corefx/files/338889/RHELBugTest.zip) 9756 area-Meta mscorlib reference assembly shouldn't need to expose internal types with FriendAccessAllowed Attribute. per @jkotas: > The desired state should be: > - System.Private.CoreLib exposes two kinds of types/methods: types/methods for public consumption, and types/methods for internal consumption by other framework libraries. > - mscorlib facade has forwarders for the types for public consumption only. Today framework libraries still reference mscorlib, so our mscorlib reference assembly still needs to add type forwards for internal types to S.P.Corelib. We should figure out a plan to remove this without breaking backward compat with developing a framework library that we need to run in UWP against an older version of coreclr which doesn't contain S.P.CoreLib Related: #9712 9759 area-System.IO Add Retain to OSX FileSystemWatcher runloop The OSX FileSystemWatcher uses the CoreFoundation RunLoop API to watch for events. There is a rule that CF objects received from getter functions are not guaranteed to exist unless explicitly retained. We were not doing this, so there was a very infrequent potential race condition wherein cancellation raced with completion of the thread that owned the runloop. When completion happened first, OSX disposed the unmanaged CoreFoundation RunLoop object that was unique to the thread, and cancellation attempted to call API on that now-invalid object. This commit adds explicit retain/release logic to prevent that race condition. resolves #8983 9760 area-System.Console Make UWP Console Color operations not throw Removes the PlatformNotSupportedExceptions thrown in the Console Color operations and adds some very basic logic to allow roundtripping. resolves #9521 @mattgal @danmosemsft @weshaggard 9761 area-System.Net NetworkInterface.GetAllNetworkInterfaces() on Ubuntu 14.04 unhandled exception FileNotFoundException "I get the following exception when calling GetAllNetworkInterfaces on Ubuntu: ``` Unhandled Exception: System.IO.FileNotFoundException: Could not find file '/sys/class/net/em1:avahi/operstate'. at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter) at Interop.CheckIo[TSafeHandle](TSafeHandle handle, String path, Boolean isDirectory, Func`2 errorRewriter) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode) at System.IO.UnixFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) at System.IO.UnixFileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.File.InternalReadAllText(String path, Encoding encoding) at System.Net.NetworkInformation.LinuxNetworkInterface.GetOperationalStatus(String name) at System.Net.NetworkInformation.LinuxNetworkInterface..ctor(String name) at System.Net.NetworkInformation.LinuxNetworkInterface.GetOrCreate(Dictionary`2 interfaces, String name) at System.Net.NetworkInformation.LinuxNetworkInterface.<>c__DisplayClass5_0.b__0(String name, IpAddressInfo* ipAddr, IpAddressInfo* maskAddr) at Interop.Sys.EnumerateInterfaceAddresses(IPv4AddressDiscoveredCallback ipv4Found, IPv6AddressDiscoveredCallback ipv6Found, LinkLayerAddressDiscoveredCallback linkLayerFound) at System.Net.NetworkInformation.LinuxNetworkInterface.GetLinuxNetworkInterfaces() at System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces() ``` I’m using package: ""System.Net.NetworkInformation"": ""4.1.0-rc3-24210-09"" This isn’t reproducible on all Ubuntu machines, since on some it works while on others it throws the above exception Thanks, Alon " 9762 area-System.Net TcpClient.Connected throws NullReferenceException on Windows when there is no Socket The following code throws `NullReferenceException` on .Net Core on Windows and on .Net Framework: ``` c# var client = new TcpClient(); client.Dispose(); Console.WriteLine(client.Connected); ``` On Unix, it writes `False`, as expected. This is because `Connected` on Windows [just returns `Connected` of the underlying socket](https://github.com/dotnet/corefx/blob/v1.0.0/src/System.Net.Sockets/src/System/Net/Sockets/TCPClient.Windows.cs#L25), while [on Unix it checks for `null`](https://github.com/dotnet/corefx/blob/v1.0.0/src/System.Net.Sockets/src/System/Net/Sockets/TCPClient.Unix.cs#L164-L172). This happens when accessing `Connected` while the underlying socket is `null`. That can happen after calling `Dispose()` and also after explicitly assigning `null` to `Client` (the underlying socket). This also affects `Available` and `ExclusiveAddressUse`. 9764 area-System.Net Dns.GetHostAddressesAsync Unexpected Result on Ubuntu 14.04 "running the following in Ubuntu 14.04: Dns.GetHostAddressesAsync(Dns.GetHostName()).Result returns: Three entries where the AddressFamily is InterNetwork and the ip is 127.0.1.1 using the following package: ""Microsoft.NETCore.App"": ""1.0.0-rc3-004432-00"" Thanks, Alon " 9765 area-System.IO Cleanup ZipFile tests using temp files Some ZipFile tests aren't cleaning up after themselves like good little tests are supposed to. This commit makes them use the FileCleanupTestBase/TempFile/TempDirectory common files to resolve that. resolves #9484 9767 area-System.Console Peek and Read do not work well together on Console.In on OSX "Consider this program: ``` csharp using System; namespace ConsoleApplication { public class Program { public static void Main(string[] args) { Console.Out.WriteLine(""preparing to read some text""); Console.Out.Write("">> ""); Console.Out.Flush(); char peeked = (char)Console.In.Peek(); char c = (char)Console.In.Read(); char d = (char)Console.In.Read(); Console.Out.WriteLine($""peeked: {peeked}""); Console.Out.WriteLine($""read: {c} and {d}""); } } } ``` The expected behavior is that, when faced with two input characters such as ""54"", we will peek at the ""5"", then read the ""5"", and then read the ""4"". On Windows, this is what happens when this program is run: ``` preparing to read some text >> 54 peeked: 5 read: 5 and 4 ``` On OSX, this doesn't happen: ``` preparing to read some text >> 54 peeked: 5 read: and ``` It would appear that Peek and Read are not on the same page about the state of the input stream. No matter how may characters I enter on OSX, the ""peeked"" character is the first char that I entered and the ""read"" chars are both newlines. This readily repros with the RTM .NET CLI and the project.json that is generated by `dotnet new`. " 9768 area-System.Net Support for Socks4/5 proxy in HttpClient/WebRequests Any chances of this happening? 9769 area-System.ComponentModel UrlAttribute.IsValid too naive ? When looking at https://github.com/dotnet/corefx/blob/6df5eb18807fa42e27a20e41257dcd8cc83d96d9/src/System.Private.Uri/src/System/UriExt.cs and https://github.com/dotnet/corefx/blob/d0dc5fc099946adc1035b34a8b1f6042eddb0c75/src/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/UrlAttribute.cs I think the `UrlAttribute` is way too naive to be any useful for url validation. Is this missing implementation or is the idea to only check if string starts with http(s) or ftp ? 9777 area-System.Console Console tests don't verify actual In/Out "The tests in System.Console for the TextReader and TextWriter returned from Console.In and Console.Out don't verify anything about the non-redirected streams. Each test first calls `SetIn` or `SetOut` on a StreamWriter/Reader wrapped around a MemoryStream. This leads to issues like #9767 where basic operations have bugs that are supposedly tested against. For example, we have this test: ``` [Fact] public void Peek() { const string expected = ""ABC""; Test(expected, () => { foreach (char expectedChar in expected) { Assert.Equal(expectedChar, Console.In.Peek()); Assert.Equal(expectedChar, Console.In.Read()); } }); } ``` that _seems_ to be testing exactly what #9767 proved broken. However, in the `Test` helper we call `Console.SetIn(sr)` - where `sr` is a StreamReader around a MemoryStream - before performing the test action. So this test is actually only verifying that `Console.In` roundtrips with `Console.SetIn` and further that a StreamWriter's Peek and Read functions work. TL;DR: We should look for a better way to test the Writer/Reader returned from a non-redirected Console.Out/Console.In. " 9778 area-System.Net Guard file reads in /sys/class/net/ directories "Some systems may not have the expected files present in these directories. If such a situation is encountered, try still to return a reasonable value, or throw a PlatformNotSupportedException instead of a FileNotFoundException if we shouldn't ""guess"" a value. @stephentoub , @davidsh I think I will take a look at all of the file access in the library and consider guarding additional places. As long as there are obscure cases where some systems do not have the information we expect, we should try to throw a `PlatformNotSupportedException` instead of a less-obvious `FileNotFoundException`. For this PR, I've only guarded accesses made to files in the /sys/class/net directory, as it seems avahi-daemon maintains files there that do not conform to what we expect. Addresses #9761 " 9780 area-System.Net TcpListener fails to re-bind under Unix for 2 minutes after Stop. Have created a gist to reproduce the behaviour: https://gist.github.com/sichbo/77615b5c0a6ef7f0fab367862bffb1bd Basically what's happening is I have a console app which when re-started will always crash on second run because a socket re-bind fails with: > Unhandled Exception: System.Net.Sockets.SocketException: Address already in use > at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress) > at System.Net.Sockets.Socket.Bind(EndPoint localEP) > at System.Net.Sockets.TcpListener.Start(Int32 backlog) > at System.Net.Sockets.TcpListener.Start() > at TcpListenerTest.Program. d__1.MoveNext() After about 2 minutes, the application starts normally. It's as if there's a clean-up taking place at OS level some time after the dotnet process quits. Under Windows there is no such issue and you can `Start/AcceptTcpClient/Stop` and repeat the procedure without any problem. 9785 area-System.Net Manual_CertificateSentMatchesCertificateReceived_Success failed on Ubuntu.14.04 Sample error: http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_debug_prtest/2465/testReport/junit/System.Net.Http.Functional.Tests/HttpClientHandler_ClientCertificates_Test/Manual_CertificateSentMatchesCertificateReceived_Success_numberOfRequests__3__reuseClient__True_/ Another: http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_debug_prtest/2303/testReport/junit/System.Net.Http.Functional.Tests/HttpClientHandler_ClientCertificates_Test/Manual_CertificateSentMatchesCertificateReceived_Success_numberOfRequests__3__reuseClient__True_/ ``` MESSAGE: System.Threading.Tasks.TaskCanceledException : A task was canceled. +++++++++++++++++++ STACK TRACE: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at System.Net.Http.Functional.Tests.HttpClientHandler_ClientCertificates_Test.<>c__DisplayClass5_0.<b__2>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at System.Net.Http.Functional.Tests.HttpClientHandler_ClientCertificates_Test.<>c__DisplayClass5_2.<b__4>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at System.Net.Test.Common.LoopbackServer.<>c__DisplayClass3_0.b__0(Task t) at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at System.Net.Http.Functional.Tests.HttpClientHandler_ClientCertificates_Test.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` 9789 area-System.IO CLRCompression ARM package is not built in the open https://github.com/dotnet/corefx/blob/master/src/Native/pkg/runtime.native.System.IO.Compression/runtime.native.System.IO.Compression.pkgproj#L56 expects the open build to produce the ARM binary for clrcompression, but as far as I can tell, this doesn't happen. If we plan to still ship this from TFS please update the package to use ExternalExpectedPrerelease just like the AOT build. One making the change, please **test** the locally built packages in a UWP app. 9792 area-System.Security ArgumentNullException when calling RSACertificateExtensions.GetRSAPrivateKey Hi, after migrating project to .NET Core 1.0.0 I had to change ``` RSACryptoServiceProvider cryptoProvider = (RSACryptoServiceProvider)_qzOptions.Certificate.PrivateKey; ``` to ``` RSA cryptoProvider = _qzOptions.Certificate.GetRSAPrivateKey(); ``` Unfortunately this call throws following exception: ``` {System.ArgumentNullException: Value cannot be null. Parameter name: source at System.Runtime.InteropServices.Marshal.CopyToManaged(IntPtr source, Object destination, Int32 startIndex, Int32 length) at Internal.Cryptography.Pal.Native.CRYPTOAPI_BLOB.ToByteArray() at Internal.Cryptography.Pal.CertificatePal.get_KeyAlgorithmParameters() at System.Security.Cryptography.X509Certificates.X509Certificate.GetKeyAlgorithmParameters() at System.Security.Cryptography.X509Certificates.X509Certificate2.get_PublicKey() at Internal.Cryptography.Pal.CertificateExtensionsCommon.GetPrivateKey[T](X509Certificate2 certificate, Predicate`1 matchesConstraints) at System.Security.Cryptography.X509Certificates.RSACertificateExtensions.GetRSAPrivateKey(X509Certificate2 certificate)} ``` This code is for signing requests for printing using QZ Tray (https://qz.io/wiki/2.0-signing-messages). C# example on which my code is based is provided at https://github.com/qzind/tray/blob/2.0/assets/signing/sign-message.cs. Thanks! 9793 area-System.Net Use string.Replace for UriBuilder.set_Path There seems to be no point in creating a new StringBuilder and appending each char (replacing \s with /s) individually, when we could just do a `string.Replace` and get rid of the helper method. cc @davidsh @stephentoub 9795 area-System.Data System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the login process. `System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - Unable to write data to the transport connection: Unknown error 10054.) ` I'm getting this error when trying to run our .net core dockerized app against our production sql server. `select @@VERSION`: `Microsoft SQL Server 2008 R2 (SP3) - 10.50.6000.34 (X64) Aug 19 2014 12:21:34 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1) (Hypervisor)` Here is the connection string we are using: ``` Server=172.x.x.x;Database=xxx;User Id=xxx;Password=abcd; ``` I saw one issue that seemed similar that referred to some TLS settings, but those all seem good for us. Any help is appreciated. 9796 area-System.Net "System.Net.Http.WinHttpException (""The option is invalid"") in System.Net.Http when ClientCertificates are used." "I am trying to call a soap based webservice that requires client certs for authentication and the following exception occurs: ``` Exception: Exception thrown: 'System.Net.Http.WinHttpException' in System.Net.Http.dll (""The option is invalid""). Exception thrown: 'System.Net.Http.WinHttpException' in System.Net.Http.dll (""The option is invalid"") ``` I've tried making these calls using the HttpClientHandler class directly as well as WCF client libraries, and the outcome is the same for both. Here is the code I am using the make these calls. ```c# using (var httpHandler = new HttpClientHandler()) { string certFilePath = @""C:\share\Certificates\mytestcert.cer""; X509Certificate2 cert2 = new X509Certificate2(certFilePath); httpHandler.ClientCertificateOptions = ClientCertificateOption.Manual; httpHandler.ClientCertificates.Add(cert2); using (var client = new HttpClient(httpHandler)) { client.DefaultRequestHeaders.Add(""SOAPAction"", soapAction); client.DefaultRequestHeaders.Add(""Expect"", ""100-continue""); client.DefaultRequestHeaders.Add(""Accept-Encoding"", ""gzip, deflate""); client.DefaultRequestHeaders.Add(""Connection"", ""Keep-Alive""); StringContent stringContent = new StringContent(soapTemplate, null, ""text/xml""); using (HttpResponseMessage response = await client.PostAsync(sUrl, stringContent)) using (HttpContent content = response.Content) { result = await content.ReadAsStringAsync(); } } ``` If there is additional information I can provide, please let me know. " 9797 area-Serialization Add Reflection Based (De-)Serialization Support for DCJS The PR is enable DataContractJsonSerializer to do reflection based serialization/de-serialization. All tests passed when running on CoreCLR. Most of the tests passed in NetNative. Failed test cases are the same as those failed for DCS in NetNative. @mconnew @roncain @huanwu @zhenlan Can you please review the PR? Thanks! 9798 area-System.IO Create a new portable library for IO "There are a lot of IO utility APIs that we'd like to add to .NET. While adding methods to the existing classes (say, System.IO.Path) is a big usability plus, it is a deployment headache. Example: If we add Path.CreateRelativePath() it would create a dependency on some future version of the various runtimes (say 4.6.3 for desktop) which inhibits writing portable libraries that consume this API that has no lower level runtime dependencies. We could easily create a library that supports standard 1.0 or 1.3 that contains the pieces people are asking for and not need to force them to a newer set of runtimes to consume the functionality. It would also facilitate getting the desired functionality to users faster as we wouldn't have nearly the same level of plumbing overhead. (For Path in particular there are a _lot_ of pending functionality requests.) Initial name ideas: - System.IO.Portable - System.IO.Utility - System.IO.PathExtended If we go with a more generic name we'd have the ability to add other functionality that we are looking to do without exploding the library count too much. (One example is adding a set of interfaces for basic IO access, say IFileSystem.) For existing static classes we could do something like Path -> PathExtended (thinking of PathEx). The other pattern that is commonly used is ""Path2"". @weshaggard, @ericstj, @terrajobst, @stephentoub " 9800 area-System.Reflection CallingConvention gap in ILGenerator.EmitCalli Based on [this stackoverflow submission](http://stackoverflow.com/questions/38129594/emitcalli-net-core-alternative/38134706#38134706). It seems like there is a bit of a feature gap in the current interface for `ILGenerator`. .NET Core has a `EmitCalli` method, but the calling conventions it supports do not line up exactly with the ones exposed from the .NET Framework: https://msdn.microsoft.com/en-us/library/d81ee808(v=vs.110).aspx We should understand if this is a meaningful gap, or if the use cases for the .NET Framework version can still be covered by the new version. We may already be considering adding this functionality back as part of our bigger API compat push. cc: @AtsushiKan 9805 area-System.Reflection Restore Reflection API (.NET Native) 9807 area-System.Numerics Assigning VectorX right to VectorX left CopyTo allows copying of value to arrays but not another Vector of the same length. 9809 area-System.Data Exception occur when Registraing a new User in .NetCoreApp ### The issue Exception occur while Registring a new user in .NetCoreApp v1.0.0-rc2-3002702 ### STACK **OverflowException: Arithmetic operation resulted in an overflow.** System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) AggregateException: One or more errors occurred. (Arithmetic operation resulted in an overflow.) System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) AggregateException: One or more errors occurred. (Arithmetic operation resulted in an overflow.) ``` System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNetCore.Identity.UserValidator`1.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNetCore.Identity.UserValidator`1.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNetCore.Identity.UserManager`1.d__157.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNetCore.Identity.UserManager`1.d__68.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNetCore.Identity.UserManager`1.d__73.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() SoundBoard.Controllers.AccountController.d__9.MoveNext() in AccountController.cs var result = await _userManager.CreateAsync(user, model.Password); --- End of stack trace from previous location where exception was thrown --- ``` ``` EF Core version: EF 7 / EF Core Operating system: Windows 8.1 Visual Studio version: VS 2015 ``` 9812 area-System.Console Custom Console Colours I'm working on .NET Core support in [Colorful.Console](http://colorfulconsole.com/). I've added nestandard1.3 support but it uses interop to set custom colours in the console, so I'm now looking at how to add this support for Windows, Mac and Linux to support every platform. Currently I'm using `RuntimeInformation.IsOSPlatform` to only use interop on Windows (See code [here](https://github.com/tomakita/Colorful.Console/blob/master/src/Colorful.Console/ColorMapper.cs#L93-L109)). Example of what the library can currently do using Figlet fonts: ![ascii_x1](https://cloud.githubusercontent.com/assets/2270364/16540939/3ee3d972-406e-11e6-8e71-e6918241db2d.png) First of all, is there anything stopping built in support for this in `System.Console`? Perhaps using `System.Drawing.Color` and adding a `Background` and `Foreground` property to `System.Console`. My understanding is that `System.Drawing.Color` is coming to .NET Core soon. Alternatively, I've been looking at the internal [ConsolePal](https://github.com/dotnet/corefx/tree/56600ecc3738940219f3c5a886c6bb0afe1f6a75/src/System.Console/src/System) classes in trying to understand how I can add this support to [Colorful.Console](http://colorfulconsole.com/). Could someone explain: 1. Why there are only Windows, WinRT and Unix versions (I guess Mac uses the same Console API as Unix but I didn't realize WinRT is totally separate too). 2. Are there any tutorials about how to compile for each platform? [System.Console.csproj](https://github.com/dotnet/corefx/blob/56600ecc3738940219f3c5a886c6bb0afe1f6a75/src/System.Console/src/System.Console.csproj) seems to contain some complicated rules around this. Also it's not an xproj, which is what I was expecting but it does have a project.json file. 3. Any guidance on understanding how ConsolePal is setting colours would help. 9814 area-System.Net Less crap-tastic fix for Unix intermediate certificates. Per @bartonjs comments regarding #9810. 9817 area-System.Runtime Project with .NET Standard won't compile on Xamarin.iOS - missing type in facade "When trying to compile the ZeroconfTest.Xam.iOS test project from here: https://github.com/onovotny/Zeroconf/tree/netstandard I get a compile time error: ``` Severity Code Description Project File Line Suppression State Error Failed to resolve ""System.Runtime.CompilerServices.ConditionalWeakTable`2"" reference from ""System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" ZeroconfTest.Xam.iOS C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets 681 ``` Digging into it, the facades that Xamarin ships do not have a type forwarder for `System.Runtime.CompilerServices.ConditionalWeakTable`2`. I suspect the fix has to come from Xamarin, but it's these packages that's causing the compiler error. /cc @mhutch @ericstj " 9824 area-System.IO DevicePathsDontThrowForInvalidChars_Windows test fails with all inputs "e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/windows_nt_debug_prtest/2673/consoleText ``` System.IO.Tests.PathTests.DevicePathsDontThrowForInvalidChars_Windows(prefix: ""\\?\"") [FAIL] Assert+WrapperXunitException : File path: D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs. Line: 274 ---- Assert.All() Failure: 36 out of 36 items in the collection did not pass. [35]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [34]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [33]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [32]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [31]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [30]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [29]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [28]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [27]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [26]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [25]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [24]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [23]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [22]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [21]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [20]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [19]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [18]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [17]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [16]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [15]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [14]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [13]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [12]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [11]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [10]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [9]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [8]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [7]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [6]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [5]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [4]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [3]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [2]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [1]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [0]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) Stack Trace: D:\j\workspace\windows_nt_de---4526f5ff\src\Common\tests\System\Diagnostics\AssertWithCallerAttributes.cs(583,0): at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber) D:\j\workspace\windows_nt_de---4526f5ff\src\Common\tests\System\Diagnostics\AssertWithCallerAttributes.cs(39,0): at Assert.All[T](IEnumerable`1 collection, Action`1 action, String path, Int32 line) D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs(274,0): at System.IO.Tests.PathTests.DevicePathsDontThrowForInvalidChars_Windows(String prefix) ----- Inner Stack Trace ----- D:\j\workspace\windows_nt_de---4526f5ff\src\Common\tests\System\Diagnostics\AssertWithCallerAttributes.cs(38,0): at Assert.All[T](IEnumerable`1 collection, Action`1 action, String path, Int32 line) System.IO.Tests.PathTests.DevicePathsDontThrowForInvalidChars_Windows(prefix: ""\\.\"") [FAIL] Assert+WrapperXunitException : File path: D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs. Line: 274 ---- Assert.All() Failure: 36 out of 36 items in the collection did not pass. [35]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [34]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [33]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [32]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [31]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [30]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [29]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [28]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [27]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [26]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [25]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [24]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [23]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [22]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [21]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [20]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [19]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [18]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [17]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [16]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [15]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [14]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [13]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [12]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [11]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [10]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [9]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [8]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [7]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [6]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [5]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [4]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [3]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [2]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [1]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [0]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) Stack Trace: D:\j\workspace\windows_nt_de---4526f5ff\src\Common\tests\System\Diagnostics\AssertWithCallerAttributes.cs(583,0): at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber) D:\j\workspace\windows_nt_de---4526f5ff\src\Common\tests\System\Diagnostics\AssertWithCallerAttributes.cs(39,0): at Assert.All[T](IEnumerable`1 collection, Action`1 action, String path, Int32 line) D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs(274,0): at System.IO.Tests.PathTests.DevicePathsDontThrowForInvalidChars_Windows(String prefix) ----- Inner Stack Trace ----- D:\j\workspace\windows_nt_de---4526f5ff\src\Common\tests\System\Diagnostics\AssertWithCallerAttributes.cs(38,0): at Assert.All[T](IEnumerable`1 collection, Action`1 action, String path, Int32 line) System.IO.Tests.PathTests.DevicePathsDontThrowForInvalidChars_Windows(prefix: ""\??\"") [FAIL] Assert+WrapperXunitException : File path: D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs. Line: 274 ---- Assert.All() Failure: 36 out of 36 items in the collection did not pass. [35]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [34]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [33]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [32]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [31]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [30]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [29]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [28]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [27]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [26]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [25]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [24]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [23]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [22]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [21]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [20]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [19]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [18]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [17]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [16]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [15]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [14]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [13]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [12]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [11]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [10]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [9]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [8]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [7]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [6]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [5]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [4]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [3]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [2]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [1]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) [0]: System.ArgumentException: Illegal characters in path. Parameter name: path at System.IO.PathInternal.CheckInvalidPathChars(String path) in D:\j\workspace\windows_nt_de---4526f5ff\src\Common\src\System\IO\PathInternal.cs:line 26 at System.IO.Path.ChangeExtension(String path, String extension) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\src\System\IO\Path.cs:line 36 at System.IO.Tests.PathTests.<>c__DisplayClass19_0.b__0(Char c) in D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs:line 278 at Xunit.Assert.All[T](IEnumerable`1 collection, Action`1 action) Stack Trace: D:\j\workspace\windows_nt_de---4526f5ff\src\Common\tests\System\Diagnostics\AssertWithCallerAttributes.cs(583,0): at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber) D:\j\workspace\windows_nt_de---4526f5ff\src\Common\tests\System\Diagnostics\AssertWithCallerAttributes.cs(39,0): at Assert.All[T](IEnumerable`1 collection, Action`1 action, String path, Int32 line) D:\j\workspace\windows_nt_de---4526f5ff\src\System.Runtime.Extensions\tests\System\IO\PathTests.cs(274,0): at System.IO.Tests.PathTests.DevicePathsDontThrowForInvalidChars_Windows(String prefix) ----- Inner Stack Trace ----- D:\j\workspace\windows_nt_de---4526f5ff\src\Common\tests\System\Diagnostics\AssertWithCallerAttributes.cs(38,0): at Assert.All[T](IEnumerable`1 collection, Action`1 action, String path, Int32 line) ``` " 9826 area-System.Runtime Move Environment from coreclr to corefx Some of the Environment class needs to access runtime functionality, e.g. HasShutdownStarted, but a lot of it can be implemented in corefx, and doing so helps to avoid a) duplicating functionality/code with elsewhere in corefx, and b) duplicating implementations between CoreCLR and CoreRT. We can reimplement the bulk of Environment, including the remainder of the surface area that's missing, in corefx, calling into a special class exposed from the runtime(s) just for the core pieces we need. 9833 area-System.Net Investigate using buffer pooling for StringContent "Currently `StringContent` calls `Encoding.GetBytes` to get the underlying bytes of the string, so it can pass it in to the base constructor: https://github.com/dotnet/corefx/blob/master/src/System.Net.Http/src/System/Net/Http/StringContent.cs#L51 This method always allocates a new byte array. Since `StringContent` is an `IDisposable`, we should investigate renting a buffer from `ArrayPool.Shared` when initializing the content, and returning it when we dispose. I've made a prototype here: https://github.com/anonpenguin/PooledStringContent/blob/master/src/Pooling.Net.Http/PooledStringContent.cs (Note however, we may want to come up with a scheme for existing code that assumes `StringContent`'s `Dispose` doesn't do any important work and neglects to dispose it, e.g. ``` cs var content = new StringContent(""...""); // no using return await _httpClient.PutAsync(_uri, content).ConfigureAwait(false); ``` In those cases we may want to stop after renting a certain amount of ArrayPools without disposing, and fallback to allocating like we originally did.) cc @benaadams @davidsh " 9834 area-System.Net Avoid a boxing allocation in UriBuilder.ToString `_port` is an int, so adding it to a string means the `string.Conat(object, object)` overload gets called, which in turn means it gets boxed. Call `ToString` to avoid this. cc @stephentoub @davidsh 9838 area-System.Collections "BitArray.CopyTo copies also unused bits (""leaks data"")" `BitArray.CopyTo(...)` leaks internal data, if the data copied is shorter than the destination type. For instance, if set via `new BitArray(16, true)` (16 bits long, all on), then copy to an int array, all bits in the int are set (as if the `BitArray` is actually 32 bits long). [Demonstration tests](https://github.com/Clockwork-Muse/corefx/commit/19a67977e876aaa80eb42f7e04feae1fed1a815c) (although would need to be switched for regression tests). At the moment I had to verify the tests in a separate project - Something about the System.Collections is borked up when trying to run tests. I'm assuming that this is _not_ the desired behavior, given the data is automatically cleared when the length is increased. Granted, it's somewhat on the programmer for this, using a type shorter than there's officially data for... 9839 area-System.IO Can't use Path.GetFullPath in netstandard1.2 Hi, _Same issue/question as https://github.com/aspnet/Home/issues/1551 by @Sebosek_ How to get the full path of a given relative path in _netstandard1.2_? `Path.GetFullPath` seems to be available only for _netstandard1.3_ and above. Out of curiosity, why is that? Thanks 9842 area-System.IO Add IsolatedStorage types Bring back System.IO.IsolatedStorage, comprising these types ``` T:System.IO.IsolatedStorage.INormalizeForIsolatedStorage T:System.IO.IsolatedStorage.IsolatedStorage T:System.IO.IsolatedStorage.IsolatedStorageException T:System.IO.IsolatedStorage.IsolatedStorageFile T:System.IO.IsolatedStorage.IsolatedStorageFileStream T:System.IO.IsolatedStorage.IsolatedStorageScope T:System.IO.IsolatedStorage.IsolatedStorageSecurityOptions T:System.IO.IsolatedStorage.IsolatedStorageSecurityState ``` The most used types are ``` T:System.IO.IsolatedStorage.IsolatedStorageFile T:System.IO.IsolatedStorage.IsolatedStorageFileStream ``` and members in descending order ``` M:System.IO.IsolatedStorage.IsolatedStorageFile.FileExists(System.String) M:System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication M:System.IO.IsolatedStorage.IsolatedStorageFile.DirectoryExists(System.String) M:System.IO.IsolatedStorage.IsolatedStorageFile.CreateDirectory(System.String) M:System.IO.IsolatedStorage.IsolatedStorageFile.OpenFile(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare) M:System.IO.IsolatedStorage.IsolatedStorageFile.OpenFile(System.String,System.IO.FileMode,System.IO.FileAccess)M:System.IO.IsolatedStorage.IsolatedStorageFile.GetLastWriteTime(System.String) M:System.IO.IsolatedStorage.IsolatedStorageFileStream.#ctor(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.IsolatedStorage.IsolatedStorageFile) M:System.IO.IsolatedStorage.IsolatedStorageFile.DeleteFile(System.String) M:System.IO.IsolatedStorage.IsolatedStorageFile.DeleteDirectory(System.String)M:System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForAssembly ``` 9846 area-System.Net .Net Plaform Standard implementation on .Net 4.6.1 has version inconsistency for System.Net.Http "I created a netstandard1.4 library (csproj) which uses System.Net.Http, and the highest available netstandard1.3 listed in NETStandard.Library meta package references System.Net.Http **v4.1.0**. I reference this library from a .Net Core console app which targets net461, and the latter has System.Net.Http **v4.0.0.0** in GAC. During build I get a warning regarding library versions conflict, and at run time get a FileNoFoundException: ""Could not load file or assembly 'System.Net.Http, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies."" Also, in project references (in solution explorer) System.Net.Http **v4.0.0** is shown. This looks pretty confusing, since I expect that once I referenced NETStandard.Library and target netstandard, I should not care about such versions consistency, since .NET Platform Standard docs claim that netstandard 1.4 is supported by net461 and higher, and netstandard 1.3 is supported by net46 and higher. UPDATE: I was also able to reproduce this problem when the library is xproj-based. [Here is the link to the sample project which reproduces the bug](https://1drv.ms/u/s!AuaAKPMkiTEAtvIeZ_3nHyiA2dUsqA) " 9848 area-System.Net UdpClient: Cancellation support for Async methods "In the current UdpClient methods, the `SendAsync` and `ReceiveAsync` method have no support for cancellation. A method could be in an `await RecieveAsync()`, which effectively never returns in a ""clean"" way. Instead, you have to call `Dispose()`/`Close()` on the `UdpClient` instance and catch `ObjectDisposedException` and `NullReferenceException`'s coming from that await. There's a race condition here: https://github.com/dotnet/corefx/blob/master/src/System.Net.Sockets/src/System/Net/Sockets/UDPClient.cs#L397 That that triggers the NRE -- the `FreeResources()` call could be called as part of a dispose while another thread hit's that `EndRecieve()` Rather than handling exceptions to end things, having a `CancellationToken` available in the async calls would enable a clean shutdown. " 9849 area-System.Net Make sure TcpClient properties do not throw when the underlying Socket is null Fixes #9762 9852 area-System.Net Fixing CookieCollection interface methods The Core version of CookieCollection modified the visibility of some interface methods. This PR updates our Reference Assembly to mimic that. cc: @weshaggard @danmosemsft 9855 area-System.Security Support System.Security.Cryptography.Native OpenSSL 1.1 release OpenSSL 1.1 has a new model of opaque structures with more accessor functions. Anything previously obtained by an accessor function will likely be fine, but direct field accesses won't work. For example, UpRefEvpPkey will need to change to EVP_PKEY_up_ref, but needs to do the current behavior on 1.0.x builds. 9857 area-System.Net [TODO] Avoid boxing in IPv4AddressHelper.ParseCanonicalName cc: @stephentoub @davidsh 9859 area-System.Runtime CS0019: Comparing a Nullable enum type with null results in compiler error "The StackOverflow user ""Warren P."" posted this issue on StackOverflow, which sounds like a bug or oversight to me. You can find the original issue [here](http://stackoverflow.com/questions/38191166/c-sharp-optional-enum-type-property-setter-compiles-in-classic-net-but-not-in). Comparing an optional/Nullable Enum type property to null results in CS0019 compiler error. ```c# /// This uses the native .NET datatype, rather than the FHIR equivalent [NotMapped] [IgnoreDataMemberAttribute] public Hl7.Fhir.Model.RemittanceOutcome? Outcome { get { return OutcomeElement != null ? OutcomeElement.Value : null; } set { if(value == null) // CS00019 OutcomeElement = null; else OutcomeElement = new Code(value); OnPropertyChanged(""Outcome""); } } ``` The resulting compiler error: ``` CS0019 Operator '==' cannot be applied to operands of type 'RemittanceOutcome?' and '' ``` `if(value.HasValue)` works however. Seems like the == operator override is missing in .NET Core implementation of `Nullable`. Is th is by design or a bug/oversight? " 9860 area-System.Net Avoid repeated char[] allocations in CheckForColonInFirstPathSegment There's no reason to allocate a `char[]` every time the method is called and call `IndexOfAny`, when we can replace it with our own manual for-loop. cc @stephentoub @davidsh 9861 area-System.Net Remove unused static field from Uri The field says it's used by `DigestClient`, but there is no such class in corefx. cc @davidsh @stephentoub 9864 area-System.Net [TODO] Remove some boxing from IPv6AddressHelper.CreateCanonicalName Don't use `StringBuilder.AppendFormat` which converts the rest of the arguments to objects, instead call the `ToString` overload accepting a format/format provider ourselves and `Append` it to the builder. cc @stephentoub @davidsh 9865 area-Infrastructure [ARM/Linux] Workaround for running unit-test on Linux ARM32 In default, runtimes environments for CoreFX unit-test uses `*.ni.dll`s (mscorlib.ni.dll, System.Private.CoreLib.ni.dll) which extracted from NuGet packages. It's good for performance, but as of now, we don't have proper packages for Linux/ARM32. I want to work around this situation by using `*.dll`s instead of `*.ni.dll`s, with `--ignore-native-dlls` option, in spite of performance degradation in test. #9862 is patch for this. In addition, to improve the readability of test log, add `--sequential` option to run tests one by one. #9863 is patch for this. 9867 area-System.IO Compression.ZipFile Unicode tests failing on OSX in Helix Failing tests: ``` System.IO.Compression.Tests.ZipFileTest_ConvenienceMethods CreateFromDirectoryUnicodel ExtractToDirectoryTest_Unicode ExtractToDirectoryUnicode ``` Error: ``` Unhandled Exception of type System.NullReferenceException Message: System.NullReferenceException : Object reference not set to an instance of an object. Stack Trace: at System.IO.Compression.Tests.ZipFileTestBase.ItemEqual(String[] actualList, List`1 expectedList, Boolean isFile) at System.IO.Compression.Tests.ZipFileTestBase.DirsEqual(String actual, String expected) at System.IO.Compression.Tests.ZipFileTest_ConvenienceMethods.ExtractToDirectoryTest_Unicode() ``` 9869 area-System.Net Use try/finally in DelegatingStream.Dispose cc @davidsh 9872 area-System.IO AccessControl related methods from IO ``` M:System.IO.Directory.SetAccessControl(System.String,System.Security.AccessControl.DirectorySecurity) M:System.IO.DirectoryInfo.Create(System.Security.AccessControl.DirectorySecurity) M:System.IO.DirectoryInfo.CreateSubdirectory(System.String,System.Security.AccessControl.DirectorySecurity) M:System.IO.DirectoryInfo.GetAccessControl M:System.IO.DirectoryInfo.GetAccessControl(System.Security.AccessControl.AccessControlSections) M:System.IO.DirectoryInfo.SetAccessControl(System.Security.AccessControl.DirectorySecurity) M:System.IO.Directory.CreateDirectory(System.String,System.Security.AccessControl.DirectorySecurity) M:System.IO.Directory.GetAccessControl(System.String) M:System.IO.Directory.GetAccessControl(System.String,System.Security.AccessControl.AccessControlSections) M:System.IO.FileStream.#ctor(System.IntPtr,System.IO.FileAccess) M:System.IO.FileStream.#ctor(System.IntPtr,System.IO.FileAccess,System.Boolean) M:System.IO.FileStream.#ctor(System.IntPtr,System.IO.FileAccess,System.Boolean,System.Int32) M:System.IO.FileStream.#ctor(System.IntPtr,System.IO.FileAccess,System.Boolean,System.Int32,System.Boolean) ``` from #9465 9873 area-System.Xml [dev/xml] Fix XSL scripts compilation in XmlCompiledTransform If XSL contains scripts (C#, VB, JScript), the script is currently not being compiled from a dll correctly. Either need to bring back CodeDom or find a workaround. The tests related to this scenario should be re-enabled. (Look for ActiveIssue(9873)) This needs to be done as a part of dev/xml branch work 9875 area-Meta Consistency of partial class filenames There are multiple different axes along which we customize the implementation via partial classes. From https://github.com/dotnet/corefx/pull/9851/files/282ad11461c480a282a529c38d8fc353bc03663b#r69807075: 1. Classic win32 vs. UWP apps (vs. non-Windows OSes). The two Windows appmodels are very much like different OSes because of there are different APIs available and things have to be generally done differently in number of places. I believe that the most common pattern has been to use `.Win32.cs` vs. `.WinRT.cs` to provide different implementations. `System.IO.FileSystem` or `System.Console` are good examples. 2. JIT vs. full AOT. I do not actually see any good examples. `System.Linq.Expressions` or data contract serialization where this difference is most prelevant are configured via ifdefs, not via alternative file includes. 3. Different surface of System.Private.CoreLib between CoreCLR and CoreRT/.NET Native. The common pattern for this is `.CoreCLR.cs` vs. `.netcore50.cs` or `.netcore50aot.cs`. Hopefully, most of these will go away over time as we work on filling in the missing APIs and converging the implementations. 9876 area-System.Xml Re-enable tests with XSL resolving external URIs These tests are marked with ActiveIssue. This needs to be done as a part of dev/xml branch work 9877 area-System.Xml Re-enable and fix failing 60-70 Xsl checksum based tests These tests are marked with ActiveIssue This needs to be done as a part of dev/xml branch work 9878 area-System.Net Fix HttpWebResponse.ContentType when response has invalid headers The HttpWebResponse.ContentType property is supposed to return a string value with the response's `Content-Type` header value. Even if the response header is considered non-conformant with RFC7231, the value is returned as-is as received on the wire. In .NET Core, HttpWebRequest/HttpWebResponse is implemented as a wrapper around HttpClient. HttpClient has a strongly-typed model for headers. The current implementation of HttpWebResponse.ContentType was trying to use the strongly typed header from HttpClient. In cases where the header was malformed, it was returning empty string. This was a difference in behavior from .NET Framework. The fix is to use TryGetValues() to retrieve the raw response header value for the 'Content-Type' header. This will result in compatible behavior with .NET Framework. Fixes #9433. 9884 area-System.Net System.Net.Http does not behave as an OOB package when used with System.Net.Http.Formatting This issue has been created to separate it from the conversation in issue #9846. As explained there, when using `System.Net.Http v4.0.0.0` as distributed by the .NET Framework 4.6.1, everything works correctly. When updating the reference to the NuGet-distributed package for `System.Net.Http v4.1.0.0` (here: https://www.nuget.org/packages/System.Net.Http/) the code fails at runtime whith the below exception: ``` [VerificationException: Method System.Net.Http.CloneableExtensions.Clone: type argument 'System.Net.Http.Headers.MediaTypeHeaderValue' violates the constraint of type parameter 'T'.] System.Net.Http.Formatting.MediaTypeConstants.get_ApplicationJsonMediaType() +0 System.Net.Http.Formatting.JsonMediaTypeFormatter..ctor() +79 System.Net.Http.Formatting.MediaTypeFormatterCollection.CreateDefaultFormatters() +49 System.Web.Http.HttpConfiguration..ctor(HttpRouteCollection routes) ... ``` When reverting to the out-of-the box v.4.0.0.0 version it works as expected without problems. Therefore, version 4.1.0.0 is not an OOB package as it breaks the functionality of other packages that relate to this one. 9889 area-System.Runtime Complete Environment.GetFolderPath on Unix #9826 added back the full surface area of Environment. However, GetFolderPath on Unix doesn't support the vast majority of the SpecialFolder values. We should look at fleshing this out. 9890 area-System.IO Environment.GetFolderPath on Windows can't use SHGetFolderPath #9826 added back the full surface area of Environment. However, GetFolderPath on Windows in the desktop framework uses SHGetFolderPath to implement this method, but that Win32 function isn't available: https://github.com/dotnet/buildtools/blob/master/src/Microsoft.DotNet.CodeAnalysis/PackageFiles/PinvokeAnalyzer_OneCoreApis.txt As a result, the method is mostly unusable. 9892 area-Meta Running tests for a single project on Linux I am trying to run tests for a single project on Ubuntu 16.04. I figured out that the command I need to run (assuming corefx is in `~/corefx`) is: `~/corefx/Tools/dotnetcli/dotnet ~/corefx/Tools/MSBuild.exe /t:BuildAndTest /p:TestNugetRuntimeId=ubuntu.16.04-x64 /p:OSGroup=Linux /p:TargetOS=Linux` As far as I can tell, this is not documented anywhere and I think it should be, probably in [unix-instructions.md](https://github.com/dotnet/corefx/blob/master/Documentation/building/unix-instructions.md). Also, I think it's confusing that [the default for `TestNugetRuntimeId` is `win7-x64`](https://github.com/dotnet/buildtools/blob/acf2600/src/Microsoft.DotNet.Build.Tasks/PackageFiles/publishtest.targets#L18), even on Linux. Should it be changed to detect the OS? The same applies to `OSGroup` and `TargetOS`. 9893 area-System.Net SSLStream does not clear InternalBuffer after read SSLStream is vulnerable to memory dump attacks. When working with sensitive data, a programmer has no way to clear the internal buffer of SslStreamInternal after data has been read. And as long as a new packet does not arrive the data will be there indefinitely. SslStream should provide a mechanism to clear the internal buffer or SslStreamInternal should clear InternalBuffer either during every call to DecrementInternalBufferCount or after data is BlockCopy-ed from InternalBuffer to buffer in ProcessRead. 9894 area-System.Xml [dev/xml] Intermittent failures in random System.Xml.XmlDocument tests related to attributes Some threading issue in XmlDoc tests. I'm leaving them not marked as Active issue so it's easier to track it down by finding some common traits. (+ not really sure which ones to disable) Not sure if this is test or product issue. This might be already fixed - need to be re-verified after merging corefx changes to System.Xml. Failures catched so far: ``` Discovering: System.Xml.XmlDocument.Tests System.Xml.XPath.Tests -> E:\src\oss\xml\bin\AnyOS.AnyCPU.Debug\System.Xml.XPath.Tests\System.Xml.XPath.Tests.dll Using E:\src\oss\xml\packages/ as folder for resolving package dependencies. Executing in E:\src\oss\xml\bin\tests\AnyOS.AnyCPU.Debug\System.Xml.XPath.Tests\netcoreapp1.0\ Hard linking dependent files... Discovered: System.Xml.XmlDocument.Tests Starting: System.Xml.XmlDocument.Tests System.Xml.Tests.CopyToTests.CopyToCopiesClonedAttributesAtSpecifiedLocation [FAIL] System.Xml.XmlException : The 'r' character, hexadecimal value 0x72, cannot be included in a name. Stack Trace: E:\src\oss\xml\src\System.Xml\src\System\Xml\Dom\XmlDocument.cs(135,0): at System.Xml.XmlDocument.CheckName(String name) E:\src\oss\xml\src\System.Xml\src\System\Xml\Dom\XmlElement.cs(28,0): at System.Xml.XmlElement..ctor(XmlName name, Boolean empty, XmlDocument doc) E:\src\oss\xml\src\System.Xml\src\System\Xml\Dom\XmlDocument.cs(1014,0): at System.Xml.XmlDocument.CreateElement(String prefix, String localName, String namespaceURI) E:\src\oss\xml\src\System.Xml\src\System\Xml\Dom\XmlDocument.cs(599,0): at System.Xml.XmlDocument.CreateElement(String name) E:\src\oss\xml\src\System.Xml\tests\XmlDocument\XmlAttributeCollectionTests\CopyToTests.cs(14,0): at System.Xml.Tests.CopyToTests.CreateDocumentWithElement() E:\src\oss\xml\src\System.Xml\tests\XmlDocument\XmlAttributeCollectionTests\CopyToTests.cs(44,0): at System.Xml.Tests.CopyToTests.CopyToCopiesClonedAttributesAtSpecifiedLocation() Finished: System.Xml.XmlDocument.Tests (this might be related to Globalization tests too so leaving these here) Discovering: System.Globalization.Extensions.Tests Discovered: System.Globalization.Extensions.Tests Discovered: System.Xml.XmlDocument.Tests Starting: System.Globalization.Extensions.Tests Starting: System.Xml.XmlDocument.Tests System.Xml.Tests.LocalNameTests.ElementWithPrefix [FAIL] System.Xml.XmlException : The 'e' character, hexadecimal value 0x65, cannot be included in a name. Stack Trace: E:\src\oss\xml\src\System.Xml\src\System\Xml\Dom\XmlDocument.cs(135,0): at System.Xml.XmlDocument.CheckName(String name) E:\src\oss\xml\src\System.Xml\src\System\Xml\Dom\XmlElement.cs(28,0): at System.Xml.XmlElement..ctor(XmlName name, Boolean empty, XmlDocument doc) E:\src\oss\xml\src\System.Xml\src\System\Xml\Dom\XmlDocument.cs(1014,0): at System.Xml.XmlDocument.CreateElement(String prefix, String localName, String namespaceURI) E:\src\oss\xml\src\System.Xml\src\System\Xml\Dom\XmlDocument.cs(599,0): at System.Xml.XmlDocument.CreateElement(String name) E:\src\oss\xml\src\System.Xml\tests\XmlDocument\XmlNodeTests\LocalNameTests.cs(30,0): at System.Xml.Tests.LocalNameTests.ElementWithPrefix() System.Xml.Tests.CreateAttributeTests.CreateBasicAttributeTest [FAIL] System.Xml.XmlException : The 'a' character, hexadecimal value 0x61, cannot be included in a name. Stack Trace: E:\src\oss\xml\src\System.Xml\src\System\Xml\Dom\XmlDocument.cs(135,0): at System.Xml.XmlDocument.CheckName(String name) E:\src\oss\xml\src\System.Xml\src\System\Xml\Dom\XmlAttribute.cs(27,0): at System.Xml.XmlAttribute..ctor(XmlName name, XmlDocument doc) E:\src\oss\xml\src\System.Xml\src\System\Xml\Dom\XmlDocument.cs(1004,0): at System.Xml.XmlDocument.CreateAttribute(String prefix, String localName, String namespaceURI) E:\src\oss\xml\src\System.Xml\src\System\Xml\Dom\XmlDocument.cs(553,0): at System.Xml.XmlDocument.CreateAttribute(String name) E:\src\oss\xml\src\System.Xml\tests\XmlDocument\XmlDocumentTests\CreateAttributeTests.cs(15,0): at System.Xml.Tests.CreateAttributeTests.CreateBasicAttributeTest() System.Xml.Tests.AppendTests.AppendRemovesExistingAttribute [FAIL] System.Xml.XmlException : The 'r' character, hexadecimal value 0x72, cannot be included in a name. Stack Trace: E:\src\oss\xml\src\System.Xml\src\System\Xml\Dom\XmlDocument.cs(135,0): at System.Xml.XmlDocument.CheckName(String name) E:\src\oss\xml\src\System.Xml\src\System\Xml\Dom\XmlElement.cs(21,0): at System.Xml.XmlElement..ctor(XmlName name, Boolean empty, XmlDocument doc) E:\src\oss\xml\src\System.Xml\src\System\Xml\Dom\XmlDocument.cs(1014,0): at System.Xml.XmlDocument.CreateElement(String prefix, String localName, String namespaceURI) E:\src\oss\xml\src\System.Xml\src\System\Xml\Dom\XmlDocument.cs(595,0): at System.Xml.XmlDocument.CreateElement(String name) E:\src\oss\xml\src\System.Xml\tests\XmlDocument\XmlAttributeCollectionTests\AppendTests.cs(14,0): at System.Xml.Tests.AppendTests.CreateDocumentWithElement() E:\src\oss\xml\src\System.Xml\tests\XmlDocument\XmlAttributeCollectionTests\AppendTests.cs(48,0): at System.Xml.Tests.AppendTests.AppendRemovesExistingAttribute() Finished: System.Xml.XmlDocument.Tests ``` 9895 area-System.Net Make sure TcpClient.ExclusiveAddressUse throws on Unix This is related to the failure that happened in #9849. cc: @stephentoub @ericeil 9905 area-System.Net Do a Debug.Assert in HttpContent.TryGetBuffer if we can't get it This will cause debug builds that start going down this path to fail, so we're notified if we start copying the data. cc @davidsh @stephentoub @CIPop 9911 area-System.Xml [dev/xml] Fix packaging for System.Xml and System.Xml.Linq 9913 area-System.Xml Fix or remove all BINCOMPAT TODO in System.Private.Xml 9915 area-System.Xml [dev/xml] Check if System.Text.StringBuilder should be used instead of System.Xml.BufferBuilder 9917 area-Infrastructure Enable CoreFX test runs on OneCoreUAP images for x86 and x64 CC @weshaggard @joshfree 9920 area-System.Text Expose XmlTextReaderImpl.DetectEncoding as more general API (also for text files) Seems pretty useful. cc: @tarekgh 9924 area-System.IO ZipArchive: Throw specific error messages for unsupported data ZipArchive decompression should throw a better error message when an entry is compressed using an unsupported method. Right now it says `The archive entry was compressed using an unsupported compression method.` It should say something like `The archive entry was compressed using [type] and is not supported` 9925 area-System.IO Compression: Add support for Deflate64 We allow decompression of Zip64 zips but not if they contain entries compressed with Deflate64. This is somewhat problematic, as zips created by the Windows explorer utility that are >2gb are compressed using Deflate64. ZLib doesn't support deflate64, so it would need to be our own implementation. 9928 area-Infrastructure build.sh fails on Arch Linux because Blob missing "init-tools.log: ``` Running: /home/paul/code/paulcbetts/corefx/init-tools.sh Installing 'https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/1.0.0-preview2-002733/dotnet-dev-arch.-x64.1.0.0-preview2-002733.tar.gz' to '/home/paul/code/paulcbetts/corefx/Tools/dotnetcli/dotnet.tar' Running: /home/paul/code/paulcbetts/corefx/Tools/dotnetcli/dotnet restore ""/home/paul/code/paulcbetts/corefx/Tools/1.0.25-prerelease-00517-05/project.json"" --packages /home/paul/code/paulcbetts/corefx/packages --source https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json Running: /home/paul/code/paulcbetts/corefx/packages/Microsoft.DotNet.BuildTools/1.0.25-prerelease-00517-05/lib/init-tools.sh /home/paul/code/paulcbetts/corefx /home/paul/code/paulcbetts/corefx/Tools/dotnetcli/dotnet /home/paul/code/paulcbetts/corefx/Tools ``` ``` paul@io:~/code/paulcbetts/corefx/Tools/dotnetcli% cat dotnet.tar BlobNotFoundThe specified blob does not exist. RequestId:ccf4fbc2-0001-0128-1f9c-d9576f000000 Time:2016-07-09T04:47:08.2585465Z ``` " 9932 area-System.IO Inconsistent default access mode for Package.Open(Stream) between .Net Core and .Net Framework The default access mode for `Package.Open(Stream)` is `ReadWrite` on .Net Core, while it's `Read` on .Net Framework. This means that a program that runs on one can fail on the other, in both directions. In my case, I have code like: ``` c# Package.Open(File.OpenRead(path)); ``` [This code](https://gist.github.com/svick/0dfbcef372c72127df791de8f4d1b471) runs successfully with `dotnet run -f net46`, but throws with `dotnet run -f netcoreap1.0`: ``` Unhandled Exception: System.ArgumentException: Update mode requires a stream with read, write, and seek capabilities. at System.IO.Compression.ZipArchive.Init(Stream stream, ZipArchiveMode mode, Boolean leaveOpen) at System.IO.Compression.ZipArchive..ctor(Stream stream, ZipArchiveMode mode, Boolean leaveOpen, Encoding entryNameEncoding) at System.IO.Packaging.ZipPackage..ctor(Stream s, FileMode packageFileMode, FileAccess packageFileAccess) at System.IO.Packaging.Package.Open(Stream stream, FileMode packageMode, FileAccess packageAccess) at System.IO.Packaging.Package.Open(Stream stream) at ConsoleApplication.Program.Main(String[] args) ``` The cause seems to be that on .Net Framework [`Package.Open(Stream)` calls `Open(stream, _defaultStreamMode, _defaultStreamAccess)`](http://referencesource.microsoft.com/#WindowsBase/Base/System/IO/Packaging/Package.cs,226), where `_defaultStreamAccess` is `FileAccess.Read`, while on .Net Core, [`Package.Open(Stream)` calls `Open(stream, s_defaultStreamMode)`](https://github.com/dotnet/corefx/blob/83432af/src/System.IO.Packaging/src/System/IO/Packaging/Package.cs#L149), which in turn calls `Open(stream, packageMode, s_defaultFileAccess)`, where `s_defaultFileAccess` is `FileAccess.ReadWrite`. I'm not sure how could this be fixed without breaking compatibility on .Net Core or .Net Framework. 9933 area-Meta All Linux ARM Emulator Cross Build legs in PRs are failing @Priya91 9938 area-Serialization Change System.Json version number to match Mono? From @ericstj here: https://github.com/dotnet/corefx/pull/9897/files/391dae1d0f3789e0c11190f357e02fbcc03570db#r70150707 > I think this version needs to match the version xamarin has inbox (2.0.5.0). We should test that. 9946 area-System.ComponentModel Investigate return of System.ComponentModel.Composition.* Core has System.Composition.dll Core does not have S.ComponentModel.Composition and System.ComponentModel.Composition.DataAnnotations. These are in Xamarin for Android (unlike System.ComponentModel.Composition.Registration) These two need to get into Core. They are reflection heavy so that work has to happen first. I see a bit of ref.emit also, which hopefully isn't essential. 9949 area-Meta UWP-EF-SQlite (Not compatible with Prism Framework) "For some strange reason on a Blank App(UWP) with suggested (temporary)fixes solved the issues in 5.2. with SQLite on closely following the docs. However the fixes break the xaml designer when the Prism framework i.e. prism 6.1.0, unity 4.0.1 and on VS update 3 is applied. ""GridView, Stackpanel ... Etc cannot be children of the Grid"" is the error message. It's not just the grid but most layout controls seems to broken. And this might not be just prism but it seems also on Template 10 according to this..https://github.com/Windows-XAML/Template10/issues/1109 " 9952 area-Infrastructure 450+ warnings on a build! "They're all currently of the form: ``` C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. ``` or: ``` D:\j\workspace\windows_nt_debug88592b53\Tools\packageresolve.targets(74,5): warning : Your project is not referencing the "".NETCoreApp,Version=v1.0"" framework. Add a reference to "".NETCoreApp,Version=v1.0"" in the ""frameworks"" section of your project.json, and then re-run NuGet restore. ``` but it makes it really hard to spot important warnings. Replaces https://github.com/dotnet/corefx/issues/9464 cc: @weshaggard, @ericstj, @joperezr, @karajas " 9956 area-System.Net Improve behavior of TcpClient Dispose concurrent with ConnectAsync TcpClient.Dispose is not meant to be used concurrently with other operations on the instance, but some code does do so as a way to provide a cancellation mechanism. There are two easily hit issues with this: 1. On Unix, the ConnectAsync operation doesn't publish the actual Socket on which a connection was made until after the connection is established, as it needs to use temporary sockets to try each potential target address, and publishing it before connecting could end up publishing a Socket that won't end up being the actual one used. As such, if a Dispose occurs during the ConnectAsync operation, it won't end up disposing the socket being used to make the connection, such that the connection won't be canceled. 2. On all platforms, Dispose nulls out the client socket field. When the connection then subsequently completes, it hits a NullReferenceException while trying to dereference that field. This commit addresses both issues: a. When the client is disposed, on Unix we cancel a CancellationTokenSource, and each Socket we create is registered with that source to dispose the socket. That way, we dispose of each socket even if it hasn't been published onto the instance yet. b. We grab the Socket from the field and check for null prior to dereferencing it. cc: @cipop, @ericeil, @davidsh Fixes #9423 9958 area-Infrastructure Support to run selected tests in run-test.sh Add --test-dir option to run selected tests only. To run given tests only, add '--test-dir' option to run-test.sh. The existing '--restrict-proj' option compares all test list to jugde if it runs or not. And it runs only matched tests with regex. If there is no matched rule among tests, this option will be useful. I will post PR soon. 9966 area-System.Security TripleDES is not allowing 16 byte keys "This works on full framework, but not core. This is a simple alteration of the dotnet new to isolate the problem (only other change is to add net452 to project.json). ``` csharp using System; using System.Security.Cryptography; using System.Text; namespace ConsoleApplication { public class Program { public static void Main(string[] args) { var d = TripleDES.Create(); d.Key = ASCIIEncoding.ASCII.GetBytes(""1234567890123456""); Console.WriteLine(""Hello World!""); } } } ``` Running the above under net452 works fine, but under netcoreapp10 results in: ``` Unhandled Exception: System.Security.Cryptography.CryptographicException: Specified key is not a valid size for this alg orithm. at System.Security.Cryptography.SymmetricAlgorithm.set_Key(Byte[] value) at System.Security.Cryptography.TripleDES.set_Key(Byte[] value) at ConsoleApplication.Program.Main(String[] args) ``` " 9973 area-Infrastructure Build on specific Platform restores current Platform's binaries e.g. ``` PS D:\git\corefx\src\System.IO.Compression\tests [master]> msbuild /t:rebuildandtest /P:Platform=arm PS D:\git\corefx\src\System.IO.Compression\tests [master]> cd D:\git\corefx\bin/tests/Windows_NT.arm.Debug/System.IO.Compression.Tests/netcoreapp1.0/ PS D:\git\corefx\bin\tests\Windows_NT.arm.Debug\System.IO.Compression.Tests\netcoreapp1.0 [master]> dumpbin .\clrcompression.dll /headers Dump of file .\clrcompression.dll PE signature found File Type: DLL FILE HEADER VALUES 8664 machine (x64) ``` 9975 area-Infrastructure Windows Nano runs are not working on Jenkins Recently (after Jul 7 buildtools update) on build.cmd /p:OSGroup=Windows_NT is dropping assemblies that build for AnyOS to both tests/AnyOS.AnyCPU.Configuration/lib/netcoreapp1.0 and tests/Windows_NT.AnyCPU.Configuration/lib/netcoreapp1.0. These libs mostly have the builds file authored for AnyOS on netcoreapp1.0 and Windows_NT for net46 and netcore50, for ex, [System.AppContext.Tests.builds](https://github.com/dotnet/corefx/blob/master/src/System.AppContext/tests/System.AppContext.Tests.builds). This change is causing Windows Nano builds to fail, as there is no RunTests.cmd generated for the net46 and netcore50 sku in tests\Windows_NT.AnyCPU.Configuration\lib\netcoreapp1.0. The test TFM folder name is also wrong (netcoreapp1.0) for the net46 and netcore50 sku. cc @karajas 9979 area-System.Reflection Seg fault on CentOS in System.Reflection.Metadata.Tests "``` /mnt/resource/j/workspace/dotnet_corefx/master/centos7.1_release_prtest/bin/tests/AnyOS.AnyCPU.Release/System.Reflection.Metadata.Tests/netcoreapp1.0/RunTests.sh: line 297: 27365 Segmentation fault (core dumped) ./corerun xunit.console.netcore.exe System.Reflection.Metadata.Tests.dll -xml testResults.xml -notrait Benchmark=true -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing -notrait category=nonlinuxtests 13:51:22 Finished running tests. End time=20:51:36. Return value was 139 13:51:22 GDB was not found. Unable to print core file. 13:51:23 /mnt/resource/j/workspace/dotnet_corefx/master/centos7.1_release_prtest/Tools/tests.targets(253,5): warning MSB3073: The command ""/mnt/resource/j/workspace/dotnet_corefx/master/centos7.1_release_prtest/bin/tests/AnyOS.AnyCPU.Release/System.Reflection.Metadata.Tests/netcoreapp1.0/RunTests.sh /mnt/resource/j/workspace/dotnet_corefx/master/centos7.1_release_prtest/packages/"" exited with code 139. [/mnt/resource/j/workspace/dotnet_corefx/master/centos7.1_release_prtest/src/System.Reflection.Metadata/tests/System.Reflection.Metadata.Tests.csproj] 13:51:23 /mnt/resource/j/workspace/dotnet_corefx/master/centos7.1_release_prtest/Tools/tests.targets(262,5): error : One or more tests failed while running tests from 'System.Reflection.Metadata.Tests' please check log for details! [/mnt/resource/j/workspace/dotnet_corefx/master/centos7.1_release_prtest/src/System.Reflection.Metadata/tests/System.Reflection.Metadata.Tests.csproj] ``` Log here: http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/centos7.1_release_prtest/822/consoleFull#-17798639014b7730ef-150b-4be7-a00f-82ba6c50792b " 9981 area-System.Security Add Crypto provider wrappers Breakout of some Crypto types that are in Xamarin but not in Core. These are public types which suggest an implementation, but they should now defer to the standard impl. Similarly-prefixed things can/should be done as a single work item. (e.g. Aes\* is one small task). Ideally everything is [EditorBrowsable(Never)] ``` Type or Member Notes T:System.Security.Cryptography.AesManaged Cover over the instance returned by Aes.Create() T:System.Security.Cryptography.AesCryptoServiceProvider Cover over the instance returned by Aes.Create() T:System.Security.Cryptography.MD5CryptoServiceProvider Cover over the instance returned by MD5.Create() T:System.Security.Cryptography.RNGCryptoServiceProvider Cover over the instance returned by RandomNumberGenerator.Create() T:System.Security.Cryptography.SHA1CryptoServiceProvider Cover over the instance returned by SHA1.Create() T:System.Security.Cryptography.SHA1Managed Cover over the instance returned by SHA1.Create() T:System.Security.Cryptography.SHA256Managed Cover over the instance returned by SHA256.Create() T:System.Security.Cryptography.SHA384Managed Cover over the instance returned by SHA384.Create() T:System.Security.Cryptography.SHA512Managed Cover over the instance returned by SHA512.Create() T:System.Security.Cryptography.TripleDESCryptoServiceProvider Cover over the instance returned by TripleDES.Create() ``` 9982 area-System.Security Port System.Security.Cryptography.DSA ``` T:System.Security.Cryptography.DSA ``` Contract is System.Security.Cryptography.Algorithms. Windows: Port DSACng. Unix: All new code. Tests: Some tests exist in RedZone Desktop suite, needs a whole lot of tests. 9983 area-System.Security Port System.Security.Cryptography.HashAlgorithm ``` T:System.Security.Cryptography.HashAlgorithm (ICryptoTransform / incremental hashing) F:System.Security.Cryptography.HashAlgorithm.HashValue F:System.Security.Cryptography.HashAlgorithm.State ``` The incremental hashing methods and ComputeHash together can produce unexpected data and break the incremental hash state machine. In .NET Core 1.0 the incremental part was moved to a new type and the ICryptoTransform declaration was removed. Presumably requires bug-for-bug compat with Framework, and lots of bug-verifying tests. The other two are required for incremental hash mainly. Or derived types as a secondary thing. 9984 area-System.Security Port System.Security.Cryptography.RijndaelManaged, limited to AES This type is getting significant use. `T:System.Security.Cryptography.RijndaelManaged` We should bring it back as functional, but to make it just wrap Aes.Create(), and fail for any Rijndael settings which are not AES settings (since it looks like our Rijndael implementation restricted it to 128/192/256-bit keys already that really just means use a fixed block size). And make it be [EditorBrowsable(Never)] so IntelliSense never suggests it to someone (and we’ll hide it in a different contract/implementation assembly so it only gets picked up by the mscorlib forwarder anyways). Existing code may be copying extraordinarily stale samples which are merely recommending Rijndael-as-AES over DES/3DES. But, since no one used the Rijndael type directly, and it defines no new members, the compat shim RijndaelManaged should directly extend SymmetricAlgorithm. So pretty much every member just defers to the Aes.Create() object, with the possible exception of BlockSize: ``` public int BlockSize { get { return _aes.BlockSize; } set { // Values which were legal in .NET Framework RijndaelManaged but not .NET Core’s shim type if (value == 192 || value == 256) throw new PlatformNotSupportedException(some resource string saying raw Rijndael is not supported); // Any other invalid block size will get the normal “invalid block size” exception. _aes.BlockSize = value; } } ``` (Or, don’t special case it, and let it just throw the invalid block size exception; but that might be bad form) 9985 area-System.Net WebSocket.CloseAsync can throw when WebSocket.CloseOutputAsync has been previously called on Unix If a client calls WebSocket.CloseOutputAsync on an open WebSocket, a Close frame is sent and the WebSocket transitions into the CloseSent state. If it's then desired to wait until the response Close frame is received, for example to check the response status code that the server sends, a call to WebSocket.CloseAsync can then be made. This is necessary as otherwise the alternative is to poll the WebSocket status property until the state changes. This is also codified as CloseAsync is valid to call when the state is CloseSent. If the Close frame sent by the server is received and processed before the state check in WebSocket.CloseAsync is executed, the state will be Closed and CloseAsync will throw (only allowed states when calling CloseAsync are Open, CloseSent and CloseReceived). This is blocking WCF enabling the WebSockets transport for Unix platforms. 9986 area-System.Security Port missing X509Certificate members In System.Security.Cryptography.X509Certificates.X509Certificate -- Easy impl, just needs a couple tests (real cert, and new X509Certificate2() -- default ctor). ``` X509Certificate.GetCertHashString X509Certificate.GetEffectiveDateString X509Certificate.GetExpirationDateString X509Certificate.GetIssuerName X509Certificate.GetName X509Certificate.GetPublicKeyString X509Certificate.GetRawCertData X509Certificate.GetRawCertDataString X509Certificate.GetSerialNumberString ``` Should probably defer to the new PAL ctor instead of copying the Handle ctor. ``` X509Certificate.#ctor(System.Security.Cryptography.X509Certificates.X509Certificate) X509Certificate2.#ctor(System.Security.Cryptography.X509Certificates.X509Certificate) ``` Needed by SignedCms; can be deferred until that is ready. ``` T:System.Security.Cryptography.X509Certificates.X509IncludeOption ``` 9988 area-System.Xml Re-enable and fix Xsl tests loading xsl from dll Re-write these tests so that they don't load xsl from the dll These tests are marked with ActiveIssue This needs to be done as a part of dev/xml branch work 9989 area-System.Collections Lots of code duplication/type unsafety/messiness in System.Collections tests At the moment there appears to be a lot of messiness in the `System.Collections.*` tests. For example the tests [for each collection type](https://github.com/dotnet/corefx/blob/master/src/System.Collections/tests/Generic/HashSet/HashSet.Generic.cs) contains code related to generating the seed/explicitly saying what kinds of type parameters to test. This makes it very hard to add tests for new kinds of types. There is also a lot of `protected abstract` / `override` which makes the code hard to read without jumping back and forth between files, and things like [this](https://github.com/dotnet/corefx/blob/master/src/Common/tests/System/Collections/IGenericSharedAPI.Tests.cs#L50-L55) are not typesafe and reduce readability, since the collection is passed as an argument to the method instead of the method being called on it (e.g. `Count(collection)` vs `collection.Count()`). I'm going to attempt to clean a lot of this code up, as part of #9379 and #9947. 9990 area-System.Security Port System.Security.Cryptography.*Formatters ``` Type or Member Estimate Contract Notes T:System.Security.Cryptography.AsymmetricKeyExchangeDeformatter XS System.Security.Cryptography.Primitives Essentially an interface, no tests. T:System.Security.Cryptography.AsymmetricKeyExchangeFormatter XS System.Security.Cryptography.Primitives Essentially an interface, no tests. (CreateKeyExchange(byte[], Type) could be omitted, or made virtual to ignore the 2nd argument, or leave as-is) T:System.Security.Cryptography.RSAOAEPKeyExchangeFormatter S- System.Security.Cryptography.Algorithms Omit the Rng member. It is never used externally or internally. Should just call new Encrypt(byte[], RSAEncryptionPadding) method, no fallback to Encrypt(byte[]) T:System.Security.Cryptography.RSAOAEPKeyExchangeDeformatter S- System.Security.Cryptography.Algorithms Should just call new Decrypt(byte[], RSAEncryptionPadding) method. No fallback to Decrypt(byte[]) T:System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter S- System.Security.Cryptography.Algorithms Omit the RNG member. It is never used externally or internally. Should just call new Decrypt(byte[], RSAEncryptionPadding) method. No fallback to Decrypt(byte[]) T:System.Security.Cryptography.RSAPKCS1KeyExchangeFormatter S- System.Security.Cryptography.Algorithms Omit the Rng member. It is never used externally and should not have been internally. Should just call new Encrypt(byte[], RSAEncryptionPadding) method, no fallback to Encrypt(byte[]) T:System.Security.Cryptography.AsymmetricSignatureDeformatter XS System.Security.Cryptography.Primitives Essentially an interface, no tests. (VerifySignature(HashAlgorithm) should be omitted) T:System.Security.Cryptography.AsymmetricSignatureFormatter XS System.Security.Cryptography.Primitives Essentially an interface, no tests. (CreateSignature(HashAlgorithm) should be omitted) T:System.Security.Cryptography.DSASignatureDeformatter S- System.Security.Cryptography.Algorithms Blocked behind DSA. Technically should be updated to allow newer hash algorithms (FIPS-186-3). T:System.Security.Cryptography.DSASignatureFormatter S- System.Security.Cryptography.Algorithms Blocked behind DSA. Technically should be updated to allow newer hash algorithms (FIPS-186-3). T:System.Security.Cryptography.RSAPKCS1SignatureDeformatter S- System.Security.Cryptography.Algorithms Just use the new VerifyHash(byte[], byte[], HashAlgorithmName, RSASignaturePadding) method, no other paths. T:System.Security.Cryptography.RSAPKCS1SignatureFormatter S- System.Security.Cryptography.Algorithms Just use the new SignHash(byte[], byte[], HashAlgorithmName, RSASignaturePadding) method, no other paths. ``` 9991 area-System.Security Port KeyedHashAlgorithm.KeyValue `F:System.Security.Cryptography.KeyedHashAlgorithm.KeyValue` Change an auto-prop to have a protected backing field. XS 9992 area-System.Security Port System.Security.Cryptography.xxTransform ``` T:System.Security.Cryptography.ToBase64Transform T:System.Security.Cryptography.FromBase64Transform ``` Need tests: the latter needs lots of whitespace tests. 9996 area-System.Net WindowsIdentity impersonation does not achieve delegation Setup: Client: IE or Chrome Server: Asp.Net Core 1.0 via IIS or WebListener, with Windows Auth enabled. Scenario: A client logs into a web app using windows credentials. The web app in turn impersonates that user to make outgoing HttpClient requests also using windows credentials. Expected: The outgoing HttpClient request should made using the impersonated user's credentials. Actual: The outgoing HttpClient request is made using the web apps default credentials. The scenario works fine when running Asp.Net Core 1.0 on .NET 4.6, it only fails on .NET Core. In both the IIS and WebListener scenarios the WindowsIdentity is constructed from an existing handle from a native API: https://github.com/aspnet/IISIntegration/blob/ed85f504d8da633202b3fec5fdf11e8d6153d447/src/Microsoft.AspNetCore.Server.IISIntegration/IISMiddleware.cs#L112. Since this works with .NET 4.6 apps we assume the original handle is valid and something is wrong inside WindowsIdentity or HttpClient. HttpClient does work with impersonated WindowsIdentities created locally (http://stackoverflow.com/questions/7710538/impersonate-with-username-and-password). Only the delegation scenario appears to be broken. @brentschmaltz @CIPop Ping me directly for repro code, there are a lot of different parts. 9997 area-System.Xml [dev/xml] Re-enable test when System.Globalization.SortKey is back XmlStringSortKey class is missing from XmlSortKey right now. Bring this back if System.Globalization.SortKey is available. The test (marked with ActiveIssue) should be re-enabled as well. This needs to be done as part of dev/xml branch work. 10000 area-System.Runtime Port S.Timers.* ``` T:System.Timers.Timer P:System.Timers.ElapsedEventArgs.SignalTime M:System.Timers.ElapsedEventArgs.get_SignalTime T:System.Timers.ElapsedEventHandler M:System.Timers.ElapsedEventHandler.#ctor(System.Object,System.IntPtr) M:System.Timers.ElapsedEventHandler.BeginInvoke(System.Object,System.Timers.ElapsedEventArgs,System.AsyncCallback,System.Object) M:System.Timers.ElapsedEventHandler.EndInvoke(System.IAsyncResult) M:System.Timers.ElapsedEventHandler.Invoke(System.Object,System.Timers.ElapsedEventArgs) M:System.Timers.Timer.#ctor M:System.Timers.Timer.#ctor(System.Double) P:System.Timers.Timer.AutoReset M:System.Timers.Timer.get_AutoReset M:System.Timers.Timer.set_AutoReset(System.Boolean) P:System.Timers.Timer.Enabled M:System.Timers.Timer.get_Enabled M:System.Timers.Timer.set_Enabled(System.Boolean) P:System.Timers.Timer.Interval M:System.Timers.Timer.get_Interval M:System.Timers.Timer.set_Interval(System.Double) P:System.Timers.Timer.Site M:System.Timers.Timer.get_Site M:System.Timers.Timer.set_Site(System.ComponentModel.ISite) P:System.Timers.Timer.SynchronizingObject M:System.Timers.Timer.get_SynchronizingObject M:System.Timers.Timer.set_SynchronizingObject(System.ComponentModel.ISynchronizeInvoke) M:System.Timers.Timer.BeginInit M:System.Timers.Timer.Close M:System.Timers.Timer.Dispose(System.Boolean) M:System.Timers.Timer.EndInit M:System.Timers.Timer.Start M:System.Timers.Timer.Stop E:System.Timers.Timer.Elapsed M:System.Timers.Timer.add_Elapsed(System.Timers.ElapsedEventHandler) M:System.Timers.Timer.remove_Elapsed(System.Timers.ElapsedEventHandler) M:System.Timers.TimersDescriptionAttribute.#ctor(System.String) P:System.Timers.TimersDescriptionAttribute.Description M:System.Timers.TimersDescriptionAttribute.get_Description T:System.Timers.ElapsedEventArgs T:System.Timers.TimersDescriptionAttribute ``` 10002 area-System.IO System.IO.IsolatedStorage can be referenced by netstandard1.4, but has no associated impl The [reference assembly](https://github.com/dotnet/corefx/blob/afa634708deb4b921dd1e0e6dc5f26ddd0e143b2/src/System.IO.IsolatedStorage/ref/project.json) for System.IO.IsolatedStorage targets netstandard1.4, but the [implementation](https://github.com/dotnet/corefx/blob/afa634708deb4b921dd1e0e6dc5f26ddd0e143b2/src/System.IO.IsolatedStorage/src/project.json) only targets netcore50. Therefore, you can build an app targeting netcoreapp1.0 (+ imports dnxcore50) that'll throw a FileNotFoundException since it can't load System.IO.IsolatedStorage. There is discussion to implement IsolatedStorage in other platforms in #9842, but until that's done, you shouldn't be able to reference IsolatedStorage from platforms where it isn't implemented. 10010 area-System.Net AcceptAsync(SocketAsyncEventArgs e) return true and never call the method of SocketAsyncEventArgs.Completed Im currently developing an window app. I would like to use AcceptAsync method. At the moment there appears to be a lot of messiness in the System.Net.Sockets . AcceptAsync(SocketAsyncEventArgs e) always return true and the method of Accept_Completed never be called.If there any come up with this problem and got the solution to it? `private void ProcessAccept(SocketAsyncEventArgs e)` `{` ``` e.Completed +=new EventHandler(Accept_Completed); e.AcceptSocket = null; //acceptEvtArgs.AcceptSocket = null; bool waitFlag = listeningSocket.AcceptAsync(e); if (!waitFlag) { // operation completed synchronously Accept_Completed(null, e); } ``` `}` 10011 area-System.Xml [dev/xml] Add System.Xml.XmlSerializer APIs to System.Xml 10012 area-System.Runtime How to hook into AppDomain.ProcessExit ? In regular .NETFramework console apps, I can hook into `AppDomain.CurrentDomain.ProcessExit` event to be notified when the console app terminates. This doesn't seem to be present in .NETCore. How else can my library get notified when the calling .NETCore console app terminates? 10013 area-System.Runtime Add methods to convert between hexadecimal strings and bytes "It is quite common to need to convert bytes to hex strings and back. The .NET Framework does not have an API to do that. Look at what lengths people have gone to to solve this problem for them: [How do you convert Byte Array to Hexadecimal String, and vice versa?](http://stackoverflow.com/questions/311165/how-do-you-convert-byte-array-to-hexadecimal-string-and-vice-versa) Many of those solutions are somehow bad (e.g. slow or broken or not validating). `BitConverter.ToString(byte[])` generates strings of a practically useless format: `BitConverter.ToString(new byte[] { 0x00, 0x01, 0xAA, 0xFF })` => `00-01-AA-FF`. I don't understand how this decision was made. This seems to be a special solution for some specific purpose (debug output?). Using this API requires `Replace(str, ""-"", """")` which is ugly and slow. Also, this API is not discoverable because it does not have ""hex"" in it's name. I propose adding an API that does the following: - Supports char[] and string - Supports specifying the output buffer to support zero-allocation scenarios - Supports upper- and lowercase - Fast (probably, this means working in-place using unsafe code) - Validates input - _No_ support for any kind of hex prefix (such as ""0x""), whitespace or digit separator (such as ""-"" or ""\n""). This is out of scope. The use case for char[] in- and outputs is low-allocation scenarios. The API could look like this: ```c# static class HexConvert { byte[] ToBytes(string input, int start, int count, HexFormat hexFormat); void ToBytes(string input, int start, int count, ArraySegment outputBuffer, HexFormat hexFormat); //Repeat the same for ArraySegment as input string ToString(ArraySegment bytes); char[] ToChars(ArraySegment bytes); void ToChars(ArraySegment bytes, ArraySegment outputBuffer); //Plus obvious convenience overloads int HexDigitToInteger(char val); //0-9A-F => 0-15. char IntegerToHexDigit(int value, HexFormat hexFormat); //0-15 => 0-9A-F } [Flags] enum HexFormat { UseDefaults = 0, Lowercase = 1 } //extensible ``` A possible extension would be to support `Stream` and `IEnumerable` as sources and destinations. I would consider this out of scope. I feel that converting hexadecimal strings is an important and frequent enough thing that this should be supported well. Of course, a ""light"" version of this proposal is also feasible (just support for string and byte[] with no user-provided output buffer). Not sure if anyone wants/needs lowercase hex, I don't but others might. This seems cheap enough to implement. Testing should be easily automatable. I don't see any particular usability problems. This is suitable for community contribution. " 10021 area-System.Security Possible unnecessary Padding Oracle problems with UniversalCryptoDecryptor.cs I noticed a manual padding implementation in here while I was helping someone debug some code. I'm no crypto expert, but I noticed variable timing on the padding verification, and possibly on the BlockCopy (depending on implementation) is it just a memcpy? Does this open you up to a padding oracle attack? You mention that the platform (I'm assuming BCrypt, doesn't support padding in CBC mode for you), but it does. All you have to do is turn padding on on your last call to BCryptEncrypt and BCryptDecrypt. I recently had to deal with this and I've linked it. https://github.com/aws/aws-sdk-cpp/blob/master/aws-cpp-sdk-core/source/utils/crypto/bcrypt/CryptoImpl.cpp#L654 10023 area-System.Xml [dev/xml] Fix debug enabled option in XslCompiledTransform Fix commented-out code (Marked with `//BinCompat TODO`) in XmlILModule supposed to run when XslCompiledTransform has enabled debug. When debug=true is passed to XslCompiledTransform, in the CompileQilToMsil step of the xsl transform the dynamic method is not being baked correctly (either due to the dynamic assembly not being generated correctly, or the dynamic module) and we get Object null reference error when the dynamic method Execute is being called. Also, re-enable tests tracking this issue. 10024 area-System.Net Dns.GetHostEntryAsync() throws SocketException if called before any other Socket APIs "# Repro Steps - dotnet new - Replace the contents of `Main()` with the following: ``` csharp Console.WriteLine(System.Net.Dns.GetHostEntryAsync(""127.0.0.1"").Result.AddressList.Length); ``` - dotnet run - App throws following exception: ``` Unhandled Exception: System.AggregateException: One or more errors occurred. (Either the application has not called WSAStartup, or WSAStartup failed) ---> System.Net.Sockets.SocketException: Either the application has not called WSAStartup, or WSAStartup failed at System.Net.Dns.HostResolutionEndHelper(IAsyncResult asyncResult) at System.Net.Dns.EndGetHostEntry(IAsyncResult asyncResult) at System.Net.Dns.<>c.b__16_1(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at ConsoleApplication.Program.Main(String[] args) ``` - Add the following before the call to `Dns.GetHostEntryAsync()`: ``` csharp new System.Net.Sockets.Socket(System.Net.Sockets.SocketType.Stream, System.Net.Sockets.ProtocolType.Tcp); ``` - App works correctly. CC: @stephentoub " 10028 area-System.Diagnostics EventSource for .Net Native does not consider properties for derived types of EventData In StubEnvironment.cs, type.GetProperties is defined as type.GetTypeInfo().DeclaredProperties, which doesn't return the properties of any derived types. It should be type.GetRuntimeProperties which does. 10031 area-System.Data System.Data.SqlClient connection issue on OS X "Attempting to open a connection to a SQL Server 2008R2 database from OS X results in a timeout during the login process: ``` System.Data.SqlClient.SqlException: Connection Timeout Expired. The timeout period elapsed during the post-login phase. The connection could have timed out while waiting for server to complete the login process and respond; Or it could have timed out while attempting to create multiple active connections. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=1232; handshake=2559; [Login] initialization=5; authentication=18; [Post-Login] complete=56058; ---> System.ComponentModel.Win32Exception: Unknown error: 258 --- End of inner exception stack trace --- at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) ``` Initially found in an ASP.NET Core MVC Controller, I have recreated the issue with the following console program: ``` c# using System; using System.Data.SqlClient; namespace ConsoleApplication { public class Program { public static void Main(string[] args) { Console.WriteLine(""Attempting to open connection...""); try { SqlConnection conn = new SqlConnection(""Data Source=server;Initial Catalog=database;User ID=user;Password=password;Connection Timeout=60;Application Name=dotnetcore""); conn.Open(); Console.WriteLine(""...Success""); conn.Close(); } catch (Exception ex) { Console.WriteLine(string.Format(""...{0}"",ex)); } } } } ``` Both the original ASP.NET MVC Controller and the console program work on Windows. I have not been able to test on Linux as I currently don't have an environment available. The OS X machine that the issue was found on can connect to the database using SQLPro for MSSQL. " 10040 area-System.Net Deadlock in WinHttpResponseStream While investigating #9785, I saw one System.Net.Http test run deadlock in some cancellation token registration management code. One thread was unregistering from a cancellation token: ``` 00 ntdll!ZwDelayExecution 01 KERNELBASE!SleepEx 02 CoreCLR!Thread::UserSleep 03 CoreCLR!ThreadNative::Sleep 04 System_Private_CoreLib_ni!System.Threading.Thread.Sleep(Int32) 05 System_Private_CoreLib_ni!System.Threading.SpinWait.SpinOnce() 06 System_Private_CoreLib_ni!System.Threading.CancellationTokenSource.WaitForCallbackToComplete(System.Threading.CancellationCallbackInfo) 07 system_net_http!System.Net.Http.WinHttpRequestState.DisposeCtrReadFromResponseStream() 08 system_net_http!System.Net.Http.WinHttpRequestCallback.OnRequestReadComplete(System.Net.Http.WinHttpRequestState, UInt32) 09 system_net_http!System.Net.Http.WinHttpRequestCallback.RequestCallback(IntPtr, System.Net.Http.WinHttpRequestState, UInt32, IntPtr, UInt32) 0a system_net_http!System.Net.Http.WinHttpRequestCallback.WinHttpCallback(IntPtr, IntPtr, UInt32, IntPtr, UInt32) 0b system_console!DomainBoundILStubClass.IL_STUB_ReversePInvoke(Int64, Int64, Int32, Int64, Int32) 0c CoreCLR!UMThunkStub 0d winhttp!HTTP_REQUEST_HANDLE_OBJECT::_SafeAppCallback 0e winhttp!HTTP_REQUEST_HANDLE_OBJECT::_ControlledAppCallback 0f winhttp!HTTP_REQUEST_HANDLE_OBJECT::IndicateCompletionStatusCommon 10 winhttp!HTTP_REQUEST_HANDLE_OBJECT::IndicateCompletionStatusInline 11 winhttp!WinHttpReadData 12 system_console!DomainBoundILStubClass.IL_STUB_PInvoke(SafeWinHttpHandle, IntPtr, UInt32, IntPtr) 13 system_net_http!System.Net.Http.WinHttpResponseStream+<>c__DisplayClass17_0.b__0(System.Threading.Tasks.Task`1) 14 System_Private_CoreLib_ni!System.Threading.Tasks.Task.Execute() 15 System_Private_CoreLib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) 16 System_Private_CoreLib_ni!System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef) 17 System_Private_CoreLib_ni!System.Threading.Tasks.Task.ExecuteEntry(Boolean) 18 System_Private_CoreLib_ni!System.Threading.ThreadPoolWorkQueue.Dispatch() 19 CoreCLR!CallDescrWorkerInternal 1a CoreCLR!MethodDescCallSite::CallTargetWorker 1b CoreCLR!MethodDescCallSite::Call_RetBool 1c CoreCLR!QueueUserWorkItemManagedCallback 1d CoreCLR!ManagedThreadBase_DispatchInner 1e CoreCLR!ManagedThreadBase_DispatchMiddle 1f CoreCLR!ManagedThreadBase_DispatchOuter 20 CoreCLR!ManagedThreadBase_FullTransitionWithAD 21 CoreCLR!ManagedThreadBase::ThreadPool 22 CoreCLR!ManagedPerAppDomainTPCount::DispatchWorkItem 23 CoreCLR!ThreadpoolMgr::ExecuteWorkRequest 24 CoreCLR!ThreadpoolMgr::WorkerThreadStart 25 CoreCLR!Thread::intermediateThreadProc 26 KERNEL32!BaseThreadInitThunk 27 ntdll!RtlUserThreadStart ``` So, `CancellationTokenSource.WaitForCallbackToComplete` is waiting for an already-executing registered callback. This appears to be running on the following stack: ``` 00 ntdll!ZwWaitForMultipleObjects 01 KERNELBASE!WaitForMultipleObjectsEx 02 CoreCLR!WaitForMultipleObjectsEx_SO_TOLERANT 03 CoreCLR!Thread::DoAppropriateAptStateWait 04 CoreCLR!Thread::DoAppropriateWaitWorker 05 CoreCLR!Thread::DoAppropriateWait 06 CoreCLR!CLREventBase::WaitEx 07 CoreCLR!CLREventBase::Wait 08 CoreCLR!AwareLock::EnterEpilogHelper 09 CoreCLR!AwareLock::EnterEpilog 0a CoreCLR!SyncBlock::EnterMonitor 0b CoreCLR!ObjHeader::EnterObjMonitor 0c CoreCLR!Object::EnterObjMonitor 0d CoreCLR!JITutil_MonEnterWorker 0e system_net_http!System.Net.Http.WinHttpResponseStream.CancelPendingResponseStreamReadOperation() 0f system_net_http!System.Net.Http.WinHttpResponseStream+<>c.b__17_1(System.Object) 10 System_Private_CoreLib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) 11 System_Private_CoreLib_ni!System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(Boolean) 12 System_Private_CoreLib_ni!System.Threading.CancellationTokenSource.Cancel() 13 system_net_http_functional_tests!System.Net.Http.Functional.Tests.ResponseStreamTest+d__5.MoveNext() 14 System_Private_CoreLib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) 15 System_Private_CoreLib_ni!System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.RunWithDefaultContext() 16 xunit_execution_dotnet!Xunit.Sdk.AsyncTestSyncContext+<>c__DisplayClass7_0.b__1(System.Object) 17 xunit_execution_dotnet!Xunit.Sdk.MaxConcurrencySyncContext.RunOnSyncContext(System.Threading.SendOrPostCallback, System.Object) 18 System_Private_CoreLib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) 19 xunit_execution_dotnet!Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc() 1a xunit_execution_dotnet!Xunit.Sdk.XunitWorkerThread+<>c.b__5_0(System.Object) 1b System_Private_CoreLib_ni!System.Threading.Tasks.Task.Execute() 1c System_Private_CoreLib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) 1d System_Private_CoreLib_ni!System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef) 1e System_Private_CoreLib_ni!System.Threading.Tasks.Task.ExecuteEntry(Boolean) 1f System_Private_CoreLib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) 20 CoreCLR!CallDescrWorkerInternal 21 CoreCLR!MethodDescCallSite::CallTargetWorker 22 CoreCLR!MethodDescCallSite::Call 23 CoreCLR!ThreadNative::KickOffThread_Worker 24 CoreCLR!ManagedThreadBase_DispatchInner 25 CoreCLR!ManagedThreadBase_DispatchMiddle 26 CoreCLR!ManagedThreadBase_DispatchOuter 27 CoreCLR!ManagedThreadBase_FullTransitionWithAD 28 CoreCLR!ManagedThreadBase::KickOff 29 CoreCLR!ThreadNative::KickOffThread 2a CoreCLR!Thread::intermediateThreadProc 2b KERNEL32!BaseThreadInitThunk 2c ntdll!RtlUserThreadStart ``` `WinHttpResponseStream.CancelPendingResponseStreamReadOperation` is trying to acquire a lock, which is already held by the first thread - the one waiting for the cancellation callback to complete. So, classic deadlock. I can't reproduce this reliably, but I found it while running System.Net.Http.Functional.Tests under WinDBG, which may alter timing enough to make this more likely to repro. 10041 area-System.Net Add Negotiate and MultipleSchemes code to the System.net test Prerequisites "Add the missing `showidentity.ashx` file required by [DefaultCredentialsTest.cs](https://github.com/dotnet/corefx/blob/32b96925efce0dde416103862d0f37877918ec94/src/System.Net.Http/tests/FunctionalTests/DefaultCredentialsTest.cs#L25) ``` C# // This test endpoint offers multiple schemes, Basic and NTLM, in that specific order. This endpoint // helps test that the client will use the stronger of the server proposed auth schemes and // not the first auth scheme. private static Uri MultipleSchemesAuthenticatedServer = new Uri($""http://{DomainJoinedTestServer}/test/auth/multipleschemes/showidentity.ashx""); ``` " 10044 area-System.Net Avoid wrapping async I/O in synchronous methods in the HTTP tests "One theory I had about a potential cause of #9785 and #9270 was that it might be due to ThreadPool starvation; if not enough threads are available in the ThreadPool for long enough that a timeout fires, we might see the dreaded ""a task was canceled"" exception. To test this, I ran the System.Net.Http tests with the CoreCLR ThreadPool configured to limit itself to a single thread, and to trigger a breakpoint whenever that thread was tied up for a long time: ``` set COMPlus_ThreadPool_ForceMinWorkerThreads=1 set COMPlus_ThreadPool_ForceMaxWorkerThreads=1 set COMPlus_ThreadPool_DebugBreakOnWorkerStarvation=1 ``` The breakpoint was triggered pretty consistently for the tests which use `DelegateStream`, due to that type's default of providing synchronous `Read` and `Write` methods in terms of the caller-supplied async methods; by blocking the current thread until the async I/O completes, we potentially require _another_ ThreadPool thread, which may not be available soon, if ever. This change forces callers to prove synchronous implementations if they've provided async methods, and updates the callers to do so. After this, I have been unable to find any additional ThreadPool starvation issues in these tests. Unfortunately this does not appear to have fixed the problem I was looking at, as I still saw occasional ""a task was canceled"" errors. But maybe it's a good change to make anyway. :smile: @stephentoub @CIPop @davidsh " 10045 area-System.Net Adding server code. Fixing IIS application deployment. - Adding the server code used for the Azure deployment and the internal IIS-based test infrastructure. The code was adapted from @davidsh's private repository. - Instructions and scripts to build the ASP.Net scripts before deployment. - Changed the powershell scripts to deploy the binaries. - Verified that the tests are passing. Disabled some of the HttpClient tests as we need to re-design them to use actual Kerberos/NTLM authentication and add the missing server-side files to the repository (#10041). - Moved the prerequisites within common\test\System\Net since they are specific to the networking contracts. We can move them back if other teams want to onboard their e2e tests within this infrastructure. Fixes #9048 @davidsh @stephentoub @vijaykota @shrutigarg @himadrisarkar PTAL 10046 area-System.Data System.Data.SqlClient.SqlDataReader has no close method? Do we have to worry about closing the SqlDataReader? I get the feeling that it's handled upon closing the connection. thanks for your attention. 10051 area-System.Net HttpClient ignores ExpectContinue setting when using curl "When running on a platform that requires the curl library to back HttpClient, the curl library will automatically add an ""Expect: 100-continue"" header to any POST request which is greater than 1kB. This action is ignoring any potential setting where the headers passed into the client explicitly requested the header to be disabled. For example, something like: ``` c# var httpClient = new HttpClient(); httpClient.DefaultRequestHeaders.ExpectContinue = false; var response = await httpClient.PostAsync(""http://www.example.com"", new ByteArrayContent(new byte[16384])); ``` will result in an Expect header despite the default header setting. This issue could likely be resolved by adding a block of code almost identical to the TransferEncodingChunked header handling in CurlHandler.EasyRequest.cs, line 618 or so. Sending an ""Expect:"" header to curl will instruct the library to omit the header even if it would have added it otherwise. " 10052 area-System.Net Remove automatic curl Expect header if the request disabled it Attempts to fix #10051, but having issues with the full build on my machine. Cannot verify it passes all tests but we are running it in production and it seems to work. 10054 area-System.Console Console encoding defaults to UTF-8 "With .NET Core, the default encoding on my W10 box is now UTF-8. In the full .NET Framework, this was IBM437. Running the code fragment below gives the following results: **.NET Core:** Speed 24┬á116,00 KB/s Encoding: Unicode (UTF-8) | utf-8 **.NET Framework:** Speed 24 116,82 KB/s Encoding: OEM United States | IBM437 I could of course change the code page that the command prompt uses, but I'm not sure everyone is willing to do this. ``` cs using System; using System.Globalization; namespace ConsoleApp2 { public class Program2 { public static void Main2(string[] args) { var culture = new CultureInfo(""nl-BE""); var speed = 24116m; var formatted = string.Format(culture, ""Speed {0:N2} KB/s"", speed); Console.WriteLine(formatted); Console.WriteLine(""Encoding: {0} | {1}"", Console.OutputEncoding.EncodingName, Console.OutputEncoding.ToString()); } } } ``` " 10057 area-System.Numerics Propose additions to System.Numerics.Vectors Originally posted in https://github.com/dotnet/corefx/issues/157 as this is also features which would benefit from ref passing into and out-of matrix... unfortunatly I though I could be clever and give an interface to a struct and get just a reference of that struct, but it ends up being a separate entity entirely. Especially in a full suite, the same vector(s) might be easily reference by multiple consumers without having to keep a reference of the object they are in generically. can we have additional matrix methods, that are rotate( axis1, axis2, angle) where axis1 and 2 are enumerations for 'forward', 'right' and 'up' or whatever native direction your matrices are? enum { forward, right, left, back[ward], up, down }; where you can specify a direction normal from the matrix and rotate that towards another vector, with a given angle. ( Another solution would be to propose the rules of the JIT and allow adding/extending classes in System.Numerics.Vectors from 3rd party places instead of also requiring optimizations only get considered if the code is in a specifically named DLL; since this does seem to be a 1-off ) In real physics you rarely would apply exactly on a singular axis. It's only convenient in navigating virtual spaces from current input devices... --- More specifically I have a RotateRelative( x, y, z ) method that internally has a tick counter that goes from 0 to 5 for the 6 combinations of roll, pitch and yaw... or rotation about primary axis... This calls a more general function that does `rotate( x_axis, /*to*/ y_axis, angle )` to roll left(or right depending on direction of your axis I guess, or -angle which is just a float) rotate pitch up (pulling back on a airplane yoke)... `rotate( y_axis, z_axis, angle )` /\* rotates pitch down in a positive direction. */ These are simply sin(angle),cos(angle) applied to 2 lines of the matrix. (unfortunately I think your matrix is column major, so the rows can't be treated as the direction numbers for the matrix... to apply forward/backward translation as scale(forward, x ) to move in space that much? getting too abstract again? --- a third method I think already exists to rotate a axis around an arbitrary axis by an angle? can build a quaternion for that and reduce to a matrix? --- Experimentation has shown that in small increments ( < 90 degrees/sec in 60th of that intervals for 90 degress/60 frames) it's not too inaccurate to just use the same order (roll, pitch, yaw) to get a resulting transformation. But I do prefer to just keep my matrix as the orientation representation with an offset that works as the origin of that matrix... which an inverse application of that can work as a camera, which is a rare computation compared to other relative motion calculations.... https://docs.google.com/document/d/1_6JdZ0VplMFpBeR3QOcV5vhlOGYyn52T4-fITgI6lbc I jotted that down a bit ago. https://d3x0r.org:444/javascript/test3d/ (self signed certificate, beware, I'm spreading knowledge, please login and save the sources yourself) ... I did update my fork of three.js to have to above mentioned methods. There's a few buttons at the top, Mode 1, Mode 2 and Mode 3; and Controls 1 and Controls 2. Mode 1 and Controls 1 is the default. Controls1 click and drag moves like first person camera, controls 2 , click and move is an obit camera (not really important; no motion really required) Mode 1 - top left cube is reference relative rotation cube stepping through each of the variations... The bottom 6 cubes have their relative rotation always applied in the same order (the order specified by the text over them) ... The 3 cubes above the bottom 6 are single rotation references for directionality... It turns 90 degress and then pauses. Mode 2 is the same as Mode 1 really except slightly faster; so the divergences appear sooner... Mode 1 - the lower 6 are slow motion, as if rotated sequentailly 90 degrees in each of it's directions; in the various combinartions. THe three rotations happen then a pause showing completed doing 90 degrees each way. Mode2 - always applies the rotations in the same order but in smaller steps; some of these are faster than the ideal (top left) and some are slower.... I'm not sure what the reason exactly is for the combinations of three that are the same. Mode 3 the lower 6 cubes are based on building a quaternion using roll pitch yaw... multiplying in order (if text is yaw, pitch, roll... the multiplication is ( ( yaw \* pitch ) \* roll ) . This is saved as a target vector, and then a slerp is used between initial position and the computed target... so especially with larger angles applied; the resulting computation is not the same... demonstrating quaternions to have similar problems... and ideally should also be muxed though an iteration of applied ordering. 10061 area-System.Data SqlConnection's BeginTransaction is slow in .net core 1.0 (up to 250ms) This code is very slow compared to the full .Net Framework (under 1ms), is this expected behavior? _con is SqlConnection and _con_trans is SqlTransaction ``` try { _con.Open(); _con_trans = _con.BeginTransaction(IsolationLevel.ReadCommitted); } catch { _con_trans = null; _con.Close(); throw; } ``` 10062 area-System.Globalization Compat work for Cultures (Globalization) (for Windows) "This work to port the missing APIs from the classes: CultureInfo DateTimeFormatInfo NumberFormatInfo RegionInfo DigitShapes CharUnicodeInfo StringInfo TextInfo You can get the list of the APIs we need to expose from @danmosemsft list https://microsoft.sharepoint.com/teams/netfx/corefx/_layouts/15/WopiFrame.aspx?sourcedoc=%7b79FEE733-9D22-44F8-9BD9-536FF8DF621E%7d&file=android.to.core.component2.xlsx&action=default Please double check the list to make sure we covered all missing APIs. Here is some important notes - Please don't expose any API deals with the LCID (locale ids). these are Windows specific and not recommended to use even on Windows. people always should use culture names instead of LCIDs. here is list of such APIs: - M:System.Globalization.CultureInfo.get_LCID - P:System.Globalization.CultureInfo.LCID - P:System.Globalization.TextInfo.LCID - M:System.Globalization.TextInfo.get_LCID - M:System.Globalization.CultureInfo.#ctor(System.Int32) - M:System.Globalization.CultureInfo.#ctor(System.Int32,System.Boolean) - M:System.Globalization.RegionInfo.#ctor(System.Int32) - M:System.Globalization.CultureInfo.GetCultureInfo(System.Int32) - Please don't expose CultureType, CultureInfo.GetCultures. these are Windows specific and not useful even on Windows. - There are some properties which make sense for Windows only and not to other OS's like CultureInfo.InstalledUICulture, CultureInfo.ThreeLetterWinodwsLanguageName and RegionInfo.ThreeLettersWindowsRegionName. we need to decide if we need to expose them. if we decide to expose them we'll have to initialize those with some fake values on non-Windows OS's. in my opinion these are not really useful properties. - There are some APIs depends on the OS and we need to figure a way to do it on non-Windows OS's. ICU is your way to do it. http://site.icu-project.org/ here is some examples of such APIs - M:System.Globalization.CultureInfo.get_ThreeLetterISOLanguageName - M:System.Globalization.CultureInfo.GetCultureInfoByIetfLanguageTag(System.String) - M:System.Globalization.CultureInfo.CreateSpecificCulture(System.String) - M:System.Globalization.DateTimeFormatInfo.get_NativeCalendarName - M:System.Globalization.DateTimeFormatInfo.GetAllDateTimePatterns - M:System.Globalization.DateTimeFormatInfo.GetAllDateTimePatterns(System.Char) - M:System.Globalization.DateTimeFormatInfo.GetShortestDayName(System.DayOfWeek) - P:System.Globalization.DateTimeFormatInfo.NativeCalendarName - M:System.Globalization.NumberFormatInfo.get_DigitSubstitution - M:System.Globalization.NumberFormatInfo.get_NativeDigits - M:System.Globalization.NumberFormatInfo.set_DigitSubstitution(System.Globalization.DigitShapes) - P:System.Globalization.NumberFormatInfo.DigitSubstitution - P:System.Globalization.NumberFormatInfo.NativeDigits - M:System.Globalization.RegionInfo.get_CurrencyEnglishName - M:System.Globalization.RegionInfo.get_CurrencyNativeName - M:System.Globalization.RegionInfo.get_GeoId - M:System.Globalization.RegionInfo.get_ThreeLetterISORegionName - M:System.Globalization.RegionInfo.get_CurrencyEnglishName - M:System.Globalization.RegionInfo.get_CurrencyNativeName - M:System.Globalization.RegionInfo.get_GeoId - M:System.Globalization.RegionInfo.get_ThreeLetterISORegionName - M:System.Globalization.TextInfo.get_ANSICodePage - M:System.Globalization.TextInfo.get_EBCDICCodePage - M:System.Globalization.TextInfo.get_LCID - M:System.Globalization.TextInfo.get_MacCodePage - M:System.Globalization.TextInfo.get_OEMCodePage - P:System.Globalization.TextInfo.ANSICodePage - P:System.Globalization.TextInfo.EBCDICCodePage - P:System.Globalization.TextInfo.MacCodePage - P:System.Globalization.TextInfo.OEMCodePage - We need to decide if we are going to expose the the Serialization ""System.Runtime.Serialization"" so we can know if we need to port the serialization support in the globalization types. @danmosemsft can help with this. - CultureInfo uses user override bool flag in the constructors we are going to expose. I think this flag will not have any effect on non-Windows OS's. " 10063 area-System.Globalization Compat work for Calendars (for Windows) We need to port all missing APIs in the calendar APIs. you can look at System.Globalization.Calendar class and all types which subclass it. for the complete list please look at @danmosemsft list https://microsoft.sharepoint.com/teams/netfx/corefx/_layouts/15/WopiFrame.aspx?sourcedoc=%7b79FEE733-9D22-44F8-9BD9-536FF8DF621E%7d&file=android.to.core.component2.xlsx&action=default This should be straight forward porting as I am not expecting there is any dependency on the OS 10065 area-System.Globalization Compat work for collations/Sorting (for Windows) "This issue mainly to port all missing APIs in the classes CompareInfo, SortKey and SortVersion You can get the list of the APIs we need to expose from @danmosemsft list https://microsoft.sharepoint.com/teams/netfx/corefx/_layouts/15/WopiFrame.aspx?sourcedoc=%7b79FEE733-9D22-44F8-9BD9-536FF8DF621E%7d&file=android.to.core.component2.xlsx&action=default We already have some native PAL implementation which can be used to enable these types implementation on Linux. you can look at https://github.com/dotnet/coreclr/blob/7d1cd169944306ee25c847c77104722a60c2247c/src/corefx/System.Globalization.Native/collation.cpp especially GlobalizationNative_GetSortKey method. Here is some important notes: - Please don't expose any API deals with the LCID (locale ids). these are Windows specific and not recommended to use even on Windows. people always should use culture names instead of LCIDs. here is list of such APIs: - M:System.Globalization.CompareInfo.get_LCID - M:System.Globalization.CompareInfo.GetCompareInfo(System.Int32) - M:System.Globalization.CompareInfo.GetCompareInfo(System.Int32,System.Reflection.Assembly) - for SortVersion, I think we can use the ICU library version to implment this one as Windows implmentation is really depends on Windows APIs - We need to decide if we are going to expose the the Serialization ""System.Runtime.Serialization"" so we can know if we need to port the serialization support in the globalization types. @danmosemsft can help with this. " 10066 area-System.Globalization Compat work for String class globalization APIs (for Windows) We need to look at the string class for all APIs we need to port which uses CultureInfo object. ``` public static int Compare(string strA, int indexA, string strB, int indexB, int length, bool ignoreCase, CultureInfo culture); public static int Compare(string strA, int indexA, string strB, int indexB, int length, CultureInfo culture, CompareOptions options); public static int Compare(string strA, string strB, bool ignoreCase, CultureInfo culture); public static int Compare(string strA, string strB, CultureInfo culture, CompareOptions options); public bool EndsWith(string value, bool ignoreCase, CultureInfo culture); public bool StartsWith(string value, bool ignoreCase, CultureInfo culture); public string ToLower(CultureInfo culture); public string ToUpper(CultureInfo culture); ``` Note that we need to expose these from System.Globalization.Extensions contract as we don't want System.Runtime depends on Globalization at all. so I guess we can implement these as extension methods in the System.Globalization.Extensions library as we did with some similar APIs before. 10073 area-Meta Add members that were added in Core to types of classic assemblies to the Compat surface area. There are at least a couple of Compat surface areas that I have to update since we added some members to old types in Core. 10076 area-Infrastructure Add Ubuntu and CentOS Outerloop test coverage for Linux kernel 4.6.2 We're seeing some CLI / .NET Core bug reports where users have upgraded to 4.x kernels. We should add some outerloop runs to test this configuration: 1) Ubuntu 16.04 + kernel 4.6.2 2) CentOS 7.1 + 4.6.2 https://github.com/dotnet/coreclr/issues/6016 https://github.com/dotnet/cli/issues/3681 http://www.techrepublic.com/article/pro-tip-upgrade-ubuntu-to-the-4-x-kernel/ 10085 area-System.Reflection Missing method .IsValueType() Why don't we have IsValueType() method anymore? Workaround is easy typeof(xy).GetTypeInfo().IsValueType, but migration of existing code is painful. 10090 area-Infrastructure Enable coverage for test code (required for Unit and PAL testing) "Currently `/p:Coverage=true` excludes Test code. This leaves production code within all Unit and PAL tests without code coverage. A workaround is to to manually write a script to remove the `-filter:"" -[*.Tests]*""` portion from OpenCover: ``` batchfile call S:\c2\packages/OpenCover\4.6.519\tools\OpenCover.Console.exe -oldStyle -filter:""+[*]* -[xunit.*]*"" -excludebyfile:""*\Common\src\System\SR.*"" -nodefaultfilters -excludebyattribute:*.ExcludeFromCodeCoverage* -skipautoprops -hideskipped:All -threshold:1 -returntargetcode -register:user -target:CoreRun.exe -output:S:\c2\bin/tests/coverage\System.Net.NameResolution.Pal.Tests.coverage.xml -targetargs:""xunit.console.netcore.exe System.Net.NameResolution.Pal.Tests.dll -xml testResults.xml -notrait Benchmark=true -notrait category=failing -notrait category=nonwindowstests "" S:\c2\packages/ReportGenerator\2.4.3\tools\ReportGenerator.exe -targetdir:S:\c2\bin/tests/coverage\ -reporttypes:Html;Badges -reports:S:\c2\bin/tests/coverage\System.Net.NameResolution.Pal.Tests.coverage.xml ``` It would be great if we could have /p:CoverageAll to remove the Test code filter which in these cases is actually the production code directly referenced by the test project. " 10093 area-System.Runtime Proposal: LegacyAttribute "# The Problem A good thing about the .NET Core 1.0 surface area is that it made it clear what classes/methods were considered obsolete because for the most part, they just didn't exist. With the larger surface area planned for v2 a lot of this missing functionality is being brought back purely for compatibility reasons. How does a developer get informed that a given API is no longer recommended for use? `ObsoleteAttribute` is the heavy handed version of this which says ""You should stop using this immediately, it will be removed in a future version"". There needs to be an ""Info"" level version of this for things that are _considered_ to be obsolete but it's not appropriate to mark it is such. `[EditorBrowsable(EditorBrowsableState.Never)]` assists when writing new code but doesn't help someone identify usages in existing code. If I am using something that is no longer recommended I want to know about, and I would like my IDE to be able to tell me. Marking up libraries with a `LegacyAttribute` would be the first step to having that metadata. # Solution ``` c# [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Interface | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Delegate, Inherited = false)] public sealed class LegacyAttribute : Attribute { public LegacyAttribute() public LegacyAttribute(string message) public string Message { get; } } ``` **Semantic Meanings** ""This exists for backwards compatibility. Nothing to see here. Move along"" ""This will work for as long as you need it but we recommend you use something else"" # Examples TimeZone can't be marked obsolete https://github.com/dotnet/corefx/issues/10074 Analyzers need metadata https://github.com/DotNetAnalyzers/Proposals/issues/37 Legacy collections can't be marked obsolete https://github.com/dotnet/corefx/issues/370 (It's common for Java developers to use ArrayList on .net, how do we educate that's not recommended anymore?) CharSet.Unicode inappropriate to mark obsolete https://github.com/dotnet/corefx/issues/7804 BitVector32 https://github.com/dotnet/corefx/issues/373 # Summary Compatibility has been one of the full .NET frameworks great strengths. There needs to be a way to deal with the downside of that which is education of APIs that still exist only for that compatibility story. " 10096 area-System.Net Fixing NameResolution initialization Fixing NameResolution initialization for Windows, adding more FunctionalTest coverage, adding a new UnitTest project. (Ran out of time but I plan to add more Unit Tests to validate complicated scenarios such as no IPv6 available.) Fixing the ParallelTestExecution script. Fixes #10024 @davidsh @stephentoub @ericeil @himadrisarkar PTAL 10099 area-Meta It would be best if there is a .NET Platform Standard API references. "And readers could choose the specific standard version, just like the old MSDN library does, switching between different .Net Framework versions. I guess cross-platform class library developers are tend to target ""netstandard1.x"", but the only API references availabe now is the .Net Core API docs. This might bring confusion and inconvenience. " 10103 area-System.Net Fix two WebSocket issues on Unix This fixes two issues in our managed ClientWebSocket implementation, both of which stemmed from a misunderstanding on my part of how things were supposed to work (or not work): - I thought that if the WebSocket was already in a CloseSent state and then received a close frame that it should transition to Closed. Instead, it's supposed to transition to CloseReceived. Similarly, I thought a WebSocket that was already in a CloseReceived state and then sent a close frame was supposed to transition to Closed. Instead, it's supposed to transition to CloseSent. The WebSocket is only supposed to transition to Closed when the connection is closed, e.g. as part of CloseAsync after a close frame has been both sent and received. - I thought that ReceiveAsync could only be used concurrently with a SendAsync. Turns out we need to support it being used concurrently with a Close{Output}Async. This commit fixes both. Fixes https://github.com/dotnet/corefx/issues/9985 cc: @mconnew, @davidsh, @cipop, @ericeil 10113 area-Infrastructure arm: build error for arm (wily) cross build "cross build for Ubuntu 15.10 ARM rootfs option: arm wily build option: cross arm native debug ``` -- Check for working C compiler: /usr/bin/clang-3.5 -- broken CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler ""/usr/bin/clang-3.5"" is not able to compile a simple test program. It fails with the following output: Change Dir: /home/hseok82/rbp3/corefx/bin/obj/Linux.arm.Debug/Native/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make ""cmTryCompileExec1892218345/fast"" /usr/bin/make -f CMakeFiles/cmTryCompileExec1892218345.dir/build.make CMakeFiles/cmTryCompileExec1892218345.dir/build make[1]: Entering directory `/home/hseok82/rbp3/corefx/bin/obj/Linux.arm.Debug/Native/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /home/hseok82/rbp3/corefx/bin/obj/Linux.arm.Debug/Native/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec1892218345.dir/testCCompiler.c.o /usr/bin/clang-3.5 -target armv7-linux-gnueabihf -mthumb -mfpu=vfpv3 --sysroot=/home/hseok82/rbp3/corefx/cross/rootfs/arm -o CMakeFiles/cmTryCompileExec1892218345.dir/testCCompiler.c.o -c /home/hseok82/rbp3/corefx/bin/obj/Linux.arm.Debug/Native/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTryCompileExec1892218345 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec1892218345.dir/link.txt --verbose=1 /usr/bin/clang-3.5 -target arm-linux-gnueabihf -B/home/hseok82/rbp3/corefx/cross/rootfs/arm/usr/lib/gcc/arm-linux-gnueabihf -L/home/hseok82/rbp3/corefx/cross/rootfs/arm/lib/arm-linux-gnueabihf --sysroot=/home/hseok82/rbp3/corefx/cross/rootfs/arm CMakeFiles/cmTryCompileExec1892218345.dir/testCCompiler.c.o -o cmTryCompileExec1892218345 -rdynamic /usr/bin/arm-linux-gnueabihf-ld: cannot find crt1.o: No such file or directory /usr/bin/arm-linux-gnueabihf-ld: cannot find crti.o: No such file or directory /usr/bin/arm-linux-gnueabihf-ld: cannot find crtbegin.o: No such file or directory /usr/bin/arm-linux-gnueabihf-ld: cannot find -lgcc /usr/bin/arm-linux-gnueabihf-ld: cannot find -lgcc_s /usr/bin/arm-linux-gnueabihf-ld: cannot find -lc /usr/bin/arm-linux-gnueabihf-ld: cannot find -lgcc /usr/bin/arm-linux-gnueabihf-ld: cannot find -lgcc_s /usr/bin/arm-linux-gnueabihf-ld: cannot find crtend.o: No such file or directory /usr/bin/arm-linux-gnueabihf-ld: cannot find crtn.o: No such file or directory clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [cmTryCompileExec1892218345] Error 1 make[1]: Leaving directory `/home/hseok82/rbp3/corefx/bin/obj/Linux.arm.Debug/Native/CMakeFiles/CMakeTmp' make: *** [cmTryCompileExec1892218345/fast] Error 2 ``` " 10116 area-Serialization Serialization Support Does the Core 1.0 currently supports System.Runtime.Serialization like Serializable,SerializationFormatter attribute etc. We are in the process of upgrading 4.5.x to Core 1.0. 10117 area-System.Security Self-contained application not working on Mac because of openssl The docs state that it is possible to deploy a self-contained application via xcopy because there are no external dependencies but on Mac OS X this is not true. The Mac version requires a non-standard version of openssl that Apple does not support to be installed globally. This openssl version should be a part of dot net core files if needed. 10120 area-System.IO Request: a way to tell if two filepaths point to the same file On unix, the recommended way to tell whether two filepaths point to the same file is to use `stat` and compare `st_dev, st_ino`. http://www.boost.org/doc/libs/1_53_0/libs/filesystem/doc/reference.html#equivalent On Windows, the recommended way is to use the win32 API `GetFileInformationByHandle` and compare `nFileIndexLow, nFileIndexHigh, dwVolumeSerialNumber`. You have to do this via p/invoke because there's no .NET wrapper for it. P/invoke was tolerable to me because it was all self-contained and easy. But as I port my code over to corefx, I honestly can't be bothered to go the whole nuget platform-specific native binary route. It's far too much work. I'd love it you could add an API to corefx to judge whether two filenames point to the same file. Judging by the huge number of requests for this on stackoverflow, it seems like a common bread-and-butter scenario. 10123 area-System.Net Refactor ClientWebSocket on Unix into ManagedWebSocket shareable by ASP.NET We want to avoid having two separate implementations of the core websocket protocol. We're going to refactor the corefx managed implementation into a file that's shareable by both corefx and ASP.NET. 10127 area-System.Runtime Add new Lazy(T value) ctor to System.Runtime contract and add tests Now that the implementation of #2578 has been merged for CoreCLR (https://github.com/dotnet/coreclr/pull/6304) and CoreRT (https://github.com/dotnet/corert/pull/1538), the new API needs to be exposed in the [`System.Runtime`](https://github.com/dotnet/corefx/blob/4fccde2c42f7670ebd098513c09b30772f833e84/src/System.Runtime/ref/System.Runtime.cs#L1202) contract (and versioned as appropriate) and tests added. 10133 area-System.Collections System.Collections.NonGeneric failed to bind I'm developing an application UWP for Windows 10 Mobile, everything works fine in debug mode, but when I generate the application packages in release mode, the resources to globalization do not work and the visual studio reports the following warning attached below. I'm using the Microsoft.NETCore.UniversalWindowsPlataform in version 5.2.2. Is there any way to solve this problem? Regards > ILTransform_0027: Assembly name 'System.Collections.NonGeneric' failed to bind. 10146 area-System.Net Documentation: Update docs on supported libcurl features on Linux and OSX. "This is a cross post from dotnet/KestrelHttpServer and WCF. I've closed that issue as it is not Kestrel related, but I apologize for the cross-posting, I'm still learning about the different repositories and what functions are where. I have some functionality that is working on windows, but fails on all of the unix droplets I've spun up. I'm seeing one type of failure message on ubuntu 14.04 and debian 8.5 and another type on fedora 23 and centos 7 when using BasicHttpsbinding and the connection factory. I've tried using the svcutil to generate the interface and I've also used the new WCF Connected Services utility and I've even crafted the entire message by hand and used SendAsync and PostAsync. All scenarios exhibit the same behavior. Here's the code: ```c# private string invokeSsoSoapRequest(string xmlRequest) { ChannelFactory factory = null; SingleSignOnSoap serviceProxy = null; var binding = new BasicHttpsBinding(); binding.Security.Mode = BasicHttpsSecurityMode.Transport; binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate; var baseAddress = new Uri(mySettings.ClientUrl); var endpointAddress = new EndpointAddress(baseAddress); X509Certificate2Collection collection = new X509Certificate2Collection(); if (RuntimeEnvironment.OperatingSystemPlatform == Platform.Windows) { //windows file location collection.Import(mySettings.ClientPrivateKeyWindowsPath, mySettings.ClientPfxPass, X509KeyStorageFlags.PersistKeySet); }else { collection.Import(mySettings.ClientPrivateKeyUnixPath, mySettings.ClientPfxPass, X509KeyStorageFlags.PersistKeySet); } //parse pfx for client auth key factory = new ChannelFactory(binding, new EndpointAddress(baseAddress)); foreach (X509Certificate2 cert in collection) { if (cert.HasPrivateKey) { factory.Credentials.ClientCertificate.Certificate = cert; } } serviceProxy = factory.CreateChannel(); RequestTicketRequest request = new RequestTicketRequest(); RequestTicketRequestBody body = new RequestTicketRequestBody(); request.Body = body; request.Body.sRequestXML = xmlRequest; return serviceProxy.RequestTicket(request).Body.RequestTicketResult; } } ``` ` **Here are the errors I'm getting on Ubuntu and Debian:** > TimeoutException: The HTTP request to 'https://services.**********SingleSignOn.asmx' has exceeded the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout. The above dotnet error claims the service timed out while waiting for a response (00:01:00), but a tshark trace shows the SOAP response negotiation failed when the client sent [RST, ACK] back the the remote webservice. See image below. The same trace in windows environment shows no errors and the transaction works and as you can see a few lines above, the server hello, certificate, and key exchanges appear to be successful, so I don't think I'm dealing with a cert issue. ![image](https://cloud.githubusercontent.com/assets/596849/16950334/60888112-4d85-11e6-8d29-66a2a8badd9b.png) I've also tried this in docker just to rule out any host config issues with the following docker config and see the same error: > FROM microsoft/dotnet:1.0.0-preview2-sdk > RUN mkdir -p /dotnetapp > WORKDIR /dotnetapp > EXPOSE 5000 > COPY . /dotnetapp > RUN dotnet restore > ENTRYPOINT [""dotnet"", ""run""]` I've tried this on Fedora and Centos, but get a different error related to the curl version that ships with those distros. I'm not entirely sure how to fix it, but I suspect I'd have the same issue if I got past it. **Here is the error I received on Fedora and Centos:** > System.PlatformNotSupportedException: The libcurl library in use (7.43.0) and its SSL backend (""NSS/3.24 Basic ECC"") do not support custom handling of certificates. A libcurl built with OpenSSL is required. *As a note, I compiled 7.50 curl against openssl and still received the above error. I'm a little bit of a linux noob, so I'm not sure if there's a way to force dotnet core to use the 7.5 installation, but as of now, dotnet core is still using 7.4.3. Here is my project.json ` { ""dependencies"": { ""Microsoft.NETCore.App"": { ""version"": ""1.0.0"", ""type"": ""platform"" }, ""Microsoft.AspNetCore.Mvc"": ""1.0.0"", ""Microsoft.AspNetCore.Server.Kestrel"": ""1.0.0"", ""Microsoft.Extensions.Configuration.EnvironmentVariables"": ""1.0.0"", ""Microsoft.Extensions.Configuration.FileExtensions"": ""1.0.0"", ""Microsoft.Extensions.Configuration.Json"": ""1.0.0"", ""Microsoft.Extensions.Logging"": ""1.0.0"", ""Microsoft.Extensions.Logging.Console"": ""1.0.0"", ""Microsoft.Extensions.Logging.Debug"": ""1.0.0"", ""Microsoft.Extensions.Options.ConfigurationExtensions"": ""1.0.0"", ""System.ServiceModel.Http"": ""4.1.0"", ""System.Xml.XmlSerializer"": ""4.0.11"", ""Microsoft.Extensions.Options"": ""1.0.0"", ""System.Runtime.Extensions"": ""4.1.0"", ""System.Text.Encoding"": ""4.0.11"", ""System.Xml.XmlDocument"": ""4.0.1"", ""System.Xml.XDocument"": ""4.0.11"", ""System.Security.Cryptography.X509Certificates"": ""4.1.0"", ""System.Security.Cryptography.Csp"": ""4.0.0"", ""system.xml.xpath.xmldocument"": ""4.0.0"", ""JsonWebTokens"": ""1.2.0"", ""Microsoft.AspNetCore.Diagnostics"": ""1.0.0"", ""Microsoft.AspNetCore.Server.IISIntegration"": ""1.0.0"" }, ""tools"": { }, ""frameworks"": { ""netcoreapp1.0"": { ""imports"": [ ""dotnet5.6"" ] } }, ""buildOptions"": { ""emitEntryPoint"": true, ""preserveCompilationContext"": true, ""debugType"": ""portable"" }, ""runtimeOptions"": { ""configProperties"": { ""System.GC.Server"": true } }, ""publishOptions"": { ""include"": [ ""wwwroot"", ""Views"", ""Areas/**/Views"", ""appsettings.json"", ""web.config"", ""Dockerfile"" ] }, ""scripts"": { ""postpublish"": [ ""dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"" ] } }` As I said on my other post, I would appreciate any help and know that it's more than plausible I've done something wrong here. This is the only piece of this API stack that we haven't been able to port. Lastly, if I can provide any other information, please let me know! Thank you! " 10148 area-System.Runtime On `Array.Version` "The `InvalidOperation` exception is not thrown in cases where the underlying enumerable (in this case an `Array) is not enumerated using a`foreach` construct. The foreach construct is useful because of the optimizations which are allowed by such as well as the ability to be notified of new changes when they occur. This requires using a `try` and `catch` paradigm which can require more stack space inter alia. I propose that the private member which indicates the version of the `Array` be exposed such that caller would be allowed to observe this property without the use of reflection and without the use of stack preservation. This is for several reasons which I have outlined below in an example which originally arose out of a question I answered on Stack Overflow related to the use of `async` which is linked in the example. Thank you for your time and consideration. ``` #region http://stackoverflow.com/questions/37077434/async-version-of-generic-extensions?noredirect=1#comment61700684_37077434 static void _TestLogicForBeginInvoke(byte[] i) { int local; System.Console.WriteLine(""Delegate0=>"" + (Media.Common.Extensions.Array.ArrayExtensions.IsNullOrEmpty(i, out local) ? ""0"" : local.ToString())); System.Threading.Thread.Sleep(1); System.Console.WriteLine(""Tested0""); System.Threading.Thread.Sleep(3); System.Console.WriteLine(""Delegate0=>"" + (Media.Common.Extensions.Array.ArrayExtensions.IsNullOrEmpty(i, out local) ? ""0"" : local.ToString())); System.Threading.Thread.Sleep(1); System.Console.WriteLine(""Delegate0=>"" + (Media.Common.Extensions.Array.ArrayExtensions.IsNullOrEmpty(i, out local) ? ""0"" : local.ToString())); System.Threading.Thread.Sleep(5); System.Console.WriteLine(""Delegate0=>"" + (Media.Common.Extensions.Array.ArrayExtensions.IsNullOrEmpty(i, out local) ? ""0"" : local.ToString())); System.Threading.Thread.Sleep(10); System.Console.WriteLine(""Delegate0=>"" + (Media.Common.Extensions.Array.ArrayExtensions.IsNullOrEmpty(i, out local) ? ""0"" : local.ToString())); } static void _TestLogicForBeginInvoke(ref byte[] i) { _TestOtherLogicForBeginInvoke(i); System.Console.WriteLine(""Tested1""); System.Threading.Thread.Sleep(3); int local; System.Console.WriteLine(""Delegate1=>"" + (Media.Common.Extensions.Array.ArrayExtensions.IsNullOrEmpty(i, out local) ? ""0"" : local.ToString())); System.Threading.Thread.Sleep(1); System.Console.WriteLine(""Delegate1=>"" + (Media.Common.Extensions.Array.ArrayExtensions.IsNullOrEmpty(i, out local) ? ""0"" : local.ToString())); System.Threading.Thread.Sleep(5); System.Console.WriteLine(""Delegate1=>"" + (Media.Common.Extensions.Array.ArrayExtensions.IsNullOrEmpty(i, out local) ? ""0"" : local.ToString())); System.Threading.Thread.Sleep(10); System.Console.WriteLine(""Delegate1=>"" + (Media.Common.Extensions.Array.ArrayExtensions.IsNullOrEmpty(i, out local) ? ""0"" : local.ToString())); } static void _TestOtherLogicForBeginInvoke(byte[] i) { int local; System.Console.WriteLine(""Delegate2=>"" + (Media.Common.Extensions.Array.ArrayExtensions.IsNullOrEmpty(i, out local) ? ""0"" : local.ToString())); System.Threading.Thread.Sleep(1); System.Console.WriteLine(""Tested2""); } static void _Callback(IAsyncResult iar) { System.Console.WriteLine(""Callback.CompletedSynchronously "" + iar.CompletedSynchronously); System.Console.WriteLine(""Callback.IsCompleted "" + iar.IsCompleted); int local; System.Console.WriteLine(""Callback.local "" + (Media.Common.Extensions.Array.ArrayExtensions.IsNullOrEmpty(iar.AsyncState as System.Array, out local) ? ""0"" : local.ToString())); System.Threading.Thread.Sleep(10); System.Console.WriteLine(""Callback IsCompleted "" + iar.CompletedSynchronously); System.Console.WriteLine(""Callback.local "" + (Media.Common.Extensions.Array.ArrayExtensions.IsNullOrEmpty(iar.AsyncState as System.Array, out local) ? ""0"" : local.ToString())); } /// /// on `State` [dhpfr] /// /// Observe the results of the use of BeingInvoke, in this case using arrays. /// [it seems(through repeated testing)] The behavior observed varies based on the use of the local but the orders of the invocations do not. /// None of these invocations result in a `block`. /// Thus it can probably be concluded from the results that the version can give precedent to the call based on the fact that /// 'Delegate2' / _TestOtherLogicForBeginInvoke ALWAYS is the first to output outside of this call and this is due to the version of the `Array` the call received. /// Thus it can also be concluded that `_version` member of the array is very important and should be exposed if not to observe this behavior then to allow for calls to /// be able to reject data based on that property if desired. /// This is especially important after a pause or otherwise where the state of the receieved may change and would possibly indicate to callers that they don't have to do the work they were originally called to do.. /// * /// The other way to handle this apparently is to use a or otherwise which can signal the work is abandoned in that version; /// and optionally observe newer versions of the data available by using a which contains token and it's source and thus /// can obtain a new token from the source if allowed and continue to do more work. /// This is because the call and it's stack were already prepared and is possibly more efficient then using the cleanup and restore just to do the same logic which would be able /// to be performed by retaining the state. /// static void TestInvocations() { TestInvocations(false); TestInvocations(true); //TestInvocations(false); //TestInvocations(true); } /// /// Arrays can only communicate data to or from the caller within the version of the array given to a call without the `ref` annotation. /// /// static void TestInvocations(bool useLocal = false) { //Callback is written after Tested and NotDone. System.Action call = new System.Action(_TestLogicForBeginInvoke); //This variable can be used in either the invocation or the callback but you must access it by reference. byte[] data = new byte[0]; int times = 0, register = -1; //Write output System.Console.WriteLine("".Output.useLocal="" + useLocal); //Start the call, show what call was made to the callback. IAsyncResult callInvocation = call.BeginInvoke(data, _Callback, data); System.Console.WriteLine("".IsCompleted "" + callInvocation.IsCompleted); System.Console.WriteLine("".Resize0""); System.Array.Resize(ref data, 1); byte[] local = null; using (callInvocation.AsyncWaitHandle) { //Wait for the call to be completed a few times while (callInvocation.IsCompleted.Equals(false)) { System.Console.WriteLine("".Resize1""); //When the local is used the call semantic is totally different as the version is maintained through the local. if (useLocal) { if (times <= 1) { System.Array.Resize(ref data, 1); local = data; data = null; System.Array.Resize(ref local, 2); } else { data = local; local = null; System.Array.Resize(ref data, 1); } } else System.Array.Resize(ref data, 1); System.Console.WriteLine(""._TestOtherLogicForBeginInvoke""); _TestOtherLogicForBeginInvoke(data); System.Console.WriteLine(""._TestLogicForBeginInvoke""); _TestLogicForBeginInvoke(ref data); System.Console.WriteLine("".NotDone1=>"" + times + "", "" + (Media.Common.Extensions.Array.ArrayExtensions.IsNullOrEmpty(data, out register) ? ""0"" : register.ToString())); System.Console.WriteLine("".Resize2""); /*if (times <= 1) System.Array.Resize(ref data, 1); else*/ System.Array.Resize(ref data, ++times); } } //Probably still not completed. System.Console.WriteLine("".IsCompleted "" + callInvocation.IsCompleted); //Can only be called once, should be called to free the thread assigned to calling the logic assoicated with BeginInvoke and the callback. call.EndInvoke(callInvocation); System.Console.WriteLine("".EndInvoke "" + callInvocation.IsCompleted + "","" + times); List calls = new List(); //Call again up to 5 times while (++times < 5) { if (times <= 1) System.Array.Resize(ref data, 1); else System.Array.Resize(ref data, ++register); callInvocation = call.BeginInvoke(data, _Callback, data); calls.Add(callInvocation); _TestOtherLogicForBeginInvoke(data); _TestLogicForBeginInvoke(ref data); System.Console.WriteLine("".NotDone2=>"" + times + "", "" + (Media.Common.Extensions.Array.ArrayExtensions.IsNullOrEmpty(data, out register) ? ""0"" : register.ToString())); } foreach (IAsyncResult storedCallInvocation in calls) { System.Console.WriteLine("".EndInvoke "" + storedCallInvocation.IsCompleted); call.EndInvoke(storedCallInvocation); } }//_Callback ``` " 10149 area-System.ComponentModel No DataAnnotation for integer A thing like [DataType(DataType.number)] could be valuable for managing validation directly in the model. Look at the #4995 issue for best understanding why I ask for it. Best regards. 10154 area-System.Net Accept HttpContent on any request method Overloads are needed to support HttpContent on methods like GetAsync. The HTTP specification does not prohibit body-level content on any of the method types. They may not be commonly used but I am aware of REST services that require complex body content in GET requests (in one case, it describes a variety of search parameters). 10155 area-Serialization Mismatched behavior for verify the KnownType with Desktop version When serialize a object with unknown type, if the serializer contains a DataContractResolver, it will end up with SerializationException. However, no exception thrown from Desktop Version. This is because, in core version, it always verify knowtype if there's resolver. In the code: System.Private.DataContractSerialization\src\System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs Core Version, which always return true when there's resolver : ``` c# protected virtual bool WriteTypeInfo(XmlWriterDelegator writer, DataContract contract, DataContract declaredContract) { if (XmlObjectSerializer.IsContractDeclared(contract, declaredContract)) { return false; } bool hasResolver = DataContractResolver != null; if (hasResolver) { WriteResolvedTypeInfo(writer, contract.UnderlyingType, declaredContract.UnderlyingType); } else { WriteTypeInfo(writer, contract.Name, contract.Namespace); } return hasResolver; } ``` Desktop Version, which always return false. ``` c# protected virtual bool WriteTypeInfo(XmlWriterDelegator writer, DataContract contract, DataContract declaredContract) { if (!XmlObjectSerializer.IsContractDeclared(contract, declaredContract)) { if (DataContractResolver == null) { WriteTypeInfo(writer, contract.Name, contract.Namespace); return true; } else { WriteResolvedTypeInfo(writer, contract.OriginalUnderlyingType, declaredContract.OriginalUnderlyingType); return false; } } return false; } ``` 10156 area-System.Net Use Loopback server for HttpClient testing. Today, we use http://corefx-net.cloudapp.net/ as an endpoint for much of the HttpClient testing. We've slowly been moving towards using a loopback server that gives back fixed HTTP responses to remove this dependency, (since it's one of the main places we see intermittent network issues that cause spurious test failures) but the set of testing we do against this is currently limited because the loopback server doesn't really understand HTTP so it can't do sophisticated actions based on requests. It should be possible to take the existing implementation of http://corefx-net.cloudapp.net/ and port it to run on ASP.NET Core 1.0. Once we've done that, we could use Kestrel locally to host a loop-back server that binds to a random port as part of setting up the HttpClient tests. This server could live for the lifetime of the dependent tests and then be shut down. There are a few steps to take here: - [ ] Port existing server to ASP.NET Core 1.0 (In progress, @ellismg is working on this) - [ ] Move server from above to be hosted within the tests themselves. - [ ] Figure out how to handle HTTPS HTTPS is interesting, because we need need a valid certificate for the server or we need to configure how we validate the remote certificate, which we only support on Windows and Unix when using an openssl based libcurl (not the case on CentOS, OSX and perhaps others). 10157 area-System.Threading Provide API to understand how many allocations have happened "As discussed in https://github.com/dotnet/coreclr/issues/6275 we would like an API to expose how many bytes were allocated since the beginning of a thread's life time. What about an API like this: ``` C# namespace System { public static class GC { public long GetAllocatedBytesForCurrentThread(); } } ``` The usage could like this: ``` C# [Fact] public void EnsureAllocations() { var allocationsBefore = GC.GetAllocatedBytesForCurrentThread(); var str = ""{'Items':["" + string.Join("","", Enumerable.Range(0, 3000).Select(i => ""{}"")) + ""]}""; var jObject = JObject.Parse(str); var allocationsAfter = Thread.GetAllocatedBytesForCurrentThread(); var allocations = allocationsAfter - allocationsBefore; const long MaximumBytesAllowed = 200 * 1024; Assert.LowerOrEqual(allocations, MaximumBytesAllowed); } ``` Questions: - Can/should this method track bytes per native OS thread or for the logical call context? - Does this track memory across async boundaries? Should it? @Maoni0 ### Updates - Based on @vancem's [concerns](https://github.com/dotnet/corefx/issues/10157#issuecomment-236678904) we've decided not to add `GetAllocatedBytesForThread(int managedThreadId)`. " 10165 area-System.Net Refactor ManagedWebSocket out of ClientWebSocket on Unix On Unix we use a managed implementation of WebSocket as the backing for ClientWebSocket. We'd like to be able to share this same implementation with ASP.NET so that we have a single implementation of the protocol across client and server. This change refactors out that support to make it more shareable. I made a few tweaks to the ClientWebSocket code shared across platforms. While we typically like to have argument validation be in the shared code, I moved the (minimal) argument validation into each of the Windows and managed-specific implementations of the PAL, so that the ManagedWebSocket implementation would perform that validation. I also added support for masking on the server (the current implementation assumed that all sent messages should be masked and all received messages should not be, but a server needs the opposite), though that isn't tested, so we may have some issues to fix there subsequently. I believe ASP.NET should be able to share just the ManagedWebSocket.cs and WebSocketValidate.cs files, plus define a handful of members on an SR type. If this is too complicated to manage well, I can try to simplify it further. cc: @anurse, @Tratcher, @ericeil, @davidsh, @cipop, @davidfowl 10172 area-Meta Question: Multi-Target for NetStandard 2.0 and .NET 4.5 ? Hello! A couple of weeks ago, there was an announcement that most of the BCL will get ported to .NET Core, which is plain awesome. E.g. I should then be able to enable most of my extensive framework library (> 100 projects) for .NET Core. Now, for the question: These features will be delivered when targeting NetStandard 2.0, but I will still have a requirement to support .NET 4.5 in several of my libraries (granted, just 10-15 libraries, but still). Will it be possible to target .NET 4.5 and NetStandard 2.0 with the same build artifact, i.e. without needing to build twice? Before NetStandard, I could do this by adding multiple platform identifiers in my nuget path. Best regards, Michael 10177 area-Infrastructure Win 10 outerloop machines need to be upgraded to Server 2016 TP5 The current image we are using for the outer loop runs has expired and so the machines will reboot often. We should move to TP5 (the latest Windows Server 2016 release) and also cut the Win10 machines over to the auto infrastructure stuff instead of having fixed machines. 10194 area-System.Threading Implement System.Threading.AsyncFlowControl From #10049 These methods rely on System.Threading.AsyncFlowControl and they should be added to the CAS stubs ``` M:System.Security.SecurityContext.SuppressFlow M:System.Security.SecurityContext.SuppressFlowWindowsIdentity ``` @stephentoub @danmosemsft @ellismg @bartonjs 10195 area-System.Security Implement System.Security.SecurityElement From #10049 These methods rely on System.Security.SecurityElement and should be added to the CAS stubs ``` M:System.Security.CodeAccessPermission.FromXml(System.Security.SecurityElement) M:System.Security.CodeAccessPermission.ToXml M:System.Security.ISecurityEncodable.FromXml(System.Security.SecurityElement) M:System.Security.ISecurityEncodable.ToXml M:System.Security.ISecurityPolicyEncodable.FromXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) M:System.Security.ISecurityPolicyEncodable.FromXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) M:System.Security.NamedPermissionSet.FromXml(System.Security.SecurityElement) M:System.Security.NamedPermissionSet.ToXml M:System.Security.PermissionSet.FromXml(System.Security.SecurityElement) M:System.Security.PermissionSet.ToXml M:System.Security.Permissions.EnvironmentPermission.FromXml(System.Security.SecurityElement) M:System.Security.Permissions.EnvironmentPermission.ToXml M:System.Security.Permissions.FileDialogPermission.FromXml(System.Security.SecurityElement) M:System.Security.Permissions.FileDialogPermission.ToXml M:System.Security.Permissions.FileIOPermission.FromXml(System.Security.SecurityElement) M:System.Security.Permissions.FileIOPermission.ToXml M:System.Security.Permissions.GacIdentityPermission.FromXml(System.Security.SecurityElement) M:System.Security.Permissions.GacIdentityPermission.ToXml M:System.Security.Permissions.PrincipalPermission.FromXml(System.Security.SecurityElement) M:System.Security.Permissions.PrincipalPermission.ToXml M:System.Security.Permissions.PublisherIdentityPermission.FromXml(System.Security.SecurityElement) M:System.Security.Permissions.PublisherIdentityPermission.ToXml M:System.Security.Permissions.ReflectionPermission.FromXml(System.Security.SecurityElement) M:System.Security.Permissions.ReflectionPermission.ToXml M:System.Security.Permissions.RegistryPermission.FromXml(System.Security.SecurityElement) M:System.Security.Permissions.RegistryPermission.ToXml M:System.Security.Permissions.SecurityPermission.FromXml(System.Security.SecurityElement) M:System.Security.Permissions.SecurityPermission.ToXml M:System.Security.Permissions.SiteIdentityPermission.FromXml(System.Security.SecurityElement) M:System.Security.Permissions.SiteIdentityPermission.ToXml M:System.Security.Permissions.StrongNameIdentityPermission.FromXml(System.Security.SecurityElement) M:System.Security.Permissions.StrongNameIdentityPermission.ToXml M:System.Security.Permissions.TypeDescriptorPermission.FromXml(System.Security.SecurityElement) M:System.Security.Permissions.TypeDescriptorPermission.ToXml M:System.Security.Permissions.UIPermission.FromXml(System.Security.SecurityElement) M:System.Security.Permissions.UIPermission.ToXml M:System.Security.Permissions.UrlIdentityPermission.FromXml(System.Security.SecurityElement) M:System.Security.Permissions.UrlIdentityPermission.ToXml M:System.Security.Permissions.ZoneIdentityPermission.FromXml(System.Security.SecurityElement) M:System.Security.Permissions.ZoneIdentityPermission.ToXml M:System.Security.Policy.AllMembershipCondition.FromXml(System.Security.SecurityElement) M:System.Security.Policy.AllMembershipCondition.FromXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) M:System.Security.Policy.AllMembershipCondition.ToXml M:System.Security.Policy.AllMembershipCondition.ToXml(System.Security.Policy.PolicyLevel) M:System.Security.Policy.ApplicationDirectoryMembershipCondition.FromXml(System.Security.SecurityElement) M:System.Security.Policy.ApplicationDirectoryMembershipCondition.FromXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) M:System.Security.Policy.ApplicationDirectoryMembershipCondition.ToXml M:System.Security.Policy.ApplicationDirectoryMembershipCondition.ToXml(System.Security.Policy.PolicyLevel) M:System.Security.Policy.AllMembershipCondition.FromXml(System.Security.SecurityElement) M:System.Security.Policy.AllMembershipCondition.FromXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) M:System.Security.Policy.AllMembershipCondition.ToXml M:System.Security.Policy.AllMembershipCondition.ToXml(System.Security.Policy.PolicyLevel) M:System.Security.Policy.ApplicationDirectoryMembershipCondition.FromXml(System.Security.SecurityElement) M:System.Security.Policy.ApplicationDirectoryMembershipCondition.FromXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) M:System.Security.Policy.ApplicationDirectoryMembershipCondition.ToXml M:System.Security.Policy.ApplicationDirectoryMembershipCondition.ToXml(System.Security.Policy.PolicyLevel) M:System.Security.Policy.ApplicationTrust.FromXml(System.Security.SecurityElement) M:System.Security.Policy.ApplicationTrust.ToXml M:System.Security.Policy.CodeGroup.CreateXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) M:System.Security.Policy.CodeGroup.FromXml(System.Security.SecurityElement) M:System.Security.Policy.CodeGroup.FromXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) M:System.Security.Policy.CodeGroup.ParseXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) M:System.Security.Policy.CodeGroup.ToXml M:System.Security.Policy.CodeGroup.ToXml(System.Security.Policy.PolicyLevel) M:System.Security.Policy.GacMembershipCondition.FromXml(System.Security.SecurityElement) M:System.Security.Policy.GacMembershipCondition.FromXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) M:System.Security.Policy.GacMembershipCondition.ToXml M:System.Security.Policy.GacMembershipCondition.ToXml(System.Security.Policy.PolicyLevel) M:System.Security.Policy.GacMembershipCondition.FromXml(System.Security.SecurityElement) M:System.Security.Policy.GacMembershipCondition.FromXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) M:System.Security.Policy.GacMembershipCondition.ToXml M:System.Security.Policy.GacMembershipCondition.ToXml(System.Security.Policy.PolicyLevel) M:System.Security.Policy.HashMembershipCondition.FromXml(System.Security.SecurityElement) M:System.Security.Policy.HashMembershipCondition.FromXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) M:System.Security.Policy.HashMembershipCondition.ToXml M:System.Security.Policy.HashMembershipCondition.ToXml(System.Security.Policy.PolicyLevel) M:System.Security.Policy.PolicyLevel.FromXml(System.Security.SecurityElement) M:System.Security.Policy.PolicyLevel.ToXml M:System.Security.Policy.PolicyStatement.FromXml(System.Security.SecurityElement) M:System.Security.Policy.PolicyStatement.FromXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) M:System.Security.Policy.PolicyStatement.ToXml M:System.Security.Policy.PolicyStatement.ToXml(System.Security.Policy.PolicyLevel) M:System.Security.Policy.PublisherMembershipCondition.FromXml(System.Security.SecurityElement) M:System.Security.Policy.PublisherMembershipCondition.FromXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) M:System.Security.Policy.PublisherMembershipCondition.ToXml M:System.Security.Policy.PublisherMembershipCondition.ToXml(System.Security.Policy.PolicyLevel) M:System.Security.Policy.SiteMembershipCondition.FromXml(System.Security.SecurityElement) M:System.Security.Policy.SiteMembershipCondition.FromXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) M:System.Security.Policy.SiteMembershipCondition.ToXml M:System.Security.Policy.SiteMembershipCondition.ToXml(System.Security.Policy.PolicyLevel) M:System.Security.Policy.StrongNameMembershipCondition.FromXml(System.Security.SecurityElement) M:System.Security.Policy.StrongNameMembershipCondition.FromXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) M:System.Security.Policy.StrongNameMembershipCondition.ToXml M:System.Security.Policy.StrongNameMembershipCondition.ToXml(System.Security.Policy.PolicyLevel) M:System.Security.Policy.UrlMembershipCondition.FromXml(System.Security.SecurityElement) M:System.Security.Policy.UrlMembershipCondition.FromXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) M:System.Security.Policy.UrlMembershipCondition.ToXml M:System.Security.Policy.UrlMembershipCondition.ToXml(System.Security.Policy.PolicyLevel) M:System.Security.Policy.ZoneMembershipCondition.FromXml(System.Security.SecurityElement) M:System.Security.Policy.ZoneMembershipCondition.FromXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) M:System.Security.Policy.ZoneMembershipCondition.ToXml M:System.Security.Policy.ZoneMembershipCondition.ToXml(System.Security.Policy.PolicyLevel) ``` @stephentoub @danmosemsft @ellismg @bartonjs 10196 area-System.Runtime Implement System.ApplicationIdentity From #10049 These rely on System.ApplicationIdentity and should be added to the CAS stubs ``` M:System.Security.Policy.ApplicationTrust.#ctor(System.ApplicationIdentity) P:System.Security.Policy.ApplicationTrust.ApplicationIdentity M:System.Security.Policy.ApplicationTrust.get_ApplicationIdentity M:System.Security.Policy.ApplicationTrust.set_ApplicationIdentity(System.ApplicationIdentity) M:System.Security.Policy.ApplicationTrustCollection.Find(System.ApplicationIdentity,System.Security.Policy.ApplicationVersionMatch) M:System.Security.Policy.ApplicationTrustCollection.Remove(System.ApplicationIdentity,System.Security.Policy.ApplicationVersionMatch) P:System.Security.Policy.TrustManagerContext.PreviousApplicationIdentity M:System.Security.Policy.TrustManagerContext.get_PreviousApplicationIdentity M:System.Security.Policy.TrustManagerContext.set_PreviousApplicationIdentity(System.ApplicationIdentity) ``` @stephentoub @danmosemsft @ellismg @bartonjs 10197 area-Serialization Implement System.Runtime.Serialization The types are SerializationInfo, StreamingContext, IDeserializationCallback, ISerializable. From #10049 These methods rely on System.Runtime.Serialization.\* and should be added to the CAS stubs ``` M:System.Security.HostProtectionException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) M:System.Security.HostProtectionException.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) M:System.Security.PermissionSet.System#Runtime#Serialization#IDeserializationCallback#OnDeserialization(System.Object) M:System.Security.Policy.Hash.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) M:System.Security.Policy.HashMembershipCondition.System#Runtime#Serialization#IDeserializationCallback#OnDeserialization(System.Object) M:System.Security.Policy.HashMembershipCondition.System#Runtime#Serialization#ISerializable#GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) M:System.Security.Policy.PolicyException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) ``` @stephentoub @danmosemsft @ellismg @bartonjs 10198 area-System.Data SqlClient cannot connect to Azure SQL db from a Nano Server machine I have a small web app which works fine from Windows 10 or Ubuntu hosts. When I run it on a Nano Server (2016 TP5) machine, though, connecting to an Azure SQL database (via EF.Core) fails with this exception: ``` An exception occurred in the database while iterating the results of a query. System.Data.SqlClient.SqlException: The instance of SQL Server you attempted to connect to requires encryption but this machine does not support it. at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Bo olean applyTransientFaultHandling) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open() at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable.Enumerator.MoveNext() at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.GetResult[TResult](IEnumerable`1 valueBuffers) at lambda_method(Closure , QueryContext ) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass19_1`1.b__1(QueryContext qc) ClientConnectionId:ca7143d2-0c75-4a31-a770-a46d781c9d57 Error Number:20,State:0,Class:20 System.Data.SqlClient.SqlException: The instance of SQL Server you attempted to connect to requires encryption but this machine does not support it. at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open() at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable.Enumerator.MoveNext() at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.GetResult[TResult](IEnumerable`1 valueBuffers) at lambda_method(Closure , QueryContext ) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass19_1`1.b__1(QueryContext qc) ``` The connection string I'm using is: ``` Server=tcp:iasveotbxa.database.windows.net,1433;Database=mikerou-widgets;User ID=ReproAdmin@iasveotbxa;Password=*****;Connection Timeout=300 ``` I've tried explicitly adding both `Encrypt=false` and `Encrypt=true` to the connection string, but neither helps. Is this perhaps just a nano server limitation or is there something that can be done either in my code or in System.Data.SqlClient to make this work? 10200 area-Infrastructure Cannot open resource editor in VS on corefx projects Opening src\System.Reflection.Metadata\src\Resources\Strings.resx in VS, I get the following: ``` Could not resolve mscorlib for target framework '.NETPortable,Version=v4.5,Profile=Profile7'. Thiscan happen if the target framework is not installed or if the framework moniker is incorrectly formatted. ``` C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETPortable\v4.5\Profile\Profile7 is installed so I assume this has something to do with the build customization in corefx. Not necessarily related, but should we even be referencing portable profiles anywhere anymore? 10202 area-System.Reflection Cleanup post Reflection Api Restoration debt. Just a reminder to myself about some opportunistic cleanup and perf tasks once we've gotten the big Reflection type hierarchy done. - Remove all remaining AsType() calls. They're useless. - IntrospectionExtensions.GetType(this Type) This no longer require any special knowledge of Reflection.Core so there's no need for it to pipe through that ReflectionAugments interface. Just implement it inline. - Consider merging the rest of the ReflectionAugments callbacks into ReflectionExecutionDomainCallback. Now that they all live happily in System.Private.CoreLib, there's no need for so many confusing channels. - There's code (looking at you, Assignability.cs) that's probably doing Type/TypeInfo conversions that are no longer necessary. Tighten some screws there. 10206 area-System.Security Many ECCurve tests failing in CI on Unix I'm disabling these until we can get to the bottom of why they're failing in dev/api. ``` System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyNamed(curveDef: CurveDef { Curve = System.Security.Cryptography.ECCurve, CurveType = PrimeShortWeierstrass, IncludePrivate = False, IsCurveValidOnPlatform = True, KeySize = 256, ... }) [FAIL] System.Security.Cryptography.CryptographicException : The specified curve 'Implicit' or its parameters are not valid for this platform. Stack Trace: /mnt/j/workspace/dotnet_corefx/dev_api/ubuntu14.04_release_prtest/bin/tests/AnyOS.AnyCPU.Release/System.Reflection.Tests/netcoreapp1.0/System.Reflection.dll already exists, not copying. at System.Security.Cryptography.ECCurve.Validate() at System.Security.Cryptography.ECDsaOpenSsl.GenerateKey(ECCurve curve) at System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyNamed(CurveDef curveDef) System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyNamed(curveDef: CurveDef { Curve = System.Security.Cryptography.ECCurve, CurveType = PrimeMontgomery, IncludePrivate = False, IsCurveValidOnPlatform = True, KeySize = 384, ... }) [FAIL] System.Security.Cryptography.CryptographicException : The specified curve 'Implicit' or its parameters are not valid for this platform. Stack Trace: at System.Security.Cryptography.ECCurve.Validate() at System.Security.Cryptography.ECDsaOpenSsl.GenerateKey(ECCurve curve) at System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyNamed(CurveDef curveDef) System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyNamed(curveDef: CurveDef { Curve = System.Security.Cryptography.ECCurve, CurveType = PrimeShortWeierstrass, IncludePrivate = False, IsCurveValidOnPlatform = True, KeySize = 521, ... }) [FAIL] System.Security.Cryptography.CryptographicException : The specified curve 'Implicit' or its parameters are not valid for this platform. Stack Trace: at System.Security.Cryptography.ECCurve.Validate() at System.Security.Cryptography.ECDsaOpenSsl.GenerateKey(ECCurve curve) at System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyNamed(CurveDef curveDef) System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyNamed(curveDef: CurveDef { Curve = System.Security.Cryptography.ECCurve, CurveType = Characteristic2, IncludePrivate = False, IsCurveValidOnPlatform = True, KeySize = 193, ... }) [FAIL] System.Security.Cryptography.CryptographicException : The specified curve 'Implicit' or its parameters are not valid for this platform. Stack Trace: at System.Security.Cryptography.ECCurve.Validate() at System.Security.Cryptography.ECDsaOpenSsl.GenerateKey(ECCurve curve) at System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyNamed(CurveDef curveDef) System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyNamed(curveDef: CurveDef { Curve = System.Security.Cryptography.ECCurve, CurveType = Characteristic2, IncludePrivate = False, IsCurveValidOnPlatform = True, KeySize = 163, ... }) [FAIL] System.Security.Cryptography.CryptographicException : The specified curve 'Implicit' or its parameters are not valid for this platform. Stack Trace: at System.Security.Cryptography.ECCurve.Validate() at System.Security.Cryptography.ECDsaOpenSsl.GenerateKey(ECCurve curve) at System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyNamed(CurveDef curveDef) System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyNamed(curveDef: CurveDef { Curve = System.Security.Cryptography.ECCurve, CurveType = Characteristic2, IncludePrivate = False, IsCurveValidOnPlatform = True, KeySize = 283, ... }) [FAIL] System.Security.Cryptography.CryptographicException : The specified curve 'Implicit' or its parameters are not valid for this platform. Stack Trace: at System.Security.Cryptography.ECCurve.Validate() at System.Security.Cryptography.ECDsaOpenSsl.GenerateKey(ECCurve curve) at System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyNamed(CurveDef curveDef) System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyNamed(curveDef: CurveDef { Curve = System.Security.Cryptography.ECCurve, CurveType = Characteristic2, IncludePrivate = False, IsCurveValidOnPlatform = True, KeySize = 283, ... }) [FAIL] System.Security.Cryptography.CryptographicException : The specified curve 'Implicit' or its parameters are not valid for this platform. Stack Trace: at System.Security.Cryptography.ECCurve.Validate() at System.Security.Cryptography.ECDsaOpenSsl.GenerateKey(ECCurve curve) at System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyNamed(CurveDef curveDef) System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyNamed(curveDef: CurveDef { Curve = System.Security.Cryptography.ECCurve, CurveType = PrimeMontgomery, IncludePrivate = False, IsCurveValidOnPlatform = True, KeySize = 160, ... }) [FAIL] System.Security.Cryptography.CryptographicException : The specified curve 'Implicit' or its parameters are not valid for this platform. Stack Trace: at System.Security.Cryptography.ECCurve.Validate() at System.Security.Cryptography.ECDsaOpenSsl.GenerateKey(ECCurve curve) at System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyNamed(CurveDef curveDef) System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyExplicit(curveDef: CurveDef { Curve = System.Security.Cryptography.ECCurve, CurveType = Characteristic2, IncludePrivate = False, IsCurveValidOnPlatform = True, KeySize = 193, ... }) [FAIL] System.Security.Cryptography.CryptographicException : The specified curve '1481013368' or its parameters are not valid for this platform. Stack Trace: at System.Security.Cryptography.ECCurve.Validate() at System.Security.Cryptography.ECDsaOpenSsl.GenerateKey(ECCurve curve) at System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyExplicit(CurveDef curveDef) System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyExplicit(curveDef: CurveDef { Curve = System.Security.Cryptography.ECCurve, CurveType = Characteristic2, IncludePrivate = False, IsCurveValidOnPlatform = True, KeySize = 163, ... }) [FAIL] System.Security.Cryptography.CryptographicException : The specified curve '1481027824' or its parameters are not valid for this platform. Stack Trace: at System.Security.Cryptography.ECCurve.Validate() at System.Security.Cryptography.ECDsaOpenSsl.GenerateKey(ECCurve curve) at System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyExplicit(CurveDef curveDef) System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyExplicit(curveDef: CurveDef { Curve = System.Security.Cryptography.ECCurve, CurveType = Characteristic2, IncludePrivate = False, IsCurveValidOnPlatform = True, KeySize = 283, ... }) [FAIL] System.Security.Cryptography.CryptographicException : The specified curve '1481042400' or its parameters are not valid for this platform. Stack Trace: at System.Security.Cryptography.ECCurve.Validate() at System.Security.Cryptography.ECDsaOpenSsl.GenerateKey(ECCurve curve) at System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyExplicit(CurveDef curveDef) System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyExplicit(curveDef: CurveDef { Curve = System.Security.Cryptography.ECCurve, CurveType = Characteristic2, IncludePrivate = False, IsCurveValidOnPlatform = True, KeySize = 283, ... }) [FAIL] System.Security.Cryptography.CryptographicException : The specified curve '1481056944' or its parameters are not valid for this platform. Stack Trace: at System.Security.Cryptography.ECCurve.Validate() at System.Security.Cryptography.ECDsaOpenSsl.GenerateKey(ECCurve curve) at System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyExplicit(CurveDef curveDef) System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyExplicit(curveDef: CurveDef { Curve = System.Security.Cryptography.ECCurve, CurveType = PrimeMontgomery, IncludePrivate = False, IsCurveValidOnPlatform = True, KeySize = 160, ... }) [FAIL] System.Security.Cryptography.CryptographicException : The specified curve 'Implicit' or its parameters are not valid for this platform. Stack Trace: at System.Security.Cryptography.ECCurve.Validate() at System.Security.Cryptography.ECDsaOpenSsl.GenerateKey(ECCurve curve) at System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyExplicit(CurveDef curveDef) System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyNistP256 [FAIL] System.Security.Cryptography.CryptographicException : The specified curve 'Implicit' or its parameters are not valid for this platform. Stack Trace: at System.Security.Cryptography.ECCurve.Validate() at System.Security.Cryptography.ECDsaOpenSsl.GenerateKey(ECCurve curve) at System.Security.Cryptography.EcDsa.Tests.ECDsaTests.TestRegenKeyNistP256() ``` 10207 area-System.Runtime Two ValueTuple tests started failing on Unix when updating to new CoreCLR ``` ValueTupleTests.TestEquals_GetHashCode [FAIL] Assert.True() Failure Expected: True Actual: False Stack Trace: at ValueTupleTests.ValueTupleTestDriver`10.TestEquals_GetHashCode(ValueTupleTestDriver`10 other, Boolean expectEqual, Boolean expectStructuallyEqual) at ValueTupleTests.TestEquals_GetHashCode() ValueTupleTests.TestCompareTo [FAIL] Assert.Equal() Failure Expected: 0 Actual: 1 Stack Trace: at ValueTupleTests.ValueTupleTestDriver`10.TestCompareTo(ValueTupleTestDriver`10 other, Int32 expectedResult, Int32 expectedStructuralResult) at ValueTupleTests.TestCompareTo() ``` e.g. http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/dev_api/job/ubuntu14.04_release_prtest/113/consoleText cc: @jkotas, @jcouv 10211 area-System.Security SslStream fails validating CRL on Linux I am using the `MailKit` NuGet package to send emails on .NET Core 1.0. I am connecting to an Amazon SES endpoint (`email-smtp.eu-west-1.amazonaws.com:587`) using TLS. On Windows, it works fine, however on Linux, I get an error: ``` System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure. at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MailKit.Net.Smtp.SmtpClient.Connect(String host, Int32 port, SecureSocketOptions options, CancellationToken cancellationToken) at MailKit.MailService.<>c__DisplayClass41_0.b__0() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MyApp.Web.Models.MailClient.d__7.MoveNext() ``` Drilling down into why the certificate validation fails, I found that the chain has `RevocationStatusUnknown` errors (`unable to get certificate CRL`). It looks like `SslStream` is not able to access CRL on Linux. 10215 area-System.Net Port Uri missing members ``` F:System.Uri.SchemeDelimiter F:System.Uri.UriSchemeFile F:System.Uri.UriSchemeFtp F:System.Uri.UriSchemeGopher F:System.Uri.UriSchemeHttp F:System.Uri.UriSchemeHttps F:System.Uri.UriSchemeMailto F:System.Uri.UriSchemeNetPipe F:System.Uri.UriSchemeNetTcp F:System.Uri.UriSchemeNews F:System.Uri.UriSchemeNntp M:System.Uri.#ctor(System.String,System.Boolean) M:System.Uri.#ctor(System.Uri,System.String,System.Boolean) M:System.Uri.Escape M:System.Uri.EscapeString(System.String) M:System.Uri.FromHex(System.Char) M:System.Uri.GetLeftPart(System.UriPartial) M:System.Uri.HexEscape(System.Char) M:System.Uri.HexUnescape(System.String,System.Int32@) M:System.Uri.IsBadFileSystemCharacter(System.Char) M:System.Uri.IsExcludedCharacter(System.Char) M:System.Uri.IsHexDigit(System.Char) M:System.Uri.IsHexEncoding(System.String,System.Int32) M:System.Uri.IsReservedCharacter(System.Char) M:System.Uri.MakeRelative(System.Uri) M:System.Uri.Parse M:System.Uri.Unescape(System.String) T:System.UriPartial F:System.UriPartial.Authority F:System.UriPartial.Path F:System.UriPartial.Query F:System.UriPartial.Scheme F:System.UriPartial.value__ ``` 10216 area-System.Runtime Fill out missing String members ``` M:System.String.#ctor(System.SByte*) M:System.String.#ctor(System.SByte*,System.Int32,System.Int32) M:System.String.Clone M:System.String.CompareTo(System.Object) M:System.String.Concat(System.Object,System.Object,System.Object,System.Object,__arglist) M:System.String.Copy(System.String) M:System.String.GetEnumerator M:System.String.GetTypeCode M:System.String.Intern(System.String) M:System.String.IsInterned(System.String) M:System.String.IsNormalized M:System.String.IsNormalized(System.Text.NormalizationForm) M:System.String.Normalize M:System.String.Normalize(System.Text.NormalizationForm) M:System.String.ToString(System.IFormatProvider) M:System.StringComparer.Create(System.Globalization.CultureInfo,System.Boolean) M:System.StringComparer.Equals(System.Object,System.Object) M:System.StringComparer.GetHashCode(System.Object) M:System.StringComparer.get_InvariantCulture M:System.StringComparer.get_InvariantCultureIgnoreCase ``` Some others are tracked in https://github.com/dotnet/corefx/issues/10066 10217 area-Serialization Missing GetDataContractOriginalType method When serialize a object with DateTimeOffset property, the OriginalUnderlyType of DataContract is always DateTimeOffsetAgent type, which should be DateTimeOffset based on Desktop version. This is because it is missing following methods in DataContractCriticalHelper. ``` c# Type originalUnderlyingType; internal Type OriginalUnderlyingType { get { if (this.originalUnderlyingType == null) { this.originalUnderlyingType = GetDataContractOriginalType(this.underlyingType); } return this.originalUnderlyingType; } } // Maps adapted types back to the original type // Any change to this method should be reflected in GetDataContractAdapterType internal static Type GetDataContractOriginalType(Type type) { if (type == Globals.TypeOfDateTimeOffsetAdapter) { return Globals.TypeOfDateTimeOffset; } return type; } ``` 10218 area-System.Security Consider exposing the underlying error message when a CryptographicException is thrown On .NET Core, the error message returned when a cryptographic exception is thrown only includes the error code, [but not the description](https://github.com/dotnet/corefx/blob/master/src/System.Security.Cryptography.Csp/src/System/Security/Cryptography/CapiHelper.cs#L156). Though not always super useful, having the error description helps understand what's happening when something goes wrong. For instance, here's the exception message you get when you don't have the permission to access the private key associated with a certificate stored in the machine store: System.Security.Cryptography.CryptographicException: OpenCSP failed with error code 2148073494. at Internal.NativeCrypto.CapiHelper.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer) at System.Security.Cryptography.RSACryptoServiceProvider.get_SafeProvHandle() at System.Security.Cryptography.RSACryptoServiceProvider.get_SafeKeyHandle() at System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 keySize, CspParameters parameters, Boolean useDefaultKeySize) at System.Security.Cryptography.RSACryptoServiceProvider..ctor(CspParameters parameters) at Internal.Cryptography.Pal.CertificatePal.<>c.b__59_0(CspParameters csp) at Internal.Cryptography.Pal.CertificatePal.GetPrivateKey[T](Func`2 createCsp, Func`2 createCng) at Internal.Cryptography.Pal.CertificatePal.GetRSAPrivateKey() at Internal.Cryptography.Pal.CertificateExtensionsCommon.GetPrivateKey[T](X509Certificate2 certificate, Predicate`1 matchesConstraints) at Microsoft.IdentityModel.Tokens.X509SecurityKey.get_PrivateKey() at Microsoft.IdentityModel.Tokens.X509SecurityKey.get_HasPrivateKey() On .NET Desktop, the exception message is `Keyset does not exist`. Related ticket: https://github.com/openiddict/openiddict-core/issues/169 /cc @bartonjs 10223 area-System.IO ZipArchive permissions on linux "ZipArchive doesn't currently allow manipulation permissions within. I ran into this when creating file in memory, dropping it into a zip and handing off to another system. With this code deployed on Linux, I'm not seeing a way to give the receiving system read access to contents of zip. **Example:** ``` c# using (var memoryStream = new MemoryStream()) { using (var archive = new ZipArchive(memoryStream, ZipArchiveMode.Create, true)) { var lambdaFile = archive.CreateEntry(""index.js""); using (var entryStream = lambdaFile.Open()) using (var streamWriter = new StreamWriter(entryStream)) { streamWriter.Write(functionContent); } } memoryStream.Seek(0, SeekOrigin.Begin); svcFile.UploadFile(bucketName, s3Key, memoryStream); } ``` " 10224 area-System.Net Remove two Sockets tests "These tests try to connect to an endpoint that is not supposed to have an active listener, and expect to fail. However, there's no guarantee that some other test (or other process) is not listening on that endpoint. This leads to occasional failures in these tests (and may trigger failure in the _other_ test that happens to have been allocated the port in question). I don't know of a way to reliably force the failure these test cases are looking for, and I don't believe these tests provide enough value to justify ""heroic"" effor here. So I'm simply removing them. Fixes #8195. @CIPop @stephentoub " 10226 area-System.Security [dev/cms_unix] EnvelopedCms.Decrypt and EnvelopedCms.Encrypt don't support use of KeyAgreement certificates on Unix Due to lack of support of OpenSSL to use certificates using DH or ECDH for encryption and decryption of enveloped messages, the current implementation doesn't support decrypting for recipients holding only KeyAgreement certificates or encrypting using one. As of now performing any of these operations throws a PlatformNotSupported exception. The only way to work around this seems to be to manually parse the message to extract the encrypted content encryption key and use the appropriate API for the corresponding algorithm (DH or ECDH) to decrypt it and then use the key to decrypt the content blob. 10230 area-System.Net HttpClientHandler.AutomaticDecompression defaults to GZip|Deflate but not on documentation `HttpClientHandler.AutomaticDecompression`'s [documentation](https://docs.microsoft.com/en-us/dotnet/core/api/system.net.http.httpclienthandler#System_Net_Http_HttpClientHandler_AutomaticDecompression) states that default value is `None` when [implementation](https://github.com/dotnet/corefx/blob/master/src/Common/src/System/Net/Http/HttpHandlerDefaults.cs#L15) says otherwise. Which one is correct? 10273 area-System.Security Signing an XML file in .NET Core **Signing an XML file in .NET Core, I can not use more SignatureXML.** 10277 area-System.Security Signature XML file with dotnet ".Net Framework 4.0, 4.5.2, 4.6 to use signing of XML use the dependencies: using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography; using System.Security.Cryptography.Xml; My sign function was as follows: ``` public void Assinar(string strArqXMLAssinar, string strUri, X509Certificate2 x509Certificado, string strArqXMLAssinado) { //Atualizar atributos de retorno com conteúdo padrão this.intResultado = 0; this.strResultadoAss = ""XML Assinado Com Sucesso!""; StreamReader SR = null; try { //Abrir o arquivo XML a ser assinado e ler o seu conteúdo SR = File.OpenText(strArqXMLAssinar); string vXMLString = SR.ReadToEnd(); SR.Close(); try { // Verifica o certificado a ser utilizado na assinatura string _xnome = """"; if (x509Certificado != null) { _xnome = x509Certificado.Subject.ToString(); } X509Certificate2 _X509Cert = new X509Certificate2(); X509Store store = new X509Store(""MY"", StoreLocation.CurrentUser); store.Open(OpenFlags.ReadOnly | OpenFlags.OpenExistingOnly); X509Certificate2Collection collection = (X509Certificate2Collection)store.Certificates; X509Certificate2Collection collection1 = (X509Certificate2Collection)collection.Find(X509FindType.FindBySubjectDistinguishedName, _xnome, false); if (collection1.Count == 0) { this.strResultadoAss = ""Detectou problemas com o certificado digital. (Código do Erro: 2)""; this.intResultado = 2; return; } else { // certificado ok _X509Cert = collection1[0]; string x; x = _X509Cert.GetKeyAlgorithm().ToString(); XmlDocument doc = new XmlDocument(); doc.PreserveWhitespace = false; try { doc.LoadXml(vXMLString); // Verifica se a tag a ser assinada existe é única int qtdeRefUri = doc.GetElementsByTagName(strUri).Count; if (qtdeRefUri == 0) { // a URI indicada não existe this.strResultadoAss = ""A tag de assinatura "" + strUri.Trim() + "" não existe no XML. (Código do Erro: 4)""; this.intResultado = 4; return; } // Exsiste mais de uma tag a ser assinada else { if (qtdeRefUri > 1) { // existe mais de uma URI indicada this.strResultadoAss = ""A tag de assinatura "" + strUri.Trim() + "" não é unica. (Código do Erro: 5)""; this.intResultado = 5; return; } else { if (doc.GetElementsByTagName(""Signature"").Count == 0) { try { SignedXml signedXml = new SignedXml(doc); signedXml.SigningKey = _X509Cert.PrivateKey; Reference reference = new Reference(); // pega o uri que deve ser assinada XmlAttributeCollection _Uri = doc.GetElementsByTagName(strUri).Item(0).Attributes; foreach (XmlAttribute _atributo in _Uri) { if (_atributo.Name == ""Id"") { reference.Uri = ""#"" + _atributo.InnerText; } } XmlDsigEnvelopedSignatureTransform env = new XmlDsigEnvelopedSignatureTransform(); reference.AddTransform(env); XmlDsigC14NTransform c14 = new XmlDsigC14NTransform(); reference.AddTransform(c14); signedXml.AddReference(reference); KeyInfo keyInfo = new KeyInfo(); keyInfo.AddClause(new KeyInfoX509Data(_X509Cert)); signedXml.KeyInfo = keyInfo; signedXml.ComputeSignature(); XmlElement xmlDigitalSignature = signedXml.GetXml(); // Gravar o elemento no documento XML doc.DocumentElement.AppendChild(doc.ImportNode(xmlDigitalSignature, true)); XMLDoc = new XmlDocument(); XMLDoc.PreserveWhitespace = false; XMLDoc = doc; // Atualizar a string do XML já assinada this.vXMLStringAssinado = XMLDoc.OuterXml; // Gravar o XML Assinado no HD StreamWriter SW_2 = File.CreateText(strArqXMLAssinado); SW_2.Write(this.vXMLStringAssinado); SW_2.Close(); } catch (Exception caught) { if (intResultado == 0) { this.intResultado = 3; this.strResultadoAss = caught.Message; return; } } } } } } catch (Exception caught) { if (intResultado == 0) { this.intResultado = 6; this.strResultadoAss = caught.Message; return; } } } } catch (Exception caught) { if (intResultado == 0) { this.intResultado = 1; this.strResultadoAss = caught.Message; return; } } } catch (Exception ex) { if (intResultado == 0) { this.intResultado = 6; this.strResultadoAss = ex.Message; return; } } finally { SR.Close(); } } ``` Does anyone know how this is now done in dotnet core? Cross-post from dotnet/core#234 /cc @ralmsdeveloper " 10299 area-Infrastructure Add ARM64 private jobs to Jenkins Adds ARM64 build and test job definition to the Jenkins netci.groovy file. For now only private job initiations are allowed by a small set of users, though both per-push and daily triggers are coming. depends on: https://github.com/dotnet/corefx/pull/10043, https://github.com/dotnet/buildtools/pull/906, SNI ARM64 Codeflow, https://github.com/dotnet/corefx/pull/10429 remaining ARM64 work: - Merge the above PRs. - Push a commit to dotnet-buildpipeline to add an ARM64 invocation to the pipelines.corefx.json file. - Add 'arm64' labeled x64 machines to Jenkins. - Bump the CoreFX buildtools version to consume the above changes as a part of this PR. - Merge this PR - Kick off some private test jobs on Jenkins to ensure the targets and scripts function as expected. Make changes where necessary. - Push a(nother) PR to CoreFX to enable per-push and daily builds (currently commented out). resolves https://github.com/dotnet/corefx/issues/6899 @mmitche @stephentoub @gkhanna79 @ericstj @weshaggard @kyulee1 @Priya91 10302 area-System.Net Remove duplicate addresses from the result returned from getaddrinfo. `getaddrinfo` returns one entry per socket type (raw, datagram, stream), for each address. We don't currently take this into account, resulting in duplicate IP addresses returned from all DNS lookups on Linux. This change filters the list to include only unique IP addresses. It also consolidates the handling of these results in one place (we previously had two separate copies of essentially the same code). Fixes #9764. @CIPop @stephentoub 10303 area-System.Net Fix failure in MulticastInterface_Set_AnyInterface_Succeeds Before sending data to the multicast address, initiate the receive asynchronously. Otherwise, the packets might all be thrown away before we get a chance to receive one. Fixes #9538. 10304 area-Infrastructure Add a new perf job to Jenkins I am adding in a new job that will run our performance tests in Jenkins. Just starting with Windows for now, and will add Linux later. 10305 area-System.Xml Some Xsl tests don't work on non-coreclr platforms Projects affected: - XsltCompiler - System.Xml.Xsl.XslCompiledTransformApi.Tests - System.Xml.Xsl.XslTransformApi.Tests (partially) - XsltScenarios.Tests (partially) - check all xml projects + Serialization.Xml + Serialization.Json test projects Two issues: - System.Runtime.Loader should not be used by project (it's making the project need to use netstandard1.5 instead of 1.3) - few of the libraries won't work on UAP: System.Diagnostics.Process Basically: fix project.json to do what other test projects do and fix the compile/restore errors. 10307 area-System.Net Remove TODO comment from Socket ArgumentValidation tests "The Accept/Connect suggestions in this comment don't make much sense in the current API, as there is no ""disconnect"" API in CoreFx. The End\* suggestions would be great, except that the public Begin_/End_ methods are implemented using generic wrappers over Task-based async methods, and so are not likely to ever pass such tests. It doesn't seem worth complicating the implementation for this. Fixes #7852 " 10308 area-System.Net Change ActiveIssue to PlatformSpecific for closed issue #5832. 10309 area-System.Net Change ActiveIssue to PlatformSpecific for issue 4002. "There's no guarantee on non-Windows platforms that ""localhost"" will resolve to v4 and v6 addresses. Fixes #4002. " 10310 area-System.Security [dev/cms_unix] Encryption with variable keylength ciphers in EnvelopedCms for Linux not supported Ciphers that support variable keylengths with the same OID currently only support encrypting with the default keylength as OpenSSL only allows to change these in the CTX, but the APIs for CMS_ContentInfo of type EnvelopedData for encryption only take the EVP_CIPHER pointer. There's a EVP_CIPHER_CTX_getcipher macro wich returns a pointer to its cipher, but that cipher still retains the default keylength regardless of the changes made to the CTX. As of now the documented cases are RC2 and RC4 which when given a key length other than 0 or the default one will throw a PlatformNotSupportedException. 10311 area-System.Security [dev/cms_unix] Wrong key length when decoding EnvelopedCms in Linux encrypted with RC4 When decoding an DER blob that represents envelopedData using EnvelopedCms.Decrypt incorrectly reports the encryption algorithm's key length to be 0 always instead of the one used to encrypt the message. This currently happens as there is a bug when setting the asn1 parameters in the call to OpenSSL to retrieve the key length. 10314 area-System.Diagnostics EventSource - need to integrate sources from CoreCLR to .Net Native The sources for .Net Native are behind CoreCLR, they need to be updated to receive the latest bug fixes. 10322 area-System.Xml XmlResolver not public I spent a little while trying to port XmlPrime (XQuery 3.0, XSLT 2.0) to .NET Core. The change to make XmlResolver internal and the consequent removal of passing an XmlResolver via XmlReaderSettings is a blocking issue for us. If I have understood the code correctly, XmlReader is now limited to resolving files on the local file system. 10325 area-System.Xml XPathItem constructor not public I have spent a little while attempting to port XmlPrime (XQuery 3.0, XSLT 2.0) library to .NET core. XPathItem's constructor is now internal. This means we cannot derive new XPathItem types. We rely on this to add XPathAtomicValue, XPathFunctionItem, XPathMap and XPathArray which are part of the XQuery 3.1 data model. This would essentially mean we would have to entirely abandon use of System.Xml.XPath. ``` // Constructor is internal because abstract member was removed and it might be back in some time. // If someone would have created derived class without that member and we would add it back // it would break his code. internal XPathItem() { } ``` 10330 area-Infrastructure Windows native arm64 toolset arm64 builds currently use a private toolset which has not been released publicly yet. There are a few spots in the Windows Native build that require a toolset directory be passed in manually. When the toolset is publicly released, we should modify the build to use that instead. arm64 workaround added in https://github.com/dotnet/corefx/pull/10043 10334 area-System.IO Add tests for newly added APM wrapper methods on System.IO and System.IO.Compression In dev/api branch we added some APM methods to System.IO and System.IO.Compression but we didn't add tests for them. This issue is to track the debt we have for them. related: #10181 10335 area-Meta Remove boilerplate from test projects We should create some larger supports clauses to help reduce boiler-plate in our test projects. EG: `coreFx.Test.net46` should include tuples not just for net46, but also for net461, net462, etc. This is always the correct thing to do. We should also create some convenience supports clauses that allow tests to say they should apply to all the frameworks that support a particular netstandard version. EG: coreFx.Test.netstandard1.3 should include TFM/RID tuples for net46, netcore50, and netcoreap1.0 (as well as the future versions as stated above). This allows a test that can run everywhere to have minimal boilerplate in the project.json. Only if a test needs to hand-select frameworks does it need to use the more framework-granular clauses as mentioned above. We should also have some simple docs that explain the purpose of frameworks and supports in our test project.json's. /cc @ianhays 10338 area-Meta "Microsoft.NETCore.UniversalWindowsPlatform is missing some packages after ""exclude"": ""compile"" updates" "We updated all packages to hide their implementation dependencies with ""exclude"": ""compile"". We did this because implementation dependencies change regularly and aren't seen as part of the compatibility contract of a package. To ensure that folks don't rely on our packages for their implementation dependencies we use `""exclude"": ""compile""` in the packages. This transition caused at some package to be excluded entirely from the UWP meta-package since they were only referenced transitively. We should consider adding these back unless we specifically want to keep them out of the default reference set. /cc @weshaggard @terrajobst The dropped references are: - System.Collections.NonGeneric - System.Collections.Specialized - System.Threading.Overlapped - System.Xml.XmlDocument ## Workaround For folks that hit missing types from one of these packages after upgrading to Microsoft.NETCore.UniversalWindowsPlatform they can reference the packages directly as follows. ``` json ""System.Collections.NonGeneric"": ""4.0.1"", ""System.Collections.Specialized"": ""4.0.1"", ""System.Threading.Overlapped"": ""4.0.1"", ""System.Xml.XmlDocument"": ""4.0.1"" ``` " 10344 area-System.Net Hang in System.Net.Security.Tests (Windows debug) in CI http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/windows_nt_debug_prtest/3118/ Looking through the log, System.Net.Security.Tests is the only test that seems to have started, but not finished. This failed while testing PR #10309, which just changed an attribute on some Sockets tests, so isn't likely to have caused these tests to hang. 10345 area-System.Net Dns.GetHostEntryAsync(IPAddress.None) succeeds on macOS `await Dns.GetHostEntryAsync(IPAddress.None)` throws a SocketException on Windows, but doesn't on Unix. I don't know if the right answer here is that the failing test should be made platform-specific for Windows (i.e. this is expected behavior on Unix) or whether there's a bug in the Unix implementation we need to fix so that this case also fails. 10361 area-System.Diagnostics How to start the system default browser. "The following line doesn't work: Process.Start(""http://localhost:5000""); Microsoft said that that was the official way to start a new browser, a long time ago, at: https://support.microsoft.com/en-us/kb/305703 Is there any multiplatform way to do this now? Will it ever be? " 10365 area-System.Runtime Using AssemblyLoadContext.Default.Resolving event quits with ExecutionEngineException If the `Default.Resolving` event is used to resolve an assembly, the process quits with a `System.ExecutionEngineException`. Here is a repro project (run as console app or xUnit test): [System.Runtime.Loader.Tests.zip](https://github.com/dotnet/corefx/files/385861/System.Runtime.Loader.Tests.zip) ![assemblyloadcontext_resolving](https://cloud.githubusercontent.com/assets/11719160/17173083/8dc5f846-53f0-11e6-8c24-ca71964507e0.png) I'm stuck on this issue here: https://github.com/jcansdale/TestDriven.Net-Issues/issues/7 10373 area-Infrastructure Update versioning documentation With the distinction between `build-native` and `build-managed`, now the documentation is not reflecting the process to custom a version number. For example, provide explanation about why using OfficialBuildID only affects build-managed and how the native binaries are generating their version according to it. 10374 area-Serialization DataContractJsonSerializer failing in Microsoft.NetCore.UniversalWindowsPlatform 5.2.2 Our library is failing to deserialize blob of data when using Microsoft.NetCore.UniversalWindowsPlatform 5.2.2 in Visual Studio 2015. The deserialization works as expected for 5.1.0 and 5.0.0. No parameterless constructor defined for this object. at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.Activator.CreateInstance(Type type) at System.Runtime.Serialization.XmlFormatReaderGenerator.UnsafeGetUninitializedObject(Type type) at ReadAuthenticationResultFromJson(XmlReaderDelegator , XmlObjectSerializerReadContextComplexJson , XmlDictionaryString , XmlDictionaryString[] ) at System.Runtime.Serialization.Json.JsonClassDataContract.ReadJsonValueCore(XmlReaderDelegator jsonReader, XmlObjectSerializerReadContextComplexJson context) at System.Runtime.Serialization.Json.JsonDataContract.ReadJsonValue(XmlReaderDelegator jsonReader, XmlObjectSerializerReadContextComplexJson context) at System.Runtime.Serialization.Json.DataContractJsonSerializerImpl.ReadJsonValue(DataContract contract, XmlReaderDelegator reader, XmlObjectSerializerReadContextComplexJson context) at System.Runtime.Serialization.Json.XmlObjectSerializerReadContextComplexJson.ReadDataContractValue(DataContract dataContract, XmlReaderDelegator reader) at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, DataContract& dataContract) at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Int32 id, RuntimeTypeHandle declaredTypeHandle, String name, String ns) at System.Runtime.Serialization.XmlObjectSerializerReadContextComplex.InternalDeserialize(XmlReaderDelegator xmlReader, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle, String name, String ns) at ReadAuthenticationResultExFromJson(XmlReaderDelegator , XmlObjectSerializerReadContextComplexJson , XmlDictionaryString , XmlDictionaryString[] ) at System.Runtime.Serialization.Json.JsonClassDataContract.ReadJsonValueCore(XmlReaderDelegator jsonReader, XmlObjectSerializerReadContextComplexJson context) at System.Runtime.Serialization.Json.JsonDataContract.ReadJsonValue(XmlReaderDelegator jsonReader, XmlObjectSerializerReadContextComplexJson context) at System.Runtime.Serialization.Json.DataContractJsonSerializerImpl.ReadJsonValue(DataContract contract, XmlReaderDelegator reader, XmlObjectSerializerReadContextComplexJson context) at System.Runtime.Serialization.Json.XmlObjectSerializerReadContextComplexJson.ReadDataContractValue(DataContract dataContract, XmlReaderDelegator reader) at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, DataContract& dataContract) at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, String name, String ns) at System.Runtime.Serialization.XmlObjectSerializerReadContextComplex.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, String name, String ns) at System.Runtime.Serialization.Json.DataContractJsonSerializerImpl.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName) at System.Runtime.Serialization.XmlObjectSerializer.InternalReadObject(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName) at System.Runtime.Serialization.Json.DataContractJsonSerializerImpl.ReadObject(XmlDictionaryReader reader) at System.Runtime.Serialization.Json.DataContractJsonSerializerImpl.ReadObject(Stream stream) at System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject(Stream stream) at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationResultEx.Deserialize(String serializedObject) at Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache.Deserialize(Byte[] state) at AdalCacheIssue.MainPage.d__1.MoveNext() 10375 area-System.Runtime Segmentation fault while running System.Runtime.Tests on CI ``` /mnt/resource/j/workspace/dotnet_corefx/master/centos7.1_release_prtest/bin/tests/AnyOS.AnyCPU.Release/System.Runtime.Tests/netcoreapp1.0/RunTests.sh: line 290: 57218 Segmentation fault (core dumped) ./corerun xunit.console.netcore.exe System.Runtime.Tests.dll -xml testResults.xml -notrait Benchmark=true -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing -notrait category=nonlinuxtests ``` http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/centos7.1_release_prtest/1162/consoleFull 10382 area-Infrastructure BUILDTOOLS_OVERRIDE_RUNTIME should copy the PDB files from the CoreCLR output directory if available When performing a build of CoreCLR, the PDBs are outputted in `bin/Product/OS.Arch.Configuration/PDB`, which is one subdirectory lower than where the binaries are placed (`bin/Product/OS.Arch.Configuration`). Unfortunately, these PDBs aren't automatically copied over like the binaries when settings `BUILDTOOLS_OVERRIDE_RUNTIME`, meaning you have to manually them over to get a better stack trace. It would be nice if [this](https://github.com/dotnet/buildtools/blob/acf2600c88c93efd7ead8ba5365405dd417fc2a7/src/Microsoft.DotNet.Build.Tasks/PackageFiles/publishtest.targets#L109) had some additional logic to check for the existence of a `PDB/` directory beforehand and copy that over as well, since it would make things easier for people running tests on mscorlib. cc @mellinoe @ellismg 10392 area-System.Net Fix the flags passed to getnameinfo We were trying to pass `NI_NAMEREQD` to getnameinfo so that it would fail if the address could not be resolved. However, the PAL->Native translation was backward, resulting in the wrong flags getting passed. Fixes #10345. @stephentoub @CIPop 10395 area-System.Security [dev/cms_unix] Missing static tests in EnvelopedCms generated in a Unix system Now that there is an implementation of EnvelopedCms for Unix platforms, the test suite is missing tests where a message is encrypted in a Unix platform and stored statically in a decryption test to make sure that cross platform decryption is possible (static Windows tests are already present in the suite). Tests should include using the following symmetric algorithms: - AES-128, AES-192, AES-256 - RC2 and RC4 (the only key length supported currently is 128 bits) - DES - 3DES And should be encrypted using KeyTransfer certificates. There should be a test using each IssuerAndSerialNumer and SubjectKeyIdentifier as the identifiers for the recipient. 10396 area-System.Security EnvelopedCms missing KeyAgreement tests The test suite is missing tests that perform decryption on a message that uses KeyAgreement certificates for encryption. Currently there's only one test for Encryption using a Diffie-Hellman certificate and the only check that's performed is if after decoding the RecipientInfo is as expected, but there's no check on the contents of the encrypted message currently. Round trip tests and static tests should be added to the suite to ensure not only the metadata is correct but also the contents of the message. 10397 area-System.IO Test failures for System.IO.Compression.ZipFile on OSX In our official builds the following tests are consistently failing on Mac, can you please investigate? CreateFromDirectoryUnicodel ExtractToDirectoryTest_Unicode ExtractToDirectoryUnicode More information can be found on Mission Control. https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fcli~2F/build/20160728.04/workItem/System.IO.Compression.ZipFile.Tests/details/b2e0e5b4-668a-43d3-8fa9-00a352c10b35 10398 area-System.IO Test failures for FileSystemWatcher on Ubuntu and OSX In our official builds the following tests are failing, can you please investigate? FileSystemWatcher_Directory_Changed_SymLink FileSystemWatcher_Directory_Delete_SymLink FileSystemWatcher_Directory_NotifyFilter_DirectoryName FileSystemWatcher_File_Changed_SymLink More information can be found in Mission Control. https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fcli~2F/build/20160728.04/workItem/System.IO.FileSystem.Watcher.Tests 10399 area-System.Net Test failures for System.Net.Http In our official builds the following tests are failing, can you please investigate? GetAsync_ResponseContentRead_CancelUsingTimeoutOrToken_TaskCanceledQuickly ReadAsStreamAsync_ReadAsync_Cancel_TaskCanceledQuickly NoCallback_RevokedCertificate_NoRevocationChecking_Succeeds More information can be found in Mission Control. https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fcli~2F/build/20160728.04/workItem/System.Net.Http.Functional.Tests 10400 area-System.Text Test failures for System.Text.RegularExpressions on OSX In our official builds the following tests are failing, can you please investigate? RegexGroupTests.Groups More information can be found on Mission Control. https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fcli~2F/build/20160728.04/workItem/System.Text.RegularExpressions.Tests 10409 area-System.Security [dev/cms_unix] EnvelopedCms doesn't support adding originator certificates in the encryption process EnvelopedCms currently throws a platform not supported exception when trying to add originator certificates. Currently OpenSSL doesn't support adding certificates to a newly instantiated CMS_ContentInfo structure, only to one that's read from raw data. It's unviable to do it this way as we'd need a byte blob for each possible symmetric cipher or a parser that would do this. 10421 area-Infrastructure Clean properties and documentation in config.json file - Go through all the options in our config.json file and get them properly documented. For example the difference between `OSGroup`, `TargetOS` and `FilterToOsGroup`. - Update documentation to use the proper properties according to the desire behavior 10422 area-Infrastructure Self-discovery documentation in Build -? Add documentation to the build command when using the argument `-?` on how to interact with the repo and not only providing information about the command per se. 10426 area-Meta New netstandard APIs The below APIs have been added to netstandard1.6 reference assemblies post 1.0 release and they don't exist on the full .NET Framework yet. We either need to remove them temporarily or make them specific to netcoreapp before we ship 1.1. - Regex.Group.Name: https://github.com/dotnet/corefx/pull/9526 cc @Priya91 - UTF8 marshaling: https://github.com/dotnet/corefx/pull/8607 cc @tijoytom @yizhang82 - ~~StreamContext: https://github.com/dotnet/corefx/pull/10036 cc @stephentoub~~ 10428 area-System.Console Using Console.SetOut doesn't affect IsOutputRedirected ... similarly for Input and Error. See : https://github.com/dotnet/corefx/blob/5e36ca02d2594f715da829aafaf7af2b554dfcdf/src/System.Console/src/System/ConsolePal.Unix.cs#L461-L467 The summary describes the behavior I expect which is checking `Console.Out` but the actual behavior is checking `STDOUT` @stephentoub @ianhays 10429 area-Infrastructure Allow netcoreapp1.1 as a valid TestTFM Updates buildtools and BuildTest versions to consume some changes that allow netcoreapp1.1 as a TestTFM. I also modified the CoreFX targets to use netcoreapp1.1 as the new default. to be merged after https://github.com/dotnet/corefx/pull/10423/files @ericstj @weshaggard @karajas 10430 area-Infrastructure New Dev Workflow doesn't detect test failures and still succeeds the build By just running build.cmd with the new workflow, if one or more test fails the build will still be marked as succeeded. When we first saw this we thought it only reproed on non-Windows, but I just got a repro on Windows as well. ![image](https://cloud.githubusercontent.com/assets/13854455/17259606/30d3ab1e-5581-11e6-8823-e8d1e73fe855.png) @maririos 10431 area-System.Diagnostics Add diagnostic tracker API As [discussed](https://github.com/dotnet/corefx/issues/10157#issuecomment-236264347) in issue #10157, we would like a higher-level tracking API for measuring allocations. The goal is to make an API that is similar to Stopwatch: ``` C# namespace System.Diagnostics { public class ManagedAllocationTracker { public static ManagedAllocationTracker StartNew(); public long AllocatedBytes { get; } } } ``` This API will also allow tracking bytes across execution contexts. @KrzysztofCwalina suggested to make it even more general purpose and allow the tracker to track more diagnostic information. 10439 area-Infrastructure Update documentation to build individual csproj for different OSs Update documentation on how to build an individual csproj for the different targets and OS's without needing to rebuild all configurations via the builds file. 10441 area-System.Linq Unverifable code generated by LambdaExpression.Compile for writebacks to structs "Repro: ``` csharp using System; using static System.Linq.Expressions.Expression; struct S { static void Main() { var e = Lambda(Call(typeof(S).GetMethod(""M""), Property(Constant(new S()), ""X""))); var f = e.Compile(); f(); } public static void M(ref bool b) {} public bool X { get; set; } } ``` Emitted IL code: ``` .method private hidebysig static void lambda_method(class [System.Core]System.Runtime.CompilerServices.Closure c) cil managed { .maxstack 2 .locals init (valuetype S V_0, valuetype S V_1, bool V_2) IL_0000: ldarg.0 IL_0001: ldfld object[] [System.Core]System.Runtime.CompilerServices.Closure::Constants IL_0006: ldc.i4.0 IL_0007: ldelem.ref IL_0008: unbox.any S IL_000d: stloc.0 IL_000e: ldloca.s V_0 IL_0010: dup IL_0011: stloc.1 IL_0012: call instance bool S::get_X() IL_0017: stloc.2 IL_0018: ldloca.s V_2 IL_001a: call void C::M(bool&) IL_001f: ldloc.1 IL_0020: ldloc.2 IL_0021: call instance void S::set_X(bool) IL_0026: ret } ``` The issue is in local `V_1` which should be declared as a `valuetype S&` rather than `valuetype S`, causing verification errors on `IL_0011` (S& being stored into S) and on `IL_0012` (instance of the call S instead of S&). It looks the bug is in `AddressOfWriteBack` where the `dup` the address of the struct (left on the stack by `EmitInstance`) is stored in a local declared to the be the value type: ``` csharp private WriteBack AddressOfWriteBack(MemberExpression node) { ... LocalBuilder instanceLocal = null; Type instanceType = null; if (node.Expression != null) { EmitInstance(node.Expression, instanceType = node.Expression.Type); _ilg.Emit(OpCodes.Dup); _ilg.Emit(OpCodes.Stloc, instanceLocal = GetLocal(instanceType)); ``` " 10443 area-System.Security Missing test that tests decryption failure with a certificate with false SKID Missing a test that encrypts a message and then tries to decrypt it using using a certificate that has the same subject key identifier as the recipient but represents a different key pair. This should throw a CryptographicException as the message should be unable to decrypt. 10445 area-System.Runtime System.Runtime.InteropServices.RuntimeInformation fails to install in Classic PCL with NuGet 2.x The `System.Runtime.InteropServices.RuntimeInformation` package will fail to install on NuGet 2.x because there is no `lib\netstandard1.1` version. There is only a `runtimes\win\lib\netstandard1.1` version, but as NuGet 2.x doesn't understand `runtimes`, it'll fail. This affects installing .NET Standard Libraries into a PCL Profile 111 as it's included by `NETStandard.Library` when evaluating dependencies for pcl profiles. To repro: With VS 2013 and NuGet 2.12 - Create a new PCL targeting .NET 4.5, Windows 8 and Windows Phone 8.1 (Profile 111). - In the NuGet package manager, try to install the `S2Geometry` library Actual results ``` Could not install package 'System.Runtime.InteropServices.RuntimeInformation 4.0.0'. You are trying to install this package into a project that targets 'portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. ``` The `S2Geometry` library is a `netstandard1.0` library and follows the advice of having a dependency on `netstandard.library 1.6.0`. /cc @ericstj 10449 area-Infrastructure CI test crashes not being reported correctly While investigating why a potential codegen bug wasn't discovered in CoreFX Jenkins runs, I discovered that these tests were indeed crashing in outerloop runs, but the crashes were not being reported as failures. For instance, [this job](http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_ubuntu14.04_release/105/) reports that there were no test failures, but if you go to the console output, you'll see that the System.Linq.Parallel.Tests actually segfaulted: ``` /mnt/j/workspace/dotnet_corefx/master/outerloop_ubuntu14.04_release/bin/tests/AnyOS.AnyCPU.Release/System.Linq.Parallel.Tests/netcoreapp1.0/RunTests.sh: line 288: 14092 Segmentation fault (core dumped) ./corerun xunit.console.netcore.exe System.Linq.Parallel.Tests.dll -xml testResults.xml -notrait Benchmark=true -notrait category=IgnoreForCI -notrait category=failing -notrait category=nonlinuxtests 11:06:24 Finished running tests. End time=18:07:25. Return value was 139 ``` Furthermore, based on [this table](http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_ubuntu14.04_release/105/testReport/), there's no record that these tests were even attempted. 10454 area-System.Collections Virtualizing Observable Collection In .NET Standard 2.0, I would like to see an Virtualizing Observable Collection. Since Windows 8 (WinRT) a new design principle of Microsoft is “fast and fluid”. But in the full .NET Framework no class is available to virtualize the loading of data. There should be for all UI technologies from Microsoft (WPF, UWA, Xamarin.Forms, ASP.NET) a simple built-in way to load data by page (paging). There are some community projects that have addressed this issue, but I think that Microsoft should provide a uniform solution. - [Virtualizing Observable Collection (Andrew Whiddett, Alpha Chi Technology)](https://alphachitech.wordpress.com/2015/01/31/virtualizing-observable-collection/), [NuGet](https://www.nuget.org/packages/VirtualizingObservableCollection), [GitHub](https://github.com/anagram4wander/VirtualizingObservableCollection) - [WPF: Data Virtualization (Paul McClean)](http://www.codeproject.com/Articles/34405/WPF-Data-Virtualization) - [WPF Data Virtualization (DevZest)](https://datavirtualization.codeplex.com/) - [AsyncVirtualizingCollection (Bea Stollnitz)](http://web.archive.org/web/20111201001632/http://bea.stollnitz.com/blog/?p=378) 10455 area-System.Runtime Add an additional overload to `Marshal.Copy` **Issue:** When writing interop code, it may be desirable to copy memory from one location to another. However, there is currently no managed API for doing so. As such, the user must manually implement such a function, which can be error prone and cannot take advantage of certain optimization techniques (such as using SIMD registers to copy aligned 16-byte blocks). **Workaround:** Use `Buffer.MemoryCopy` which is non-optimal for a few reasons (see https://github.com/dotnet/corefx/issues/10455#issuecomment-236372132), manually implement an API for marshalling memory, or `DllImport` the `memcpy` function from the C Runtime (this is non optimal as it does not necessarily exist in the same library on each platform). **Request:** An additional overload to `Marshal.Copy` should be provided in the form of `public static void Copy(IntPtr source, IntPtr destination, int length)`. This would ideally end up as a call to `memcpy` behind the scenes. 10457 area-System.Runtime Operators should be exposed for `System.IntPtr` and `System.UIntPtr` **Issue:** The CLR supports a set of operators for the `System.IntPtr` and `System.UIntPtr` types (`native int`). These operators can be seen in `III.1.5` of the Command Language Infrastructure specification. However, these operators are not supported by some languages (such as C#). **Workaround:** Either directly emit IL or write non-optimal code that does not directly translate to the appropriate IL instructions. **Request::** A set of 'friendly operators' should be provided for languages that do not support the full set of operators for `System.IntPtr` and `System.UIntPtr`. These operators are: `Add`, `Divide`, `Multiply`, `Remainder`, `Subtract`, `Negate`, `Equals`, `Compare`, `And`, `Not`, `Or`, `XOr`, `ShiftLeft`, `ShiftRight`. 10466 area-System.Linq Avoid triggering lazy allocations of argument collections in LambdaCompiler In various places, the `LambdaCompiler` does access properties like `IndexerExpression.Arguments`, potentially causing the nodes to self-mutate to produce a lazily allocated `ReadOnlyCollection`. We can likely avoid this in many places. In addition, various code paths allocate dynamically growing `List` objects, even though the number of elements can be known upfront. We can reduce this. 10470 area-System.Linq Compiled Lambda Expressions and UWP Is it correct that compiled lambda expressions on UWP aren't really compiled and are instead interpreted? If so does that mean that on UWP and other AOT platforms like Xamarin/Unity with no support for IL emit it is faster to use MemberInfo and ConstructorInfo? Related: https://github.com/JamesNK/Newtonsoft.Json/issues/968 --- If normal reflection is faster on AOT platforms I would like to know is if there is a way at runtime to discover that IL emit isn't supported? A way to discover this capability at runtime will allow libraries to use compiled lambda expressions to boost on platforms it is available, and to fallback to traditional reflection on platforms where it isn't, while still using a single netstandard assembly. 10478 area-System.Threading Add x64 LOCK CMPXCHG16b (coreclr) ## 128 bit/16 byte Interlocked.CompareExchange with structs ### Use cases - Lock free algorithms using tagged state reference rather than GC (for ABA problem) - Atomic update for 16 byte structs on heap (e.g. `Span`, `Vector4`) ### Availability - Always - Windows 8.1 x64 (Required) - Always - Windows 10 x64 (Required) - Always - OSX/MacOS (Intel) - Usually - Linux x64 - Usually - Windows 7 x64 ### Performance - Not fast, but generally less than double a 8 byte LOCK CMPXCHG ### Issues - No 32 bit available (I believe?) - Not available on some early AMD x64 (pre-2006) - Alternative may not be available for ARM and other CPUs - Data needs to be 16 byte aligned ### Questions Seems a bit heavyweight for general case of 16 byte struct copy (e.g. `Vector4`) Would prevent tearing when coherence is required, though slow (e.g. [heap based `Span`](https://github.com/dotnet/coreclr/issues/5851#issuecomment-228599829)) But both tagged state reference and `Span` would have a similar data format, so also contain references. | 64 bits | 64 bits | | --- | --- | | Reference | Data | Would require the heap struct to have an alignment (16 bytes), would need to be [first class structs](https://github.com/dotnet/coreclr/blob/master/Documentation/design-docs/first-class-structs.md) for passing. Attribute? Compile time enforcement? ### Api ``` csharp namespace System.Threading { public interface IAlignedAnd16Bytes { } public static class Interlocked { public static T CompareExchange(ref T location1, T value, T comparand) where T : struct, IAlignedAnd16Bytes; } } ``` Struct would need to be TYP_STRUCT16? InterlockedCompareExchange128 https://msdn.microsoft.com/en-us/library/windows/desktop/hh972640%28v=vs.85%29.aspx /cc @CarolEidt @mikedn @jaredpar @jkotas @stephentoub 10481 area-System.Threading Proposal: Atomic (corefx) ## Atomic ### Background x64 has been able to do 128bit/16 byte Interlocked CompareExchanges for a while and its a cpu requirement to be able install Window 8.1 x64 and Windows 10 x64. Its also available on MacOS/OSX and Linux. Its availability would allow for more interesting lock-less algorithms. Was trying to think if there was an easy fallback for https://github.com/dotnet/corefx/issues/10478 but since its struct-based there is nothing to lock. So additionally it would be good to have a type Atomic which mirrors the C++ 11 atomic type, adds some .NET magic and can fallback to locks when the data width is not supported on the platform. ### Proposed Api Interface, struct, class, extenstions (and some reference manipulation types) ``` csharp namespace System.Threading.Atomics { public interface IAtomic where T : IEquatable { T Read(); T Read(MemoryOrder order); void Write(T value); void Write(T value, MemoryOrder order); T Exchange(T value); T Exchange(T value, MemoryOrder order); bool CompareExchangeWeak(T value, T comperand); bool CompareExchangeWeak(T value, T comperand, MemoryOrder order); bool CompareExchangeStrong(T value, T comperand); bool CompareExchangeStrong(T value, T comperand, MemoryOrder order); // MemoryOrder variants skipped for brevity // Unsafe transformations, bypass the atomicity T UnsafeTransform(AtomicTransform transformation); T UnsafeTransform(AtomicTransformParam transformation, T val); // Atomic transformations, Func should be pure and repeatable in case of retry // Pure transform T Transform(Func transformation); T Transform(Func transformation, TState state); // Conditional transforms e.g. Increment but only while < N T Transform(Func transformation, Func condition); T Transform(Func transformation, Func condition, TState state); // Same data transform, apply if value is what is expected T Transform(Func transformation, T comperand); T Transform(Func transformation, TState state, T comperand); } public delegate T AtomicTransform(ref T input); public delegate T AtomicTransformParam(ref T input, T val); public enum MemoryOrder { Relaxed, Consume, Acquire, Release, AcquireRelease, SequentiallyConsistent } } ``` #### Atomic struct ``` csharp [Disallow(Stack,Boxing)] public struct ValueAtomic : IAtomic where T : IEquatable { private T _data; // allocated if not supported lock-free natively private object _lock; [JitIntrinsic] public static bool IsLockFree { get; } public ValueAtomic(T value) { _data = value; _lock = IsLockFree ? null : new object(); } public T Read(); public T Read(MemoryOrder order); public void Write(T value); public void Write(T value, MemoryOrder order); public T Exchange(T value); public T Exchange(T value, MemoryOrder order); public bool CompareExchangeWeak(T value, T comperand); public bool CompareExchangeWeak(T value, T comperand, MemoryOrder order); public bool CompareExchangeStrong(T value, T comperand); public bool CompareExchangeStrong(T value, T comperand, MemoryOrder order); public unsafe T UnsafeTransform(AtomicTransform transformation) => transformation(ref _data); public unsafe T UnsafeTransform(AtomicTransformParam transformation, T val) => transformation(ref _data, val); public T Transform(Func transformation); public T Transform(Func transformation, TState state); public T Transform(Func transformation, Func condition); public T Transform(Func transformation, Func condition, TState state) { //T current = Read(); //while (condition(current, state)) //{ // T next = transformation(current); // T prev = Interlocked.CompareExchange(ref _data, next, current); // if (prev.Equals(current)) // { // return next; // } // current = prev; //} } public T Transform(Func transformation, T comperand); public T Transform(Func transformation, TState state, T comperand); public static implicit operator T(ValueAtomic atom) => atom.Read(); } ``` #### Atomic class (struct wrapper) ``` csharp public class Atomic : IAtomic where T : IEquatable { private ValueAtomic _atom; public static bool IsLockFree => ValueAtomic.IsLockFree; Atomic(T value) { _atom = new ValueAtomic(value); } public T Read() => _atom.Read(); public T Read(MemoryOrder order) => _atom.Read(order); public void Write(T value) => _atom.Write(value); public void Write(T value, MemoryOrder order) => _atom.Write(value, order); public T Exchange(T value) => _atom.Exchange(value); public T Exchange(T value, MemoryOrder order) => _atom.Exchange(value, order); public bool CompareExchangeWeak(T value, T comperand) => _atom.CompareExchangeWeak(value, comperand); public bool CompareExchangeWeak(T value, T comperand, MemoryOrder order) => _atom.CompareExchangeWeak(value, comperand, order); public bool CompareExchangeStrong(T value, T comperand) => _atom.CompareExchangeStrong(value, comperand); public bool CompareExchangeStrong(T value, T comperand, MemoryOrder order) => _atom.CompareExchangeStrong(value, comperand, order); public unsafe T UnsafeTransform(AtomicTransform transformation) => _atom.UnsafeTransform(transformation); public unsafe T UnsafeTransform(AtomicTransformParam transformation, T val) => _atom.UnsafeTransform(transformation, val); public T Transform(Func transformation) => _atom.Transform(transformation); public T Transform(Func transformation, TState state) => _atom.Transform(transformation, state); public T Transform(Func transformation, Func condition) => _atom.Transform(transformation, condition); public T Transform(Func transformation, Func condition, TState state) => _atom.Transform(transformation, condition, state); public T Transform(Func transformation, T comperand) => _atom.Transform(transformation, comperand); public T Transform(Func transformation, TState state, T comperand) => _atom.Transform(transformation, state, comperand); public static implicit operator T(Atomic atom) => atom.Read(); } ``` #### Numeric Extensions ``` csharp public static class AtomicNumericExtensions { // For byte, short, ushort, uint, int, long, ulong, single, double public static int Add(this Atomic atom, int value); public static int Subtract(this Atomic atom, int value); public static int Multiply(this Atomic atom, int value); public static int Divide(this Atomic atom, int value); // For byte, short, ushort, uint, int, long, ulong public static int Increment(this Atomic atom); public static int Increment(this Atomic atom, int max); public static int Decrement(this Atomic atom); public static int Decrement(this Atomic atom, int min); public static int And(this Atomic atom, int value); public static int Or(this Atomic atom, int value); public static int Xor(this Atomic atom, int value); public static int Not(this Atomic atom); } ``` #### Bool Extensions ``` csharp public static class AtomicBoolExtensions { public static bool TestAndSet(this Atomic atom); public static bool Clear(this Atomic atom); } ``` #### Atomic Flagged References ``` csharp public struct FlaggedReference where TRef : class { TRef Reference { get; set; } bool Flag { get; set; } } public static class AtomicFlaggedReferenceExtensions { public static bool TestAndSet(this Atomic> atom); public static bool TestAndSet( this Atomic> atom, TRef expectedReference); public static bool Clear(this Atomic> atom); public static bool Clear( this Atomic> atom, TRef expectedReference); } ``` #### Atomic Versioned References ``` csharp public struct VersionedReference : IEquatable> where TRef : class { TRef Reference { get; set; } long Version { get; set; } public bool Equals(VersionedReference other) => ReferenceEquals(Reference, other.Reference) && Version == other.Version; public static implicit operator TRef(VersionedReference atom) => atom.Reference; } public static class AtomicVersionedReferenceExtensions { public static VersionedReference Increment( this Atomic> atom) where TRef : class; public static VersionedReference Increment( this Atomic> atom, TRef expectedReference) where TRef : class; public static VersionedReference UpdateIncrement( this Atomic> atom, VersionedReference newRefExpectedVersion) where TRef : class; } ``` #### Atomic Tagged References ``` csharp public struct TaggedReference where TRef : class where TTag : struct { TRef Reference { get; set; } TTag Tag { get; set; } } public static class AtomicTaggedReferenceExtensions { public static TaggedReference Update( this TaggedReference atom, TaggedReference newTaggedReference, TRef expectedReference); public static TaggedReference Update( this TaggedReference atom, TRef newReference, TRef expectedReference); public static TaggedReference Update( this TaggedReference atom, TTag newTag, TRef expectedReference); public static TaggedReference Update( this TaggedReference atom, TaggedReference newTaggedReference, TTag expectedTag); public static TaggedReference Update( this TaggedReference atom, TRef newReference, TTag expectedTag); public static TaggedReference Update( this TaggedReference atom, TTag newTag, TTag expectedTag); public static TaggedReference Update( this TaggedReference atom, TRef newReference, TaggedReference expectedTaggedReference); public static TaggedReference Update( this TaggedReference atom, TTag newTag, TaggedReference expectedTaggedReference); // essentially CompareExchange public static TaggedReference Update( this TaggedReference atom, TaggedReference newTaggedReference, TaggedReference expectedTaggedReference); } ``` #### Atomic Double Reference ``` csharp public struct DoubleReference : IEquatable> where TRef : class { TRef ReferenceLeft { get; set; } TRef ReferenceRight { get; set; } public bool Equals(DoubleReference other) => ReferenceEquals(ReferenceLeft, other.ReferenceLeft) && ReferenceEquals(ReferenceRight, other.ReferenceRight); } public static class DoubleReferenceExtensions { public static DoubleReference ExchangeLeft( this Atomic> atom, TRef expectedRight) where TRef : class; public static DoubleReference ExchangeRight( this Atomic> atom, TRef expectedLeft) where TRef : class; } ``` #### Transforms The transforms give the flexibility to compose more complex atomic data structures; for example the `int` `Add`, `Increment` and `Increment` to limit can be implemented as ``` csharp public static int Add(this TAtomic atom, int value) where TAtomic : IAtomic { return atom.UnsafeTransform( (ref int current, int inc) => Interlocked.Add(ref current, inc), value); } public static int Increment(this TAtomic atom) where TAtomic : IAtomic { return atom.UnsafeTransform((ref int v) => Interlocked.Increment(ref v)); } public static int Increment(this TAtomic atom, int value, int max) where TAtomic : IAtomic { return atom.Transform((current) => current + 1, (c, m) => c <= m, max); } ``` Or an entirely new type that hadn't previously supported atomic updates, with new operations ``` csharp public static Decimal Multiply(this TAtomic atom, Decimal value) where TAtomic : IAtomic { return atom.Transform((current, m) => current * m, value); } ``` When the struct was 16 bytes `_data` would need to be 16 byte aligned to allow lock free use with `LOCK CMPXCHG16b` where available. Might be easier to enforce alignment than with https://github.com/dotnet/corefx/issues/10478? `VersionedReference` and `FlaggedReference` should be 16 byte aligned in `Atomic` (don't need to be outside), as should `TaggedReference` when the struct is <= 16 bytes. 10487 area-System.ComponentModel GuidConverter.ConvertTo throwing exception to convert valid guid string to Guid object. "If using the API `GuidConverter.ConvertTo(null, CultureInfo.CurrentCulture, guidStr, typeof(Guid));` we are getting an exception saying. Error Message: {""'GuidConverter' is unable to convert 'System.String' to 'System.Guid'.""} Stack Strace : ``` at System.ComponentModel.TypeConverter.GetConvertToException(Object value, Type destinationType) at System.ComponentModel.TypeConverter.ConvertTo(ITypeDescriptorContext context, CultureInfo culture, Object value, Type destinationType) at System.ComponentModel.GuidConverter.ConvertTo(ITypeDescriptorContext context, CultureInfo culture, Object value, Type destinationType) at GuidConverterRepoClassic.Program.Main(String[] args) ``` It's a consistent repro with valid Guid Strings. " 10488 area-System.Reflection System.Reflection.PortableExecutable.PEReader throws BadImageFormatException "I am trying to read the .PDB file path from an executable with System.Reflection.PortableExecutable.PEReader and it works fine in most cases - but now I have discovered that ReadCodeViewDebugDirectoryData throws a BadImageFormatException when I specify winword.exe as executable because the PDB path in winword.exe is padded with bytes different to '0'. DBH.exe and dumpbin.exe have no problem with that. So, wouldn't it be better to remove that ""throw"", to broaden the usability of PEReader? " 10490 area-System.Net ManagedWebSocket doesn't send payloads if `_isServer` is true Looks like [`System.Net.WebSockets.ManagedWebSocket.WriteFrameToSendBuffer`](https://github.com/dotnet/corefx/blob/b835f230039c4f44944b7fb3f8ce670ebf578ea4/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/ManagedWebSocket.cs#L448) fails to actually write the payload if `_isServer` is set. It copies the payload into the send buffer in the same if-branch that handles masking (which is client-only :smile:). Discovered and fixed this while porting code to ASP.NET, so I'm going to port the fix over to corefx and open a PR. /cc @stephentoub @Tratcher 10491 area-System.Net Server not resolving DNS, only accepts web service URL with IP We have an Ubuntu server set up for our .Net Core application and running Nginx. Our web services URL works when we pass the IP address, but we get an error stating the DNS cannot be found or does not exist when passing the name of the server rather than the IP. Can anyone provide insight on this issue please? 10493 area-System.Globalization Remove P2P pkgproj dependencies to System.Globalization In order to be able to update prerelease packages, we needed to add pkgproj references with #10492 so this issue is to track the work to remove that which should happen on our next prerelease dependency update. 10500 area-System.IO Test failure: System.IO.Tests.DirectoryInfo_Delete/DeletingSymLinkDoesntDeleteTarget Opened on behalf of @sokket The test `System.IO.Tests.DirectoryInfo_Delete/DeletingSymLinkDoesntDeleteTarget` has failed. ``` System.ComponentModel.Win32Exception : No such file or directory ``` Stack Trace: ``` at Interop.libproc.proc_pidpath(Int32 pid) at System.Diagnostics.Process.GetExePath() at System.Diagnostics.Process.ResolvePath(String filename) at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at MountHelper.CreateSymbolicLink(String linkPath, String targetPath, Boolean isDirectory) at System.IO.Tests.Directory_Delete_str.DeletingSymLinkDoesntDeleteTarget() ``` Failing configurations: - OSX.1011.Amd64 - AnyCPU-Debug 10501 area-System.IO Test failure: System.IO.Tests.DirectoryInfo_EnumerateFiles_Str/EnumerateWithSymLinkToFile Opened on behalf of @sokket The test `System.IO.Tests.DirectoryInfo_EnumerateFiles_Str/EnumerateWithSymLinkToFile` has failed. ``` System.ComponentModel.Win32Exception : No such file or directory ``` Stack Trace: ``` at Interop.libproc.proc_pidpath(Int32 pid) at System.Diagnostics.Process.GetExePath() at System.Diagnostics.Process.ResolvePath(String filename) at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at MountHelper.CreateSymbolicLink(String linkPath, String targetPath, Boolean isDirectory) at System.IO.Tests.Directory_GetFiles_str.EnumerateWithSymLinkToFile() ``` Failing configurations: - OSX.1011.Amd64 - AnyCPU-Debug 10504 area-System.Net Test failure: System.Net.Http.Functional.Tests.CancellationTest/GetAsync_ResponseContentRead_CancelUsingTimeoutOrToken_TaskCanceledQuickly Opened on behalf of @sokket The test `System.Net.Http.Functional.Tests.CancellationTest/GetAsync_ResponseContentRead_CancelUsingTimeoutOrToken_TaskCanceledQuickly` has failed. ``` Elapsed time should be short\r Expected: True\r Actual: False ``` Stack Trace: ``` at System.Net.Http.Functional.Tests.CancellationTest.<>c__DisplayClass2_1.<b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at System.Net.Test.Common.LoopbackServer.<>c__DisplayClass3_0.b__0(Task t) at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at System.Net.Http.Functional.Tests.CancellationTest.d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` Failing configurations: - Windows.7.Amd64 - AnyCPU-Debug - AnyCPU-Release - Windows.81.Amd64 - AnyCPU-Debug - AnyCPU-Release - Windows.10.Core.Amd64 - AnyCPU-Debug - AnyCPU-Release - Windows.10.Amd64 - AnyCPU-Debug 10511 area-System.Runtime Marshal.ZeroFreeMemoryUTF8 doesn't exist Looks like we didn't fully rename ZeroFreeMemoryUTF8 to ZeroFreeCoTaskMemUTF8. ZeroFreeMemoryUTF8 exists in the reference assembly but not the implementation. Reference assemblies: https://github.com/dotnet/corefx/blob/master/src/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs#L662 https://github.com/dotnet/coreclr/blob/99c0410601955552920079a7465c64e725814c2c/src/mscorlib/ref/mscorlib.cs Change to rename in implementation: https://github.com/dotnet/coreclr/commit/42929098cb110c62a2605cdf789239950e85dadf 10513 area-System.Globalization CultureInfo's Payloads on CoreCLR and Desktop Not Compatible PR #9014 attempted to make `System.Globalization.CultureInfo` serializable on CoreCLR. The issue is that the serialization payload generated on CoreCLR is not compatible with the one on Desktop, which caused a `CultureInfo` object cannot make a roundtrip between CoreCLR and full framework. This is due to the fact that `CultureInfo` uses different names for its fields across different platforms. `CultureInfo` should have consistent names for fields, which are being serialized on Desktop, across platforms, including full framework, CoreCLR, and NetNative. https://github.com/dotnet/corefx/issues/8736 is blocked by this issue. 10515 area-System.Security Missing tests veryfing decryption contents of messages in EnvelopedCms The current test suite doesn't have verifying that the contents of the decrypted message is the expected one for the following algorithms: - Round Trips: 1. DES 2. AES-128, AES-192 3. RC2 4. RC4 - Windows generated static tests: 1. DES 2. RC2 3. RC4 10516 area-System.Diagnostics StandardOutput and StandardError receive an extra line On Linux, compared to other languages, say Python, .NET is appending (somehow) an extra line on redirected StandardOutput and StandardError. For example, if I execute the following script: ``` bash #!/bin/sh exit 42 ``` In Python (e.g., subprocess.check_output) I receive, as I would expect, an empty string. In .NET, however, if I redirect through ProcessStartInfo, I receive an event in my OutputDataReceived handler with an empty string (and the my code cannot reject empty string out-of-hand since it may be a legal part of output). 10519 area-Infrastructure How to skip build Windows_NT OS Group while building inside Linux. It seems that Windows_NT binaries are built even with `-BuildAllOSGroups:False -FilterToOSGroup:Linux`: ``` $ ./build-managed.sh -binaries -SkipTests -OSGroup:Linux -TargetOS:Linux -BuildAllOSGroups:False -FilterToOSGroup:Linux ... $ ls bin/ AnyOS.AnyCPU.Debug/ Linux.AnyCPU.Debug/ obj/ ref/ Unix.AnyCPU.Debug/ Windows_NT.AnyCPU.Debug/ ``` Is there any other option to skip Windows_NT binaries? 10520 area-System.Linq Expression interpreter can avoid allocating (empty) arrays Did a little performance tracing session for simple expressions evaluated using the interpreter. Not surprising, a big source of allocations is for `object[]` instances passed to `Invoke` methods in reflection. I'm opening this issue to track some possible improvements in this area. Instructions for `Call`, `New`, etc. seem to allocate an empty `object[]` in case there are no arguments, in order to call the `Invoke` method through reflection. We should be able to avoid these allocations here and pass `Array.Empty()` instead. ~~In addition, we may be able to reduce `object[]` allocations in general, given that reflection also copies the argument array in `CheckArguments`, by caching a limited set of reusable `object[]` buffers for small lengths. I don't think `System.Buffers` fits the bill unfortunately, because it will hand out buffers of a minimum size or larger. Unless reflection would be able to operate on `ArraySegment` to 'trim' the view over a rented array, we'd have to keep our own cache. An obvious question is the trade-off between allocating arrays and the (synchronization) cost of renting them from a pool.~~ 10523 area-System.Data Question about database connection I know MS Sql Server is only running in Windows platform. But if it's possible to run my web app in Linux and connect to my database in Windows? I got an error message when I tried to use **SqlClient** in my application: > Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NotSupportedException: The keyword 'integrated security' is not supported on this platform. 10524 area-Meta Debugging native/ c code in vs2015 .Net core RC2 . "Hi, I am using a .Net Core Console App using Visual Studio 2015 update 2 on windows machine. I am using a package ""pack1""(managed code) in this console application which in turn calls native / c code dll. I am able to step into pack1 code, but i am not able to step into my native code. Tried giving symbol path to native code pdb file , enabled native and managed code compatibility option,tried putting breakpoint into the native c source code directly, also tried to step into c code from managed code, but none of them seem to work. Can some one please help me with this / point to any documentation ? sample Project.json file : { ""version"": ""1.0.0-*"", ""buildOptions"": { ""emitEntryPoint"": true, ""defines"": [ ""DEBUG"" ] }, ""dependencies"": { ""Microsoft.NETCore.App"": { ""type"": ""platform"", ""version"": ""1.0.0-rc2-3002702"" }, ""pack1"": ""1.0.0.0"" }, ""frameworks"": { ""netcoreapp1.0"": { ""imports"": ""dnxcore50"" } }, ""configurations"": { ""debug"": { } } } Thanks and Regards, Prashanth " 10525 area-System.Net Consider adding a LinkHeaderValue/Parser Lots of APIs are now using Link headers. They are kind of an annoyance to parse manually (and do it properly.) It would be great if the System.Net.Http library offered built-ins for these. 10526 area-System.ComponentModel Consider merging DisplayFormatAttribute into DisplayAttribute We use `DisplayFormatAttribute` heavily to provide annotations which can be consumed by several kind of controls like grids, text contents, etc. The issue with this attribute is that it's not localizable. In one of .NET's earlier versions the _legacy_ `DisplayName`, `Description`, and `Category` attributes have been merged into the new `DisplayAttribute`, so that they can be nicely localized. However, at that point for some reason, the `DisplayFormatAttribute` had been kept separately. It would be important to merge it into `DisplayAttribute` too, because it has at least two fields which are important to localize: ``` public string DataFormatString { get; set; } public string NullDisplayText { get; set; } ``` These should definitely be part of `DisplayAttribute` I think. 10527 area-System.ComponentModel Allow EditableAttribute for classes I have a scenario where I need to specify `EditableAttribute` on a class, instead of applying it separately to every property. Is there any drawback of allowing this attribute for classes too? 10528 area-System.Collections "Add ""slicing"" APIs to ArraySegment" ArraySegment could be much more useful if it had the following additional APIs. I propose that we add these members to ArraySegment: ``` csharp namespace System { partial struct ArraySegment { public T this[int index] { get; set; } public static implicit operator ArraySegment(T[] array); public static explicit operator T[](ArraySegment segment); public T[] ToArray(); public int Length { get; } public ArraySegment Slice(int index, int count); public ArraySegment Slice(int index); public void CopyTo(T[] destination); public void CopyTo(T[] destination, int destinationIndex); public void CopyTo(ArraySegment destination); public static ArraySegment Empty { get; } } } ``` 10530 area-System.Reflection Restore Reflection API (.NET Core) Expose all the reflection APIs S.P.CoreLib for CoreCLR. For the exact API list refer to the tracking spreadsheet. We need to essentially expose all the APIs in S.P.CoreLib and then revise the contracts (i.e. move S.Reflection APIs into System.Runtime). cc @AtsushiKan 10533 area-Infrastructure CoreFx Build Native On Free BSD 10.1 Fails "Hi, I could build coreclr successfully, then tried to build corefx, but I had the following : root@:~/dotnet/corefx # **uname -a** FreeBSD 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 root@:~/dotnet/corefx # **./build-native.sh** Unsupported OS 'FreeBSD' detected. Downloading ubuntu-x64 tools. Installing dotnet cli... Restoring BuildTools version 1.0.26-prerelease-00629-09... ELF binary type ""0"" not known. /root/dotnet/corefx/init-tools.sh: line 78: /root/dotnet/corefx/Tools/dotnetcli/dotnet: cannot execute binary file: Exec format error ERROR: Could not restore build tools correctly. See '/root/dotnet/corefx/init-tools.log' for more details. Initializing BuildTools... /root/dotnet/corefx/init-tools.sh: line 84: /root/dotnet/corefx/packages/Microsoft.DotNet.BuildTools/1.0.26-prerelease-00629-09/lib/init-tools.sh: No such file or directory ERROR: An error occured when trying to initialize the tools. Please check '/root/dotnet/corefx/init-tools.log' for more details. root@:~/dotnet/corefx # **cat init-tools.log** Running: /root/dotnet/corefx/init-tools.sh Installing 'https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/1.0.0-preview2-002733/dotnet-dev-ubuntu-x64.1.0.0-preview2-002733.tar.gz' to '/root/dotnet/corefx/Tools/dotnetcli/dotnet.tar' Running: /root/dotnet/corefx/Tools/dotnetcli/dotnet restore ""/root/dotnet/corefx/Tools/1.0.26-prerelease-00629-09/project.json"" --no-cache --packages /root/dotnet/corefx/packages --source https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json Running: /root/dotnet/corefx/packages/Microsoft.DotNet.BuildTools/1.0.26-prerelease-00629-09/lib/init-tools.sh /root/dotnet/corefx /root/dotnet/corefx/Tools/dotnetcli/dotnet /root/dotnet/corefx/Tools " 10534 area-System.Security Certificate validation when using cURLHandler should look at trusted user store Currently, observation is that when using CurlHandler, we look only at the system's root certificate store for trusted CA certificates We should also have the ability to look at the certs that are stored in ~/.dotnet/corefx/cryptography/x509certificates/*\* (i.e., the user certificate store) to determine whether an endpoint is trusted Scenario: - Install a self-signed root certificate into the corefx user root store - Hit a https endpoint using the HttpClient which uses a server certificate signed by the self-signed root certificate - Observe that the request fails - Install the self-signed root certificate into the root store - Observe that the request passes now 10544 area-System.Security AesCng much slower than AesCryptoServiceProvider I get the following timings on Windows 2012R2 with freshly-installed .NET 4.6.2 final and running in 64bit release mode (via 64bit LinqPad): ``` CNG 00:00:02.3278742 CSP 00:00:00.0392550 CNG 00:00:02.3332983 CSP 00:00:00.0408160 CNG 00:00:02.2949133 CSP 00:00:00.0398848 CNG 00:00:02.2959543 CSP 00:00:00.0392522 ``` The quick & crude benchmark code: https://gist.github.com/anonymous/39929346722e641027b313a45a4f44ab Is this perf difference intentional/expected? 10547 area-Infrastructure ExternalPackages versions.props lists incorrect versions "https://github.com/dotnet/corefx/blob/master/pkg/ExternalPackages/versions.props lists the win10 non-aot packages as External, when it should list the aot packages. We do not ship the non-aot packages from TFS, so this file should be updated for correctness to: ``` 4.0.1-$(ExternalExpectedPrerelease) 4.0.1-$(ExternalExpectedPrerelease) 4.0.1-$(ExternalExpectedPrerelease) ``` This does raise the question of how it's currently functioning without errors, since it's looking for a package that does not exist. @jhendrixMSFT @chcosta " 10549 area-System.Reflection System.Reflection.Metadata should expose a way to get the containing assembly for a given type. Given a type handle you should be able to easily get a handle to the containing assembly. This is required to compute the AssemblyQualifiedName of a type when you only have a type handle. 10550 area-System.Diagnostics Missing stdout line while redirect process stdout I make a console app that using Diagnostic.Process to call `/usr/bin/git` with argument `version`, then redirect STDOUT and STDERR to get the git version info. However, i got empty string from STDOUT/STDERR of git version sometime. In order to investigate, i made a console app that siting in a loop invoke `git version` until it get empty output from `git version`. I also made a bash script that also invoke `git version` in a loop till it hit empty then exit, so i can figure out this is a git issue or dotnet core issue. So far, the test bash script is able to run for hours without find `git version` return empty. However my dotnet core app sometime will get empty string on STDOUR redirect, which make me feel this is more like a dotnet core issue. here is the code of my console app that using Diagnostic.Process to invoke process and redirect STDOUT, [gitversion.txt](https://github.com/dotnet/corefx/files/400242/gitversion.txt) Can someone help me take a look, did i do something wrong in the code or it's a real issue with dotnet core? I am able to repro on Ubuntu 14 and 16, not repro on windows, haven't try OSX since i don't have a Mac. Thanks, 10555 area-System.Collections ARM64: System.Collections.Concurrent tests hanging I've had this happen twice now. The full test run is getting stuck at System.Collections.Concurrent and not proceeding any further. We should try to repro this with better logging and see if we can diagnose the issue outside of a limited-logging scenario. 10556 area-Meta Netstandard contract list needs to be updated to be correct. https://github.com/dotnet/corefx/blob/master/Documentation/architecture/net-platform-standard.md needs to be updated to represent what is actually shipped. There are some things in there that are not correct like the PInvoke contract that never shipped and was removed. 10561 area-System.Linq Add benchmark suite for System.Linq.Expressions I'm starting to look into some performance aspects of the expression tree interpreter and will need a `Performance` test project for it. An attempt to create it using a carbon copy from other projects with such a `Performance` project ran into some issues on referencing the `pkg`, so I'm adding an issue to track progress on this. If anyone with more awareness of the benchmark infrastructure could help out here, that'd be useful too. 10563 area-Infrastructure Needs to refactor code for option 'restrict-proj' in run-test.sh "run-test.sh accepts a parameter, regex for an option restrict-proj. The regex is used as $TestSelection in run_test(). ``` bash # $1 is the path to the test folder run_test() { testProject=`basename $1` # Check for project restrictions if [[ ! $testProject =~ $TestSelection ]]; then echo ""Skipping $testProject"" exit 0 fi // ... } ``` Above function, run_test() executes after run_all_tests(). ``` bash # $1 is the name of the platform folder (e.g Unix.AnyCPU.Debug) run_all_tests() { for testFolder in ""$CoreFxTests/$1/""* do run_test $testFolder & pids=""$pids $!"" numberOfProcesses=$(($numberOfProcesses+1)) if [ ""$numberOfProcesses"" -ge $maxProcesses ]; then wait_on_pids ""$pids"" numberOfProcesses=0 pids="""" fi done # Wait on the last processes wait_on_pids ""$pids"" pids="""" } ``` I think it's better that moving $TestSelection in run_test() into run_all_tests() and then using it with command 'find'. I'd like to know your opinion. " 10566 area-System.Net Dotnet core's sockets don't seem to have access to the SocketAPMExtensions I've made [a github repo](https://github.com/johnnymo87/socket-apm-extensions) to demo my issue. Copying the readme here ... According to my understanding of the conversation in [this issue](https://github.com/dotnet/corefx/issues/2936), dotnet core supports APM methods for sockets, such as `BeginConnect` and `EndConnect`. I believe the support for it appears [here](https://github.com/dotnet/corefx/blob/master/src/Common/src/System/Net/Sockets/SocketAPMExtensions.cs) in the source code. I must be doing something wrong, however, because I am unable to access those methods in my code. This repo has the necessary code to reproduce the issue. ``` bash docker-compose build ``` I get the following: ``` bash Building app Step 1 : FROM microsoft/dotnet:latest ---> 3502ab7a3654 Step 2 : COPY . /app ---> d129994eb685 Removing intermediate container a6ad53b0061f Step 3 : RUN dotnet restore /app ---> Running in a04726ff78a2 log : Restoring packages for /app/project.json... log : Writing lock file to disk. Path: /app/project.lock.json log : /app/project.json log : Restore completed in 608ms. ---> b3934c2e0aeb Removing intermediate container a04726ff78a2 Step 4 : RUN dotnet build /app ---> Running in 38dfed6ca88a Project app (.NETStandard,Version=v1.6) will be compiled because expected outputs are missing Compiling app for .NETStandard,Version=v1.6 /usr/share/dotnet/dotnet compile-csc @/app/obj/Debug/netstandard1.6/dotnet-compile.rsp returned Exit Code 1 /app/Program.cs(15,35): error CS1061: 'Socket' does not contain a definition for 'BeginConnect' and no extension method 'BeginConnect' accepting a first argument of type 'Socket' could be found (are you missing a using directive or an assembly reference?) /app/Program.cs(16,56): error CS1061: 'Socket' does not contain a definition for 'EndConnect' and no extension method 'EndConnect' accepting a first argument of type 'Socket' could be found (are you missing a using directive or an assembly reference?) Compilation failed. 0 Warning(s) 2 Error(s) Time elapsed 00:00:01.2293181 ``` 10567 area-Infrastructure Running performance tests requires specifying the OS "

UPDATE

Go further down the chain for the changes to the issue.
Attempting to run performance tests on my machine results in ""error: Xunit performance package was not found"", even though I have the required options installed in VS: ![image](https://cloud.githubusercontent.com/assets/5569508/17409563/aa21d390-5a24-11e6-9b91-0d48a67e96a9.png) I've attempted uninstalling/reinstalling the feature, VisualStudio itself, and onto a new machine too. Are the instructions incomplete or something? Or what might I be doing wrong? I do have VS2013 Community installed... " 10570 area-Serialization [Add Test] T:System.Xml.Serialization.XmlSerializerFactory 10572 area-Serialization [Add Test] T:System.Xml.Serialization.XmlReflectionImporter T:System.Xml.Serialization.XmlMapping T:System.Xml.Serialization.XmlMemberMapping T:System.Xml.Serialization.XmlMembersMapping T:System.Xml.Serialization.XmlReflectionImporter T:System.Xml.Serialization.XmlReflectionMember T:System.Xml.Serialization.XmlTypeMapping 10573 area-Serialization [Add Test] T:System.Xml.Serialization.XmlSchemaImporter T:System.Xml.Serialization.ImportContext T:System.Xml.Serialization.XmlSchemaEnumerator T:System.Xml.Serialization.XmlSchemaExporter T:System.Xml.Serialization.XmlSchemaImporter T:System.Xml.Serialization.SoapSchemaMember T:System.Xml.Serialization.XmlSchemas 10574 area-Serialization [Add Test] T:System.Xml.Serialization.XmlSerializerAssemblyAttribute 10575 area-Serialization [Add Test] T:System.Xml.Serialization.XmlSerializerVersionAttribute 10576 area-Serialization Add API T:System.Xml.Serialization.XmlSerializationGeneratedCode T:System.Xml.Serialization.XmlSerializationGeneratedCode T:System.Xml.Serialization.XmlSerializerImplementation 10577 area-Serialization [Add Test] T:System.Xml.Serialization.XmlSerializationWriter T:System.Xml.Serialization.XmlSerializationWriter T:System.Xml.Serialization.XmlSerializationReader T:System.Xml.Serialization.XmlSerializationGeneratedCode T:System.Xml.Serialization.XmlSerializerImplementation 10578 area-Serialization [Add Test] EventArgs Types T:System.Xml.Serialization.XmlDeserializationEvents T:System.Xml.Serialization.UnreferencedObjectEventArgs T:System.Xml.Serialization.XmlAttributeEventArgs T:System.Xml.Serialization.XmlElementEventArgs T:System.Xml.Serialization.XmlNodeEventArgs 10579 area-Serialization [Add Test] T:System.Xml.Serialization.SoapReflectionImporter T:System.Xml.Serialization.SoapAttributeAttribute T:System.Xml.Serialization.SoapAttributeOverrides T:System.Xml.Serialization.SoapAttributes T:System.Xml.Serialization.SoapElementAttribute T:System.Xml.Serialization.SoapEnumAttribute T:System.Xml.Serialization.SoapIgnoreAttribute T:System.Xml.Serialization.SoapIncludeAttribute T:System.Xml.Serialization.SoapReflectionImporter T:System.Xml.Serialization.SoapTypeAttribute 10580 area-Serialization [Add Test] T:System.Xml.Serialization.IXmlTextParser 10581 area-Serialization [Add Test] T:System.Xml.Serialization.CodeIdentifier T:System.Xml.Serialization.CodeIdentifier T:System.Xml.Serialization.CodeIdentifiers 10583 area-System.IO Implement File.Replace() as a documented safe atomic API See the real framework. ``` namespace System.IO { public static class File { public static void Replace(string source, string destination, string backup); public static void Replace(string source, string destination, string backup, bool ignoreMetadataErrors); } } ``` ## Implementation On Windows this should directly delegate to the `ReplaceFile()` API which is [guaranteed atomic wrt `source` and `destination` by this wording of the win32 API](https://msdn.microsoft.com/en-us/library/windows/desktop/hh802690%28v=vs.85%29.aspx#applications_updating_a_single_file_with_document-like_data). On POSIX (which, really, Windows should hurry up and start implementing… grr…), it should: 1. If `backup` is not `null`: 1. `unlink(backup)`, ignoring `ENOENT` error but for other failures throw `IOException`. 2. `link(destination, backup)` and if that fails throw `IOException`. 2. If `backup` is `null` 1. `stat(destination)`, if `ENOENT` throw `IOException`. 3. `rename(source, destination)` and if that fails throw `IOException`. This guarantees that the file at `destination` never ceases to exist even with program termination or power failure. The `backup` feature is best effort on POSIX any existing file is not guaranteed to be restored if the later steps fail. However, if `backup` is specified but does not exist, failure at a later step will not cause any data loss—it will just leave behind a second link to `destination` at the path `backup`. And a future call/retry would just wipe away and recreate this `backup`. Example C for all but step 2 which I should fix: https://gist.github.com/binki/e40182e4098d9714a609918908c623b8 , see [related mono bug #43062 I also opened](https://bugzilla.xamarin.com/show_bug.cgi?id=43062). 10586 area-Serialization [ReflectionBasedXmlSerializer] To Support Types with IsSequence == true Currently the reflection based method treat this kind of type as normal types. But potentially we can do some optimization for types that have ordered properties. Searching `#10586` in https://github.com/dotnet/corefx/blob/master/src/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationReader.cs#L1181 would show the places to be fixed. 10587 area-Serialization [ReflectionBasedXmlSerializer] To Support SpecialMapping Types Having DerivedMappings See https://github.com/dotnet/corefx/blob/32c4013a5d750c1c6a5b240d37a689991a479097/src/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationReader.cs#L990 10588 area-Serialization [ReflectionBasedXmlSerializer] To Support ArrayMapping Types Having ChoiceIdentifier see https://github.com/dotnet/corefx/blob/32c4013a5d750c1c6a5b240d37a689991a479097/src/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationReader.cs#L1132 10589 area-Serialization [ReflectionBasedXmlSerializer] To Support Serializing XmlSchemaObject XmlSchemaObject is currently not in the contract. If we add it into the contract, we need to work on this issue. 10590 area-Serialization [ReflectionBasedXmlSerializer] To Support special.TypeDesc.CanBeAttributeValue == true Searching `#10590` in https://github.com/dotnet/corefx/blob/master/src/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationReader.cs would show the code path to be implemented. 10591 area-Serialization [ReflectionBasedXmlSerializer] Add Tests for member.CheckSpecified == SpecifiedAccessor.ReadWrite Please have a look at the comment at https://github.com/dotnet/corefx/blob/master/src/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationReader.cs#L1212. We'd like to add tests for that code path. 10592 area-Serialization [ReflectionBasedXmlSerializer] To Support text.Mapping being SpecialMapping 10593 area-Serialization Add Test project for Running XmlSeriazlier Tests in ReflectionOnly Mode We added test projects for running DataContractSerializer and DataContractJsonSerializer's tests in reflection mode, see https://github.com/dotnet/corefx/pull/11480. We should do the same thing for XmlSerizlier. 10594 area-Serialization Add Reflection Based (De-)Serialization Support for XmlSerializer The changes are to enable XmlSerializer to do (de-)serialization via reflection. /cc: @mconnew @roncain @zhenlan @huanwu 10595 area-Serialization [ReflectionBasedXmlSerializer] Enable Reflection Serialization in Net Native. 10596 area-Infrastructure Update SNI package used for testing SqlClient The sqlclient src package uses the last stable version of the runtime sni package, so I updated the hard-coded SNI versions used in testing to be the latest prerelease version. This way we're actually testing the latest SNI version that we're publishing. I also updated the ExternalPackages props to be correct for clrcompression and updated them for the new SNI package. @jhendrixMSFT @chcosta 10597 area-System.Data System.Data.SqlClient depends on the stable SNI package The beta meta SNI package (runtime.native.system.data.sqlclient.sni) depends directly on the stable RID specific SNI packages, when it should depend on Microsoft.Net.Core.Targets like runtime.native.system.io.compression does. This is an issue because System.Data.SqlClient depends on the stable version of the SNI package which is fixed to depend on the stable SNI package: ``` System.Data.SqlClient/latest => runtime.native.system.data.sqlclient.sni/stable => runtime.win7-x86.system.data.sqlclient.sni/stable System.Data.SqlClient/latest => runtime.native.system.data.sqlclient.sni/stable => runtime.win7-x64.system.data.sqlclient.sni/stable ``` So this means we're not testing the latest/prerelease/beta versions of SNI anywhere. This has the potential to cause some confusion or late-testing errors when we snap to the next stable version and we're all of a sudden testing any changes made to SNI since the previous stable version. It'd be nice to have SNI follow the native asset pattern set by the other packages (HTTP, compression, Security) to avoid potential confusion, so it would look like this instead: ``` System.Data.SqlClient/latest => runtime.native.system.data.sqlclient.sni/stable => Microsoft.Netcore.Targets/stable => (restoration uses the latest targets package) => runtime.win7-x86.system.data.sqlclient.sni/latest System.Data.SqlClient/latest => runtime.native.system.data.sqlclient.sni/stable => Microsoft.Netcore.Targets/stable => (restoration ues the latest targets package) => runtime.win7-x64.system.data.sqlclient.sni/latest System.Data.SqlClient/latest => runtime.native.system.data.sqlclient.sni/stable => Microsoft.Netcore.Targets/stable => (restoration uses the latest targets package) => runtime.win10-arm64.system.data.sqlclient.sni/latest ``` I've worked around this for now by explicitly adding the latest SNI version to the project.json for the SqlClient tests: https://github.com/dotnet/corefx/pull/10596, but that's not an ideal solution since the product is still using the stable SNI and we're just overwriting it when testing. @ericstj @weshaggard @mellinoe 10600 area-System.Net System.Net.* Tests require special compilation rules because of System.Net.Internals System.Net.\* Tests utilizes an internal namespace, System.Net.Internals. Certain NETStandard.Library dependencies like System.Net.Sockets need to be excluded from compile (they are a dependency of xunit rtm). 10603 area-System.Reflection Test failure for System.Reflection.Metadata on ARM. Three tests fail. ``` Starting: System.Reflection.Metadata.Tests System.Reflection.Metadata.Ecma335.Tests.InstructionEncoderTests.LoadConstantR8 [FAIL] System.DataMisalignedException : A datatype misalignment was detected in a load or store instruction. Stack Trace: at System.Reflection.BlobUtilities.WriteDouble(Byte[] buffer, Int32 start, Double value) at System.Reflection.Metadata.Ecma335.Tests.InstructionEncoderTests.LoadConstantR8() System.Reflection.Metadata.Ecma335.Tests.InstructionEncoderTests.LoadConstantR4 [FAIL] System.DataMisalignedException : A datatype misalignment was detected in a load or store instruction. Stack Trace: at System.Reflection.BlobUtilities.WriteSingle(Byte[] buffer, Int32 start, Single value) at System.Reflection.Metadata.Ecma335.Tests.InstructionEncoderTests.LoadConstantR4() System.Reflection.Metadata.Decoding.Tests.CustomAttributeDecoderTests.TestCustomAttributeDecoder [FAIL] System.DataMisalignedException : A datatype misalignment was detected in a load or store instruction. Stack Trace: at System.Reflection.Metadata.Ecma335.CustomAttributeDecoder`1.DecodeArgument(BlobReader& valueReader, ArgumentTypeInfo info) at System.Reflection.Metadata.Ecma335.CustomAttributeDecoder`1.DecodeFixedArguments(BlobReader& signatureReader, BlobReader& valueReader, Int32 count) at System.Reflection.Metadata.Ecma335.CustomAttributeDecoder`1.DecodeValue(EntityHandle constructor, BlobHandle value) at System.Reflection.Metadata.Decoding.Tests.CustomAttributeDecoderTests.TestCustomAttributeDecoder() Finished: System.Reflection.Metadata.Tests === TEST EXECUTION SUMMARY === System.Reflection.Metadata.Tests Total: 421, Errors: 0, Failed: 3, Skipped: 0, Time: 14.782s Finished running tests. End time=13:54:35. Return value was 3 ``` Target: RASP3, Ubuntu Mate 16.04, ARM CoreCLR - Debug & Release - Commit: 2b191fa038802f22451640b3eac13cf87355e643 CoreFx - Debug & Release - Commit: 79a924855514877f5b8e8379e553e8b98293a30f 10606 area-System.ComponentModel Potential issue with RegularExpressionAttribute and differing regex flavors client vs. server side "The System.ComponentModel.DataAnnotations.RegularExpressionAttribute is used for client side runtime value checking in ASP.NET Core websites.\* The client side validation is run via jquery.validation.* JavaScript and .Net (Core) use different RegEx engines with different flavors, though, and for example named capturing groups, working as ""`(?regex)`"" in C# code, will _not_ work on the javascript side. This leads to validation silently not taking place on client-side, there's neither an error during compilation of the C# code nor during execution in browser (took me some minutes to figure out what was going on…). It would be nice if there was either some kind of warning, or—even nicer but a lot harder to manage—an automatic transformation step that makes C# side regexes work even when they're used in the definition for the client side validation, so you don't have to keep the regex around in 2 flavors (for client and server side validation). *as per https://docs.asp.net/en/latest/tutorials/first-mvc-app/validation.html " 10610 area-Infrastructure Cannot Build For FreeBSD "While trying to follow the directions here: https://github.com/dotnet/coreclr/blob/master/Documentation/building/freebsd-instructions.md I keep getting the same error Building .NET Core on FreeBSD 10.1 and this is the second install of FreeBSD I've seen this with so far. Here is the console output I am getting: root@sawzall:/usr/home/jbennett/git/corefx # ./build-packages.sh Unsupported OS 'FreeBSD' detected. Downloading ubuntu-x64 tools. Installing dotnet cli... Restoring BuildTools version 1.0.26-prerelease-00704-01... ELF binary type ""0"" not known. /usr/home/jbennett/git/corefx/init-tools.sh: line 78: /usr/home/jbennett/git/corefx/Tools/dotnetcli/dotnet: cannot execute binary file: Exec format error ERROR: Could not restore build tools correctly. See '/usr/home/jbennett/git/corefx/init-tools.log' for more details. Initializing BuildTools... /usr/home/jbennett/git/corefx/init-tools.sh: line 84: /usr/home/jbennett/git/corefx/packages/Microsoft.DotNet.BuildTools/1.0.26-prerelease-00704-01/lib/init-tools.sh: No such file or directory ERROR: An error occured when trying to initialize the tools. Please check '/usr/home/jbennett/git/corefx/init-tools.log' for more details. Obviously, my FreeBSD 10.1 install can't run Linux 64-bit binaries here so I am wondering how would I get this to build without the tools? " 10621 area-System.Security [dev/cms_unix] Data corruption bug on round trip in EnvelopedCms for Unix Currently test DecryptTests.Decrypt_EnvelopedWithinEnveloped fails in the round trip with a data corruption. When the message gets encrypted and decrypted, the output message is the same with the exception of one byte that gets inserted. Behaviors observed - The inserted byte is always the same and in the same position if the test is run several times. It seems that the introduced is a 0x0D in place of the 154th byte. (The inserted byte could also be 0xD0, but it's unlikely as it wouldn't be byte aligned, but given that the insertion looks like ...760A9AE94... to ...760D0A9AE94... it is hard to determine which of the two was inserted and as I haven't been able to reproduce the error with any other message there's no easy way of determining it). This hints it could be a padding error. - If trailing bytes are deleted from the message, the insertion is kept consistent, both the byte inserted and the offset. - If bytes are deleted from the start of the sequence, the inserted byte is consistent but it shifts back by the number of bytes deleted from the message. - It seems like it has nothing to do with block or length as a random message of the same length could be encrypted and decrypted correctly. - There are tests trying to encrypt longer and shorted messages so it continues to seem unlikely to be a length/alignment problem. Still have to try: - Changing certificate used - Changing cipher 10629 area-System.Net HttpClient: Use string.Concat over string.Format `Concat` is cheaper than `Format` (~2x faster in 1,000,000 iteration microbenchmark on x64). 10631 area-System.Net HttpClient: Faster whitespace detection and remove internal dead code Two commits (preferably merged as separate commits): 1. **Faster whitespace detection**: Instead of allocating a List with the four allowed whitespace chars and searching the list, just check if the char is one of the four values. ~6-7x improvement in 1,000,000 iteration microbenchmark. 2. **Remove internal dead code**: Remove dead code and namespace import cleanup. 10632 area-System.Net Make HttpKnownHeaderNames public Any reason why it's internal? Perhaps it's all the unsafe stuff going on at _HttpKnownHeaderNames.TryGetHeaderName.cs_ but at least the constants could be factored out and exposed - they can be very useful. See for example: http://stackoverflow.com/questions/11037004/asp-mvc-are-there-any-constants-for-the-default-http-headers. 10633 area-System.Data Instrument ADO.NET/System.Data with EventCounters (replacement for PerformanceCounters) In .NET Framework ADO.NET publishes performance counters; these have been removed in .NET Core because they're not cross-platform. There are several conversations about bringing back some form of cross-platform performance counters, see #4577, #7833, probably based on EventCounter. This also needs to happen for ADO.NET. 10649 area-System.Net WebProxy implementaion I was making use of the WebProxy contructor- WebProxy(String, Int32). Could you tell me how to substitute for this? @davidsh Thanks 10651 area-Infrastructure Updating CoreClr dependencies to servicing-24408-03 /cc @dotnet/corefx-contrib 10654 area-Infrastructure Typo NodoReuse introduced with new build workflow "See build-\* cmd files in CoreFX and Config.json. There is a property defined named ""MsBuildNodoReuse"" and the build scripts are hard coding nodoReuse parameters as well. @maririos " 10656 area-System.Xml Support System.Xml.Schema.XmlSchema and Related APIs In CoreCLR currently there is only a place-holder for XmlSchema type. https://github.com/dotnet/corefx/issues/10573 is being blocked by the issue. 10663 area-Infrastructure Updating External dependencies to servicing-24409-00 /cc @dotnet/corefx-contrib 10666 area-Infrastructure Modifying corefx projects in Visual Studio is slow and hangs Whenever I move, rename, delete or create a new file in any project in corefx (e.g. src/System.Reflection/tests/System.Reflection.Tests.csproj) VS, updated to the latest Community version, hangs on PC for about 30 seconds to a minute the second I complete that action. During this time, I can't click, type or use VS. Its the sort of weird issue that doesn't bother you very much the first couple of times, but after months of VS hanging every time I modify the csproj file, things can get annoying. I think the issue may be that VS is running `dotnet restore` every time, as I noticed in Task Manager that a `dotnet.exe` process spawns during the hang, and when VS stops hanging, the process is gone. 10668 area-System.Numerics Fix poor hash function in System.Numerics #1509 Replace hash function for Vector (Inspired by OpenJDK). Add functional and performance tests, that show improvements. Fixes #1509 10673 area-Infrastructure Updating CoreClr dependencies to servicing-24409-01 /cc @dotnet/corefx-contrib 10675 area-Serialization [ReflectionBasedXmlSerializer] GenerateMembersElement is not Impelmented `ReflectionXmlSerializationReader.GenerateMembersElement` and `ReflectionXmlSerializationWriter.WriteMembersElement` throw NotImplementedException. We should implement these two methods. WCF is the major customer of the methods as WCF uses XmlReflectionImporter.ImportMembersMapping and generates special serializers for OperationContracts. 10676 area-Serialization [ReflectionBasedXmlSerializer] To Support SOAP Serialization As all SOAP relates APIs are not in CoreCLR yet, the reflection based method currently throws PlatformNotSupportedException when types require SOAP serialization. 10677 area-Infrastructure Enable daily builds for arm64 @gkhanna79 @Priya91 10681 area-Infrastructure Updating CoreClr dependencies to stable /cc @dotnet/corefx-contrib 10685 area-System.Diagnostics [ExcludeFromCodeCoverage] is marked as internal The ExcludeFromCodeCoverage attribute is marked as internal. This is more than likely intended (It's also internal in the PCL) but it's public in all other versions of the .Net framework. This attribute is as useful for user code as I'm sure it is in the framework's codebase. Is there a particular design reason this was marked as internal? Is there an alternative I'm not aware of? If not, can it be made public? 10686 area-Microsoft.CSharp Use dynamic function call with .NET core 1.0 RTM "Hi, I tried to do the following with .NET Core RTM: this.AsDynamic().Apply(@event); ((dynamic)this).Apply(@event); <-- Or this syntax (Same meaning?!) This didn't compile by default. I found out how to solve it, with adding the dependency: ""Microsoft.CSharp"": ""4.0.1"" The project compiles, but if I look at the dependency list of it, it's huge! It has 17 dependencies just for using dynamic (Just used once in the project at all) that's a high price. Is there a ""cheaper"" dependency which I can add to use dynamic? Maybe one or two of the 17? Kind regards Christian " 10688 area-System.Xml Remove unnecessary P2P references relating to xml contracts when merging #10672 , we introduced a lot of P2P references, since it was required for some libraries that depended on un-published packages. This issue is to track the work to remove all those. 10692 area-System.Runtime [Proposal] Add Enum.IsDefined() method So rather than doing this: ``` csharp string DoTheThing(MyEnum argument) { if (!Enum.IsDefined(typeof(MyEnum), argument)) { Log.Warn(...); return String.Empty; } return argument.ToString(); } ``` You can do this: ``` csharp string DoTheThing(MyEnum argument) { if (!argument.IsDefined()) { Log.Warn(...); return String.Empty; } return argument.ToString(); } ``` `Enum.IsDefined(typeof(MyEnum), argument)` is also quite slow as it needs to do lots of conversion checks etc; whereas if you already have the enum these don't need to be done. e.g. https://github.com/dotnet/corefx/blob/master/src/System.Private.Uri/src/System/UriExt.cs#L19-L24 Suggested change https://github.com/dotnet/coreclr/pull/6687 /cc @terrajobst 10694 area-System.Security Recommended way to determine when code is running on a FIPS compliant machine (desktop & coreclr)? I'm currently working on a `SHA256.Create()` implementation that works on CoreCLR and net451 FIPS compliant machines. I'm currently using try catch statements to work around net451's invalid `SHA256.Create` behavior to determine FIPS compliance but was wondering if there was a better route that worked on both desktop and coreclr? 10695 area-System.Globalization How to get DateTimeFormatInfo Time and Date separators? In .NET there are `DateSeparator` and `TimeSeparator` properties, but I can't find them in .NET Core. Were they removed or moved to a different class? I need to make ``` C# string.Join(info.TimeSeparator, array); ``` 10698 area-System.IO Add positive tests for FileStream begin/end 10702 area-System.Net System.Net test intermittent failures few test cases are marked with `[ActiveIssue(10702)]` (pending work - i need to have an issue number to mark it :smile:) http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/dev_api/job/windows_nt_release_prtest/324/ http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/dev_api/job/windows_nt_debug_prtest/329/ Happened in here: https://github.com/dotnet/corefx/pull/10693 10706 area-System.Data Missing SqlDataAdapter I noticed today that the DataTable class exists in System.Data in .NET Core, but it also seems that there is no SqlDataAdapter, so there is no way to read the data in to the DataTable 10709 area-System.Security System.Security.Cryptography.Csp error on UWP Hi A user of my library is getting an error when installing the library on NuGet. My library is netstandard1.3. He is the error: ``` System.Security.Cryptography.Csp 4.0.0 provides a compile-time reference assembly for System.Security.Cryptography.Csp on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm. ``` https://github.com/JamesNK/Newtonsoft.Json.Schema/issues/43 10712 area-System.IO `readdir_r` is deprecated in glibc 2.24 Hello, The `pal_io.cpp` file in `System.Native` is using a newly deprecated function `readdir_r` which makes the sources not compile for me, with the following error message: ``` ==> Starting build()... Detected Linux x86_64 /home/jaen/.cache/pacaur/dotnet-cli/src/corefx-1.0.0/src/Native/System.Native/pal_io.cpp:344:17: error: 'readdir_r' is deprecated [-Werror,-Wdeprecated-declarations] int error = readdir_r(dir, entry, &result); ^ /usr/include/dirent.h:183:12: note: 'readdir_r' has been explicitly marked deprecated here extern int readdir_r (DIR *__restrict __dirp, ^ 1 error generated. make[2]: *** [System.Native/CMakeFiles/System.Native-Static.dir/build.make:135: System.Native/CMakeFiles/System.Native-Static.dir/pal_io.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... /home/jaen/.cache/pacaur/dotnet-cli/src/corefx-1.0.0/src/Native/System.Native/pal_io.cpp:344:17: error: 'readdir_r' is deprecated [-Werror,-Wdeprecated-declarations] int error = readdir_r(dir, entry, &result); ^ /usr/include/dirent.h:183:12: note: 'readdir_r' has been explicitly marked deprecated here extern int readdir_r (DIR *__restrict __dirp, ^ 1 error generated. make[2]: *** [System.Native/CMakeFiles/System.Native.dir/build.make:135: System.Native/CMakeFiles/System.Native.dir/pal_io.cpp.o] Error 1 ``` Are there any plans to update this file for it to build with new glibc? 10713 area-System.Runtime DateTime.Parse throws TypeInitializationException, depends on System.Runtime.InteropServices.PInvoke "The following code: ``` using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Globalization; namespace DateTimeError { [TestClass] public class Class1 { [TestMethod] public void Test() { DateTime.Parse(""2015-11-20T10:08:01Z"", CultureInfo.CurrentCulture, DateTimeStyles.None); } } } ``` results in this error ``` Test method DateTimeError.Class1.Test threw exception: System.TypeInitializationException: The type initializer for 'System.Runtime.Versioning.BinaryCompatibility' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.InteropServices.PInvoke, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. Stack Trace: at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) at System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit) at System.AppDomain.GetTargetFrameworkName() at System.Runtime.Versioning.BinaryCompatibility.ReadTargetFrameworkId() at System.Runtime.Versioning.BinaryCompatibility.get_AppWasBuiltForFramework() at System.Runtime.Versioning.BinaryCompatibility.BinaryCompatibilityMap..ctor() at System.Runtime.Versioning.BinaryCompatibility..cctor() --- End of inner exception stack trace --- at System.Globalization.DateTimeFormatInfo.InsertHash(TokenHashValue[] hashTable, String str, TokenType tokenType, Int32 tokenValue) at System.Globalization.DateTimeFormatInfo.AddMonthNames(TokenHashValue[] temp, String monthPostfix) at System.Globalization.DateTimeFormatInfo.CreateTokenHashTable() at System.Globalization.DateTimeFormatInfo.Tokenize(TokenType TokenMask, TokenType& tokenType, Int32& tokenValue, __DTString& str) at System.__DTString.GetSeparatorToken(DateTimeFormatInfo dtfi, Int32& indexBeforeSeparator, Char& charBeforeSeparator) at System.DateTimeParse.Lex(DS dps, __DTString& str, DateTimeToken& dtok, DateTimeRawInfo& raw, DateTimeResult& result, DateTimeFormatInfo& dtfi, DateTimeStyles styles) at System.DateTimeParse.TryParse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles, DateTimeResult& result) at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) at DateTimeError.Class1.Test() in C:\Users\FrederikCarlier\Documents\Visual Studio 2015\Projects\DateTimeError\Class1.cs:line 22 ``` when running in the context of mstest. The attached .zip file includes the full source code. You can find sporadic mentions of other hitting this issue, e.g. https://connect.microsoft.com/VisualStudio/feedback/details/2952488/unable-to-call-datetime-parse-from-within-a-net-core-app-1-0-test-project . You also hit this issue when deserializing JSON that contains a DateTime value. [DateTimeError.zip](https://github.com/dotnet/corefx/files/413418/DateTimeError.zip) " 10714 area-System.Runtime System.Runtime.Serialization.Formatters: Cleanup after merging Serialization PR in dev/api PR #10667 added Serialization back to Core. It came with a lot of ToDo's so this issue is to track those and make sure they get done.They are: - [x] Use SR instead of hard-coded strings once it is available in System.Runtime. - [x] Uncomment Debug.Asserts once it is available in System.Runtime - SerializationInfo was moved to coreclr - [x] Remove P2P references once corefx versions are updated. - [ ] Remove [temporary workaround](https://github.com/dotnet/corefx/pull/10667/files#diff-340897543d74ba6c30ea455b13aace92R1628) in ObjectManager.cs 10716 area-System.Net Cross compile System.Net.Http for Desktop "This is the first part at fixing #9846 and #9884. This PR changes the compilation of System.Net.Http for NET46 target so that it builds as a ""normal"" .NET Framework assembly by using assembly references for mscorlib.dll, system.dll, etc. " 10719 area-Infrastructure Building a corefx source or test project restores packages every time "Whenever I build a corefx source or test project that I've built before, the majority of the build time is spent in the ""RestorePackages"" target. It seems that the build system doesn't recognise that I have already restored all the packages. This increases build times significantly, and is unecessary. Is this by design and unavoidable? " 10720 area-System.Globalization System/Globalization IdnMapping, check if string is ASCII first before calling Interop? Hello, my name is Justin, current intern on the ASP.NET team. I noticed that calls to IdnMapping.GetAscii always called Interop.mincore.IdnToAscii, which can be a bit pricey because you are pinvoking. I was wondering if we could have a quick ASCII check (iterate through all characters and check the highest order bit) and only convert to puny code if it isn't ASCII? I currently implemented something similar in ASP.NET to avoid calling GetAscii, but it is more appropriate to be here. Specifically: https://github.com/dotnet/corefx/blob/master/src/Common/src/System/Globalization/IdnMapping.cs#L72 10727 area-System.Net [Question] Configure HTTP connections in CoreCLR (ServicePoint/ServicePointManager Properties) Hi, Would you please provide some information on the .NetCore's suggested approach to configure the connection properties which used to be provided through ServicePoint/ServicePointManager in .Net Framework, such as > UseNagleAlgorithm? Thanks! cc: @davidsh 10732 area-System.Net Add TLS system default SslStream overloads and hashing algorithm enum values This is tracking the addition of new API surface to SslStream: 1. Support for TLS system defaults (new overloads) 2. SHA256, SHA384 and SHA512 enum values 10739 area-System.Net Why doesn't HttpResponseMessage.Headers contain the values within HttpResponseMessage.Content.Headers? Whilst using HttpClient today it took me 45 minutes to realise the Content headers are not in the HttpResponseMessage.Headers but exist elsewhere. I have no clue why it's designed like this but if I look at response.Headers I expect to see ALL headers. 10744 area-Serialization [dev/api] Fix XmlSerializer tests for netcore50aot Make sure the XmlSerializer tests compile and pass for `/p:TargetGroup=netcore50aot` **EDIT**: Also make sure that we re-add the cross compilation for the implementation of XmlSerializer that was removed on 4833cbf3df34f63dddc2c0b9d254a62887964abe 10747 area-Meta SharedLibrary libs on netcore50 don't use the latest code I'm writing an UWP app which depends on a Profile111 PCL that uses `System.Linq.Expressions`, particularly the `Expression.IsTrue/IsFalse` methods, which means I need the fix from #3227 to avoid a crash. I'm new to .NET Core stuff, but from what I've read it seems like I should only need to reference the newest possible `System.Linq.Expressions` package, e.g. `4.1.1-beta-24412-03`, which should contain the fix. But doing that changes nothing; my app still crashes. So I looked at the contents of the package with ildasm, and it appears that the `netcore50` version doesn't contain the fix (looking at the contents of `System.Linq.Expressions.Interpreter.LightCompiler::CompileUnaryExpression`), while the `netstandard1.6` version does, and UWP is using the former. Is this expected, and if so, how can I get a fixed version of that package in an UWP app? 10749 area-System.Security Add time-constant equals and other utility methods to System.Security In applications sensitive to side-channel timing attacks, a constant time equality check can be used instead of a normal short-circuiting String.Equals (or similar for byte[], etc.). This is functionality often duplicated by application developers, copied and pasted from StackOverflow and what not. This is easy to subtly get wrong, and probably belongs somewhere in System.Security. We can see an example of this already implemented in an internal .NET class: [Microsoft.AspNetCore.Cryptography.Internal](https://github.com/aspnet/DataProtection/blob/dev/src/Microsoft.AspNetCore.Cryptography.Internal/CryptoUtil.cs#L90), but this isn't really the best place for it 😃 --- Edited by @bartonjs to match what was approved: ```csharp namespace System.Security.Cryptography { // new type in System.Security.Cryptography.Primitives.dll public static class CryptographicOperations { public static bool FixedTimeEquals(ReadOnlySpan left, ReadOnlySpan right); public static void ZeroMemory(Span span); } // Existing type in System.Security.Cryptography.Algorithms.dll public abstract class RandomNumberGenerator { public static void Fill(Span data); } } ``` 10752 area-System.Collections Collection and ObservableCollection do not support ranges "Let's keep the final speclet at the top for easier search # Speclet (Updated 9/23/2016) ## Scope Modernize `Collection` and `ObservableCollection` by allowing them to handle operations against multiple items simultaneously. ## Rationale The `ObservableCollection` is a critical collection when it comes to XAML-based development, though it can also be useful when building API client libraries as well. Because it implements `INotifyPropertyChanged` and `INotifyCollectionChanged`, nearly every XAML app in existence uses some form of this collection to bind a set of objects against UI. However, this class has some shortcomings. Namely, it cannot currently handle adding or removing multiple objects in a single call. Because of that, it also cannot manipulate the collection in such a way that the `PropertyChanged` events are raised at the very end of the operation. Consider the following situation: - You have a XAML app that accesses an API. - That API call returns 25 objects that need to be bound to the UI. - In order to get the data displayed into the UI, you likely have to cycle through the results, and add them one at a time to the ObservableCollection. - This has the side-effect of firing the `CollectionChanged` event 25 times. If you are also using that event to do other processing on incoming items, then those events are firing 25 times too. This can get very expensive, very quickly. - Additionally, that event will have `ChangedItems` Lists that will only ever have 0 or 1 objects in them. That is... not ideal. This behavior is unnecessary, especially considering that `NotifyCollectionChangedEventArgs` already has the components necessary to handle firing the event once for multiple items, but that capability is presently not being used at all. Implementing this properly would allow for better performance in these types of apps, and would negate the need for the plethora of replacements out there ([here](http://blog.ddeysel.com/technicals/introducing-the-awesome-observable-collection/), [here](http://tliangnet.blogspot.com/2013/04/observablecollection-performance-issue.html), and [here](https://github.com/Windows-XAML/Template10/blob/master/Template10%20%28Library%29/Utils/IEnumerableUtils.cs#L34-L45), for example). ## Usage Given the above scenario as an example, usage would look like this pseudocode: ``` cs var observable = new ObservableCollection(); var client = new HttpClient(); var result = client.GetStringAsync(""http://someapi.com/someobject""); var results = JsonConvert.DeserializeObject(result); observable.AddRange(results); ``` ## Implementation This is not the complete implementation, because other `*Range` functionality would need to be implemented as well. You can see the start of this work in PR #10751 ``` cs // Adds a range to the end of the collection. // Raises CollectionChanged (NotifyCollectionChangedAction.Add) public void AddRange(IEnumerable collection) // Inserts a range // Raises CollectionChanged (NotifyCollectionChangedAction.Add) public void InsertRange(int index, IEnumerable collection); // Removes a range. // Raises CollectionChanged (NotifyCollectionChangedAction.Remove) public void RemoveRange(int index, int count); // Will allow to replace a range with fewer, equal, or more items. // Raises CollectionChanged (NotifyCollectionChangedAction.Replace) public void ReplaceRange(int index, int count, IEnumerable collection); // Removes any item that matches the search criteria. // Raises CollectionChanged (NotifyCollectionChangedAction.Remove) // RWM: Excluded for now, will see if possible to add back in after implementation and testing. // public int RemoveAll(Predicate match); ``` ## Obstacles Doing this properly, and having the methods intuitively named, could potentially have the side effect of breaking existing classes that inherit from `ObservableCollection` to solve this problem. A good way to test this would be to make the change, compile something like Template10 against this new assembly, and see if it breaks. --- So the `ObservableCollection` is one of the cornerstones of software development, not just in Windows, but on the web. One issue that comes up constantly is that, while the `OnCollectionChanged` event has a structure and constructors that support signaling the change for multiple items being added, the `ObservableCollection` does not have a method to support this. If you look at the web as an example, Knockout has a way to be able to add multiple items to the collection, but not signal the change until the very end. The `ObservableCollection` needs the same functionality, but does not have it. If you look at other extension methods to solve this problem, like the one in [Template10](https://github.com/Windows-XAML/Template10/blob/master/Template10%20%28Library%29/Utils/IEnumerableUtils.cs#L34-L45), they let you add multiple items, but do not solve the signaling problem. That's because the `ObservableCollection.InsertItem()` method overrides `Collection.InsertItem()`, and all of the other methods are private. So the only way to fix this properly is in the `ObservableCollection` itself. I'm proposing an ""AddRange"" function that accepts an existing collection as input, optionally clears the collection before adding, and then throws the `OnCollectionChanging` event AFTER all the objects have been added. I have already implemented this in a PR #10751 so you can see what the implementation would look like. I look forward to your feedback. Thanks! " 10760 area-System.Security Exception thrown when trying to encrypt an EnvelopedCms with a Diffie-Hellman certificate if it uses AES as the symmetric cipher Currently, the only test that there is using a Diffie-Hellman certificate for encryption is using the default cipher, Triple DES CBC. However, if the cipher used is changed to any of the AES variants, the Windows implementation throws Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The parameter is incorrect. within method Internal.Cryptography.Pal.Windows.PkcsPalWindows.EncodeHelpers.CreateCryptMsgHandleToEncode 10764 area-System.Net TryGetAddrInfo_HostName_TryGetNameInfo test failing on Linux ``` System.Net.NameResolution.PalTests.NameResolutionPalTests.TryGetAddrInfo_HostName_TryGetNameInfo [FAIL] Assert.Equal() Failure Expected: Success Actual: HostNotFound Stack Trace: at System.Net.NameResolution.PalTests.NameResolutionPalTests.TryGetAddrInfo_HostName_TryGetNameInfo() ``` ``` 10769 area-System.Net Test failure: System.Net.NetworkInformation.Tests.NetworkInterfaceBasicTest/BasicTest_AccessInstanceProperties_NoExceptions_Linux Opened on behalf of @jiangzeng The test `System.Net.NetworkInformation.Tests.NetworkInterfaceBasicTest/BasicTest_AccessInstanceProperties_NoExceptions_Linux` has failed. ``` Assert.InRange() Failure\r Range: (0 - 9223372036854775807)\r Actual: -1 ``` Stack Trace: ``` at System.Net.NetworkInformation.Tests.NetworkInterfaceBasicTest.BasicTest_AccessInstanceProperties_NoExceptions_Linux() ``` Failing configurations: - Fedora.23.Amd64 - AnyCPU-Debug - AnyCPU-Release 10772 area-System.Numerics "Should add a ""Scale"" property to System.Numerics.Matrix4x4" (From #10758) ``` /// /// Gets or sets the scale component of this matrix. /// public Vector3 Scale { get { return new Vector3(M11, M22, M33); } set { M11 = value.X; M22 = value.Y; M33 = value.Z; } } ``` Thanks! 10773 area-System.Collections Test failure: System.Collections.Concurrent.Tests.BlockingCollectionTests/TestDebuggerAttributes Opened on behalf of @jiangzeng The test `System.Collections.Concurrent.Tests.BlockingCollectionTests/TestDebuggerAttributes` has failed. ``` System.InvalidOperationException : The API 'System.Collections.Concurrent.BlockingCollection`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].m_collection' cannot be used on the current platform. See http://go.microsoft.com/fwlink/?LinkId=248273 for more information. ``` Stack Trace: ``` at System.Reflection.RtFieldInfo.InternalGetValue(Object obj, StackCrawlMark& stackMark) at System.Reflection.RtFieldInfo.GetValue(Object obj) at System.Diagnostics.DebuggerAttributes.ValidateDebuggerDisplayReferences(Object obj) in D:\A\_work\1\s\src\Common\tests\System\Diagnostics\DebuggerAttributes.cs:line 122 at System.Collections.Concurrent.Tests.BlockingCollectionTests.TestDebuggerAttributes() in D:\A\_work\1\s\src\System.Collections.Concurrent\tests\BlockingCollectionTests.cs:line 176 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug 10775 area-System.Collections Test failure: System.Collections.Tests.SortedList_IDictionary_NonGeneric_Tests/CantAcceptDuplicateKeysFromSourceDictionary Opened on behalf of @jiangzeng The test `System.Collections.Tests.SortedList_IDictionary_NonGeneric_Tests/CantAcceptDuplicateKeysFromSourceDictionary` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.ArgumentException)\r Actual: (No exception was thrown) ``` Stack Trace: Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Note: `System.Collections.Tests.SortedList_IDictionary_NonGeneric_Tests/IDictionary_NonGeneric_ItemSet_KeyOfWrongType` has failed with the same issue. 10776 area-System.Collections Test failure: System.Collections.Tests.BitArray_GetSetTests/CopyTo_Type_Invalid Opened on behalf of @jiangzeng The test `System.Collections.Tests.BitArray_GetSetTests/CopyTo_Type_Invalid` has failed. ``` Assert.Equal() Failure\r Expected: array\r Actual: (null) ``` Stack Trace: ``` at System.Collections.Tests.BitArray_GetSetTests.CopyTo_Type_Invalid() in D:\A\_work\1\s\src\System.Collections\tests\BitArray\BitArray_GetSetTests.cs:line 277 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug 10777 area-System.ComponentModel Test failure: System.ComponentModel.Primitives.Tests.CategoryAttributeTests/CategoryNames Opened on behalf of @jiangzeng The test `System.ComponentModel.Primitives.Tests.CategoryAttributeTests/CategoryNames` has failed. ``` Assert.Equal() Failure\r ? (pos 0)\r Expected: Misc\r Actual: Default\r ? (pos 0) ``` Stack Trace: ``` at System.ComponentModel.Primitives.Tests.CategoryAttributeTests.CategoryNames(CategoryAttribute attribute, String name) in D:\A\_work\1\s\src\System.ComponentModel.Primitives\tests\CategoryAttributeTests.cs:line 38 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug 10780 area-System.Data Test failure: System.Data.SqlClient.Tests.ExceptionTest/IndependentConnectionExceptionTestExecuteReader Opened on behalf of @jiangzeng The test `System.Data.SqlClient.Tests.ExceptionTest/IndependentConnectionExceptionTestExecuteReader` has failed. `System.Data.SqlClient.Tests.ExceptionTest/VariousExceptionTests` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.InvalidOperationException)\r Actual: typeof(System.ArgumentNullException): Value cannot be null.\r Parameter name: format ``` Stack Trace: ``` at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args) at System.String.Format(String format, Object[] args) at System.Data.Common.ADP.OpenConnectionRequired(String method, ConnectionState state) in D:\A\_work\1\s\src\System.Data.SqlClient\src\System\Data\Common\AdapterUtil.cs:line 517 at System.Data.SqlClient.SqlCommand.ValidateCommand(Boolean async, String method) in D:\A\_work\1\s\src\System.Data.SqlClient\src\System\Data\SqlClient\SqlCommand.cs:line 2329 at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite, String method) in D:\A\_work\1\s\src\System.Data.SqlClient\src\System\Data\SqlClient\SqlCommand.cs:line 1959 at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) in D:\A\_work\1\s\src\System.Data.SqlClient\src\System\Data\SqlClient\SqlCommand.cs:line 1358 at System.Data.SqlClient.SqlCommand.ExecuteReader() in D:\A\_work\1\s\src\System.Data.SqlClient\src\System\Data\SqlClient\SqlCommand.cs:line 1331 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug 10781 area-System.Data "Test failure: System.Data.SqlClient.Tests with ""System.IO.FileNotFoundException""" Opened on behalf of @jiangzeng The test `System.Data.SqlClient.Tests.ExceptionTest/ExceptionTests` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.Data.SqlClient.SqlException)\r Actual: typeof(System.IO.FileNotFoundException): Could not load file or assembly 'System.Threading.Thread, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. ``` Stack Trace: ``` at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) in D:\A\_work\1\s\src\System.Data.SqlClient\src\System\Data\ProviderBase\DbConnectionInternal.cs:line 452 at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) in D:\A\_work\1\s\src\System.Data.SqlClient\src\System\Data\SqlClient\SqlConnection.cs:line 1020 at System.Data.SqlClient.SqlConnection.Open() in D:\A\_work\1\s\src\System.Data.SqlClient\src\System\Data\SqlClient\SqlConnection.cs:line 585 at System.Data.SqlClient.Tests.ExceptionTest.GenerateConnectionException(String connectionString) in D:\A\_work\1\s\src\System.Data.SqlClient\tests\FunctionalTests\ExceptionTest.cs:line 84 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Also fail with the following tests: ExceptionTests IndependentConnectionExceptionTestOpenConnection CopyTo_NonGeneric_Success CopyTo_NonGeneric_Throws CopyTo_Success CopyTo_Throws GetEnumerator_Success Indexer_Success Indexer_Throws IsSynchronized_Success SyncRoot_Success 10783 area-System.Diagnostics Test failure: System.Diagnostics.Tests.FileVersionInfoTest/FileVersionInfo_Chinese Opened on behalf of @jiangzeng The test `System.Diagnostics.Tests.FileVersionInfoTest/FileVersionInfo_Chinese` has failed. ``` Assert.Equal() Failure\r Expected: \r Actual: (null) ``` Stack Trace: ``` at System.Diagnostics.Tests.FileVersionInfoTest.VerifyVersionInfo(String filePath, MyFVI expected) in D:\A\_work\1\s\src\System.Diagnostics.FileVersionInfo\tests\System.Diagnostics.FileVersionInfo.Tests\FileVersionInfoTest.cs:line 224 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Also fail for the following tests: FileVersionInfo_Chinese FileVersionInfo_DifferentFileVersionAndProductVersion FileVersionInfo_Normal 10784 area-System.Diagnostics "Test failure: System.Diagnostics.TextWriterTraceListenerTests.DelimiterWriteMethodTests with ""System.UnauthorizedAccessException""" Opened on behalf of @jiangzeng The test `System.Diagnostics.TextWriterTraceListenerTests.DelimiterWriteMethodTests/TraceData_ObjectArray_Test` has failed. ``` System.UnauthorizedAccessException : Access to the path 'C:\Users\DotNetTestRunner\AppData\Local\Temp\4e5tqjd2.tg4\DelimiterWriteMethodTests.xml' is denied. ``` Stack Trace: ``` at System.IO.Win32FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) at System.IO.Win32FileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access) at System.Diagnostics.TextWriterTraceListenerTests.DelimiterWriteMethodTests..ctor() in D:\A\_work\1\s\src\System.Diagnostics.TextWriterTraceListener\tests\DelimiterWriteMethodTests.cs:line 20 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Tests following also failed: TraceData_ObjectArray_Test TraceData_Object_Test TraceEvent_FormatString_Test TraceEvent_String_Test TestFlush TestWrite TestWriteAfterDisposeShouldNotThrow TestWriteLine TestWriterPropery 10785 area-System.Globalization Test failure: System.Globalization.Tests.CalendarHelpers/GetDaysInMonth_Invalid Opened on behalf of @jiangzeng The test `System.Globalization.Tests.CalendarHelpers/GetDaysInMonth_Invalid` has failed. ``` System.ArgumentOutOfRangeException : Non-negative number required.\r Parameter name: year ``` Stack Trace: ``` at System.Globalization.GregorianCalendarHelper.GetGregorianYear(Int32 year, Int32 era) at System.Globalization.EastAsianLunisolarCalendar.CheckYearRange(Int32 year, Int32 era) at System.Globalization.EastAsianLunisolarCalendar.GetMonthsInYear(Int32 year, Int32 era) at System.Globalization.Tests.CalendarHelpers.d__9.MoveNext() in D:\A\_work\1\s\src\System.Globalization.Calendars\tests\CalendarHelpers.cs:line 126 at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Test following also failed: GetDaysInMonth_Invalid IsLeapDay_Invalid IsLeapMonth_Invalid 10786 area-System.Globalization Test failure: System.Globalization.Tests.CalendarHelpers/GetEra_Invalid Opened on behalf of @jiangzeng The test `System.Globalization.Tests.CalendarHelpers/GetEra_Invalid` has failed. ``` System.TypeInitializationException : The type initializer for 'System.PlatformDetection' threw an exception.\r ---- System.ArgumentNullException : Value cannot be null.\r Parameter name: path1 ``` Stack Trace: ``` at System.Globalization.Tests.CalendarHelpers.GetEra_Invalid(Calendar calendar, DateTime dt) in D:\A\_work\1\s\src\System.Globalization.Calendars\tests\CalendarHelpers.cs:line 382 ----- Inner Stack Trace ----- at System.IO.Path.Combine(String path1, String path2) at System.PlatformDetection..cctor() in D:\A\_work\1\s\src\Common\tests\System\PlatformDetection.cs:line 19 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug 10787 area-System.IO "Test failure: System.IO.Compression.Tests.ZipFileTest_ConvenienceMethods with ""System.MissingMethodException""" Opened on behalf of @jiangzeng The test `System.IO.Compression.Tests.ZipFileTest_ConvenienceMethods/CreateEntryFromFileTest` has failed. ``` System.MissingMethodException : Method not found: 'System.IO.Compression.ZipArchive System.IO.Compression.ZipFile.Open(System.String, System.IO.Compression.ZipArchiveMode)'. ``` Stack Trace: ``` at System.IO.Compression.Tests.ZipFileTest_ConvenienceMethods.d__7.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) at System.IO.Compression.Tests.ZipFileTest_ConvenienceMethods.CreateEntryFromFileTest(Boolean withCompressionLevel) ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug The following tests also failed: CreateEntryFromFileTest CreateFromDirectoryNormal CreateFromDirectoryUnicodel CreatedEmptyDirectoriesRoundtrip CreatedEmptyRootDirectoryRoundtrips ExtractToDirectoryTest ExtractToDirectoryTest_Unicode ExtractToFileTest DirectoryEntryWithData FilesOutsideDirectory InvalidConstructors InvalidDates InvalidFiles InvalidInstanceMethods UnsupportedCompressionRoutine ReadStreamOps UpdateAddFile UpdateReadTwice 10796 area-System.Runtime [.NET 4.6.3] Return parameters not considered in Attribute.GetParentDefinition(ParameterInfo) Opening this to track integration into Netfx6.3 (the tags only work on corefx repo bugs.) Besides, I need a reminder to remove the ActiveIssue from the corefx regression test once the fix has wandered itself over into the packages. Original issue: https://github.com/dotnet/coreclr/issues/6600 The commit that fixed it: https://github.com/dotnet/coreclr/pull/6745 10797 area-Serialization DCS_ArrayOfSimpleType_PreserveObjectReferences_True Failed The following two tests throw `System.NotImplementedException` when using `SerializationOption.ReflectionOnly`, DCS_ArrayOfSimpleType_PreserveObjectReferences_True DCS_CircularTypes_PreserveObjectReferences_True 10799 area-System.Diagnostics Difficult (not possible?) to redirect binary output between Linux processes A common pattern in Linux is to pipe output between commands. And such output is not always text (e.g., imagine a series of openssl commands). Unfortunately, the System.Diagnostic.Process class _assumes_ that output and input is textual. Such an assumption violates Linux conventions. 10800 area-System.Data Use ConditionalFact in Manual tests of SqlClient Based on the comment at https://github.com/dotnet/corefx/pull/10742#issuecomment-239888047 `ConditionalFact` can be used to conditionally execute the Xunit This issue is being opened to track the change. 10804 area-Infrastructure Enable full test runs for netcoreapp1.1 Enable full test runs for netcoreapp1.1 in master. Currently we can only run them locally. Then we can merge this into dev/api and enable for that branch also. assigning to @joperezr for now. 10813 area-Serialization Test failure: DataContractJsonSerializerTests/DCJS_ArrayOfDateTime "Opened on behalf of @jiangzeng The test `DataContractJsonSerializerTests/DCJS_ArrayOfDateTime` has failed. ``` strings differ at index 12 ? [expected]:\/Date(946811045000-0800)\/"","" [actual ]:\/Date(946782245000+0000)\/"","" ? [Expected (with length=62)]: [""\/Date(946811045000-0800)\/"",""\/Date(1296734706000-0800)\/""] [Actual (with length=62)]: [""\/Date(946782245000+0000)\/"",""\/Date(1296705906000+0000)\/""] Test failed for input: System.DateTime[] Expected: [""\/Date(946811045000-0800)\/"",""\/Date(1296734706000-0800)\/""] Actual: [""\/Date(946782245000+0000)\/"",""\/Date(1296705906000+0000)\/""] Expected: True Actual: False ``` Stack Trace: ``` at DataContractJsonSerializerTests.SerializeAndDeserialize[T](T value, String baseline, DataContractJsonSerializerSettings settings, Func`1 serializerFactory, Boolean skipStringCompare) at DataContractJsonSerializerTests.DCJS_ArrayOfDateTime() ``` Failing configurations: - Ubuntu.1604.Amd64 - AnyCPU-Release - AnyCPU-Debug - Windows.10.Core.Amd64 - AnyCPU-Debug - AnyCPU-Release - Windows.7.Amd64 - AnyCPU-Debug - AnyCPU-Release - Centos.71.Amd64 - AnyCPU-Release - AnyCPU-Debug - Debian.82.Amd64 - AnyCPU-Debug - AnyCPU-Release - Suse.132.Amd64 - AnyCPU-Release - AnyCPU-Debug - Redhat.72.Amd64 - AnyCPU-Debug - AnyCPU-Release - Windows.81.Amd64 - AnyCPU-Debug - AnyCPU-Release - Ubuntu.1404.Amd64 - AnyCPU-Release - AnyCPU-Debug - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug The following test also failed: DataContractJsonSerializerTests/DCJS_ArrayOfDateTime DataContractJsonSerializerTests/DCJS_TypeWithAllPrimitiveProperties link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fcli~2F/build/20160816.02/workItem/System.Runtime.Serialization.Json.Tests " 10814 area-System.Net Test failure: System.Net.Primitives.Functional.Tests.CookieCollectionTest/Enumerator_Version_Invalid Opened on behalf of @jiangzeng The test `System.Net.Primitives.Functional.Tests.CookieCollectionTest/Enumerator_Version_Invalid` has failed. ``` System.InvalidOperationException : Collection was modified after the enumerator was instantiated. ``` Stack Trace: ``` at System.Net.CookieCollection.CookieCollectionEnumerator.System.Collections.IEnumerator.get_Current() at System.Net.Primitives.Functional.Tests.CookieCollectionTest.Enumerator_Version_Invalid() in D:\A\_work\2\s\src\System.Net.Primitives\tests\FunctionalTests\CookieCollectionTest.cs:line 159 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.02/workItem/System.Net.Primitives.Functional.Tests/analysis/xunit/System.Net.Primitives.Functional.Tests.CookieCollectionTest~2FEnumerator_Version_Invalid 10815 area-System.Net Test failure: System.Net.Primitives.Functional.Tests.CookieTest/Value_PassNullToCtor_GetReturnsEmptyString Opened on behalf of @jiangzeng The test `System.Net.Primitives.Functional.Tests.CookieTest/Value_PassNullToCtor_GetReturnsEmptyString` has failed. ``` Assert.Equal() Failure\r Expected: \r Actual: (null) ``` Stack Trace: ``` at System.Net.Primitives.Functional.Tests.CookieTest.Value_PassNullToCtor_GetReturnsEmptyString() in D:\A\_work\2\s\src\System.Net.Primitives\tests\FunctionalTests\CookieTest.cs:line 249 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.02/workItem/System.Net.Primitives.Functional.Tests/analysis/xunit/System.Net.Primitives.Functional.Tests.CookieTest~2FValue_PassNullToCtor_GetReturnsEmptyString 10816 area-System.Net Test failure: System.Net.Primitives.Functional.Tests.CredentialCacheTest/AddRemove_HostPortAuthenticationTypeDefaultCredentials_Success Opened on behalf of @jiangzeng The test `System.Net.Primitives.Functional.Tests.CredentialCacheTest/AddRemove_HostPortAuthenticationTypeDefaultCredentials_Success` has failed. ``` System.ArgumentException : Default credentials cannot be supplied for the authenticationType1 authentication scheme.\r Parameter name: authenticationType ``` Stack Trace: ``` at System.Net.CredentialCache.Add(String host, Int32 port, String authenticationType, NetworkCredential credential) at System.Net.Primitives.Functional.Tests.CredentialCacheTest.AddRemove_HostPortAuthenticationTypeDefaultCredentials_Success() in D:\A\_work\2\s\src\System.Net.Primitives\tests\FunctionalTests\CredentialCacheTest.cs:line 405 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.02/workItem/System.Net.Primitives.Functional.Tests/analysis/xunit/System.Net.Primitives.Functional.Tests.CredentialCacheTest~2FAddRemove_HostPortAuthenticationTypeDefaultCredentials_Success 10817 area-System.Net Test failure: System.Net.Primitives.Functional.Tests.CredentialCacheTest/Add_HostPortAuthenticationTypeCredential_Invalid Opened on behalf of @jiangzeng The test `System.Net.Primitives.Functional.Tests.CredentialCacheTest/Add_HostPortAuthenticationTypeCredential_Invalid` has failed. ``` Assert.Equal() Failure\r Expected: host\r Actual: (null) ``` Stack Trace: ``` at System.Net.Primitives.Functional.Tests.CredentialCacheTest.Add_HostPortAuthenticationTypeCredential_Invalid() in D:\A\_work\2\s\src\System.Net.Primitives\tests\FunctionalTests\CredentialCacheTest.cs:line 165 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.02/workItem/System.Net.Primitives.Functional.Tests/analysis/xunit/System.Net.Primitives.Functional.Tests.CredentialCacheTest~2FAdd_HostPortAuthenticationTypeCredential_Invalid Same issue for test: System.Net.Primitives.Functional.Tests.CredentialCacheTest/GetCredential_HostPortAuthenticationType_Invalid 10818 area-System.Net Test failure: System.Net.Primitives.Functional.Tests.CredentialCacheTest/Add_UriAuthenticationTypeCredential_Invalid Opened on behalf of @jiangzeng The test `System.Net.Primitives.Functional.Tests.CredentialCacheTest/Add_UriAuthenticationTypeCredential_Invalid` has failed. ``` Assert.Equal() Failure\r ? (pos 4)\r Expected: authenticationType\r Actual: authType\r ? (pos 4) ``` Stack Trace: ``` at System.Net.Primitives.Functional.Tests.CredentialCacheTest.Add_UriAuthenticationTypeCredential_Invalid() in D:\A\_work\2\s\src\System.Net.Primitives\tests\FunctionalTests\CredentialCacheTest.cs:line 125 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.02/workItem/System.Net.Primitives.Functional.Tests/analysis/xunit/System.Net.Primitives.Functional.Tests.CredentialCacheTest~2FAdd_UriAuthenticationTypeCredential_Invalid Same issue for test: System.Net.Primitives.Functional.Tests.CredentialCacheTest/GetCredential_UriAuthenticationType_Invalid 10819 area-System.Net Test failure: System.Net.WebSockets.Tests.WebSocketExceptionTests/ConstructorTests_WebSocketError_Exception_Success Opened on behalf of @jiangzeng The test `System.Net.WebSockets.Tests.WebSocketExceptionTests/ConstructorTests_WebSocketError_Exception_Success` has failed. ``` System.ArgumentNullException : Value cannot be null.\r Parameter name: format ``` Stack Trace: ``` at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args) at System.String.Format(String format, Object arg0, Object arg1) at System.SR.Format(String resourceFormat, Object p1, Object p2) at System.Net.WebSockets.WebSocketException.GetErrorMessage(WebSocketError error) at System.Net.WebSockets.WebSocketException..ctor(WebSocketError error, Exception innerException) at System.Net.WebSockets.Tests.WebSocketExceptionTests.ConstructorTests_WebSocketError_Exception_Success(WebSocketError error) in D:\A\_work\2\s\src\System.Net.WebSockets\tests\WebSocketExceptionTests.cs:line 57 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.02/workItem/System.Net.WebSockets.Tests/analysis/xunit/System.Net.WebSockets.Tests.WebSocketExceptionTests~2FConstructorTests_WebSocketError_Exception_Success Same issue for test: System.Net.WebSockets.Tests.WebSocketExceptionTests/ConstructorTests_WebSocketError_Success 10820 area-System.Collections Test failure: System.Collections.ObjectModel.Tests.KeyedCollectionTestsIntInt/Clear Opened on behalf of @jiangzeng The test `System.Collections.ObjectModel.Tests.KeyedCollectionTestsIntInt/Clear` has failed. ``` System.MethodAccessException : Attempt by method 'System.Collections.ObjectModel.Tests.Helper.GetDictionary(System.Collections.ObjectModel.KeyedCollection`2)' to access method 'System.Collections.ObjectModel.KeyedCollection`2.get_Dictionary()' failed. ``` Stack Trace: ``` at System.RuntimeMethodHandle.PerformSecurityCheck(Object obj, RuntimeMethodHandleInternal method, RuntimeType parent, UInt32 invocationFlags) at System.RuntimeMethodHandle.PerformSecurityCheck(Object obj, IRuntimeMethodInfo method, RuntimeType parent, UInt32 invocationFlags) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at System.Collections.ObjectModel.Tests.Helper.GetDictionary[TKey,TValue](KeyedCollection`2 collection) in D:\A\_work\2\s\src\System.ObjectModel\tests\KeyedCollection\Utils.cs:line 183 at System.Collections.ObjectModel.Tests.KeyedCollectionTests`2.Clear(Int32 collectionSize) in D:\A\_work\2\s\src\System.ObjectModel\tests\KeyedCollection\TestMethods.cs:line 1525 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.02/workItem/System.ObjectModel.Tests/analysis/xunit/System.Collections.ObjectModel.Tests.KeyedCollectionTestsIntInt~2FClear Same issue for the following tests: System.Collections.ObjectModel.Tests.KeyedCollectionTestsIntInt/Clear System.Collections.ObjectModel.Tests.KeyedCollectionTestsIntInt/Threshold System.Collections.ObjectModel.Tests.KeyedCollectionTestsIntString/Clear System.Collections.ObjectModel.Tests.KeyedCollectionTestsIntString/Threshold System.Collections.ObjectModel.Tests.KeyedCollectionTestsStringInt/Clear System.Collections.ObjectModel.Tests.KeyedCollectionTestsStringInt/Threshold System.Collections.ObjectModel.Tests.KeyedCollectionTestsStringString/Clear System.Collections.ObjectModel.Tests.KeyedCollectionTestsStringString/Threshold 10821 area-System.Net "Tests under ""System.Private.Uri.Functional.Tests"" fail with Assert Exception: ""Xunit.Sdk.EqualException"" & ""Xunit.Sdk.FalseException""" Opened on behalf of @jiangzeng The test `System.PrivateUri.Tests.IdnDnsSafeHostTest/IdnDnsSafeHost_IPv6Host_ScopeIdButNoBrackets` has failed. ``` Assert.Equal() Failure\r ? (pos 0)\r Expected: ::1%23\r Actual: 0000:0000:0000:0000:0000:0000:0000:0001%2···\r ? (pos 0) ``` Stack Trace: ``` at System.PrivateUri.Tests.IdnDnsSafeHostTest.IdnDnsSafeHost_IPv6Host_ScopeIdButNoBrackets() in D:\A\_work\2\s\src\System.Private.Uri\tests\FunctionalTests\IdnDnsSafeHostTest.cs:line 43 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.02/workItem/System.Private.Uri.Functional.Tests Failed tests: System.PrivateUri.Tests.IdnDnsSafeHostTest/IdnDnsSafeHost_IPv6Host_ScopeIdButNoBrackets System.PrivateUri.Tests.IriTest/Iri_804110_TryCreateUri_ShouldNotThrowIndexOutOfRange System.PrivateUri.Tests.IriTest/Iri_IncorrectNormalization System.PrivateUri.Tests.IriTest/Iri_Uri_SchemaParsing_ShouldNotThrowArgumentOutOfRange System.PrivateUri.Tests.UriBuilderTests/TestQuery System.PrivateUri.Tests.UriEscapingTest/UriAbsoluteEscaping_FullIPv6Uri_NothingEscaped System.PrivateUri.Tests.UriEscapingTest/UriAbsoluteEscaping_RFC3986Reserved_NothingEscaped System.PrivateUri.Tests.UriEscapingTest/UriAbsoluteUnEscaping_AlphaNumericEscapedIriOn_UnEscaping System.PrivateUri.Tests.UriEscapingTest/UriAbsoluteUnEscaping_RFC2396ReservedEscaped_NoUnEscaping System.PrivateUri.Tests.UriEscapingTest/UriAbsoluteUnEscaping_RFC2396UnreservedEscaped_AllUnescaped System.PrivateUri.Tests.UriEscapingTest/UriAbsoluteUnEscaping_RFC3986ReservedEscaped_NothingUnescaped System.PrivateUri.Tests.UriEscapingTest/UriEscapingDataString_RFC3986ReservedWithIRI_Escaped System.PrivateUri.Tests.UriEscapingTest/UriEscapingDataString_RFC3986Reserved_Escaped System.PrivateUri.Tests.UriEscapingTest/UriEscapingDataString_Unicode_SurrogatePair System.PrivateUri.Tests.UriEscapingTest/UriEscapingUriString_FullIPv6Uri_NothingEscaped System.PrivateUri.Tests.UriEscapingTest/UriEscapingUriString_RFC3986ReservedWithIRI_NothingEscaped System.PrivateUri.Tests.UriEscapingTest/UriEscapingUriString_RFC3986Reserved_NothingEscaped System.PrivateUri.Tests.UriEscapingTest/UriFile_ExplicitDosFile_QueryAllowed System.PrivateUri.Tests.UriEscapingTest/UriFile_ExplicitFile_QueryAllowed System.PrivateUri.Tests.UriEscapingTest/UriUnescapeInvalid_AsciiIncompleteUtf8AsciiIriOn_InvalidUtf8LeftAlone System.PrivateUri.Tests.UriEscapingTest/UriUnescapeInvalid_IncompleteUtf8AfterValidUtf8IriOn_InvalidUtf8LeftAlone System.PrivateUri.Tests.UriEscapingTest/UriUnescapeInvalid_ValidUtf8IncompleteUtf8AsciiIriOn_InvalidUtf8LeftAlone System.PrivateUri.Tests.UriEscapingTest/UriUnescape_AsciiUtf8AsciiIriOn_ValidUnescaped System.PrivateUri.Tests.UriEscapingTest/UriUnescape_EscapedAsciiIriOn_Unescaped System.PrivateUri.Tests.UriGetComponentsTest/GetComponents_UnknownScheme_ComponentsUnaffected System.PrivateUri.Tests.UriIpHostTest/UriIPv6Host_Any_Success System.PrivateUri.Tests.UriIpHostTest/UriIPv6Host_CanonicalCollonHex_Success System.PrivateUri.Tests.UriIpHostTest/UriIPv6Host_CompressionRangeSelection_Success System.PrivateUri.Tests.UriIpHostTest/UriIPv6Host_EmbeddedIPv4_Success System.PrivateUri.Tests.UriIpHostTest/UriIPv6Host_LeadingValue_Success System.PrivateUri.Tests.UriIpHostTest/UriIPv6Host_MaxValue_Success System.PrivateUri.Tests.UriIpHostTest/UriIPv6Host_ScopeId_Success System.PrivateUri.Tests.UriIsWellFormedUriStringTest/UriIsWellFormed_NewRelativeWithKnownSchemeAndQuery_SuccessButNotWellFormed System.PrivateUri.Tests.UriIsWellFormedUriStringTest/UriIsWellFormed_RelativeWithPercentAndColon_Failure System.PrivateUri.Tests.UriIsWellFormedUriStringTest/UriIsWellFormed_TryCreateNewRelativeWithPercentAndColon_Success System.PrivateUri.Tests.UriMailToTest/UriMailTo_SchemeAndBackslash_Throws System.PrivateUri.Tests.UriMailToTest/UriMailTo_SchemeUserAtQuery_Throws System.PrivateUri.Tests.UriMailToTest/UriMailTo_SchemeUserAt_Throws System.PrivateUri.Tests.UriMailToTest/UriMailTo_TwoCommaSepratedAddresses_Success System.PrivateUri.Tests.UriMailToTest/UriMailTo_TwoSemiColonSepratedAddresses_Success System.PrivateUri.Tests.UriRelativeResolutionTest/Uri_Relative_BaseVsCharDotSlash_ReturnsCharDotSlash System.PrivateUri.Tests.UriRelativeResolutionTest/Uri_Relative_BaseVsCharDot_ReturnsBasePathPlusCharDot System.PrivateUri.Tests.UriRelativeResolutionTest/Uri_Relative_BaseVsCharDoubleDotSlash_ReturnsCharDoubleDotSlash System.PrivateUri.Tests.UriRelativeResolutionTest/Uri_Relative_BaseVsCharDoubleDot_ReturnsBasePathPlusCharDoubleDot System.PrivateUri.Tests.UriRelativeResolutionTest/Uri_Relative_BaseVsSlashTrippleDotSlash_ReturnsSlashTrippleDotSlash System.PrivateUri.Tests.UriRelativeResolutionTest/Uri_Relative_BaseVsTrippleDot_ReturnsBasePathPlusTrippleDot 10822 area-Serialization Serializable attribute exists in both System.Runtime.Serialization.Formatters and nunit.framework "Hi I have issue with Serializable attribute ``` The type 'SerializableAttribute' exists in both 'System.Runtime.Serialization.Formatters, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'nunit.framework, Version=3.4.1.0. ``` How can I specify the package to use? My project.json : ``` { ""version"": ""1.0.0-*"", ""testRunner"": ""nunit"", ""buildOptions"": { ""debugType"": ""portable"", ""allowUnsafe"": true, ""define"": [ ""WIN64"" ] }, ""frameworks"": { ""netcoreapp1.0"": { ""buildOptions"": { ""compile"": { ""exclude"": [ ""Tests/**/*.cs"", ""Examples/**/**/AssemblyInfo.cs"" ] }, ""define"": [ ""NETSTANDARD1_6"" ] }, ""dependencies"": { ""NETStandard.Library"": ""1.6.0"", ""System.Runtime"": ""4.1.0"", ""System.Runtime.Serialization.Formatters"": ""4.0.0-rc3-24212-01"", ""System.Dynamic.Runtime"": ""4.0.11"", ""System.Threading.ThreadPool"": ""4.0.10"", ""System.Reflection.TypeExtensions"": ""4.1.0"", ""System.Diagnostics.StackTrace"": ""4.0.1"", ""System.Diagnostics.Process"": ""4.1.0"", ""System.Threading.Thread"": ""4.0.0"", ""dotnet-test-nunit"": ""3.4.0-beta-1"", ""NUnit"": ""3.4.1"" }, ""imports"": ""dnxcore50"" }, ""net451"": { ""dependencies"": { ""NUnit"": ""3.4.1"", ""dotnet-test-nunit"": ""3.4.0-alpha-2"" }, ""buildOptions"": { ""compile"": { ""exclude"": [ ""Tests/**/*.cs"", ""Tests/service-bus-tests-net4/Properties/AssemblyInfo.cs"", ""Examples/service-example-csharp-dispatcher/Properties/AssemblyInfo.cs"", ""Examples/service-example-csharp/Properties/AssemblyInfo.cs"" ] } } } }, ""runtimes"": { ""ubuntu.14.04-x64"": {}, ""win10-x64"": {}, ""win7-x64"": {} } } ``` " 10823 area-System.Reflection Test failure: System.Reflection.Context.CustomReflectionContextTests/InstantiateContext_Throws Opened on behalf of @jiangzeng The test `System.Reflection.Context.CustomReflectionContextTests/InstantiateContext_Throws` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.PlatformNotSupportedException)\r Actual: (No exception was thrown) ``` Stack Trace: ``` at System.Reflection.Context.CustomReflectionContextTests.InstantiateContext_Throws() in D:\A\_work\2\s\src\System.Reflection.Context\tests\CustomReflectionContextTests.cs:line 14 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.02/workItem/System.Reflection.Context.Tests/analysis/xunit/System.Reflection.Context.CustomReflectionContextTests~2FInstantiateContext_Throws 10825 area-System.Runtime Test failure: System.Runtime.InteropServices.HandleCollectorTests/CountOverflow Opened on behalf of @jiangzeng The test `System.Runtime.InteropServices.HandleCollectorTests/CountOverflow` has failed. ``` Assert.NotNull() Failure ``` Stack Trace: ``` at System.Runtime.InteropServices.HandleCollectorTests.CountOverflow() in D:\A\_work\2\s\src\System.Runtime.InteropServices\tests\System\Runtime\InteropServices\HandleCollectorTests.cs:line 79 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release 10826 area-System.Numerics Test failure: System.Numerics.Tests.multiplyTest/RunMultiply_TwoLargeBigIntegers_Threshold Opened on behalf of @jiangzeng The test `System.Numerics.Tests.multiplyTest/RunMultiply_TwoLargeBigIntegers_Threshold` has failed. ``` System.TypeInitializationException : The type initializer for 'BigIntTools.Utils' threw an exception.\r ---- System.ArgumentNullException : Value cannot be null.\r Parameter name: type ``` Stack Trace: ``` at BigIntTools.Utils.RunWithFakeThreshold(String name, Int32 value, Action action) in D:\A\_work\2\s\src\System.Runtime.Numerics\tests\BigInteger\BigIntTools.cs:line 46 at System.Numerics.Tests.multiplyTest.RunMultiply_TwoLargeBigIntegers_Threshold() in D:\A\_work\2\s\src\System.Runtime.Numerics\tests\BigInteger\multiply.cs:line 41 ----- Inner Stack Trace ----- at System.Reflection.IntrospectionExtensions.GetTypeInfo(Type type) at BigIntTools.Utils..cctor() in D:\A\_work\2\s\src\System.Runtime.Numerics\tests\BigInteger\BigIntTools.cs:line 38 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.02/workItem/System.Runtime.Numerics.Tests/analysis/xunit/System.Numerics.Tests.multiplyTest~2FRunMultiply_TwoLargeBigIntegers_Threshold Same issue for the tests: System.Numerics.Tests.modpowTest/ModPow1Large2SmallInt_Threshold System.Numerics.Tests.modpowTest/ModPow2Large1SmallInt_Threshold System.Numerics.Tests.modpowTest/ModPow3LargeInt 10827 area-System.Numerics Test failure: System.Numerics.Tests.powTest/RunOverflow Opened on behalf of @jiangzeng The test `System.Numerics.Tests.powTest/RunOverflow` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.OverflowException)\r Actual: typeof(System.OutOfMemoryException): Array dimensions exceeded supported range. ``` Stack Trace: ``` at System.Numerics.BigIntegerBuilder.SetSizeClear(Int32 cu) at System.Numerics.BigIntegerBuilder.Mul(BigIntegerBuilder& reg1, BigIntegerBuilder& reg2) at System.Numerics.BigInteger.Pow(BigInteger value, Int32 exponent) at System.Numerics.Tests.powTest.<>c__DisplayClass9_0.b__0() in D:\A\_work\2\s\src\System.Runtime.Numerics\tests\BigInteger\pow.cs:line 178 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.02/workItem/System.Runtime.Numerics.Tests/analysis/xunit/System.Numerics.Tests.powTest~2FRunOverflow 10828 area-System.Numerics Test failure: System.Numerics.Tests.ComparisonTest/IComparable_Invalid Opened on behalf of @jiangzeng The test `System.Numerics.Tests.ComparisonTest/IComparable_Invalid` has failed. ``` Assert.Equal() Failure\r Expected: obj\r Actual: (null) ``` Stack Trace: ``` at System.Numerics.Tests.ComparisonTest.IComparable_Invalid() in D:\A\_work\2\s\src\System.Runtime.Numerics\tests\BigInteger\Comparison.cs:line 367 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.02/workItem/System.Runtime.Numerics.Tests/analysis/xunit/System.Numerics.Tests.ComparisonTest~2FIComparable_Invalid 10829 area-System.Numerics Test failure: System.Numerics.Tests.ComplexTests/ACos_Advanced Opened on behalf of @jiangzeng The test `System.Numerics.Tests.ComplexTests/ACos_Advanced` has failed. ``` Failure at line 298. Expected real: 0. Actual real: 1.5707963267949\r Expected: True\r Actual: False ``` Stack Trace: ``` at System.Numerics.Tests.ComplexTests.VerifyRealImaginaryProperties(Complex complex, Double real, Double imaginary, Int32 lineNumber) in D:\A\_work\2\s\src\System.Runtime.Numerics\tests\ComplexTests.cs:line 1583 at System.Numerics.Tests.ComplexTests.ACos_Advanced(Double real, Double imaginary, Double expectedReal, Double expectedImaginary) in D:\A\_work\2\s\src\System.Runtime.Numerics\tests\ComplexTests.cs:line 298 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.02/workItem/System.Runtime.Numerics.Tests/analysis/xunit/System.Numerics.Tests.ComplexTests~2FACos_Advanced Same issue for the tests: System.Numerics.Tests.ComplexTests/ACos_Advanced System.Numerics.Tests.ComplexTests/ASin_Advanced System.Numerics.Tests.ComplexTests/Equals 10830 area-System.Numerics Test failure: System.Numerics.Tests.cast_fromTest/RunDoubleExplicitCastFromBigIntegerTests Opened on behalf of @jiangzeng The test `System.Numerics.Tests.cast_fromTest/RunDoubleExplicitCastFromBigIntegerTests` has failed. ``` Assert.Equal() Failure\r Expected: 8\r Actual: 0 ``` Stack Trace: ``` at System.Numerics.Tests.cast_fromTest.VerifyDoubleExplicitCastFromBigInteger(Double value, BigInteger bigInteger) in D:\A\_work\2\s\src\System.Runtime.Numerics\tests\BigInteger\cast_from.cs:line 896 at System.Numerics.Tests.cast_fromTest.DoubleExplicitCastFromLargeBigIntegerTests(Int32 startShift, Int32 bigShiftLoopLimit, Int32 smallShift, Int32 smallShiftLoopLimit) in D:\A\_work\2\s\src\System.Runtime.Numerics\tests\BigInteger\cast_from.cs:line 727 at System.Numerics.Tests.cast_fromTest.RunDoubleExplicitCastFromBigIntegerTests() in D:\A\_work\2\s\src\System.Runtime.Numerics\tests\BigInteger\cast_from.cs:line 567 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.02/workItem/System.Runtime.Numerics.Tests/analysis/xunit/System.Numerics.Tests.cast_fromTest~2FRunDoubleExplicitCastFromBigIntegerTests Same issue for the tests: System.Numerics.Tests.cast_fromTest/RunDoubleExplicitCastFromBigIntegerTests System.Numerics.Tests.cast_fromTest/RunDoubleExplicitCastFromLargeBigIntegerTests 10832 area-System.Numerics Test failure: System.Numerics.Tests.logTest/RunLargeValueLogTests Opened on behalf of @jiangzeng The test `System.Numerics.Tests.logTest/RunLargeValueLogTests` has failed. ``` Assert.True() Failure\r Expected: True\r Actual: False ``` Stack Trace: ``` at System.Numerics.Tests.logTest.LargeValueLogTests(Int32 startShift, Int32 bigShiftLoopLimit, Int32 smallShift, Int32 smallShiftLoopLimit) in D:\A\_work\2\s\src\System.Runtime.Numerics\tests\BigInteger\log.cs:line 166 at System.Numerics.Tests.logTest.RunLargeValueLogTests() in D:\A\_work\2\s\src\System.Runtime.Numerics\tests\BigInteger\log.cs:line 139 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.02/workItem/System.Runtime.Numerics.Tests/analysis/xunit/System.Numerics.Tests.logTest~2FRunLargeValueLogTests Same issue for the tests: System.Numerics.Tests.logTest/RunLargeValueLogTests System.Numerics.Tests.logTest/RunLogTests 10833 area-System.Collections "Desktop test failure: System.Collections.Concurrent.Tests.ConcurrentDictionaryTests/IDicionary_Remove_NullKeyInKeyValuePair_ThrowsArgumentNullException fail with ""Xunit.Sdk.EqualEqualException""" Opened on behalf of @Jiayili1 The test `System.Collections.Concurrent.Tests.ConcurrentDictionaryTests/IDicionary_Remove_NullKeyInKeyValuePair_ThrowsArgumentNullException` has failed. ``` Assert.Equal() Failure\r ? (pos 0)\r Expected: keyValuePair\r Actual: TKey is a reference type and item.Key is ···\r ? (pos 0) ``` Stack Trace: ``` at System.Collections.Concurrent.Tests.ConcurrentDictionaryTests.IDicionary_Remove_NullKeyInKeyValuePair_ThrowsArgumentNullException() in D:\A\_work\2\s\src\System.Collections.Concurrent\tests\ConcurrentDicionary\ConcurrentDictionaryTests.cs:line 742 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fdesktop~2Fcli~2F/build/20160816.02/workItem/System.Collections.Concurrent.Tests 10838 area-Meta UWP F5 tests use reflection block -- DataContractJsonSerializerTests fail with System.TypeInitializationException Opened on behalf of @jiangzeng The test `DataContractJsonSerializerTests/DCJS_ClassWithDatetimeOffsetTypeProperty` has failed. ``` System.TypeInitializationException : The type initializer for 'System.Runtime.Serialization.XmlFormatReaderGenerator' threw an exception.\r ---- System.InvalidOperationException : The API 'System.Runtime.Serialization.FormatterServices.GetUninitializedObject(System.Type)' cannot be used on the current platform. See http://go.microsoft.com/fwlink/?LinkId=248273 for more information. ``` Stack Trace: ``` at System.Runtime.Serialization.XmlFormatReaderGenerator.UnsafeGetUninitializedObject(Type type) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XmlFormatReaderGenerator.cs:line 929 at ReadTypeWithDateTimeOffsetTypePropertyFromJson(XmlReaderDelegator , XmlObjectSerializerReadContextComplexJson , XmlDictionaryString , XmlDictionaryString[] ) at System.Runtime.Serialization.Json.JsonClassDataContract.ReadJsonValueCore(XmlReaderDelegator jsonReader, XmlObjectSerializerReadContextComplexJson context) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\Json\JsonClassDataContract.cs:line 138 at System.Runtime.Serialization.Json.JsonDataContract.ReadJsonValue(XmlReaderDelegator jsonReader, XmlObjectSerializerReadContextComplexJson context) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\Json\JsonDataContract.cs:line 101 at System.Runtime.Serialization.Json.DataContractJsonSerializerImpl.ReadJsonValue(DataContract contract, XmlReaderDelegator reader, XmlObjectSerializerReadContextComplexJson context) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\Json\DataContractJsonSerializer.cs:line 718 at System.Runtime.Serialization.Json.XmlObjectSerializerReadContextComplexJson.ReadDataContractValue(DataContract dataContract, XmlReaderDelegator reader) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\Json\XmlObjectSerializerReadContextComplexJson.cs:line 54 at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, DataContract& dataContract) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XmlObjectSerializerReadContext.cs:line 189 at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, String name, String ns) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XmlObjectSerializerReadContext.cs:line 126 at System.Runtime.Serialization.XmlObjectSerializerReadContextComplex.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, String name, String ns) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XmlObjectSerializerReadContextComplex.cs:line 72 at System.Runtime.Serialization.Json.DataContractJsonSerializerImpl.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\Json\DataContractJsonSerializer.cs:line 777 at System.Runtime.Serialization.XmlObjectSerializer.InternalReadObject(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XmlObjectSerializer.cs:line 261 at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XmlObjectSerializer.cs:line 280 at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XmlObjectSerializer.cs:line 272 at System.Runtime.Serialization.Json.DataContractJsonSerializerImpl.ReadObject(XmlDictionaryReader reader) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\Json\DataContractJsonSerializer.cs:line 600 at System.Runtime.Serialization.Json.DataContractJsonSerializerImpl.ReadObject(Stream stream) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\Json\DataContractJsonSerializer.cs:line 585 at System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject(Stream stream) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\Json\DataContractJsonSerializer.cs:line 161 at DataContractJsonSerializerTests.SerializeAndDeserialize[T](T value, String baseline, DataContractJsonSerializerSettings settings, Func`1 serializerFactory, Boolean skipStringCompare) in D:\A\_work\2\s\src\System.Runtime.Serialization.Json\tests\DataContractJsonSerializer.cs:line 2217 at DataContractJsonSerializerTests.DCJS_ClassWithDatetimeOffsetTypeProperty() in D:\A\_work\2\s\src\System.Runtime.Serialization.Json\tests\DataContractJsonSerializer.cs:line 1335 ----- Inner Stack Trace ----- at System.Delegate.CreateDelegateInternal(RuntimeType rtType, RuntimeMethodInfo rtMethod, Object firstArgument, DelegateBindingFlags flags, StackCrawlMark& stackMark) at System.Reflection.RuntimeMethodInfo.CreateDelegateInternal(Type delegateType, Object firstArgument, DelegateBindingFlags bindingFlags, StackCrawlMark& stackMark) at System.Reflection.RuntimeMethodInfo.CreateDelegate(Type delegateType) at System.Runtime.Serialization.XmlFormatReaderGenerator..cctor() in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XmlFormatReaderGenerator.cs:line 34 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.02/workItem/System.Runtime.Serialization.Json.Tests/analysis/xunit/DataContractJsonSerializerTests~2FDCJS_ClassWithDatetimeOffsetTypeProperty Same issue for the following tests: DCJS_ClassWithDatetimeOffsetTypeProperty DCJS_CollectionInterfaceGetOnlyCollection DCJS_ContainsLinkedList DCJS_DCClassWithEnumAndStruct DCJS_DataContractAttribute DCJS_DataContractWithDotInName DCJS_DataContractWithMinusSignInName DCJS_DataContractWithOperatorsInName DCJS_DataContractWithOtherSymbolsInName DCJS_DataMemberAttribute DCJS_DataMemberNames DCJS_EnumerableInterfaceGetOnlyCollection DCJS_GenericTypeWithPrivateSetter DCJS_IgnoreDataMemberAttribute DCJS_InternalTypeSerialization DCJS_KeyValuePair DCJS_KeyValuePairOfStringObject DCJS_PrivateTypeSerialization DCJS_Queue DCJS_Stack DCJS_SuspensionManager DCJS_TypeWithEmitDefaultValueFalse DCJS_TypeWithInternalDefaultConstructor DCJS_TypeWithKnownTypeAttributeAndInterfaceMember DCJS_TypeWithKnownTypeAttributeAndListOfInterfaceMember 10840 area-Serialization Test failure: DataContractJsonSerializerTests/DCJS_RecursiveCollection Opened on behalf of @jiangzeng The test `DataContractJsonSerializerTests/DCJS_RecursiveCollection` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.Runtime.Serialization.InvalidDataContractException)\r Actual: typeof(System.ArgumentNullException): Value cannot be null.\r Parameter name: format ``` Stack Trace: ``` at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args) at System.String.Format(String format, Object arg0) at System.SR.Format(String resourceFormat, Object p1) in D:\A\_work\2\s\src\Common\src\System\SR.cs:line 71 at System.Runtime.Serialization.DataContract.ValidatePreviousCollectionTypes(Type collectionType, Type itemType, HashSet`1 previousCollectionTypes) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\DataContract.cs:line 1276 at System.Runtime.Serialization.DataContract.IsTypeSerializable(Type type, HashSet`1 previousCollectionTypes) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\DataContract.cs:line 1257 at System.Runtime.Serialization.DataContract.IsTypeSerializable(Type type, HashSet`1 previousCollectionTypes) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\DataContract.cs:line 1258 at System.Runtime.Serialization.DataContract.IsTypeSerializable(Type type, HashSet`1 previousCollectionTypes) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\DataContract.cs:line 1258 at System.Runtime.Serialization.DataContract.IsTypeSerializable(Type type) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\DataContract.cs:line 1237 at System.Runtime.Serialization.DataContract.ImportKnownTypeAttributes(Type type, Dictionary`2 typesChecked, Dictionary`2& knownDataContracts) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\DataContract.cs:line 1967 at System.Runtime.Serialization.DataContract.ImportKnownTypeAttributes(Type type) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\DataContract.cs:line 1961 at System.Runtime.Serialization.CollectionDataContract.CollectionDataContractCriticalHelper.get_KnownDataContracts() in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\CollectionDataContract.cs:line 898 at System.Runtime.Serialization.CollectionDataContract.get_KnownDataContracts() in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\CollectionDataContract.cs:line 462 at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs:line 146 at System.Runtime.Serialization.Json.DataContractJsonSerializerImpl.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\Json\DataContractJsonSerializer.cs:line 820 at System.Runtime.Serialization.Json.DataContractJsonSerializerImpl.InternalWriteObject(XmlWriterDelegator writer, Object graph) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\Json\DataContractJsonSerializer.cs:line 788 at System.Runtime.Serialization.XmlObjectSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XmlObjectSerializer.cs:line 101 at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XmlObjectSerializer.cs:line 71 at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XmlObjectSerializer.cs:line 62 at System.Runtime.Serialization.Json.DataContractJsonSerializerImpl.WriteObject(XmlDictionaryWriter writer, Object graph) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\Json\DataContractJsonSerializer.cs:line 636 at System.Runtime.Serialization.Json.DataContractJsonSerializerImpl.WriteObject(Stream stream, Object graph) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\Json\DataContractJsonSerializer.cs:line 625 at System.Runtime.Serialization.Json.DataContractJsonSerializer.WriteObject(Stream stream, Object graph) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\Json\DataContractJsonSerializer.cs:line 156 at DataContractJsonSerializerTests.<>c.b__120_0() in D:\A\_work\2\s\src\System.Runtime.Serialization.Json\tests\DataContractJsonSerializer.cs:line 1851 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.02/workItem/System.Runtime.Serialization.Json.Tests/analysis/xunit/DataContractJsonSerializerTests~2FDCJS_RecursiveCollection 10842 area-System.Console "Test failure: ReadAndWrite/OutputEncoding fail with ""Assert+WrapperXunitException""" Opened on behalf of @Jiayili1 The test `ReadAndWrite/OutputEncoding` has failed. ``` Assert+WrapperXunitException : File path: D:\A\_work\2\s\src\System.Console\tests\ReadAndWrite.cs. Line: 202\r ---- Assert.Equal() Failure\r Expected: Byte[] []\r Actual: Byte[] [239, 187, 191] ``` Stack Trace: ``` at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber) in D:\A\_work\2\s\src\Common\tests\System\Diagnostics\AssertWithCallerAttributes.cs:line 583 at Assert.Equal[T](T expected, T actual, String path, Int32 line) in D:\A\_work\2\s\src\Common\tests\System\Diagnostics\AssertWithCallerAttributes.cs:line 172 at ReadAndWrite.ValidateConsoleEncoding(Encoding encoding) in D:\A\_work\2\s\src\System.Console\tests\ReadAndWrite.cs:line 202 at ReadAndWrite.OutputEncoding() in D:\A\_work\2\s\src\System.Console\tests\ReadAndWrite.cs:line 275 ----- Inner Stack Trace ----- at Assert.Equal[T](T expected, T actual, String path, Int32 line) in D:\A\_work\2\s\src\Common\tests\System\Diagnostics\AssertWithCallerAttributes.cs:line 171 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fdesktop~2Fcli~2F/build/20160816.02/workItem/System.Console.Tests/analysis/xunit/ReadAndWrite~2FOutputEncoding 10843 area-Serialization Test failure: DataContractSerializerTests/DCS_DeserializeEmptyString Opened on behalf of @jiangzeng The test `DataContractSerializerTests/DCS_DeserializeEmptyString` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.Xml.XmlException)\r Actual: typeof(System.Xml.XmlException): Unexpected end of file. ``` Stack Trace: ``` at System.Xml.EncodingStreamWrapper.ReadBOMEncoding(Boolean notOutOfBand) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Xml\EncodingStreamWrapper.cs:line 228 at System.Xml.EncodingStreamWrapper..ctor(Stream stream, Encoding encoding) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Xml\EncodingStreamWrapper.cs:line 66 at System.Xml.XmlUTF8TextReader.SetInput(Stream stream, Encoding encoding, XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Xml\XmlUTF8TextReader.cs:line 580 at System.Xml.XmlDictionaryReader.CreateTextReader(Stream stream, Encoding encoding, XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Xml\XmlDictionaryReader.cs:line 104 at System.Xml.XmlDictionaryReader.CreateTextReader(Stream stream, XmlDictionaryReaderQuotas quotas) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Xml\XmlDictionaryReader.cs:line 96 at System.Runtime.Serialization.XmlObjectSerializer.ReadObject(Stream stream) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XmlObjectSerializer.cs:line 224 at DataContractSerializerTests.<>c__DisplayClass136_0.b__0() in D:\A\_work\2\s\src\System.Runtime.Serialization.Xml\tests\DataContractSerializer.cs:line 1936 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160915.01/workItem/System.Runtime.Serialization.Xml.Tests/analysis/xunit/DataContractSerializerTests~2FDCS_DeserializeEmptyString 10844 area-System.Console "Test failure: WindowAndCursorProps/WindowWidth_WindowHeight_InvalidSize fail with ""Assert+WrapperXunitException""" Opened on behalf of @Jiayili1 The test `WindowAndCursorProps/WindowWidth_WindowHeight_InvalidSize` has failed. ``` Assert+WrapperXunitException : File path: D:\A\_work\2\s\src\System.Console\tests\WindowAndCursorProps.cs. Line: 36\r ---- Assert.Throws() Failure\r Expected: typeof(System.ArgumentOutOfRangeException)\r Actual: typeof(System.IO.IOException): The handle is invalid.\r ``` Stack Trace: ``` at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber) in D:\A\_work\2\s\src\Common\tests\System\Diagnostics\AssertWithCallerAttributes.cs:line 583 at Assert.Throws[T](String paramName, Func`1 testCode, String path, Int32 line) in D:\A\_work\2\s\src\Common\tests\System\Diagnostics\AssertWithCallerAttributes.cs:line 512 at WindowAndCursorProps.WindowWidth_WindowHeight_InvalidSize() in D:\A\_work\2\s\src\System.Console\tests\WindowAndCursorProps.cs:line 36 ----- Inner Stack Trace ----- at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded) at System.Console.get_WindowHeight() at System.Console.set_WindowWidth(Int32 value) at WindowAndCursorProps.<>c.b__2_0() in D:\A\_work\2\s\src\System.Console\tests\WindowAndCursorProps.cs:line 36 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fdesktop~2Fcli~2F/build/20160816.02/workItem/System.Console.Tests/analysis/xunit/WindowAndCursorProps~2FWindowWidth_WindowHeight_InvalidSize 10845 area-System.Console "Tests under ""System.Console.Tests"" fail with ""Assert+WrapperXunitException""" Opened on behalf of @Jiayili1 The test `CancelKeyPressTests/CanAddAndRemoveHandler_Remote` has failed. ``` Assert+WrapperXunitException : File path: D:\A\_work\2\s\src\Common\tests\System\Diagnostics\RemoteExecutorTestBase.cs. Line: 169\r ---- Assert.Equal() Failure\r Expected: 42\r Actual: -532462766 ``` Stack Trace: ``` at Assert.WrapException(Exception e, String callerFilePath, Int32 callerLineNumber) in D:\A\_work\2\s\src\Common\tests\System\Diagnostics\AssertWithCallerAttributes.cs:line 583 at Assert.Equal[T](T expected, T actual, String path, Int32 line) in D:\A\_work\2\s\src\Common\tests\System\Diagnostics\AssertWithCallerAttributes.cs:line 172 at System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle.Dispose() in D:\A\_work\2\s\src\Common\tests\System\Diagnostics\RemoteExecutorTestBase.cs:line 169 at CancelKeyPressTests.CanAddAndRemoveHandler_Remote() in D:\A\_work\2\s\src\System.Console\tests\CancelKeyPress.cs:line 33 ----- Inner Stack Trace ----- at Assert.Equal[T](T expected, T actual, String path, Int32 line) in D:\A\_work\2\s\src\Common\tests\System\Diagnostics\AssertWithCallerAttributes.cs:line 171 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fdesktop~2Fcli~2F/build/20160816.02/workItem/System.Console.Tests Failed tests: CancelKeyPressTests/CanAddAndRemoveHandler_Remote ReadKey/RedirectedConsole_ReadKey RedirectedStream/ErrorRedirect RedirectedStream/InputRedirect RedirectedStream/OutputRedirect WindowAndCursorProps/Title_Set_Windows WindowAndCursorProps/Title_Set_Windows_longlength 10846 area-Serialization Test failure: System.Runtime.Serialization.Xml.Tests.XmlDictionaryReaderTests/ReadElementContentAsStringDataExceedsMaxBytesPerReadQuota Opened on behalf of @jiangzeng The test `System.Runtime.Serialization.Xml.Tests.XmlDictionaryReaderTests/ReadElementContentAsStringDataExceedsMaxBytesPerReadQuota` has failed. ``` System.ArgumentOutOfRangeException : Only Element nodes have attributes.\r Parameter name: index ``` Stack Trace: ``` at System.Xml.XmlBaseReader.GetAttributeNode(Int32 index) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Xml\XmlBaseReader.cs:line 525 at System.Xml.XmlBaseReader.MoveToAttribute(Int32 index) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Xml\XmlBaseReader.cs:line 809 at System.Runtime.Serialization.Xml.Tests.XmlDictionaryReaderTests.ReadElementContentAsStringDataExceedsMaxBytesPerReadQuota() in D:\A\_work\2\s\src\System.Runtime.Serialization.Xml\tests\XmlDictionaryReaderTests.cs:line 86 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.02/workItem/System.Runtime.Serialization.Xml.Tests/analysis/xunit/System.Runtime.Serialization.Xml.Tests.XmlDictionaryReaderTests~2FReadElementContentAsStringDataExceedsMaxBytesPerReadQuota Same issue for the following tests: System.Runtime.Serialization.Xml.Tests.XmlDictionaryReaderTests/ReadElementContentAsStringDataExceedsMaxBytesPerReadQuota System.Runtime.Serialization.Xml.Tests.XmlDictionaryReaderTests/ReadValueChunkReadEncodedDoubleWideChars 10847 area-Serialization Test failure: XmlDictionaryWriterTest/XmlBaseWriter_CheckAsync_ThrowInvalidOperationException Opened on behalf of @jiangzeng The test `XmlDictionaryWriterTest/XmlBaseWriter_CheckAsync_ThrowInvalidOperationException` has failed. ``` System.NotImplementedException : The method or operation is not implemented. ``` Stack Trace: ``` at System.Xml.XmlWriter.WriteRawAsync(Char[] buffer, Int32 index, Int32 count) at System.Xml.XmlDictionaryAsyncCheckWriter.WriteRawAsync(Char[] buffer, Int32 index, Int32 count) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Xml\XmlDictionaryAsyncCheckWriter.cs:line 333 at XmlDictionaryWriterTest.XmlBaseWriter_CheckAsync_ThrowInvalidOperationException() in D:\A\_work\2\s\src\System.Runtime.Serialization.Xml\tests\XmlDictionaryWriterTest.cs:line 106 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.02/workItem/System.Runtime.Serialization.Xml.Tests/analysis/xunit/XmlDictionaryWriterTest~2FXmlBaseWriter_CheckAsync_ThrowInvalidOperationException Same issue for the tests: XmlDictionaryWriterTest/XmlBaseWriter_CheckAsync_ThrowInvalidOperationException XmlDictionaryWriterTest/XmlBaseWriter_WriteBase64Async XmlDictionaryWriterTest/XmlBaseWriter_WriteStartEndElementAsync 10848 area-Serialization Test failure: XmlDictionaryWriterTest/XmlBaseWriter_FlushAsync Opened on behalf of @jiangzeng The test `XmlDictionaryWriterTest/XmlBaseWriter_FlushAsync` has failed. ``` System.ArgumentNullException : Value cannot be null.\r Parameter name: buffer ``` Stack Trace: ``` at System.Xml.XmlBaseWriter.WriteBase64Async(Byte[] buffer, Int32 offset, Int32 count) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Xml\XmlBaseWriter.cs:line 1550 at System.Xml.XmlDictionaryAsyncCheckWriter.WriteBase64Async(Byte[] buffer, Int32 index, Int32 count) in D:\A\_work\2\s\src\System.Private.DataContractSerialization\src\System\Xml\XmlDictionaryAsyncCheckWriter.cs:line 123 at XmlDictionaryWriterTest.XmlBaseWriter_FlushAsync() in D:\A\_work\2\s\src\System.Runtime.Serialization.Xml\tests\XmlDictionaryWriterTest.cs:line 57 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.02/workItem/System.Runtime.Serialization.Xml.Tests/analysis/xunit/XmlDictionaryWriterTest~2FXmlBaseWriter_FlushAsync 10849 area-System.Data "Tests under ""System.Data.SqlClient.Tests"" fail with ""System.IO.FileLoadException""" Opened on behalf of @Jiayili1 The test `System.Data.SqlClient.Tests.ExceptionTest/ExceptionTests` has failed. ``` System.IO.FileLoadException : Could not load file or assembly 'System.Data.Common, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ``` Stack Trace: ``` at System.Data.SqlClient.Tests.ExceptionTest.ExceptionTests() ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fdesktop~2Fcli~2F/build/20160816.02/workItem/System.Data.SqlClient.Tests Failed tests: System.Data.SqlClient.Tests.ExceptionTest/ExceptionTests System.Data.SqlClient.Tests.ExceptionTest/IndependentConnectionExceptionTestExecuteReader System.Data.SqlClient.Tests.ExceptionTest/IndependentConnectionExceptionTestOpenConnection System.Data.SqlClient.Tests.ExceptionTest/VariousExceptionTests System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/Add_AddItems_ItemsAddedAsEpected System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/Add_HelperOverloads_ItemsAddedAsExpected System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/Add_InvalidItems_ThrowsInvalidOperationException System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/Contains_ItemsAdded_MatchesExpectation System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/CopyTo_InvalidArrayType_Throws System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/CopyTo_ItemsAdded_ItemsCopiedToArray System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/GetEnumerator_ItemsAdded_AllItemsReturnedAndEnumeratorBehavesAsExpected System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/GetEnumerator_ItemsAdded_ItemsFromEnumeratorMatchesItemsFromIndexer System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/GetEnumerator_ModifiedCollectionDuringEnumeration_ThrowsInvalidOperationException System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/GetEnumerator_NoItems_EmptyEnumerator System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/IListAddInsert_InsertNonSqlBulkCopyColumnMappingItems_DoNotThrow System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/IndexOf_BehavesAsExpected System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/Indexer_BehavesAsExpected System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/InsertAndClear_BehavesAsExpected System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/Insert_BehavesAsExpected System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/Members_InvalidRange_ThrowsArgumentOutOfRangeException System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/Methods_NullParameterPassed_ThrowsArgumentNullException System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/Properties_ReturnFalse System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/RemoveAt_BehavesAsExpected System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/Remove_BehavesAsExpected System.Data.SqlClient.Tests.SqlBulkCopyColumnMappingCollectionTest/SyncRoot_NotNullAndSameObject System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Add_ExistingKey_Throws System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Add_NullKey_Throws System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Add_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Clear_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Contains_NullKey_Throws System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_CopyTo_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_CopyTo_Throws System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_ExpectedKeysInDictionary_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_GetEnumerator_ModifyCollection_Throws System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_GetEnumerator_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_IsFixedSize_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_IsReadOnly_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_IsSynchronized_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Keys_CopyTo_ObjectArray_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Keys_CopyTo_StringArray_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Keys_CopyTo_Throws System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Keys_GetEnumerator_ModifyCollection_Throws System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Keys_GetEnumerator_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Keys_IsSynchronized_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Keys_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Keys_SyncRoot_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Remove_ExistingKey_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Remove_NonExistentKey_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Remove_NullKey_Throws System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Setter_ExistingKey_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Setter_NullKey_Throws System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Setter_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_SyncRoot_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_UnexpectedKeysNotInDictionary_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Values_CopyTo_Int64Array_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Values_CopyTo_ObjectArray_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Values_CopyTo_Throws System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Values_GetEnumerator_ModifyCollection_Throws System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Values_GetEnumerator_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Values_IsSynchronized_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Values_Success System.Data.SqlClient.Tests.SqlConnectionTest/RetrieveStatistics_Values_SyncRoot_Success System.Data.SqlClient.Tests.SqlErrorCollectionTest/CopyTo_NonGeneric_Success System.Data.SqlClient.Tests.SqlErrorCollectionTest/CopyTo_NonGeneric_Throws System.Data.SqlClient.Tests.SqlErrorCollectionTest/CopyTo_Success System.Data.SqlClient.Tests.SqlErrorCollectionTest/CopyTo_Throws System.Data.SqlClient.Tests.SqlErrorCollectionTest/GetEnumerator_Success System.Data.SqlClient.Tests.SqlErrorCollectionTest/Indexer_Success System.Data.SqlClient.Tests.SqlErrorCollectionTest/Indexer_Throws System.Data.SqlClient.Tests.SqlErrorCollectionTest/IsSynchronized_Success System.Data.SqlClient.Tests.SqlErrorCollectionTest/SyncRoot_Success 10850 area-System.Data "Test failure: System.Data.SqlClient.Tests.SqlStringTest/CultureInfo_InvalidLcid_Throws fail with ""Xunit.Sdk.ThrowsException""" Opened on behalf of @Jiayili1 The test `System.Data.SqlClient.Tests.SqlStringTest/CultureInfo_InvalidLcid_Throws` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.ArgumentOutOfRangeException)\r Actual: typeof(System.TypeInitializationException): The type initializer for 'System.Data.Locale' threw an exception. ``` Stack Trace: ``` at System.Data.Locale.GetLocaleNameForLcid(Int32 lcid) at System.Data.SqlTypes.SqlString.get_CultureInfo() in D:\A\_work\2\s\src\System.Data.SqlClient\src\System\Data\SqlTypes\SQLString.cs:line 281 at System.Data.SqlClient.Tests.SqlStringTest.<>c.b__4_0() in D:\A\_work\2\s\src\System.Data.SqlClient\tests\FunctionalTests\SqlStringTest.cs:line 47 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fdesktop~2Fcli~2F/build/20160816.02/workItem/System.Data.SqlClient.Tests/analysis/xunit/System.Data.SqlClient.Tests.SqlStringTest~2FCultureInfo_InvalidLcid_Throws 10851 area-System.Data "Test failure: System.Data.SqlClient.Tests.SqlStringTest/Constructor_ValueLcid_Success fail with ""System.TypeInitializationException""" Opened on behalf of @Jiayili1 The test `System.Data.SqlClient.Tests.SqlStringTest/Constructor_ValueLcid_Success` has failed. ``` System.TypeInitializationException : The type initializer for 'System.Data.Locale' threw an exception.\r ---- System.IO.FileLoadException : Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ``` Stack Trace: ``` at System.Data.Locale.GetLocaleNameForLcid(Int32 lcid) at System.Data.SqlTypes.SqlString.get_CultureInfo() in D:\A\_work\2\s\src\System.Data.SqlClient\src\System\Data\SqlTypes\SQLString.cs:line 281 at System.Data.SqlClient.Tests.SqlStringTest.ValidateProperties(String value, CultureInfo culture, SqlString sqlString) in D:\A\_work\2\s\src\System.Data.SqlClient\tests\FunctionalTests\SqlStringTest.cs:line 38 at System.Data.SqlClient.Tests.SqlStringTest.Constructor_ValueLcid_Success(Int32 lcid, String name) in D:\A\_work\2\s\src\System.Data.SqlClient\tests\FunctionalTests\SqlStringTest.cs:line 30 ----- Inner Stack Trace ----- at System.Data.Locale..cctor() ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Debug - AnyCPU-Release Failed tests: System.Data.SqlClient.Tests.SqlStringTest/Constructor_ValueLcid_Success System.Data.SqlClient.Tests.SqlStringTest/Constructor_Value_Success 10852 area-Serialization Three JSON serialization tests failing on Linux "``` DataContractJsonSerializerTests.DCJS_ArrayOfDateTime [FAIL] strings differ at index 12 ↓ [expected]:\/Date(946811045000-0800)\/"","" [actual ]:\/Date(946782245000+0000)\/"","" ↑ [Expected (with length=62)]: [""\/Date(946811045000-0800)\/"",""\/Date(1296734706000-0800)\/""] [Actual (with length=62)]: [""\/Date(946782245000+0000)\/"",""\/Date(1296705906000+0000)\/""] Test failed for input: System.DateTime[] Expected: [""\/Date(946811045000-0800)\/"",""\/Date(1296734706000-0800)\/""] Actual: [""\/Date(946782245000+0000)\/"",""\/Date(1296705906000+0000)\/""] Expected: True Actual: False Stack Trace: at DataContractJsonSerializerTests.SerializeAndDeserialize[T](T value, String baseline, DataContractJsonSerializerSettings settings, Func`1 serializerFactory, Boolean skipStringCompare) at DataContractJsonSerializerTests.DCJS_ArrayOfDateTime() DataContractJsonSerializerTests.DCJS_TypeWithAllPrimitiveProperties [FAIL] strings differ at index 69 ↓ [expected]:Date(1467994211000-0700)\/"",""D [actual ]:Date(1467969011000+0000)\/"",""D ↑ [Expected (with length=262)]: {""BooleanMember"":true,""CharMember"":""C"",""DateTimeMember"":""\/Date(1467994211000-0700)\/"",""DecimalMember"":-14554481076115341312123,""DoubleMember"":123.456,""FloatMember"":456.789,""GuidMember"":""2054fd3e-e118-476a-9962-1a882be51860"",""IntMember"":123,""StringMember"":""abc""} [Actual (with length=262)]: {""BooleanMember"":true,""CharMember"":""C"",""DateTimeMember"":""\/Date(1467969011000+0000)\/"",""DecimalMember"":-14554481076115341312123,""DoubleMember"":123.456,""FloatMember"":456.789,""GuidMember"":""2054fd3e-e118-476a-9962-1a882be51860"",""IntMember"":123,""StringMember"":""abc""} Test failed for input: SerializationTypes.TypeWithAllPrimitiveProperties Expected: {""BooleanMember"":true,""CharMember"":""C"",""DateTimeMember"":""\/Date(1467994211000-0700)\/"",""DecimalMember"":-14554481076115341312123,""DoubleMember"":123.456,""FloatMember"":456.789,""GuidMember"":""2054fd3e-e118-476a-9962-1a882be51860"",""IntMember"":123,""StringMember"":""abc""} Actual: {""BooleanMember"":true,""CharMember"":""C"",""DateTimeMember"":""\/Date(1467969011000+0000)\/"",""DecimalMember"":-14554481076115341312123,""DoubleMember"":123.456,""FloatMember"":456.789,""GuidMember"":""2054fd3e-e118-476a-9962-1a882be51860"",""IntMember"":123,""StringMember"":""abc""} Expected: True Actual: False Stack Trace: at DataContractJsonSerializerTests.SerializeAndDeserialize[T](T value, String baseline, DataContractJsonSerializerSettings settings, Func`1 serializerFactory, Boolean skipStringCompare) at DataContractJsonSerializerTests.DCJS_TypeWithAllPrimitiveProperties() DataContractSerializerTests.DCS_ArrayOfDateTime [FAIL] XML comparison is also failing Test failed for input: System.DateTime[] Expected: 2000-01-02T03:04:05-08:002011-02-03T04:05:06-08:00 Actual: 2000-01-02T03:04:05Z2011-02-03T04:05:06Z Expected: True Actual: False Stack Trace: at DataContractSerializerTests.SerializeAndDeserialize[T](T value, String baseline, DataContractSerializerSettings settings, Func`1 serializerFactory, Boolean skipStringCompare) at DataContractSerializerTests.DCS_ArrayOfDateTime() ``` " 10854 area-System.Collections Queue.Enumerator still uses the modulo operator during MoveNext Queue.Enqueue/Dequeue were changed a while ago not to use `div` since it's pretty slow (takes many cycles): #2515 We should do the same for [this method](https://github.com/dotnet/corefx/blob/master/src/System.Collections/src/System/Collections/Generic/Queue.cs#L290) which is currently still using modulo. 10856 area-Infrastructure Use same compiler in all corefx builds "In corefx, on windows, the default is still too use the shared compiler, you have to opt into using this Roslyn compiler via ""UseSharedCompilation=false"". On Linux, the default is to use this Rosslyn compiler. All corefx builds should be using the same compiler so that available features across builds are identical. https://github.com/dotnet/buildtools/pull/947 " 10858 area-System.Net Interop+OpenSsl+SslException: SSL Read BIO failed with OpenSSL error "I have an ASP.Net Core app running on OSX using Kestrel and HTTPS. ``` private void MyListener(CancellationToken token) { var certificate = new X509Certificate2(Path.Combine(Path.GetDirectoryName(typeof(MyClass).GetTypeInfo().Assembly.Location),""cert.pfx""),""""); var urlPrefix = ""https://*:""; var url = urlPrefix + this.ListenerPort + ""/""; var host = new WebHostBuilder() .UseKestrel(options => { options.UseHttps(certificate); options.NoDelay = true; options.UseConnectionLogging(); }) .UseUrls(url) .UseStartup() .Build(); host.Run(token); } ``` The server starts fine but when a request is processed I get an exception logged. ``` warn: Microsoft.AspNetCore.Server.Kestrel[0] Connection processing ended abnormally System.IO.IOException: The encryption operation failed, see inner exception. ---> Interop+OpenSsl+SslException: SSL Read BIO failed with OpenSSL error - . at Interop.OpenSsl.BioRead(SafeBioHandle bio, Byte[] buffer, Int32 count) at Interop.OpenSsl.Encrypt(SafeSslHandle context, Byte[] input, Int32 offset, Int32 count, Byte[]& output, SslErrorCode& errorCode) at System.Net.SslStreamPal.EncryptDecryptHelper(SafeDeleteContext securityContext, Byte[] input, Int32 offset, Int32 size, Boolean encrypt, Byte[]& output, Int32& resultSize) --- End of inner exception stack trace --- at System.Net.Security.SslStreamInternal.StartWriting(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslStreamInternal.ProcessWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslStreamInternal.BeginWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback asyncCallback, Object asyncState) at System.Net.Security.SslStream.<>c.b__86_0(Byte[] bufferArg, Int32 offsetArg, Int32 sizeArg, AsyncCallback callback, Object state) at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl[TArg1,TArg2,TArg3](Func`6 beginMethod, Func`2 endFunction, Action`1 endAction, TArg1 arg1, TArg2 arg2, TArg3 arg3, Object state, TaskCreationOptions creationOptions) at System.Net.Security.SslStream.WriteAsync(Byte[] buffer, Int32 offset, Int32 size, CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Filter.Internal.LoggingStream.WriteAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Filter.Internal.StreamSocketOutput.WriteAsync(ArraySegment`1 buffer, Boolean chunk, CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Frame.d__153.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Frame`1.d__2.MoveNext() ``` This is also an issue on Linux I believe after finding an issue on SO http://stackoverflow.com/questions/38960081/asp-net-core-linux-ssl-ssl-read-bio-failed-with-openssl-error " 10859 area-System.Data Implement DbProviderFactories DbProviderFactories is not currently implemented in the CoreFx but was in the full framework since version 2.0. Doc : https://msdn.microsoft.com/fr-fr/library/system.data.common.dbproviderfactories(v=vs.110).aspx Source code : http://referencesource.microsoft.com/#System.Data/System/Data/Common/DbProviderFactories.cs Any advise on porting the code? 10860 area-System.Reflection System.Reflection.Emit incorrectly lists NETCore50 as supported This problem has existed since the first release of the package. You could never actually use this package on netcore50 because it depended on System.Reflection.Emit.ILGeneration which correctly **did not** support netcore50. I need to add some additional knobs on package harvesting to clean this up. 10867 area-Infrastructure Enable per-commit arm64 build and test runs @gkhanna79 @Priya91 10872 area-Infrastructure Wrong calculated values for FilterOSGroup with run.exe When calling `build-packages.cmd/sh` the values calculated for the property `FilterToOSGroup` are: - Windows: `FilterToOSGroup=win7` and it should be `FilterToOSGroup=Windows_NT` - Mac: `FilterToOSGroup=osx.10.10` and it should be `FilterToOSGroup=osx.10` 10873 area-System.IO Test failure: System.IO.Tests.File_Delete_Tests/FileSystemWatcher_File_Delete_DeepDirectoryStructure Opened on behalf of @jiangzeng The test `System.IO.Tests.File_Delete_Tests/FileSystemWatcher_File_Delete_DeepDirectoryStructure` has failed. ``` System.IO.DirectoryNotFoundException : Could not find a part of the path '/tmp/File_Delete_Tests_qzhewplr.ib5/FileSystemWatcher_File_Delete_DeepDirectoryStructure_78/dir/dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dir10/dir11/dir12/dir13/dir14/dir15/dir16/dir17/dir18/dir19/file'. ``` Stack Trace: ``` at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter) at Interop.CheckIo[TSafeHandle](TSafeHandle handle, String path, Boolean isDirectory, Func`2 errorRewriter) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode) at System.IO.UnixFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) at System.IO.UnixFileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.Tests.File_Delete_Tests.<>c__DisplayClass3_0.b__1() at System.IO.Tests.FileSystemWatcherTest.ExpectEvent(FileSystemWatcher watcher, WatcherChangeTypes expectedEvents, Action action, Action cleanup, String[] expectedPaths, Int32 attempts) at System.IO.Tests.File_Delete_Tests.FileSystemWatcher_File_Delete_DeepDirectoryStructure() ``` Failing configurations: - OSX.1011.Amd64 - AnyCPU-Release Details: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fcli~2F/build/20160816.08/workItem/System.IO.FileSystem.Watcher.Tests/analysis/xunit/System.IO.Tests.File_Delete_Tests~2FFileSystemWatcher_File_Delete_DeepDirectoryStructure 10875 area-System.IO Test failure: System.IO.Packaging.Tests.Tests/T018_GetMainDocPartAndStyleDefPart Opened on behalf of @jiangzeng The test `System.IO.Packaging.Tests.Tests/T018_GetMainDocPartAndStyleDefPart` has failed. ``` System.MissingMethodException : Method not found: 'System.Xml.Linq.XDocument System.Xml.Linq.XDocument.Load(System.Xml.XmlReader)'. ``` Stack Trace: ``` at System.IO.Packaging.Tests.Tests.T018_GetMainDocPartAndStyleDefPart() ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Details: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.08/workItem/System.IO.Packaging.Tests/analysis/xunit/System.IO.Packaging.Tests.Tests~2FT018_GetMainDocPartAndStyleDefPart Same issue for the test: System.IO.Packaging.Tests.Tests/T019_GetPartFromRelativeUri 10877 area-System.Collections Test failure: System.Collections.Tests.SortedList_IDictionary_NonGeneric_Tests/IDictionary_NonGeneric_ItemSet_KeyOfWrongType Opened on behalf of @jiangzeng The test `System.Collections.Tests.SortedList_IDictionary_NonGeneric_Tests/IDictionary_NonGeneric_ItemSet_KeyOfWrongType` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.ArgumentException)\r Actual: typeof(System.ArgumentNullException): Value cannot be null.\r Parameter name: key ``` Stack Trace: ``` at System.Collections.Generic.SortedList`2.System.Collections.IDictionary.set_Item(Object key, Object value) at System.Collections.Tests.SortedList_IDictionary_NonGeneric_Tests.<>c__DisplayClass6_0.b__0() in D:\A\_work\2\s\src\System.Collections\tests\Generic\SortedList\SortedList.Tests.cs:line 51 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Details: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.08/workItem/System.Collections.Tests/analysis/xunit/System.Collections.Tests.SortedList_IDictionary_NonGeneric_Tests~2FIDictionary_NonGeneric_ItemSet_KeyOfWrongType 10878 area-System.Security Test failure: System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.EdgeCasesTests/Rc4AndCngWrappersDontMixTest Opened on behalf of @jiangzeng The test `System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.EdgeCasesTests/Rc4AndCngWrappersDontMixTest` has failed. ``` Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The request is not supported ``` Stack Trace: ``` at System.Security.Cryptography.Pkcs.EnvelopedCms.DecryptContent(RecipientInfoCollection recipientInfos, X509Certificate2Collection extraStore) at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.EdgeCasesTests.Rc4AndCngWrappersDontMixTest() in D:\A\_work\2\s\src\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\EdgeCasesTests.cs:line 158 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Details: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.08/workItem/System.Security.Cryptography.Pkcs.Tests/analysis/xunit/System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.EdgeCasesTests~2FRc4AndCngWrappersDontMixTest 10879 area-System.Security Test failure: System.Security.Cryptography.X509Certificates.Tests.PfxTests/ReadECDsaPrivateKey_BrainpoolP160r1_Pfx Opened on behalf of @jiangzeng The test `System.Security.Cryptography.X509Certificates.Tests.PfxTests/ReadECDsaPrivateKey_BrainpoolP160r1_Pfx` has failed. ``` System.NullReferenceException : Object reference not set to an instance of an object. ``` Stack Trace: ``` at System.Security.Cryptography.X509Certificates.Tests.PfxTests.AssertEccAlgorithm(ECDsa ecdsa, String algorithmId) in D:\A\_work\2\s\src\System.Security.Cryptography.X509Certificates\tests\PfxTests.cs:line 196 at System.Security.Cryptography.X509Certificates.Tests.PfxTests.ReadECDsaPrivateKey_BrainpoolP160r1_Pfx(Byte[] pfxData) in D:\A\_work\2\s\src\System.Security.Cryptography.X509Certificates\tests\PfxTests.cs:line 148 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Details: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.08/workItem/System.Security.Cryptography.X509Certificates.Tests/analysis/xunit/System.Security.Cryptography.X509Certificates.Tests.PfxTests~2FReadECDsaPrivateKey_BrainpoolP160r1_Pfx 10880 area-System.Diagnostics "Tests under ""System.Diagnostics.TextWriterTraceListenerTests.DelimiterWriteMethodTests"" fail with ""Xunit.Sdk.EqualException""" "Opened on behalf of @Jiayili1 The test `System.Diagnostics.TextWriterTraceListenerTests.DelimiterWriteMethodTests/TraceData_ObjectArray_Test` has failed. ``` Assert.Equal() Failure\r ? (pos 32)\r Expected: ···;Verbose;12;;;73032;""9"";""2016-08-17T00:26:12.8975461Z"";264819···\r Actual: ···;Verbose;12;;;73032;;""9"";""2016-08-17T00:26:12.8975461Z"";26481···\r ? (pos 32) ``` Stack Trace: ``` at System.Diagnostics.TextWriterTraceListenerTests.DelimiterWriteMethodTests.TraceData_ObjectArray_Test(String delimiter, TraceFilter filter, TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, Object[] data) in D:\A\_work\4\s\src\System.Diagnostics.TextWriterTraceListener\tests\DelimiterWriteMethodTests.cs:line 147 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fdesktop~2Fcli~2F/build/20160816.08/workItem/System.Diagnostics.TextWriterTraceListener.Tests Failed tests: System.Diagnostics.TextWriterTraceListenerTests.DelimiterWriteMethodTests/TraceData_ObjectArray_Test System.Diagnostics.TextWriterTraceListenerTests.DelimiterWriteMethodTests/TraceData_Object_Test System.Diagnostics.TextWriterTraceListenerTests.DelimiterWriteMethodTests/TraceEvent_FormatString_Test System.Diagnostics.TextWriterTraceListenerTests.DelimiterWriteMethodTests/TraceEvent_String_Test " 10881 area-System.Security "Tests fail with ""System.PlatformNotSupportedException : Operation is not supported on this platform""" Opened on behalf of @jiangzeng The test `System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests/TestECDsa224PublicKey` has failed. ``` System.PlatformNotSupportedException : Operation is not supported on this platform. ``` Stack Trace: ``` at Internal.Cryptography.Pal.X509Pal.ImportPublicKeyInfo(SafeCertContextHandle certContext) at Internal.Cryptography.Pal.X509Pal.DecodeECDsaPublicKey(CertificatePal certificatePal) at Internal.Cryptography.Pal.X509Pal.DecodePublicKey(Oid oid, Byte[] encodedKeyValue, Byte[] encodedParameters, ICertificatePal certificatePal) at Internal.Cryptography.Pal.CertificateExtensionsCommon.GetPublicKey[T](X509Certificate2 certificate, Predicate`1 matchesConstraints) at System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests.TestECDsa224PublicKey() in D:\A\_work\2\s\src\System.Security.Cryptography.X509Certificates\tests\PublicKeyTests.cs:line 315 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Details: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.08/workItem/System.Security.Cryptography.X509Certificates.Tests/analysis/xunit/System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests~2FTestECDsa224PublicKey Same issue for the following tests: System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests/TestECDsa224PublicKey System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests/TestECDsaPublicKey System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests/TestECDsaPublicKey_BrainpoolP160r1_ValidatesSignature System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests/TestECDsaPublicKey_ValidatesSignature System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests/TestKey_ECDsaCng256 System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests/TestKey_ECDsaCng384 System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests/TestKey_ECDsaCng521 System.Security.Cryptography.X509Certificates.Tests.PublicKeyTests/TestKey_ECDsabrainpool_PublicKey 10883 area-System.Security Test failure: WindowsIdentityTests/CloneAndProperties Opened on behalf of @jiangzeng The test `WindowsIdentityTests/CloneAndProperties` has failed. ``` System.UnauthorizedAccessException : Attempted to perform an unauthorized operation. ``` Stack Trace: ``` at System.Security.Principal.WindowsIdentity.get_AuthenticationType() at System.Security.Claims.ClaimsIdentity..ctor(IIdentity identity, IEnumerable`1 claims, String authenticationType, String nameType, String roleType) at System.Security.Principal.WindowsIdentity..ctor(WindowsIdentity identity) at System.Security.Principal.WindowsIdentity.Clone() at WindowsIdentityTests.CloneAndProperties() in D:\A\_work\2\s\src\System.Security.Principal.Windows\tests\WindowsIdentityTests.cs:line 45 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Details: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.08/workItem/System.Security.Principal.Windows.Tests/analysis/xunit/WindowsIdentityTests~2FCloneAndProperties 10884 area-System.Security Test failure: WindowsIdentityTests/ConstructorsAndProperties Opened on behalf of @jiangzeng The test `WindowsIdentityTests/ConstructorsAndProperties` has failed. ``` Assert.True() Failure\r Expected: True\r Actual: False ``` Stack Trace: ``` at WindowsIdentityTests.ConstructorsAndProperties() in D:\A\_work\2\s\src\System.Security.Principal.Windows\tests\WindowsIdentityTests.cs:line 36 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Details: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.08/workItem/System.Security.Principal.Windows.Tests/analysis/xunit/WindowsIdentityTests~2FConstructorsAndProperties 10885 area-System.Globalization "Tests under ""System.Globalization.Tests"" fail with ""System.AggregateException""" Opened on behalf of @Jiayili1 The test `System.Globalization.Tests.CultureInfoAsync/TestCurrentCulturesAsync` has failed. ``` System.AggregateException : One or more errors occurred.\r ---- Assert.Equal() Failure\r Expected: en-US\r Actual: ja-JP ``` Stack Trace: ``` at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Globalization.Tests.CultureInfoAsync.TestCurrentCulturesAsync() in D:\A\_work\4\s\src\System.Globalization\tests\CultureInfo\CultureInfoAsync.cs:line 32 ----- Inner Stack Trace ----- at System.Globalization.Tests.CultureInfoAsync.<>c__DisplayClass0_0.b__0() in D:\A\_work\4\s\src\System.Globalization\tests\CultureInfo\CultureInfoAsync.cs:line 27 at System.Threading.Tasks.Task.Execute() ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fdesktop~2Fcli~2F/build/20160816.08/workItem/System.Globalization.Tests Failed Tests: System.Globalization.Tests.CultureInfoAsync/TestCurrentCulturesAsync System.Globalization.Tests.CultureInfoAsync/TestCurrentCulturesWithAwait 10886 area-System.Text Test failure: System.Text.Tests.EncodingTest/TestDefaultEncodings Opened on behalf of @jiangzeng The test `System.Text.Tests.EncodingTest/TestDefaultEncodings` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.NotSupportedException)\r Actual: (No exception was thrown) ``` Stack Trace: ``` at System.Text.Tests.EncodingTest.TestDefaultEncodings() in D:\A\_work\2\s\src\System.Text.Encoding.CodePages\tests\EncodingCodePages.cs:line 464 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Details: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.08/workItem/System.Text.Encoding.CodePages.Tests/analysis/xunit/System.Text.Tests.EncodingTest~2FTestDefaultEncodings 10887 area-System.IO "Tests under ""System.IO.Compression.Tests"" fail with ""Xunit.Sdk.EqualException""" Opened on behalf of @Jiayili1 The test `System.IO.Compression.Tests.DeflateStreamTests/FlushBeforeFirstWrites` has failed. ``` Assert.Equal() Failure\r Expected: Byte[] [62, 23, 186, 150, 174]\r Actual: Byte[] [] ``` Stack Trace: ``` at System.IO.Compression.Tests.DeflateStreamTests.d__48.MoveNext() in D:\A\_work\4\s\src\System.IO.Compression\tests\DeflateStreamTests.cs:line 822 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.IO.Compression.Tests.DeflateStreamTests.d__47.MoveNext() in D:\A\_work\4\s\src\System.IO.Compression\tests\DeflateStreamTests.cs:line 805 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fdesktop~2Fcli~2F/build/20160816.08/workItem/System.IO.Compression.Tests Failed Tests: System.IO.Compression.Tests.DeflateStreamTests/FlushBeforeFirstWrites System.IO.Compression.Tests.DeflateStreamTests/RoundTripWithFlush 10888 area-System.IO Test failure: System.IO.Compression.Tests.DeflateStreamTests/WrapNullReturningTasksStream Opened on behalf of @Jiayili1 The test `System.IO.Compression.Tests.DeflateStreamTests/WrapNullReturningTasksStream` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.InvalidOperationException)\r Actual: (No exception was thrown) ``` Stack Trace: ``` --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.IO.Compression.Tests.DeflateStreamTests.d__51.MoveNext() in D:\A\_work\4\s\src\System.IO.Compression\tests\DeflateStreamTests.cs:line 884 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fdesktop~2Fcli~2F/build/20160816.08/workItem/System.IO.Compression.Tests 10889 area-System.IO Test failure: System.IO.Compression.Tests.DeflateStreamTests/WrapStreamReturningBadReadValues Opened on behalf of @Jiayili1 The test `System.IO.Compression.Tests.DeflateStreamTests/WrapStreamReturningBadReadValues` has failed. ``` System.IO.InvalidDataException : Block length does not match with its complement. ``` Stack Trace: ``` at System.IO.Compression.Inflater.DecodeUncompressedBlock(Boolean& end_of_block) at System.IO.Compression.Inflater.Decode() at System.IO.Compression.Inflater.Inflate(Byte[] bytes, Int32 offset, Int32 length) at System.IO.Compression.DeflateStream.Read(Byte[] array, Int32 offset, Int32 count) at System.IO.Compression.Tests.DeflateStreamTests.d__52.MoveNext() in D:\A\_work\4\s\src\System.IO.Compression\tests\DeflateStreamTests.cs:line 896 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fdesktop~2Fcli~2F/build/20160816.08/workItem/System.IO.Compression.Tests/analysis/xunit/System.IO.Compression.Tests.DeflateStreamTests~2FWrapStreamReturningBadReadValues 10890 area-System.IO "Tests under ""System.IO.Compression.Tests.DeflateStreamTests"" fail with ""Xunit.Sdk.TrueException""" Opened on behalf of @Jiayili1 The test `System.IO.Compression.Tests.DeflateStreamTests/OverlappingFlushAsync_DuringFlushAsync` has failed. ``` Assert.True() Failure\r Expected: True\r Actual: False ``` Stack Trace: ``` at System.IO.Compression.Tests.DeflateStreamTests.d__2.MoveNext() in D:\A\_work\4\s\src\System.IO.Compression\tests\DeflateStreamTests.cs:line 64 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fdesktop~2Fcli~2F/build/20160816.08/workItem/System.IO.Compression.Tests Failed tests: System.IO.Compression.Tests.DeflateStreamTests/OverlappingFlushAsync_DuringFlushAsync System.IO.Compression.Tests.DeflateStreamTests/OverlappingFlushAsync_DuringReadAsync System.IO.Compression.Tests.DeflateStreamTests/OverlappingFlushAsync_DuringWriteAsync System.IO.Compression.Tests.DeflateStreamTests/OverlappingReadAsync System.IO.Compression.Tests.DeflateStreamTests/OverlappingWriteAsync System.IO.Compression.Tests.DeflateStreamTests/Precancellation 10891 area-System.Threading "Tests under ""ThreadPoolBoundHandleTests"" fail with ""System.ArgumentException : 'handle' has been disposed or is an invalid handle""" Opened on behalf of @jiangzeng The test `ThreadPoolBoundHandleTests/AllocateNativeOverlapped_BlittableTypeAsPinData_DoesNotThrow` has failed. ``` System.ArgumentException : 'handle' has been disposed or is an invalid handle.\r Parameter name: handle ``` Stack Trace: ``` at System.Threading.ThreadPoolBoundHandle.BindHandle(SafeHandle handle) at ThreadPoolBoundHandleTests.AllocateNativeOverlapped_BlittableTypeAsPinData_DoesNotThrow() in D:\A\_work\2\s\src\System.Threading.Overlapped\tests\ThreadPoolBoundHandle_AllocateNativeOverlappedTests.cs:line 87 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Details: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.08/workItem/System.Threading.Overlapped.Tests Same issue for the following tests: ThreadPoolBoundHandleTests/AllocateNativeOverlapped_BlittableTypeAsPinData_DoesNotThrow ThreadPoolBoundHandleTests/AllocateNativeOverlapped_EmptyArrayAsPinData_DoesNotThrow ThreadPoolBoundHandleTests/AllocateNativeOverlapped_NonBlittableTypeAsPinData_Throws ThreadPoolBoundHandleTests/AllocateNativeOverlapped_NullAsCallback_ThrowsArgumentNullException ThreadPoolBoundHandleTests/AllocateNativeOverlapped_NullAsContext_DoesNotThrow ThreadPoolBoundHandleTests/AllocateNativeOverlapped_NullAsPinData_DoesNotThrow ThreadPoolBoundHandleTests/AllocateNativeOverlapped_ObjectArrayAsPinData_DoesNotThrow ThreadPoolBoundHandleTests/AllocateNativeOverlapped_ObjectArrayWithNonBlittableTypeAsPinData_Throws ThreadPoolBoundHandleTests/AllocateNativeOverlapped_PossibleReusedReturnedNativeOverlapped_OffsetLowAndOffsetHighSetToZero ThreadPoolBoundHandleTests/AllocateNativeOverlapped_PreAllocated_ReturnedNativeOverlapped_AllFieldsZero ThreadPoolBoundHandleTests/AllocateNativeOverlapped_PreAllocated_ReusedReturnedNativeOverlapped_OffsetLowAndOffsetHighSetToZero ThreadPoolBoundHandleTests/AllocateNativeOverlapped_PreAllocated_ThrowsArgumentNullException ThreadPoolBoundHandleTests/AllocateNativeOverlapped_PreAllocated_WhenAlreadyAllocated_ThrowsArgumentException ThreadPoolBoundHandleTests/AllocateNativeOverlapped_PreAllocated_WhenDisposed_ThrowsObjectDisposedException ThreadPoolBoundHandleTests/AllocateNativeOverlapped_PreAllocated_WhenHandleDisposed_ThrowsObjectDisposedException ThreadPoolBoundHandleTests/AllocateNativeOverlapped_ReturnedNativeOverlapped_AllFieldsZero ThreadPoolBoundHandleTests/AllocateNativeOverlapped_WhenDisposed_ThrowsObjectDisposedException ThreadPoolBoundHandleTests/BindHandle_AlreadyBoundHandleAsHandle_ThrowsArgumentException ThreadPoolBoundHandleTests/Dispose_CalledMultipleTimes_DoesNotThrow ThreadPoolBoundHandleTests/Dispose_DoesNotDisposeHandle ThreadPoolBoundHandleTests/Dispose_WithoutFreeingNativeOverlapped_DoesNotThrow ThreadPoolBoundHandleTests/FlowsAsyncLocalsToCallback ThreadPoolBoundHandleTests/FreeNativeOverlapped_NullAsNativeOverlapped_ThrowsArgumentNullException ThreadPoolBoundHandleTests/FreeNativeOverlapped_WhenDisposed_DoesNotThrow ThreadPoolBoundHandleTests/FreeNativeOverlapped_WithWrongHandle_ThrowsArgumentException ThreadPoolBoundHandleTests/GetNativeOverlappedState_WhenUnderlyingStateIsIAsyncResult_ReturnsIAsyncResult ThreadPoolBoundHandleTests/GetNativeOverlappedState_WhenUnderlyingStateIsNull_ReturnsNull ThreadPoolBoundHandleTests/GetNativeOverlappedState_WhenUnderlyingStateIsObject_ReturnsObject ThreadPoolBoundHandleTests/Handle_AfterDisposed_DoesNotThrow Handle_ReturnsHandle ThreadPoolBoundHandleTests/MultipleOperationsOverMultipleHandles ThreadPoolBoundHandleTests/MultipleOperationsOverSingleHandle ThreadPoolBoundHandleTests/SingleOperationOverSingleHandle 10892 area-System.Xml Test failure: System.Xml.Linq.Tests.XAttributeAxesWithXName/InvalidXNameTest Opened on behalf of @jiangzeng The test `System.Xml.Linq.Tests.XAttributeAxesWithXName/InvalidXNameTest` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.Xml.XmlException)\r Actual: typeof(System.Xml.XmlException): Name cannot begin with the '*' character, hexadecimal value 0x2A. ``` Stack Trace: ``` at System.Xml.XmlConvert.VerifyNCName(String name, ExceptionType exceptionType) at System.Xml.Linq.XName..ctor(XNamespace ns, String localName) at System.Xml.Linq.XNamespace.GetName(String localName) at System.Xml.Linq.Tests.XAttributeAxesWithXName.<>c.b__2_0() in D:\A\_work\2\s\src\System.Xml.XDocument\tests\axes\InvalidParamValidation.cs:line 53 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Details: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.08/workItem/System.Xml.XDocument.Axes.Tests/analysis/xunit/System.Xml.Linq.Tests.XAttributeAxesWithXName~2FInvalidXNameTest 10893 area-System.IO Test failure: System.IO.MemoryMappedFiles.Tests.MemoryMappedFileTests_CreateFromFile/FileDoesNotExist Opened on behalf of @Jiayili1 The test `System.IO.MemoryMappedFiles.Tests.MemoryMappedFileTests_CreateFromFile/FileDoesNotExist` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.IO.FileNotFoundException)\r Actual: typeof(System.ArgumentException): Combining FileMode: Truncate with FileSystemRights: ReadData, CreateFiles is invalid. FileMode.Truncate is valid only when used with FileSystemRights.Write. ``` Stack Trace: ``` at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileSystemRights rights, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.MemoryMappedFiles.MemoryMappedFile.CreateFromFile(String path, FileMode mode, String mapName, Int64 capacity, MemoryMappedFileAccess access) at System.IO.MemoryMappedFiles.Tests.MemoryMappedFileTests_CreateFromFile.<>c__DisplayClass18_0.b__1() in D:\A\_work\4\s\src\System.IO.MemoryMappedFiles\tests\MemoryMappedFile.CreateFromFile.Tests.cs:line 552 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug 10894 area-System.IO Test failure: System.IO.MemoryMappedFiles.Tests.MemoryMappedFileTests_CreateFromFile/FileInUse_CreateFromFile_SucceedsWithReadOnly Opened on behalf of @Jiayili1 The test `System.IO.MemoryMappedFiles.Tests.MemoryMappedFileTests_CreateFromFile/FileInUse_CreateFromFile_SucceedsWithReadOnly` has failed. ``` System.IO.IOException : The process cannot access the file 'C:\Users\DotNetTestRunner\AppData\Local\Temp\MemoryMappedFileTests_CreateFromFile_sjo1vehh.5sv\FileInUse_CreateFromFile_SucceedsWithReadOnly_626' because it is being used by another process. ``` Stack Trace: ``` at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileSystemRights rights, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.MemoryMappedFiles.MemoryMappedFile.CreateFromFile(String path, FileMode mode, String mapName, Int64 capacity, MemoryMappedFileAccess access) at System.IO.MemoryMappedFiles.Tests.MemoryMappedFileTests_CreateFromFile.FileInUse_CreateFromFile_SucceedsWithReadOnly() in D:\A\_work\4\s\src\System.IO.MemoryMappedFiles\tests\MemoryMappedFile.CreateFromFile.Tests.cs:line 626 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug 10895 area-System.IO Test failure: System.IO.MemoryMappedFiles.Tests.MemoryMappedFileTests_CreateFromFile/FileNotOpenedForExecute Few dupes: - Test failure: System.IO.MemoryMappedFiles.Tests.MemoryMappedFileTests_CreateFromFile/FileNotOpenedForExecute - Test failure: System.IO.MemoryMappedFiles.Tests.MemoryMappedFileTests_CreateFromFile/FileInUse_CreateFromFile_SucceedsWithReadOnly - Test failure: System.IO.MemoryMappedFiles.Tests.MemoryMappedFileTests_CreateFromFile/FileDoesNotExist Opened on behalf of @Jiayili1 The test `System.IO.MemoryMappedFiles.Tests.MemoryMappedFileTests_CreateFromFile/FileNotOpenedForExecute` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.UnauthorizedAccessException)\r Actual: (No exception was thrown) ``` Stack Trace: ``` at System.IO.MemoryMappedFiles.Tests.MemoryMappedFileTests_CreateFromFile.FileNotOpenedForExecute(MemoryMappedFileAccess access) in D:\A\_work\4\s\src\System.IO.MemoryMappedFiles\tests\MemoryMappedFile.CreateFromFile.Tests.cs:line 648 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Failed tests: FileNotOpenedForExecute WriteToReadOnlyFile 10896 area-System.Xml "Tests fail with ""System.MissingMethodException : Method not found: 'System.Xml.XmlNodeType System.Xml.Linq.XObject.get_NodeType()'.""" Opened on behalf of @jiangzeng The test `CoreXml.Test.XLinq.FunctionalTests.EventsTests.EvensReplaceAttributes/ExecuteXAttributeVariation` has failed. ``` System.MissingMethodException : Method not found: 'System.Xml.XmlNodeType System.Xml.Linq.XObject.get_NodeType()'. ``` Stack Trace: ``` at CoreXml.Test.XLinq.UndoManager.Changing(Object sender, XObjectChangeEventArgs e) at System.EventHandler`1.Invoke(Object sender, TEventArgs e) at System.Xml.Linq.XObject.NotifyChanging(Object sender, XObjectChangeEventArgs e) at System.Xml.Linq.XElement.RemoveAttributes() at System.Xml.Linq.XElement.ReplaceAttributes(Object content) at CoreXml.Test.XLinq.FunctionalTests.EventsTests.EvensReplaceAttributes.ExecuteXAttributeVariation(XAttribute[] content) in D:\A\_work\2\s\src\System.Xml.XDocument\tests\events\EventsReplace.cs:line 201 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Details: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.08/workItem/System.Xml.XDocument.Events.Tests 10897 area-System.IO "Test failure: System.IO.Packaging.Tests.Tests/T018_GetMainDocPartAndStyleDefPart with ""Xunit.Sdk.NotNullException""" Opened on behalf of @Jiayili1 The test `System.IO.Packaging.Tests.Tests/T018_GetMainDocPartAndStyleDefPart` has failed. ``` Assert.NotNull() Failure ``` Stack Trace: ``` at System.IO.Packaging.Tests.Tests.T018_GetMainDocPartAndStyleDefPart() in D:\A\_work\4\s\src\System.IO.Packaging\tests\Tests.cs:line 1787 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fdesktop~2Fcli~2F/build/20160816.08/workItem/System.IO.Packaging.Tests Failed tests: System.IO.Packaging.Tests.Tests/T018_GetMainDocPartAndStyleDefPart System.IO.Packaging.Tests.Tests/T019_GetPartFromRelativeUri System.IO.Packaging.Tests.Tests/T020_GetNonExistentPart 10898 area-System.IO Test failure: System.IO.Packaging.Tests.Tests/T151_InvalidDocProps Opened on behalf of @Jiayili1 The test `System.IO.Packaging.Tests.Tests/T151_InvalidDocProps` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.IO.FileFormatException)\r Actual: (No exception was thrown) ``` Stack Trace: ``` at System.IO.Packaging.Tests.Tests.T151_InvalidDocProps() in D:\A\_work\4\s\src\System.IO.Packaging\tests\Tests.cs:line 588 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fdesktop~2Fcli~2F/build/20160816.08/workItem/System.IO.Packaging.Tests Failed tests: System.IO.Packaging.Tests.Tests/T151_InvalidDocProps System.IO.Packaging.Tests.Tests/T152_InvalidDocProps System.IO.Packaging.Tests.Tests/T155_BadDateTimeDocProps 10899 area-System.IO "Test failure: System.IO.Pipes.Tests.NamedPipeTest_AclExtensions/GetAccessControl_NamedPipeClientStream_Broken with ""System.IO.IOException""" Opened on behalf of @Jiayili1 The test `System.IO.Pipes.Tests.NamedPipeTest_AclExtensions/GetAccessControl_NamedPipeClientStream_Broken` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.InvalidOperationException)\r Actual: typeof(System.IO.IOException): Pipe is broken. ``` Stack Trace: ``` at System.IO.Pipes.NamedPipeClientStream.CheckPipePropertyOperations() at System.IO.Pipes.PipeStream.SetAccessControl(PipeSecurity pipeSecurity) at System.IO.Pipes.Tests.NamedPipeTest_AclExtensions.<>c__DisplayClass2_0.b__1() in D:\A\_work\4\s\src\System.IO.Pipes.AccessControl\tests\NamedPipeTests\NamedPipeTest.AclExtensions.cs:line 64 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug 10900 area-System.Xml Test failure: XDocumentTests.SDMSample.SDM_Element/ElementWithXmlnsAttribute Opened on behalf of @jiangzeng The test `XDocumentTests.SDMSample.SDM_Element/ElementWithXmlnsAttribute` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.Xml.XmlException)\r Actual: typeof(System.Xml.XmlException): The prefix '' cannot be redefined from '' to 'http://tempuri/test' within the same start element tag. ``` Stack Trace: ``` at System.Xml.XmlWellFormedWriter.PushNamespaceExplicit(String prefix, String ns) at System.Xml.XmlWellFormedWriter.WriteEndAttribute() at System.Xml.Linq.ElementWriter.WriteStartElement(XElement e) at System.Xml.Linq.ElementWriter.WriteElement(XElement e) at System.Xml.Linq.XElement.WriteTo(XmlWriter writer) at System.Xml.Linq.XNode.GetXmlString(SaveOptions o) ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Details: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.08/workItem/System.Xml.XDocument.SDMSample.Tests/analysis/xunit/XDocumentTests.SDMSample.SDM_Element~2FElementWithXmlnsAttribute 10901 area-System.Net Test failure: System.Net.Http.WinHttpHandlerFunctional.Tests.ServerCertificateTest/NoCallback_ValidCertificate_CallbackNotCalled with System.IO.FileLoadException : Could not load file or assembly 'System.Diagnostics.DiagnosticSource' Opened on behalf of @Jiayili1 The test `System.Net.Http.WinHttpHandlerFunctional.Tests.ServerCertificateTest/NoCallback_ValidCertificate_CallbackNotCalled` has failed. ``` System.IO.FileLoadException : Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ``` Stack Trace: ``` at System.Net.Http.WinHttpHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpMessageInvoker.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken) at System.Net.Http.HttpClient.GetAsync(Uri requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken) at System.Net.Http.WinHttpHandlerFunctional.Tests.ServerCertificateTest.d__3.MoveNext() in D:\A\_work\4\s\src\System.Net.Http.WinHttpHandler\tests\FunctionalTests\ServerCertificateTest.cs:line 37 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug 10902 area-System.Net "Test failure: System.Net.Http.WinHttpHandlerFunctional.Tests.ServerCertificateTest/UseCallback_CallbackReturnsFailure_ThrowsInnerSecurityFailureException with ""System.MissingMethodException""" Opened on behalf of @Jiayili1 The test `System.Net.Http.WinHttpHandlerFunctional.Tests.ServerCertificateTest/UseCallback_CallbackReturnsFailure_ThrowsInnerSecurityFailureException` has failed. ``` System.MissingMethodException : Method not found: 'Void System.Net.Http.WinHttpHandler.set_ServerCertificateValidationCallback(System.Func`5)'. ``` Stack Trace: ``` at System.Net.Http.WinHttpHandlerFunctional.Tests.ServerCertificateTest.d__7.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) at System.Net.Http.WinHttpHandlerFunctional.Tests.ServerCertificateTest.UseCallback_CallbackReturnsFailure_ThrowsInnerSecurityFailureException() ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fdesktop~2Fcli~2F/build/20160816.08/workItem/System.Net.Http.WinHttpHandler.Functional.Tests Failed tests: System.Net.Http.WinHttpHandlerFunctional.Tests.ServerCertificateTest/UseCallback_CallbackReturnsFailure_ThrowsInnerSecurityFailureException System.Net.Http.WinHttpHandlerFunctional.Tests.ServerCertificateTest/UseCallback_CallbackThrowsSpecificException_ThrowsInnerSpecificException System.Net.Http.WinHttpHandlerFunctional.Tests.ServerCertificateTest/UseCallback_NotSecureConnection_CallbackNotCalled System.Net.Http.WinHttpHandlerFunctional.Tests.ServerCertificateTest/UseCallback_RedirectandValidCertificate_ExpectedValuesDuringCallback System.Net.Http.WinHttpHandlerFunctional.Tests.ServerCertificateTest/UseCallback_ValidCertificate_ExpectedValuesDuringCallback 10903 area-System.Xml "Tests under ""XLinqTests.TreeManipulationTests"" fail with Assert fail exception ""Xunit.Sdk.EqualException""" "Opened on behalf of @jiangzeng The test `XLinqTests.TreeManipulationTests/AddFirstAddFirstIntoDocument` has failed. ``` Assert.Equal() Failure\r Expected: 0\r Actual: 16 ``` Stack Trace: ``` at XLinqTests.TreeManipulationTests.RunTestCase(TestItem testCase) in D:\A\_work\2\s\src\System.Xml.XDocument\tests\TreeManipulation\TreeManipulationTests.cs:line 434 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Details: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.08/workItem/System.Xml.XDocument.TreeManipulation.Tests Same issue for the following tests under ""XLinqTests.TreeManipulationTests"": AddFirstAddFirstIntoDocument AddFirstAddFirstIntoDocumentWithEvents ConstructorXDocument ConstructorXElementArray ConstructorXElementIEnumerable ConstructorXElementNodeArray IEnumerableOfXAttributeRemove IEnumerableOfXAttributeRemoveWithRemove IEnumerableOfXNodeRemove IEnumerableOfXNodeRemoveWithEvents LoadFromReader LoadFromStreamSanity SaveWithWriter SimpleConstructors XAttributeRemove XAttributeRemoveWithEvents XContainerAddIntoDocument XContainerAddIntoDocumentWithEvents XContainerNextPreviousNode XContainerReplaceNodesOnXElement XContainerReplaceNodesOnXElementWithEvents XElementSetAttributeValue XElementSetAttributeValueWithEvents XElementSetElementValue XElementSetElementValueWithEvents XNodeRemoveNodeMisc XNodeRemoveNodeMiscWithEvents XNodeRemoveOnDocument XNodeRemoveOnDocumentWithEvents XNodeRemoveOnElement XNodeRemoveOnElementWithEvents " 10904 area-System.Xml Test failure: XLinqTests.XObjectTests+SkipNotifyTests/NoXObjectChangeAnnotation Opened on behalf of @jiangzeng The test `XLinqTests.XObjectTests+SkipNotifyTests/NoXObjectChangeAnnotation` has failed. ``` System.TypeLoadException : Method 'get_NodeType' in type 'FakeXObject' from assembly 'System.Xml.XDocument.TreeManipulation.Tests, Version=999.999.999.999, Culture=neutral, PublicKeyToken=9d77cc7ad39b68eb' does not have an implementation. ``` Stack Trace: ``` at XLinqTests.XObjectTests.SkipNotifyTests.NoXObjectChangeAnnotation() ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Details: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.08/workItem/System.Xml.XDocument.TreeManipulation.Tests/analysis/xunit/XLinqTests.XObjectTests+SkipNotifyTests~2FNoXObjectChangeAnnotation Same issue for the test: XLinqTests.XObjectTests+SkipNotifyTests/XObjectChangeAnnotation 10905 area-System.Net "Test failure: System.Net.Http.WinHttpHandlerUnitTests.WinHttpHandlerTest/SslProtocols_SetUsingSupported_Success with ""System.NotSupportedException""" Opened on behalf of @Jiayili1 The test `System.Net.Http.WinHttpHandlerUnitTests.WinHttpHandlerTest/SslProtocols_SetUsingSupported_Success` has failed. ``` System.NotSupportedException : The requested security protocol is not supported. ``` Stack Trace: ``` at System.Net.SecurityProtocol.ThrowOnNotAllowed(SslProtocols protocols, Boolean allowNone) in D:\A\_work\4\s\src\Common\src\System\Net\SecurityProtocol.cs:line 22 at System.Net.Http.WinHttpHandlerUnitTests.WinHttpHandlerTest.SslProtocols_SetUsingSupported_Success(SslProtocols protocol) in D:\A\_work\4\s\src\System.Net.Http.WinHttpHandler\tests\UnitTests\WinHttpHandlerTest.cs:line 449 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fdesktop~2Fcli~2F/build/20160816.08/workItem/System.Net.Http.WinHttpHandler.Unit.Tests/analysis/xunit/System.Net.Http.WinHttpHandlerUnitTests.WinHttpHandlerTest~2FSslProtocols_SetUsingSupported_Success 10906 area-System.Xml Test failure: CoreXml.Test.XLinq.FunctionalTests/RunTests Opened on behalf of @jiangzeng The test `CoreXml.Test.XLinq.FunctionalTests/RunTests` has failed. ``` Assert.Equal() Failure\r Expected: 0\r Actual: 633 ``` Stack Trace: ``` at CoreXml.Test.XLinq.FunctionalTests.RunTests() in D:\A\_work\2\s\src\System.Xml.XDocument\tests\xNodeBuilder\FunctionalTests.cs:line 34 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Details: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.08/workItem/System.Xml.XDocument.xNodeBuilder.Tests/analysis/xunit/CoreXml.Test.XLinq.FunctionalTests~2FRunTests 10908 area-System.Runtime Add Enum method to remove not defined flags. Suppose I have an enum type defined by `FlagsAttribute`and has an enum value that is outside the limit of the enum type. I would then have a way to easily remove the flags that are not defined. This can be useful if I eg get an enum value from an external API, and all the flags are not defined in the internal enum type. I would then want clear the unsupported flags. Alternative solution proposals: **Alternative 1** ``` C# [ComVisibleAttribute(true)] public static object ToObject( Type, int, bool=false ) ``` If you set the the new boolena value to `true`, unknown flags is removed. This should only be valid for enum types that are defined with `FlagsAttribute`, or else the function throw a exception. (By the way, why are not `ToObject`generic to avoid having to cast like #692 ?) **Alternative 2** ``` C# public int BitMask { get; } ``` It returns a bit mask that can be used like this: `var cleanedEnumValue = myEnumValue & myEnumValue.BitMask;` **Alternative 3** ``` C# public object RemoveUndefinedFlags { get; } ``` It returns a enum where the undefined flags have been masked away. Or if the enum is not defined with `FlagsAttribute`, it throw a exception. 10909 area-System.Net "Test failure: System.Net.Security.Tests.ClientAsyncAuthenticateTest/ClientAsyncAuthenticate_EachClientUnsupportedProtocol_Fail with ""System.IO.IOException""" Opened on behalf of @Jiayili1 The test `System.Net.Security.Tests.ClientAsyncAuthenticateTest/ClientAsyncAuthenticate_EachClientUnsupportedProtocol_Fail` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.NotSupportedException)\r Actual: typeof(System.IO.IOException): Authentication failed because the remote party has closed the transport stream. ``` Stack Trace: ``` at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Threading.Tasks.TaskTimeoutExtensions.d__0.MoveNext() in D:\A\_work\4\s\src\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs:line 19 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.Security.Tests.ClientAsyncAuthenticateTest.d__14.MoveNext() in D:\A\_work\4\s\src\System.Net.Security\tests\FunctionalTests\ClientAsyncAuthenticateTest.cs:line 142 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fdesktop~2Fcli~2F/build/20160816.08/workItem/System.Net.Security.Tests/analysis/xunit/System.Net.Security.Tests.ClientAsyncAuthenticateTest~2FClientAsyncAuthenticate_EachClientUnsupportedProtocol_Fail Failed tests: ClientAsyncAuthenticate_EachClientUnsupportedProtocol_Fail ClientAsyncAuthenticate_UnsuportedAllClient_Fail 10910 area-System.Net "Test failure: System.Net.Security.Tests.ServerAsyncAuthenticateTest/ServerAsyncAuthenticate_EachServerUnsupportedProtocol_Fail with ""System.Security.Authentication.AuthenticationException""" Opened on behalf of @Jiayili1 The test `System.Net.Security.Tests.ServerAsyncAuthenticateTest/ServerAsyncAuthenticate_EachServerUnsupportedProtocol_Fail` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.NotSupportedException)\r Actual: typeof(System.Security.Authentication.AuthenticationException): A call to SSPI failed, see inner exception. ``` Stack Trace: ``` at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Threading.Tasks.TaskTimeoutExtensions.d__0.MoveNext() in D:\A\_work\4\s\src\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs:line 19 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.Security.Tests.ServerAsyncAuthenticateTest.d__11.MoveNext() in D:\A\_work\4\s\src\System.Net.Security\tests\FunctionalTests\ServerAsyncAuthenticateTest.cs:line 167 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug 10911 area-System.Net "Test failure: System.Net.Security.Tests.ServerAsyncAuthenticateTest/ServerAsyncAuthenticate_UnsuportedAllServer_Fail with ""System.TimeoutException""" Opened on behalf of @Jiayili1 The test `System.Net.Security.Tests.ServerAsyncAuthenticateTest/ServerAsyncAuthenticate_UnsuportedAllServer_Fail` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.NotSupportedException)\r Actual: typeof(System.TimeoutException): The operation has timed out. ``` Stack Trace: ``` at System.Threading.Tasks.TaskTimeoutExtensions.d__0.MoveNext() in D:\A\_work\4\s\src\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs:line 23 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.Security.Tests.ServerAsyncAuthenticateTest.d__11.MoveNext() in D:\A\_work\4\s\src\System.Net.Security\tests\FunctionalTests\ServerAsyncAuthenticateTest.cs:line 167 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fdesktop~2Fcli~2F/build/20160816.08/workItem/System.Net.Security.Tests/analysis/xunit/System.Net.Security.Tests.ServerAsyncAuthenticateTest~2FServerAsyncAuthenticate_UnsuportedAllServer_Fail 10912 area-System.Net Test failure: System.Net.Security.Tests.NegotiateStreamStreamToStreamTest/NegotiateStream_StreamToStream_Authentication_EmptyCredentials_Fails Opened on behalf of @Jiayili1 The test `System.Net.Security.Tests.NegotiateStreamStreamToStreamTest/NegotiateStream_StreamToStream_Authentication_EmptyCredentials_Fails` has failed. ``` Assert.Equal() Failure\r Expected: False\r Actual: True ``` Stack Trace: ``` at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.NegotiateStream_StreamToStream_Authentication_EmptyCredentials_Fails() in D:\A\_work\4\s\src\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs:line 184 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug link: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fdesktop~2Fcli~2F/build/20160816.08/workItem/System.Net.Security.Tests/analysis/xunit/System.Net.Security.Tests.NegotiateStreamStreamToStreamTest~2FNegotiateStream_StreamToStream_Authentication_EmptyCredentials_Fails Failed tests: System.Net.Security.Tests.NegotiateStreamStreamToStreamTest/NegotiateStream_StreamToStream_Authentication_EmptyCredentials_Fails System.Net.Security.Tests.SslStreamStreamToStreamTest/SslStream_StreamToStream_Successive_ClientWrite_Async_Success System.Net.Security.Tests.SslStreamStreamToStreamTest/SslStream_StreamToStream_Successive_ClientWrite_Sync_Success 10914 area-Serialization Test failure: XmlSerializerTests/XML_TypeWithTypeNameInXmlTypeAttribute Opened on behalf of @jiangzeng The test `XmlSerializerTests/XML_TypeWithTypeNameInXmlTypeAttribute` has failed. ``` System.InvalidOperationException : There was an error reflecting type 'SerializationTypes.TypeWithTypeNameInXmlTypeAttribute'.\r ---- System.Reflection.CustomAttributeFormatException : 'Form' property specified was not found.\r -------- System.Reflection.CustomAttributeFormatException : 'Form' property specified was not found. ``` Stack Trace: ``` at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) at System.Xml.Serialization.XmlReflectionImporter.ImportElement(TypeModel model, XmlRootAttribute root, String defaultNamespace, RecursionLimiter limiter) at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type type, XmlRootAttribute root, String defaultNamespace) at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace) at XmlSerializerTests.SerializeAndDeserialize[T](T value, String baseline, Func`1 serializerFactory, Boolean skipStringCompare, XmlSerializerNamespaces xns) in D:\A\_work\2\s\src\System.Xml.XmlSerializer\tests\XmlSerializerTests.cs:line 1844 at XmlSerializerTests.XML_TypeWithTypeNameInXmlTypeAttribute() in D:\A\_work\2\s\src\System.Xml.XmlSerializer\tests\XmlSerializerTests.cs:line 1183 ----- Inner Stack Trace ----- at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeFieldInfo field, RuntimeType caType) at System.Xml.Serialization.XmlAttributes..ctor(ICustomAttributeProvider provider) at System.Xml.Serialization.XmlReflectionImporter.GetAttributes(MemberInfo memberInfo) at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) at System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) ----- Inner Stack Trace ----- at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Details: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.08/workItem/System.Xml.XmlSerializer.Tests/analysis/xunit/XmlSerializerTests~2FXML_TypeWithTypeNameInXmlTypeAttribute Same issue for the following tests: XmlSerializerTests/XML_TypeWithTypeNameInXmlTypeAttribute XmlSerializerTests/XML_TypeWithXmlSchemaFormAttribute XmlSerializerTests/Xml_TypeWithSchemaFormInXmlAttribute 10915 area-Serialization Test failure: XmlSerializerTests/Xml_ClassImplementingIXmlSerialiable "Opened on behalf of @jiangzeng The test `XmlSerializerTests/Xml_ClassImplementingIXmlSerialiable` has failed. ``` XML comparison is also failing\r Test failed for input: SerializationTypes.ClassImplementingIXmlSerialiable\r Expected: \r \r Actual: \r \r Hello world\r \r Expected: True\r Actual: False ``` Stack Trace: ``` at XmlSerializerTests.SerializeAndDeserialize[T](T value, String baseline, Func`1 serializerFactory, Boolean skipStringCompare, XmlSerializerNamespaces xns) in D:\A\_work\2\s\src\System.Xml.XmlSerializer\tests\XmlSerializerTests.cs:line 1873 at XmlSerializerTests.Xml_ClassImplementingIXmlSerialiable() in D:\A\_work\2\s\src\System.Xml.XmlSerializer\tests\XmlSerializerTests.cs:line 1142 ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Details: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.08/workItem/System.Xml.XmlSerializer.Tests/analysis/xunit/XmlSerializerTests~2FXml_ClassImplementingIXmlSerialiable Same issue for the following tests: XmlSerializerTests/Xml_TimeSpanAsRoot XmlSerializerTests/Xml_TypeWithDateTimePropertyAsXmlTime XmlSerializerTests/Xml_TypeWithTimeSpanProperty XmlSerializerTests/Xml_XmlQualifiedNameAsRoot " 10916 area-Serialization Test failure: XmlSerializerTests/Xml_ConstructorWithTypeMapping Opened on behalf of @jiangzeng The test `XmlSerializerTests/Xml_ConstructorWithTypeMapping` has failed. ``` System.TypeLoadException : Could not load type 'System.Xml.Serialization.XmlTypeMapping' from assembly 'System.Xml.XmlSerializer, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. ``` Stack Trace: ``` at XmlSerializerTests.Xml_ConstructorWithTypeMapping() ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Details: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.08/workItem/System.Xml.XmlSerializer.Tests/analysis/xunit/XmlSerializerTests~2FXml_ConstructorWithTypeMapping Same issue for the test: XmlSerializerTests/Xml_FromMappings 10917 area-System.Xml Test failure: System.Xml.Tests.CreateElementTests/NameWithWhitespace Opened on behalf of @jiangzeng The test `System.Xml.Tests.CreateElementTests/NameWithWhitespace` has failed. ``` Assert.Throws() Failure\r Expected: typeof(System.Xml.XmlException)\r Actual: typeof(System.Xml.XmlException): The ' ' character, hexadecimal value 0x20, cannot be included in a name. ``` Stack Trace: ``` at System.Xml.XmlDocument.CheckName(String name) at System.Xml.XmlElement..ctor(XmlName name, Boolean empty, XmlDocument doc) at System.Xml.XmlDocument.CreateElement(String prefix, String localName, String namespaceURI) at System.Xml.XmlDocument.CreateElement(String name) ``` Failing configurations: - Windows.10.Amd64 - AnyCPU-Release - AnyCPU-Debug Details: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster/type/test~2Ffunctional~2Fuwp~2F/build/20160816.08/workItem/System.Xml.XmlDocument.Tests/analysis/xunit/System.Xml.Tests.CreateElementTests~2FNameWithWhitespace Same issue for the tests: System.Xml.Tests.CreateElementTests/NameWithWhitespace System.Xml.Tests.CreateElementTests/NamespaceAndLocalNameWithColon System.Xml.Tests.CreateElementTests/NamespaceWithNoLocalName 10918 area-System.Linq Increase coverage of BinaryExpression (Equals and NotEquals) Also cleans up Expression.Equal and Expression.NotEqual tests to make it easier to add new tests Contributes to #1198 /cc @stephentoub @VSadov 10919 area-System.Security Implement TripleDES 128 bit key size The current TripleDES implementation only has 192 bit valid key size. Use case : old crypting method uses a TripleDES of a MD5 of a string. The MD5 always returns a 16 byte value. 10920 area-System.Data Application running on Ubuntu fails to connect to remote MSSQL (instance name) "I am trying to run a .NET Core application that works well on Windows, and it seems like it cannot connect to remote MSSQL server when running on Linux machine. I ran the application using the `dotnet run` command The connection string is valid, and the MSSQL server accepts remote connections Stack trace: ``` Hosting environment: Development Content root path: /home/sysadmin/billing-app/src/WebApp Now listening on: http://localhost:5000 Application started. Press Ctrl+C to shut down. info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] Request starting HTTP/1.1 GET http://localhost:5000/rest/v1/accounts info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1] Executing action method WebApp.API.Controllers.AccountsController.Get (WebApp) with arguments () - ModelState is Valid info: WebApp.Filters.ContextActionFilter[0] Saving changes for unit of work info: Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor[1] Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. fail: Microsoft.EntityFrameworkCore.Query.Internal.SqlServerQueryCompilationContextFactory[1] An exception occurred in the database while iterating the results of a query. System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open() at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable.Enumerator.MoveNext() at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.<_ShapedQuery>d__3`1.MoveNext() at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext() at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext() ClientConnectionId:00000000-0000-0000-0000-000000000000 System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open() at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable.Enumerator.MoveNext() at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.<_ShapedQuery>d__3`1.MoveNext() at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext() at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext() ClientConnectionId:00000000-0000-0000-0000-000000000000 fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[0] An unhandled exception has occurred while executing the request System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open() at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable.Enumerator.MoveNext() at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.<_ShapedQuery>d__3`1.MoveNext() at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext() at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext() at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType) at Microsoft.AspNetCore.Mvc.Formatters.JsonOutputFormatter.WriteObject(TextWriter writer, Object value) at Microsoft.AspNetCore.Mvc.Formatters.JsonOutputFormatter.d__9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__32.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__31.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__29.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__23.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Builder.RouterMiddleware.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.ApplicationInsights.AspNetCore.ExceptionTrackingMiddleware.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.ApplicationInsights.AspNetCore.RequestTrackingMiddleware.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.d__6.MoveNext() ClientConnectionId:00000000-0000-0000-0000-000000000000 warn: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[0] The response has already started, the error page middleware will not be executed. fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id ""0HKU6KJQ04DBP"": An unhandled exception was thrown by the application. System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open() at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable.Enumerator.MoveNext() at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.<_ShapedQuery>d__3`1.MoveNext() at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext() at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext() at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType) at Microsoft.AspNetCore.Mvc.Formatters.JsonOutputFormatter.WriteObject(TextWriter writer, Object value) at Microsoft.AspNetCore.Mvc.Formatters.JsonOutputFormatter.d__9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__32.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__31.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__29.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__23.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Builder.RouterMiddleware.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.ApplicationInsights.AspNetCore.ExceptionTrackingMiddleware.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.ApplicationInsights.AspNetCore.RequestTrackingMiddleware.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.d__3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Frame`1.d__2.MoveNext() ClientConnectionId:00000000-0000-0000-0000-000000000000 info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] Request finished in 16642.3424ms 200 application/json; charset=utf-8 ``` " 10923 area-System.IO ExtractToFile() max. extract size throws wrong error "Im trying to extract multiple .bak files in .zip archives. It all works fine If the files are under 2GB but when my .bak file is above 2GB it throws a > ""The archive entry was compressed using an unsupported compression method."" This is not right, I compressed them with the same methode of the 2GB< files " 10924 area-System.Net Fix WebSocketException.SetErrorCodeOnError to only set on error - Fix WebSocketException.SetErrorCodeOnError... it was setting it always rather than only on error, resulting in different behavior from desktop (http://referencesource.microsoft.com/#System/net/System/Net/WebSockets/WebSocketException.cs,197) - As long as I was fixing that, I fixed the order of the arguments to Assert.Equal in the tests, as well as changing a few Equal calls to Same calls, and marking a few tests as [Fact]s so that they actually ran. Fixes https://github.com/dotnet/corefx/issues/10913 cc: @cipop, @davidsh, @ericeil, @anurse 10925 area-Infrastructure Clean the scripts build-managed and build-native using run.exe Clean build-native.cmd/sh and build-managed.cmd/sh by adding properties to config.json file following the [dev workflow](https://github.com/dotnet/buildtools/blob/master/Documentation/Dev-workflow.md) guidelines. 10931 area-System.Numerics Matrix4x4 Changes - Remove/Move Matrix4x4.CreateWorld, CreateBillboard, etc. There are a few things that we would like to see changed in Matrix4x4 that might make us and others more likely to adopt them in the near future. There seem to be several methods inside System.Numerics.Vectors.Matrix4x4 that should be removed or placed in a utility library as extension methods. Many `Matrix4x4.Create*` methods impose conventions on the users that they may not be able to accept. For example, Matrix4x4.CreateWorld() seems to negate the passed in forward axis and store it that way. For those using a right-handed x-right, y-forward, z-up coordinate system, this is very annoying for debugging purposes (and incorrect). Similar issues apply to other Create functions and there are several that would never be used (CreateShadow, etc.). This API would be much easier for us to adopt if it was considerably trimmed down to a minimum (required) number of functions and then other methods added as extensions that can _not_ be included so that those that do things differently or don't need them can still get some SIMD benefits under C#. Also in regards to SIMD benefits, Matrix4x4 does not seem to have any. I'm not clear as to why this was not designed to contain 4 Vector4 values, but if it was, it is considerably more likely that _required_ operations such as Vector \* Matrix would see SIMD benefits without having to add more/unneeded intrinsics to the JIT compiler. 10932 area-System.IO Throw specific error messages for unsupported zip Appends the common unsupported compression type to the end of the exception message for an unsupported compression type. This should make it easier to diagnose the issues that arise from https://github.com/dotnet/corefx/issues/9925. resolves https://github.com/dotnet/corefx/issues/9924 10933 area-System.Threading Port some missing threading types/members (Task, WaitHandle, etc.) ``` M:System.Threading.Tasks.Task.Dispose M:System.Threading.Tasks.Task.Dispose(System.Boolean) M:System.Threading.Tasks.TaskCanceledException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) M:System.Threading.Tasks.TaskSchedulerException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) M:System.Threading.WaitHandle.Close M:System.Threading.WaitHandle.get_Handle M:System.Threading.WaitHandle.get_SafeWaitHandle M:System.Threading.WaitHandle.set_Handle(System.IntPtr) M:System.Threading.WaitHandle.set_SafeWaitHandle(Microsoft.Win32.SafeHandles.SafeWaitHandle) M:System.Threading.WaitHandle.SignalAndWait(System.Threading.WaitHandle,System.Threading.WaitHandle) M:System.Threading.WaitHandle.SignalAndWait(System.Threading.WaitHandle,System.Threading.WaitHandle,System.Int32,System.Boolean) M:System.Threading.WaitHandle.SignalAndWait(System.Threading.WaitHandle,System.Threading.WaitHandle,System.TimeSpan,System.Boolean) M:System.Threading.WaitHandle.WaitAll(System.Threading.WaitHandle[],System.Int32,System.Boolean) M:System.Threading.WaitHandle.WaitAll(System.Threading.WaitHandle[],System.TimeSpan,System.Boolean) M:System.Threading.WaitHandle.WaitAny(System.Threading.WaitHandle[],System.Int32,System.Boolean) M:System.Threading.WaitHandle.WaitAny(System.Threading.WaitHandle[],System.TimeSpan,System.Boolean) M:System.Threading.WaitHandle.WaitOne(System.Int32,System.Boolean) M:System.Threading.WaitHandle.WaitOne(System.TimeSpan,System.Boolean) M:System.TimeoutException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) ``` 10934 area-System.IO Add zero argument IsolatedStorageFile static factory methods Need to add `IsolatedStorageFile` `Get*StoreFor*()` static factory methods. This includes: `GetUserStoreForDomain()` `GetUserStoreForAssembly()` `GetUserStoreForApplication()` <- Need to update implementation `GetUserStoreForSite()` `GetMachineStoreForDomain()` `GetMachineStoreForAssembly()` `GetMachineStoreForApplication()` Other factory methods will be broken out into separate work items as there are more direct dependencies on `System.Security.Policy.Evidence`. 10935 area-System.IO Add IsolatedStorageFile factory methods with Evidence dependencies Need to implement the various `GetStore()` methods have direct or indirect dependencies on `System.Security.Policy.Evidence`. This includes: `GetStore(IsolatedStorageScope, Type, Type)` `GetStore(IsolatedStorageScope, Object, Object)` `GetStore(IsolatedStorageScope, Evidence, Type, Evidence, Type)` `GetStore(IsolatedStorageScope, Type)` `GetStore(IsolatedStorageScope, Object)` These may not be possible without `System.Security.Policy.Evidence`. See #10934 for the other factory methods. 10936 area-System.IO Add IsolatedStorageFile.GetEnumerator() `IsolatedStorageFile.GetEnumerator()` allows you to enumerate all stores for the current user. [How to: Enumerate Stores for Isolated Storage](https://msdn.microsoft.com/en-us/library/c3dy613a%28v=vs.110%29.aspx) 10943 area-System.Reflection Access denied errors running PortableExecutable tests http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/windows_nt_debug_prtest/3539/ ``` System.Reflection.PortableExecutable.Tests.DebugDirectoryTests.CodeView_Loaded [FAIL] System.UnauthorizedAccessException : Access to the path 'C:\Users\dotnet-bot\AppData\Local\Temp\tmp7490.tmp' is denied. Stack Trace: at System.IO.Win32FileSystem.DeleteFile(String fullPath) D:\j\workspace\windows_nt_de---4526f5ff\src\System.Reflection.Metadata\tests\TestUtilities\LoaderUtilities.cs(36,0): at System.Reflection.Metadata.Tests.LoaderUtilities.LoadPEAndValidate(Byte[] peImage, Action`1 validator, Boolean useStream) D:\j\workspace\windows_nt_de---4526f5ff\src\System.Reflection.Metadata\tests\PortableExecutable\DebugDirectoryTests.cs(39,0): at System.Reflection.PortableExecutable.Tests.DebugDirectoryTests.CodeView_Loaded() System.Reflection.PortableExecutable.Tests.PEReaderTests.GetSectionData_Loaded [FAIL] System.UnauthorizedAccessException : Access to the path 'C:\Users\dotnet-bot\AppData\Local\Temp\tmp7491.tmp' is denied. Stack Trace: at System.IO.Win32FileSystem.DeleteFile(String fullPath) D:\j\workspace\windows_nt_de---4526f5ff\src\System.Reflection.Metadata\tests\TestUtilities\LoaderUtilities.cs(36,0): at System.Reflection.Metadata.Tests.LoaderUtilities.LoadPEAndValidate(Byte[] peImage, Action`1 validator, Boolean useStream) D:\j\workspace\windows_nt_de---4526f5ff\src\System.Reflection.Metadata\tests\PortableExecutable\PEReaderTests.cs(239,0): at System.Reflection.PortableExecutable.Tests.PEReaderTests.GetSectionData_Loaded() ``` 10944 area-System.IO Stream.ReadAsync initializes Task with improper TaskCreationOptions "This is a regression introduced by https://github.com/dotnet/corefx/commit/71bb8fec20016b10d1b29615682fa7ced90b8996. What's happening is: on https://github.com/dotnet/corefx/blob/dev/api/src/System.IO/src/System/IO/Stream.cs#L252 the new Task is being created with TaskCreationOptions DenyChildAttach and HideScheduler. However it's eventually reach to https://github.com/dotnet/corert/blob/master/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs#L320 where it expects to see either AttachedToParent or RunContinuationsAsynchronously in the TaskCreationOptions. so it throws an ArgumentOutOfRangeException(""creationOptions"") I hit this issue when I tried to consume the new System.IO on .Net Native toolchain. One of the tests failed with the ArgumentOutOfRangeException on the following call stack: Running Test: StreamTests.ReadAndWriteAsync Caught Unexpected exception:System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: creationOptions at System.Threading.Tasks.Task..ctor(Object state, TaskCreationOptions creationOptions, Boolean promiseStyle) at System.Threading.Tasks.Task$1..ctor(Object state, TaskCreationOptions options) at System.Threading.Tasks.TaskFactory$1.FromAsyncImpl(Func$6<__Canon,Int32,Int32,__Canon,__Canon,__Canon> beginMethod, Func$2 endFunction, Action$1 endAction, __Canon arg1, Int32 arg2, Int32 arg3, Object state, TaskCreationOptions creationOptions) at System.Threading.Tasks.TaskFactory.FromAsync(Func$6<__Canon,Int32,Int32,__Canon,__Canon,__Canon> beginMethod, Func$2 endMethod, __Canon arg1, Int32 arg2, Int32 arg3, Object state, TaskCreationOptions creationOptions) at System.IO.Stream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) at System.IO.Stream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count) at UnitTests!+0x30f64c at UnitTests!+0x30f49d at System.Action.Invoke() at UnitTests!+0x30d6b1 at UnitTests!+0x30cca7 /cc @joperezr, this is related with his change " 10947 area-System.Net Supported versions of libcurl for HttpClient I’m doing some performance analysis for the AWS SDK for .NET which relies on the HttpClient. Performance and reliability seems to differ widely depending on the version of libcurl. My test consist of 10 tasks repeatedly making http calls using the same HttpClient. For Mac OSX using libcurl 7.43 and Ubuntu 16.04 using libcurl 7.47 performance seems fine. Ubuntu 14.04 using libcurl 7.35 request per second is in the ball park but I frequently get errors with the response stream being closed as I’m reading the response back. RHEL 7.2 using libcurl 7.29 I don’t get any errors but the performance is an order magnitude slower than the other platforms. Is there a minimum version of libcurl that you are recommending to have when using HttpClient on Linux? 10948 area-System.Net Add HTTP/2 support to WinHttpHandler Windows 10 Anniversary release a.k.a Windows 10 Version 1607 added support to native WinHTTP for HTTP/2 protocol support. Added code to use this when sending request messages with HTTP/2. This change affects both the System.Net.Http and System.Net.Http.WinHttpHandler library packages. Added new tests that validate the functionality and verify the test client is running on the proper version of Windows 10. Switched the HTTP/2 test server endpoint to www.microsoft.com since it supports HTTP/2. Fixes #4870 10949 area-System.Reflection System.Collections.Immutable and System.Reflection.Metadata cause some dependency weirdness I have a library targeting `netstandard1.5` which brings in these two libraries as dependencies (directly or indirectly, doesn't seem to make a difference.) When I reference this library from another project targeting `net462`, I can see in the Visual Studio dependency tree that several references sort of 'drop out' of 'package dependency' mode and into 'framework assembly' mode: - System.Runtime (4.1.0, drops to 4.0.20) - System.Runtime.Extensions (4.1.0, drops to 4.0.10) - System.Reflection (4.1.0, drops to 4.0.10) Now, there is another somewhat similar issue with the current 4.1.0 package for System.Net.Http, where it drops to 4.0.0 and causes problems, but I have been able to work around that by locking the project.json file and deleting the portion that specifies it as a framework assembly. I see no such analog for these other libraries and I can't find anything of note in their .nuspec files. Changing the test library to target as low as `netstandard1.1` yields no desirable effect. Although I would prefer not to mention this sort of thing, a current project I am working on is blocked by this because at runtime it is causing a failure to load the System.Runtime library. I mention this because I want to be clear that it is not a nitpicking issue but rather an actual impediment. Please let me know what else I can do to help. 10950 area-System.Console Console.ReadKey does not wait "After verifying the .NET Framework documentation that the ReadKey method is supposed to wait, I observed .NET Core does not wait on Console.ReadKey but just run over it. https://msdn.microsoft.com/en-us/library/x3h8xffw(v=vs.110).aspx ""The ReadKey method waits, that is, blocks on the thread issuing the ReadKey method, until a character or function key is pressed. A character or function key can be pressed in combination with one or more Alt, Ctrl, or Shift modifier keys. However, pressing a modifier key by itself will not cause the ReadKey method to return."" " 10951 area-System.Runtime DEC64 Type (Decimal Floating Point) As proposed by Douglas Crockford https://github.com/douglascrockford/DEC64 Presentation on it: https://youtu.be/PSGEjv3Tqo0?t=27m5s 10954 area-System.Linq Expression.New has inconsistent argument checking for the declaring type of the ctor "There is an inconsistency between the checking of the `constructor` parameter in various `Expression.New()` overloads. This is when the constructor has a GenericTypeDefinition This was discovered in #10952, and this is demonstrated below. ## Problem ``` [Fact] public static void ConstructorDeclaringType_GenericTypeDefinition_ThrowsArgumentException() { ConstructorInfo constructor = typeof(GenericClass<>).GetConstructor(new Type[0]); Assert.Throws(""constructor"", () => Expression.New(constructor)); Assert.Throws(""constructor"", () => Expression.New(constructor, new Expression[0])); Assert.Throws(""constructor"", () => Expression.New(constructor, (IEnumerable)new Expression[0])); } [Fact] public static void ConstructorDeclaringType_GenericTypeDefintion_Works() { // Should probably throw an ArgumentException, similar to other overloads ConstructorInfo constructor = typeof(GenericClass<>).GetConstructor(new Type[0]); Expression.New(constructor, new Expression[0], new MemberInfo[0]); Expression.New(constructor, new Expression[0], new MemberInfo[0]); } ``` ## Solution The fix is to add the following code to `New(ConstructorInfo, IEnumerable, IEnumerable)` so that it is consistent with `New(ConstructorInfo)` and `New(ConstructorInfo, IEnumerable)` ``` ContractUtils.RequiresNotNull(constructor.DeclaringType, nameof(constructor) + ""."" + nameof(constructor.Decl TypeUtils.ValidateType(constructor.DeclaringType, nameof(constructor)); ``` This would be a breaking change, but is a bug, as an `InvalidOperationException` is thrown when compiling a lambda expression containing the New expression. /cc @stephentoub @JonHanna @VSadov " 10958 area-System.Net WinHttpHandler using HTTP/2 returns error with servers using push promise While implementing PR #10948, we discovered that Windows winHTTP has some issues with HTTP/2 servers that use server push functionality (push promise). Reference internal bug 8523801. 10961 area-System.Globalization Compat work to implement missing Globalization API for .NET Native and Unix Tarek, please split as needed 10967 area-Serialization Create Test Projects for Testing Reflection Based DCS/DCJS 10969 area-System.IO Add missing member on ZipArchiveEntry There is only one thing left missing in System.IO.Compression namespace. `M:System.IO.Compression.ZipArchiveEntry.set_Archive(System.IO.Compression.ZipArchive)` 10973 area-System.IO Potential optimizations for System.IO.Path - [`CheckInvalidPathChars`](https://github.com/dotnet/corefx/blob/master/src/Common/src/System/IO/PathInternal.cs#L19) is called as much as 1-3 times in most Path chars, however due to all of the exception-throwing code it doesn't look as if it's going to be inlined. SInce dotnet/coreclr#6103 was merged, it may be beneficial to separate the throwing logic out to encourage inlining, for example: ``` cs internal static void CheckInvalidPathChars(string path) { if (path == null) ThrowArgumentNullPath(); if (PathInternal.HasIllegalCharacters(path)) ThrowArgumentInvalidPathChars(); } ``` - StringBuilder's indexer is not inlined, so [this](https://github.com/dotnet/corefx/blob/master/src/Common/src/System/IO/PathInternal.cs#L40) is very slow, although it does avoid allocations. It may be worth seeing how all of the method calls stack up against using `ToString` and indexing into that instead. - [This](https://github.com/dotnet/corefx/blob/master/src/Common/src/System/IO/PathInternal.Unix.cs#L78-L92) is definitely suboptimal; I don't think `StringBuilder.Append(char)` is inlined, and we could use a `char[]` instead since we know the max length of the buffer in advance. - [Same here](https://github.com/dotnet/corefx/blob/master/src/Common/src/System/IO/PathInternal.Windows.cs#L409-L437) - [Same here](https://github.com/dotnet/corefx/blob/master/src/System.Runtime.Extensions/src/System/IO/Path.cs#L260-L285) - Maybe this could make use of `ArrayPool.Shared.Rent`, instead of using `StringBuilder`? - [Same here](https://github.com/dotnet/corefx/blob/master/src/System.Runtime.Extensions/src/System/IO/Path.Unix.cs#L110) cc @JeremyKuhne 10974 area-System.Net WinHTTP allocates HttpVersion20 for every http/2 request On 4.6.x `WinHttpResponseParser`.`CreateResponseMessage` allocates HttpVersion20 setting the version `WinHttpHandler`.`SetRequestHandleHttp2Options` allocates HttpVersion20 for every equality check This is caused by properties being .ctor get functions ``` csharp internal static Version HttpVersion20 => new Version(2,0); internal static Version HttpVersionUnknown => new Version(0,0); ``` Should probably be? ``` csharp internal readonly static Version HttpVersion20 = new Version(2,0); internal readonly static Version HttpVersionUnknown = new Version(0,0); ``` @davidsh @justinvp 10975 area-System.Data System.Data.Common and SqlClient: Async variants for remaining blocking APIs The following potentially blocking APIs currently don't have async variants: 1. `DbTransaction.Commit()` 2. `DbConnection.Close()` 3. `DbConnection.BeginTransaction()` 4. `DbTransaction.Rollback()` Ideally default implementations should be added to the base classes of the ADO.NET provider model which fallback to the sync implementations (following the same pattern we have for the other async methods) and proper async implementations should be added to SqlClient. Related to #8856. 10981 area-System.Net Expose UnixDomainSocket #6833 made the UnixDomainSocketEndPoint internal, which of course prevents clients from using it to have direct access to Unix sockets in their own code. Docker.DotNet had to introduce a copy of UnixDomainSocketEndPoint in order to access sockets when running on Ubuntu (see https://github.com/Microsoft/Docker.DotNet/pull/113). Ideally, the language would provide a way for this access to happen, without needing each client to make a copy of the class for their use. It's possible I missed a better way to do this, so advice would be appreciated... ## Proposal ```C# // in System.Net.Sockets assembly namespace System.Net.Sockets { public sealed class UnixDomainSocketEndPoint : EndPoint { public UnixDomainSocketEndPoint(string path); } } ``` It'll work on Unix and result in PlatformNotSupportedExceptions on Windows. Example usage: ```C# var socket = new Socket(AddressFamily.Unix, SocketType.Stream, ProtocolType.Unspecified); socket.Bind(new UnixDomainSocketEndPoint(path)); socket.Listen(5); ``` 10982 area-System.Net WinHttpHandler: Avoid repeated Version allocations For NET46, use static readonly fields that always return the same cached instances, instead of properties that always allocate and return new `Version` instances. Fixes #10974. cc: @davidsh @benaadams 10985 area-System.Console Console.Readline() doesn't respect disable console echo by 'stty -echo' on Ubuntu I want my Console.Readline() doesn't print out what been read. (I am reading password from user input.) On Windows, i can achieve by PInvoke SetConsoleMode() before calling Console.Readline() to disable console echo. I try to do same thing on Ubuntu PInvoke tcsetattr() before Console.Readline(), however it seems like Console.Readline() doesn't respect Ubuntu console echo disable at all. Here is what i verified On Ubuntu 16. 1. Dotnet new a helloworld console app, add `String read = Console.Readline();` after console.writeline(...) 2. In terminal type 'stty -echo' to disable console echo. 3. type 'Dotnet restore', 'dotnet run', as you can see, since we disable console echo, the dotnet restore and dotnet run you typed will not shows up. 4. When dotnet run start the helloworld app, it will print out HelloWorld! then wait for user input, however what you type now will shows on console. 10989 area-System.Reflection ModuleBuilder.GetType does not work with ignore case with certain unicode chars on Unix "The following test passes on Windows, but fails on non-Windows platforms, discovered in #10532 ```c# [Fact] public void Test() { AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName(""AssemblyName""), AssemblyBuilderAccess.Run); ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule(""ModuleName""); TypeBuilder type = moduleBuilder.DefineType(""\uD800\uDC00""); TypeInfo createdType = type.CreateTypeInfo(); moduleBuilder.GetType(""\uD800\uDC00"", false, false); // Works on all platforms moduleBuilder.GetType(""\uD800\uDC00"", true, false); // Works on all platforms moduleBuilder.GetType(""\uD800\uDC00"", true, true); // Throws TypeLoadException on Unix moduleBuilder.GetType(""\uD800\uDC00"".ToLowerInvariant(), true, true); // Throws TypeLoadException on Unix moduleBuilder.GetType(""\uD800\uDC00"".ToUpperInvariant(), true, true); // Throws TypeLoadException on Unix} ``` /cc @stephentoub @AtsushiKan " 10990 area-Meta How to install corefx libraries/assemblies alongside the coreclr? I am trying to debug a simple hello world app using `lldb` on Ubuntu 15.10 (arm hf) target. I have successfully cross compiled coreclr/corefx/llvm+lldb and I am able to run `corerun` and `lldb` binaries. However, a can not find any useful information about how to properly install `corefx` build results alongside the `coreclr`. `<...>/corefx/bin` directory contains folders for different OSes/archs: ``` drwxrwxr-x 236 i.kulaychuk i.kulaychuk 20480 авг 17 21:39 AnyOS.AnyCPU.Release drwxrwxr-x 12 i.kulaychuk i.kulaychuk 4096 авг 17 21:33 Linux.AnyCPU.Release drwxrwxr-x 3 i.kulaychuk i.kulaychuk 4096 авг 18 13:35 Linux.arm.Release drwxrwxr-x 3 i.kulaychuk i.kulaychuk 4096 авг 17 20:57 Linux.x64.Release drwxrwxr-x 10 i.kulaychuk i.kulaychuk 4096 авг 18 13:35 obj drwxrwxr-x 6 i.kulaychuk i.kulaychuk 4096 авг 17 21:27 OSX.AnyCPU.Release drwxrwxr-x 3 i.kulaychuk i.kulaychuk 4096 авг 17 21:43 packages drwxrwxr-x 131 i.kulaychuk i.kulaychuk 12288 авг 17 21:30 ref drwxrwxr-x 2 i.kulaychuk i.kulaychuk 28672 авг 17 21:43 TestDependencies drwxrwxr-x 6 i.kulaychuk i.kulaychuk 4096 авг 17 21:33 tests drwxrwxr-x 83 i.kulaychuk i.kulaychuk 4096 авг 17 21:36 Unix.AnyCPU.Release drwxrwxr-x 63 i.kulaychuk i.kulaychuk 4096 авг 17 21:35 Windows_NT.AnyCPU.Release ``` What directories/dlls/so files should be copied to target `coreclr` folder in order for `lldb` (and `libsosplugin.so`) to work? There are dlls with the same name (`bin/Unix.AnyCPU.Release/System.IO.FileSystem/System.IO.FileSystem.dll` and `bin/AnyOS.AnyCPU.Release/System.IO.FileSystem/net46/System.IO.FileSystem.dll`) so I am a little confused. 10994 area-System.Runtime Add Quarters to DateTime formats "I suggest that you add support for quarters when formatting a `DateTime`. `q` would display the date quarter (1..4). Example: `new DateTime(2016, 8, 19).ToString(""Qq yyyy"") == ""Q3 2016""` This is quite common in financial applications and the lack of it can sometimes require convoluted workarounds. " 11002 area-System.Reflection FreeLibrary sometimes doesn't unlock the underlying file Consider the following test code: ``` C# string tempFile = Path.GetTempFileName(); File.WriteAllBytes(tempFile, peImage); using (SafeLibraryHandle libHandle = Interop.mincore.LoadLibraryExW(tempFile, IntPtr.Zero, 0)) { ... } File.Delete(tempFile); ``` Although `SafeLibraryHandle.Dispose` calls `FreeLibrary` the deletion of the file sometimes fails as the file is still locked. See https://github.com/dotnet/corefx/issues/10943. 11005 area-System.ComponentModel DataTypeAttribute.GetDataTypeName() throws IndexOutOfRangeException "The following test demonstrates the bug, found in #11004 ``` [Theory] [InlineData((DataType)(-1))] [InlineData(DataType.Upload + 1)] public static void GetDataTypeName_InvalidDataType_ThrowsIndexOutOfRangeException(DataType dataType) { DataTypeAttribute attribute = new DataTypeAttribute(dataType); Assert.Throws(() => attribute.GetDataTypeName()); } ``` This is because the method `EnsureValidDataType` should be changed to: ``` private void EnsureValidDataType() { if (DataType < DataType.Custom || DataType > DataType.Upload) { throw new InvalidOperationException(""DataType is Invalid""); } if (DataType == DataType.Custom && string.IsNullOrEmpty(CustomDataType)) { throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.DataTypeAttribute_EmptyDataTypeString)); } } ``` /cc @stephentoub (not sure who the code owner for this class is, or whether this code is legacy and shouldn't be touched) " 11009 area-Meta Infer PackageTargetFramework from NuGetTargetMoniker "Remove specification of PackageTargetFramework, derive it from NuGetTargetMoniker. Make sure all of our library projects don't use imports, so that we can ""trust"" that NuGetTargetMoniker is correct and the dependencies are supported by that NuGetTargetMoniker. Eliminate generation validation in the libraries since it is no longer needed due to above. Also reduce boilerplate in projects by supporting a lightweight definition of a list of package destinations. " 11016 area-System.Security A duplicate X509 certificate can be added to the user certificates store when using the X509Store API This is an edge case race that happens when a certificate is stored using the X509Store.Add API When adding a previously-unknown certificate to a certificate store in *nix, it is possible that the same certificate can be added twice. The certificate filename will look something like C7979286A20741AE49436142E9D9CD72BA2F59F4.pfx, and C7979286A20741AE49436142E9D9CD72BA2F59F4.1.pfx in ~/.dotnet/corefx/cryptography/x509/_storeName_ This is not known to happen in .NET Core or .NET Desktop in Windows (probably since certs are not stored on the filesystem) Note that I think this will happen only in very rare cases where we're adding the same cert on multiple threads/processes simultaneously - hence it may be a uniqueness in the way we work with our tests. I will look separately into preventing this from happening in our test bed cc: @bartonjs 11021 area-System.Net Fix incorrect AssemblyName in System.Net.Primitives/PerformanceTests Fixes what was presumably a typo/accident, introduced by #10192 cc @dsgouda, @stephentoub 11023 area-System.Runtime System.Runtime.Loader should be netcoreapp1.0, not netstandard1.5 It's actually a coreclr-specific API and doesn't work on other .net standard 1.5 platforms like net462 and xamarin. 11025 area-System.ComponentModel CompareAttribute throws TargetParameterCountException and ArgumentException "The following tests demonstrate the bugs, discovered in #10992 ``` [Fact] public static void Property_HasIndexParameters_ThrowsParameterCountException() { ValidationContext context = new ValidationContext(new CompareObject(""a"")) { DisplayName = ""CurrentProperty"" }; CompareAttribute = new CompareAttribute(""Item""); Assert.Throws(() => attribute.Validate(""b"", context)); } [Fact] public static void Property_SetOnly_ThrowsArgumentException() { ValidationContext context = new ValidationContext(new CompareObject(""a"")) { DisplayName = ""CurrentProperty"" }; CompareAttribute = new CompareAttribute(""SetOnlyProperty""); Assert.Throws(() => attribute.Validate(""b"", context)); } private class CompareObject { public string this[int index] { get { return ""abc""; } set { } } public string SetOnlyProperty { set { } } } ``` This is because the check [here](https://github.com/dotnet/corefx/blob/master/src/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/CompareAttribute.cs#L70) for index parameters occurs **after** we call `PropertyInfo.GetValue` [here](https://github.com/dotnet/corefx/blob/master/src/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/CompareAttribute.cs#L51) We should also add a check to make sure we can read the property before calling `GetValue`. In both these cases, we should instead return `false` for `IsValid` /cc @stephentoub " 11029 area-System.Linq Improve SelectMany behavior when the selector returns null "[In the current version](https://github.com/dotnet/corefx/blob/master/src/System.Linq/src/System/Linq/SelectMany.cs#L62) `Enumerable.SelectMany` experiences a `NullReferenceException` when `selector` returns `null`. This is undesirable because it's a confusing crash with a ""forbidden"" exception type in BCL code. This should be changed. Example: `foreach(var item in new int[][] { new int[1], null }.SelectMany(x => x)) { }` The safest approach would be to throw an exception that explains that the user has provided an invalid `selector` that does not obey the contract. Additionally, the [documentation](https://msdn.microsoft.com/en-us/library/bb534336%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396) should state the requirement to not return `null`. An alternative approach would be to treat `null` as an empty sequence. I'm not sure which solution is better. Sometimes, an empty sequence would be very convenient. Sometimes this would hide a bug. Also it's unclear that this can be done due to compatibility concerns. I think throwing a different exception type would be safe enough to take the change. " 11030 area-System.Numerics Add generic Math methods for numeric types "## Overview With the addition of System.Numerics.Vector it suddenly became possible to write some generic algorithms that worked for most primitive numeric datatypes. However as soon as you need to work with single elements you are out of luck. I propose a new generic API for scalar datatypes based upon the ideas behind System.Numerics.Vector. Just as for vectors many of the genereic methods could be generated using .tt files such as in https://github.com/dotnet/corefx/blob/master/src/System.Numerics.Vectors/src/System/Numerics/Vector.tt ## API This is an example of how the API could look like. All methods below are taken from the Vector class (https://msdn.microsoft.com/en-us/library/system.numerics.vector(v=vs.111).aspx). **Additional methods** such as those found in System.Math (https://msdn.microsoft.com/en-us/library/system.math.aspx) would be interesting as well. It could also be interesting to add non-generic methods such as `float Round(float x, int digits);` as well All functionlity could be provided in a new nuget package in order to allow out of band releases without conflicts with the current Math type. ```c# public static class Scalar { public static T Abs(T left, T right) where T : struct public static T Add(T left, T right) where T : struct public static T AndNot(T left, T right) where T : struct public static T BitwiseAnd(T left, T right) where T : struct public static T BitwiseOr(T left, T right) where T : struct public static T Divide(T left, T right) where T : struct public static T Max(T left, T right) where T : struct public static T Min(T left, T right) where T : struct public static T Multiply(T left, T right) where T : struct public static T Negate(T left, T right) where T : struct public static T OnesComplement(T left, T right) where T : struct public static T SquareRoot(T left, T right) where T : struct public static T Subtract(T left, T right) where T : struct public static T Xor(T left, T right) where T : struct // Useful methods part of Vector public static T Zero() where T : struct public static T One() where T : struct } ``` The generic requirements for some methods might be changed a bit to allow additional types, such as using providing extra overload such as those suggested in https://github.com/dotnet/corefx/issues/1583. Comparison and equality checking was not included since IComparable<> and IEquatable<> are implemented for the types already, but if it is considered a good idea to be as similar as possible to Vector then the following methods should also be considered ```c# public static bool GreaterThan(T left, T right) where T : struct public static bool GreaterThanOrEqual(T left, T right) where T : struct public static bool LessThan(T left, T right) where T : struct public static bool LessThanOrEqual(T left, T right) where T : struct ``` ### Types to support I propose that all the primitive numeric types including decimal are supported (the same types as Vector<> support but with the addition of decimal). Invoking any method with any other type should result in an NotSupportedException() - Byte - SByte - UInt16 - Int16 - UInt32 - Int32 - UInt64 - Int64 - Single - Double - Decimal (The only difference from Vector) ### Related issues: I found a few issues regarding similar ideas - #1151 is about adding new Math functionality which could be added to the ""Scalar"" type - With corresponding PR in https://github.com/dotnet/coreclr/pull/5492 - #1583 - Add generic overloads to Math.Min and Math.Max - #467 - add Clamp method " 11033 area-System.IO Release these reserved names: COM1-COM9, LPT1-LPT9, CON, AUX, PRN, and NUL Use the `\\?\` prefix to access them internally. 11035 area-System.Runtime Expose serialization primitives on .NET Native Remove ApiCompatBaseline.netcore50aot.txt / ApiCompatBaseline.uap101aot.txt baselined errors once resolved, e.g. that CultureNotFoundException doesn't implement ISerializable in the implementation. - src\System.Globalization\src\ApiCompatBaseline.uap101aot.txt - src\System.Threading.Tasks\src\ApiCompatBaseline.uap101aot.txt - etc. 11036 area-System.Net .NET Core crashes when using HttpClient with HTTP/2 and Client Certificates "**Scenario** We have built an ASP.NET Core service which connects to Apple's HTTP/2-based APNS servers (in order to send push notifications from our ASP.NET Core-based platform to Apple devices). Unfortunately, .NET Core 1.0.0-rtm crashes hard in release mode when opening an HTTP/2 connection using a client certificate. In debug mode, it sometimes behaves better. **Result when running code in release mode (.NET Core 1.0.0-rtm, Ubuntu 16.04 Server)** Hard crash. After about 8 seconds of executing HttpClient.SendAsync(...), .NET Core 1.0.0-rtm crashes hard. Exception handlers do not execute. **Result when running code in debug mode (.NET Core 1.0.0-rtm, Ubuntu 16.04 Desktop, VSCode 1.4.0)** Inconsistent behavior, ranging from long delays to hard crashes. Sometimes .NET Core crashes, and sometimes the HttpClient.SendAsync(...) call times out and throws a catchable exception. And sometimes after a few debug cycles it mostly works, with a delay of around 8 seconds and then a successful response to the initial HTTP/2 request. In the last case, where the HttpClient request does succeed (in debug mode): once the HTTP/2 connection is open, sending additional messages in real-time to APNS servers (re-using the same HttpClient connection) works quickly and seemingly consistently. In our tests to date, the failure only occurs during the initial ""HTTP/2 client using client certificate"" connection attempt. As additional info: if we remove the client certificate from the request, the HTTP/2 secure connection goes through immediately (although APNS of course returns an ""unauthorized...missing certificate (sic)"" text reply). **Repro** 1. Install .NET Core 1.0 on Ubuntu 16.04 LTS 2. Compile libcurl from source to include HTTP/2 support (see next post in thread) 3. Save your APNS development certificate to disk, and fill in its path and password in the sample code. Also fill in your APNS bundle/deviceToken IDs in the sample code. 4. Drop the sample code inside Program.cs Main() and run the sample. 4a. In release mode, the HttpClient.SendAsync(...) line of code will run for about 8 seconds and then .NET Core will crash hard without raising an exception. 4b. In debug mode from VSCode, the HttpClient.SendAsync(...) line of code will exhibit intermittent hard crashes, intermittent exceptions, and/or ~8 second delays with successful connection. REPRO CODE FOLLOWS (sending a sample push notification through Apple's APNS servers) ``` // create our HTTP Client Handler (which will be reused across HTTP/2 requests) var clientHandler = new HttpClientHandler() { ClientCertificateOptions = ClientCertificateOption.Manual }; X509Certificate2 clientCertificate = new X509Certificate2(""/home/ubuntu/apns_devcert.pfx"", ""password""); // INFO: comment out the following line to see that HTTPS/2 is succeeding without a client certificate...APNS will simply return a ""please provide a client certificate"" message clientHandler.ClientCertificates.Add(clientCertificate); // var myClient = new System.Net.Http.HttpClient(clientHandler); // we will attempt to send five requests, 60 seconds apart, to ensure that HTTP/2 is working properly. for (int i = 1; i <= 5; i++) { Console.WriteLine(""Starting request #"" + i.ToString()); // create the push notification request string deviceToken = ""{device token from mac/ios device goes here}""; string appBundleId = ""{app bundle id goes here}""; string messageUuid = Guid.NewGuid().ToString(""D""); var myRequest = new System.Net.Http.HttpRequestMessage(System.Net.Http.HttpMethod.Post, ""https://api.development.push.apple.com:443/3/device/"" + deviceToken); // upgrade the HTTP request to HTTP/2 (required for .NET Core on Linux) myRequest.Version = new System.Version(2, 0); myRequest.Headers.Add(""apns-id"", messageUuid); myRequest.Headers.Add(""apns-expiration"", ""0""); myRequest.Headers.Add(""apns-priority"", ""10""); myRequest.Headers.Add(""apns-topic"", appBundleId); StringContent content = new StringContent(""{ \""aps\"" : { \""alert\"" : \"".NET Core (request #"" + i.ToString() + "") -- test message -- \"" } }""); myRequest.Content = content; try { // INFO: .NET Core crashes on the following line var response = myClient.SendAsync(myRequest).GetAwaiter().GetResult(); // print out response to console var responseString = response.Content.ReadAsStringAsync().GetAwaiter().GetResult(); Console.WriteLine(""Response: "" + responseString); // optionally, verify that the response is using HTTP/2 //Console.WriteLine(""Response protocol: HTTP/"" + response.Version.ToString()); } catch (System.Net.Http.HttpRequestException ex) { Console.Write(""HttpRequestException: "" + ex.Message); } catch (Exception ex) { Console.Write(""Exception: "" + ex.Message); } // wait 60 seconds between test requests Task.Delay(60000).GetAwaiter().GetResult(); } Console.WriteLine(""Done""); ``` " 11037 area-System.Runtime Add SuppressIldasmAttribute Add this, it's used in a few apps. It has no implementation. ``` T:System.Runtime.CompilerServices.SuppressIldasmAttribute M:System.Runtime.CompilerServices.SuppressIldasmAttribute.#ctor ``` 11038 area-System.Net HttpClient Exception on GetAsync method "Hi all, since I updated from RC1 to 1.0 I'm getting an exception using HttpClient.GetAsync method. Here the exception: Exception type System.TypeLoadException Exception message: Could not load type 'System.Collections.Concurrent.ConcurrentDictionary`2' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. Stack trace: at System.Net.Http.Formatting.JsonMediaTypeFormatter..ctor() at System.Net.Http.Formatting.MediaTypeFormatterCollection.CreateDefaultFormatters() at System.Net.Http.HttpContentExtensions.get_DefaultMediaTypeFormatterCollection() at WebApi.Controllers.MyController.Get(String word) in C:\MyController.cs:line 30 at lambda_method(Closure , Object , Object[] ) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__28.MoveNext() It seems a conflict between .Net4.0 and .Net4.5, my project reference ""net461"", IIS tries to get the method from mscorlib (net45) and it fails because it's getting actually mscorlib (net40). This method doesnt exists in mscorlib(net40) but in mscorlib(net45). See: http://stackoverflow.com/questions/38375857/system-typeloadexception-could-not-load-type-system-reflection-runtimereflecti Here my project.json: { ""dependencies"": { ""Microsoft.NETCore.App"": { ""version"": ""1.0.0"", ""type"": ""platform"" }, ""Microsoft.AspNetCore.Mvc"": ""1.0.0"", ""Microsoft.AspNetCore.Server.IISIntegration"": ""1.0.0"", ""Microsoft.AspNetCore.Server.Kestrel"": ""1.0.0"", ""Microsoft.Extensions.Configuration.EnvironmentVariables"": ""1.0.0"", ""Microsoft.Extensions.Configuration.FileExtensions"": ""1.0.0"", ""Microsoft.Extensions.Configuration.Json"": ""1.0.0"", ""Microsoft.Extensions.Logging"": ""1.0.0"", ""Microsoft.Extensions.Logging.Console"": ""1.0.0"", ""Microsoft.Extensions.Logging.Debug"": ""1.0.0"", ""Microsoft.Extensions.Options.ConfigurationExtensions"": ""1.0.0"", ""Microsoft.NETCore.Portable.Compatibility"": ""1.0.1"", ""Microsoft.EntityFrameworkCore"": ""1.0.0"", ""Microsoft.EntityFrameworkCore.Relational"": ""1.0.0"", ""Microsoft.EntityFrameworkCore.SqlServer"": ""1.0.0"", ""Microsoft.EntityFrameworkCore.Design"": ""1.0.0-preview2-final"", ""Microsoft.Extensions.WebEncoders.Core"": ""1.0.0-rc1-final"", ""SapientGuardian.MySql.Data"": ""6.9.812"", ""Microsoft.AspNetCore.Mvc.Formatters.Xml"": ""1.0.0"", ""Microsoft.AspNetCore.StaticFiles"": ""1.0.0"", ""MimeKit"": ""1.4.1"", ""MailKit"": ""1.4.1"", ""System.Xml.XmlDocument"": ""4.0.1"", ""AspNet.Security.OAuth.Validation"": ""1.0.0-alpha2-final"", ""OpenIddict"": ""1.0.0-*"", ""Microsoft.AspNetCore.Authentication.JwtBearer"": ""1.0.0"", ""Serilog"": ""2.1.0"", ""Serilog.Sinks.File"": ""2.1.0"", ""Microsoft.AspNet.WebApi.Client"": ""5.2.3"" }, ""tools"": { ""Microsoft.AspNetCore.Server.IISIntegration.Tools"": ""1.0.0-preview2-final"", ""Microsoft.EntityFrameworkCore.Tools"": ""1.0.0-preview2-final"" }, ""frameworks"": { ``` ""netcoreapp1.0"": { ""imports"": [ ""dotnet5.6"", ""net461"" ] } ``` }, ""buildOptions"": { ""emitEntryPoint"": true, ""preserveCompilationContext"": true }, ""runtimeOptions"": { ""configProperties"": { ""System.GC.Server"": true } }, ""publishOptions"": { ""include"": [ ""wwwroot"", ""Views"", ""Areas/**/Views"", ""appsettings.json"", ""web.config"" ] }, ""scripts"": { ""postpublish"": [ ""dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"" ] } } " 11042 area-System.Security X509Certificate2: Unclear error message when file does not exist "This issue is similar to #9402 An exception with an obscure error message is thrown when creating a `X509Certificate2` using a path to a file which does not exist. Consider the following code: ``` using System; using System.Security.Cryptography.X509Certificates; namespace ConsoleApplication { public class Program { public static void Main(string[] args) { new X509Certificate2(fileName: ""invalid.cer""); } } } ``` on Windows, the following exception is thrown: ``` Unhandled Exception: Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException: The system cannot find the file specified at Internal.Cryptography.Pal.CertificatePal.FromBlobOrFile(Byte[] rawData, String fileName, String password, X509KeyStorageFlags keyStorageFlags) at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(String fileName, String password, X509KeyStorageFlags keyStorageFlags) at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName) at ConsoleApplication.Program.Main(String[] args) ``` whereas the following exception is thrown on Linux and OS X: ``` nhandled Exception: Interop+Crypto+OpenSslCryptographicException: error:2006D080:BIO routines:BIO_new_file:no such file at Interop.Crypto.CheckValidOpenSslHandle(SafeHandle handle) at Internal.Cryptography.Pal.CertificatePal.FromFile(String fileName, String password, X509KeyStorageFlags keyStorageFlags) at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(String fileName, String password, X509KeyStorageFlags keyStorageFlags) at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName) at ConsoleApplication.Program.Main(String[] args) ``` As such, this confirms to the MSDN specifications of the `X509Certificate2` constructor because all it says is that a `CryptographicException` should be thrown - which is the case. It seems that the error message contains too much information - I'd argue it should only read ""no such file"" or a user-friendly string, and the underlying OpenSSL error code (2006D080) could go on a different property of the OpenSslCryptographicException class. " 11044 area-System.ComponentModel Cannot reset DisplayName on ValidationContext "I do a lot of work with console applications and I like to use validation attributes and `IValidatableObject` to take advantage of framework-supplied validations rather than reinventing the wheel or using a third-party library. When looping through an object's properties to validate them, I can set the context's `MemberName` property appropriately each run through, but any non-successful validation results may return a nonsensical message since the validators use the `DisplayName` property to format the message, and the `DisplayName` property getter caches its return value the first time it is used. In addition to this, the `DisplayName` property cannot be reset as the setter will throw an `ArgumentNullException`. I could envision any of the following approaches to resolve this: - Allow setting `DisplayName` to `null` or `""""` - Set the `_displayName` field to `null` whenever `MemberName`/`_memberName` are changed - Offer a method like `Reset(bool clearItems = true)` to be a bit more explicit " 11045 area-System.Xml XML .Save() method missing option to use filename It seems that System.IO.Stream, System.IO.TextWriter, and System.Xml.XmlWriter are still options, but using string filename has been removed. 11046 area-System.Security X509Certificate2/OpenSSL: Unable to open PKCS#12 files with no password and no MAC "If you have a PKCS#12 file which is not protected with a password, and which does not have a MAC entry, opening the file will work on Windows but fails on Linux and Mac (which use OpenSSL). The following program reproduces the behavior: ``` using System; using System.IO; using System.Security.Cryptography.X509Certificates; namespace ConsoleApplication { public class Program { public static void Main(string[] args) { byte[] rawData = Convert.FromBase64String( ""MIACAQMwgAYJKoZIhvcNAQcBoIAkgASCA+gwgDCABgkqhkiG9w0BBwGggCSABIID6DCCBRUwggURBgsqhkiG9w0BDAoBAaCCBMAwggS8AgEAMA0GCSqGSIb3DQEBAQUABIIEpjCCBKICAQACggEBAJ9Iw1KuIXuQBnQA3GvlPu2yvXZU8BbM6yBwuypsUdOk4isb8S2+CI/p3Ez8yWMb+HZLQ1QBXDvk2VzZUIJH+xY1oWqu7Hvo9iADkltKbfZ1yjfG5Dy7FatNnVHlGoq7HTK9WlxEVZutrHdpBKHNdHWoXr0xqxS4YtcXnnBZMLlDpVhxUJ6L/X0WRHY52QcLp6ZYfAObU1+l+Ihh7OVP1r8c0HmIH+qL3FaQplhrNjFr6qrCarA42DZjcgShuNOfuvhEJejmgOL7QS0j8h2sT/Fa5oDNwRNJV5vrni8GPbjd4Sbch+90+Oz39tyO8ecvIsKKak67oUbR80EyXNjb0eMCAwEAAQKCAQA8C/AmQSK6NAdav+BYhGl+rj0iWM7RqZqR9i14xrDqOmRQoA4Bknwj1KOKGlnJFQhLf//3sTOWGKWgjQP+uSf8rWcWkq7v31i5pN8NrzdZC/qZoE72XgjDNVUzRE0HM5bERAHGerRTJdu4gEyQuqVGnZxpcknuW7xXHb5K2DS4AiIDfkU9iqkUxa/hEG4HpueBgXv14oRa5z4hPzTbiIcej18f1n3IJA1SsATZ3RjU5B52ni/lYALufdnAJeBycLDU9m7UbqTfXSpb2uWM9yJKCOALHQZzE50/pW3DRQpdfbkoaMucoHqUSsLSbTLkYduHoxb9Bi7A6tgRTQFtOvfhAoGBANC639cEiE4xScrD3s9A/5/8pRoN8ojLEVDk44igGMHz+usHfxxp8YQvmYd5US1P6qPAX1scHKqHDbokd7aDh/5L7TKlwxo+iv7aOPQWJbpEmtsXASsMYfKneifUUxA47GtEYLHQ9Yy3kAratTaHH9K3a6x3wbsk815p77hlRygbAoGB"" + ""AMNbRSmmx/53b1YV6LxOuxzRSyCP5qYswlG2i7H6A+MLmUnxYurFvSptk+vEngmbOJW9rd49bHrK6PUtKBNYLxRWjRUtkgK2Z9PQguc8GD0W7SjHZafpFPETVdKxIVP6a18RB5jNvIuOPA8Z09/Kh80dw9dEPXs1EFQubxEFQ6nZAoGAOZsJgcb/c00JB4vNJzfSFK5eRnWI9RXOHpw864z7qDOUkV7NRuM6Q3f7kDb8H1xJ7o1+A6AbjTieojvESju8wYLk4LB8yvZt1+4T/9FI8kJS1ppfuSi+s4BjJzDjB7weC3CgmxKHYiGbAFPh5T2fm8EBV2Tps6N8AxeLkEFrBIID6ET3AoGAWmveYV7+5rtlXxUY+j/+v2HoBIIBMUIUGRAFW5PyyEoCjNYEQllFTyGXkO0YdwUDppqPq+szNkzNZW6YiKci1Y/Om0vwm7CXvSNgRkJ2GoDpAdcUy4S6dkT3z2eeKXUx41k5aYVBHqENaR23IfljXPwShDTeeA0lWseyUfKE44efRihRAoGAYn+PAVLDWmSKMm6rJDbJne12NYviqOa6n3ZJg0N9I8o0C/xFX1o/IzJF0EPdyVlCj/laIYoUX3O1P5I8YeubcR/JvY/LnCMutgsWlkdbz5c9gfbFVaEXXQPFyKuSaMea6pn+kv9EYtVfgiQ4rZ4aZwe0CWkzfDvIE6AGYgMICMIxPjAXBgkqhkiG9w0BCRQxCh4IAGMAZQByAHQwIwYJKoZIhvcNAQkVMRYEFO3z0SLPYjzwz8nNImJh6EFag+YwAAAAAAAAMIAGCSqGSIb3DQEHAaCAJIAEggPoMIIGETCCBg0GCyqGSIb3DQEMCgEDoIIFvDCCBbgGCiqGSIb3DQEJFgGgggWoBIIFpDCCBaAwggSIoAMCAQICCBulrjADvm1lMA0GCSqGSIb3DQEBBQUAMIGWMQswCQYDVQQGEwJVUzETMBEGA1UECgwKQXBwbGUgSW5jLjEsMCoGA1UECwwjQXBwbGUgV29ybGR3a"" + ""WRlIERldmVsb3BlciBSZWxhdGlvbnMxRDBCBgNVBAMMO0FwcGxlIFdvcmxkd2lkZSBEZXZlbG9wZXIgUmVsYXRpb25zIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTE1MDExMjEyMTIxMFoXDTE2MDExMjEyMTIxMFowgZMxGjAYBgoJkiaJk/IsZAEBDApSSlhWVEU4NjUzMTgwNgYDVQQDDC9pUGhvbmUgRGV2ZWxvcGVyOiBGcmVkZXJpayBDYXJsaWVyICg4VDlVS1VCR1k5KTETMBEGA1UECwwKVENESzVFTEFINzEZMBcGA1UECgwQRnJlZGVyaWsgQ2FybGllcjELMAkGA1UEBhMCVVMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCfSMNSriF7kAZ0ANxr5T7tsr12VPAWzOsgcLsqbFHTpOIrG/EtvgiP6dxM/MljG/h2S0NUAVw75Nlc2VCCR/sWNaFqrux76PYgA5JbSm32dco3xuQ8uxWrTZ1R5RqKux0yvVpcRFWbrax3aQShzXR1qF69MasUuGLXF55wWTC5Q6VYcVCei/19FkR2OdkHC6emWHwDm1NfpfiIYezlT9a/HNB5iB/qi9xWkKZYazYxa+qqwmqwONg2Y3IEggOgBKG405+6+EQl6OaA4vtBLSPyHaxP8VrmgM3BE0lXm+ueLwY9uN3hJtyH73T47Pf23I7x5y8iwopqTruhRtHzQTJc2NvR4wIDAQABo4IB8TCCAe0wHQYDVR0OBBYEFO3z0SLPYjzwz8nNImJh6EFag+YwMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUiCcXCam2GGCL7Ou69kdZxVJUo7cwggEPBgNVHSAEggEGMIIBAjCB/wYJKoZIhvdjZAUBMIHxMIHDBggrBgEFBQcCAjCBtgyBs1JlbGlhbmNlIG9uIHRoaXMgY2VydGlmaWNhdGUgYnkgYW55IHBhcnR5IGFzc3VtZXMgYWNjZXB0YW"" + ""5jZSBvZiB0aGUgdGhlbiBhcHBsaWNhYmxlIHN0YW5kYXJkIHRlcm1zIGFuZCBjb25kaXRpb25zIG9mIHVzZSwgY2VydGlmaWNhdGUgcG9saWN5IGFuZCAEggItY2VydGlmaWNhdGlvbiBwcmFjdGljZSBzdGF0ZW1lbnRzLjApBggrBgEFBQcCARYdaHR0cDovL3d3dy5hcHBsZS5jb20vYXBwbGVjYS8wTQYDVR0fBEYwRDBCoECgPoY8aHR0cDovL2RldmVsb3Blci5hcHBsZS5jb20vY2VydGlmaWNhdGlvbmF1dGhvcml0eS93d2RyY2EuY3JsMA4GA1UdDwEB/wQEAwIHgDAWBgNVHSUBAf8EDDAKBggrBgEFBQcDAzATBgoqhkiG92NkBgECAQH/BAIFADANBgkqhkiG9w0BAQUFAAOCAQEAaIuMydHST4l1fMsaXr51Ejqa00fB3PNY9Rw6oG1cWkSS6RgxAz7AJ7dJCO0tZdqPCX6VKnTHhgMlQrI8tIfU2WcG+sV3tvnAysqRtDPqhHWiR4judlp0ETzoLHJFDbbnEph3NpOYVfUwyCthYL/xv3cF9ohcHvfS02O4MsQl1QKhUzLXEOnjUGgPIb7xmGIP54+TNePhEdOi05ijKr1AO4BgCKjeu7tHYvIuyY9HGOfGyuXsoDrP6F+Jj3VRvYCCZuKIvDnocGHsi9AgaxuOSdp5GQOD6OQvXaOPeJNLf8+1Z1S4h/9lS6VubqH+tp9nvgUuq+zbmHv5iqRadMmz4TE+MBcGCSqGSIb3DQEJFDEKHggAYwBlAHIAdDAjBgkqhkiG9w0BCRUxFgQU7fPRIs9iPPDPyc0iYmHoQVqD5jAAAAAAAAAAAAAAAAAAAAAA""); File.WriteAllBytes(@""rawData.bin"", rawD