question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

One NuGet for all OSs

See original GitHub issue

Describe the feature you’d like

Offer one NuGet package, that is multi-targeted and contains the necessary assemblies to support all supported OSs. Then additionally the <OsName>Application.Init API can be simplified to do the right call based on a runtime check. This would replace the current packages as it can be a full replacement for consumers of SpiderEye.

Reason for this feature request

Currently projects that use SpiderEye on more than one target OS have to be developed with N+1 projects, where N is the number of the OSs. The reason for that is the fact that SpiderEye currently ships support for each OS in a separate NuGet. The remaining project acts as the “core” project that defines most of the logic, while the other projects all just configure the app on startup via the correct <OsName>Application API for that OS.

With this change a user of SpiderEye would only add a single NuGet package to their project and call a single initialization method. Besides a bigger NuGet package for developers to download this would not result in unnecessary assembly additions for a specific target OS.

Besides simplification for consumers this change would most likely also

  • remove the need for the templates, as long as we can assume the consumer will not do platform-specific calls in most cases (otherwise they can still set up one project per OS themselves, though).
  • allow the consumer to publish a single project for each target OS simply by publishing with the corresponding runtime identifier.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
JBildsteincommented, Jul 31, 2020

woah this is amazing 😲

I’m totally on board with SpiderEye.Unified and adding an OS-agnostic application init class in there sounds like a good way to do it.

To the new project we have to manually add any <PackageReference>s that are used in any of the referenced projects. Currently the only ones of interest are actually defined in Shared\SpiderEye.Shared.proj so we can just <Import> that file in the Unified project.

The windows project will soon need a reference to support the chromium edge webview (maybe macOS as well, I haven’t looked into that yet). To avoid duplicated reference entries I think it’d be best to have a shared proj file for each platform that lists references and is then imported in both the actual OS project and the unified project. This way you can’t forget to add references to both projects and version updates only have to be done once.

Having a custom SDK would be the icing on the cake. I didn’t even know that it was possible to create a custom one, that’s very cool. If you manage to get that working I’d love to add the bit for copying client files into the assembly as well:

  <ItemGroup>
    <EmbeddedResource Include="Angular\dist\**">
      <LogicalName>%(RelativeDir)%(Filename)%(Extension)</LogicalName>
    </EmbeddedResource>
  </ItemGroup>

where the include path is configurable of course and maybe a flag to disable this as well.

Thank you so much for all that detective work, you got way farther than I did 😄 Keep me posted, this weekend I’ll be working on some of the open issues and see how far I can get with chromium edge.

1reaction
JBildsteincommented, Aug 3, 2020

no worries, I didn’t expect it to work without a fight 😄

If you like you can create a WIP pull request if you need any input or a second set of eyes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating one NuGet package from multiple projects in ...
My problem is that I want to create a single NuGet package that will contain all 4 libraries, without having to build them...
Read more >
Producing Multiple Related NuGet Packages from a Single ...
My usual approach for creating NuGet packages is to have a Git repository per NuGet package. This is a relatively simple and straightforward ......
Read more >
Your organization on NuGet.org
Organizations enable businesses and open-source projects to collaborate on packages using a single NuGet.org identity.
Read more >
Packages
Provides high-performance and low-allocating types that serialize objects to JavaScript Object Notation (JSON) text and deserialize JSON text to objects, ...
Read more >
Creating NuGet Packages the easy way with .NET Standard in C
NuGet packages are a way to share versioned code with the world. If you have done any development in C#, you have used...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found