Packaging Seq app with Win-x64 and Linux-x64 runtimes #1356
Replies: 1 comment 2 replies
-
Thanks for the notes! Yes, this is a bit of a problem for apps built for Seq using .NET, which we're yet to solve. The underlying app hosting mechanism in Seq does support platform-specific binaries, but only for executables: https://github.com/datalust/seq-app-jsonarchive/blob/dev/jsonarchive.exe.d.json#L7 Unfortunately, doing this for a .NET app would mean packaging the entire set of .NET runtime dependencies into each platform sub-directory (self-contained publishing), which would bloat out the package quite a bit. I've had mixed success with trimming in the past, but you never know - this might actually become viable at some point... 🤔 Producing platform-specific executables for Seq Apps does seem to fit a little better with the publishing options provided by the .NET SDK, so it's one avenue we'd be up for exploring, but while we're in the final stages of the 2021.3 release we're a bit short of time :-) |
Beta Was this translation helpful? Give feedback.
-
Hiya,
I've been bashing my head against this for a while. With my recent contributions to https://github.com/Hinni/seq-input-mssql, @Hinni and I were trying to get this running under both Windows and Docker. We came to a roadblock when it comes to integrated authentication, so we published the updates reflecting that it was Windows-only.
Typical error was System.Data.SqlClient.SqlException (0x80131904): Unable to load DLL 'System.Net.Security.Native' or one of its dependencies under Docker or Windows, depending on what we targeted the RID at. I also bumped up against System.PlatformNotSupportedException: Strings.PlatformNotSupported_DataSqlClient in some scenarios.
The thing is that the resulting package does actually appear work under Docker - it's only when trusted connection (integrated auth) that seems to really give us headaches. I realise that this is because when we compile with win-x64, we're getting a default System.Security.Principal.Windows that derives from .NET Framework, while compiling with linux-x64 or both drops this.
I think that if we could pack the Microsoft.Data.SqlClient runtime-specific binaries for Windows and Linux, this could work on both platforms. That doesn't solve the need for Kerberos configuration etc under Linux for it to work, but it would make things consistent.
As Seq requires us to package the dependencies to be able to run the application, this has posed some complexity that I haven't yet solved. The closest I've come is with https://github.com/novotnyllc/MSBuildSdkExtras where I can at least produce runtime/win-x64 and runtime/linux-x64 packages in the package ... but that's not sufficient for Seq.
Looking for ideas on how to approach this in a way that works for a Seq app. All the various iterations of packaging properties have drained my brain 😂
Cheers,
Matt
Beta Was this translation helpful? Give feedback.
All reactions