* Build uapaot System.Numerics.Vectors
With `Vector<T>` now residing in System.Private.CoreLib, directly reference System.Private.Corelib instead of contracts just like netcoreapp does.
Add uapaot flavor since System.Private.CoreLib has a different strong name key on that platform.
* Make EnsureExtendedPrefixOverMaxPath available to UAP
Add the helper method `System.IO.PathInternal.EnsureExtendedPrefixOverMaxPath` to Common\src\System\IO\PathInternal.Windows.cs. It was previously not visible to UAP since Common\src\CoreLib\System\IO\PathInternal.Windows.cs is not included in UAP compilation.
* Keep SocketsHttpHandler out of UAP builds
SocketsHttpHandler is not supported in uap and is currently leaking into UAP builds since they've been disabled for a few weeks. Adjust the contract so it's not available to UAP, and clean the implementation assembly so SocketsHttpHandler internals don't leak out into HttpClientHandler.Core.cs.
* Fix GetAddrInfoExSupportsOverlapped UAP build break
`System.Net.NameResolutionPal.GetAddrInfoExSupportsOverlapped` uses LoadLibraryExW which is not compatible with UAP (which only supports LoadLibrary of DLLs within a container). Refactor the helper so UAP returns false.
* Revert "Disable UAP legs per dotnet/corefx#26802 (dotnet/corefx#26822)"
This reverts commit dotnet/corefx@120dce456a.
* Revert "Disable UAP configurations in all configurations build"
This reverts commit dotnet/corefx@2202b4fd49.
* Revert "Disable UAP official builds (dotnet/corefx#26871)"
This reverts commit dotnet/corefx@ef79caf14c.
- Baseline the ApiCompat and GenFacades failures in System.Runtime.Extensions and System.Threading.ThreadPool.
- Adjust naming of files to match branch conventions
- Fix up some configuration issues with uap packaging. The CoreFX.Private.TestUtilities packaging needs updated build tools which can map between uwp6.0 and netstandard2.0.
- ifdef out Thread.GetCurrentProcessorId until we get a new System.Private.CoreLib.
Commit migrated from https://github.com/dotnet/corefx/commit/c9cdfba45e62eeac28ef554d8bbdfdd620a0fd15
* Clear initlocals in a bunch of assemblies
Sets
```XML
<ILLinkClearInitLocals>true</ILLinkClearInitLocals>
```
for the assemblies:
- System.IO.FileSystem
- System.IO.Pipes
- System.Memory
- System.Net.Http
- System.Net.Http.WinHttpHandler
- System.Net.NameResolution
- System.Net.NetworkInformation
- System.Net.Primitives
- System.Net.Requests
- System.Net.Security
- System.Net.Sockets
- System.Net.WebSockets
- System.Net.WebSockets.Client
- System.Net.WebSockets.WebSocketsProtocol
- System.Private.Uri
- System.Runtime
- System.Runtime.Extensions
Eventually we'd ideally set the flag for the whole repo; these are just the ones I audited thus far. In a few cases I had to make code changes to adapt, where the code was expecting stackallocs to be cleared. I also looked at a few other projects (System.Collections, System.Runtime.Numerics) where there were more significant dependencies on clearing and I decided to leave those for later.
* Disable ILLinkClearInitLocals running on Unix until it works there
Commit migrated from https://github.com/dotnet/corefx/commit/f0a032e4a1c8a848574a5db3e69e8a6fa0aae91e
These were disabled a few days ago, but it looks like the issue may have been caused by problematic test infrastructure. One of the offending machines has been re-imaged, and the others have been rebooted.
Re-enabling the tests should allow us to determine if it was an infrastructure issue, or if there is a real problem here.
Fixes: dotnet/corefx#26789
Commit migrated from https://github.com/dotnet/corefx/commit/b60618197972da445ff5e675d425459fc9c0d3ae
* Move System.Native/pal_maphardwaretype.cpp to C
* Switch C compiler from C11 to C99
* Move System.Native/pal_errno.cpp to C
* Move System.Native/pal_tcpstate.cpp to C
* Move System.Native/pal_networkstatistics.cpp to C
* Move System.Native/pal_memory.cpp to C
* Move System.Native/pal_io.cpp to C
* Move System.Native/pal_networking.cpp to C
* Define c_static_assert for compiler that don't support static_assert
Commit migrated from https://github.com/dotnet/corefx/commit/6a9f579209491ae9041f208bfe34b89085c0279e
On Windows, passing an empty string to gethostbyname/GetAddrInfoW results in the host's information being used; that behavior then bubble's up through (and is documented for) the Dns.GetHost* APIs in .NET. On Unix, the native functions being used don't provide that same behavior, instead returning an error.
This just special-cases empty string in the Unix implementation.
Commit migrated from https://github.com/dotnet/corefx/commit/e9bd4c87e5032184c51ba03b81ef74328bbdfb1a
* Fix a bunch of random test failures on ILC
- PlatformDetection - GetEnvironmentVariable() still
returns null on ILC - but Environment.GetSpecialFolder()
is fully functional (and it's a preferred idiom.)
- Other stuff is self-explanatory.
* Fix casing. Add comment.
Commit migrated from https://github.com/dotnet/corefx/commit/32310bbcb0a95be9e34e58eb31ac228e996f3554
A bunch of the unit tests try to validate that sockets were correctly initialized. They do so with fakes that intercept the calls. But on desktop, the real methods were being used, bypassing that interception. I've fixed it by making the unit tests on desktop compile like core so as to use the fakes.
Commit migrated from https://github.com/dotnet/corefx/commit/03b3d6aa1e9305269d146e5698e4a4b8297611a6
Now instead of Use*Key a project can instead define the assembly key
in the project (genreally the common dir.pops for a project) using
the AssemblyKey property. The accepted values are Open, ECMA, MSFT,
Test.
This change allows for a repo to set the default key they want to use
for projects. In corefx we have switched the default to use the Open
key instead of the old BuildTools default of MSFT key.
As part of this update we are explicitly setting the AssemblyKey in
all the library projects (although it is really only necessary for
projects that aren't the default).
Also with this change we are updating all the new libraries that have
not yet shipped stable (compared to our 1.1 release) and making them
use the Open key. Which means that for prerelease dependencies there
might be some binary breaking changes to consume.
The following libraries ahven't shipped so there key is being
changed from MSFT to Open:
Microsoft.XmlSerializer.Generator
System.CodeDom
System.Configuration.ConfigurationManager
System.Data.Odbc
System.DirectoryServices
System.DirectoryServices.AccountManagement
System.DirectoryServices.Protocols
System.IO.Ports
System.Json
System.Memory
System.Net.HttpListener
System.Net.Mail
System.Net.ServicePoint
System.Net.WebClient
System.Net.WebProxy
System.Private.Xml
System.Private.Xml.Linq
System.Security.Cryptography.Xml
System.Security.Permissions
System.Transactions.Local
System.Web.HttpUtility
Commit migrated from https://github.com/dotnet/corefx/commit/ac09a797d09502ebab61f7167bb856846602e1e6
* Fix UWP Pinvoke checker condition
* analyzer baselines
* Remove redundant local define
* Remove redundant CA lines
* Special case Registry
* Fix BlockReflectionAttribute
* Replace NETNATIVE with uap define
* baselines
* Disable Pinvoke scan on specific projects
* Disable BlockReflectionAttribute on ilproj
* Revive 2 baselines
* Disable UWP validation on SQlClient
* Convert some defines to `uwp`
* Fix S.N.Primitives baseline
* Remove dead baselines
* Clean up NET_NATIVE defines
* Remove FEATURE_CORECLR except from shared sources
* Change Threading.Thread defines to just uapaot
* Fix comment
* Fix comment 2
* Change serialization uap defines to uapaot
* Rename EnableWinRT to UWPCompatible
* Fix UAP build for Console
* Fix uap condition in XML csproj
* Fix condition in XmlSerializer project
* Replace netcore50
* Remove dead #if
* Redundant console condition
* Redundant console condition2
* Trim baseline
* Revert Console baseline to pre UAP
* Fix MemoryMappedFiles uap build
* Fix S.Linq.Expressions build for UAP by temporarily disabling it
* Fix S.N.Sockets build for uap
* No plans to put SQLClient in UWP
* Fix RuntimeInformation build
* Fix MemoryMappedFiles build for Unix
* Add UWPCompatible to all netstandard versions
* Add EnablePinvokeAnalyzer to disable Pinvoke checking entirely for some reason
* Remove dead System.Xml.XmlSerializer.Tests.settings.targets
* Fix interop services build
* Remove last uap/uapaot define in Xml tests
* PInvoke check doc
* Fix PInvoke casing
* PInvoke file is case sensitive
* Remove unnecessary references to uapaot from projects that don't have uapaot configs
* Remove unnecessary uapaot from S.R.I.RI
* Replace UWPCompatible for TargetGroup in csproj conditions
* Reverse FileSystem edit as not ready to build for UWP
Commit migrated from https://github.com/dotnet/corefx/commit/b1865ea0847a7a86baefe8378b772ecf0b785681
There are a bunch of places throughout the System.Net libraries where exceptions are captured and later thrown, using `throw e;`. This overwrites their stack trace and bucket information, making it harder to diagnose problems when they occur. Over time we've chipped away at these, so there are many fewer now than there used to be, but some still remain.
I've audited all of the System.Net libs, and fixed all the locations I found where this pattern was being employed, replacing them with usage of ExceptionDispatchInfo to avoid losing the call stack data. There are still some `throw e`s I left, but those were typically of a form where it was obvious no data would be lost, e.g. the exception was just instantiated a few lines earlier. There are likely also a few straggling cases, e.g. where `throw SomeFunction()` is used and `SomeFunction()` returns a cached exception instance, but we can address those on a case-by-case basis as we find them.
Commit migrated from https://github.com/dotnet/corefx/commit/c750cfc5357af44f913e122c25f0b32872eb456c