Run OCR app (UWP) in Windows Docker image

user23820 36 Reputation points
2022-04-17T22:21:50.92+00:00

By using the Windows base image, I can execute my binary (console application) using Windows.Media.Ocr (UWP) without installing anything.
In servercore and nanoserver I cannot get it to work, I tried Install-Package Microsoft.Windows.Ocr -Version 1.0.0 (https://www.nuget.org/packages/Microsoft.Windows.Ocr/) but it doesn't install it.

What do I need to install for Windows.Media.Ocr to work (runtime only, not building the exe)? https://learn.microsoft.com/en-us/uwp/api/windows.media.ocr?view=winrt-22000

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,970 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Ken Tucker 5,846 Reputation points
    2022-04-18T00:55:58.96+00:00

    What container image are you using? Most containers use server core or nanoserver images which are a minimal version of windows server really meant to run a web site

    1 person found this answer helpful.