Issue:
I've been having an issue with the dotnet command that I haven't seen anywhere else before: When I run any dotnet command, even dotnet --info
, the process takes several minutes to complete and produces thousands of lines of output on one specific machine. I've tried this in Visual Studio 2017, 2019 preview, and in the command prompt with the same results. I've also tried to manually set the verbosity using the -v q or -v m flags, but it makes no difference.
I believe that somewhere along the line when I was first setting up .net core, I set some type of diagnostic or tracing flag which has caused this behavior, but I can't figure out how to disable it. I don't see the same issues on my laptop which is also running core. I now use the laptop to actually compile the builds since every build takes 20+ minutes on my main, more powerful, development machine, even for default projects that are created with dotnet new
.
As an example, a dotnet --info
command took 4:50 and produced 6,937 lines of output on this machine.
Things I've tried: - Trying on Visual Studio 2017, 2019 preview, and the command prompt - Using Quiet or Minimal verbosity flags - Reinstalling Net Core
Environment: Win7 x64 Net Core versions 1.0 - 2.2.1
This is verbatim the output I'm seeing when I start the dotnet --info
command. On other machines, this command takes seconds to run, however on this one machine, it takes upwards of 5 minutes and thousand of lines of output. To give an idea, this is just the first 290 lines. The strange formatting near the beginning is exactly how it appears in the output window.
Resolution: I'm hoping someone else has seen this behavior before and could point me in the right direction to turn off this tracing / diagnostic type output.
M> dotnet -info
dotnet : Tracing enabled
At line:1 char:1
+ dotnet -info
+ ~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Tracing enabled:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
--- Invoked dotne
t
[ve
rsio
n: 2
.2.1
, comm
it has
h: 8
78dd
11e622
3286
5aec731fc9160
4c52c4
ecaf
cf] main = {
C:\Program Files\dotnet\dotnet.ex
e
-
i
n
f
o
}
R
e
adin
g fx res
olver
directory=[
C:\Program
Files\do
tnet\h
ost\fxr]
C
onsidering
fxr v
ersion
=[1.0
.5]..
.
Conside
ring f
xr ver
sion=[
1.1.0]...
Considering
fxr vers
ion=[1.1.
2]...
Consid
ering fx
r vers
ion=[2
.0.3]...
Consideri
ng fx
r versio
n=[2.0.5]..
.
Consid
ering fxr
versio
n=[2.0.6].
..
Consi
derin
g fxr
version
=[2.
0.9]..
.
Con
sideri
ng fxr version=[2.1.0]...
Consi
dering
fxr v
ersion
=[2.1.3]..
.
Consi
dering f
xr vers
ion=[2
.1.5].
..
Consi
derin
g fxr ve
rsion=
[2.1.
7]...
Con
sider
ing fxr version=[2.1.8]...
Considering fxr version=[2.2.1]...
Detected la
test
fxr version=[C:\Program
Files\dot
net\host\
fxr\2.2.1]...
R
esolved fxr [C:\Program Files\dotnet\host\fxr\2.2.1\hostfxr.dll]...
L
oaded library from C:\Prog
ram F
iles\
dotnet\host\fxr\2.2.1\hostfxr.dll
Invoking fx resolver [C:\Program Files\dotnet
\host
\fxr\2.2.1\
hostfxr.dll
] v2
Host path: [C:\Prog
ram Fil
es\dotnet\dot
net.exe
]
Dotn
et pat
h: [C:\Program Files\dotnet\
]
App
path:
[C:\P
rogram
Files
\dotne
t\dotnet.dll
]
Trac
ing enabled
--- I
nvoked hostfxr
v2 [commit hash: 878dd11e62232865aec731fc91604c52c4ecafcf] main
Checking if CoreCLR path exists=[C:\Program Files\dotnet\coreclr.dll]
--- Executing in muxer mode...
Using the provided arguments to determine the application to execute.
Application '-info' is not a managed executable.
--- Resolving dotnet from working dir
Probing path [Redacted\global.json] for global.json
Probing path [Redacted\global.json] for global.json
Probing path [Redacted\global.json] for global.json
Probing path [Redacted\global.json] for global.json
Probing path [Redacted\global.json] for global.json
Terminating global.json search at [G:\]
Searching SDK directory in [C:\Program Files\dotnet\]
--- Resolving SDK version from SDK dir [C:\Program Files\dotnet\sdk]
Considering version... [1.0.0-preview1-002702]
Considering version... [1.0.0-preview2-003121]
Considering version... [1.0.0-preview2-003131]
Considering version... [1.0.0-preview2-1-003177]
Considering version... [1.0.4]
Considering version... [1.1.0]
Considering version... [2.0.3]
Considering version... [2.1.103]
Considering version... [2.1.2]
Considering version... [2.1.200-preview-007474]
Considering version... [2.1.202]
Considering version... [2.1.300]
Considering version... [2.1.4]
Considering version... [2.1.401]
Considering version... [2.1.403]
Considering version... [2.1.504]
Considering version... [2.1.600-preview-009472]
Considering version... [2.1.600-preview-009497]
Considering version... [2.2.103]
Considering version... [2.2.200-preview-009748]
Considering version... [2.2.200-preview-009804]
Considering version... [NuGetFallbackFolder]
Checking if resolved SDK dir [C:\Program Files\dotnet\sdk\2.2.200-preview-009804] exists
Resolved SDK dir is [C:\Program Files\dotnet\sdk\2.2.200-preview-009804]
Searching SDK directory in [C:\Program Files\dotnet]
--- Resolving SDK version from SDK dir [C:\Program Files\dotnet\sdk]
Considering version... [1.0.0-preview1-002702]
Considering version... [1.0.0-preview2-003121]
Considering version... [1.0.0-preview2-003131]
Considering version... [1.0.0-preview2-1-003177]
Considering version... [1.0.4]
Considering version... [1.1.0]
Considering version... [2.0.3]
Considering version... [2.1.103]
Considering version... [2.1.2]
Considering version... [2.1.200-preview-007474]
Considering version... [2.1.202]
Considering version... [2.1.300]
Considering version... [2.1.4]
Considering version... [2.1.401]
Considering version... [2.1.403]
Considering version... [2.1.504]
Considering version... [2.1.600-preview-009472]
Considering version... [2.1.600-preview-009497]
Considering version... [2.2.103]
Considering version... [2.2.200-preview-009748]
Considering version... [2.2.200-preview-009804]
Considering version... [NuGetFallbackFolder]
Checking if resolved SDK dir [C:\Program Files\dotnet\sdk\2.2.200-preview-009804] exists
Resolved SDK dir is [C:\Program Files\dotnet\sdk\2.2.200-preview-009804]
Found CLI SDK in: C:\Program Files\dotnet\sdk\2.2.200-preview-009804
Using dotnet SDK dll=[C:\Program Files\dotnet\sdk\2.2.200-preview-009804\dotnet.dll]
Using the provided arguments to determine the application to execute.
Using dotnet root path [C:\Program Files\dotnet\]
App runtimeconfig.json from [C:\Program Files\dotnet\sdk\2.2.200-preview-009804\dotnet.dll]
Runtime config is cfg=C:\Program Files\dotnet\sdk\2.2.200-preview-009804\dotnet.runtimeconfig.json dev=C:\Program Files\dotnet\sdk\2.2.200-preview-009804\dotnet.runtimeconfig.dev.json
Attempting to read runtime config: C:\Program Files\dotnet\sdk\2.2.200-preview-009804\dotnet.runtimeconfig.json
Attempting to read dev runtime config: C:\Program Files\dotnet\sdk\2.2.200-preview-009804\dotnet.runtimeconfig.dev.json
Runtime config [C:\Program Files\dotnet\sdk\2.2.200-preview-009804\dotnet.runtimeconfig.json] is valid=[1]
--- Resolving FX directory, name 'Microsoft.NETCore.App' version '2.2.1'
Searching FX directory in [C:\Program Files\dotnet]
Attempting FX roll forward starting from [2.2.1]
'R
oll forward on no candidate fx' enabled with value [1]. Looking for the least production greater than or equal to [2.2.1]
Found version [2.2.1]
Applying patch roll forward from [2.2.1]
Inspecting version... [1.0.0]
Inspecting version... [1.0.0-rc2-3002702]
Inspecting version... [1.0.1]
Inspecting version... [1.0.5]
Inspecting version... [1.1.0]
Inspecting version... [1.1.2]
Inspecting version... [2.0.3]
Inspecting version... [2.0.5]
Inspecting version... [2.0.6]
Inspecting version... [2.0.9]
Inspecting version... [2.1.0]
Inspecting version... [2.1.3]
Inspecting version... [2.1.5]
Inspecting version... [2.1.7]
Inspecting version... [2.1.8]
Inspecting version... [2.2.1]
Changing Selected FX version from [] to [C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.1]
Chose FX version [C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.1]
Runtime config is cfg=C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.1\Microsoft.NETCore.App.runtimeconfig.json dev=C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.1\Microsoft.NETCore.App.runtimeconfig.dev.json
Attempting to read runtime config: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.1\Microsoft.NETCore.App.runtimeconfig.json
Attempting to read dev runtime config: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.1\Microsoft.NETCore.App.runtimeconfig.dev.json
Runtime config [C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.1\Microsoft.NETCore.App.runtimeconfig.json] is valid=[1]
Executing as a framework-dependent app as per config file [C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.1\Microsoft.NETCore.App.runtimeconfig.json]
--- Resolving hostpolicy.dll version from deps json [C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.1\Microsoft.NETCore.App.deps.json]
Resolved version 2.2.1 from dependency manifest file [C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.1\Microsoft.NETCore.App.deps.json]
Did not find hostpolicy.dll in directory C:\Program Files (x86)\coreservicing\pkgs\runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy\2.2.1\runtimes\win-x64\native
The expected hostpolicy.dll directory is [C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.1]
Loaded library from C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.1\hostpolicy.dll
Tracing enabled
Reading from host interface version: [0x16041101:240] to initialize policy version: [0x16041101:240]
--- Invoked hostpolicy [commit hash: 878dd11e62232865aec731fc91604c52c4ecafcf] [runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy,2.2.1,runtimes/win-x64/native][x64] main = {
C:\Program Files\dotnet\dotnet.exe
C:\Program Files\dotnet\sdk\2.2.200-preview-009804\dotnet.dll
-info
}
Deps file:
-- arguments_t: host_path='C:\Program Files\dotnet\dotnet.exe' app_root='C:\Program Files\dotnet\sdk\2.2.200-preview-009804\' deps='C:\Program Files\dotnet\sdk\2.2.200-preview-009804\dotnet.deps.json' core_svc='C:\Program Files (x86)\coreservicing' mgd_app='C:\Program Files\dotnet\sdk\2.2.200-preview-009804\dotnet.dll'
-- arguments_t: dotnet shared store: 'C:\Program Files\dotnet\store\x64\netcoreapp2.2'
-- arguments_t: global shared store: 'C:\Program Files\dotnet\store\x64\netcoreapp2.2'
Using Fx C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.1\Microsoft.NETCore.App.deps.json deps file
Loading deps file... C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.1\Microsoft.NETCore.App.deps.json as framework dependent=[0]
Adding runtime asset runtimes/win-x64/lib/netcoreapp2.2/Microsoft.CSharp.dll assemblyVersion=4.0.4.0 fileVersion=4.6.27207.3 from runtime.win-x64.Microsoft.NETCore.App/2.2.1
Adding runtime asset runtimes/win-x64/lib/netcoreapp2.2/Microsoft.VisualBasic.dll assemblyVersion=10.0.4.0 fileVersion=4.6.27207.3 from runtime.win-x64.Microsoft.NETCore.App/2.2.1
Adding runtime asset runtimes/win-x64/lib/netcoreapp2.2/Microsoft.Win32.Primitives.dll assemblyVersion=4.1.1.0 fileVersion=4.6.27207.3 from runtime.win-x64.Microsoft.NETCore.App/2.2.1
Adding runtime asset runtimes/win-x64/lib/netcoreapp
2.2/Microsoft.Win32.Registry.dll assemblyVersion=4.1.1.0 fileVersion=4.6.27207.3 from runtime.win-x64.Microsoft.NETCore.App/2.2.1
It looks like you have a trace environment variable set. Try running this from
Powershell
and then re-run
dotnet --info
.