Skip to content

WIP: feat: support for NET Core 2.0#95

Open
alex-pollan wants to merge 4 commits into
judwhite:masterfrom
alex-pollan:feat/netcore
Open

WIP: feat: support for NET Core 2.0#95
alex-pollan wants to merge 4 commits into
judwhite:masterfrom
alex-pollan:feat/netcore

Conversation

@alex-pollan

@alex-pollan alex-pollan commented Dec 5, 2018

Copy link
Copy Markdown
  • Now NsqSharp targets NET Framework 4.5 4.6.1+ and NET Standard 2.0
  • New project NsqSharp.WindowService targeting NET 4.5.1 4.6.1 to keep the BusService static class with support for Window Service, console app and host in IIS
  • Tests in a NET Core library
  • All examples reference NsqSharp (net 4.5 4.6.1)

To do:

  • Fix CI msbuild issue (Appveyor)
  • Generate breaking change version
  • Check assemblies signing
  • Review Nuget publish
  • Rename NsqSharp.WindowService?
  • Library for starting up the bus in for NET Core (hosted in Kestrel)?
  • Create at least one working NET Core example

</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="test-keys\cert.pem" />

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

???

Copy link
Copy Markdown
Owner

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

Copy link
Copy Markdown
Author

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

static InterfaceBuilder()
{
var assemblyName = new AssemblyName(Guid.NewGuid().ToString());
#if NETFULL

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Target dependent implementation

}

return typeBuilder.CreateType();
return typeBuilder.CreateTypeInfo();

Copy link
Copy Markdown
Author

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

}

[TestFixtureTearDown]
[OneTimeTearDown]

Copy link
Copy Markdown
Author

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

preCreateTopicsAndChannels: true);

BusService.Start(busConfiguration);
busConfiguration.StartBus();

Copy link
Copy Markdown
Author

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

@judwhite

Copy link
Copy Markdown
Owner

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.

@judwhite

Copy link
Copy Markdown
Owner

@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.

Comment thread Examples/PointOfSale/PointOfSale.Handlers.CustomerHandlers/Program.cs Outdated
Comment thread Examples/PointOfSale/PointOfSale.Handlers.InvoiceHandlers/Program.cs Outdated
Comment thread Examples/PointOfSale/PointOfSale.Handlers.ProductHandlers/Program.cs Outdated
Comment thread NsqSharp.Tests/Bus/AutofacBusTest.cs Outdated
@alex-pollan

Copy link
Copy Markdown
Author

@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.

Done, now it only supports 4.6.1+

@alex-pollan

Copy link
Copy Markdown
Author

@judwhite addressed your comments

@judwhite judwhite self-assigned this Sep 20, 2019
@Misiu

Misiu commented Feb 18, 2021

Copy link
Copy Markdown

@alex-pollan @judwhite any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants