* 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
The APIs appear to be working fine; it's just that on Linux we're throwing an internal exception derived from SocketException that contains more details, and the test was expecting exactly a SocketException. Fixed the test. On macOS, the OS successfully resolves IPAddress.None to broadcasthost, producing a valid GetHostEntry result, so I've left the test as platform-specific to not run on macOS, and added one for macOS.
Commit migrated from https://github.com/dotnet/corefx/commit/1765888965a8ed5ff0fa6bdf4807be6e46d800d0
* Enable tests to compile with netstandard
Most of the tests have netstandard configurations and it doesn't compile. the changes here is to fix the configurations and the tests to compile.
This is important step to get netfx tests compile too as we are in most of the time netfx fallback to netstandard configuration
The changes include some fixes to compile teh sources too.
* Fix System.Collections.Immutable
* update src configuration
* remove netstandard17 defines
* Split netcoreapp code to its own files
* Remove 17 from the test class name
Commit migrated from https://github.com/dotnet/corefx/commit/15b4f51c2f3cb924840e5407bb8d5fe03bb282ea
* Enable compiling the test projects against the configuration
The tests were compiled using the vertical configuration and not the best configuration picked from Configurations.props. this change is fix that and have all test projects configured accordingly.
This change ensuring netcoreapp runs successfully and we'll have another rounds later for other configurations like netfx, UAP...etc.
* Fix openssl test project on Linux distros
* Update the project configurations
* Update VS solution files
* update solution files
Commit migrated from https://github.com/dotnet/corefx/commit/e79912f8b77bc22abfd85e94b74c06e5d99e8381
* [WIP]Created src\tests.proj which is mostly building all tests
* Convert test project .builds to Configuration.props
* Fix test paths in targetingpack.props, move test-runtime.
* Move test-runtime under external.
* Rename RuntimeDir->RuntimePath in targetingpacks.props and
Xunit.Runtime.depproj.
* Remove test-runtime project.json from the SupplementalTestData list in
dir.targets.
* Remove XUnit.Runtime.depproj from tests.proj
* Convert test .builds files to Configuration.props.
* Revert "Convert test project .builds to Configuration.props"
This reverts commit dotnet/corefx@1efc4d9a02.
* Fix compilation error in System.Collections.Concurrent.Tests
* Fix condition in System.Collections ref project
* Fix two more Collections test project issues
* Add Configuration.props for System.Collections ref
* Fix TargetGroup conditions in System.Collections.Tests.csproj.
* Fix compilation problems with NameResoltion.Pal.Tests.
* Fix compilation errors in SqlClient Stress tests
* Fix IO.Compression.Performance tests compilation
* Fix compilation and configurations of System.Net.Http.Unit.Tests.csproj.
* Fix compilation issues in System.Private.Xml.Linq tests
* Disable XsltScenarios.Tests project, like it was before.
* Fix missing DefineConstants for System.Linq ref project.
* Fix compilation of System.Net.Primitives.Pal.Tests.csproj
* Fix compilation of System.Net.Primitives.UnitTests.Tests.csproj
* Fix compilation of System.Security.Cryptography.Cng.Tests.csproj.
* Fix compilation of System.Net.Primitives reference project
* Fix compilation of System.Net.Security ref project
* Fix compilation of SYstem.Net.Security.Tests.csproj
* Fix configuration of X509Certificates ref project
* Fix compilation errors in System.Net.Http.Unit.Tests.csproj
* Fix Common.Tests.csproj
* Fix System.Diagnostics.Debug.Tests.csproj
* Fix Microsoft.Win32.Registry.Tests.csproj
* Add runtime.native.System.Data.SqlClient.sni to external project
* Fix System.Diagnostics.TraceSource.Tests.csproj
* Fix System.IO.Compression.Performance.Tests.csproj
* Move supplemental test data into test-runtime/project.json
* Fix System.IO.FileSystem.Watcher.Tests.csproj
* Fix System.IO.FileSystem.Tests.csproj
* Fix System.IO.Pipes.AccessControl.Tests.csproj
* Fix System.IO.MemoryMappedFiles.Tests.csproj
* Fix System.IO.Pipes.Tests.csproj
* Fix System.Json.Tests.csproj
* Add missing supplemental test data for net security tests
* Fix resource names in System.Xml.XPath.XDocument.Tests.csproj
* Fix Assembly.Location test case
* Fix assembly loading paths in DefaultLoadContextTest.cs
* Fix issues in System.Runtime.Loader.Tests.csproj
* Fix RootNamespace in ResourceManager tests
* Mark OpenSSL tests as unsupported on Windows
* Fix RootNamespace in System.Xml.XPath.Tests.csproj
* Fix RootNamespace in System.Xml.XPath.XmlDocument.Tests.csproj
* Fix System.IO.Compression.Tests.csproj
* Add missing Configurations.props files for System.Net projects
* Fix compilation issues in WinHttpHandler tests
* Add fixes and a workaround for Linq.Expressions tests
* Add workaround for System.Runtime.Tests
* Use extension methods explicitly in Ref.Emit tests
* Hook up test projects into build
* Fix build configuration of Crypto.Primitives for netcoreapp
* Enable VB tests outside Windows
* Enable Mail tests outside windows
* Don't run Unsafe tests outside windows
* Don't build Unsafe tests outside Windows
* Don't build WebServer project outside of Windows.
* Fix corerun path for Unix tests.
* Fix casing of 'Native' directory in NETCoreApp private pkgproj
* Remove runtime-specific stuff from Xunit.Runtime.depproj
* Move tests into a separate project ('tests.msbuild') which isn't built in build.proj
* Remove duplicate types from NameResolution.Pal tests
* Skip tests in a project if there is no compatible configuration.
* Include internal socket types only on Windows in NameResolution tests
* Manually fix S.R.InteropServices configurations
* Rename tests.msbuild -> tests.builds
* Manually fix System.Text.Encoding.Tests.csproj configuration
* Manually fix System.Threading.Tests configuration
* Manually clean up System.Runtime.Tests.csproj
* Fix System.IO.FileSystem.Tests configurations
* Manually fix System.Globalization.Tests configurations
* Manually fix System.IO.Pipes.Tests configurations
* Manually fix System.IO.Compression.Tests configurations
* Manually fix System.Runtime.Extensions.Tests configurations
* Manually fix System.IO.MemoryMappedFiles.Tests configurations
* Manually fix S.Diagnostics.Process.Tests configurations
* Manually fix System.ComponentModel.TypeConverter.Tests configurations
* Misc PR feedback.
* Use HostRunnerName instead of HostRunner in Process tests
* Fix configurations for S.ServiceProcess.ServiceController.Tests
* Revert to using ConfigurationErrorMsg to check if tests should be skipped.
Configuration still defaults to 'Debug' even if there is no valid configuration.
Commit migrated from https://github.com/dotnet/corefx/commit/2c0352ec38f9f6f602ae819f0cafb02c1908f137