Skip to content
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

Multiple applications not correctly detecting .Net Desktop Runtime 6.0.1 (x64) #63812

Closed
justmarks opened this issue Jan 14, 2022 · 6 comments
Closed
Labels
area-Host untriaged New issue has not been triaged by the area owner

Comments

@justmarks
Copy link

Description

I installed Handbrake on a brand new computer and got the error
image

I clicked the link and installed the .NET Desktop Runtime 6.0.1 (x64)
image

Installation was successful and it appears correctly in my Windows Apps list. But when I run Handbrake again, the error still appears
image

I also get the same error from other apps like ScreenToGif.exe
image

This is what appeared in the Event Log

Log Name:      Application
Source:        .NET Runtime
Date:          1/14/2022 11:21:42 AM
Event ID:      1023
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      MarksDesk
Description:
Description: A .NET application failed.
Application: HandBrake.exe
Path: C:\Program Files\HandBrake\HandBrake.exe
Message: Failure processing application bundle.
Bundle header version compatibility check failed.
A fatal error occured while processing application bundle


Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name=".NET Runtime" />
    <EventID Qualifiers="0">1023</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2022-01-14T19:21:42.0180876Z" />
    <EventRecordID>2550</EventRecordID>
    <Correlation />
    <Execution ProcessID="0" ThreadID="0" />
    <Channel>Application</Channel>
    <Computer>MarksDesk</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Description: A .NET application failed.
Application: HandBrake.exe
Path: C:\Program Files\HandBrake\HandBrake.exe
Message: Failure processing application bundle.
Bundle header version compatibility check failed.
A fatal error occured while processing application bundle

</Data>
  </EventData>
</Event>

Reproduction Steps

Install .NET Desktop Runtime 6.0.1 (x64) from https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-6.0.1-windows-x64-installer

Install and Launch Handbrake or ScreenToGif

OBSERVED:
image

Expected behavior

Application should launch

Actual behavior

.NET Desktop Runtime is not detected

Regression?

No response

Known Workarounds

No response

Configuration

.NET Desktop Runtime 6.0.1 (x64)
OS is Windows 10 21H2 OS Build 19044.1466

Other information

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added area-Host untriaged New issue has not been triaged by the area owner labels Jan 14, 2022
@ghost
Copy link

ghost commented Jan 14, 2022

Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

I installed Handbrake on a brand new computer and got the error
image

I clicked the link and installed the .NET Desktop Runtime 6.0.1 (x64)
image

Installation was successful and it appears correctly in my Windows Apps list. But when I run Handbrake again, the error still appears
image

I also get the same error from other apps like ScreenToGif.exe
image

This is what appeared in the Event Log

Log Name:      Application
Source:        .NET Runtime
Date:          1/14/2022 11:21:42 AM
Event ID:      1023
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      MarksDesk
Description:
Description: A .NET application failed.
Application: HandBrake.exe
Path: C:\Program Files\HandBrake\HandBrake.exe
Message: Failure processing application bundle.
Bundle header version compatibility check failed.
A fatal error occured while processing application bundle


Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name=".NET Runtime" />
    <EventID Qualifiers="0">1023</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2022-01-14T19:21:42.0180876Z" />
    <EventRecordID>2550</EventRecordID>
    <Correlation />
    <Execution ProcessID="0" ThreadID="0" />
    <Channel>Application</Channel>
    <Computer>MarksDesk</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Description: A .NET application failed.
Application: HandBrake.exe
Path: C:\Program Files\HandBrake\HandBrake.exe
Message: Failure processing application bundle.
Bundle header version compatibility check failed.
A fatal error occured while processing application bundle

</Data>
  </EventData>
</Event>

Reproduction Steps

Install .NET Desktop Runtime 6.0.1 (x64) from https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-6.0.1-windows-x64-installer

Install and Launch Handbrake or ScreenToGif

OBSERVED:
image

Expected behavior

Application should launch

Actual behavior

.NET Desktop Runtime is not detected

Regression?

No response

Known Workarounds

No response

Configuration

.NET Desktop Runtime 6.0.1 (x64)
OS is Windows 10 21H2 OS Build 19044.1466

Other information

No response

Author: justmarks
Assignees: -
Labels:

area-Host, untriaged

Milestone: -

@vitek-karas
Copy link
Member

I tried it locally (not a new machine) and it works... hmm..
Can you please try this from a console:

set COREHOST_TRACE=1
set COREHOST_TRACEFILE=host.txt
C:\Program Files\Handbrake\Handbrake.exe

The produced host.txt will be in the current directory. Please note that it may contain information about the computer/user like file paths and environment variables. If you're comfortable, please share that file. It will contain detailed information where it looked for certain components and possibly more details about the failure.

@justmarks
Copy link
Author

Still got the error.

Here's the host.txt file that was generated:
Tracing enabled @ Fri Jan 14 20:49:14 2022 GMT
--- Invoked apphost [version: 6.0.1, commit hash: 3a25a7f] main = {
c:\Program Files\HandBrake\HandBrake.exe
}
Redirecting errors to custom writer.
The managed DLL bound to this executable is: 'HandBrake.dll'
Detected Single-File app bundle
Using environment variable DOTNET_ROOT=[C:\Users\justm\AppData\Local\dotnet\x64] as runtime location.
Reading fx resolver directory=[C:\Users\justm\AppData\Local\dotnet\x64\host\fxr]
Considering fxr version=[5.0.7]...
Detected latest fxr version=[C:\Users\justm\AppData\Local\dotnet\x64\host\fxr\5.0.7]...
Resolved fxr [C:\Users\justm\AppData\Local\dotnet\x64\host\fxr\5.0.7\hostfxr.dll]...
Loaded library from C:\Users\justm\AppData\Local\dotnet\x64\host\fxr\5.0.7\hostfxr.dll
Invoking fx resolver [C:\Users\justm\AppData\Local\dotnet\x64\host\fxr\5.0.7\hostfxr.dll] hostfxr_main_bundle_startupinfo
Host path: [c:\Program Files\HandBrake\HandBrake.exe]
Dotnet path: [C:\Users\justm\AppData\Local\dotnet\x64]
App path: [c:\Program Files\HandBrake\HandBrake.dll]
Bundle Header Offset: [23b1d40]
Tracing enabled @ Fri Jan 14 20:49:14 2022 GMT
--- Invoked hostfxr_main_bundle_startupinfo [commit hash: 556582d]
Mapped application bundle
Failure processing application bundle.
Bundle header version compatibility check failed.
A fatal error occured while processing application bundle
Showing error dialog for application: 'HandBrake.exe' - error code: 0x8000809f - url: 'https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=win10-x64&apphost_version=6.0.1&gui=true'

@vitek-karas
Copy link
Member

Using environment variable DOTNET_ROOT=[C:\Users\justm\AppData\Local\dotnet\x64] as runtime location.

This is the problem. You have DOTNET_ROOT set in your environment. This forces the app to run on .NET 5 runtime - which is not compatible (since it's a .NET 6 app). Try to run the app without the DOTNET_ROOT set and it should work.

@justmarks
Copy link
Author

That was it! I just removed it and things are working. Any ideas why/how that would have been set?

Thanks for your help Vitek!

@vitek-karas
Copy link
Member

Assuming it was set machine/user wide - no idea. None of our products should do that.
Typically users set this themselves to help with development on a specific version.

@ghost ghost locked as resolved and limited conversation to collaborators Feb 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Host untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

2 participants