diff --git a/src/Microsoft.AspNet.WebSockets.Client/project.json b/src/Microsoft.AspNet.WebSockets.Client/project.json
index 5e6c360503..33d5fce580 100644
--- a/src/Microsoft.AspNet.WebSockets.Client/project.json
+++ b/src/Microsoft.AspNet.WebSockets.Client/project.json
@@ -5,6 +5,9 @@
"type": "git",
"url": "git://github.com/aspnet/websockets"
},
+ "compilationOptions": {
+ "warningsAsErrors": true
+ },
"dependencies": {
"Microsoft.AspNet.WebSockets.Protocol": "1.0.0-*"
},
diff --git a/src/Microsoft.AspNet.WebSockets.Protocol/HandshakeHelpers.cs b/src/Microsoft.AspNet.WebSockets.Protocol/HandshakeHelpers.cs
index 3b283232ca..478b61bfe5 100644
--- a/src/Microsoft.AspNet.WebSockets.Protocol/HandshakeHelpers.cs
+++ b/src/Microsoft.AspNet.WebSockets.Protocol/HandshakeHelpers.cs
@@ -5,7 +5,6 @@ using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
-using Microsoft.Extensions.Internal;
namespace Microsoft.AspNet.WebSockets.Protocol
{
@@ -124,8 +123,13 @@ namespace Microsoft.AspNet.WebSockets.Protocol
///
///
///
- public static string CreateResponseKey([NotNull] string requestKey)
+ public static string CreateResponseKey(string requestKey)
{
+ if (requestKey == null)
+ {
+ throw new ArgumentNullException(nameof(requestKey));
+ }
+
using (var algorithm = SHA1.Create())
{
string merged = requestKey + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
diff --git a/src/Microsoft.AspNet.WebSockets.Protocol/project.json b/src/Microsoft.AspNet.WebSockets.Protocol/project.json
index 875c58019f..75a20b973d 100644
--- a/src/Microsoft.AspNet.WebSockets.Protocol/project.json
+++ b/src/Microsoft.AspNet.WebSockets.Protocol/project.json
@@ -5,8 +5,8 @@
"type": "git",
"url": "git://github.com/aspnet/websockets"
},
- "dependencies": {
- "Microsoft.Extensions.NotNullAttribute.Sources": { "type": "build", "version": "1.0.0-*" }
+ "compilationOptions": {
+ "warningsAsErrors": true
},
"frameworks": {
"net45": { },
diff --git a/test/Microsoft.AspNet.WebSockets.Protocol.Test/BufferStream.cs b/test/Microsoft.AspNet.WebSockets.Protocol.Test/BufferStream.cs
index 0e23875e66..f06f4889eb 100644
--- a/test/Microsoft.AspNet.WebSockets.Protocol.Test/BufferStream.cs
+++ b/test/Microsoft.AspNet.WebSockets.Protocol.Test/BufferStream.cs
@@ -7,7 +7,6 @@ using System.Diagnostics.Contracts;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
-using Microsoft.Extensions.Internal;
namespace Microsoft.AspNet.WebSockets.Protocol.Test
{
@@ -256,7 +255,7 @@ namespace Microsoft.AspNet.WebSockets.Protocol.Test
return Task.FromResult