vscode-csharp
vscode-csharp copied to clipboard
Why do you always fail to donwload with new version 2.0
Hi @heartacker can I assume based on the dialog you are in mainland China region?
See https://github.com/microsoft/vscode-dotnettools/issues/186 where we had one other report. We’ve been unable to reproduce this.
i have install the runtime,why do you always try to down load again and again
why not use the installed version
@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.
re @dibarbet 's comment:
@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"
}
]
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:
- Public IP (visit https://ipinfo.io/)
- HAR file while the issue occurs
- MTR (100 count) to "dotnetcli.azureedge.net" (excluding quotations)
- Visit/provide us the results from http://wpc.2dcc.edgecastcdn.net/002DCC/n2/
- 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.
I have tried this "dotnetAcquisitionExtension.existingDotnetPath": [ { "extensionId": "ms-dotnettools.csharp", "path": "C:\Program Files\dotnet\dotnet.exe" } ] as @dibarbet said , nothing is working .
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.
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?
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.
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.
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
@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.
Specifically, I'm looking for these logs from the output window
@dibarbet https://github.com/dotnet/vscode-csharp/issues/6029#issuecomment-1665996087 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?
@dibarbet even installing 7.0.9 runtime manually resolve the issue, it still attempts to download everytime.
![]()
@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
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.
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.
I got rid of this by setting the dotnet.dotnetPath
in the settings.json
file
"dotnet.dotnetPath": "/usr/local/share/dotnet",
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!
Whatever I set, it still tries to download the .net SDK. on Mac
Also on MacOS 13.4, setting the values below suppressed the download
"dotnet.dotnetPath": "/usr/local/share/dotnet/",
"dotnetAcquisitionExtension.existingDotnetPath": [
{
"extensionId": "ms-dotnettools.csharp",
"path": "/usr/local/share/dotnet/"
}
]
But did nothing for code completion or roslyn activation. Unity debugging is still a hopeless endeavor
I got the same issue.
I've already installed dotnet7.0.10
at /usr/share/dotnet/
but every time I run vscode
it start installing the dotnet,
even though I've set the "dotnet.dotnetPath": "/usr/share/dotnet/"
as well as
"dotnetAcquisitionExtension.existingDotnetPath": [
{
"extensionId": "ms-dotnettools.csharp",
"path": "/usr/share/dotnet/" # I tried /usr/sahre/dotnet/dotnet as well but doesn't seems to work
}
And due to my network connection I guess I keeps getting me this Error
:
Info :
- I'm using
Linux
-
VsCode
latest version -
DotNet
latest version -
C# ext
pre-release version -
C# devKit
pre-release version
For everyone getting the same issue, I've solved it using the following settings (For Linux
users) :
-
Make sure you don't have
/usr/bin/dotnet
link or whatever -
If you have just remove it
sudo rm -rf /usr/bin/dotnet
-
Or check your
dotnet
path usingwhich dotnet
-
Next Install
dotnet
(if you haven't already) on whatever path you want (I have installed it on/home/me/.dotnet/
-
Set
DOTNET_ROOT
variable in~/.bashrc
or~./.zshrc
-
For me I'm using
zsh
so I've add this to my.zshrc
file :
export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
-
Now time for
vscode
, you have to editsettings.json
file ( CTRL + , ) to open the settings tab -
Then search for
dotnetAcquisitionExtension
and click onEdit in settings.json
-
Add these following lines to
settings.json
file :
"dotnetAcquisitionExtension.existingDotnetPath": [
{
"extensionId": "ms-dotnettools.csharp",
"path": "/home/me/.dotnet/dotnet"
},
{
"extensionId": "ms-dotnettools.csdevkit",
"path": "/home/me/.dotnet/dotnet"
},
],
- Restart
vscode
and everything should work just fine
Important
-
vscode
version :1.81.0
which is the latest version atm. -
C# ext
version : -
C# devKit ext
version (I'm using this extension and I think the issue was here but not sure tho): -
DotNet
info :
❯ dotnet --info
.NET SDK:
Version: 8.0.100-preview.6.23330.14
Commit: ba97796b8f
Runtime Environment:
OS Name: fedora
OS Version: 38
OS Platform: Linux
Base Path: /home/me/.dotnet/sdk/8.0.100-preview.6.23330.14/
Environment variables:
DOTNET_ROOT [/home/me/.dotnet]
![]()
@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
It uses promise.resolve() with the given string whenever it outputs 'Using Configured Runtime blah`, so it shouldn't as it would never get to the install code --> but it can be a problem if there are multiple extensions calling with different settings for the existingDotnetPath, or if the user has set it as well as the calling extension to the API. For @Jss-Jss : May you share a list of all of the extensions on your vs code?
![]()
@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
It uses promise.resolve() with the given string whenever it outputs 'Using Configured Runtime blah`, so it shouldn't as it would never get to the install code --> but it can be a problem if there are multiple extensions calling with different settings for the existingDotnetPath, or if the user has set it as well as the calling extension to the API. For @Jss-Jss : May you share a list of all of the extensions on your vs code?
@nagilson I don't think it was caused by other extensions,I've tried to uninstall and keep only the necessary for Unity,this error still pop everytime。
I've had enough of this problem. Time 2 return version C# 1.26.0, bye guys.
This problem still exists,nothing works
"dotnet.dotnetPath": "/usr/local/share/dotnet/", "dotnetAcquisitionExtension.existingDotnetPath": [ { "extensionId": "ms-dotnettools.csharp", "path": "/usr/local/share/dotnet/" } ]
A solution that worked for me was re-installing the C# extensions along with the .NET Install Tool for Ext. etc. Then from the welcome menu, downloaded the .NET SDK through the C# extension's "Walkthrough" tab. Then, applied "C:\route to dotnet folder\dotnet" to "dotnet.dotnetPath" the .NET Install Tool settings. Hope this helps some.