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

dotnet run gives error 0x80008096 (on 3.0.100-preview-009726, 009728, 009730) #135

Closed
Lakritzator opened this issue Nov 5, 2018 · 9 comments

Comments

@Lakritzator
Copy link

Lakritzator commented Nov 5, 2018

When doing a "dotnet new WinForms" or "dotnet new Wpf", followed by a "dotnet run" (or starting from VS) I get an error code -2147450730 (0x80008096)

Existing applications are also giving the same error, with 009726 the error is the same.
The last version which worked was 009722!

dotnet --info:

.NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview-009728
 Commit:    ac9f27d723

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17763
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.0.100-preview-009728\

Host (useful for support):
  Version: 3.0.0-preview-27104-01
  Commit:  410cba8501

.NET Core SDKs installed:
  2.1.202 [C:\Program Files\dotnet\sdk]
  2.1.403 [C:\Program Files\dotnet\sdk]
  2.1.500-preview-009335 [C:\Program Files\dotnet\sdk]
  3.0.100-preview-009728 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 3.0.0-alpha1-10663 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-alpha1-10663 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.DesktopUI.App 3.0.0-alpha-27030-3 [C:\Program Files\dotnet\shared\Microsoft.DesktopUI.App]
  Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0-preview-27104-01 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

Don't know if it's related to #134, "does not work" can be anything. I think that one is just a version mismatch.

@Lakritzator Lakritzator changed the title dotnet run gives error 0x80008096 (on 3.0.100-preview-009728) dotnet run gives error 0x80008096 (on 3.0.100-preview-009726 and 009728) Nov 5, 2018
@Lakritzator
Copy link
Author

I also tested with 3.0.100-preview-009730, with this I have the same issue.

It must be a UI thing..

dotnet new WinForms
dotnet run

-> prompt comes back, echo %errorlevel% gives -2147450730 (0x80008096 )

This works fine:

dotnet new console
dotnet run

-> Hello World!

I cannot imagine this problem is a general thing, so let me know what I can do to give any more information.

@Lakritzator Lakritzator changed the title dotnet run gives error 0x80008096 (on 3.0.100-preview-009726 and 009728) dotnet run gives error 0x80008096 (on 3.0.100-preview-009726, 009728, 009730) Nov 6, 2018
@peterhuene
Copy link

peterhuene commented Nov 6, 2018

Hi @Lakritzator,

To investigate this, can you try setting OutputType in the project file to Exe instead of WinExe and see if there's any diagnostics printed via dotnet run? We have an issue tracking the fact that apphosts set to "GUI" subsystem are not printing any needed error information when they fail to start (I can't find it, but I recall @nguerrera creating it...).

I suspect it can't find the runtime or a dependency to start, but it would be helpful to know which one :) We can move this issue to the appropriate repo once we have additional information, if necessary.

@Lakritzator
Copy link
Author

Thanks for the quick hint, that should actually help us!

Changed WinExe to Exe, dotnet run now gives me the following output:

It was not possible to find any compatible framework version
The specified framework 'Microsoft.NETCore.App', version '3.0.0-preview1-26929-01' was not found.
  - Check application dependencies and target a framework version installed at:
      C:\Program Files\dotnet
  - Installing .NET Core prerequisites might help resolve this problem:
      https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
  - The .NET Core framework and SDK can be installed from:
      https://aka.ms/dotnet-download
  - The following versions are installed:
      2.0.9 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      2.1.5 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      3.0.0-preview-27104-01 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

This actually looks identical to #134

@peterhuene
Copy link

Let me take a quick look at these builds on Windows and see what I can turn up.

@peterhuene
Copy link

Looks like Microsoft.DesktopUI.App is out of date and is referencing the older Microsoft.NETCore.App.

I'm going to dupe this to #134 and follow-up with the issue there. Thanks for reporting this!

@Lakritzator
Copy link
Author

Now that I read the details and the information in #134, it probably works when someone doesn't delete all the previous versions and 3.0.0-preview1-26929-01 would still be available.

To test this, as 009722 worked, I installed this without removing the 009730,.
And voila a workaround, dotnet run works, now I can at least continue work.

So I have in my dotnet --info:

.NET Core SDKs installed:
  2.1.202 [C:\Program Files\dotnet\sdk]
  2.1.403 [C:\Program Files\dotnet\sdk]
  2.1.500-preview-009335 [C:\Program Files\dotnet\sdk]
  3.0.100-preview-009722[C:\Program Files\dotnet\sdk]
  3.0.100-preview-009730[C:\Program Files\dotnet\sdk]

@Lakritzator
Copy link
Author

A much better workaround seems to be:
Modify the file Microsoft.DesktopUI.App.runtimeconfig.json in the directory: %PROGRAMFILES%\dotnet\shared\Microsoft.DesktopUI.App\3.0.0-alpha-27030-3

This should contain the version from the 3.0 directory in %PROGRAMFILES%\dotnet\shared\Microsoft.NETCore.App, in this case for me this is 3.0.0-preview-27104-01.

The resulting file looks like this:

{
  "runtimeOptions": {
    "tfm": "netcoreapp3.0",
    "framework": {
      "name": "Microsoft.NETCore.App",
      "version": "3.0.0-preview-27104-01"
    }
  }
}

@Lakritzator
Copy link
Author

Fixed in 009736! 👍

@MIANSAQLAIN237
Copy link

Fixed in 009736! 👍

how we can fix, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants