Skip to content

[NETSDKE2E] With NET11.0.100-preview.5.26264.105 SDK installed, WPF application which is generated by self-contained publish cannot run successfully.  #11651

Description

@xianyoong

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

  1. dotnet new wpf
  2. dotnet build
  3. dotnet publish -r win-x64 --self-contained
  4. in publish directory, double-click exe file

EXPECTED
exe file can run successfully

ACTUAL
There is no any response after double-click exe file
Image

run dll file fails with below message::
Image

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

Image

System.windows.application does not exist in the publish output directory.

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

🪲 bugregressionstatus: This issue is a regression from a previous build or release

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions