How can I set up goroot in wsl2 goland

Viewed 3916

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

What should I do

3 Answers

October 2021 update.

Go SDK under WSL2 is supported in GoLand since 2021.3 (it reaches Early Access Program 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

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

Related