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

Why do you always fail to donwload with new version 2.0 #6004

Closed
heartacker opened this issue Aug 3, 2023 · 60 comments
Closed

Why do you always fail to donwload with new version 2.0 #6004

heartacker opened this issue Aug 3, 2023 · 60 comments

Comments

@heartacker
Copy link
Contributor

heartacker commented Aug 3, 2023

1691029846725.png

@timheuer
Copy link
Member

timheuer commented Aug 3, 2023

Hi @heartacker can I assume based on the dialog you are in mainland China region?

See microsoft/vscode-dotnettools#186 where we had one other report. We’ve been unable to reproduce this.

@heartacker
Copy link
Contributor Author

i have install the runtime,why do you always try to down load again and again

why not use the installed version

@dibarbet
Copy link
Member

dibarbet commented Aug 3, 2023

@heartacker as a temporary workaround, would you be able to try setting the dotnet.dotnetPath option to point to the folder containing your installed version? For example for me it would be C:\Program Files\dotnet? I believe that should allow the server to start even if the specific runtime isn't able to be acquired.

@nagilson
Copy link
Member

nagilson commented Aug 3, 2023

re @dibarbet 's comment: image

@acarroll-trend
Copy link

@dibarbet Your suggestion did not work for me, but it did lead me to a solution. In whichever settings file is appropriate for you

"dotnetAcquisitionExtension.existingDotnetPath": [
  {
    "extensionId": "ms-dotnettools.csharp",
    "path": "C:\\Program Files\\dotnet\\dotnet.exe"
  }
]

@timheuer
Copy link
Member

timheuer commented Aug 3, 2023

Hi @heartacker we've been checking with our edge delivery teams and we're just not seeing widespread indicators here. I know it's asking a lot but can you help provide us with more information so our network partners can troubleshoot some more? I appreciate it.

