I'm working with the following projects:
MyFramework.csproj (class library)
MyCustomerApp.csproj (class library)
References MyFramework
MyLauncher.csproj (Executable program)
references MyLauncherDependency.nupkg
MyCustomerApp.csproj is the 'runnable' project which works like so:
- MyLauncher.exe is copied from the MyLauncher project to the output of MyCustomerApp
- When running MyLauncher.exe, this uses
Assembly.Load(..)
to load the MyCystomerApp.dll
There's a specific reason as to why we have this mechanism which I won't get into - consider it out of scope for now.
Now here's the problem; MyLauncherDependency is a dependency of MyLauncher, but its not a dependency of MyCustomerApp. Therefore MyLauncherDependency is not a compile time dependency of MyCustomerApp - but it is a runtime dependency - because it needs MyLauncherDependency.dll at runtime.
I don't want to add MyLauncherDependency.nupkg to MyCustomerApp because I don't want to give engineers access to classes from MyLauncherDependency in MyCustomerApp.
So my question is: How can I add MyLauncherDependency.nupkg (or MyLauncherDependency.nupkg) to MyCustomerApp as a runtime only dependency?