-
Notifications
You must be signed in to change notification settings - Fork 46
WIP: feat: support for NET Core 2.0 #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
<Name>NsqSharp</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="test-keys\cert.pem" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<None Include="test-keys\cert.pem" />
was moved up in the .csproj
file. This is a TLS example project.
|
||
namespace NsqSharp.WindowService | ||
{ | ||
public class WindowsBusConfiguration : BusConfiguration, IWindowsBusConfiguration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Easiest way to implement IsConsoleMode
@@ -17,7 +17,11 @@ public class InterfaceBuilder | |||
static InterfaceBuilder() | |||
{ | |||
var assemblyName = new AssemblyName(Guid.NewGuid().ToString()); | |||
#if NETFULL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Target dependent implementation
@@ -101,7 +105,7 @@ private static Type GetDynamicType(Type type) | |||
typeBuilder.DefineMethodOverride(setAccessor, propertyInfo.GetSetMethod()); | |||
} | |||
|
|||
return typeBuilder.CreateType(); | |||
return typeBuilder.CreateTypeInfo(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New method supported in both platforms
@@ -28,7 +28,7 @@ public void IntnRange() | |||
Assert.Throws<ArgumentOutOfRangeException>(() => _rng.Intn(-1)); | |||
} | |||
|
|||
[TestFixtureTearDown] | |||
[OneTimeTearDown] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TestFixtureTearDown
is no deprecated in favor of OneTimeTearDown
@@ -66,7 +66,7 @@ public void AutofacContainerTest() | |||
}, | |||
preCreateTopicsAndChannels: true); | |||
|
|||
BusService.Start(busConfiguration); | |||
busConfiguration.StartBus(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these tests require this change now. BusService
is not supported in NET Core/Standard
Thanks @alex-pollan, I agree .NET Standard 2.0 is the way to go. Since the Windows Service code will be pulled into another package now is a good time to look again at how that works. I'll do a major version bump of NsqSharp to account for the breaking change. |
@alex-pollan I'm also okay dropping support for any .NET less than 4.6.1 per the compatibility matrix https://docs.microsoft.com/en-us/dotnet/standard/net-standard. Users needing earlier .NET support can use 0.5.4 which has been battle tested in Production for quite some time. |
Examples/PointOfSale/PointOfSale.Handlers.CustomerHandlers/Program.cs
Outdated
Show resolved
Hide resolved
Examples/PointOfSale/PointOfSale.Handlers.InvoiceHandlers/Program.cs
Outdated
Show resolved
Hide resolved
Examples/PointOfSale/PointOfSale.Handlers.ProductHandlers/Program.cs
Outdated
Show resolved
Hide resolved
87f1719
to
7d86ff0
Compare
Done, now it only supports 4.6.1+ |
@judwhite addressed your comments |
@alex-pollan @judwhite any updates on this? |
NsqSharp
targets NET Framework4.54.6.1+ and NET Standard 2.0NsqSharp.WindowService
targeting NET4.5.14.6.1 to keep theBusService
static class with support for Window Service, console app and host in IISNsqSharp
(net4.54.6.1)To do:
NsqSharp.WindowService
?