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

Memory exhaustion by dotnet.exe, vscode, (-vscode) #353

Open
TilKenneth opened this issue Nov 26, 2023 · 5 comments
Open

Memory exhaustion by dotnet.exe, vscode, (-vscode) #353

TilKenneth opened this issue Nov 26, 2023 · 5 comments

Comments

@TilKenneth
Copy link

So I am back again :-) I was going to to ignore this, and try with NppExec or try go to bed, but decided to try reproduce this nuisance, and I started by just clicking inside the opened file, and - it took less than 60 seconds. This writ however....

The building, running, debugging, intellisense, it all works, but with dotnet.exe forcing Windows and everything else, to be paged out of memory to a slow hdd pagefile. Not this picture, but it was at 10-12 GB (/16GB), it ate both my SSD pagefile and HDD pagefile, and I guess Windows just grew the HDD just enough to constantly alt+tab, delete (kill the task) in Taskmanger.

image

Environment for cmd.exe

SSCRIPT_INC=C:\ProgramData\cs-script\inc
CSSCRIPT_ROOT=%UserProfile%\.dotnet\tools\.store\cs-script.cli\4.8.9\cs-script.cli\4.8.9\tools\net8.0\any
CSSCRIPT_VSCODEEXE=%LocalAppData%\Programs\Microsoft VS Code\Code.exe
CSSCRIPT_VSEXE=C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe
PATH=%PATH% + %AppData%\Code\User\cs-script.user\dotnet
VS110COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\
VS120COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\
VS140COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
VSSDK140Install=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VSSDK\

dotnet.exe also has

cscs_exe_dir=%UserProfile%\.dotnet\tools\.store\cs-script.cli\4.8.9\cs-script.cli\4.8.9\tools\net8.0\any
CSS_ENTRY_ASM=%Appdata%\Code\User\cs-script.user\dotnet\cscs.dll
CSScriptRunTime=4.8.9.0
CSSRuntimeLocation=%UserProfile%\.dotnet\tools\.store\cs-script.cli\4.8.9\cs-script.cli\4.8.9\tools\net8.0\any\cscs.dll

Process tree;

wt.exe hosting cmd.exe:
D:\_TEMP\css_memory_exhaustion> css -vscode hello.cs

echo searchdir: %UserProfile%\.dotnet\tools\.store\cs-script.cli\4.8.9\cs-script.cli\4.8.9\tools\net8.0\any\lib
echo searchdir: C:\ProgramData\cs-script\commands
echo searchdir: C:\ProgramData\cs-script\inc
echo Opening script: D:\_TEMP\css_memory_exhaustion\hello.cs
cmd.exe
+ %LocalAppData%\Programs\Microsoft VS Code\Code.exe "%LocalAppData%\Programs\Microsoft VS Code\Code.exe" |"D:\_TEMP\css_memory_exhaustion\hello.cs"
\__"%LocalAppData%\Programs\Microsoft VS Code\Code.exe" --type=utility --utility-sub-type=node.mojom.NodeService --lang=en-US --service-sandbox-type=none --dns-result-order=ipv4first --inspect-port=0 --user-data-dir="%APPDATA%\Code" --standard-schemes=vscode-webview,vscode-file --enable-sandbox --secure-schemes=vscode-webview,vscode-file --bypasscsp-schemes --cors-schemes=vscode-webview,vscode-file --fetch-schemes=vscode-webview,vscode-file --service-worker-schemes=vscode-webview --streaming-schemes --mojo-platform-channel-handle=3692 --field-trial-handle=1672,i,8771258687389204597,4980786138386816727,262144 --disable-features=CalculateNativeWinOcclusion,SpareRendererForSitePerProcess,WinRetrieveSuggestionsOnlyOnDemand /prefetch:8
   |__"C:\Program Files\dotnet\dotnet.exe" dotnet %APPDATA%\Code\User\cs-script.user\dotnet\syntaxer\syntaxer.dll -port:18003 -listen -client:21584 -timeout:60000 -cscs_path:%APPDATA%\Code\User\cs-script.user\dotnet\cscs.dll

cmd.exe CurDir is D:\_TEMP\css_memory_exhaustion
Code.exe CurDir is %LocalAppData%\Programs\Microsoft VS Code\
dotnet.exe CurDir is %LocalAppData%\Programs\Microsoft VS Code\

image

image

Now I just did some sanity checks:

D:\_TEMP\css_memory_exhaustion>where css.exe
%UserProfile%\.dotnet\tools\css.exe

