-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NETSDKE2E]The winforms application which is generated by self-contained publish cannot run successfully. #40173
Comments
@agocke @elinor-fung is there an issue with the host or with our publish? |
I think that depends on whether or not there is in fact a |
This is a blocker. Who should look at it @agocke @marcpopMSFT ? |
@dsplaisted Any ideas here? In 8.0, we had no reference to System.Private.Windows.Core but now in 9, I see it showing up in ResolveTargetingPackAssets so we consider it a reference but not needed at runtime. |
Sounds like this may be the same as dotnet/winforms#11282 |
This issue has been fixed on 9.0.100-preview.4.24258.4(runtime-9.0.0-preview.4.24252.19) FYI @richaverma1 |
Build:
9.0.100-preview.4.24214.1(runtime-9.0.0-preview.4.24211.4)
Repro:
1.dotnet new winforms
2.dotnet publish -r win-x64 --self-contained
3.in publish directory, double-click exe file
Expected:


exe file can run successfully
Actual Result:
There is no any response after double-click exe file
run dll file, file crash
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'System.Private.Windows.Core, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.
File name: 'System.Private.Windows.Core, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
at win1.Program.Main()
dotnet --info:

Note:

running WinForms successfully.
The text was updated successfully, but these errors were encountered: