REGRESSION INFO
Not repro on 11.0.100-preview.5.26263.112 (runtime- 11.0.0-preview.5.26263.112)
INSTALL STEPS
Clean machine: Windows 11
Install SDK 11.0.100-preview.5.26264.105 (runtime- 11.0.0-preview.5.26264.105)
REPRO STEPS
- dotnet new wpf
- dotnet build
- dotnet publish -r win-x64 --self-contained
- in publish directory, double-click exe file
EXPECTED
exe file can run successfully
ACTUAL
There is no any response after double-click exe file

run dll file fails with below message::

Unhandled exception. System.TypeInitializationException: The type initializer for 'System.Windows.Application' threw an exception.
---> System.TypeInitializationException: The type initializer for '' threw an exception.
---> System.IO.FileNotFoundException: Could not load file or assembly 'C:\Users\v-txianyoong\Self-test\bin\Release\net11.0-windows\win-x64\publish\DirectWriteForwarder.dll'. The specified module could not be found.
File name: 'C:\Users\v-txianyoong\Self-test\bin\Release\net11.0-windows\win-x64\publish\DirectWriteForwarder.dll'
at System.Runtime.CompilerServices.InitHelpers.CallClassConstructor(Void* cctor, Void* instantiatingArg, Exception* pException)
--- End of inner exception stack trace ---
at System.Windows.Application.ApplicationInit()
at System.Runtime.CompilerServices.InitHelpers.CallClassConstructor(Void* cctor, Void* instantiatingArg, Exception* pException)
--- End of inner exception stack trace ---
at System.Windows.Application..ctor()
at Self_test.App..ctor()
at Self_test.App.Main()
dotnet --info
Version: 11.0.100-preview.5.26264.105
Commit: 0081222618
Workload version: 11.0.100-manifests.8fd0ec46
MSBuild version: 18.8.0-preview-26264-105+008122261
Runtime Environment:
OS Name: Windows
OS Version: 10.0.26200
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\11.0.100-preview.5.26264.105\
.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.
Host:
Version: 11.0.0-preview.5.26264.105
Architecture: x64
Commit: 0081222618
.NET SDKs installed:
11.0.100-preview.5.26264.105 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 11.0.0-preview.5.26264.105 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 11.0.0-preview.5.26264.105 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 11.0.0-preview.5.26264.105 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Note:
running WPF successfully
System.windows.application does not exist in the publish output directory.

REGRESSION INFO
Not repro on 11.0.100-preview.5.26263.112 (runtime- 11.0.0-preview.5.26263.112)
INSTALL STEPS
Clean machine: Windows 11
Install SDK 11.0.100-preview.5.26264.105 (runtime- 11.0.0-preview.5.26264.105)
REPRO STEPS
EXPECTED
exe file can run successfully
ACTUAL

There is no any response after double-click exe file
run dll file fails with below message::

Unhandled exception. System.TypeInitializationException: The type initializer for 'System.Windows.Application' threw an exception.
---> System.TypeInitializationException: The type initializer for '' threw an exception.
---> System.IO.FileNotFoundException: Could not load file or assembly 'C:\Users\v-txianyoong\Self-test\bin\Release\net11.0-windows\win-x64\publish\DirectWriteForwarder.dll'. The specified module could not be found.
File name: 'C:\Users\v-txianyoong\Self-test\bin\Release\net11.0-windows\win-x64\publish\DirectWriteForwarder.dll'
at System.Runtime.CompilerServices.InitHelpers.CallClassConstructor(Void* cctor, Void* instantiatingArg, Exception* pException)
--- End of inner exception stack trace ---
at System.Windows.Application.ApplicationInit()
at System.Runtime.CompilerServices.InitHelpers.CallClassConstructor(Void* cctor, Void* instantiatingArg, Exception* pException)
--- End of inner exception stack trace ---
at System.Windows.Application..ctor()
at Self_test.App..ctor()
at Self_test.App.Main()
dotnet --info
Version: 11.0.100-preview.5.26264.105
Commit: 0081222618
Workload version: 11.0.100-manifests.8fd0ec46
MSBuild version: 18.8.0-preview-26264-105+008122261
Runtime Environment:
OS Name: Windows
OS Version: 10.0.26200
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\11.0.100-preview.5.26264.105\
.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.
Host:
Version: 11.0.0-preview.5.26264.105
Architecture: x64
Commit: 0081222618
.NET SDKs installed:
11.0.100-preview.5.26264.105 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 11.0.0-preview.5.26264.105 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 11.0.0-preview.5.26264.105 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 11.0.0-preview.5.26264.105 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Note:
running WPF successfully
System.windows.applicationdoes not exist in the publish output directory.