D:\_TEMP\css_memory_exhaustion>css.exe -v    <---------------
4.8.9.0

D:\_TEMP\css_memory_exhaustion>where cscs.exe
%UserProfile%\AppData\Roaming\Code\User\cs-script.user\dotnet\cscs.exe

D:\_TEMP\css_memory_exhaustion>cscs.exe -v    <---------------
C# Script execution engine (.NET Core). Version 4.6.2.0.
Copyright (C) 2004-2020 Oleg Shilo. www.csscript.net (github.com/oleg-shilo/cs-script)

   CLR:             7.0.14
   System:          Microsoft Windows NT 10.0.19045.0
   Architecture:    x64
   Install dir:     %UserProfile%\.dotnet\tools\.store\cs-script.cli\4.8.9\cs-script.cli\4.8.9\tools\net8.0\any
   Script engine:   %UserProfile%\AppData\Roaming\Code\User\cs-script.user\dotnet\cscs.dll
   Config file:     %UserProfile%\AppData\Roaming\Code\User\cs-script.user\dotnet\css_config.xml
   Compiler engine: dotnet (C:\Program Files\dotnet\dotnet.exe)
   NuGet manager:   dotnet
   NuGet cache:     %UserProfile%\.nuget\packages
   Custom commands: C:\ProgramData\cs-script\commands
   Global includes: C:\ProgramData\cs-script\inc




D:\_TEMP\css_memory_exhaustion>where dotnet.exe
C:\Program Files\dotnet\dotnet.exe

D:\_TEMP\css_memory_exhaustion>dotnet --version    <---------------
8.0.100

D:\_TEMP\css_memory_exhaustion>where code.exe
INFO: Could not find files for the given pattern(s).

D:\_TEMP\css_memory_exhaustion>dotnet --info    <---------------
.NET SDK:
 Version:           8.0.100
 Commit:            57efcf1350
 Workload version:  8.0.100-manifests.6a1e483a

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19045
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\8.0.100\

.NET workloads installed:
 Workload version: 8.0.100-manifests.6a1e483a
There are no installed workloads to display.

Host:
  Version:      8.0.0
  Architecture: x64
  Commit:       5535e31a71

