Skip to content

Commit

Permalink
Restore target NET47 because Nuget is not resolving correctly to use …
Browse files Browse the repository at this point in the history
…NetStandard 2.0 assembly.

Releasing version 1.10
  • Loading branch information
geoperez committed Oct 18, 2017
1 parent 3cbddf0 commit 013f630
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 96 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ Some notes regarding WebSocket and runtimes support:

| Runtime | WebSocket support | Notes |
| --- | --- | --- |
| NET452 | Yes | Support Windows and Linux using custom System.Net implementation based on Mono and [websocket-sharp](https://github.com/sta/websocket-sharp/). Nuget package doesn't provide this version but you can compile from Unosquare.Labs.EmbedIO.Lib solution file. This solution is to use in older environments and Mono |
| NET46 | Yes | Support Win7+ OS using a custom System.Net implementation based on Mono and [websocket-sharp](https://github.com/sta/websocket-sharp/) |
| NET462 | Yes | Support Win8+ OS using native System.Net library |
| NETSTANDARD* | Yes | Support Windows, Linux and macOS using a custom System.Net implementation based on Mono and [websocket-sharp](https://github.com/sta/websocket-sharp/) |
| NET47 | Yes | Support Win8+ OS using native System.Net library |
| NETSTANDARD* | Yes | Support Windows, Linux and macOS using native System.Net library |
| UAP | No | Support Windows Universal Plataform. More information [here](https://github.com/unosquare/embedio/tree/master/src/Unosquare.Labs.EmbedIO.IoT) |

EmbedIO before version 1.4.0 uses Newtonsoft JSON and an internal logger subsystem based on ILog interface.
Expand All @@ -50,7 +49,6 @@ NuGet Installation:
PM> Install-Package EmbedIO
```


Basic Example:
--------------

Expand Down Expand Up @@ -360,4 +358,4 @@ public class WebSocketsChatServer : WebSocketsServer
```

## Notes
[1] - EmbedIO uses lowercase URL parts. In Windows systems this is the expected behaviour but in Unix systems using MONO please refer to [Mono IOMap](http://www.mono-project.com/docs/advanced/iomap/) if you want to work with case insensitive URL parts.
[1] - EmbedIO uses lowercase URL parts. In Windows systems this is the expected behaviour but in Unix systems using MONO please refer to [Mono IOMap](http://www.mono-project.com/docs/advanced/iomap/) if you want to work with case insensitive URL parts.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net46;net47;netcoreapp2.0</TargetFrameworks>
<AssemblyName>Unosquare.Labs.EmbedIO.Samples</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>Unosquare.Labs.EmbedIO.Samples</PackageId>
Expand Down
18 changes: 13 additions & 5 deletions src/Unosquare.Labs.EmbedIO/Unosquare.Labs.EmbedIO.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>A tiny, cross-platform, module based, MIT-licensed web server. Supporting .NET Framework, .NET Core and MONO.</Description>
<Description>A tiny, cross-platform, module based, MIT-licensed web server. Supporting NET FX, NET Core, NET Standard and MONO.</Description>
<Copyright>Copyright © Unosquare 2013-2017</Copyright>
<AssemblyTitle>EmbedIO Web Server</AssemblyTitle>
<Authors>Mario Di Vece;Geovanni Perez</Authors>
<TargetFrameworks>uap10.0;netstandard1.3;net46;netstandard2.0</TargetFrameworks>
<Authors>Unosquare</Authors>
<TargetFrameworks>uap10.0;netstandard1.3;net46;net47;netstandard2.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Unosquare.Labs.EmbedIO</AssemblyName>
<PackageId>Unosquare.Labs.EmbedIO</PackageId>
<PackageId>EmbedIO</PackageId>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.3' ">$(PackageTargetFallback);portable-net45+win8+wpa81+wp8</PackageTargetFallback>
<CodeAnalysisRuleSet>..\..\StyleCop.Analyzers.ruleset</CodeAnalysisRuleSet>
<DebugType>Full</DebugType>
<Version>1.9.1</Version>
<Version>1.10</Version>
<Product>EmbedIO</Product>
<Company>Unosquare</Company>
<PackageLicenseUrl>https://raw.githubusercontent.com/unosquare/embedio/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>http://unosquare.github.io/embedio</PackageProjectUrl>
<PackageIconUrl>http://unosquare.github.io/embedio/images/embedio-icon32.png</PackageIconUrl>
<RepositoryUrl>https://github.com/unosquare/embedio/</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>webserver websocket webapi http</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Copyright>Copyright (c) 2016-2017 - Unosquare</Copyright>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net46;net47;netcoreapp2.0</TargetFrameworks>
<TestProjectType>UnitTest</TestProjectType>
</PropertyGroup>

Expand Down
86 changes: 2 additions & 84 deletions test/Unosquare.Labs.EmbedIO.Tests/WebServerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,89 +31,7 @@ public void WebServerDefaultConstructor()
Assert.IsNotNull(instance.Listener, "It has a HttpListener");
Assert.IsNotNull(MimeTypes.DefaultMimeTypes, "It has MimeTypes");
}

[Test]
public void WebserverCanBeDisposed()
{
Assert.Ignore("This test is not longer valid, rewrite it");
//var cts = new CancellationTokenSource();
//var instance = new WebServer(Resources.GetServerAddress());
//var task = instance.RunAsync(cts.Token);

//cts.Cancel();

//try
//{
// //Thread.Sleep(2000);
// task.Wait();
//}
//catch (AggregateException e)
//{
// var baseEx = e.GetBaseException();
// if (baseEx is OperationCanceledException)
// {
// instance.Dispose();
// return;
// }

// Assert.Fail($"Must have thrown OperationCanceledException and threw '{baseEx.GetType()}' instead.");
//}
//catch (Exception ex)
//{
// Assert.Fail($"Must have thrown AggregateException and threw '{ex.GetType()}' instead.");
//}
}

[Test]
public void WebServerCanBeRestarted()
{
Assert.Ignore("This test is not longer valid, rewrite it");
//var cts = new CancellationTokenSource();
//var instance = new WebServer(Resources.GetServerAddress());
//var task = instance.RunAsync(cts.Token);

////need to make a request here for it to fail before the cancellation changes, null works, yay
//instance.ProcessRequest(null);

//cts.Cancel();

//try
//{
// //Thread.Sleep(2000);
// task.Wait();
//}
//catch (AggregateException e)
//{
// var baseEx = e.GetBaseException();
// if (baseEx is OperationCanceledException)
// {
// instance.Dispose();
// return;
// }
//}

//cts = new CancellationTokenSource();
//instance = new WebServer(Resources.GetServerAddress());
//task = instance.RunAsync(cts.Token);

//cts.Cancel();

//try
//{
// //Thread.Sleep(2000);
// task.Wait();
//}
//catch (AggregateException e)
//{
// var baseEx = e.GetBaseException();

// if (baseEx is OperationCanceledException)
// {
// instance.Dispose();
// }
//}
}


[Test]
public void RegisterAndUnregisterModule()
{
Expand Down Expand Up @@ -241,7 +159,7 @@ public async Task EncodingTest(string encodeName)
}
}

#if NET47
#if NETCOREAPP2_0
[Test]
public async Task TestWebModuleRedirect()
{
Expand Down

0 comments on commit 013f630

Please sign in to comment.