Commit Graph
677 Commits
Author SHA1 Message Date
Eric Mellino 966c8e0251 [dev/eng] Overhaul ref and src project references, and start binplacing things (dotnet/corefx#14062)
* Used GenerateBuilds.ps1 script to generate the P2P references from the project.json files in ref

* Update refs to build with ProjectReference's instead of package references

This deletes all the ref\project.json files and instead adds ProjectReference
to other refs that are used to build.

There is only one exception which was System.Net.Http which needed a project.json
to get the net46 targeting pack otherwise everything else is P2P.

* Update Reflection.Emit contracts to support latest version of contracts

* Add depproj to get windows.winmd support when building refs

* Special handle System.Net.Http ref project to deal with net46 targeting pack

* Moved CLSCompliant to SecureString ctor instead of type

* Add P2P reference from S.IO -> S.R.Extensions

* Add additional ProjectReferences to more ref projects after master rebase

* Start binplacing ref assemblies and disable rest of build

* Simplify all ref projects to only build for netcoreapp (default target group)

* Only binplace netcoreapp refs

* Allow Reference's to be resolved from targeting pack directories

* Use GenerateBuilds.ps1 to convert src project.json refs to References

* Allow overriding stuff in Tools

* System.Runtime src project building against targeting pack

* Re-purpose GenerateBuilds.ps1 to re-write src references

* Only build csproj files in src.builds

* More custom stuff in GenerateBuilds.ps1

* Binplace all netstandard assemblies into netcoreapp as well.

* Add project.json to System.Collections.Immutable

* More custom generatebuilds.ps1 stuff

* Normalize csproj files before running GenerateBuilds.ps1

* Better match the replaced  'None Include="project.json"' line.

* Another missing project.json inclusion in csproj

* Remove ExcludeFromCodeCoverageAttribute from Immutable project

* Include another project.json

* Add some P2P references

* Add another project.json include

* Disable Http.Rtc project.

* Disable two more UWP projects and another P2P ref"

* More Cleanup

* Run GenerateBuilds.ps1 to re-write all nuget refs as <Reference>'s

* Binplace netstandard runtime assemblies to netcoreapp as well.

* Re-hook all src projects into build.proj

* Fix bin clashing caused by bad ProjectReference metadata

* Use 'copy' instead of 'cp' in init-tools.cmd. Add copying to init-tools.sh as well.

* Correct casing of windows.winmd in depproj

* Disable System.Memory.csproj outside of Windows

* Fix unix exclusion of System.Memory, and include vbproj files

* Fix VisualBasic compilation

* There was an extra definition of MemberTypes that was internal to the
  assembly. It's now defined in System.Private.CoreLib, so I deleted the
  extra here.
* There was an invalid call in Operators.vb that I fixed.

* Add additional project references and configuration fixes after rebase

* Fix build warnings in ref projects

* Fix build warnings in src projects


Commit migrated from https://github.com/dotnet/corefx/commit/a9f6d7d749f9946cc6b10c50b54bcae0e43e859e
2016-11-29 18:01:35 -08:00
Eric St. John 34d56a4c14 Update stable dependencies to latest stable
This reduces total download of packages.


Commit migrated from https://github.com/dotnet/corefx/commit/d6fa06e13d29ce9931c395c729d5e61441c02ee8
2016-11-22 11:03:12 -08:00
John Chen (CLR) 6f8034b562 Merge latest from 'master' and resolved conflicts
Commit migrated from https://github.com/dotnet/corefx/commit/b9b53c8efa4b259312f8997c86dcfb11083f88ab
2016-11-15 09:11:17 -08:00
Lakshmi Priya Sekar c45e4e0a91 Address nits and other changes from PR feedback.
Commit migrated from https://github.com/dotnet/corefx/commit/3f1f8b3cc80efe72a88b8be8780bbbbc4a7b7311
2016-11-14 16:44:39 -08:00
Eric Mellino 1435610de7 Enable ApiCompat in S.R.WinRT by updating WinRT targeting pack
Commit migrated from https://github.com/dotnet/corefx/commit/0af44e88bd4a6ce633a542189f0536f1e6e215b0
2016-11-14 12:31:25 -08:00
John Chen (CLR) e6544e45f9 Reorganize DLL imports
Removed obsolete constants from Interop.Libraries.cs, and moved
files under src/Common/src/Interop/Windows to proper locations.


Commit migrated from https://github.com/dotnet/corefx/commit/aff71a53a57a39cbcaa7110c7dc1124f0700c13d
2016-11-10 16:04:46 -08:00
Stephen A. Imhoff 32e553768a System.Net.WebSockets.Client - remove race condition from ReceiveAsync cancellation test. (dotnet/corefx#12487)
Commit migrated from https://github.com/dotnet/corefx/commit/976bfd150ceab1eba0bcb4efad41cc269b8be14e
2016-10-31 13:18:10 -04:00
Stephen Toub 7b2a531875 Add additional System.Net tracing tests
- Add tests that actually exercise the event sources, making sure that no event source errors are produced and that events are actually generated.
- Fix a few src issues found from these tests.


Commit migrated from https://github.com/dotnet/corefx/commit/2284f735df7ad8c072b7861980d205c4476709b8
2016-10-29 11:53:54 -04:00
Stephen Toub 9c38e533c4 Address PR feedback
- Fix a few copy-and-paste errors
- Rename DumpArray to DumpBuffer
- Prefix every NetEventSource usage with IsEnabled check (except for Fail, which represents a critical programming error)


Commit migrated from https://github.com/dotnet/corefx/commit/3b251eb0632d1a1b70bdeb928c86d45b2bb2b897
2016-10-29 10:01:53 -04:00
Stephen Toub 78652d624e Overhaul System.Net library logging
This PR overhauls how logging is accomplished in the System.Net libraries.

There are a few problems with the existing solution:
1. In the original sources, logging was split across a GlobalLog class and a Logging class.  Global-related tracing went to GlobalLog, and library-specific tracing went to Logging.  When the sources were moved to corefx, this evolved into multiple EventSource-based types, most of which were in Common and were then src-included into each System.Net assembly.  This has a significant problem, though, which is that the name/Guid identity of an EventSource can only exist once in a process, and subsequent EventSource instances with the same identity fail.  This means that whichever assembly ends up logging something first wins, and all other tracing from other System.Net assemblies ends up being lost.
2. The split also may have made sense when all components shared the same GlobalLog, but now that GlobalLog is included as a unique EventSource instance in each assembly, it's no longer global.  This means that we're not only loading multiple EventSources unnecessarily (each has its own costs), but we're also duplicating logging, as some logging is done to one or the other, but some logging is done to both.
3. Due to sharing the Logging class, which evolved into an EventSource-based type, many logging calls had to include which component they came from as an enum value, leading to bloating at the call sites.
4. Additionally, many logging operations included the name of the method in which the calling was being done, which meant both longer call sites as well as stale values as members got renamed over time.
5. Call sites ended up getting fairly long due to lots of string concatenation operations and other manipulations in the logging call.  This also then led to most call sites needing to be guarded behind checks for IsEnabled, leading to lots of code at every call site and obscuring the actual information being traced.
6. An additional requirement that got added with the move to corefx was that certain failure conditions should both Debug.Fail and do tracing, leading to some tracing operations taking upwards of 10 lines of code.

All of these issues are addressed by this PR.

- Each System.Net assembly that needs to log now loads a single NetEventSource type for doing logging, each with its own identity.
- That implementation is split across a common, partial NetEventSource.Common.cs file used by all such assemblies, and then a per-assembly partial NetEventSource.AssemblyName.cs file used by the individual assembly.  The former file contains most of the logging implementation.  The latter files typically contain just the partial class declaration along with the [EventSource] attribute that gives that assembly's NetEventSource its unique identity / name.
- The logging operations in NetEventSource.Common.cs use a variety of relatively-recent language enhancements to improve the logging.  Each operation uses a [CallerMemberName] so that the call sites don't need to specify the caller.  FormattableString is used so that call sites can use string interpolation while still providing the logging implementation the flexibility to format the individual components in a desired fashion (e.g. IntPtrs are formatted as hex, SafeHandles are rendered in a way that includes their name+hashcode+handle, etc.), along with a mechanism that allows individual libraries to add additional formatting rules.  Each operation allows the this reference (or another this-like context object) to be passed in, to simply identify the source of the call (in concert with the caller member name).  A debug-only mechanism is included in the tracing to help find potential perf issues due to misuse of the logger.  Etc.
- A Fail logging operation is included that both traces and does a Debug.Fail.

With these changes, most call sites are greatly simplified.  Some examples:
Before:
```C#
if (GlobalLog.IsEnabled)
{
    GlobalLog.AssertFormat("ContextAwareResult#{0}::ContextCopy|Called on completed result.", LoggingHash.HashString(this));
}
Debug.Fail("ContextAwareResult#" + LoggingHash.HashString(this) + "::ContextCopy |Called on completed result.");
```
After:
```C#
NetEventSource.Fail(this, "Called on completed result.");
```

Before:
```C#
if (NetEventSource.Log.IsEnabled()) NetEventSource.Enter(NetEventSource.ComponentType.Http, this, ".ctor", handler);
```
After:
```C#
NetEventSource.Enter(this, handler);
```

Etc.

In addition to fixing up all of the event sources, I of course also fixed up all usage in order to clean up the call sites.  However, this was a rather mechanical change: I did not remove existing logging (other than duplication) nor did I add new logging.  At some point, we should review the actual logging being done to determine what's missing and what's not needed.  I also did not revise the additional existing events on the sockets and security event sources, but we may want to remove those (or some of those) in favor of just using the shared events.


Commit migrated from https://github.com/dotnet/corefx/commit/92fd5c0814bcc0c03acfa9f3ad857661828b35a6
2016-10-29 10:01:53 -04:00
Alex Perovich 3d36dbec18 Add SuppressMessage attributes for valid uses of SHA-1 and MD5 (dotnet/corefx#13014)
Commit migrated from https://github.com/dotnet/corefx/commit/fa04ddbaa3a6e8d899c6d77c6646a16986e2657c
2016-10-25 16:15:11 -07:00
Eric St. John 7be27b9754 Fix fix breaks from latest stable pkgs, no-imports
Latest stable packages hide implementation dependencies so some projects
need to add refs to packages they require.

Some projects were incorrectly referencing (and not using) packages
which were incompatible with the TFM they targeted.


Commit migrated from https://github.com/dotnet/corefx/commit/3d5f62716c7936d108ce21bdb9cb47087e2dd1bb
2016-10-21 06:32:54 -07:00
Eric St. John 4a6c9bbb81 Update all projects to last stable packages
And remove imports.

Now that we have netstandard packages that support all targets we should
use them.  This means we don't need imports.

I opted to use the stable packages rather than the LKG ones since this
will reduce churn in the product assemblies.

This has the added benefit of reducing download time for the repo.


Commit migrated from https://github.com/dotnet/corefx/commit/a330f3651c999b241d55ca25d9baa7fb0f247c5c
2016-10-21 06:32:53 -07:00
Karthik Rajasekaran 9255a2e649 Combine test dependencies into a common project.json.
Restore this common project.json upfront to improve sync time and avoid download contention from nuget.


Commit migrated from https://github.com/dotnet/corefx/commit/654f5548f946659c694d110a4bbce8aa33f1a7a1
2016-10-18 11:39:53 -07:00
dotnet-bot 94f229c6a7 Update CoreClr, CoreFx to beta-24617-03, beta-24617-03, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/4c6df2edbad3b5d8ec3914c0366f80ebb73f7c12
2016-10-18 08:43:24 -04:00
dotnet-bot 7b31a1e04a Update CoreClr, CoreFx, External to beta-24615-02, beta-24615-03, beta-24614-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/025cec5bf1e82980a77e473f2e5d599ffd60af49
2016-10-15 08:33:01 +00:00
Stephen Toub 52e3c3d7ae Change all refs to use "throw null;" as member bodies
Following our new guidelines for ref assembly implementations and what GenApi now creates, this updates all of our ref .cs files to use "throw null;" for member bodies that can't just be empty (i.e. members that need to return a value either via the return type or via an out parameter).  I made the change programatically using a simple Roslyn-based tool.


Commit migrated from https://github.com/dotnet/corefx/commit/a9fdc79ff8feb5ad46e9fcbe18fdffcd0bd74679
2016-10-13 09:43:23 -04:00
dotnet-bot 511149ab83 Update CoreClr, CoreFx, External to beta-24613-02, beta-24613-01, beta-24613-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/8f355c66ac9adbf9f36cfdd019ba1d2cefb54001
2016-10-13 08:37:30 +00:00
dotnet-bot 4a517b60c6 Update CoreClr, CoreFx to beta-24612-03, beta-24612-03, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/f01cf91423391f80ad5269340eb8e602ea9cb087
2016-10-12 16:28:54 +00:00
Stephen Toub f54cfb8704 Update CoreClr, CoreFx to beta-24611-01, beta-24611-02 respectively (master)
Commit migrated from https://github.com/dotnet/corefx/commit/b7cc4e219207cff50cdbb11176d3cee25be724f0
2016-10-11 15:32:17 -04:00
Stephen Toub 320ec958ba Update CoreClr, CoreFx to beta-24608-02, beta-24608-01, respectively (master)
Commit migrated from https://github.com/dotnet/corefx/commit/0fe592ec0a6be3cb49ecf37a798ca482b0d261dc
2016-10-08 08:25:01 -04:00
Sedar Gokbulut fb95e1e002 Revert "Merge branch 'dotnet-bot-master-UpdateDependencies'"
This reverts commit dotnet/corefx@631f21b4c2, reversing
changes made to dotnet/corefx@374a387de0.


Commit migrated from https://github.com/dotnet/corefx/commit/30cd016952f1f806986f2918fc7c1ebdb570aefd
2016-10-07 16:10:51 -07:00
dotnet-bot d7384b3382 Update CoreClr, CoreFx, ProjectNTfs to beta-24607-02, beta-24607-03, beta-24607-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/6f081ec97720eb7efd2653b91f88cda45cb43431
2016-10-07 15:48:04 -04:00
Jose Perez Rodriguez c37abd4f53 Reorder test.builds files metadata to be consisteng across the repo
Commit migrated from https://github.com/dotnet/corefx/commit/8cbdf88e1b122babd37575587692448ed59e7f58
2016-10-05 14:58:03 -07:00
Alex Perovich 674bb7a0f8 Update project ToolsVersions to 14.0 (dotnet/corefx#12355)
Commit migrated from https://github.com/dotnet/corefx/commit/71de1aac5cf3e5dc87714ae0cc829e1fa98f7c5d
2016-10-05 12:50:37 -07:00
dotnet-bot ddcb0ebc64 Update CoreClr, CoreFx, ProjectNTfs to beta-24605-01, beta-24604-02, beta-24604-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/193d21d6f4d181b086a52d17716499a3170785d0
2016-10-05 07:52:47 -04:00
dotnet-bot 018cb6969b Update CoreClr, CoreFx to beta-24602-02, beta-24601-02, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/3274ef94654da6754aaa54427d289e51ec316ea9
2016-10-02 08:24:45 +00:00
Wes Haggard bd13e2e340 Update xunit.netcore.extensions package
This allows us to start using TestPlatforms added with
https://github.com/dotnet/buildtools/pull/1000


Commit migrated from https://github.com/dotnet/corefx/commit/64a737e43afb7954d0105da8f360a1669ebe2a2d
2016-10-01 10:55:35 -07:00
dotnet-bot 027f6103a8 Update CoreClr, CoreFx to beta-24601-01, beta-24530-03, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/d37f83fb58b99eef950787f191744f503ee50067
2016-09-30 22:46:05 -04:00
dotnet-bot 7b4f9fc0c4 Update CoreClr, CoreFx to beta-24530-04, beta-24530-02, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/76746a58dabb98d6df8d5404b9fe00c66404a427
2016-09-30 19:24:02 +00:00
dotnet-bot bce2d80e22 Update CoreClr, CoreFx, External, ProjectNTfs to beta-24529-03, beta-24530-01, beta-24523-00, beta-24530-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/0b6b3faaaa9877872721f52469dc48016496ed82
2016-09-30 12:35:55 -04:00
David Shulman 77ac9787f0 Enable System.Net.WebSockets.Client tests for UWP
These changes allow the WebSockets.Client tests to run for netcore50 (UWP) target.
I removed unneeded packages from project.json which prevented the tests from working on UWP. UWP doesn't
have System.Net.Security, for example. But it doesn't need that package in the tests project anyways.

There are failures in the tests (ClientWebSocketOptions) when they run but I will follow up separately with that.


Commit migrated from https://github.com/dotnet/corefx/commit/8d1152c0ec9baf151aaca5f727bacc3e73f54383
2016-09-25 20:42:11 -07:00
Stephen Toub a6b52b9d78 Fix new ClientWebSocketOptions tests on Windows 7
Commit migrated from https://github.com/dotnet/corefx/commit/ba447000fe97ec934e107e0c2a78b5f1d6ada4f2
2016-09-25 07:40:13 -07:00
dotnet-bot c2d82aba38 Update CoreClr, CoreFx, External, ProjectNTfs to beta-24522-04, beta-24522-03, beta-24522-00, beta-24522-01, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/894cc88238f0bd57ad49b59cfb5f5e6581993742
2016-09-22 14:41:33 -07:00
dotnet-bot 96edb1b541 Update CoreClr, CoreFx, External, ProjectNTfs to beta-24522-01, beta-24521-07, beta-24521-00, beta-24521-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/fe6144b2d3726b68f824db46047b9ddfa7516ea4
2016-09-22 11:55:56 -07:00
dotnet-bot 4d9c1ffa86 Update CoreClr, CoreFx, External, ProjectNTfs to beta-24520-03, beta-24520-06, beta-24520-00, beta-24520-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/21ad171bdf873f7be8f0756ea7a572e6c9595eb9
2016-09-20 15:08:50 -07:00
dotnet-bot 23d6e4713d Update CoreClr, CoreFx to beta-24518-02, beta-24516-03, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/dfa190bcbb19492f0584298671ae27171d0e460c
2016-09-18 08:19:04 +00:00
Jose Perez Rodriguez e9c5a6629e Using master packages instead of dev/api
Commit migrated from https://github.com/dotnet/corefx/commit/517f1bf92c00acf7b0a71318255bb1d4504264d4
2016-09-16 11:17:32 -07:00
dotnet-bot f7a9e6db49 Update CoreClr, CoreFx, External, ProjectNTfs to beta-24516-01, beta-devapi-24515-01, beta-24514-00, beta-24516-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/a51ffdcc41142c8928da0ce9d05ec586476cc227
2016-09-16 11:16:36 -07:00
Stephen Toub 7e8502b763 Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/9ebf8df1adfad7c4e26e5be35025ec4b50864cfe
2016-09-14 23:47:37 -04:00
Stephen Toub 7f7cd8a732 Add back missing WebSockets APIs
Adds to System.Net.WebSockets:
- WebSocketException deriving from Win32Exception
- WebSocketException.ctor()
- WebSocket.DefaultKeepAliveInterval
- WebSocket.CreateClientBuffer
- WebSocket.CreateClientWebSocket
- WebSocket.CreateServerBuffer
- WebSocket.IsApplicationTargeting45
- WebSocket.IsStateTerminal
- WebSocket.ReisterPrefixes
- WebSocket.ThrowOnInvalidState
- WebSocketContext.RequestUri
- WebSocketContext.Headers
- WebSocketContext.Origin
- WebSocketContext.SecWebSocketProtocols
- WebSocketContext.SecWebSocketKey
- WebSocketContext.CookieCollection
- WebsocketContext.User
- WebSocketContext.IsAuthenticated
- WebSocketContext.IsLocal
- WebSocketContext.IsSecureConnection
- WebSocketContext.WebSocket

(Several of these members just throw PlatformNotSupportedException. Others have a different implementation than on desktop but something that's reasonable for corefx given the rest of the implementation's differences, e.g. limits on buffer sizes.)

Adds to System.Net.WebSockets.Client:
- ClientWebSocketOptions.UseDefaultCredentials
- ClientWebSocketOptions.SetBuffer(int, int)
- ClientWebSocketOptions.SetBuffer(int, int, ArraySegment<byte>)

As part of this, I also:
- Updated ClientWebSocketOptions.KeepAliveInterval to default to 30 seconds, as it does on desktop, rather than defaulting to 0.
- Updated the managed websockets implementation to take the ClientWebSocketOptions buffer information into account, in particular the receive buffer size and the buffer itself (as long as offset and count don't represent a subset, which would have been a more intrusive change to support).


Commit migrated from https://github.com/dotnet/corefx/commit/c97a2c7ac8ff5a4473348adf2ba6ca6a141de116
2016-09-14 08:11:20 -04:00
Stephen Toub d02f639461 Merge pull request dotnet/corefx#11654 from mconnew/Issue4429
Make async continuations run on different thread to avoid deadlock

Commit migrated from https://github.com/dotnet/corefx/commit/6d34bd3f18a46212b1060ef0b40b8ebdc71eb04e
2016-09-13 21:23:35 -04:00
Matt Connew 1d5a2181ef Make async continuations run on different thread to avoid deadlock
Fixes dotnet/corefx#4429


Commit migrated from https://github.com/dotnet/corefx/commit/4dcc1d0ab2de6399db3b39ac75e3a26caeac516b
2016-09-13 13:36:18 -07:00
Jose Perez Rodriguez bf0da1a921 Required changes to get the build green again after merge from dev/api
Commit migrated from https://github.com/dotnet/corefx/commit/ed8347041878054db7707d54201779ccba967782
2016-09-13 11:21:48 -07:00
Jose Perez Rodriguez 1105adec7a Merge remote-tracking branch 'mainrepo/dev/api' into MergeDevApi
Commit migrated from https://github.com/dotnet/corefx/commit/a1989d82cff273db667638e4836ea7836f5c6eb9
2016-09-12 15:20:12 -07:00
dotnet-bot acdc501149 Update CoreClr, CoreFx to beta-24512-03, beta-24512-01, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/3df0516607085d17065a6116c7abc80c4e3af290
2016-09-12 16:17:05 +00:00
dotnet-bot dedd766eff Update CoreClr, CoreFx, ProjectNTfs to beta-24512-02, beta-devapi-24512-01, beta-24512-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/141f99a8e273e4288ca3d827aa10d00e64cb5bcc
2016-09-12 08:23:26 +00:00
Ben Adams 3ac40528d0 Replace Contract.Requires with Debug.Assert (dotnet/corefx#11600)
* Replace Contract.Requires with Debug.Assert
* Remove unnessary Diagnostics.Contracts usings

Commit migrated from https://github.com/dotnet/corefx/commit/3c0e84832d9cd0a97c11dd8658722f69b6b1bc8e
2016-09-11 19:06:57 -04:00
dotnet-bot 18b78b4c1f Update CoreClr, CoreFx to beta-24511-02, beta-devapi-24511-01, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/ae7f1882d122ae773eaf5e0d507fe2df2139a0bf
2016-09-11 08:12:24 +00:00
dotnet-bot aae1eef0fe Update CoreClr, CoreFx, External to beta-24510-02, beta-24510-01, beta-24509-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/c1870256431a6ca13c321af37bc68868d046cf81
2016-09-10 15:25:05 -04:00