Instructions:

  1. Public IP (visit https://ipinfo.io/)
  2. HAR file while the issue occurs
  3. MTR (100 count) to "dotnetcli.azureedge.net" (excluding quotations)
  4. Visit/provide us the results from http://wpc.2dcc.edgecastcdn.net/002DCC/n2/
  5. Visit/provide us the results from https://tools.vdms.com/

We've additionally included steps on how to obtain a HAR/MTR below should the end user require assistance to the ask above. This information would help our team greatly towards our efforts in investigating the report.

Below are the steps for collecting HAR/MTR


HAR file :
Here is a guide from Google support, explaining how to use the developer tools to capture the full log of the interaction.
https://support.google.com/admanager/answer/10358597?hl=en

MTR:
Download and install WinMTR: Visit the WinMTR website (https://sourceforge.net/projects/winmtr/) and download the latest version of WinMTR suitable for your operating system.
Launch WinMTR: After installation, open WinMTR from the location where it was installed.
Enter the target destination: In the "Host" field, enter the IP address or domain name of the destination you want to test. For example, you can enter a website URL or an IP address , the domain name portion of the URL of the site where you are seeing 504 errors.
Start the test: Click on the "Start" or "Start/Stop" button to begin the test. WinMTR will start sending packets to the destination and collect data about each network hop along the way.
Copy the data or send a screenshot of the MTR to help us diagnose what server may be returning that code.


@Felexonyango
Copy link

I have tried this "dotnetAcquisitionExtension.existingDotnetPath": [
{
"extensionId": "ms-dotnettools.csharp",
"path": "C:\Program Files\dotnet\dotnet.exe"
}
] as @dibarbet said , nothing is working .

@cmargroff
Copy link

The problem I'm having is that the installation is not completing due to group policy limiting PS1 file execution but even installing 7.0.9 runtime manually resolve the issue, it still attempts to install.

Setting the path manually in the settings file causes the extension to basically disable. The omnisharp status and selected project do not appear in the status bar after setting the path.

@timheuer
Copy link
Member

timheuer commented Aug 5, 2023

Setting the path manually in the settings file causes the extension to basically disable. The omnisharp status and selected project do not appear in the status bar after setting the path.

@cmargroff I wouldn't expect you to see specific OmniSharp status unless you've followed this: https://github.com/dotnet/vscode-csharp#how-to-use-omnisharp?

@coderade
Copy link

coderade commented Aug 7, 2023

Same problem here, I am having problem acquiring the .net version 7.0.9 in a proxied environment in a client, as I can not do anything besides opening a ticket to solve the proxy issue, I was trying to disable the Downloading of this new .Net Runtime version and use one of the versions I already have.

But, setting the version using the latest one I have 7.0.306 with the recommended settings make the extensions being disabled or stuck:

when I set in my settings.json:

"dotnetAcquisitionExtension.existingDotnetPath": [
  {
    "extensionId": "ms-dotnettools.csharp",
    "path": "/home/user/.dotnet/dotnet"
  }
]

I receive the following output from the .Net Runtime:

Downloading the .Net Runtime.
Using configured .Net path: /home/user/.dotnet/dotnet

And nothing happens, the extension stop to works.

@dibarbet
Copy link
Member

dibarbet commented Aug 7, 2023

But, setting the version using the latest one I have 7.0.306 with the recommended settings make the extensions being disabled or stuck:

Can you share the output of the C# log (with the dotnet.server.trace setting to Trace if possible)? It's possible you're encountering a project load issue.

@coderade
Copy link

coderade commented Aug 7, 2023

Thanks for the reply @dibarbet. Unfortunately, even with the following options in my settings.json file:

"dotnetAcquisitionExtension.existingDotnetPath": [
 {
   "extensionId": "ms-dotnettools.csharp",
   "path": "/home/user/.dotnet/dotnet"
 }
]
"razor.trace": "Verbose",
"dotnet.server.trace": "Trace"

I do not see any changes on the .Net runtime output:

Downloading the .Net Runtime.
Using configured .Net path: /home/user/.dotnet/dotnet

@nagilson
Copy link
Member

nagilson commented Aug 7, 2023

@coderade Please attach the log that @dibarbet had suggested. The output is telling you that it is using your custom path, so it did change the behavior and output. The output you showed is not trying to acquire dotnet anymore. What is the problem you are experiencing? I'm guessing it may be an issue of the C# Extension to pick up this configured dotnet path if you are still experiencing an issue.

@dibarbet
Copy link
Member

dibarbet commented Aug 7, 2023

Specifically, I'm looking for these logs from the output window
image

@forfcw
Copy link

forfcw commented Aug 8, 2023

@dibarbet #6029 (comment)
Does it mean I need to download every update? .net7? .net 8?
I just want to use a fixed version of the runtime to work, why do I need to download every?

@Jss-Jss
Copy link

Jss-Jss commented Aug 8, 2023

image
image

@dibarbet even installing 7.0.9 runtime manually resolve the issue, it still attempts to download everytime.

@dibarbet
Copy link
Member

dibarbet commented Aug 8, 2023

image image

@dibarbet even installing 7.0.9 runtime manually resolve the issue, it still attempts to download everytime.

@nagilson this seems unexpected right? It looks like it found the dotnet path from the option, but its still downloading the runtime

@dibarbet
Copy link
Member

dibarbet commented Aug 8, 2023

Does it mean I need to download every update? .net7? .net 8?

The server is currently fixed on the .net7 runtime. It is likely we'll eventually update it to the .net 8 runtime, but not on every preview release for example. Generally we will continue to (slowly) update the server runtime to pick up important bug fixes, perf improvements and security fixes.

@forfcw
Copy link

forfcw commented Aug 8, 2023

Does it mean I need to download every update? .net7? .net 8?

The server is currently fixed on the .net7 runtime. It is likely we'll eventually update it to the .net 8 runtime, but not on every preview release for example. Generally we will continue to (slowly) update the server runtime to pick up important bug fixes, perf improvements and security fixes.

So the result is that if I don't choose to upgrade, this error will pop up every time I load cs project.
This doesn't seem very friendly, at least there's no way to close it.

@elliotrask
Copy link

I got rid of this by setting the dotnet.dotnetPath in the settings.json file

"dotnet.dotnetPath": "/usr/local/share/dotnet",

@coderade
Copy link

coderade commented Aug 8, 2023

For me checking the logs it is working after setting:

"dotnetAcquisitionExtension.existingDotnetPath": [
  {
    "extensionId": "ms-dotnettools.csharp",
    "path": "/home/user/.dotnet/dotnet"
  }
]

Checking the C# logs everything is working properly, but I do not know why but the C# support was taking more time to works than the normal, but I think can be something in my machine side. Thanks!

@dibarbet
Copy link
Member

@mi1890 (and anyone else who is interested) - we recently released a prerelease version of the extension that will attempt to use the dotnet version on your path (if it matches) instead of delegating to the runtime installer.

You can get to it via the 'switch to pre-release' button here
image

@mi1890
Copy link

mi1890 commented Aug 15, 2023

sadly,still not working

image

image

my setting:
"dotnet.dotnetPath": "/usr/local/share/dotnet/",
"dotnetAcquisitionExtension.existingDotnetPath": [
{
"extensionId": "ms-dotnettools.csharp",
"path": "/usr/local/share/dotnet/"
},
{
"extensionId": "ms-dotnettools.csdevkit",
"path": "/usr/local/share/dotnet/"
}
]

@mi1890
Copy link

mi1890 commented Aug 15, 2023

and i have tryed this
"dotnet.dotnetPath": "/usr/local/share/dotnet/",
"dotnetAcquisitionExtension.existingDotnetPath": [
{
"extensionId": "ms-dotnettools.csharp",
"path": "/usr/local/share/dotnet/dotnet"
},
{
"extensionId": "ms-dotnettools.csdevkit",
"path": "/usr/local/share/dotnet/dotnet"
}
]

as same result

@nagilson
Copy link
Member

@mi1890 Do you have version 1.7.0 of the .net install tool / runtime extension? if so, when it errors out, itd be really helpful if you could attach the log it produces and send it to us. (keep in mind any private data that may need to be removed from the log)

cc @baronfel

@dibarbet
Copy link
Member

dibarbet commented Aug 15, 2023

@mi1890 please also post the C# output window log (please set dotnet.server.trace to Trace in settings and reload) so I can take a look at why its still attempting to download the runtime.

@mi1890
Copy link

mi1890 commented Aug 15, 2023

2023-08-16 01:31:29.265 [info] ExtensionService#_doActivateExtension ms-dotnettools.vscode-dotnet-runtime, startup: true, activationEvent: 'workspaceContains:/*.csproj', root cause: ms-dotnettools.csdevkit
2023-08-16 01:31:29.426 [info] ExtensionService#_doActivateExtension ms-dotnettools.csharp, startup: true, activationEvent: 'workspaceContains:
/.csproj', root cause: ms-dotnettools.csdevkit
2023-08-16 01:31:29.426 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '
'
2023-08-16 01:31:29.427 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: ''
2023-08-16 01:31:29.557 [info] ExtensionService#_doActivateExtension vscode.github-authentication, startup: false, activationEvent: 'onAuthenticationRequest:github'
2023-08-16 01:31:29.656 [info] ExtensionService#_doActivateExtension ms-dotnettools.csdevkit, startup: true, activationEvent: 'workspaceContains:**/
.csproj'
2023-08-16 01:31:29.681 [info] ExtensionService#_doActivateExtension vscode.microsoft-authentication, startup: false, activationEvent: 'onAuthenticationRequest:microsoft'
2023-08-16 01:31:29.766 [info] ExtensionService#_doActivateExtension visualstudiotoolsforunity.vstuc, startup: true, activationEvent: 'workspaceContains:**/Packages/manifest.json'
2023-08-16 01:31:29.771 [info] ExtensionService#_doActivateExtension ms-dotnettools.vscodeintellicode-csharp, startup: false, activationEvent: 'api', root cause: ms-dotnettools.csharp
2023-08-16 01:31:29.813 [info] Eager extensions activated

2023-08-16 01:32:30.263 [info] ExtensionService#_doActivateExtension ms-dotnettools.vscode-dotnet-runtime, startup: true, activationEvent: 'workspaceContains:/.{csproj,sln,slnf,csx,cake}', root cause: ms-dotnettools.csharp
2023-08-16 01:32:30.294 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '
'
2023-08-16 01:32:30.294 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*'
2023-08-16 01:32:30.355 [info] ExtensionService#_doActivateExtension ms-dotnettools.csharp, startup: true, activationEvent: 'workspaceContains:
/.{csproj,sln,slnf,csx,cake}'
2023-08-16 01:32:30.573 [info] ExtensionService#_doActivateExtension vscode.github-authentication, startup: false, activationEvent: 'onAuthenticationRequest:github'
2023-08-16 01:32:30.633 [info] ExtensionService#_doActivateExtension ms-dotnettools.csdevkit, startup: true, activationEvent: 'workspaceContains:**/
.csproj'
2023-08-16 01:32:30.655 [info] ExtensionService#_doActivateExtension vscode.microsoft-authentication, startup: false, activationEvent: 'onAuthenticationRequest:microsoft'
2023-08-16 01:32:30.676 [info] ExtensionService#_doActivateExtension visualstudiotoolsforunity.vstuc, startup: true, activationEvent: 'workspaceContains:**/Packages/manifest.json'
2023-08-16 01:32:30.680 [info] ExtensionService#_doActivateExtension ms-dotnettools.vscodeintellicode-csharp, startup: false, activationEvent: 'api', root cause: ms-dotnettools.csharp

only these logs are related

@mi1890
Copy link

mi1890 commented Aug 15, 2023

dotnet runtime log:
Downloading the .NET Runtime.
Downloading .NET version(s) 7.0.10 ...................

c# log:

Dotnet path: /usr/local/share/dotnet/dotnet
Activating C# + C# Dev Kit + C# IntelliCode...
Starting server at /Users/***/.vscode/extensions/ms-dotnettools.csharp-2.0.366-darwin-arm64/.roslyn/Microsoft.CodeAnalysis.LanguageServer.dll
dbug: LanguageServerWorkspaceFactory[0]

[Info - 01:32:32] [Program]Language server initialized
[LanguageServerHost][05:32:32.872][Start]initialize
[LanguageServerHost][05:32:32.873][Start]Initialize
[LanguageServerHost][05:32:32.933][End]Initialize
[LanguageServerHost][05:32:32.950][End]initialize
[LanguageServerHost][05:32:32.960][Start]initialized
[LanguageServerHost][05:32:33.012][End]initialized
[LanguageServerHost][05:32:33.024][Start]workspace/diagnostic
[LanguageServerHost]PublicWorkspacePullDiagnosticsHandler(category: ) started getting diagnostics
[LanguageServerHost]previousResults.Length=0
[LanguageServerHost]Processing 0 documents
[LanguageServerHost][05:32:39.515][Start]workspace/didChangeConfiguration
[LanguageServerHost][05:32:39.517][End]workspace/didChangeConfiguration

c# devkit log:
Starting Open a solution...
Starting Open a solution with environment service...
Starting Clear environment...
Starting Spawn .NET server...

c# lsp trace log:
Extension vscode.bat does not contribute csharpExtensionLoadPaths
Extension vscode.clojure does not contribute csharpExtensionLoadPaths
Extension vscode.coffeescript does not contribute csharpExtensionLoadPaths
Extension vscode.configuration-editing does not contribute csharpExtensionLoadPaths
Extension vscode.cpp does not contribute csharpExtensionLoadPaths
Extension vscode.csharp does not contribute csharpExtensionLoadPaths
Extension vscode.css does not contribute csharpExtensionLoadPaths
Extension vscode.css-language-features does not contribute csharpExtensionLoadPaths
Extension vscode.dart does not contribute csharpExtensionLoadPaths
Extension vscode.debug-auto-launch does not contribute csharpExtensionLoadPaths
Extension vscode.debug-server-ready does not contribute csharpExtensionLoadPaths
Extension vscode.diff does not contribute csharpExtensionLoadPaths
Extension vscode.docker does not contribute csharpExtensionLoadPaths
Extension vscode.emmet does not contribute csharpExtensionLoadPaths
Extension vscode.extension-editing does not contribute csharpExtensionLoadPaths
Extension vscode.fsharp does not contribute csharpExtensionLoadPaths
Extension vscode.git does not contribute csharpExtensionLoadPaths
Extension vscode.git-base does not contribute csharpExtensionLoadPaths
Extension vscode.github does not contribute csharpExtensionLoadPaths
Extension vscode.github-authentication does not contribute csharpExtensionLoadPaths
Extension vscode.go does not contribute csharpExtensionLoadPaths
Extension vscode.groovy does not contribute csharpExtensionLoadPaths
Extension vscode.grunt does not contribute csharpExtensionLoadPaths
Extension vscode.gulp does not contribute csharpExtensionLoadPaths
Extension vscode.handlebars does not contribute csharpExtensionLoadPaths
Extension vscode.hlsl does not contribute csharpExtensionLoadPaths
Extension vscode.html does not contribute csharpExtensionLoadPaths
Extension vscode.html-language-features does not contribute csharpExtensionLoadPaths
Extension vscode.ini does not contribute csharpExtensionLoadPaths
Extension vscode.ipynb does not contribute csharpExtensionLoadPaths
Extension vscode.jake does not contribute csharpExtensionLoadPaths
Extension vscode.java does not contribute csharpExtensionLoadPaths
Extension vscode.javascript does not contribute csharpExtensionLoadPaths
Extension vscode.json does not contribute csharpExtensionLoadPaths
Extension vscode.json-language-features does not contribute csharpExtensionLoadPaths
Extension vscode.julia does not contribute csharpExtensionLoadPaths
Extension vscode.latex does not contribute csharpExtensionLoadPaths
Extension vscode.less does not contribute csharpExtensionLoadPaths
Extension vscode.log does not contribute csharpExtensionLoadPaths
Extension vscode.lua does not contribute csharpExtensionLoadPaths
Extension vscode.make does not contribute csharpExtensionLoadPaths
Extension vscode.markdown does not contribute csharpExtensionLoadPaths
Extension vscode.markdown-language-features does not contribute csharpExtensionLoadPaths
Extension vscode.markdown-math does not contribute csharpExtensionLoadPaths
Extension vscode.media-preview does not contribute csharpExtensionLoadPaths
Extension vscode.merge-conflict does not contribute csharpExtensionLoadPaths
Extension vscode.microsoft-authentication does not contribute csharpExtensionLoadPaths
Extension ms-vscode.js-debug does not contribute csharpExtensionLoadPaths
Extension ms-vscode.js-debug-companion does not contribute csharpExtensionLoadPaths
Extension ms-vscode.vscode-js-profile-table does not contribute csharpExtensionLoadPaths
Extension vscode.builtin-notebook-renderers does not contribute csharpExtensionLoadPaths
Extension vscode.npm does not contribute csharpExtensionLoadPaths
Extension vscode.objective-c does not contribute csharpExtensionLoadPaths
Extension vscode.perl does not contribute csharpExtensionLoadPaths
Extension vscode.php does not contribute csharpExtensionLoadPaths
Extension vscode.php-language-features does not contribute csharpExtensionLoadPaths
Extension vscode.powershell does not contribute csharpExtensionLoadPaths
Extension vscode.pug does not contribute csharpExtensionLoadPaths
Extension vscode.python does not contribute csharpExtensionLoadPaths
Extension vscode.r does not contribute csharpExtensionLoadPaths
Extension vscode.razor does not contribute csharpExtensionLoadPaths
Extension vscode.references-view does not contribute csharpExtensionLoadPaths
Extension vscode.restructuredtext does not contribute csharpExtensionLoadPaths
Extension vscode.ruby does not contribute csharpExtensionLoadPaths
Extension vscode.rust does not contribute csharpExtensionLoadPaths
Extension vscode.scss does not contribute csharpExtensionLoadPaths
Extension vscode.search-result does not contribute csharpExtensionLoadPaths
Extension vscode.shaderlab does not contribute csharpExtensionLoadPaths
Extension vscode.shellscript does not contribute csharpExtensionLoadPaths
Extension vscode.simple-browser does not contribute csharpExtensionLoadPaths
Extension vscode.sql does not contribute csharpExtensionLoadPaths
Extension vscode.swift does not contribute csharpExtensionLoadPaths
Extension vscode.theme-abyss does not contribute csharpExtensionLoadPaths
Extension vscode.theme-defaults does not contribute csharpExtensionLoadPaths
Extension vscode.theme-kimbie-dark does not contribute csharpExtensionLoadPaths
Extension vscode.theme-monokai does not contribute csharpExtensionLoadPaths
Extension vscode.theme-monokai-dimmed does not contribute csharpExtensionLoadPaths
Extension vscode.theme-quietlight does not contribute csharpExtensionLoadPaths
Extension vscode.theme-red does not contribute csharpExtensionLoadPaths
Extension vscode.vscode-theme-seti does not contribute csharpExtensionLoadPaths
Extension vscode.theme-solarized-dark does not contribute csharpExtensionLoadPaths
Extension vscode.theme-solarized-light does not contribute csharpExtensionLoadPaths
Extension vscode.theme-tomorrow-night-blue does not contribute csharpExtensionLoadPaths
Extension vscode.typescript does not contribute csharpExtensionLoadPaths
Extension vscode.typescript-language-features does not contribute csharpExtensionLoadPaths
Extension vscode.vb does not contribute csharpExtensionLoadPaths
Extension vscode.xml does not contribute csharpExtensionLoadPaths
Extension vscode.yaml does not contribute csharpExtensionLoadPaths
Extension Anjali.clipboard-history does not contribute csharpExtensionLoadPaths
Extension azemoh.one-monokai does not contribute csharpExtensionLoadPaths
Extension christian-kohler.path-intellisense does not contribute csharpExtensionLoadPaths
Extension Dart-Code.dart-code does not contribute csharpExtensionLoadPaths
Extension Dart-Code.flutter does not contribute csharpExtensionLoadPaths
Extension eamodio.gitlens does not contribute csharpExtensionLoadPaths
Extension ecmel.vscode-html-css does not contribute csharpExtensionLoadPaths
Extension GitHub.codespaces does not contribute csharpExtensionLoadPaths
Extension GitHub.copilot does not contribute csharpExtensionLoadPaths
Extension GitHub.copilot-chat does not contribute csharpExtensionLoadPaths
Extension GrapeCity.gc-excelviewer does not contribute csharpExtensionLoadPaths
Extension janisdd.vscode-edit-csv does not contribute csharpExtensionLoadPaths
Extension k--kato.docomment does not contribute csharpExtensionLoadPaths
Extension kisstkondoros.vscode-gutter-preview does not contribute csharpExtensionLoadPaths
Extension marcelovelasquez.flutter-tree does not contribute csharpExtensionLoadPaths
Extension MS-CEINTL.vscode-language-pack-zh-hans does not contribute csharpExtensionLoadPaths
Extension ms-dotnettools.csdevkit does not contribute csharpExtensionLoadPaths
Extension ms-dotnettools.csharp does not contribute csharpExtensionLoadPaths
Extension ms-dotnettools.vscode-dotnet-runtime does not contribute csharpExtensionLoadPaths
Extension ms-dotnettools.vscodeintellicode-csharp does not contribute csharpExtensionLoadPaths
Extension ms-vscode-remote.remote-ssh does not contribute csharpExtensionLoadPaths
Extension ms-vscode-remote.remote-ssh-edit does not contribute csharpExtensionLoadPaths
Extension ms-vscode-remote.remote-wsl does not contribute csharpExtensionLoadPaths
Extension ms-vscode.cmake-tools does not contribute csharpExtensionLoadPaths
Extension ms-vscode.cpptools does not contribute csharpExtensionLoadPaths
Extension ms-vscode.cpptools-extension-pack does not contribute csharpExtensionLoadPaths
Extension ms-vscode.hexeditor does not contribute csharpExtensionLoadPaths
Extension ms-vscode.powershell does not contribute csharpExtensionLoadPaths
Extension ms-vscode.remote-explorer does not contribute csharpExtensionLoadPaths
Extension msjsdiag.vscode-react-native does not contribute csharpExtensionLoadPaths
Extension naumovs.color-highlight does not contribute csharpExtensionLoadPaths
Extension peterj.proto does not contribute csharpExtensionLoadPaths
Extension PKief.material-icon-theme does not contribute csharpExtensionLoadPaths
Extension redhat.vscode-yaml does not contribute csharpExtensionLoadPaths
Extension ritwickdey.LiveServer does not contribute csharpExtensionLoadPaths
Extension slevesque.shader does not contribute csharpExtensionLoadPaths
Extension tomoki1207.pdf does not contribute csharpExtensionLoadPaths
Extension twxs.cmake does not contribute csharpExtensionLoadPaths
Extension VisualStudioExptTeam.intellicode-api-usage-examples does not contribute csharpExtensionLoadPaths
Extension VisualStudioExptTeam.vscodeintellicode does not contribute csharpExtensionLoadPaths
Extension visualstudiotoolsforunity.vstuc does not contribute csharpExtensionLoadPaths
Extension vscode-icons-team.vscode-icons does not contribute csharpExtensionLoadPaths
Extension yzhang.markdown-all-in-one does not contribute csharpExtensionLoadPaths
Extension zxh404.vscode-proto3 does not contribute csharpExtensionLoadPaths
[Trace - 01:32:32] Sending notification 'initialized'.
Params: {}

[Trace - 01:32:32] Sending request 'workspace/diagnostic - (1)'.
Params: {
"previousResultIds": [],
"partialResultToken": "0e07535b-5a63-405b-ae26-e9954b88bb25"
}

[Trace - 01:32:32] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost][05:32:32.950][End]initialize"
}

