How does one programmatically determine the currently active dotnet version? I can run dnvm list, but cannot for the life of me get it to transfer output to a variable, file, string... nothing appears to work and I can't fathom why.
dnvm list > currentList.txt
results in the output still being displayed at the console and nothing redirected to file.
It doesn't appear to be writing to StdErr - 2>&1 doesn't change anything...
If anyone could even provide some insight into why this won't work, it would be much appreciated. Is there a Powershell way of querying this properly that I'm missing?