Forcing MSBuild to use non -windows version of a dependency
Hi all - I'm working on a plugin loader and want to add https://www.nuget.org/packages/StreamJsonRpc/ to my library. However, I'm running into a quirk: this is causing build warnings in some plugins. I've traced this back to the fact that because the plugin loader is targeted to
As this is probably an X/Y problem, the error in question is as follows:
This doesn't block any builds, but it does cause a considerable amount of dev confusion - and WPF itself is simply unnecessary for our use case.
Short of forking vs-streamjsonrpc to tear out all the WPF code (which itself comes from
-windows, a child of the above dependency will set <UseWPF>true</UseWPF>. While this doesn't matter for the plugin loaders themselves, the other maintainers of the project would prefer not to reference WPF, especially when it's not necessary for any API surface (and since we support Wine-based environments).As this is probably an X/Y problem, the error in question is as follows:
This doesn't block any builds, but it does cause a considerable amount of dev confusion - and WPF itself is simply unnecessary for our use case.
Short of forking vs-streamjsonrpc to tear out all the WPF code (which itself comes from
Microsoft.VisualStudio.Threading.Only), is there any way I can force MSBuild to not use the -windows targeted version of this lib?A cross-platform .NETStandard library that implements the JSON-RPC wire protocol and can use System.IO.Stream, System.IO.Pipelines or WebSocket so you can use it with any transport.