[Trace - 01:32:32] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost][05:32:32.960][Start]initialized"
}

[Trace - 01:32:32] Received request 'client/registerCapability - (2)'.
Params: {
"registrations": [
{
"id": "ede3c76c-48f2-4ccd-afd8-13b59e0ce4fb",
"method": "workspace/didChangeConfiguration"
}
]
}

[Trace - 01:32:32] Sending response 'client/registerCapability - (2)'. Processing request took 0ms
No result returned.

[Trace - 01:32:32] Received request 'workspace/configuration - (3)'.
Params: {
"items": [
{
"section": "csharp|symbol_search.dotnet_search_reference_assemblies"
},
{
"section": "visual_basic|symbol_search.dotnet_search_reference_assemblies"
},
{
"section": "csharp|implement_type.dotnet_insertion_behavior"
},
{
"section": "visual_basic|implement_type.dotnet_insertion_behavior"
},
{
"section": "csharp|implement_type.dotnet_property_generation_behavior"
},
{
"section": "visual_basic|implement_type.dotnet_property_generation_behavior"
},
{
"section": "csharp|completion.dotnet_show_name_completion_suggestions"
},
{
"section": "visual_basic|completion.dotnet_show_name_completion_suggestions"
},
{
"section": "csharp|completion.dotnet_provide_regex_completions"
},
{
"section": "visual_basic|completion.dotnet_provide_regex_completions"
},
{
"section": "csharp|completion.dotnet_show_completion_items_from_unimported_namespaces"
},
{
"section": "visual_basic|completion.dotnet_show_completion_items_from_unimported_namespaces"
},
{
"section": "csharp|quick_info.dotnet_show_remarks_in_quick_info"
},
{
"section": "visual_basic|quick_info.dotnet_show_remarks_in_quick_info"
},
{
"section": "navigation.dotnet_navigate_to_decompiled_sources"
},
{
"section": "csharp|highlighting.dotnet_highlight_related_json_components"
},
{
"section": "visual_basic|highlighting.dotnet_highlight_related_json_components"
},
{
"section": "csharp|highlighting.dotnet_highlight_related_regex_components"
},
{
"section": "visual_basic|highlighting.dotnet_highlight_related_regex_components"
},
{
"section": "csharp|inlay_hints.dotnet_enable_inlay_hints_for_parameters"
},
{
"section": "visual_basic|inlay_hints.dotnet_enable_inlay_hints_for_parameters"
},
{
"section": "csharp|inlay_hints.dotnet_enable_inlay_hints_for_literal_parameters"
},
{
"section": "visual_basic|inlay_hints.dotnet_enable_inlay_hints_for_literal_parameters"
},
{
"section": "csharp|inlay_hints.dotnet_enable_inlay_hints_for_indexer_parameters"
},
{
"section": "visual_basic|inlay_hints.dotnet_enable_inlay_hints_for_indexer_parameters"
},
{
"section": "csharp|inlay_hints.dotnet_enable_inlay_hints_for_object_creation_parameters"
},
{
"section": "visual_basic|inlay_hints.dotnet_enable_inlay_hints_for_object_creation_parameters"
},
{
"section": "csharp|inlay_hints.dotnet_enable_inlay_hints_for_other_parameters"
},
{
"section": "visual_basic|inlay_hints.dotnet_enable_inlay_hints_for_other_parameters"
},
{
"section": "csharp|inlay_hints.dotnet_suppress_inlay_hints_for_parameters_that_differ_only_by_suffix"
},
{
"section": "visual_basic|inlay_hints.dotnet_suppress_inlay_hints_for_parameters_that_differ_only_by_suffix"
},
{
"section": "csharp|inlay_hints.dotnet_suppress_inlay_hints_for_parameters_that_match_method_intent"
},
{
"section": "visual_basic|inlay_hints.dotnet_suppress_inlay_hints_for_parameters_that_match_method_intent"
},
{
"section": "csharp|inlay_hints.dotnet_suppress_inlay_hints_for_parameters_that_match_argument_name"
},
{
"section": "visual_basic|inlay_hints.dotnet_suppress_inlay_hints_for_parameters_that_match_argument_name"
},
{
"section": "csharp|inlay_hints.csharp_enable_inlay_hints_for_types"
},
{
"section": "visual_basic|inlay_hints.csharp_enable_inlay_hints_for_types"
},
{
"section": "csharp|inlay_hints.csharp_enable_inlay_hints_for_implicit_variable_types"
},
{
"section": "visual_basic|inlay_hints.csharp_enable_inlay_hints_for_implicit_variable_types"
},
{
"section": "csharp|inlay_hints.csharp_enable_inlay_hints_for_lambda_parameter_types"
},
{
"section": "visual_basic|inlay_hints.csharp_enable_inlay_hints_for_lambda_parameter_types"
},
{
"section": "csharp|inlay_hints.csharp_enable_inlay_hints_for_implicit_object_creation"
},
{
"section": "visual_basic|inlay_hints.csharp_enable_inlay_hints_for_implicit_object_creation"
},
{
"section": "csharp|code_style.formatting.indentation_and_spacing.tab_width"
},
{
"section": "visual_basic|code_style.formatting.indentation_and_spacing.tab_width"
},
{
"section": "csharp|code_style.formatting.indentation_and_spacing.indent_size"
},
{
"section": "visual_basic|code_style.formatting.indentation_and_spacing.indent_size"
},
{
"section": "csharp|code_style.formatting.indentation_and_spacing.indent_style"
},
{
"section": "visual_basic|code_style.formatting.indentation_and_spacing.indent_style"
},
{
"section": "csharp|code_style.formatting.new_line.end_of_line"
},
{
"section": "visual_basic|code_style.formatting.new_line.end_of_line"
},
{
"section": "code_style.formatting.new_line.insert_final_newline"
},
{
"section": "csharp|background_analysis.dotnet_analyzer_diagnostics_scope"
},
{
"section": "visual_basic|background_analysis.dotnet_analyzer_diagnostics_scope"
},
{
"section": "csharp|background_analysis.dotnet_compiler_diagnostics_scope"
},
{
"section": "visual_basic|background_analysis.dotnet_compiler_diagnostics_scope"
},
{
"section": "csharp|code_lens.dotnet_enable_references_code_lens"
},
{
"section": "visual_basic|code_lens.dotnet_enable_references_code_lens"
},
{
"section": "csharp|code_lens.dotnet_enable_tests_code_lens"
},
{
"section": "visual_basic|code_lens.dotnet_enable_tests_code_lens"
}
]
}

