space928/Omsi-Extensions

Building a project using the NuGet package doesn't result in all the needed build artifacts being copied to the output directory

Opened this issue · 0 comments

Describe the bug
This can lead to apps/plugins built with OmsiHook not starting or crashing Omsi on startup.
For users of OmsiHook, if you're encountering startup crashes check that you have all the files listed here in the correct directories.

To Reproduce

  • Create a new project, add a package reference to the nuget package.
  • Build the project
  • The build directory is missing some files

Expected behaviour
When building a plugin for Omsi, at a minimum the plugins directory should contain:

  • OmsiHook.dll
  • OmsiHook.deps.json <- Missing
  • OmsiHookInvoker.dll <- Missing
  • <PluginName>.dll
  • <PluginName>NE.dll
  • <PluginName>.runtimeconfig.json
  • <PluginName>.deps.json
  • <PluginName>.opl <- User supplied

When building an external app which uses OmsiHook, the OmsiHookRPC plugin files need to be included (these need to be copied to the user's Omsi plugins folder):

  • OmsiHookRPCPlugin.dll
  • OmsiHookRPCPluginNE.dll
  • OmsiHookRPCPlugin.deps.json
  • OmsiHookRPCPlugin.runtimeconfig.dll
  • OmsiHookRPCPlugin.opl
  • OmsiHookInvoker.dll
  • OmsiHook.dll
  • OmsiHook.deps.json
  • OmsiHookInvoker.dll

Additional context
Ideally, these files should be included in the NuGet packages and copied to the build directory automatically.

For now though, any missing files can be downloaded from the GitHub releases, or by building the library from source.