how to dotnet publish
multiple exe-projects together in one single folder with different target-runtimes?
#49234
Unanswered
LukasGelke
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
we want to deploy two applications in tandem (one is used kinda as a "fire and forget" or "throwaway" process).
I've made a new empty project which references both, in order to have all DLLs on the highest version, regardless of which of those two applications brought it (mostly to deal with transient dependencies). We'd wanted to reduce deployment size with this, since Deps are mostly identical/subset.
This works at first glance.
However we've noticed one major issue. We have deps like this:
When using
dotnet publish {PublishProject}
it determines that "C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.16\System.Diagnostics.PerformanceCounter.dll" is newer, and therefore ignores the NuGet.However at runtime, App1 crashes because it is not using the WindowsDesktop-Runtime. And we don't necessarily want to "upgrade" that for App1, as it may run in a headless scenario
Manually adding the "Microsoft.WindowsDesktop.App"-TargetFramwork entry to the
App1.runtimeconfig.json
lets App1 run again as expected (which tells me that this is indeed the problem)Beta Was this translation helpful? Give feedback.
All reactions