[Trace - 01:32:32] Sending response 'workspace/configuration - (3)'. Processing request took 2ms
Result: [
true,
null,
"withOtherMembersOfTheSameKind",
null,
"preferThrowingProperties",
null,
"true",
null,
"true",
null,
true,
null,
"true",
null,
"true",
"true",
null,
"true",
null,
false,
null,
false,
null,
false,
null,
false,
null,
false,
null,
false,
null,
false,
null,
false,
null,
false,
null,
false,
null,
false,
null,
false,
null,
4,
null,
4,
null,
"space",
null,
"auto",
null,
false,
"openFiles",
null,
"openFiles",
null,
true,
null,
true,
null
]

[Trace - 01:32:33] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost][05:32:33.012][End]initialized"
}

[Trace - 01:32:33] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost][05:32:33.024][Start]workspace/diagnostic"
}

[Trace - 01:32:33] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost]PublicWorkspacePullDiagnosticsHandler(category: ) started getting diagnostics"
}

[Trace - 01:32:33] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost]previousResults.Length=0"
}

[Trace - 01:32:33] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost]Processing 0 documents"
}

@mi1890
Copy link

mi1890 commented Aug 15, 2023

image

it's so strange.....
i set
"dotnetAcquisitionExtension.installTimeoutValue": 60000,

