Skip to content
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

Support plug-in apps targeting `netstandard2.x` TFMs #793

Closed
Hinni opened this Issue Feb 2, 2019 · 10 comments

Comments

Projects
None yet
2 participants
@Hinni
Copy link

Hinni commented Feb 2, 2019

Hi seq team,

I'm trying to update my Seq.App.aspsms nuget with Multi-Target Framework for Seq on Windows and Docker.
But when I try to test my package it could not load Newtonsoft.Json dependency. Doesn't Seq load dependencies automatically? I don't see an error installing the app.

image

I also noticed that Seq is trying to load the net452 and not the .NET standard 2.0 dlls.

Are there any information or instructions available on how an app for Seq 5.0 should look like? Interesting would be of course with availability on Windows and Linux.

Thanks for your feedback
Michael

@nblumhardt

This comment has been minimized.

Copy link
Member

nblumhardt commented Feb 4, 2019

Hi Michael, thanks for the heads-up.The current package installer only looks for .NET Framework TFMs, but this should probably change. I'll transfer this issue to datalust/seq-tickets since the problem is with the loader rather than with the apps runtime assembly.

The app package installer doesn't pull in dependencies - it's necessary to list all of the dependency assemblies in the NUSPEC file - is the Newtonsoft.Json dependency a new addition to your app, or did Seq successfullly load this in the past, but now won't? Thanks!

@nblumhardt nblumhardt transferred this issue from datalust/seq-apps-runtime Feb 4, 2019

@nblumhardt nblumhardt added this to the 5.1-pre milestone Feb 4, 2019

@nblumhardt

This comment has been minimized.

Copy link
Member

nblumhardt commented Feb 4, 2019

Going to rename this ticket so that we can track netstandard2.x TFM support; let us know if you think there's a bug lurking in dependency loading; thanks!

@nblumhardt nblumhardt changed the title Installer don't fetch nuget depedencies Support plug-in apps targeting `netstandard2.x` TFMs Feb 4, 2019

@nblumhardt

This comment has been minimized.

Copy link
Member

nblumhardt commented Feb 5, 2019

Build 5.1.2645-pre, on its way out now, includes the ability to host apps targeting netstandard2.x:

image

(The source for this one is at https://github.com/datalust/seq-input-rabbitmq).

How is the ASPSMS app going? Still issues running on the new version? Cheers!

@Hinni

This comment has been minimized.

Copy link
Author

Hinni commented Feb 5, 2019

Hello, Nicolas. Thank you for your information about the new 5.1.2645-pre release. I will try it towards the end of the week, I won't get there before.

We've been using Seq for three years now and are very happy with the product. Since early Seq 5 prereleases I also use a private instance which runs as a docker on a Synology.

I'm happy that you're busy developing Seq and that I can contribute a part to it. I did not know, that it is possible to create an Input App too.

I started now with https://github.com/Hinni/Seq.Input.AzureEventHub - currently we do this "forwarding" with https://github.com/serilog/serilog-sinks-azureeventhub and an Azure Function, but that would be the better way 👍

@nblumhardt

This comment has been minimized.

Copy link
Member

nblumhardt commented Feb 6, 2019

That's awesome :-)

@Hinni

This comment has been minimized.

Copy link
Author

Hinni commented Feb 8, 2019

I'm almost done with Seq.Input.AzureEventHub. When do you publish 5.1.2645-pre on docker? I want to test this package locally, before I push it to the nuget store. Cheers!

@nblumhardt

This comment has been minimized.

Copy link
Member

nblumhardt commented Feb 9, 2019

That's awesome, Michael! Just pushed 5.1.2669-pre, which should do what you're after. Let me know if you have any trouble with it!

@Hinni

This comment has been minimized.

Copy link
Author

Hinni commented Feb 9, 2019

It don't work as expected on Seq. Maybe you has some ideas. I invited you to give me some hints in my PR #1. I uploaded a first preview version to nuget.org Seq.Input.AzureEventHub.

image

How are Seq.Apps initiated on Seq?

@nblumhardt

This comment has been minimized.

Copy link
Member

nblumhardt commented Feb 10, 2019

Hi Michael; if you click into one of those errors, is there any detail in the exception message/stack trace?

To run the app in Seq (5.x), the package is first extracted to a local filesystem folder, e.g. Packages/nugetfeed-x/Seq.Input.AzureEventHub/1.2.3. Seq then spawns a child process (Seq.Apps.GenericHost) with its working directory set to the location of the extracted package. The child process loads up the main SeqApp (or Reactor) type using reflection, and does some basic assembly loading redirection to remain compatible with 4.x apps, which could rely on a copy of Serilog.dll and a few other assemblies being present locally.

Once the child process has loaded, Seq starts reading through its STDOUT to ingest JSON-formatted events, and through STDERR to collect diagnostic events like the ones in the screenshot.

Not sure how much of this info is useful, but might help with interpreting the exception message if we're lucky :-) Cheers!

@nblumhardt

This comment has been minimized.

Copy link
Member

nblumhardt commented Feb 13, 2019

Going to close this issue, since the app is now loading, but please send any questions related to the new input that we might be able to help with 👍

@nblumhardt nblumhardt closed this Feb 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.