-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Support Single-file executable in Windows 7 #63196
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
Conversation
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
|
Tagging subscribers to this area: @agocke, @vitek-karas, @VSadov Issue DetailsWindows 7 doesn't have WinRT API set, making it delay loaded allows running single file executable in Windows 7. .NET code already performs late binding in utils.cpp and in mscoree CMakeLists.txt .
|
|
@jkoritzinsky Is there anything preventing this PR to be merged ? Is it possible to backport it to .NET 6 ? |
|
@VSadov could you please review this as well? My main concern is if this is enough. The single-file superhost statically links several other native libs from the runtime, do any of those have a similar problem? |
|
Comparing .NET 5 and .NET 6 single file output, the API set WinRT is the only difference as far as I have seen. I couldn't figure why the same code doesn't make a statically loaded API set in previous versions. |
|
The change looks good. I just need to try the end-to-end scenario with an app running on actual Windows7. |
|
I have verified that with this fix singlefile apps run on Windows7 SP1 I've tried:
|
|
BTW. The OS image that I used is fairly minimal, but it looks like it has UCRT (i.e. ucrtbse.dll is present). It was likely installed with some of the updates. Since UCRT is not a part of OS, it might need to be documented as a requirement on Win7. It is still better than not running at all. |
VSadov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NN--- : Thanks!!!
|
Great news! There is also a small issue with .NET SDK as I mentioned. |
There is a bit more process for servicing changes to LTS branch. That is intentional to ensure it is stable. We will get to the error/warning too. |
|
I opened relevant PRs for SDK and 6.0 branch. Without SDK fix, the publishing still fails. |
.NET already requires Windows 7 SP1. |
Windows 7 doesn't have WinRT API set, making it delay loaded allows running single file executable in Windows 7.
dotnet/sdk#23177
.NET code already performs late binding in utils.cpp and in mscoree CMakeLists.txt .
But not for singlefilehost.exe
The final change should be backported since .NET 6 is the latest LTS version.