and after a very long time .....almost one hour .....
it's downloaded finished.
and now i can use vscdoe to write c# on mac again .....
but i still want to know why custom dotnet path is not working ....

@dibarbet
Copy link
Member

Thanks for the logs - they're helpful. So it looks like the C# extension is actually successfully using the dotnet.dotnetPath that you specified in the settings instead of using the .net runtime extension, but the C# devkit extension is still triggering the runtime download. C# devkit does not yet support loading dotnet from the path, but it is planned for an upcoming release.

I'm not sure why though the dotnetAcquisitionExtension.existingDotnetPath is not working for devkit - I'll leave that to @nagilson to take a look.

@mi1890
Copy link

mi1890 commented Aug 15, 2023

thanks for your reply
i'm glad that my log is helpful

and for the guys who cannot donwload success,
you can set "dotnetAcquisitionExtension.installTimeoutValue": 60000,
set a long timeout value will be helpful sometimes

@Kidsunbo
Copy link

Why not remove auto download feature and use the installed one? Maybe keep the install tool extension as a stand alone optional one for users who want auto download feature.

@kbegiedza
Copy link

Workaround described above doesn't work

C# Output still shows:

Failed to find dotnet info from path, falling back to acquire runtime via ms-dotnettools.vscode-dotnet-runtime
Found dotnet version 7.0.10. Minimum required version is 7.0.100.
Dotnet path: /home/vscode/.dotnet/dotnet
Activating C# + C# Dev Kit + C# IntelliCode...
[Info  - 10:44:34 AM] [Program]Language server initialized

