Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

tye init not working (FileNotFoundException: System.Runtime 5.0.0.0) #1003

Open
Otto404 opened this issue Apr 6, 2021 · 10 comments
Open

tye init not working (FileNotFoundException: System.Runtime 5.0.0.0) #1003

Otto404 opened this issue Apr 6, 2021 · 10 comments
Labels
bug Something isn't working

Comments

@Otto404
Copy link

Otto404 commented Apr 6, 2021

Describe the bug

tye init throws an error

To Reproduce

I've a very simple project with blazor wasm. Net. 5 and I'm using tye 0.7 alpha

# Got Exceptions? Include both the message and the stack trace
An unhandled exception has occurred, how unseemly:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Das System kann die angegebene Datei nicht finden.
File name: 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at Microsoft.Tye.ProjectReader.EnumerateProjectsCore(FileInfo solutionFile)+MoveNext()
   at Microsoft.Tye.ConfigModel.ConfigFactory.FromSolution(FileInfo file) in /_/src/Microsoft.Tye.Core/ConfigModel/ConfigFactory.cs:line 75
   at Microsoft.Tye.ConfigModel.ConfigFactory.FromFile(FileInfo file) in /_/src/Microsoft.Tye.Core/ConfigModel/ConfigFactory.cs:line 42
   at Microsoft.Tye.InitHost.CreateTyeFileContent(FileInfo path, Boolean force) in /_/src/tye/InitHost.cs:line 74
   at Microsoft.Tye.InitHost.CreateTyeFile(FileInfo path, Boolean force) in /_/src/tye/InitHost.cs:line 11
   at Microsoft.Tye.Program.<>c.<CreateInitCommand>b__13_0(InitCommandArguments args) in /_/src/tye/Program.InitCommand.cs:line 31

Further technical details

  • Include the output of tye --version
    tye --version
    0.7.0-alpha.21153.4+528c743efc48eb0c5aa18c9272fac5235f38b0ed
  • If possible rerun the command with -v debug and include the output
    tye --version -v debug
    0.7.0-alpha.21153.4+528c743efc48eb0c5aa18c9272fac5235f38b0ed
  • The platform (Linux/macOS/Windows)
    Windows
  • dotnet --list-runtimes
    dotnet --list-runtimes
    Microsoft.AspNetCore.All 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
    Microsoft.AspNetCore.All 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
    Microsoft.AspNetCore.All 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
    Microsoft.AspNetCore.All 2.1.26 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
    Microsoft.AspNetCore.All 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
    Microsoft.AspNetCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 2.1.26 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 3.0.0-preview7.19365.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 3.0.0-rc1.19457.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 3.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 3.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 5.0.0-rc.2.20475.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 6.0.0-preview.2.21154.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.NETCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 2.1.26 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 3.0.0-preview7-27912-14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 3.0.0-rc1-19456-20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 3.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 3.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 5.0.0-rc.2.20475.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 6.0.0-preview.2.21154.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.WindowsDesktop.App 3.0.0-preview7-27912-14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 3.0.0-rc1-19456-20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 3.1.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 3.1.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 5.0.0-rc.2.20475.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 6.0.0-preview.2.21154.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
@Otto404 Otto404 added the bug Something isn't working label Apr 6, 2021
@Otto404
Copy link
Author

Otto404 commented Apr 7, 2021

I de-Installed tye, re-installed with

0.6.0-alpha.21070.5+a42e4463943e3136dbd1de38474d8d62b802797c

but the error persists

@jkotalik
Copy link
Contributor

jkotalik commented Apr 7, 2021

Can you post the csproj for the blazor wasm app?

@Otto404
Copy link
Author

Otto404 commented Apr 14, 2021

NetSix.-.Microsoft.Visual.Studio.Preview.2021-04-14.13-25-20.mp4

How it works - or not.

Here is the link to the solution (the wasm-project). https://github.com/Otto404/NetSix
Nothing special.

Please note: tye no longer works for me at all. in no project.

I think the problem must be with my computer, the installed or not installed software.

I de-installed tye and then reinstalled it. Unfortunately there was no change.

I would be very grateful for any tip on how to fix the problem.

@drchilds
Copy link

I saw the same issue today and worked around it by adding a global.json to the solution folder with the following:

{ "sdk": { "allowPrerelease": false } }

I have .NET 6 Preview 3 installed. It would seem that Tye is choking on the updated runtime version.

@Otto404
Copy link
Author

Otto404 commented Apr 16, 2021

I saw the same issue today and worked around it by adding a global.json to the solution folder with the following:

{ "sdk": { "allowPrerelease": false } }

