Question: I'm trying to set up goroot in wls2 Goland,but ut something went wrong:
"The selected directory is not a valid home for Go SDK"

![enter image description here](https://i.stack.imgur.com/TLA3v.png)

What should I do

Answer: 
**October 2021 update.**

Go SDK under WSL2 is supported in GoLand since 2021.3 (it reaches [Early Access Program](https://www.jetbrains.com/go/nextversion/) at the moment). GoLand suggests selecting Go SDK on WSL2 mount if the location of the project is on WSL2 as well.

[![enter image description here](https://i.stack.imgur.com/xleHl.png)](https://i.stack.imgur.com/xleHl.png)
I found out my issue was having the go source code in c:\ drive. It must be in WSL2 mnt to work correctly. Tested on GoLand 2021.3.1