but .NET Runtime is using correct version of dotnet

Downloading the .NET Runtime.
Using configured .NET path: /home/vscode/.dotnet/dotnet
.NET SDK:
 Version:   7.0.400
 Commit:    73bf45718d

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  22.04
 OS Platform: Linux
 RID:         ubuntu.22.04-x64
 Base Path:   /home/vscode/.dotnet/sdk/7.0.400/

Host:
  Version:      7.0.10
  Architecture: x64
  Commit:       a6dbb800a4

.NET SDKs installed:
  7.0.400 [/home/vscode/.dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 7.0.10 [/home/vscode/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 7.0.10 [/home/vscode/.dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/home/vscode/.dotnet]

global.json file:
  Not found

@tmitchel2
Copy link

I think perhaps the SDK version and the Runtime versions are getting conflated... In my logs I have the following...

Failed to find dotnet info from path, falling back to acquire runtime via ms-dotnettools.vscode-dotnet-runtime
Found dotnet version 7.0.10. Minimum required version is 7.0.100.

@coreyperkins
Copy link

coreyperkins commented Aug 18, 2023

Workaround described above doesn't work

C# Output still shows:

Failed to find dotnet info from path, falling back to acquire runtime via ms-dotnettools.vscode-dotnet-runtime
Found dotnet version 7.0.10. Minimum required version is 7.0.100.
Dotnet path: /home/vscode/.dotnet/dotnet
Activating C# + C# Dev Kit + C# IntelliCode...
[Info  - 10:44:34 AM] [Program]Language server initialized

but .NET Runtime is using correct version of dotnet

Downloading the .NET Runtime.
Using configured .NET path: /home/vscode/.dotnet/dotnet
.NET SDK:
 Version:   7.0.400
 Commit:    73bf45718d

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  22.04
 OS Platform: Linux
 RID:         ubuntu.22.04-x64
 Base Path:   /home/vscode/.dotnet/sdk/7.0.400/

Host:
  Version:      7.0.10
  Architecture: x64
  Commit:       a6dbb800a4

.NET SDKs installed:
  7.0.400 [/home/vscode/.dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 7.0.10 [/home/vscode/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 7.0.10 [/home/vscode/.dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/home/vscode/.dotnet]

global.json file:
  Not found

The workaround also does not work for me. I am on an 2019 Intel Macbook Pro. I have two sdks installed with the below dotnet --info. When I load vscode I see the following and I lose code complete, navigation, etc. All the things that make the language server valuable. I have tried removing all extensions, dotnet clean/build multiple times. Not real sure how to proceed but very frustrated because it appears an extension update on 8/17 broke my ability to be productive, now I am trying to debug a tool that should just work. :P. Any ideas appreciated.

Dotnet path: /usr/local/share/dotnet/dotnet
Activating C# + C# Dev Kit + C# IntelliCode...
[Info  - 8:36:59 AM] [Program]Language server initialized
otnet --info
.NET SDK:
 Version:   7.0.400
 Commit:    73bf45718d

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  13.4
 OS Platform: Darwin
 RID:         osx.13-x64
 Base Path:   /usr/local/share/dotnet/sdk/7.0.400/

Host:
  Version:      7.0.10
  Architecture: x64
  Commit:       a6dbb800a4

.NET SDKs installed:
  6.0.413 [/usr/local/share/dotnet/sdk]
  7.0.400 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.21 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.10 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.21 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.10 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/usr/local/share/dotnet]

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

@dibarbet
Copy link
Member

I think perhaps the SDK version and the Runtime versions are getting conflated... In my logs I have the following...

Failed to find dotnet info from path, falling back to acquire runtime via ms-dotnettools.vscode-dotnet-runtime
Found dotnet version 7.0.10. Minimum required version is 7.0.100.

Thanks - this is #6167 and should be fixed in the next version we release.

@dibarbet
Copy link
Member

The workaround also does not work for me. I am on an 2019 Intel Macbook Pro. I have two sdks installed with the below dotnet --info. When I load vscode I see the following and I lose code complete, navigation, etc. All the things that make the language server valuable. I have tried removing all extensions, dotnet clean/build multiple times. Not real sure how to proceed but very frustrated because it appears an extension update on 8/17 broke my ability to be productive, now I am trying to debug a tool that should just work. :P. Any ideas appreciated.

Dotnet path: /usr/local/share/dotnet/dotnet
Activating C# + C# Dev Kit + C# IntelliCode...
[Info  - 8:36:59 AM] [Program]Language server initialized
otnet --info
.NET SDK:
 Version:   7.0.400
 Commit:    73bf45718d

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  13.4
 OS Platform: Darwin
 RID:         osx.13-x64
 Base Path:   /usr/local/share/dotnet/sdk/7.0.400/

Host:
  Version:      7.0.10
  Architecture: x64
  Commit:       a6dbb800a4

.NET SDKs installed:
  6.0.413 [/usr/local/share/dotnet/sdk]
  7.0.400 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.21 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.10 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.21 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.10 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/usr/local/share/dotnet]

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

@coreyperkins
This line in the logs you sent:

Dotnet path: /usr/local/share/dotnet/dotnet
Activating C# + C# Dev Kit + C# IntelliCode...

shows the server successfully finding a valid dotnet and starting - so we likely have a different problem here. Would you be able to file a new issue
image

with some additional information? Particularly:

  1. Set dotnet.server.trace to Trace and reload the window
  2. Run the repro
  3. Make sure the project shows up in the solution explorer pane (it looks like you're using devkit)
  4. Include (or email to me, linked in my github profile) the entire extensions logs folder (found by
    image

Particularly looking for the C# logs, Projects log, etc. because based on your symptoms it sounds like there was an issue loading the project.

@gamefish
Copy link

For those who are developing Unity games, you need to add local path to all Unity related extensions. For me they are :

"dotnetAcquisitionExtension.existingDotnetPath": [
        {
            "extensionId": "ms-dotnettools.csharp",
            "path": "/usr/local/share/dotnet/dotnet"
        },
        {
            "extensionId": "ms-dotnettools.csdevkit", 
            "path": "/usr/local/share/dotnet/dotnet"
        },
        {
            "extensionId": "visualstudiotoolsforunity.vstuc", 
            "path": "/usr/local/share/dotnet/dotnet"
        }
    
    ]

then restart vscode

@hykx
Copy link

hykx commented Jan 10, 2024

I finally solved the downloading dotnet problem by this:
the .net install tool as it's name. it is install .net sdk whenever who depends on it need. when you have an exist .net sdk and you want use it, the tool detail has already tell us the setting json:

"dotnetAcquisitionExtension.existingDotnetPath": [
        {
            "extensionId": "ms-dotnettools.csharp", 
            "path": "/usr/local/share/dotnet/dotnet"
        },
        {
            "extensionId": "ms-dotnettools.csdevkit", 
            "path": "/usr/local/share/dotnet/dotnet"
        },
        {
            "extensionId": "visualstudiotoolsforunity.vstuc", 
            "path": "/usr/local/share/dotnet/dotnet"
        }
    ]

the three extensionId represent three extensions in vscode who depends on the .net install tool, the path is your .net sdk excutable file location, you can use whereisfind it.
if you have set it and the problem still be there, please check there must be other extensions depends on the .net install tool, and you have to add it's setting in the array.

@KevinfromTJ
Copy link

for those who have no need for .NET Runtime?
I just want to explore source code of some projects, but every time I open the workspace it tries to download .NET Runtime......

@wyx-0203
Copy link

Same problem here, I am having problem acquiring the .net version 7.0.9 in a proxied environment in a client, as I can not do anything besides opening a ticket to solve the proxy issue, I was trying to disable the Downloading of this new .Net Runtime version and use one of the versions I already have.同样的问题,我在客户端的代理环境中获取 .net 版本 7.0.9 时遇到问题,因为除了开票解决代理问题之外我无能为力,我试图禁用此新版本的下载.Net 运行时版本并使用我已有的版本之一。

But, setting the version using the latest one I have 7.0.306 with the recommended settings make the extensions being disabled or stuck:但是,使用我拥有的最新版本 7.0.306 和推荐设置来设置版本会使扩展被禁用或卡住:

when I set in my settings.json:当我设置 settings.json 时:

"dotnetAcquisitionExtension.existingDotnetPath": [
  {
    "extensionId": "ms-dotnettools.csharp",
    "path": "/home/user/.dotnet/dotnet"
  }
]

I receive the following output from the .Net Runtime:我从 .Net 运行时收到以下输出:

Downloading the .Net Runtime.
Using configured .Net path: /home/user/.dotnet/dotnet

And nothing happens, the extension stop to works.什么也没有发生,扩展停止工作。

My mistake was exactly the same as yours, until the usr/local/bin/dotnet was removed and the unity extension worked fine. (This is a shortcut that is no longer valid)

@dibarbet
Copy link
Member

Closing - we've made a number of improvements to both the dotnet resolution and runtime download of dotnet since this was filed. If you're still having issues on the latest version of the extension, please file a new issue (with C# logs and general reproduction steps).

@EmreKabali
Copy link

I finally solved the downloading dotnet problem by this: the .net install tool as it's name. it is install .net sdk whenever who depends on it need. when you have an exist .net sdk and you want use it, the tool detail has already tell us the setting json:

"dotnetAcquisitionExtension.existingDotnetPath": [
        {
            "extensionId": "ms-dotnettools.csharp", 
            "path": "/usr/local/share/dotnet/dotnet"
        },
        {
            "extensionId": "ms-dotnettools.csdevkit", 
            "path": "/usr/local/share/dotnet/dotnet"
        },
        {
            "extensionId": "visualstudiotoolsforunity.vstuc", 
            "path": "/usr/local/share/dotnet/dotnet"
        }
    ]

the three extensionId represent three extensions in vscode who depends on the .net install tool, the path is your .net sdk excutable file location, you can use whereisfind it. if you have set it and the problem still be there, please check there must be other extensions depends on the .net install tool, and you have to add it's setting in the array.

Thank you dude. this is correct answer .

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

No branches or pull requests