WebView2 runtime fixed version ์ ์šฉํ•˜๊ธฐ

2022. 8. 2. 09:18

https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#details-about-the-fixed-version-runtime-distribution-mode

 

Distribute your app and the WebView2 Runtime - Microsoft Edge Development

How to distribute the WebView2 Runtime when releasing an app that uses Microsoft Edge WebView2, either by distributing the automatically updated Evergreen Runtime, or distributing a Fixed Version of the WebView2 Runtime.

docs.microsoft.com


1. WebView2 runtime fixed version ๋‹ค์šด๋กœ๋“œ

https://developer.microsoft.com/ko-kr/microsoft-edge/webview2/#download-section

 

WebView2 - Microsoft Edge Developer

When distributing your application, there are a few ways you can ensure the WebView2 Runtime is on client machines. Learn more about those options. For installation issues and error codes see our troubleshooting guide. Evergreen Bootstrapper The Bootstrapp

developer.microsoft.com

2. cmd์—์„œ WebView2 runtime cabํŒŒ์ผ ์••์ถ• ํ•ด์ œ

expand (๋‹ค์šด๋กœ๋“œ๋ฐ›์€ cab ๊ฒฝ๋กœ) -F:* (์••์ถ•ํ•ด์ œํ•  ๊ฒฝ๋กœ)

ํŒŒ์ผํƒ์ƒ‰๊ธฐ๋ฅผ ํ†ตํ•œ ์••์ถ• ํ•ด์ œ๋Š” ํŒŒ์ผ ์†์‹ค์„ ์ผ์œผํ‚ฌ ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ cmd๋ฅผ ํ†ตํ•ด ์••์ถ• ํ•ด์ œํ•œ๋‹ค.

3. ์••์ถ•ํ•ด์ œํ•œ ํŒŒ์ผ์˜ ๊ฒฝ๋กœ ํ™•์ธ

ํ•ด๋‹น ๊ฒฝ๋กœ๋Š” C# ์ฝ”๋“œ ๋‚ด์—์„œ ์‚ฌ์šฉ๋˜๊ธฐ ๋•Œ๋ฌธ์— ๊ฒฝ๋กœ๋ฅผ ํŒŒ์•…ํ•˜๊ณ  ์žˆ์–ด์•ผํ•œ๋‹ค.

4. ์ฝ”๋“œ ๋‚ด์—์„œ fixed ๋ฒ„์ „ ์ ์šฉ

async private void Init_webview2()
{
    webView2.CreationProperties = new Microsoft.Web.WebView2.WinForms.CoreWebView2CreationProperties
    {
        BrowserExecutableFolder = @"C:\WebView2_Runtime\Microsoft.WebView2.FixedVersionRuntime.103.0.1264.62.x64"
    };
    ((System.ComponentModel.ISupportInitialize)(this.webView2)).EndInit();
    await webView2.EnsureCoreWebView2Async();
}

BrowserExecutableFolder ์— 3๋ฒˆ์—์„œ ํ™•์ธํ•œ ์••์ถ•ํ•ด์ œ ํŒŒ์ผ์˜ ๊ฒฝ๋กœ๋ฅผ ์ง€์ •ํ•œ๋‹ค.

728x90

BELATED ARTICLES

more