.NET SDKs installed:
  1.0.0-preview2-003131 [C:\Program Files\dotnet\sdk]
  2.1.700 [C:\Program Files\dotnet\sdk]
  2.1.701 [C:\Program Files\dotnet\sdk]
  2.1.818 [C:\Program Files\dotnet\sdk]
  3.1.426 [C:\Program Files\dotnet\sdk]
  5.0.104 [C:\Program Files\dotnet\sdk]
  5.0.214 [C:\Program Files\dotnet\sdk]
  5.0.405 [C:\Program Files\dotnet\sdk]
  5.0.408 [C:\Program Files\dotnet\sdk]
  6.0.203 [C:\Program Files\dotnet\sdk]
  6.0.320 [C:\Program Files\dotnet\sdk]
  7.0.404 [C:\Program Files\dotnet\sdk]
  8.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.32 [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 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 1.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.32 [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 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.32 [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 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  arm64 [C:\Program Files\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\arm64\InstallLocation]
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  Not found

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

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

The other dotnet.exe (at about 100mb), CurDir at %LocalAppData%\Programs\Microsoft VS Code:

"C:\Program Files\dotnet\dotnet.exe" %UserProfile%\.vscode\extensions\ms-dotnettools.csharp-2.10.28-win32-x64\.roslyn\Microsoft.CodeAnalysis.LanguageServer.dll --logLevel Information --telemetryLevel off --extensionLogDirectory %AppData%\Code\logs\20231126T093527\window1\exthost\ms-dotnettools.csharp

SET CSScriptRunTime=4.8.9.0
SET CSSRuntimeLocation=%UserProfile%\.dotnet\tools\.store\cs-script.cli\4.8.9\cs-script.cli\4.8.9\tools\net8.0\any\cscs.dll
Get-WmiObject -Class Win32_Product -filter "name LIKE 'microsoft .net%'" | Sort-Object Name | Select-Object Name,Version | Format-Table -AutoSize
Name                                                                                Version
----                                                                                -------
Microsoft .NET 5.0 Templates 8.0.100 (x64)                                          20.6.61899
Microsoft .NET 6.0 Templates 6.0.203 (x64)                                          24.5.59963
Microsoft .NET 6.0 Templates 6.0.320 (x64)                                          24.6.59109
Microsoft .NET 6.0 Templates 8.0.100 (x64)                                          24.6.61899
Microsoft .NET 7.0 Templates 7.0.404 (x64)                                          28.7.59108
Microsoft .NET 8.0 Templates 8.0.100 (x64)                                          32.6.61899
Microsoft .NET AppHost Pack - 5.0.14 (x64)                                          40.56.30907
Microsoft .NET AppHost Pack - 5.0.14 (x64_arm)                                      40.56.30907
Microsoft .NET AppHost Pack - 5.0.14 (x64_arm64)                                    40.56.30907
Microsoft .NET AppHost Pack - 5.0.14 (x64_x86)                                      40.56.30907
Microsoft .NET AppHost Pack - 5.0.17 (x64)                                          40.68.31213
Microsoft .NET AppHost Pack - 5.0.17 (x64_arm)                                      40.68.31213
Microsoft .NET AppHost Pack - 5.0.17 (x64_arm64)                                    40.68.31213
Microsoft .NET AppHost Pack - 5.0.17 (x64_x86)                                      40.68.31213
Microsoft .NET AppHost Pack - 5.0.4 (x64)                                           40.16.29816
Microsoft .NET AppHost Pack - 5.0.4 (x64_arm)                                       40.16.29816
Microsoft .NET AppHost Pack - 5.0.4 (x64_arm64)                                     40.16.29816
Microsoft .NET AppHost Pack - 5.0.4 (x64_x86)                                       40.16.29816
Microsoft .NET AppHost Pack - 6.0.25 (x64)                                          48.100.4028
Microsoft .NET AppHost Pack - 6.0.25 (x64_arm)                                      48.100.4028
Microsoft .NET AppHost Pack - 6.0.25 (x64_arm64)                                    48.100.4028
Microsoft .NET AppHost Pack - 6.0.25 (x64_x86)                                      48.100.4028
Microsoft .NET AppHost Pack - 6.0.5 (x64)                                           48.23.40665
Microsoft .NET AppHost Pack - 6.0.5 (x64_arm)                                       48.23.40665
Microsoft .NET AppHost Pack - 6.0.5 (x64_arm64)                                     48.23.40665
Microsoft .NET AppHost Pack - 6.0.5 (x64_x86)                                       48.23.40665
Microsoft .NET AppHost Pack - 7.0.14 (x64)                                          56.56.4026
Microsoft .NET AppHost Pack - 7.0.14 (x64_arm)                                      56.56.4026
Microsoft .NET AppHost Pack - 7.0.14 (x64_arm64)                                    56.56.4026
Microsoft .NET AppHost Pack - 7.0.14 (x64_x86)                                      56.56.4026
Microsoft .NET AppHost Pack - 8.0.0 (x64)                                           64.0.4211
Microsoft .NET AppHost Pack - 8.0.0 (x64_arm64)                                     64.0.4211
Microsoft .NET AppHost Pack - 8.0.0 (x64_x86)                                       64.0.4211
Microsoft .NET Core 1.0.1 - Host (x64)                                              4.0.20897
Microsoft .NET Core 1.0.1 - Host FX Resolver (x64)                                  4.0.20897
Microsoft .NET Core 1.0.1 - Runtime (x64)                                           1.0.1
Microsoft .NET Core 1.0.1 - SDK 1.0.0 Preview 2-003131 (x64)                        4.0.3131
Microsoft .NET Core 2.1 Templates 5.0.405 (x64)                                     8.23.61060
Microsoft .NET Core 3.1 Templates 3.1.426 (x64)                                     3.1.33.016244
Microsoft .NET Core 3.1 Templates 5.0.405 (x64)                                     12.21.61060
Microsoft .NET Core 3.1 Templates 8.0.100 (x64)                                     12.30.61899
Microsoft .NET Core 5.0 SDK                                                         1.0.23902
Microsoft .NET Core 5.0 Templates 5.0.104 (x64)                                     20.3.15214
Microsoft .NET Core 5.0 Templates 5.0.214 (x64)                                     20.4.59785
Microsoft .NET Core 5.0 Templates 5.0.405 (x64)                                     20.7.44676
Microsoft .NET Core 5.0 Templates 5.0.408 (x64)                                     20.4.59784
Microsoft .NET Core AppHost Pack - 3.1.22 (x64)                                     24.88.30721
Microsoft .NET Core AppHost Pack - 3.1.22 (x64_arm)                                 24.88.30721
Microsoft .NET Core AppHost Pack - 3.1.22 (x64_arm64)                               24.88.30721
Microsoft .NET Core AppHost Pack - 3.1.22 (x64_x86)                                 24.88.30721
Microsoft .NET Core AppHost Pack - 3.1.32 (x64)                                     24.192.31915
Microsoft .NET Core AppHost Pack - 3.1.32 (x64_arm)                                 24.192.31915
Microsoft .NET Core AppHost Pack - 3.1.32 (x64_arm64)                               24.192.31915
Microsoft .NET Core AppHost Pack - 3.1.32 (x64_x86)                                 24.192.31915
Microsoft .NET Core Host - 2.1.11 (x64)                                             16.108.27618
Microsoft .NET Core Host - 2.1.12 (x64)                                             16.112.27818
Microsoft .NET Core Host - 2.1.30 (x64)                                             16.120.30411
Microsoft .NET Core Host - 3.1.32 (x64)                                             24.192.31915
Microsoft .NET Core Host - 3.1.32 (x86)                                             24.192.31915
Microsoft .NET Core Host FX Resolver - 2.1.11 (x64)                                 16.108.27618
Microsoft .NET Core Host FX Resolver - 2.1.12 (x64)                                 16.112.27818
Microsoft .NET Core Host FX Resolver - 2.1.30 (x64)                                 16.120.30411
Microsoft .NET Core Host FX Resolver - 3.1.32 (x64)                                 24.192.31915
Microsoft .NET Core Host FX Resolver - 3.1.32 (x86)                                 24.192.31915
Microsoft .NET Core Runtime - 2.1.11 (x64)                                          16.108.27618
Microsoft .NET Core Runtime - 2.1.12 (x64)                                          16.112.27818
Microsoft .NET Core Runtime - 2.1.30 (x64)                                          16.120.30411
Microsoft .NET Core Runtime - 3.1.22 (x64)                                          24.88.30721
Microsoft .NET Core Runtime - 3.1.22 (x86)                                          24.88.30721
Microsoft .NET Core Runtime - 3.1.32 (x64)                                          24.192.31915
Microsoft .NET Core Runtime - 3.1.32 (x86)                                          24.192.31915
Microsoft .NET Core SDK 2.1.700 (x64)                                               8.191.9667
Microsoft .NET Core SDK 2.1.701 (x64)                                               8.191.26078
Microsoft .NET Core SDK 2.1.818 (x64)                                               8.220.42735
Microsoft .NET Core Targeting Pack - 3.1.0 (x64)                                    24.64.28315
Microsoft .NET Core Tools 2015 - Visual Studio 2015                                 14.1.40607.0
Microsoft .NET Core Toolset 3.1.426 (x64)                                           12.22.49012
Microsoft .NET Execution Environment (DNX) 1-rc1 (x64) for .NET Core                1.0.11123.0
Microsoft .NET Execution Environment (DNX) 1-rc1 (x64) for .NET Framework 4.6       1.0.11123.0
Microsoft .NET Framework 4 Multi-Targeting Pack                                     4.0.30319
Microsoft .NET Framework 4.5 Multi-Targeting Pack                                   4.5.50710
Microsoft .NET Framework 4.5.1 Multi-Targeting Pack                                 4.5.50932
Microsoft .NET Framework 4.5.1 Multi-Targeting Pack (ENU)                           4.5.50932
Microsoft .NET Framework 4.5.1 RC Multi-Targeting Pack for Windows Store Apps       4.5.21005
Microsoft .NET Framework 4.5.1 RC Multi-Targeting Pack for Windows Store Apps (ENU) 4.5.21005
Microsoft .NET Framework 4.5.1 SDK                                                  4.5.51641
Microsoft .NET Framework 4.5.2 Multi-Targeting Pack                                 4.5.51651
Microsoft .NET Framework 4.5.2 Multi-Targeting Pack (ENU)                           4.5.51209
Microsoft .NET Framework 4.6 SDK                                                    4.6.00081
Microsoft .NET Framework 4.6 Targeting Pack                                         4.6.00081
Microsoft .NET Framework 4.6 Targeting Pack (ENU)                                   4.6.00127
Microsoft .NET Framework 4.6.1 SDK                                                  4.6.01055
Microsoft .NET Framework 4.6.1 Targeting Pack                                       4.6.01055
Microsoft .NET Framework 4.6.1 Targeting Pack (ENU)                                 4.6.01055
Microsoft .NET Framework 4.6.2 Targeting Pack                                       4.6.01590
Microsoft .NET Framework 4.6.2 Targeting Pack (ENU)                                 4.6.01590
Microsoft .NET Framework 4.7 Targeting Pack                                         4.7.02053
Microsoft .NET Framework 4.7 Targeting Pack (ENU)                                   4.7.02053
Microsoft .NET Framework 4.7.1 Doc Redirected Targeting Pack (ENU)                  4.7.02558
Microsoft .NET Framework 4.7.1 Targeting Pack                                       4.7.02558
Microsoft .NET Framework 4.7.2 SDK                                                  4.7.03081
Microsoft .NET Framework 4.7.2 Targeting Pack                                       4.7.03062
Microsoft .NET Framework 4.7.2 Targeting Pack (ENU)                                 4.7.03062
Microsoft .NET Framework 4.8 SDK                                                    4.8.03928
Microsoft .NET Framework 4.8 Targeting Pack                                         4.8.03761
Microsoft .NET Framework 4.8 Targeting Pack (ENU)                                   4.8.03761
Microsoft .NET Framework Cumulative Intellisense Pack for Visual Studio (ENU)       4.8.09037
Microsoft .NET Host - 5.0.17 (x64)                                                  40.68.31213
Microsoft .NET Host - 5.0.17 (x86)                                                  40.68.31213
Microsoft .NET Host - 5.0.4 (x64)                                                   40.16.29816
Microsoft .NET Host - 6.0.25 (x64)                                                  48.100.4028
Microsoft .NET Host - 6.0.25 (x86)                                                  48.100.4028
Microsoft .NET Host - 7.0.14 (x64)                                                  56.56.4026
Microsoft .NET Host - 7.0.14 (x86)                                                  56.56.4026
Microsoft .NET Host - 8.0.0 (x64)                                                   64.0.4211
Microsoft .NET Host - 8.0.0 (x86)                                                   64.0.4211
Microsoft .NET Host FX Resolver - 5.0.14 (x64)                                      40.56.30907
Microsoft .NET Host FX Resolver - 5.0.14 (x86)                                      40.56.30907
Microsoft .NET Host FX Resolver - 5.0.17 (x64)                                      40.68.31213
Microsoft .NET Host FX Resolver - 5.0.17 (x86)                                      40.68.31213
Microsoft .NET Host FX Resolver - 5.0.4 (x64)                                       40.16.29816
Microsoft .NET Host FX Resolver - 6.0.2 (x64)                                       48.11.35878
Microsoft .NET Host FX Resolver - 6.0.25 (x64)                                      48.100.4028
Microsoft .NET Host FX Resolver - 6.0.25 (x86)                                      48.100.4028
Microsoft .NET Host FX Resolver - 6.0.5 (x64)                                       48.23.40665
Microsoft .NET Host FX Resolver - 7.0.14 (x64)                                      56.56.4026
Microsoft .NET Host FX Resolver - 7.0.14 (x86)                                      56.56.4026
Microsoft .NET Host FX Resolver - 8.0.0 (x64)                                       64.0.4211
Microsoft .NET Host FX Resolver - 8.0.0 (x86)                                       64.0.4211
Microsoft .NET Runtime - 5.0.14 (x64)                                               40.56.30907
Microsoft .NET Runtime - 5.0.14 (x86)                                               40.56.30907
Microsoft .NET Runtime - 5.0.17 (x64)                                               40.68.31213
Microsoft .NET Runtime - 5.0.17 (x86)                                               40.68.31213
Microsoft .NET Runtime - 5.0.4 (x64)                                                40.16.29816
Microsoft .NET Runtime - 6.0.2 (x64)                                                48.11.35878
Microsoft .NET Runtime - 6.0.25 (x64)                                               48.100.4028
Microsoft .NET Runtime - 6.0.25 (x86)                                               48.100.4028
Microsoft .NET Runtime - 6.0.5 (x64)                                                48.23.40665
Microsoft .NET Runtime - 7.0.14 (x64)                                               56.56.4026
Microsoft .NET Runtime - 7.0.14 (x86)                                               56.56.4026
Microsoft .NET Runtime - 8.0.0 (x64)                                                64.0.4211
Microsoft .NET Runtime - 8.0.0 (x86)                                                64.0.4211
Microsoft .NET SDK 5.0.405 (x64) from Visual Studio                                 5.4.522.6820
Microsoft .NET SDK 8.0.100 (x64) from Visual Studio                                 8.1.23.55115
Microsoft .NET Standard Targeting Pack - 2.1.0 (x64)                                24.0.28113
Microsoft .NET Targeting Pack - 5.0.0 (x64)                                         40.0.29513
Microsoft .NET Targeting Pack - 5.0.0 (x64)                                         40.0.29513
Microsoft .NET Targeting Pack - 6.0.25 (x64)                                        48.100.4028
Microsoft .NET Targeting Pack - 6.0.25 (x86)                                        48.100.4028
Microsoft .NET Targeting Pack - 6.0.5 (x64)                                         48.23.40665
Microsoft .NET Targeting Pack - 7.0.14 (x64)                                        56.56.4026
Microsoft .NET Targeting Pack - 8.0.0 (x64)                                         64.0.4211
Microsoft .NET Targeting Pack - 8.0.0 (x86)                                         64.0.4211
Microsoft .NET Toolset 5.0.104 (x64)                                                20.3.15214
Microsoft .NET Toolset 5.0.214 (x64)                                                20.7.59785
Microsoft .NET Toolset 5.0.405 (x64)                                                20.5.61060
Microsoft .NET Toolset 5.0.408 (x64)                                                20.6.59784
Microsoft .NET Toolset 6.0.203 (x64)                                                24.4.59963
Microsoft .NET Toolset 6.0.320 (x64)                                                24.7.59109
Microsoft .NET Toolset 7.0.404 (x64)                                                28.7.59108
Microsoft .NET Toolset 8.0.100 (x64)                                                32.6.61899
Microsoft .NET Version Manager (x64) 1.0.0-rc1                                      1.0.11123.0
Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object DisplayName -Match "^Microsoft .NET*" | Sort-Object DisplayName -Descending | Select-Object DisplayName,DisplayVersion | Format-Table -AutoSize
DisplayName                                                                         DisplayVersion
-----------                                                                         --------------
Microsoft .NET Targeting Pack - 8.0.0 (x86)                                         64.0.4211
Microsoft .NET Targeting Pack - 6.0.25 (x86)                                        48.100.4028
Microsoft .NET SDK 8.0.100 (x64)                                                    8.1.23.55115
Microsoft .NET SDK 7.0.404 (x64)                                                    7.4.423.52324
Microsoft .NET SDK 6.0.320 (x64)                                                    6.3.2023.52325
Microsoft .NET SDK 6.0.203 (x64)                                                    6.2.322.22107
Microsoft .NET SDK 5.0.408 (x64)                                                    5.4.822.21928
Microsoft .NET SDK 5.0.214 (x64)                                                    5.2.1422.21929
Microsoft .NET SDK 5.0.104 (x64)                                                    5.1.421.11822
Microsoft .NET Runtime - 8.0.0 (x86)                                                64.0.4211
Microsoft .NET Runtime - 7.0.14 (x86)                                               56.56.4026
Microsoft .NET Runtime - 7.0.14 (x64)                                               7.0.14.33019
Microsoft .NET Runtime - 6.0.25 (x86)                                               48.100.4028
Microsoft .NET Runtime - 6.0.2 (x64)                                                6.0.2.30914
Microsoft .NET Runtime - 5.0.17 (x86)                                               40.68.31213
Microsoft .NET Runtime - 5.0.14 (x86)                                               40.56.30907
Microsoft .NET Host FX Resolver - 8.0.0 (x86)                                       64.0.4211
Microsoft .NET Host FX Resolver - 7.0.14 (x86)                                      56.56.4026
Microsoft .NET Host FX Resolver - 6.0.25 (x86)                                      48.100.4028
Microsoft .NET Host FX Resolver - 5.0.17 (x86)                                      40.68.31213
Microsoft .NET Host FX Resolver - 5.0.14 (x86)                                      40.56.30907
Microsoft .NET Host - 8.0.0 (x86)                                                   64.0.4211
Microsoft .NET Host - 7.0.14 (x86)                                                  56.56.4026
Microsoft .NET Host - 6.0.25 (x86)                                                  48.100.4028
Microsoft .NET Host - 5.0.17 (x86)                                                  40.68.31213
Microsoft .NET Framework Cumulative Intellisense Pack for Visual Studio (ENU)       4.8.09037
Microsoft .NET Framework 4.8 Targeting Pack (ENU)                                   4.8.03761
Microsoft .NET Framework 4.8 Targeting Pack                                         4.8.03761
Microsoft .NET Framework 4.8 SDK                                                    4.8.03928
Microsoft .NET Framework 4.7.2 Targeting Pack (ENU)                                 4.7.03062
Microsoft .NET Framework 4.7.2 Targeting Pack                                       4.7.03062
Microsoft .NET Framework 4.7.2 SDK                                                  4.7.03081
Microsoft .NET Framework 4.7.1 Targeting Pack                                       4.7.02558
Microsoft .NET Framework 4.7.1 Doc Redirected Targeting Pack (ENU)                  4.7.02558
Microsoft .NET Framework 4.7 Targeting Pack (ENU)                                   4.7.02053
Microsoft .NET Framework 4.7 Targeting Pack                                         4.7.02053
Microsoft .NET Framework 4.6.2 Targeting Pack (ENU)                                 4.6.01590
Microsoft .NET Framework 4.6.2 Targeting Pack                                       4.6.01590
Microsoft .NET Framework 4.6.1 Targeting Pack (ENU)                                 4.6.01055
Microsoft .NET Framework 4.6.1 Targeting Pack                                       4.6.01055
Microsoft .NET Framework 4.6.1 SDK                                                  4.6.01055
Microsoft .NET Framework 4.6.1 Developer Pack                                       4.6.1055
Microsoft .NET Framework 4.6 Targeting Pack (ENU)                                   4.6.00127
Microsoft .NET Framework 4.6 Targeting Pack                                         4.6.00081
Microsoft .NET Framework 4.6 SDK                                                    4.6.00081
Microsoft .NET Framework 4.5.2 Multi-Targeting Pack (ENU)                           4.5.51209
Microsoft .NET Framework 4.5.2 Multi-Targeting Pack                                 4.5.51651
Microsoft .NET Framework 4.5.1 SDK                                                  4.5.51641
Microsoft .NET Framework 4.5.1 RC Multi-Targeting Pack for Windows Store Apps (ENU) 4.5.21005
Microsoft .NET Framework 4.5.1 RC Multi-Targeting Pack for Windows Store Apps       4.5.21005
Microsoft .NET Framework 4.5.1 Multi-Targeting Pack (ENU)                           4.5.50932
Microsoft .NET Framework 4.5.1 Multi-Targeting Pack                                 4.5.50932
Microsoft .NET Framework 4.5 Multi-Targeting Pack                                   4.5.50710
Microsoft .NET Framework 4 Multi-Targeting Pack                                     4.0.30319
Microsoft .NET Core Tools 2015 - Visual Studio 2015                                 14.1.40607.0
Microsoft .NET Core SDK 3.1.426 (x64)                                               3.1.426.16244
Microsoft .NET Core SDK 2.1.818 (x64)                                               2.1.818
Microsoft .NET Core SDK 2.1.701 (x64)                                               2.1.701
Microsoft .NET Core SDK 2.1.700 (x64)                                               2.1.700
Microsoft .NET Core Runtime - 3.1.32 (x86)                                          24.192.31915
Microsoft .NET Core Runtime - 3.1.22 (x86)                                          24.88.30721
Microsoft .NET Core Host FX Resolver - 3.1.32 (x86)                                 24.192.31915
Microsoft .NET Core Host - 3.1.32 (x86)                                             24.192.31915
Microsoft .NET Core 5.0 SDK                                                         1.0.23902
Microsoft .NET Core 1.0.1 - SDK 1.0.0 Preview 2-003131 (x64)                        1.0.0.3131
@oleg-shilo
Copy link
Owner

Can you please check what was that dotnet instance running?

Is it "C:\Program Files\dotnet\dotnet.exe" exec "C:\Program Files\dotnet\sdk\8.0.100\Roslyn\bincore\VBCSCompiler.dll" "-pipename:JuwiWgO5bKHRRSyz6+a4qbQahJpQMqADd3KXUnZ5CGE"

or

dotnet C:\Users\oleg\AppData\Roaming\Code\User\cs-script.user\dotnet\syntaxer\syntaxer.dll

@TilKenneth
Copy link
Author

REM Offending Process Path
"C:\Program Files\dotnet\dotnet.exe"
REM CmdLine
"dotnet %USERPROFILE%\AppData\Roaming\Code\User\cs-script.user\dotnet\syntaxer\syntaxer.dll -port:18003 -listen -client:25096 -timeout:60000 -cscs_path:%USERPROFILE%\AppData\Roaming\Code\User\cs-script.user\dotnet\cscs.dll"
REM CWD: %USERPROFILE%\AppData\Local\Programs\Microsoft VS Code\
REM Process Path
"C:\Program Files\dotnet\dotnet.exe"
REM CmdLine
"C:\Program Files\dotnet\dotnet.exe" exec "C:\Program Files\dotnet\sdk\8.0.100\Roslyn\bincore\VBCSCompiler.dll" "-pipename:woio4wp_Ft0hUxCL0ccp10qgrtoa0OV_xaVlAJ1gHZs"
REM cwd=C:\Program Files\dotnet\sdk\8.0.100\Roslyn\bincore\
>dotnet %USERPROFILE%\AppData\Roaming\Code\User\cs-script.user\dotnet\syntaxer\syntaxer.dll
CS-Syntaxer v3.1.1.0
Syntax provider for C# scripts (cs-script).
Copyright (C) 2022 Oleg Shilo (github.com/oleg-shilo/syntaxer.core)
Path: %USERPROFILE%\AppData\Roaming\Code\User\cs-script.user\dotnet\syntaxer\syntaxer.dll

@oleg-shilo
Copy link
Owner

VBCSCompiler.dll is SDK, it's not use dby CS-Script. It's something else that starts it.

And, syntaxer.dll is a part of CS-Script extension. It's used for the intellisense. If it misbehaves you can kill it and the extension wil restart it with the correct args.

I will analyze syntaxer.dll utilization and see where the problems can be rtiggered. Most likely too many concurrent requests

@TilKenneth
Copy link
Author

This happens only when I use %USERPROFILE%\.dotnet\tools\css.exe -vscode <file>.cs, opening VSCode independently it appears only syntax check (context menu) is performed, the Run/Debug options (top-right toolbar, context menu) has no apparent effect.

I tried using Selenium, css_nuget, it seems there are some CWD issues/NUGET/SystemProtection issues, but I want to resolve this issue before going further. I "solved" it (after Whitelisting cscs/css) and using -vs (2022 Community) and the NuGet package manager.

Question; I want to find any files from older releases, if I use the current release, will a system search for each filename also discover files from older releases? I think I am asking if any files from older releases is not present in the current release. I'll mention Notepad++, I think thats the only integration I tried, otherwise from ... well, thats why I ask.

@oleg-shilo
Copy link
Owner

Let's make it a little more clear.
There are two very different scenarios that you mentioned here.

  1. css -vs script.cs
    In this case the script engine creates a simple VS project with the script being a comparable content.
    Then it starts VS and loads the project into it. The rest is handled completely by VS and none of CS-Script family products is involved.

  2. css -vscode script.cs
    In this case the script engine just opens VSCode and loads the file into it.
    VSCode may or may not have folder/workspace already opened there.
    The rest is handled completely by VSCode though if VSCode has CS-Script extension installed, it will start treating the cs file as a script.

    1. VSCode extension script.cs is installed
      The extension will start syntaxer service (dotnet syntaxer.dll ...), which is the engine of all Intellysence operations. It is an external process and all instances of VSCode will communicate with this service via socket on -port:18003.
      Note, VSCode will block any extension that will try to work with the open document if it is the very first time you are opening it in the editor.
      image
      This is standard VS behavior and I suspect that it is the reason why you cannot execute the script. You will need mark the opened doc as trusted.
      After that the Intellisense will work as expected:
      capture

If your script ever stuck while being executed ("CS-Script is busy" error message) then you can always reset your session with "Ctrl+Shift+P":
image

I "solved" it (after Whitelisting cscs/css)

This happens a lot and not only to CS-Script :o(

Question; I want to find any files from older releases...

On the Releases page: https://github.com/oleg-shilo/cs-script/releases
And .NET Framework edition, here: https://github.com/oleg-shilo/cs-script.net-framework/releases

SavasCelik pushed a commit to SavasCelik/cs-script that referenced this issue Jan 20, 2024
…harp" has been changed to "Microsoft.CodeAnalysis.CSharp.Workspaces."

  Updated nuget dependencies
SavasCelik pushed a commit to SavasCelik/cs-script that referenced this issue Jan 20, 2024
---

## Changes

### CLI

- Added CLI help for `-new:cmd` command.
- Added CLI listing custom commands for `-cmd`.
- All dependencies are updated to the latest version
- Added `SetEnvironmentVariable("EntryScript",...)` on opening script in VS
- Updated -mkshim command script to allow relative path

### CSScriptLib

- All dependencies are updated to the latest version
- CSScriptLib: Issue oleg-shilo#353: NET8: "Microsoft.CodeAnalysis.CSharp" has been changed to "Microsoft.CodeAnalysis.CSharp.Workspaces."
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

2 participants