Is WPF Supported on Windows Nano Server?
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
### Description
On .NET Core 3.1 it was possible to run a WPF console app on Windows Nano Server. There is no UI, only usage of the Geometry classes in System.Windows.Media.Media3D. No typeface classes are used (as in #3609).
See this post: https://blog.tonysneed.com/2020/07/04/run-wpf-in-net-core-on-nano-server-in-docker. And this repo: https://github.com/tonysneed/hello-netcore-wpf-nano
However, when attempting to port the app to .NET 6, running the app results in a `DllNotFoundException` for **dwrite.dll**.
This error is not generated when running the container on a Windows Server Core base image.
### Reproduction Steps
Clone this repo: https://github.com/mpospisil/dotnet-runtime-windowsdesktop/tree/main/Examples/WpfConsole/WpfConsole
Build Windows container image: `docker build -t wpf-console .`
Run the container: `docker run -it wpf-console`
### Expected behavior
Able to create a `Point3D` object from a WPF console app running on Windows Nano Server.
### Actual behavior
Executing WPF console app on Nano server produces the following error.
```
Unhandled exception. System.TypeInitializationException: The type initializer for '' threw an exception.
---> System.TypeInitializationException: The type initializer for '' threw an exception.
---> .ModuleLoadException: The C++ module failed to load during appdomain initialization.
---> System.DllNotFoundException: dwrite.dll
---> System.ComponentModel.Win32Exception (126): The specified module could not be found.
```
### Regression?
_No response_
### Known Workarounds
_No response_
### Impact
_No response_
### Configuration
_No response_
### Other information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.