I have .NET 6 Preview 3 installed. It would seem that Tye is choking on the updated runtime version.

Hits the bull's eye.

But now I see:
Loading Application Details...
Evaluating project failed with exit code 1
Drats! 'run' failed:
Evaluated project metadata file could not be found for service budget-server

@jkotalik
Copy link
Contributor

Yeah I think we need to update tye to work with 6.0 now. @JunTaoLuo how hard was it to get .NET 5 support working?

@warappa
Copy link

warappa commented May 19, 2021

I saw the same issue today and worked around it by adding a global.json to the solution folder with the following:
{ "sdk": { "allowPrerelease": false } }
I have .NET 6 Preview 3 installed. It would seem that Tye is choking on the updated runtime version.

Hits the bull's eye.

But now I see:
Loading Application Details...
Evaluating project failed with exit code 1
Drats! 'run' failed:
Evaluated project metadata file could not be found for service budget-server

Evaluating project failed with exit code 1 is caused by installing Visual Studio 16.10 Preview 3/4.

Workaround

Uninstalling works around this issue by now.
See here: dotnet/msbuild#6373

@DHclly
Copy link

DHclly commented May 31, 2021

I run single app is nice

PS D:\tmp\microservice> tye run .\backend\
Loading Application Details...
Launching Tye Host...

[10:57:16 INF] Executing application from D:\tmp\microservice\backend\backend.csproj
[10:57:16 INF] Dashboard running on http://127.0.0.1:8000
[10:57:16 INF] Building projects
[10:57:19 INF] Launching service backend_3bf675d3-f: D:\tmp\microservice\backend\bin\Debug\net5.0\backend.exe 
[10:57:20 INF] backend_3bf675d3-f running on process id 7664 bound to http://localhost:62654, https://localhost:62655
[10:57:20 INF] Replica backend_3bf675d3-f is moving to a ready state
[10:57:20 INF] Selected process 7664.
[10:57:20 INF] Listening for event pipe events for backend_3bf675d3-f on process id 7664
[10:57:48 INF] Tye Host is stopping...
[10:57:48 INF] Event pipe collection completed for backend_3bf675d3-f on process id 7664
[10:57:48 INF] backend_3bf675d3-f process exited with exit code -1

but I run multi app is error

PS D:\tmp\microservice> tye run
Loading Application Details...
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. 系统找不到指定的文 
件。
File name: 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at Microsoft.Tye.ProjectReader.EnumerateProjectsCore(FileInfo solutionFile)+MoveNext()
   at Microsoft.Tye.ConfigModel.ConfigFactory.FromSolution(FileInfo file) in /_/src/Microsoft.Tye.Core/ConfigModel/ConfigFactory.cs:line 75
   at Microsoft.Tye.ConfigModel.ConfigFactory.FromFile(FileInfo file) in /_/src/Microsoft.Tye.Core/ConfigModel/ConfigFactory.cs:line 42
   at Microsoft.Tye.ApplicationFactory.CreateAsync(OutputContext output, FileInfo source, String framework, ApplicationFactoryFilter filter) in /_/src/Microsoft.Tye.Core/ApplicationFactory.cs:line 30
   at Microsoft.Tye.Program.<>c.<<CreateRunCommand>b__18_0>d.MoveNext() in /_/src/tye/Program.RunCommand.cs:line 96
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Invocation.CommandHandler.GetResultCodeAsync(Object value, InvocationContext context)
   at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseErrorReporting>b__19_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseDebugDirective>b__10_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseExceptionHandler>b__0>d.MoveNext()

May I don't install some underlying?

PS D:\tmp\microservice> dotnet --list-sdks
3.1.409 [C:\Program Files\dotnet\sdk]
5.0.203 [C:\Program Files\dotnet\sdk]
5.0.300 [C:\Program Files\dotnet\sdk]
PS D:\tmp\microservice> dotnet --list-runtimes
Microsoft.AspNetCore.All 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]        
Microsoft.AspNetCore.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]        
Microsoft.AspNetCore.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] 

How can I do now?

@jkears
Copy link

jkears commented Jun 14, 2021

Having same issue after updating to 16.10.1.27004

msbuild --version
Microsoft (R) Build Engine version 16.10.1+2fd48ab73 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

What is the solution for this? I am completely stuck without Tye? Do I need to roll-back Visual Studio ? Please assist.

@jkears
Copy link

jkears commented Jun 14, 2021

I had also installed Visual Studio 16.11 Preview which I removed but still the issue persisted. Then I ran the Tye update and it seems to have resolved my issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants