Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Nuget package to add files to output folder with different files for different architectures

$
0
0

I'm going to give quite a bit of context here as I think it helps explain why I have chosen this route (and hopefully means if anyone has other suggestions they know what my end goal is).

We have a C# winforms application where we want to use the new WebView2 control from Microsoft https://developer.microsoft.com/en-us/microsoft-edge/webview2/

To quickly summarize, this new web view control from Microsoft differs from the old ones, in that it doesn't expect the browser/runtime behind the scenes to be already installed. WebView2 uses its own custom Edge Chromium Runtime, based on the new Edge Chromium. This means even having Edge Chromium Browser installed doesn't count as having the run time installed.

So Microsoft has provided 3 ways to install the run time.

  1. A small bootstapper evergreen installer that you include with your app that then downloads and installs the run time installer and installs it and then keeps itself up to date
  2. The full evergreen installer, incase you need to be able to install while offline
  3. A Fixed version set of Binaries

Option 1 and 2 both require elevation to run - this is a blocker for us, our app can not require elevation to be installed.

So that leaves us 3.

The end goal with 3 is that all those binaries for the run time are bundled with our application and we just point the WebView2 config to use the run time exe from our application folder. Simple right.

Well here is my question.

I don't want those binaries in the git repo.. so a nuget package sounded sensible.Just use the content files folder to copy a load of binaries to the output folder and embed them as a resource.

The issue I've hit upon is that the binaries Microsoft provide are processor architecture specific (x86 and x64 are the ones I care about).

I'm struggling to see find how to achieve this.

I looked at this blog https://devblogs.microsoft.com/nuget/nuget-contentfiles-demystified/which states I can create folders for language specific and .net run time specific files.. but no mention of processor architecture.

Does anyone know if its possible to have architecture specific content files from a nuget package? Or if there is a better way to do this.

Thanks


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>