Giter VIP home page Giter VIP logo

Comments (5)

rjra100 avatar rjra100 commented on June 27, 2024 1

To clarify here, we only upgraded the runtime that the language server uses to .net8. We can still load projects targeting .net6, .net7, .net8, etc. regardless of what runtime we use to run the language server.

Fair - but at least one reason to be targetting .NET 6 or 7 is that that's the latest version that the OS in question supports. We've still got a lot of stuff on RHEL7 (don't ask), and I don't think .NETs more recent than 6 are supported on that. Fortunately we're almost in a position to switch our main development stream to RHEL8, so it's not as bad as it could be for us - but we're probably not the only ones.

I notice from your logs that we determined .net8 was not installed - but it looks like it isn't being acquired by the runtime extension properly. Do you have any custom configurations setting the dotnetPath?

No, though I do have a DOTNET_ROOT environment variable. However, I think the failure to download via the runtime extension is probably a local environment glitch - I have a local instance of NodeProxy which is supposed to direct things via the appropriate proxies for our excessively-complicated network setup, and it periodically dies. After I restarted that this morning, it does successfully download a runtime via the runtime extension (at least so long as I'm in the RHEL8 environment).

from vscode-csharp.

dibarbet avatar dibarbet commented on June 27, 2024

Isn't dropping support for these in the extension a little premature?

To clarify here, we only upgraded the runtime that the language server uses to .net8. We can still load projects targeting .net6, .net7, .net8, etc. regardless of what runtime we use to run the language server. Additionally, the runtime used by the language server should be relatively transparent to you - if .net8 is not found on the path we acquire it via the runtime installer extension.

@rjra100 I notice from your logs that we determined .net8 was not installed - but it looks like it isn't being acquired by the runtime extension properly. Do you have any custom configurations setting the dotnetPath? If not would you mind posting the '.NET Runtime' output window logs?

from vscode-csharp.

v-Judy avatar v-Judy commented on June 27, 2024

This issue also reproduces on the .NET9.0 SDK with VSCode v 1.87.2, C# Dev Kit v 1.4.29, C# v 2.22.5.
The 'Razor Logs' output window logs show as below:
image
image (1)

Using dotnet configured on PATH
[Client - 3:15:55 PM] Razor language server path: /Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.22.5-darwin-x64/.razor/rzls
[Client - 3:15:55 PM] Server arguments --logLevel 2 --projectConfigurationFileName project.razor.vscode.bin --DelegateToCSharpOnDiagnosticPublish true --UpdateBuffersForClosedDocuments true --telemetryLevel all --sessionId 3cf33dfc-3ae6-4b08-a51f-a57b103873fb1710832553170 --telemetryExtensionPath /Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.22.5-darwin-x64/.razortelemetry/Microsoft.VisualStudio.DevKit.Razor.dll
[Client - 3:15:55 PM] Starting Razor Language Server...
You must install or update .NET to run this application.
 
App: /Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.22.5-darwin-x64/.razor/rzls
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.1' (x64)
.NET location: /usr/local/share/dotnet
 
The following frameworks were found:
  9.0.0-preview.3.24162.31 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
 
Learn more:
https://aka.ms/dotnet/app-launch-failed
 
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.1&arch=x64&rid=osx-x64&os=osx.12
[Error - 3:15:55 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097
[Info  - 3:15:55 PM] Connection to server got closed. Server will restart.
true
[Error - 3:15:55 PM] Razor Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097
You must install or update .NET to run this application.
 
App: /Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.22.5-darwin-x64/.razor/rzls
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.1' (x64)
.NET location: /usr/local/share/dotnet
 
The following frameworks were found:
  9.0.0-preview.3.24162.31 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
 
Learn more:
https://aka.ms/dotnet/app-launch-failed
 
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.1&arch=x64&rid=osx-x64&os=osx.12
[Error - 3:15:55 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097
[Info  - 3:15:55 PM] Connection to server got closed. Server will restart.
true
[Error - 3:15:55 PM] Razor Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097
[Client - 3:15:55 PM] (Error) Failed when activating Razor VSCode.
Pending response rejected since connection got disposed
Stack Trace:
Error: Pending response rejected since connection got disposed
  at Object.dispose (/Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.22.5-darwin-x64/dist/extension.js:2:2098108)
  at Object.dispose (/Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.22.5-darwin-x64/dist/extension.js:2:2152884)
  at S.handleConnectionClosed (/Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.22.5-darwin-x64/dist/extension.js:2:2153290)
  at S.handleConnectionClosed (/Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.22.5-darwin-x64/dist/extension.js:2:2311358)
  at /Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.22.5-darwin-x64/dist/extension.js:2:2153033
  at i.invoke (/Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.22.5-darwin-x64/dist/extension.js:2:2099821)
  at o.fire (/Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.22.5-darwin-x64/dist/extension.js:2:2100586)
  at te (/Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.22.5-darwin-x64/dist/extension.js:2:2086231)
  at i.invoke (/Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.22.5-darwin-x64/dist/extension.js:2:2099821)
  at o.fire (/Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.22.5-darwin-x64/dist/extension.js:2:2100586)
  at v.fireClose (/Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.22.5-darwin-x64/dist/extension.js:2:2108439)
  at Socket.<anonymous> (/Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.22.5-darwin-x64/dist/extension.js:2:2110033)
  at Socket.emit (node:events:526:35)
  at Pipe.<anonymous> (node:net:323:12)
You must install or update .NET to run this application.
 
App: /Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.22.5-darwin-x64/.razor/rzls
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.1' (x64)
.NET location: /usr/local/share/dotnet
 
The following frameworks were found:
  9.0.0-preview.3.24162.31 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
 
Learn more:
https://aka.ms/dotnet/app-launch-failed
 
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.1&arch=x64&rid=osx-x64&os=osx.12
[Error - 3:15:55 PM] Server initialization failed.
  Message: Cannot call write after a stream was destroyed
  Code: -32099
[Error - 3:15:55 PM] Razor Language Server client: couldn't create connection to server.
  Message: Cannot call write after a stream was destroyed
  Code: -32099
[Error - 3:15:55 PM] Restarting server failed
  Message: Cannot call write after a stream was destroyed
  Code: -32099
[Error - 3:15:55 PM] Restarting server failed
  Message: Cannot call write after a stream was destroyed
  Code: -32099
[Info  - 3:15:55 PM] Connection to server got closed. Server will restart.
true
You must install or update .NET to run this application.
 
App: /Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.22.5-darwin-x64/.razor/rzls
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.1' (x64)
.NET location: /usr/local/share/dotnet
 
The following frameworks were found:
  9.0.0-preview.3.24162.31 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
 
Learn more:
https://aka.ms/dotnet/app-launch-failed
 
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.1&arch=x64&rid=osx-x64&os=osx.12
[Error - 3:15:55 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097
[Info  - 3:15:55 PM] Connection to server got closed. Server will restart.
true
[Error - 3:15:55 PM] Razor Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097
You must install or update .NET to run this application.
 
App: /Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.22.5-darwin-x64/.razor/rzls
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.1' (x64)
.NET location: /usr/local/share/dotnet
 
The following frameworks were found:
  9.0.0-preview.3.24162.31 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
 
Learn more:
https://aka.ms/dotnet/app-launch-failed
 
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.1&arch=x64&rid=osx-x64&os=osx.12
[Error - 3:15:55 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097
[Error - 3:15:55 PM] The Razor Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 3:15:55 PM] Razor Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097
[Error - 3:15:55 PM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097
[Client - 3:16:04 PM] File '/Users/vs/RazorNoAuth/Pages/Privacy.cshtml' didn't exist in the Razor document list. This is likely because it's from outside the workspace.
[Client - 3:16:04 PM] (Warning) razor.provideDynamicFileInfo failed with CodeExpectedError: cannot open virtualCSharp-razor:/Users/vs/RazorNoAuth/Pages/Privacy.cshtml__virtual.cs. Detail: Unable to resolve resource virtualCSharp-razor:/Users/vs/RazorNoAuth/Pages/Privacy.cshtml__virtual.cs
[Client - 3:16:04 PM] File '/Users/vs/RazorNoAuth/Pages/Error.cshtml' didn't exist in the Razor document list. This is likely because it's from outside the workspace.
[Client - 3:16:04 PM] (Warning) razor.provideDynamicFileInfo failed with CodeExpectedError: cannot open virtualCSharp-razor:/Users/vs/RazorNoAuth/Pages/Error.cshtml__virtual.cs. Detail: Unable to resolve resource virtualCSharp-razor:/Users/vs/RazorNoAuth/Pages/Error.cshtml__virtual.cs
[Client - 3:16:04 PM] File '/Users/vs/RazorNoAuth/Pages/Shared/_ValidationScriptsPartial.cshtml' didn't exist in the Razor document list. This is likely because it's from outside the workspace.
[Client - 3:16:04 PM] (Warning) razor.provideDynamicFileInfo failed with CodeExpectedError: cannot open virtualCSharp-razor:/Users/vs/RazorNoAuth/Pages/Shared/_ValidationScriptsPartial.cshtml__virtual.cs. Detail: Unable to resolve resource virtualCSharp-razor:/Users/vs/RazorNoAuth/Pages/Shared/_ValidationScriptsPartial.cshtml__virtual.cs
[Client - 3:16:04 PM] File '/Users/vs/RazorNoAuth/Pages/_ViewStart.cshtml' didn't exist in the Razor document list. This is likely because it's from outside the workspace.
[Client - 3:16:04 PM] (Warning) razor.provideDynamicFileInfo failed with CodeExpectedError: cannot open virtualCSharp-razor:/Users/vs/RazorNoAuth/Pages/_ViewStart.cshtml__virtual.cs. Detail: Unable to resolve resource virtualCSharp-razor:/Users/vs/RazorNoAuth/Pages/_ViewStart.cshtml__virtual.cs
[Client - 3:16:04 PM] File '/Users/vs/RazorNoAuth/Pages/_ViewImports.cshtml' didn't exist in the Razor document list. This is likely because it's from outside the workspace.
[Client - 3:16:04 PM] (Warning) razor.provideDynamicFileInfo failed with CodeExpectedError: cannot open virtualCSharp-razor:/Users/vs/RazorNoAuth/Pages/_ViewImports.cshtml__virtual.cs. Detail: Unable to resolve resource virtualCSharp-razor:/Users/vs/RazorNoAuth/Pages/_ViewImports.cshtml__virtual.cs
[Client - 3:16:04 PM] File '/Users/vs/RazorNoAuth/Pages/Index.cshtml' didn't exist in the Razor document list. This is likely because it's from outside the workspace.
[Client - 3:16:04 PM] (Warning) razor.provideDynamicFileInfo failed with CodeExpectedError: cannot open virtualCSharp-razor:/Users/vs/RazorNoAuth/Pages/Index.cshtml__virtual.cs. Detail: Unable to resolve resource virtualCSharp-razor:/Users/vs/RazorNoAuth/Pages/Index.cshtml__virtual.cs
[Client - 3:16:04 PM] File '/Users/vs/RazorNoAuth/Pages/Shared/_Layout.cshtml' didn't exist in the Razor document list. This is likely because it's from outside the workspace.
[Client - 3:16:04 PM] (Warning) razor.provideDynamicFileInfo failed with CodeExpectedError: cannot open virtualCSharp-razor:/Users/vs/RazorNoAuth/Pages/Shared/_Layout.cshtml__virtual.cs. Detail: Unable to resolve resource virtualCSharp-razor:/Users/vs/RazorNoAuth/Pages/Shared/_Layout.cshtml__virtual.cs

from vscode-csharp.

dibarbet avatar dibarbet commented on June 27, 2024

@v-Judy looks like a slightly different issue on the Razor side - I filed dotnet/razor#10132 to track that on their side.

Fair - but at least one reason to be targetting .NET 6 or 7 is that that's the latest version that the OS in question supports. We've still got a lot of stuff on RHEL7 (don't ask), and I don't think .NETs more recent than 6 are supported on that.

I think it was .net8 that dropped rhel7 (ref).
It's a bit of a tradeoff here. We do want to make sure the extension works for a wide audience, but we also generally want to use the latest released versions of .net to take advantage of the new features and performance improvements in the runtime (even if the previous version isn't EoL yet).

In this case, since .net7 is EoL in 2 months anyway and rhel7 1 month later (plus .net8 is LTS), we feel its reasonable to take the upgrade. If rhel7 support is required, it's always possible to downgrade the extension version.

from vscode-csharp.

dibarbet avatar dibarbet commented on June 27, 2024

Closing this as by design (Razor issue tracked separately).

from vscode-csharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.